Skip to content

Commit 486343d

Browse files
committed
Merge tag 'omap-for-v5.17/fixes-for-merge-window-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
Fixes for omaps A series of fixes for omap variants for minor issues, and a fix for a timer regression for some omap3 beagleboard versions. The timer fix needs to patch both the dts and the timer code because otherwise the timer quirk handling for old dtbs will prevent the dts fix from working. The other changes are for issues found by automated analysis, a macasp typo fix, and two cosmetic fixes for clocks. * tag 'omap-for-v5.17/fixes-for-merge-window-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Don't use legacy clock defines for dra7 clkctrl clk: ti: Move dra7 clock devices out of the legacy section ARM: dts: Fix timer regression for beagleboard revision c ARM: dts: am335x-wega: Fix typo in mcasp property rx-num-evt ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of ARM: OMAP2+: hwmod: Add of_node_put() before break Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 63a8728 + 31aa705 commit 486343d

File tree

10 files changed

+74
-54
lines changed

10 files changed

+74
-54
lines changed

Documentation/devicetree/bindings/arm/omap/omap.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ Boards (incomplete list of examples):
119119
- OMAP3 BeagleBoard : Low cost community board
120120
compatible = "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
121121

122+
- OMAP3 BeagleBoard A to B4 : Early BeagleBoard revisions A to B4 with a timer quirk
123+
compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
124+
122125
- OMAP3 Tobi with Overo : Commercial expansion board with daughter board
123126
compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3430", "ti,omap3"
124127

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
806806
logicpd-som-lv-37xx-devkit.dtb \
807807
omap3430-sdp.dtb \
808808
omap3-beagle.dtb \
809+
omap3-beagle-ab4.dtb \
809810
omap3-beagle-xm.dtb \
810811
omap3-beagle-xm-ab.dtb \
811812
omap3-cm-t3517.dtb \

arch/arm/boot/dts/am335x-wega.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
2 1 0 0 /* # 0: INACTIVE, 1: TX, 2: RX */
5656
>;
5757
tx-num-evt = <16>;
58-
rt-num-evt = <16>;
58+
rx-num-evt = <16>;
5959
status = "okay";
6060
};
6161

arch/arm/boot/dts/dra7.dtsi

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
target-module@48210000 {
161161
compatible = "ti,sysc-omap4-simple", "ti,sysc";
162162
power-domains = <&prm_mpu>;
163-
clocks = <&mpu_clkctrl DRA7_MPU_CLKCTRL 0>;
163+
clocks = <&mpu_clkctrl DRA7_MPU_MPU_CLKCTRL 0>;
164164
clock-names = "fck";
165165
#address-cells = <1>;
166166
#size-cells = <1>;
@@ -875,10 +875,10 @@
875875
<0x58000014 4>;
876876
reg-names = "rev", "syss";
877877
ti,syss-mask = <1>;
878-
clocks = <&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 0>,
879-
<&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 9>,
880-
<&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 10>,
881-
<&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 11>;
878+
clocks = <&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 0>,
879+
<&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 9>,
880+
<&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 10>,
881+
<&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 11>;
882882
clock-names = "fck", "hdmi_clk", "sys_clk", "tv_clk";
883883
#address-cells = <1>;
884884
#size-cells = <1>;
@@ -912,7 +912,7 @@
912912
SYSC_OMAP2_SOFTRESET |
913913
SYSC_OMAP2_AUTOIDLE)>;
914914
ti,syss-mask = <1>;
915-
clocks = <&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 8>;
915+
clocks = <&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 8>;
916916
clock-names = "fck";
917917
#address-cells = <1>;
918918
#size-cells = <1>;
@@ -939,8 +939,8 @@
939939
<SYSC_IDLE_SMART>,
940940
<SYSC_IDLE_SMART_WKUP>;
941941
ti,sysc-mask = <(SYSC_OMAP4_SOFTRESET)>;
942-
clocks = <&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 9>,
943-
<&dss_clkctrl DRA7_DSS_CORE_CLKCTRL 8>;
942+
clocks = <&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 9>,
943+
<&dss_clkctrl DRA7_DSS_DSS_CORE_CLKCTRL 8>;
944944
clock-names = "fck", "dss_clk";
945945
#address-cells = <1>;
946946
#size-cells = <1>;
@@ -979,7 +979,7 @@
979979
compatible = "vivante,gc";
980980
reg = <0x0 0x700>;
981981
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
982-
clocks = <&dss_clkctrl DRA7_BB2D_CLKCTRL 0>;
982+
clocks = <&dss_clkctrl DRA7_DSS_BB2D_CLKCTRL 0>;
983983
clock-names = "core";
984984
};
985985
};
@@ -1333,7 +1333,7 @@
13331333
ti,no-reset-on-init;
13341334
ti,no-idle;
13351335
timer@0 {
1336-
assigned-clocks = <&wkupaon_clkctrl DRA7_TIMER1_CLKCTRL 24>;
1336+
assigned-clocks = <&wkupaon_clkctrl DRA7_WKUPAON_TIMER1_CLKCTRL 24>;
13371337
assigned-clock-parents = <&sys_32k_ck>;
13381338
};
13391339
};
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
/dts-v1/;
3+
4+
#include "omap3-beagle.dts"
5+
6+
/ {
7+
model = "TI OMAP3 BeagleBoard A to B4";
8+
compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3";
9+
};
10+
11+
/*
12+
* Workaround for capacitor C70 issue, see "Boards revision A and < B5"
13+
* section at https://elinux.org/BeagleBoard_Community
14+
*/
15+
16+
/* Unusable as clocksource because of unreliable oscillator */
17+
&counter32k {
18+
status = "disabled";
19+
};
20+
21+
/* Unusable as clockevent because of unreliable oscillator, allow to idle */
22+
&timer1_target {
23+
/delete-property/ti,no-reset-on-init;
24+
/delete-property/ti,no-idle;
25+
timer@0 {
26+
/delete-property/ti,timer-alwon;
27+
};
28+
};
29+
30+
/* Preferred always-on timer for clocksource */
31+
&timer12_target {
32+
ti,no-reset-on-init;
33+
ti,no-idle;
34+
timer@0 {
35+
/* Always clocked by secure_32k_fck */
36+
};
37+
};
38+
39+
/* Preferred timer for clockevent */
40+
&timer2_target {
41+
ti,no-reset-on-init;
42+
ti,no-idle;
43+
timer@0 {
44+
assigned-clocks = <&gpt2_fck>;
45+
assigned-clock-parents = <&sys_ck>;
46+
};
47+
};

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

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -304,39 +304,6 @@
304304
phys = <0 &hsusb2_phy>;
305305
};
306306

307-
/* Unusable as clocksource because of unreliable oscillator */
308-
&counter32k {
309-
status = "disabled";
310-
};
311-
312-
/* Unusable as clockevent because if unreliable oscillator, allow to idle */
313-
&timer1_target {
314-
/delete-property/ti,no-reset-on-init;
315-
/delete-property/ti,no-idle;
316-
timer@0 {
317-
/delete-property/ti,timer-alwon;
318-
};
319-
};
320-
321-
/* Preferred always-on timer for clocksource */
322-
&timer12_target {
323-
ti,no-reset-on-init;
324-
ti,no-idle;
325-
timer@0 {
326-
/* Always clocked by secure_32k_fck */
327-
};
328-
};
329-
330-
/* Preferred timer for clockevent */
331-
&timer2_target {
332-
ti,no-reset-on-init;
333-
ti,no-idle;
334-
timer@0 {
335-
assigned-clocks = <&gpt2_fck>;
336-
assigned-clock-parents = <&sys_ck>;
337-
};
338-
};
339-
340307
&twl_gpio {
341308
ti,use-leds;
342309
/* pullups: BIT(1) */

arch/arm/mach-omap2/display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void)
263263
}
264264

265265
r = of_platform_populate(node, NULL, NULL, &pdev->dev);
266+
put_device(&pdev->dev);
266267
if (r) {
267268
pr_err("Unable to populate DSS submodule devices\n");
268-
put_device(&pdev->dev);
269269
return r;
270270
}
271271

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,10 @@ static int __init _init_clkctrl_providers(void)
752752

753753
for_each_matching_node(np, ti_clkctrl_match_table) {
754754
ret = _setup_clkctrl_provider(np);
755-
if (ret)
755+
if (ret) {
756+
of_node_put(np);
756757
break;
758+
}
757759
}
758760

759761
return ret;

drivers/clocksource/timer-ti-dm-systimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void __init dmtimer_systimer_assign_alwon(void)
241241
bool quirk_unreliable_oscillator = false;
242242

243243
/* Quirk unreliable 32 KiHz oscillator with incomplete dts */
244-
if (of_machine_is_compatible("ti,omap3-beagle") ||
244+
if (of_machine_is_compatible("ti,omap3-beagle-ab4") ||
245245
of_machine_is_compatible("timll,omap3-devkit8000")) {
246246
quirk_unreliable_oscillator = true;
247247
counter_32k = -ENODEV;

include/dt-bindings/clock/dra7.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,10 @@
8484
#define DRA7_L3_MAIN_2_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
8585
#define DRA7_L3_INSTR_CLKCTRL DRA7_CLKCTRL_INDEX(0x28)
8686

87-
/* iva clocks */
88-
#define DRA7_IVA_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
89-
#define DRA7_SL2IF_CLKCTRL DRA7_CLKCTRL_INDEX(0x28)
90-
9187
/* dss clocks */
9288
#define DRA7_DSS_CORE_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
9389
#define DRA7_BB2D_CLKCTRL DRA7_CLKCTRL_INDEX(0x30)
9490

95-
/* gpu clocks */
96-
#define DRA7_GPU_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
97-
9891
/* l3init clocks */
9992
#define DRA7_MMC1_CLKCTRL DRA7_CLKCTRL_INDEX(0x28)
10093
#define DRA7_MMC2_CLKCTRL DRA7_CLKCTRL_INDEX(0x30)
@@ -267,10 +260,17 @@
267260
#define DRA7_L3INSTR_L3_MAIN_2_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
268261
#define DRA7_L3INSTR_L3_INSTR_CLKCTRL DRA7_CLKCTRL_INDEX(0x28)
269262

263+
/* iva clocks */
264+
#define DRA7_IVA_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
265+
#define DRA7_SL2IF_CLKCTRL DRA7_CLKCTRL_INDEX(0x28)
266+
270267
/* dss clocks */
271268
#define DRA7_DSS_DSS_CORE_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
272269
#define DRA7_DSS_BB2D_CLKCTRL DRA7_CLKCTRL_INDEX(0x30)
273270

271+
/* gpu clocks */
272+
#define DRA7_GPU_CLKCTRL DRA7_CLKCTRL_INDEX(0x20)
273+
274274
/* l3init clocks */
275275
#define DRA7_L3INIT_MMC1_CLKCTRL DRA7_CLKCTRL_INDEX(0x28)
276276
#define DRA7_L3INIT_MMC2_CLKCTRL DRA7_CLKCTRL_INDEX(0x30)

0 commit comments

Comments
 (0)