Currently omap2_clkdm_clk_enable/disable api's program all clockdomains
in forced sleep/wakeup, even if they support HWSUP/AUTO control mode.
This patch fixes this by adding the missing check for omap44xx cpu.
For omap44xx omap2_clkdm_clk_enable/disbale are actually not expected
to do anything if the clockdomain is already in HWAUTO.

Signed-off-by: Rajendra Nayak <rna...@ti.com>
---
 arch/arm/mach-omap2/clockdomain.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomain.c 
b/arch/arm/mach-omap2/clockdomain.c
index 6e568ec..13dcd6f 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -994,6 +994,9 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, 
struct clk *clk)
 
        v = omap2_clkdm_clktrctrl_read(clkdm);
 
+       if (cpu_is_omap44xx() && v == OMAP34XX_CLKSTCTRL_ENABLE_AUTO)
+               return 0;
+
        if ((cpu_is_omap34xx() && v == OMAP34XX_CLKSTCTRL_ENABLE_AUTO) ||
            (cpu_is_omap24xx() && v == OMAP24XX_CLKSTCTRL_ENABLE_AUTO)) {
                /* Disable HW transitions when we are changing deps */
@@ -1056,6 +1059,9 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, 
struct clk *clk)
 
        v = omap2_clkdm_clktrctrl_read(clkdm);
 
+       if (cpu_is_omap44xx() && v == OMAP34XX_CLKSTCTRL_ENABLE_AUTO)
+               return 0;
+
        if ((cpu_is_omap34xx() && v == OMAP34XX_CLKSTCTRL_ENABLE_AUTO) ||
            (cpu_is_omap24xx() && v == OMAP24XX_CLKSTCTRL_ENABLE_AUTO)) {
                /* Disable HW transitions when we are changing deps */
-- 
1.7.0.rc1.33.g07cf0f

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to