ARM: OMAP3: hwmod data: set sw control flag on dss hwmods
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 27 May 2016 23:48:17 +0000 (02:48 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 3 Jul 2016 00:23:25 +0000 (03:23 +0300)
Without this hwmod's _setup() enables interface clock and leaves it on
forever supposedly for hw autoidle to manage. However this causes
clockdomain's reference counter to never return to zero and
omap3xxx_clkdm_clk_disable() never gets called to remove autoteps to
MPU, which means DSS ends up needlessly transitioning alog with the CPU.

This hack avoids such switching. It also makes context loss counter work
without need to call pwrdm_{pre,post}_transition on all power domains in
omap_sram_idle() as it's taken care by clkdm enable/disable.

Could not measure any power usage differences though.

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

index 34b2dfa..0273a21 100644 (file)
@@ -1386,6 +1386,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
+       .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1491,6 +1492,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
+       .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1554,6 +1556,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
+       .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1598,6 +1601,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
+       .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };