Skip to content

Commit 79e6154

Browse files
committed
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from from Olof Johansson: "A collection of fixes for ARM platforms. A little large due to us missing to do one last week, but there's nothing in particular here that is in itself large and scary. Mostly a handful of smaller fixes all over the place. The majority is made up of fixes for OMAP, but there are a few for others as well. In particular, there was a decision to rename a binding for the Broadcom pinctrl block that we need to go in before the final release since we then treat it as ABI" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: omap3-gta04: Add ti,omap36xx to compatible property to avoid problems with booting ARM: tegra: add LED options back into tegra_defconfig ARM: dts: omap3-igep: fix boot fail due wrong compatible match ARM: OMAP3: Fix pinctrl interrupts for core2 pinctrl: Rename Broadcom Capri pinctrl binding pinctrl: refer to updated dt binding string. Update dtsi with new pinctrl compatible string ARM: OMAP: Kill warning in CPUIDLE code with !CONFIG_SMP ARM: OMAP2+: Add support for thumb mode on DT booted N900 ARM: OMAP2+: clock: fix clkoutx2 with CLK_SET_RATE_PARENT ARM: OMAP4: hwmod: Fix SOFTRESET logic for OMAP4 ARM: DRA7: hwmod data: correct the sysc data for spinlock ARM: OMAP5: PRM: Fix reboot handling ARM: sunxi: dt: Change the touchscreen compatibles ARM: sun7i: dt: Fix interrupt trigger types
2 parents fe9ea91 + 1055464 commit 79e6154

File tree

19 files changed

+146
-53
lines changed

19 files changed

+146
-53
lines changed

Documentation/devicetree/bindings/pinctrl/brcm,capri-pinctrl.txt renamed to Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Broadcom Capri Pin Controller
1+
Broadcom BCM281xx Pin Controller
22

33
This is a pin controller for the Broadcom BCM281xx SoC family, which includes
44
BCM11130, BCM11140, BCM11351, BCM28145, and BCM28155 SoCs.
@@ -7,14 +7,14 @@ BCM11130, BCM11140, BCM11351, BCM28145, and BCM28155 SoCs.
77

88
Required Properties:
99

10-
- compatible: Must be "brcm,capri-pinctrl".
10+
- compatible: Must be "brcm,bcm11351-pinctrl"
1111
- reg: Base address of the PAD Controller register block and the size
1212
of the block.
1313

1414
For example, the following is the bare minimum node:
1515

1616
pinctrl@35004800 {
17-
compatible = "brcm,capri-pinctrl";
17+
compatible = "brcm,bcm11351-pinctrl";
1818
reg = <0x35004800 0x430>;
1919
};
2020

@@ -119,7 +119,7 @@ Optional Properties (for HDMI pins):
119119
Example:
120120
// pin controller node
121121
pinctrl@35004800 {
122-
compatible = "brcm,capri-pinctrl";
122+
compatible = "brcmbcm11351-pinctrl";
123123
reg = <0x35004800 0x430>;
124124

125125
// pin configuration node

arch/arm/boot/dts/bcm11351.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
};
148148

149149
pinctrl@35004800 {
150-
compatible = "brcm,capri-pinctrl";
150+
compatible = "brcm,bcm11351-pinctrl";
151151
reg = <0x35004800 0x430>;
152152
};
153153

arch/arm/boot/dts/omap3-gta04.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
/ {
1515
model = "OMAP3 GTA04";
16-
compatible = "ti,omap3-gta04", "ti,omap3";
16+
compatible = "ti,omap3-gta04", "ti,omap36xx", "ti,omap3";
1717

1818
cpus {
1919
cpu@0 {

arch/arm/boot/dts/omap3-igep0020.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/ {
1616
model = "IGEPv2 (TI OMAP AM/DM37x)";
17-
compatible = "isee,omap3-igep0020", "ti,omap3";
17+
compatible = "isee,omap3-igep0020", "ti,omap36xx", "ti,omap3";
1818

1919
leds {
2020
pinctrl-names = "default";

arch/arm/boot/dts/omap3-igep0030.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
/ {
1515
model = "IGEP COM MODULE (TI OMAP AM/DM37x)";
16-
compatible = "isee,omap3-igep0030", "ti,omap3";
16+
compatible = "isee,omap3-igep0030", "ti,omap36xx", "ti,omap3";
1717

1818
leds {
1919
pinctrl-names = "default";

arch/arm/boot/dts/sun4i-a10.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
};
427427

428428
rtp: rtp@01c25000 {
429-
compatible = "allwinner,sun4i-ts";
429+
compatible = "allwinner,sun4i-a10-ts";
430430
reg = <0x01c25000 0x100>;
431431
interrupts = <29>;
432432
};

arch/arm/boot/dts/sun5i-a10s.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@
383383
};
384384

385385
rtp: rtp@01c25000 {
386-
compatible = "allwinner,sun4i-ts";
386+
compatible = "allwinner,sun4i-a10-ts";
387387
reg = <0x01c25000 0x100>;
388388
interrupts = <29>;
389389
};

arch/arm/boot/dts/sun5i-a13.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
};
347347

348348
rtp: rtp@01c25000 {
349-
compatible = "allwinner,sun4i-ts";
349+
compatible = "allwinner,sun4i-a10-ts";
350350
reg = <0x01c25000 0x100>;
351351
interrupts = <29>;
352352
};

arch/arm/boot/dts/sun7i-a20.dtsi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454
rtc: rtc@01c20d00 {
455455
compatible = "allwinner,sun7i-a20-rtc";
456456
reg = <0x01c20d00 0x20>;
457-
interrupts = <0 24 1>;
457+
interrupts = <0 24 4>;
458458
};
459459

460460
sid: eeprom@01c23800 {
@@ -463,7 +463,7 @@
463463
};
464464

465465
rtp: rtp@01c25000 {
466-
compatible = "allwinner,sun4i-ts";
466+
compatible = "allwinner,sun4i-a10-ts";
467467
reg = <0x01c25000 0x100>;
468468
interrupts = <0 29 4>;
469469
};
@@ -596,10 +596,10 @@
596596
hstimer@01c60000 {
597597
compatible = "allwinner,sun7i-a20-hstimer";
598598
reg = <0x01c60000 0x1000>;
599-
interrupts = <0 81 1>,
600-
<0 82 1>,
601-
<0 83 1>,
602-
<0 84 1>;
599+
interrupts = <0 81 4>,
600+
<0 82 4>,
601+
<0 83 4>,
602+
<0 84 4>;
603603
clocks = <&ahb_gates 28>;
604604
};
605605

arch/arm/configs/tegra_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ CONFIG_MMC_BLOCK_MINORS=16
204204
CONFIG_MMC_SDHCI=y
205205
CONFIG_MMC_SDHCI_PLTFM=y
206206
CONFIG_MMC_SDHCI_TEGRA=y
207+
CONFIG_NEW_LEDS=y
208+
CONFIG_LEDS_CLASS=y
207209
CONFIG_LEDS_GPIO=y
210+
CONFIG_LEDS_TRIGGERS=y
208211
CONFIG_LEDS_TRIGGER_TIMER=y
209212
CONFIG_LEDS_TRIGGER_ONESHOT=y
210213
CONFIG_LEDS_TRIGGER_HEARTBEAT=y

arch/arm/mach-omap2/cclock3xxx_data.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,9 @@ static const struct clk_ops dpll4_m5x2_ck_ops = {
433433
.enable = &omap2_dflt_clk_enable,
434434
.disable = &omap2_dflt_clk_disable,
435435
.is_enabled = &omap2_dflt_clk_is_enabled,
436+
.set_rate = &omap3_clkoutx2_set_rate,
436437
.recalc_rate = &omap3_clkoutx2_recalc,
438+
.round_rate = &omap3_clkoutx2_round_rate,
437439
};
438440

439441
static const struct clk_ops dpll4_m5x2_ck_3630_ops = {

arch/arm/mach-omap2/cpuidle44xx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "prm.h"
2424
#include "clockdomain.h"
2525

26+
#define MAX_CPUS 2
27+
2628
/* Machine specific information */
2729
struct idle_statedata {
2830
u32 cpu_state;
@@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = {
4850
},
4951
};
5052

51-
static struct powerdomain *mpu_pd, *cpu_pd[NR_CPUS];
52-
static struct clockdomain *cpu_clkdm[NR_CPUS];
53+
static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS];
54+
static struct clockdomain *cpu_clkdm[MAX_CPUS];
5355

5456
static atomic_t abort_barrier;
55-
static bool cpu_done[NR_CPUS];
57+
static bool cpu_done[MAX_CPUS];
5658
static struct idle_statedata *state_ptr = &omap4_idle_data[0];
5759

5860
/* Private functions */

arch/arm/mach-omap2/dpll3xxx.c

Lines changed: 77 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,32 @@ void omap3_dpll_deny_idle(struct clk_hw_omap *clk)
623623

624624
/* Clock control for DPLL outputs */
625625

626+
/* Find the parent DPLL for the given clkoutx2 clock */
627+
static struct clk_hw_omap *omap3_find_clkoutx2_dpll(struct clk_hw *hw)
628+
{
629+
struct clk_hw_omap *pclk = NULL;
630+
struct clk *parent;
631+
632+
/* Walk up the parents of clk, looking for a DPLL */
633+
do {
634+
do {
635+
parent = __clk_get_parent(hw->clk);
636+
hw = __clk_get_hw(parent);
637+
} while (hw && (__clk_get_flags(hw->clk) & CLK_IS_BASIC));
638+
if (!hw)
639+
break;
640+
pclk = to_clk_hw_omap(hw);
641+
} while (pclk && !pclk->dpll_data);
642+
643+
/* clk does not have a DPLL as a parent? error in the clock data */
644+
if (!pclk) {
645+
WARN_ON(1);
646+
return NULL;
647+
}
648+
649+
return pclk;
650+
}
651+
626652
/**
627653
* omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate
628654
* @clk: DPLL output struct clk
@@ -637,27 +663,14 @@ unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw,
637663
unsigned long rate;
638664
u32 v;
639665
struct clk_hw_omap *pclk = NULL;
640-
struct clk *parent;
641666

642667
if (!parent_rate)
643668
return 0;
644669

645-
/* Walk up the parents of clk, looking for a DPLL */
646-
do {
647-
do {
648-
parent = __clk_get_parent(hw->clk);
649-
hw = __clk_get_hw(parent);
650-
} while (hw && (__clk_get_flags(hw->clk) & CLK_IS_BASIC));
651-
if (!hw)
652-
break;
653-
pclk = to_clk_hw_omap(hw);
654-
} while (pclk && !pclk->dpll_data);
670+
pclk = omap3_find_clkoutx2_dpll(hw);
655671

656-
/* clk does not have a DPLL as a parent? error in the clock data */
657-
if (!pclk) {
658-
WARN_ON(1);
672+
if (!pclk)
659673
return 0;
660-
}
661674

662675
dd = pclk->dpll_data;
663676

@@ -672,6 +685,55 @@ unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw,
672685
return rate;
673686
}
674687

688+
int omap3_clkoutx2_set_rate(struct clk_hw *hw, unsigned long rate,
689+
unsigned long parent_rate)
690+
{
691+
return 0;
692+
}
693+
694+
long omap3_clkoutx2_round_rate(struct clk_hw *hw, unsigned long rate,
695+
unsigned long *prate)
696+
{
697+
const struct dpll_data *dd;
698+
u32 v;
699+
struct clk_hw_omap *pclk = NULL;
700+
701+
if (!*prate)
702+
return 0;
703+
704+
pclk = omap3_find_clkoutx2_dpll(hw);
705+
706+
if (!pclk)
707+
return 0;
708+
709+
dd = pclk->dpll_data;
710+
711+
/* TYPE J does not have a clkoutx2 */
712+
if (dd->flags & DPLL_J_TYPE) {
713+
*prate = __clk_round_rate(__clk_get_parent(pclk->hw.clk), rate);
714+
return *prate;
715+
}
716+
717+
WARN_ON(!dd->enable_mask);
718+
719+
v = omap2_clk_readl(pclk, dd->control_reg) & dd->enable_mask;
720+
v >>= __ffs(dd->enable_mask);
721+
722+
/* If in bypass, the rate is fixed to the bypass rate*/
723+
if (v != OMAP3XXX_EN_DPLL_LOCKED)
724+
return *prate;
725+
726+
if (__clk_get_flags(hw->clk) & CLK_SET_RATE_PARENT) {
727+
unsigned long best_parent;
728+
729+
best_parent = (rate / 2);
730+
*prate = __clk_round_rate(__clk_get_parent(hw->clk),
731+
best_parent);
732+
}
733+
734+
return *prate * 2;
735+
}
736+
675737
/* OMAP3/4 non-CORE DPLL clkops */
676738
const struct clk_hw_omap_ops clkhwops_omap3_dpll = {
677739
.allow_idle = omap3_dpll_allow_idle,

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,30 +1946,32 @@ static int _ocp_softreset(struct omap_hwmod *oh)
19461946
if (ret)
19471947
goto dis_opt_clks;
19481948

1949-
_write_sysconfig(v, oh);
1950-
ret = _clear_softreset(oh, &v);
1951-
if (ret)
1952-
goto dis_opt_clks;
1953-
19541949
_write_sysconfig(v, oh);
19551950

19561951
if (oh->class->sysc->srst_udelay)
19571952
udelay(oh->class->sysc->srst_udelay);
19581953

19591954
c = _wait_softreset_complete(oh);
1960-
if (c == MAX_MODULE_SOFTRESET_WAIT)
1955+
if (c == MAX_MODULE_SOFTRESET_WAIT) {
19611956
pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
19621957
oh->name, MAX_MODULE_SOFTRESET_WAIT);
1963-
else
1958+
ret = -ETIMEDOUT;
1959+
goto dis_opt_clks;
1960+
} else {
19641961
pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c);
1962+
}
1963+
1964+
ret = _clear_softreset(oh, &v);
1965+
if (ret)
1966+
goto dis_opt_clks;
1967+
1968+
_write_sysconfig(v, oh);
19651969

19661970
/*
19671971
* XXX add _HWMOD_STATE_WEDGED for modules that don't come back from
19681972
* _wait_target_ready() or _reset()
19691973
*/
19701974

1971-
ret = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0;
1972-
19731975
dis_opt_clks:
19741976
if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET)
19751977
_disable_optional_clocks(oh);

arch/arm/mach-omap2/omap_hwmod_7xx_data.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,11 +1365,10 @@ static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
13651365
.rev_offs = 0x0000,
13661366
.sysc_offs = 0x0010,
13671367
.syss_offs = 0x0014,
1368-
.sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1369-
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1370-
SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1371-
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1372-
SIDLE_SMART_WKUP),
1368+
.sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1369+
SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1370+
SYSS_HAS_RESET_STATUS),
1371+
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
13731372
.sysc_fields = &omap_hwmod_sysc_type1,
13741373
};
13751374

arch/arm/mach-omap2/pdata-quirks.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "common-board-devices.h"
2323
#include "dss-common.h"
2424
#include "control.h"
25+
#include "omap-secure.h"
26+
#include "soc.h"
2527

2628
struct pdata_init {
2729
const char *compatible;
@@ -169,6 +171,22 @@ static void __init am3517_evm_legacy_init(void)
169171
omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
170172
omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
171173
}
174+
175+
static void __init nokia_n900_legacy_init(void)
176+
{
177+
hsmmc2_internal_input_clk();
178+
179+
if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
180+
if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
181+
pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
182+
/* set IBE to 1 */
183+
rx51_secure_update_aux_cr(BIT(6), 0);
184+
} else {
185+
pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n");
186+
pr_warning("Thumb binaries may crash randomly without this workaround\n");
187+
}
188+
}
189+
}
172190
#endif /* CONFIG_ARCH_OMAP3 */
173191

174192
#ifdef CONFIG_ARCH_OMAP4
@@ -239,6 +257,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
239257
#endif
240258
#ifdef CONFIG_ARCH_OMAP3
241259
OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
260+
OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata),
242261
OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
243262
/* Only on am3517 */
244263
OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
@@ -259,7 +278,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
259278
static struct pdata_init pdata_quirks[] __initdata = {
260279
#ifdef CONFIG_ARCH_OMAP3
261280
{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
262-
{ "nokia,omap3-n900", hsmmc2_internal_input_clk, },
281+
{ "nokia,omap3-n900", nokia_n900_legacy_init, },
263282
{ "nokia,omap3-n9", hsmmc2_internal_input_clk, },
264283
{ "nokia,omap3-n950", hsmmc2_internal_input_clk, },
265284
{ "isee,omap3-igep0020", omap3_igep0020_legacy_init, },

0 commit comments

Comments
 (0)