ARM: dts: Configure omap4 and 5 l4_abe for genpd and drop platform data
authorTony Lindgren <tony@atomide.com>
Thu, 2 Jul 2020 15:45:13 +0000 (08:45 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 18 Aug 2020 07:40:03 +0000 (10:40 +0300)
We can power off l4_abe domain when not in use when we configure it for
genpd. And with that change, we can now also drop the old unused legacy
platform data.

Note that we also need to now use "simple-pm-bus" instead of "simple-bus"
for PM runtime to get enabled for the bus.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap4-l4-abe.dtsi
arch/arm/boot/dts/omap4.dtsi
arch/arm/boot/dts/omap5-l4-abe.dtsi
arch/arm/boot/dts/omap5.dtsi
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_hwmod_54xx_data.c

index b2cf5f41e222c9717d4f532268d0954aa2653c55..a9573d441dea4f3ad8ce7cdf0d417a8d3d34daa9 100644 (file)
@@ -1,14 +1,16 @@
 &l4_abe {                                              /* 0x40100000 */
-       compatible = "ti,omap4-l4-abe", "simple-bus";
+       compatible = "ti,omap4-l4-abe", "simple-pm-bus";
        reg = <0x40100000 0x400>,
              <0x40100400 0x400>;
        reg-names = "la", "ap";
+       power-domains = <&prm_abe>;
+       /* OMAP4_L4_ABE_CLKCTRL is read-only */
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x00000000 0x40100000 0x100000>,      /* segment 0 */
                 <0x49000000 0x49000000 0x100000>;
        segment@0 {                                     /* 0x40100000 */
-               compatible = "simple-bus";
+               compatible = "simple-pm-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges =
index 0282b9de3384fe4667c29b7320198247a1ce2b84..eb5780eb26307714b926ec8c2cbc93770e8a4525 100644 (file)
                #reset-cells = <1>;
        };
 
+       prm_abe: prm@500 {
+               compatible = "ti,omap4-prm-inst", "ti,omap-prm-inst";
+               reg = <0x500 0x100>;
+               #power-domain-cells = <0>;
+       };
+
        prm_core: prm@700 {
                compatible = "ti,omap4-prm-inst", "ti,omap-prm-inst";
                reg = <0x700 0x100>;
index 25b7fce8de2db783fae533d19213371ffae02333..a03bca5a358441c5977f1f8ae3ef697aac1caea2 100644 (file)
@@ -1,14 +1,16 @@
 &l4_abe {                                              /* 0x40100000 */
-       compatible = "ti,omap5-l4-abe", "simple-bus";
+       compatible = "ti,omap5-l4-abe", "simple-pm-bus";
        reg = <0x40100000 0x400>,
              <0x40100400 0x400>;
        reg-names = "la", "ap";
+       power-domains = <&prm_abe>;
+       /* OMAP5_L4_ABE_CLKCTRL is read-only */
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x00000000 0x40100000 0x100000>,      /* segment 0 */
                 <0x49000000 0x49000000 0x100000>;
        segment@0 {                                     /* 0x40100000 */
-               compatible = "simple-bus";
+               compatible = "simple-pm-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges =
index 5da9cff7a53c7378f6453a4a2ff112b267207e1e..199035ae0a7fa684683b2a99896671ff898373ec 100644 (file)
                #reset-cells = <1>;
        };
 
+       prm_abe: prm@500 {
+               compatible = "ti,omap5-prm-inst", "ti,omap-prm-inst";
+               reg = <0x500 0x100>;
+               #power-domain-cells = <0>;
+       };
+
        prm_core: prm@700 {
                compatible = "ti,omap5-prm-inst", "ti,omap-prm-inst";
                reg = <0x700 0x100>;
index 665ca74a834a49c8b26ad7fddde1e0ebc66920f5..37c59115b353af6924a23d4726080bd03a8a4ae7 100644 (file)
@@ -124,21 +124,6 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
        .name   = "l4",
 };
 
-/* l4_abe */
-static struct omap_hwmod omap44xx_l4_abe_hwmod = {
-       .name           = "l4_abe",
-       .class          = &omap44xx_l4_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
-                       .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
-                       .lostcontext_mask = OMAP4430_LOSTMEM_AESSMEM_MASK,
-                       .flags        = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
-               },
-       },
-};
-
 /* l4_cfg */
 static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
        .name           = "l4_cfg",
@@ -771,22 +756,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3_main_1 -> l4_abe */
-static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
-       .master         = &omap44xx_l3_main_1_hwmod,
-       .slave          = &omap44xx_l4_abe_hwmod,
-       .clk            = "l3_div_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* mpu -> l4_abe */
-static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
-       .master         = &omap44xx_mpu_hwmod,
-       .slave          = &omap44xx_l4_abe_hwmod,
-       .clk            = "ocp_abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_1 -> l4_cfg */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
        .master         = &omap44xx_l3_main_1_hwmod,
@@ -988,8 +957,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
        &omap44xx_l3_main_1__l3_main_3,
        &omap44xx_l3_main_2__l3_main_3,
        &omap44xx_l4_cfg__l3_main_3,
-       &omap44xx_l3_main_1__l4_abe,
-       &omap44xx_mpu__l4_abe,
        &omap44xx_l3_main_1__l4_cfg,
        &omap44xx_l3_main_2__l4_per,
        &omap44xx_l4_cfg__l4_wkup,
index 7c38c1ba58ac88e14bb4eb06e26975345aa49280..9e0f3b78e83fbeadb1d3cdc90c0e2fed4e791651 100644 (file)
@@ -121,19 +121,6 @@ static struct omap_hwmod_class omap54xx_l4_hwmod_class = {
        .name   = "l4",
 };
 
-/* l4_abe */
-static struct omap_hwmod omap54xx_l4_abe_hwmod = {
-       .name           = "l4_abe",
-       .class          = &omap54xx_l4_hwmod_class,
-       .clkdm_name     = "abe_clkdm",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs = OMAP54XX_CM_ABE_L4_ABE_CLKCTRL_OFFSET,
-                       .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
-               },
-       },
-};
-
 /* l4_cfg */
 static struct omap_hwmod omap54xx_l4_cfg_hwmod = {
        .name           = "l4_cfg",
@@ -395,22 +382,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_3 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3_main_1 -> l4_abe */
-static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_abe = {
-       .master         = &omap54xx_l3_main_1_hwmod,
-       .slave          = &omap54xx_l4_abe_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* mpu -> l4_abe */
-static struct omap_hwmod_ocp_if omap54xx_mpu__l4_abe = {
-       .master         = &omap54xx_mpu_hwmod,
-       .slave          = &omap54xx_l4_abe_hwmod,
-       .clk            = "abe_iclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
 /* l3_main_1 -> l4_cfg */
 static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_cfg = {
        .master         = &omap54xx_l3_main_1_hwmod,
@@ -478,8 +449,6 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
        &omap54xx_l3_main_1__l3_main_3,
        &omap54xx_l3_main_2__l3_main_3,
        &omap54xx_l4_cfg__l3_main_3,
-       &omap54xx_l3_main_1__l4_abe,
-       &omap54xx_mpu__l4_abe,
        &omap54xx_l3_main_1__l4_cfg,
        &omap54xx_l3_main_2__l4_per,
        &omap54xx_l3_main_1__l4_wkup,