Skip to contentSkip to conversation

Drop remaining pdata for am335x and use genpd

PATCH In review Tony Lindgren 3 participants 31 messages Oct 26, 2020 – Jan 15, 2021

Subsystems (5)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover Drop remaining pdata for am335x and use genpd

Hi all,

With the related driver changes, we can now drop the remaining platform data for am335x for v5.11 merge window and probe using device tree data and genpd instead.

Regards,

Tony

[1] https://lore.kernel.org/linux-omap/[email protected]/T/#t
[2] https://lore.kernel.org/linux-omap/[email protected]/T/#t

Tero Kristo (1):
ARM: dts: am33xx: add remaining PRM instances

Tony Lindgren (17):
ARM: dts: Configure also interconnect clocks for am3 system timers
ARM: OMAP2+: Drop legacy platform data for am3 control module
ARM: dts: Configure RTC powerdomain for am3
ARM: dts: Configure interconnect target module for am3 wkup_m3
ARM: OMAP2+: Drop legacy platform data for am3 wkup_m3
ARM: OMAP2+: Drop legacy platform data for am3 and am4 gpmc
ARM: OMAP2+: Drop legacy platform data for am3 debugss
ARM: OMAP2+: Drop legacy platform data for am3 emif
ARM: OMAP2+: Drop legacy platform data for am3 ocmcram
ARM: OMAP2+: Drop legacy platform data for am3 instr
ARM: OMAP2+: Drop legacy platform data for am3 mpuss
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup
ARM: dts: Use simple-pm-bus for genpd for am3 l4_fast
ARM: dts: Use simple-pm-bus for genpd for am3 l4_per
ARM: dts: Use simple-pm-bus for genpd for am3 l3
ARM: OMAP2+: Drop legacy remaining legacy platform data for am3
ARM: OMAP2+: Build hwmod related code as needed

 arch/arm/boot/dts/am335x-nano.dts             |   1 -
 arch/arm/boot/dts/am33xx-l4.dtsi              |  75 +++--
 arch/arm/boot/dts/am33xx.dtsi                 | 185 +++++++----
 arch/arm/boot/dts/am4372.dtsi                 |  49 ++-
 arch/arm/mach-omap2/Kconfig                   |   9 +
 arch/arm/mach-omap2/Makefile                  |  14 +-
 arch/arm/mach-omap2/io.c                      |   2 -
 .../omap_hwmod_33xx_43xx_common_data.h        |   2 -
 .../omap_hwmod_33xx_43xx_interconnect_data.c  |   8 -
 .../omap_hwmod_33xx_43xx_ipblock_data.c       |  36 ---
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c    | 294 ------------------
 arch/arm/mach-omap2/omap_hwmod_43xx_data.c    |   1 -
 arch/arm/mach-omap2/pdata-quirks.c            |  12 +-
 13 files changed, 236 insertions(+), 452 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/omap_hwmod_33xx_data.c
Signature · 1 line
2.29.1
author maintainer
#1 lore raw

PATCH 1/18 ARM: dts: am33xx: add remaining PRM instances

From: Tero Kristo <[email protected]>

Add remaining PRM instances for the am33xx SoC. Additionally, enable the genpd support for them.

[[email protected]: fixed a typo for #power-domain-cells]
---
 arch/arm/boot/dts/am33xx.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +20 -0
@@ -601,12 +601,20 @@ prm_per: prm@c00 {
 		compatible = "ti,am3-prm-inst", "ti,omap-prm-inst";
 		reg = <0xc00 0x100>;
 		#reset-cells = <1>;
+		#power-domain-cells = <0>;
 	};
 
 	prm_wkup: prm@d00 {
 		compatible = "ti,am3-prm-inst", "ti,omap-prm-inst";
 		reg = <0xd00 0x100>;
 		#reset-cells = <1>;
+		#power-domain-cells = <0>;
+	};
+
+	prm_mpu: prm@e00 {
+		compatible = "ti,am3-prm-inst", "ti,omap-prm-inst";
+		reg = <0xe00 0x100>;
+		#power-domain-cells = <0>;
 	};
 
 	prm_device: prm@f00 {
@@ -615,12 +623,24 @@ prm_device: prm@f00 {
 		#reset-cells = <1>;
 	};
 
+	prm_rtc: prm@1000 {
+		compatible = "ti,am3-prm-inst", "ti,omap-prm-inst";
+		reg = <0x1000 0x100>;
+		#power-domain-cells = <0>;
+	};
+
 	prm_gfx: prm@1100 {
 		compatible = "ti,am3-prm-inst", "ti,omap-prm-inst";
 		reg = <0x1100 0x100>;
 		#power-domain-cells = <0>;
 		#reset-cells = <1>;
 	};
+
+	prm_cefuse: prm@1200 {
+		compatible = "ti,am3-prm-inst", "ti,omap-prm-inst";
+		reg = <0x1200 0x100>;
+		#power-domain-cells = <0>;
+	};
 };
 
 /* Preferred always-on timer for clocksource */
Signature · 1 line
2.29.1
author maintainer
#2 lore raw

PATCH 2/18 ARM: dts: Configure also interconnect clocks for am3 system timers

In reply to Tony Lindgren

We now manage clocksource and clockevent clocks directly with timer-ti-dm-systimer. In order to use genpd with prm_omap, GENPD_FLAG_PM_CLK and simple-pm-bus, we need to keep the system timer related interconnect clocks enabled until clocksource suspend is done.

---
 arch/arm/boot/dts/am33xx.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +6 -0
@@ -645,6 +645,9 @@ prm_cefuse: prm@1200 {
 
 /* Preferred always-on timer for clocksource */
 &timer1_target {
+	clocks = <&l4_wkup_clkctrl AM3_L4_WKUP_TIMER1_CLKCTRL 0>,
+		 <&l4_wkup_clkctrl AM3_L4_WKUP_L4_WKUP_CLKCTRL 0>;
+	clock-names = "fck", "ick";
 	ti,no-reset-on-init;
 	ti,no-idle;
 	timer@0 {
@@ -655,6 +658,9 @@ timer@0 {
 
 /* Preferred timer for clockevent */
 &timer2_target {
+	clocks = <&l4ls_clkctrl AM3_L4LS_TIMER2_CLKCTRL 0>,
+		 <&l4ls_clkctrl AM3_L4LS_L4_LS_CLKCTRL 0>;
+	clock-names = "fck", "ick";
 	ti,no-reset-on-init;
 	ti,no-idle;
 	timer@0 {
Signature · 1 line
2.29.1
author maintainer
#3 lore raw

PATCH 3/18 ARM: OMAP2+: Drop legacy platform data for am3 control module

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

To drop the legacy platform data for am3 control module, we need to configure the missing functional clock and tag the module to not idle as platform data also had it configured with HWMOD_INIT_NO_IDLE.

---
 arch/arm/boot/dts/am33xx-l4.dtsi           |  3 +++
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 24 ----------------------
 2 files changed, 3 insertions(+), 24 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +3 -0
@@ -274,6 +274,9 @@ target-module@10000 {			/* 0x44e10000, ap 22 0c.0 */
 			compatible = "ti,sysc-omap4", "ti,sysc";
 			reg = <0x10000 0x4>;
 			reg-names = "rev";
+			clocks = <&l4_wkup_clkctrl AM3_L4_WKUP_CONTROL_CLKCTRL 0>;
+			clock-names = "fck";
+			ti,no-idle;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x00000000 0x00010000 0x00010000>,
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -24
@@ -182,21 +182,6 @@ static struct omap_hwmod am33xx_debugss_hwmod = {
 	.opt_clks_cnt	= ARRAY_SIZE(debugss_opt_clks),
 };
 
-static struct omap_hwmod am33xx_control_hwmod = {
-	.name		= "control",
-	.class		= &am33xx_control_hwmod_class,
-	.clkdm_name	= "l4_wkup_clkdm",
-	.flags		= HWMOD_INIT_NO_IDLE,
-	.main_clk	= "dpll_core_m4_div2_ck",
-	.prcm		= {
-		.omap4	= {
-			.clkctrl_offs	= AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
-			.modulemode	= MODULEMODE_SWCTRL,
-		},
-	},
-};
-
-
 /*
  * Interfaces
  */
@@ -257,14 +242,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
 	.user		= OCP_USER_MPU,
 };
 
-/* l4 wkup -> control */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
-	.master		= &am33xx_l4_wkup_hwmod,
-	.slave		= &am33xx_control_hwmod,
-	.clk		= "dpll_core_m4_div2_ck",
-	.user		= OCP_USER_MPU,
-};
-
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__emif,
 	&am33xx_mpu__l3_main,
@@ -278,7 +255,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_wkup_m3__l4_wkup,
 	&am33xx_l3_main__debugss,
 	&am33xx_l4_wkup__wkup_m3,
-	&am33xx_l4_wkup__control,
 	&am33xx_l4_wkup__smartreflex0,
 	&am33xx_l4_wkup__smartreflex1,
 	&am33xx_l3_s__gpmc,
Signature · 1 line
2.29.1
author maintainer
#4 lore raw

PATCH 4/18 ARM: dts: Configure RTC powerdomain for am3

In reply to Tony Lindgren

For genpd we need the RTC powerdomain configured.

Cc Dave Gerlach <[email protected]>
Cc Suman Anna <[email protected]>
---
 arch/arm/boot/dts/am33xx-l4.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am33xx-l4.dtsi +1 -0
@@ -436,6 +436,7 @@ target-module@3e000 {			/* 0x44e3e000, ap 35 60.0 */
 					<SYSC_IDLE_SMART>,
 					<SYSC_IDLE_SMART_WKUP>;
 			/* Domains (P, C): rtc_pwrdm, l4_rtc_clkdm */
+			power-domains = <&prm_rtc>;
 			clocks = <&l4_rtc_clkctrl AM3_L4_RTC_RTC_CLKCTRL 0>;
 			clock-names = "fck";
 			#address-cells = <1>;
Signature · 1 line
2.29.1
author maintainer
#5 lore raw

PATCH 5/18 ARM: dts: Configure interconnect target module for am3 wkup_m3

In reply to Tony Lindgren

We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver.

Note that we no longer need ti,no-reset-on-init as the rstctrl resets are properly handled by the reset driver and claimed by the RTC driver. And we need to squash together the module ranges for driver compability.

Cc Dave Gerlach <[email protected]>
Cc Suman Anna <[email protected]>
---
 arch/arm/boot/dts/am33xx-l4.dtsi | 23 ++++++++++++++---------
 arch/arm/boot/dts/am33xx.dtsi    |  8 --------
 2 files changed, 14 insertions(+), 17 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +14 -9
@@ -32,20 +32,25 @@ segment@100000 {					/* 0x44d00000 */
 
 		target-module@0 {			/* 0x44d00000, ap 4 28.0 */
 			compatible = "ti,sysc-omap4", "ti,sysc";
+			ti,hwmods = "wkup_m3";
 			reg = <0x0 0x4>;
 			reg-names = "rev";
+			clocks = <&l4_wkup_aon_clkctrl AM3_L4_WKUP_AON_WKUP_M3_CLKCTRL 0>;
+			clock-names = "fck";
 			#address-cells = <1>;
 			#size-cells = <1>;
-			ranges = <0x0 0x0 0x4000>;
-			status = "disabled";
-		};
+			ranges = <0x00000000 0x00000000 0x4000>,
+				 <0x00080000 0x00080000 0x2000>;
 
-		target-module@80000 {			/* 0x44d80000, ap 6 10.0 */
-			compatible = "ti,sysc";
-			status = "disabled";
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0x0 0x80000 0x2000>;
+			wkup_m3: cpu@0 {
+				compatible = "ti,am3352-wkup-m3";
+				reg = <0x00000000 0x4000>,
+				      <0x00080000 0x2000>;
+				reg-names = "umem", "dmem";
+				resets = <&prm_wkup 3>;
+				reset-names = "rstctrl";
+				ti,pm-firmware = "am335x-pm-firmware.elf";
+			};
 		};
 	};
 
arch/arm/boot/dts/am33xx.dtsi +0 -8
@@ -180,14 +180,6 @@ ocp: ocp {
 		ti,hwmods = "l3_main";
 
 		l4_wkup: interconnect@44c00000 {
-			wkup_m3: wkup_m3@100000 {
-				compatible = "ti,am3352-wkup-m3";
-				reg = <0x100000 0x4000>,
-				      <0x180000 0x2000>;
-				reg-names = "umem", "dmem";
-				ti,hwmods = "wkup_m3";
-				ti,pm-firmware = "am335x-pm-firmware.elf";
-			};
 		};
 		l4_per: interconnect@48000000 {
 		};
Signature · 1 line
2.29.1
author maintainer
#6 lore raw

PATCH 6/18 ARM: OMAP2+: Drop legacy platform data for am3 wkup_m3

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch.

Cc Dave Gerlach <[email protected]>
Cc Suman Anna <[email protected]>
---
 arch/arm/boot/dts/am33xx-l4.dtsi           |  1 -
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 43 ----------------------
 2 files changed, 44 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +0 -1
@@ -32,7 +32,6 @@ segment@100000 {					/* 0x44d00000 */
 
 		target-module@0 {			/* 0x44d00000, ap 4 28.0 */
 			compatible = "ti,sysc-omap4", "ti,sysc";
-			ti,hwmods = "wkup_m3";
 			reg = <0x0 0x4>;
 			reg-names = "rev";
 			clocks = <&l4_wkup_aon_clkctrl AM3_L4_WKUP_AON_WKUP_M3_CLKCTRL 0>;
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -43

62 lines not on this page · raw message

Signature · 1 line
2.29.1
author maintainer
#7 lore raw

PATCH 7/18 ARM: OMAP2+: Drop legacy platform data for am3 and am4 gpmc

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch.

---
 arch/arm/boot/dts/am335x-nano.dts             |  1 -
 arch/arm/boot/dts/am33xx.dtsi                 | 48 ++++++++++++------
 arch/arm/boot/dts/am4372.dtsi                 | 49 +++++++++++++------
 .../omap_hwmod_33xx_43xx_common_data.h        |  2 -
 .../omap_hwmod_33xx_43xx_interconnect_data.c  |  8 ---
 .../omap_hwmod_33xx_43xx_ipblock_data.c       | 33 -------------
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c    |  1 -
 arch/arm/mach-omap2/omap_hwmod_43xx_data.c    |  1 -
 8 files changed, 65 insertions(+), 78 deletions(-)
arch/arm/boot/dts/am335x-nano.dts +0 -1
@@ -238,7 +238,6 @@ &elm {
 
 &gpmc {
 	compatible = "ti,am3352-gpmc";
-	ti,hwmods = "gpmc";
 	status = "okay";
 	gpmc,num-waitpins = <2>;
 	pinctrl-names = "default";
arch/arm/boot/dts/am33xx.dtsi +32 -16

55 lines not on this page · raw message

arch/arm/boot/dts/am4372.dtsi +33 -16

57 lines not on this page · raw message

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h +0 -2
@@ -26,7 +26,6 @@ extern struct omap_hwmod_ocp_if am33xx_mpu__prcm;
 extern struct omap_hwmod_ocp_if am33xx_l3_s__l3_main;
 extern struct omap_hwmod_ocp_if am33xx_gfx__l3_main;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__gfx;
-extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc;
 extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer2;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc;
 
@@ -41,7 +40,6 @@ extern struct omap_hwmod am33xx_prcm_hwmod;
 extern struct omap_hwmod am33xx_ocmcram_hwmod;
 extern struct omap_hwmod am33xx_smartreflex0_hwmod;
 extern struct omap_hwmod am33xx_smartreflex1_hwmod;
-extern struct omap_hwmod am33xx_gpmc_hwmod;
 
 extern struct omap_hwmod_class am33xx_emif_hwmod_class;
 extern struct omap_hwmod_class am33xx_l4_hwmod_class;
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c +0 -8
@@ -74,14 +74,6 @@ struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3s cfg -> gpmc */
-struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
-	.master		= &am33xx_l3_s_hwmod,
-	.slave		= &am33xx_gpmc_hwmod,
-	.clk		= "l3s_gclk",
-	.user		= OCP_USER_MPU,
-};
-
 /* l3 main -> ocmc */
 struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
 	.master		= &am33xx_l3_main_hwmod,
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -33
@@ -218,44 +218,12 @@ struct omap_hwmod_class am33xx_control_hwmod_class = {
 	.name		= "control",
 };
 
-
-/* gpmc */
-static struct omap_hwmod_class_sysconfig gpmc_sysc = {
-	.rev_offs	= 0x0,
-	.sysc_offs	= 0x10,
-	.syss_offs	= 0x14,
-	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
-			SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-	.sysc_fields	= &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
-	.name		= "gpmc",
-	.sysc		= &gpmc_sysc,
-};
-
-struct omap_hwmod am33xx_gpmc_hwmod = {
-	.name		= "gpmc",
-	.class		= &am33xx_gpmc_hwmod_class,
-	.clkdm_name	= "l3s_clkdm",
-	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
-	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
-	.main_clk	= "l3s_gclk",
-	.prcm		= {
-		.omap4	= {
-			.modulemode	= MODULEMODE_SWCTRL,
-		},
-	},
-};
-
 static void omap_hwmod_am33xx_clkctrl(void)
 {
 	CLKCTRL(am33xx_smartreflex0_hwmod,
 		AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_smartreflex1_hwmod,
 		AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
-	CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l3_main_hwmod, AM33XX_CM_PER_L3_CLKCTRL_OFFSET);
@@ -275,7 +243,6 @@ static void omap_hwmod_am43xx_clkctrl(void)
 		AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_smartreflex1_hwmod,
 		AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
-	CLKCTRL(am33xx_gpmc_hwmod, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l4_ls_hwmod, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l3_main_hwmod, AM43XX_CM_PER_L3_CLKCTRL_OFFSET);
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -1
@@ -214,7 +214,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__debugss,
 	&am33xx_l4_wkup__smartreflex0,
 	&am33xx_l4_wkup__smartreflex1,
-	&am33xx_l3_s__gpmc,
 	&am33xx_l3_main__ocmc,
 	NULL,
 };
arch/arm/mach-omap2/omap_hwmod_43xx_data.c +0 -1
@@ -150,7 +150,6 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 	&am43xx_l4_wkup__control,
 	&am43xx_l4_wkup__smartreflex0,
 	&am43xx_l4_wkup__smartreflex1,
-	&am33xx_l3_s__gpmc,
 	&am33xx_l3_main__ocmc,
 	NULL,
 };
Signature · 1 line
2.29.1
author maintainer
#8 lore raw

PATCH 8/18 ARM: OMAP2+: Drop legacy platform data for am3 debugss

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

---
 arch/arm/boot/dts/am33xx.dtsi              | 19 ++++++++---
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 37 ----------------------
 2 files changed, 14 insertions(+), 42 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +14 -5
@@ -144,11 +144,20 @@ oppnitro-1000000000 {
 		};
 	};
 
-	pmu@4b000000 {
-		compatible = "arm,cortex-a8-pmu";
-		interrupts = <3>;
-		reg = <0x4b000000 0x1000000>;
-		ti,hwmods = "debugss";
+	target-module@4b000000 {
+		compatible = "ti,sysc-omap4-simple", "ti,sysc";
+		clocks = <&l3_aon_clkctrl AM3_L3_AON_DEBUGSS_CLKCTRL 0>;
+		clock-names = "fck";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x4b000000 0x1000000>;
+
+		pmu@0 {
+			compatible = "arm,cortex-a8-pmu";
+			interrupts = <3>;
+			reg = <0 0x1000000>;
+			ti,hwmods = "debugss";
+		};
 	};
 
 	/*
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -37
@@ -129,34 +129,6 @@ static struct omap_hwmod am33xx_ocpwp_hwmod = {
 };
 #endif
 
-/*
- * 'debugss' class
- * debug sub system
- */
-static struct omap_hwmod_opt_clk debugss_opt_clks[] = {
-	{ .role = "dbg_sysclk", .clk = "dbg_sysclk_ck" },
-	{ .role = "dbg_clka", .clk = "dbg_clka_ck" },
-};
-
-static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
-	.name		= "debugss",
-};
-
-static struct omap_hwmod am33xx_debugss_hwmod = {
-	.name		= "debugss",
-	.class		= &am33xx_debugss_hwmod_class,
-	.clkdm_name	= "l3_aon_clkdm",
-	.main_clk	= "trace_clk_div_ck",
-	.prcm		= {
-		.omap4	= {
-			.clkctrl_offs	= AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
-			.modulemode	= MODULEMODE_SWCTRL,
-		},
-	},
-	.opt_clks	= debugss_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(debugss_opt_clks),
-};
-
 /*
  * Interfaces
  */
@@ -177,14 +149,6 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3_main -> debugss */
-static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = {
-	.master		= &am33xx_l3_main_hwmod,
-	.slave		= &am33xx_debugss_hwmod,
-	.clk		= "dpll_core_m4_ck",
-	.user		= OCP_USER_MPU,
-};
-
 /* l4 wkup -> smartreflex0 */
 static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
 	.master		= &am33xx_l4_wkup_hwmod,
@@ -211,7 +175,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__l3_s,
 	&am33xx_l3_main__l3_instr,
 	&am33xx_l3_s__l3_main,
-	&am33xx_l3_main__debugss,
 	&am33xx_l4_wkup__smartreflex0,
 	&am33xx_l4_wkup__smartreflex1,
 	&am33xx_l3_main__ocmc,
Signature · 1 line
2.29.1
author maintainer
#9 lore raw

PATCH 9/18 ARM: OMAP2+: Drop legacy platform data for am3 emif

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

Cc Dave Gerlach <[email protected]>
Cc Suman Anna <[email protected]>
---
 arch/arm/boot/dts/am33xx.dtsi              | 24 +++++++++++++++-------
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 24 ----------------------
 2 files changed, 17 insertions(+), 31 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +17 -7
@@ -479,14 +479,24 @@ pm_sram_data: pm-data-sram@1000 {
 			};
 		};
 
-		emif: emif@4c000000 {
-			compatible = "ti,emif-am3352";
-			reg = <0x4c000000 0x1000000>;
-			ti,hwmods = "emif";
-			interrupts = <101>;
-			sram = <&pm_sram_code
-				&pm_sram_data>;
+		target-module@4c000000 {
+			compatible = "ti,sysc-omap4-simple", "ti,sysc";
+			reg = <0x4c000000 0x4>;
+			reg-names = "rev";
+			clocks = <&l3_clkctrl AM3_L3_EMIF_CLKCTRL 0>;
+			clock-names = "fck";
 			ti,no-idle;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0x0 0x4c000000 0x1000000>;
+
+			emif: emif@0 {
+				compatible = "ti,emif-am3352";
+				reg = <0 0x1000000>;
+				interrupts = <101>;
+				sram = <&pm_sram_code
+					&pm_sram_data>;
+			};
 		};
 
 		target-module@50000000 {
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -24
@@ -27,21 +27,6 @@
  * IP blocks
  */
 
-/* emif */
-static struct omap_hwmod am33xx_emif_hwmod = {
-	.name		= "emif",
-	.class		= &am33xx_emif_hwmod_class,
-	.clkdm_name	= "l3_clkdm",
-	.flags		= HWMOD_INIT_NO_IDLE,
-	.main_clk	= "dpll_ddr_m2_div2_ck",
-	.prcm		= {
-		.omap4	= {
-			.clkctrl_offs	= AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
-			.modulemode	= MODULEMODE_SWCTRL,
-		},
-	},
-};
-
 /* l4_hs */
 static struct omap_hwmod am33xx_l4_hs_hwmod = {
 	.name		= "l4_hs",
@@ -133,14 +118,6 @@ static struct omap_hwmod am33xx_ocpwp_hwmod = {
  * Interfaces
  */
 
-/* l3 main -> emif */
-static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
-	.master		= &am33xx_l3_main_hwmod,
-	.slave		= &am33xx_emif_hwmod,
-	.clk		= "dpll_core_m4_ck",
-	.user		= OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3 main -> l4 hs */
 static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
 	.master		= &am33xx_l3_main_hwmod,
@@ -166,7 +143,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
 };
 
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
-	&am33xx_l3_main__emif,
 	&am33xx_mpu__l3_main,
 	&am33xx_mpu__prcm,
 	&am33xx_l3_s__l4_ls,
Signature · 1 line
2.29.1
author maintainer
#10 lore raw

PATCH 10/18 ARM: OMAP2+: Drop legacy platform data for am3 ocmcram

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

Note that we need to use "ti,no-idle" here.

Cc Dave Gerlach <[email protected]>
Cc Suman Anna <[email protected]>
---
 arch/arm/boot/dts/am33xx.dtsi                 | 36 ++++++++++++-------
 .../omap_hwmod_33xx_43xx_ipblock_data.c       |  1 -
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c    |  1 -
 3 files changed, 23 insertions(+), 15 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +23 -13
@@ -459,23 +459,33 @@ cppi41dma: dma-controller@2000 {
 			};
 		};
 
-		ocmcram: sram@40300000 {
-			compatible = "mmio-sram";
-			reg = <0x40300000 0x10000>; /* 64k */
-			ranges = <0x0 0x40300000 0x10000>;
+		target-module@40300000 {
+			compatible = "ti,sysc-omap4-simple", "ti,sysc";
+			clocks = <&l3_clkctrl AM3_L3_OCMCRAM_CLKCTRL 0>;
+			clock-names = "fck";
+			ti,no-idle;
 			#address-cells = <1>;
 			#size-cells = <1>;
+			ranges = <0 0x40300000 0x10000>;
 
-			pm_sram_code: pm-code-sram@0 {
-				compatible = "ti,sram";
-				reg = <0x0 0x1000>;
-				protect-exec;
-			};
+			ocmcram: sram@0 {
+				compatible = "mmio-sram";
+				reg = <0 0x10000>; /* 64k */
+				ranges = <0 0 0x10000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
 
-			pm_sram_data: pm-data-sram@1000 {
-				compatible = "ti,sram";
-				reg = <0x1000 0x1000>;
-				pool;
+				pm_sram_code: pm-code-sram@0 {
+					compatible = "ti,sram";
+					reg = <0x0 0x1000>;
+					protect-exec;
+				};
+
+				pm_sram_data: pm-data-sram@1000 {
+					compatible = "ti,sram";
+					reg = <0x1000 0x1000>;
+					pool;
+				};
 			};
 		};
 
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -1
@@ -229,7 +229,6 @@ static void omap_hwmod_am33xx_clkctrl(void)
 	CLKCTRL(am33xx_l3_main_hwmod, AM33XX_CM_PER_L3_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_mpu_hwmod , AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l3_instr_hwmod , AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
-	CLKCTRL(am33xx_ocmcram_hwmod , AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
 }
 
 void omap_hwmod_am33xx_reg(void)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -1
@@ -153,7 +153,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_s__l3_main,
 	&am33xx_l4_wkup__smartreflex0,
 	&am33xx_l4_wkup__smartreflex1,
-	&am33xx_l3_main__ocmc,
 	NULL,
 };
 
Signature · 1 line
2.29.1
author maintainer
#11 lore raw

PATCH 11/18 ARM: OMAP2+: Drop legacy platform data for am3 instr

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

---
 arch/arm/boot/dts/am33xx.dtsi                 | 20 +++++++++++++------
 .../omap_hwmod_33xx_43xx_ipblock_data.c       |  1 -
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c    |  1 -
 3 files changed, 14 insertions(+), 8 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +14 -6
@@ -146,17 +146,25 @@ oppnitro-1000000000 {
 
 	target-module@4b000000 {
 		compatible = "ti,sysc-omap4-simple", "ti,sysc";
-		clocks = <&l3_aon_clkctrl AM3_L3_AON_DEBUGSS_CLKCTRL 0>;
+		clocks = <&l3_clkctrl AM3_L3_L3_INSTR_CLKCTRL 0>;
 		clock-names = "fck";
+		ti,no-idle;
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x0 0x4b000000 0x1000000>;
 
-		pmu@0 {
-			compatible = "arm,cortex-a8-pmu";
-			interrupts = <3>;
-			reg = <0 0x1000000>;
-			ti,hwmods = "debugss";
+		target-module@140000 {
+			compatible = "ti,sysc-omap4-simple", "ti,sysc";
+			clocks = <&l3_aon_clkctrl AM3_L3_AON_DEBUGSS_CLKCTRL 0>;
+			clock-names = "fck";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0x0 0x140000 0xec0000>;
+
+			pmu@0 {
+				compatible = "arm,cortex-a8-pmu";
+				interrupts = <3>;
+			};
 		};
 	};
 
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -1
@@ -246,7 +246,6 @@ static void omap_hwmod_am43xx_clkctrl(void)
 	CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l3_main_hwmod, AM43XX_CM_PER_L3_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_mpu_hwmod , AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET);
-	CLKCTRL(am33xx_l3_instr_hwmod , AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_ocmcram_hwmod , AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
 }
 
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -1
@@ -149,7 +149,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_s__l4_wkup,
 	&am33xx_l3_main__l4_hs,
 	&am33xx_l3_main__l3_s,
-	&am33xx_l3_main__l3_instr,
 	&am33xx_l3_s__l3_main,
 	&am33xx_l4_wkup__smartreflex0,
 	&am33xx_l4_wkup__smartreflex1,
Signature · 1 line
2.29.1
author maintainer
#12 lore raw

PATCH 12/18 ARM: OMAP2+: Drop legacy platform data for am3 mpuss

In reply to Tony Lindgren

We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property.

As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch.

---
 arch/arm/boot/dts/am33xx-l4.dtsi               | 18 ++++++++++++++++++
 arch/arm/boot/dts/am33xx.dtsi                  |  6 ------
 .../omap_hwmod_33xx_43xx_ipblock_data.c        |  1 -
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c     |  2 --
 4 files changed, 18 insertions(+), 9 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +18 -0
@@ -1861,6 +1861,24 @@ segment@200000 {					/* 0x48200000 */
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
+		ranges = <0x00000000 0x00200000 0x010000>;
+
+		target-module@0 {
+			compatible = "ti,sysc-omap4-simple", "ti,sysc";
+			power-domains = <&prm_mpu>;
+			clocks = <&mpu_clkctrl AM3_MPU_MPU_CLKCTRL 0>;
+			clock-names = "fck";
+			ti,no-idle;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0 0x10000>;
+
+			mpu@0 {
+				compatible = "ti,omap3-mpu";
+				pm-sram = <&pm_sram_code
+					   &pm_sram_data>;
+			};
+		};
 	};
 
 	segment@300000 {					/* 0x48300000 */
arch/arm/boot/dts/am33xx.dtsi +0 -6
@@ -174,12 +174,6 @@ pmu@0 {
 	 */
 	soc {
 		compatible = "ti,omap-infra";
-		mpu {
-			compatible = "ti,omap3-mpu";
-			ti,hwmods = "mpu";
-			pm-sram = <&pm_sram_code
-				   &pm_sram_data>;
-		};
 	};
 
 	/*
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -1
@@ -227,7 +227,6 @@ static void omap_hwmod_am33xx_clkctrl(void)
 	CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l3_main_hwmod, AM33XX_CM_PER_L3_CLKCTRL_OFFSET);
-	CLKCTRL(am33xx_mpu_hwmod , AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET);
 	CLKCTRL(am33xx_l3_instr_hwmod , AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
 }
 
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -2
@@ -143,8 +143,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
 };
 
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
-	&am33xx_mpu__l3_main,
-	&am33xx_mpu__prcm,
 	&am33xx_l3_s__l4_ls,
 	&am33xx_l3_s__l4_wkup,
 	&am33xx_l3_main__l4_hs,
Signature · 1 line
2.29.1
author maintainer
#13 lore raw

PATCH 13/18 ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

In reply to Tony Lindgren

We can now enable simple-pm-bus to use genpd.

---
 arch/arm/boot/dts/am33xx-l4.dtsi | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +7 -4
@@ -1,5 +1,8 @@
 &l4_wkup {						/* 0x44c00000 */
-	compatible = "ti,am33xx-l4-wkup", "simple-bus";
+	compatible = "ti,am33xx-l4-wkup", "simple-pm-bus";
+	power-domains = <&prm_wkup>;
+	clocks = <&l4_wkup_clkctrl AM3_L4_WKUP_L4_WKUP_CLKCTRL 0>;
+	clock-names = "fck";
 	reg = <0x44c00000 0x800>,
 	      <0x44c00800 0x800>,
 	      <0x44c01000 0x400>,
@@ -12,7 +15,7 @@ &l4_wkup {						/* 0x44c00000 */
 		 <0x00200000 0x44e00000 0x100000>;	/* segment 2 */
 
 	segment@0 {					/* 0x44c00000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00000000 0x000800>,	/* ap 0 */
@@ -22,7 +25,7 @@ segment@0 {					/* 0x44c00000 */
 	};
 
 	segment@100000 {					/* 0x44d00000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00100000 0x004000>,	/* ap 4 */
@@ -54,7 +57,7 @@ wkup_m3: cpu@0 {
 	};
 
 	segment@200000 {					/* 0x44e00000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00200000 0x002000>,	/* ap 8 */
Signature · 1 line
2.29.1
#14 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Hi Tony,

Quoted 3 lines · Tony Lindgren

We can now enable simple-pm-bus to use genpd.

Thanks for your patch, which is now commit 5a230524f87926f2 ("ARM:
dts: Use simple-pm-bus for genpd for am3 l4_wkup") in v5.11-rc1.

I have bisected a boot failure on BeagleBone Black to this commit. Reverting this commit on top of a v5.11-rc3-based tree does not help.

With "earlycon keep_bootcon", I do get some output, the last line is

l4-wkup-clkctrl:00d4:0: failed to disable

I have attached the kernel output of the previous (good) commit, and the failing one.

Do you have a clue?
Thanks!

Quoted 31 lines
arch/arm/boot/dts/am33xx-l4.dtsi +6 -3
@@ -1,5 +1,8 @@
 &l4_wkup {                                             /* 0x44c00000 */
-       compatible = "ti,am33xx-l4-wkup", "simple-bus";
+       compatible = "ti,am33xx-l4-wkup", "simple-pm-bus";
+       power-domains = <&prm_wkup>;
+       clocks = <&l4_wkup_clkctrl AM3_L4_WKUP_L4_WKUP_CLKCTRL 0>;
+       clock-names = "fck";
        reg = <0x44c00000 0x800>,
              <0x44c00800 0x800>,
              <0x44c01000 0x400>,
@@ -12,7 +15,7 @@ &l4_wkup {                                            /* 0x44c00000 */
                 <0x00200000 0x44e00000 0x100000>;      /* segment 2 */
 
        segment@0 {                                     /* 0x44c00000 */
-               compatible = "simple-bus";
+               compatible = "simple-pm-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges = <0x00000000 0x00000000 0x000800>,      /* ap 0 */
@@ -22,7 +25,7 @@ segment@0 {                                   /* 0x44c00000 */
        };
 
        segment@100000 {                                        /* 0x44d00000 */
-               compatible = "simple-bus";
+               compatible = "simple-pm-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges = <0x00000000 0x00100000 0x004000>,      /* ap 4 */

arch/arm/boot/dts/am33xx-l4.dtsi wkup_m3: cpu@0 { · line 63

Quoted 8 lines
arch/arm/boot/dts/am33xx-l4.dtsi +1 -1
@@ -54,7 +57,7 @@ wkup_m3: cpu@0 {
        };
 
        segment@200000 {                                        /* 0x44e00000 */
-               compatible = "simple-bus";
+               compatible = "simple-pm-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges = <0x00000000 0x00200000 0x002000>,      /* ap 8 */

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author maintainer
#15 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Hi,

Quoted 13 lines · Geert Uytterhoeven

Hi Tony,

Quoted 3 lines · Tony Lindgren

We can now enable simple-pm-bus to use genpd.

Thanks for your patch, which is now commit 5a230524f87926f2 ("ARM:
dts: Use simple-pm-bus for genpd for am3 l4_wkup") in v5.11-rc1.

I have bisected a boot failure on BeagleBone Black to this commit. Reverting this commit on top of a v5.11-rc3-based tree does not help.

Quoted 8 lines

With "earlycon keep_bootcon", I do get some output, the last line is

l4-wkup-clkctrl:00d4:0: failed to disable

I have attached the kernel output of the previous (good) commit, and the failing one.

Do you have a clue?

Strange, bbb has been working for me with NFSroot, that's with omap2plus_defconfig. Care to send your .config so I can give it a try tomorrow?

Regards,

Tony

#16 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Hi Tony,

Quoted 16 lines · Tony Lindgren
Quoted 15 lines · Geert Uytterhoeven
Quoted 3 lines · Tony Lindgren

We can now enable simple-pm-bus to use genpd.

Thanks for your patch, which is now commit 5a230524f87926f2 ("ARM:
dts: Use simple-pm-bus for genpd for am3 l4_wkup") in v5.11-rc1.

I have bisected a boot failure on BeagleBone Black to this commit. Reverting this commit on top of a v5.11-rc3-based tree does not help.

With "earlycon keep_bootcon", I do get some output, the last line is

l4-wkup-clkctrl:00d4:0: failed to disable

Quoted 8 lines
Quoted 4 lines

I have attached the kernel output of the previous (good) commit, and the failing one.

Do you have a clue?

Strange, bbb has been working for me with NFSroot, that's with omap2plus_defconfig. Care to send your .config so I can give it a try tomorrow?

Sent by private email.

Just tried omap2plus_defconfig, and it also hangs during boot.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author maintainer
#17 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines · Tony Lindgren

Strange, bbb has been working for me with NFSroot, that's with omap2plus_defconfig. Care to send your .config so I can give it a try tomorrow?

Sent by private email.

OK thanks.

Quoted 1 line

Just tried omap2plus_defconfig, and it also hangs during boot.

Hmm OK. Will give it a try tomorrow.

Reegards,

Tony

author maintainer
#18 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines · Tony Lindgren

Strange, bbb has been working for me with NFSroot, that's with omap2plus_defconfig. Care to send your .config so I can give it a try tomorrow?

Sent by private email.

OK thanks.

Quoted 1 line

Just tried omap2plus_defconfig, and it also hangs during boot.

Hmm and I just tried and bbb still boots NFSroot for me at commit 5a230524f879 ("ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup").

Quoted 1 line

Hmm OK. Will give it a try tomorrow.

Later,

Tony

author maintainer
#19 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Tony Lindgren
Quoted 5 lines · Geert Uytterhoeven
Quoted 3 lines · Tony Lindgren

Strange, bbb has been working for me with NFSroot, that's with omap2plus_defconfig. Care to send your .config so I can give it a try tomorrow?

Quoted 10 lines
Quoted 5 lines
Quoted 1 line

Sent by private email.

OK thanks.

Quoted 1 line

Just tried omap2plus_defconfig, and it also hangs during boot.

Hmm and I just tried and bbb still boots NFSroot for me at commit 5a230524f879 ("ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup").

Quoted 1 line

Hmm OK. Will give it a try tomorrow.

Not sure why your bbb would produce all the deferred probe while mine won't.

However, I've noticed that we need the following patch on omap4/5 and dra7 when playing with updating them to use genpd.

Maybe this also fixes your boot issue if you can give it a try?

Regards,

Tony

8< -------------------

drivers/bus/ti-sysc.c +49 -0
@@ -642,6 +642,51 @@ static int sysc_parse_and_check_child_range(struct sysc *ddata)
 	return 0;
 }
 
+/* Interconnect instances to probe before l4_per instances */
+static struct resource early_bus_ranges[] = {
+	/* am3/4 l4_wkup */
+	{ .start = 0x44c00000, .end = 0x44c00000 + 0x300000, },
+	/* omap4/5 and dra7 l4_cfg */
+	{ .start = 0x4a000000, .end = 0x4a000000 + 0x300000, },
+	/* omap4 l4_wkup */
+	{ .start = 0x4a300000, .end = 0x4a300000 + 0x30000,  },
+	/* omap5 and dra7 l4_wkup without dra7 dcan segment */
+	{ .start = 0x4ae00000, .end = 0x4ae00000 + 0x30000,  },
+};
+
+static atomic_t sysc_defer = ATOMIC_INIT(10);
+
+/**
+ * sysc_defer_non_critical - defer non_critical interconnect probing
+ * @ddata: device driver data
+ *
+ * We want to probe l4_cfg and l4_wkup interconnect instances before any
+ * l4_per instances as l4_per instances depend on resources on l4_cfg and
+ * l4_wkup interconnects.
+ */
+static int sysc_defer_non_critical(struct sysc *ddata)
+{
+	struct resource *res;
+	int i;
+
+	if (!atomic_read(&sysc_defer))
+		return 0;
+
+	for (i = 0; i < ARRAY_SIZE(early_bus_ranges); i++) {
+		res = &early_bus_ranges[i];
+		if (ddata->module_pa >= res->start &&
+		    ddata->module_pa <= res->end) {
+			atomic_set(&sysc_defer, 0);
+
+			return 0;
+		}
+	}
+
+	atomic_dec_if_positive(&sysc_defer);
+
+	return -EPROBE_DEFER;
+}
+
 static struct device_node *stdout_path;
 
 static void sysc_init_stdout_path(struct sysc *ddata)
@@ -870,6 +915,10 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
 	if (error)
 		return error;
 
+	error = sysc_defer_non_critical(ddata);
+	if (error)
+		return error;
+
 	sysc_check_children(ddata);
 
 	error = sysc_parse_registers(ddata);
Signature · 1 line
2.30.0
#20 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Morning Tony & All,

Quoted 23 lines · Tony Lindgren
Quoted 12 lines · Tony Lindgren
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Geert Uytterhoeven

On Wed, Jan 13, 2021 at 5:23 PM Tony Lindgren <[email protected]

Quoted 6 lines

wrote:
Strange, bbb has been working for me with NFSroot, that's with
omap2plus_defconfig. Care to send your .config so I can give it a
try tomorrow?

Sent by private email.

Quoted 9 lines
Quoted 3 lines

OK thanks.

Quoted 1 line

Just tried omap2plus_defconfig, and it also hangs during boot.

Hmm and I just tried and bbb still boots NFSroot for me at commit 5a230524f879 ("ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup").

Quoted 1 line

Hmm OK. Will give it a try tomorrow.

Quoted 8 lines

Not sure why your bbb would produce all the deferred probe while mine won't.

However, I've noticed that we need the following patch on omap4/5 and dra7 when playing with updating them to use genpd.

Maybe this also fixes your boot issue if you can give it a try?

I do also experience the boot problem described by Geert.

Head being:
b0625afe305253d0831af9289b37c906c18a781b
ARM: OMAP2+: Drop legacy platform data for am3 mpuss

=> BBB boots Ok.

Head being:
5a230524f87926f24d637fe62fd689f7f86f5036
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

=> BBB boot fails. (I don't have any debug parameters => last thing I see in UART is from uBoot:

Bytes transferred = 89849 (15ef9 hex)
Kernel image @ 0x81000000 [ 0x000000 - 0x928200 ] ## Flattened Device Tree blob at 82000000
Booting using the fdt blob at 0x82000000 Using Device Tree in place at 82000000, end 82018ef8

Starting kernel ...

Head being

5a230524f87926f24d637fe62fd689f7f86f5036 + this patch
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup (+ patch) Boot still fails for me.

Please note - my environment takes the intermediate build result file:
arch/arm/boot/dts/.am335x-boneblack.dtb.dts.tmp

and compiles this with '-@' to allow further overlays.

Best Regards
Matti Vaittinen

author maintainer
#21 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Quoted 6 lines · Vaittinen, Matti

I do also experience the boot problem described by Geert.

Head being:
b0625afe305253d0831af9289b37c906c18a781b
ARM: OMAP2+: Drop legacy platform data for am3 mpuss

Quoted 8 lines

=> BBB boots Ok.

Head being:
5a230524f87926f24d637fe62fd689f7f86f5036
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

=> BBB boot fails. (I don't have any debug parameters => last thing I see in UART is from uBoot:

Looking at the .config Geert sent me, at least CONFIG_SIMPLE_PM_BUS=y is now needed, and probably should be selected or default y for omaps.

Adding that removes the -512 errors at least that I started seeing with Geert's config too.

Can you guys check if adding CONFIG_SIMPLE_PM_BUS=y fixes the problem?

Regards,

Tony

#22 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Thanks Tony,

Quoted 22 lines · Tony Lindgren

* Vaittinen, Matti <[email protected]> [210114 07:58]:

Quoted 8 lines

I do also experience the boot problem described by Geert.

Head being:
b0625afe305253d0831af9289b37c906c18a781b
ARM: OMAP2+: Drop legacy platform data for am3 mpuss

=> BBB boots Ok.

Quoted 7 lines

Head being:
5a230524f87926f24d637fe62fd689f7f86f5036
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

=> BBB boot fails. (I don't have any debug parameters => last thing I
see in UART is from uBoot:

Looking at the .config Geert sent me, at least CONFIG_SIMPLE_PM_BUS=y is now needed, and probably should be selected or default y for omaps.

Quoted 6 lines

Adding that removes the -512 errors at least that I started seeing with
Geert's config too.

Can you guys check if adding CONFIG_SIMPLE_PM_BUS=y fixes the problem?

After enabling CONFIG_SIMPLE_PM_BUS 5a230524f87926f24d637fe62fd689f7f86f5036
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

boots Ok :) Sounds like it should be enabled on BBB by default.

Best Regards
Matti Vaittinen

#23 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

In reply to Tony Lindgren

Hi Tony,

Quoted 16 lines · Tony Lindgren
Quoted 6 lines · Vaittinen, Matti

I do also experience the boot problem described by Geert.

Head being:
b0625afe305253d0831af9289b37c906c18a781b
ARM: OMAP2+: Drop legacy platform data for am3 mpuss

Quoted 8 lines

=> BBB boots Ok.

Head being:
5a230524f87926f24d637fe62fd689f7f86f5036
ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

=> BBB boot fails. (I don't have any debug parameters => last thing I see in UART is from uBoot:

Quoted 7 lines

Looking at the .config Geert sent me, at least CONFIG_SIMPLE_PM_BUS=y is now needed, and probably should be selected or default y for omaps.

Adding that removes the -512 errors at least that I started seeing with Geert's config too.

Can you guys check if adding CONFIG_SIMPLE_PM_BUS=y fixes the problem?

Thanks, that did the trick!
Sorry for not realizing that myself.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author maintainer
#24 lore raw

Re: [PATCH 13/18] ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup

Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line · Tony Lindgren

Can you guys check if adding CONFIG_SIMPLE_PM_BUS=y fixes the problem?

Thanks, that did the trick!
Sorry for not realizing that myself.

OK thanks for testing, will send out a patch soon with both of you in Cc.

Regards,

Tony

author maintainer
#25 lore raw

PATCH 14/18 ARM: dts: Use simple-pm-bus for genpd for am3 l4_fast

In reply to Tony Lindgren

We can now enable simple-pm-bus to use genpd.

---
 arch/arm/boot/dts/am33xx-l4.dtsi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +5 -2
@@ -669,7 +669,10 @@ target-module@46000 {			/* 0x47c46000, ap 25 2c.0 */
 };
 
 &l4_fast {					/* 0x4a000000 */
-	compatible = "ti,am33xx-l4-fast", "simple-bus";
+	compatible = "ti,am33xx-l4-fast", "simple-pm-bus";
+	power-domains = <&prm_per>;
+	clocks = <&l4hs_clkctrl AM3_L4HS_L4_HS_CLKCTRL 0>;
+	clock-names = "fck";
 	reg = <0x4a000000 0x800>,
 	      <0x4a000800 0x800>,
 	      <0x4a001000 0x400>;
@@ -679,7 +682,7 @@ &l4_fast {					/* 0x4a000000 */
 	ranges = <0x00000000 0x4a000000 0x1000000>;	/* segment 0 */
 
 	segment@0 {					/* 0x4a000000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00000000 0x000800>,	/* ap 0 */
Signature · 1 line
2.29.1
author maintainer
#26 lore raw

PATCH 15/18 ARM: dts: Use simple-pm-bus for genpd for am3 l4_per

In reply to Tony Lindgren

We can now enable simple-pm-bus to use genpd.

---
 arch/arm/boot/dts/am33xx-l4.dtsi | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
arch/arm/boot/dts/am33xx-l4.dtsi +8 -5
@@ -851,7 +851,10 @@ target-module@3000 {			/* 0x4b143000, ap 6 04.0 */
 };
 
 &l4_per {						/* 0x48000000 */
-	compatible = "ti,am33xx-l4-per", "simple-bus";
+	compatible = "ti,am33xx-l4-per", "simple-pm-bus";
+	power-domains = <&prm_per>;
+	clocks = <&l4ls_clkctrl AM3_L4LS_L4_LS_CLKCTRL 0>;
+	clock-names = "fck";
 	reg = <0x48000000 0x800>,
 	      <0x48000800 0x800>,
 	      <0x48001000 0x400>,
@@ -869,7 +872,7 @@ &l4_per {						/* 0x48000000 */
 		 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
 
 	segment@0 {					/* 0x48000000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00000000 0x000800>,	/* ap 0 */
@@ -1480,7 +1483,7 @@ target-module@cc000 {			/* 0x480cc000, ap 89 0e.0 */
 	};
 
 	segment@100000 {					/* 0x48100000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x0008c000 0x0018c000 0x001000>,	/* ap 42 */
@@ -1864,7 +1867,7 @@ mmc2: mmc@0 {
 	};
 
 	segment@200000 {					/* 0x48200000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00200000 0x010000>;
@@ -1888,7 +1891,7 @@ mpu@0 {
 	};
 
 	segment@300000 {					/* 0x48300000 */
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges = <0x00000000 0x00300000 0x001000>,	/* ap 66 */
Signature · 1 line
2.29.1
author maintainer
#27 lore raw

PATCH 16/18 ARM: dts: Use simple-pm-bus for genpd for am3 l3

In reply to Tony Lindgren

We can now enable simple-pm-bus to use genpd.

---
 arch/arm/boot/dts/am33xx.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +4 -2
@@ -184,11 +184,13 @@ soc {
 	 * the whole bus hierarchy.
 	 */
 	ocp: ocp {
-		compatible = "simple-bus";
+		compatible = "simple-pm-bus";
+		power-domains = <&prm_per>;
+		clocks = <&l3_clkctrl AM3_L3_L3_MAIN_CLKCTRL 0>;
+		clock-names = "fck";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		ti,hwmods = "l3_main";
 
 		l4_wkup: interconnect@44c00000 {
 		};
Signature · 1 line
2.29.1
author maintainer
#28 lore raw

PATCH 17/18 ARM: OMAP2+: Drop legacy remaining legacy platform data for am3

In reply to Tony Lindgren

We can now drop the remaining legacy platform data as we are probing devices with device tree data.

---
 arch/arm/mach-omap2/Makefile               |   1 -
 arch/arm/mach-omap2/io.c                   |   2 -
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 161 ---------------------
 3 files changed, 164 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/omap_hwmod_33xx_data.c
arch/arm/mach-omap2/Makefile +0 -1
@@ -205,7 +205,6 @@ obj-$(CONFIG_SOC_OMAP2430)		+= omap_hwmod_2xxx_interconnect_data.o
 obj-$(CONFIG_SOC_OMAP2430)		+= omap_hwmod_2430_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= omap_hwmod_3xxx_data.o
-obj-$(CONFIG_SOC_AM33XX)		+= omap_hwmod_33xx_data.o
 obj-$(CONFIG_SOC_AM33XX)		+= omap_hwmod_33xx_43xx_interconnect_data.o
 obj-$(CONFIG_SOC_AM33XX)		+= omap_hwmod_33xx_43xx_ipblock_data.o
 obj-$(CONFIG_SOC_AM43XX)		+= omap_hwmod_43xx_data.o
arch/arm/mach-omap2/io.c +0 -2
@@ -567,8 +567,6 @@ void __init am33xx_init_early(void)
 	omap2_prcm_base_init();
 	am33xx_powerdomains_init();
 	am33xx_clockdomains_init();
-	am33xx_hwmod_init();
-	omap_hwmod_init_postsetup();
 	omap_clk_soc_init = am33xx_dt_clk_init;
 	omap_secure_init();
 }
arch/arm/mach-omap2/omap_hwmod_33xx_data.c deleted +0 -161

161 lines not on this page · raw message

Signature · 1 line
2.29.1
author maintainer
#29 lore raw

PATCH 18/18 ARM: OMAP2+: Build hwmod related code as needed

In reply to Tony Lindgren

If we have only am3 selected, there's no need to build the hwmod related code as we are probing devices with device tree data.

---
 arch/arm/mach-omap2/Kconfig        |  9 +++++++++
 arch/arm/mach-omap2/Makefile       | 13 ++++++-------
 arch/arm/mach-omap2/pdata-quirks.c | 12 +++++++-----
 3 files changed, 22 insertions(+), 12 deletions(-)
arch/arm/mach-omap2/Kconfig +9 -0
@@ -2,11 +2,15 @@
 menu "TI OMAP/AM/DM/DRA Family"
 	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
 
+config OMAP_HWMOD
+	bool
+
 config ARCH_OMAP2
 	bool "TI OMAP2"
 	depends on ARCH_MULTI_V6
 	select ARCH_OMAP2PLUS
 	select CPU_V6
+	select OMAP_HWMOD
 	select SOC_HAS_OMAP2_SDRC
 
 config ARCH_OMAP3
@@ -14,6 +18,7 @@ config ARCH_OMAP3
 	depends on ARCH_MULTI_V7
 	select ARCH_OMAP2PLUS
 	select ARM_CPU_SUSPEND if PM
+	select OMAP_HWMOD
 	select OMAP_INTERCONNECT
 	select PM_OPP if PM
 	select PM if CPU_IDLE
@@ -30,6 +35,7 @@ config ARCH_OMAP4
 	select ARM_GIC
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
+	select OMAP_HWMOD
 	select OMAP_INTERCONNECT
 	select OMAP_INTERCONNECT_BARRIER
 	select PL310_ERRATA_588369 if CACHE_L2X0
@@ -49,6 +55,7 @@ config SOC_OMAP5
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_ARCH_TIMER
 	select ARM_ERRATA_798181 if SMP
+	select OMAP_HWMOD
 	select OMAP_INTERCONNECT
 	select OMAP_INTERCONNECT_BARRIER
 	select PM_OPP if PM
@@ -71,6 +78,7 @@ config SOC_AM43XX
 	select HAVE_ARM_TWD
 	select ARM_ERRATA_754322
 	select ARM_ERRATA_775420
+	select OMAP_HWMOD
 	select OMAP_INTERCONNECT
 	select ARM_CPU_SUSPEND if PM
 
@@ -84,6 +92,7 @@ config SOC_DRA7XX
 	select HAVE_ARM_ARCH_TIMER
 	select IRQ_CROSSBAR
 	select ARM_ERRATA_798181 if SMP
+	select OMAP_HWMOD
 	select OMAP_INTERCONNECT
 	select OMAP_INTERCONNECT_BARRIER
 	select PM_OPP if PM
arch/arm/mach-omap2/Makefile +6 -7
@@ -8,18 +8,20 @@ ccflags-y := -I$(srctree)/$(src)/include \
 
 # Common support
 obj-y := id.o io.o control.o devices.o fb.o pm.o \
-	 common.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
-	 omap_device.o omap-headsmp.o sram.o
+	 common.o dma.o omap-headsmp.o sram.o
 
 hwmod-common				= omap_hwmod.o omap_hwmod_reset.o \
-					  omap_hwmod_common_data.o
+					  omap_hwmod_common_data.o \
+					  omap_hwmod_common_ipblock_data.o \
+					  omap_device.o display.o hdq1w.o \
+					  i2c.o wd_timer.o
 clock-common				= clock.o
 secure-common				= omap-smc.o omap-secure.o
 
 obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
 obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
 obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common)
-obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common) $(secure-common)
+obj-$(CONFIG_SOC_AM33XX) += $(secure-common)
 obj-$(CONFIG_SOC_OMAP5)  += $(hwmod-common) $(secure-common)
 obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common)
 obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common)
@@ -194,7 +196,6 @@ obj-$(CONFIG_SOC_OMAP2420)		+= opp2420_data.o
 obj-$(CONFIG_SOC_OMAP2430)		+= opp2430_data.o
 
 # hwmod data
-obj-y					+= omap_hwmod_common_ipblock_data.o
 obj-$(CONFIG_SOC_OMAP2420)		+= omap_hwmod_2xxx_ipblock_data.o
 obj-$(CONFIG_SOC_OMAP2420)		+= omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_SOC_OMAP2420)		+= omap_hwmod_2xxx_interconnect_data.o
@@ -205,8 +206,6 @@ obj-$(CONFIG_SOC_OMAP2430)		+= omap_hwmod_2xxx_interconnect_data.o
 obj-$(CONFIG_SOC_OMAP2430)		+= omap_hwmod_2430_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= omap_hwmod_3xxx_data.o
-obj-$(CONFIG_SOC_AM33XX)		+= omap_hwmod_33xx_43xx_interconnect_data.o
-obj-$(CONFIG_SOC_AM33XX)		+= omap_hwmod_33xx_43xx_ipblock_data.o
 obj-$(CONFIG_SOC_AM43XX)		+= omap_hwmod_43xx_data.o
 obj-$(CONFIG_SOC_AM43XX)		+= omap_hwmod_33xx_43xx_interconnect_data.o
 obj-$(CONFIG_SOC_AM43XX)		+= omap_hwmod_33xx_43xx_ipblock_data.o
arch/arm/mach-omap2/pdata-quirks.c +7 -5
@@ -94,6 +94,7 @@ static void __init hsmmc2_internal_input_clk(void)
 	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
 }
 
+#ifdef CONFIG_OMAP_HWMOD
 static struct iommu_platform_data omap3_iommu_pdata = {
 	.reset_name = "mmu",
 	.assert_reset = omap_device_assert_hardreset,
@@ -106,6 +107,7 @@ static struct iommu_platform_data omap3_iommu_isp_pdata = {
 	.device_enable = omap_device_enable,
 	.device_idle = omap_device_idle,
 };
+#endif
 
 static int omap3_sbc_t3730_twl_callback(struct device *dev,
 					   unsigned gpio,
@@ -272,7 +274,7 @@ static void __init omap3_pandora_legacy_init(void)
 }
 #endif /* CONFIG_ARCH_OMAP3 */
 
-#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
+#if defined(CONFIG_SOC_AM43XX)
 static struct wkup_m3_platform_data wkup_m3_data = {
 	.reset_name = "wkup_m3",
 	.assert_reset = omap_device_assert_hardreset,
@@ -370,6 +372,7 @@ static void ti_sysc_clkdm_allow_idle(struct device *dev,
 		clkdm_allow_idle(cookie->clkdm);
 }
 
+#ifdef CONFIG_OMAP_HWMOD
 static int ti_sysc_enable_module(struct device *dev,
 				 const struct ti_sysc_cookie *cookie)
 {
@@ -396,6 +399,7 @@ static int ti_sysc_shutdown_module(struct device *dev,
 
 	return omap_hwmod_shutdown(cookie->data);
 }
+#endif	/* CONFIG_OMAP_HWMOD */
 
 static bool ti_sysc_soc_type_gp(void)
 {
@@ -410,10 +414,12 @@ static struct ti_sysc_platform_data ti_sysc_pdata = {
 	.init_clockdomain = ti_sysc_clkdm_init,
 	.clkdm_deny_idle = ti_sysc_clkdm_deny_idle,
 	.clkdm_allow_idle = ti_sysc_clkdm_allow_idle,
+#ifdef CONFIG_OMAP_HWMOD
 	.init_module = omap_hwmod_init_module,
 	.enable_module = ti_sysc_enable_module,
 	.idle_module = ti_sysc_idle_module,
 	.shutdown_module = ti_sysc_shutdown_module,
+#endif
 };
 
 static struct pcs_pdata pcs_pdata;
@@ -501,10 +507,6 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
 	OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49024000, "49024000.mcbsp", &mcbsp_pdata),
 #endif
 #endif
-#ifdef CONFIG_SOC_AM33XX
-	OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
-		       &wkup_m3_data),
-#endif
 #ifdef CONFIG_SOC_AM43XX
 	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
 		       &wkup_m3_data),
Signature · 1 line
2.29.1
author maintainer
#30 lore raw
In reply to Tony Lindgren
Quoted 3 lines · Tony Lindgren

With the related driver changes, we can now drop the remaining platform data for am335x for v5.11 merge window and probe using device tree data and genpd instead.

FYI, I've also pushed an initial branch for testing with all the patches applied to [3] below.

Regards,

Tony

Quoted 2 lines

[1] https://lore.kernel.org/linux-omap/[email protected]/T/#t
[2] https://lore.kernel.org/linux-omap/[email protected]/T/#t

[3] https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git/log/?h=omap-for-v5.11/genpd