[4/5] OMAP4 clockdomain: Fix omap2_clkdm_clk_enable/disable api for 44xx
diff mbox

Message ID 1273562830-9758-5-git-send-email-rnayak@ti.com
State New, archived
Headers show

Commit Message

Rajendra Nayak May 11, 2010, 7:27 a.m. UTC
None

Patch
diff mbox

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 */