Skip to content

Commit b583cef

Browse files
committed
Merge tag 'omap-for-v5.5/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
Fixes for omaps for v5.5-rc cycle Here are few fixes for v5.5-rc cycle: - Two corner case fixes related to ti-sysc driver clock issues - Fixes for am57xx dts for pcie gpios - Beagle-x15 regulator dts fix - Fix for wkup_m3_ipc driver race * tag 'omap-for-v5.5/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot ARM: dts: beagle-x15-common: Model 5V0 regulator ARM: dts: am571x-idk: Fix gpios property to have the correct gpio number ARM: dts: am57xx-beagle-x15/am57xx-idk: Remove "gpios" for endpoint dt nodes bus: ti-sysc: Fix iterating over clocks ARM: OMAP2+: Fix ti_sysc_find_one_clockdomain to check for to_clk_hw_omap Link: https://lore.kernel.org/r/pull-1578418121-413328@atomide.com Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents 850e0a9 + 03729cf commit b583cef

6 files changed

Lines changed: 37 additions & 18 deletions

File tree

arch/arm/boot/dts/am571x-idk.dts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,7 @@
167167

168168
&pcie1_rc {
169169
status = "okay";
170-
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
171-
};
172-
173-
&pcie1_ep {
174-
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
170+
gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
175171
};
176172

177173
&mmc1 {

arch/arm/boot/dts/am572x-idk-common.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@
147147
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
148148
};
149149

150-
&pcie1_ep {
151-
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
152-
};
153-
154150
&mailbox5 {
155151
status = "okay";
156152
mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {

arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,27 @@
2929
reg = <0x0 0x80000000 0x0 0x80000000>;
3030
};
3131

32+
main_12v0: fixedregulator-main_12v0 {
33+
/* main supply */
34+
compatible = "regulator-fixed";
35+
regulator-name = "main_12v0";
36+
regulator-min-microvolt = <12000000>;
37+
regulator-max-microvolt = <12000000>;
38+
regulator-always-on;
39+
regulator-boot-on;
40+
};
41+
42+
evm_5v0: fixedregulator-evm_5v0 {
43+
/* Output of TPS54531D */
44+
compatible = "regulator-fixed";
45+
regulator-name = "evm_5v0";
46+
regulator-min-microvolt = <5000000>;
47+
regulator-max-microvolt = <5000000>;
48+
vin-supply = <&main_12v0>;
49+
regulator-always-on;
50+
regulator-boot-on;
51+
};
52+
3253
vdd_3v3: fixedregulator-vdd_3v3 {
3354
compatible = "regulator-fixed";
3455
regulator-name = "vdd_3v3";
@@ -547,10 +568,6 @@
547568
gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
548569
};
549570

550-
&pcie1_ep {
551-
gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
552-
};
553-
554571
&mcasp3 {
555572
#sound-dai-cells = <0>;
556573
assigned-clocks = <&l4per2_clkctrl DRA7_L4PER2_MCASP3_CLKCTRL 24>;

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,14 @@ static void __init dra7x_evm_mmc_quirk(void)
306306

307307
static struct clockdomain *ti_sysc_find_one_clockdomain(struct clk *clk)
308308
{
309+
struct clk_hw *hw = __clk_get_hw(clk);
309310
struct clockdomain *clkdm = NULL;
310311
struct clk_hw_omap *hwclk;
311312

312-
hwclk = to_clk_hw_omap(__clk_get_hw(clk));
313+
hwclk = to_clk_hw_omap(hw);
314+
if (!omap2_clk_is_hw_omap(hw))
315+
return NULL;
316+
313317
if (hwclk && hwclk->clkdm_name)
314318
clkdm = clkdm_lookup(hwclk->clkdm_name);
315319

drivers/bus/ti-sysc.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,12 @@ static int sysc_get_clocks(struct sysc *ddata)
343343
return -EINVAL;
344344
}
345345

346+
/* Always add a slot for main clocks fck and ick even if unused */
347+
if (!nr_fck)
348+
ddata->nr_clocks++;
349+
if (!nr_ick)
350+
ddata->nr_clocks++;
351+
346352
ddata->clocks = devm_kcalloc(ddata->dev,
347353
ddata->nr_clocks, sizeof(*ddata->clocks),
348354
GFP_KERNEL);
@@ -421,7 +427,7 @@ static int sysc_enable_opt_clocks(struct sysc *ddata)
421427
struct clk *clock;
422428
int i, error;
423429

424-
if (!ddata->clocks)
430+
if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1)
425431
return 0;
426432

427433
for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
@@ -455,7 +461,7 @@ static void sysc_disable_opt_clocks(struct sysc *ddata)
455461
struct clk *clock;
456462
int i;
457463

458-
if (!ddata->clocks)
464+
if (!ddata->clocks || ddata->nr_clocks < SYSC_OPTFCK0 + 1)
459465
return;
460466

461467
for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {

drivers/soc/ti/wkup_m3_ipc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ static void wkup_m3_rproc_boot_thread(struct wkup_m3_ipc *m3_ipc)
419419
ret = rproc_boot(m3_ipc->rproc);
420420
if (ret)
421421
dev_err(dev, "rproc_boot failed\n");
422+
else
423+
m3_ipc_state = m3_ipc;
422424

423425
do_exit(0);
424426
}
@@ -505,8 +507,6 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
505507
goto err_put_rproc;
506508
}
507509

508-
m3_ipc_state = m3_ipc;
509-
510510
return 0;
511511

512512
err_put_rproc:

0 commit comments

Comments
 (0)