All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 7/9 v3] OMAP: Hwmod api changes
@ 2010-09-23  0:30 Hema HK
       [not found] ` <1285201816-26516-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
  2010-09-22 20:43 ` Cousson, Benoit
  0 siblings, 2 replies; 6+ messages in thread
From: Hema HK @ 2010-09-23  0:30 UTC (permalink / raw)
  To: linux-omap, linux-usb
  Cc: Hema HK, Basak, Partha, Felipe Balbi, Tony Lindgren, Kevin Hilman,
	Cousson, Benoit, Paul Walmsley

OMAP USBOTG modules has a requirement to set the auto idle bit only after
setting smart idle bit. Modified the _sys_enable api to set the smart idle
first and then the autoidle bit. Setting this will not have any impact on the
other modules.

Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Basak, Partha <p-basak2@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Index: linux-omap-pm/arch/arm/mach-omap2/omap_hwmod.c
===================================================================
--- linux-omap-pm.orig/arch/arm/mach-omap2/omap_hwmod.c
+++ linux-omap-pm/arch/arm/mach-omap2/omap_hwmod.c
@@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwm
 		_set_master_standbymode(oh, idlemode, &v);
 	}
 
-	if (sf & SYSC_HAS_AUTOIDLE) {
-		idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ?
-			0 : 1;
-		_set_module_autoidle(oh, idlemode, &v);
-	}
-
 	/* XXX OCP ENAWAKEUP bit? */
 
 	/*
@@ -672,6 +666,19 @@ static void _sysc_enable(struct omap_hwm
 		_set_clockactivity(oh, oh->class->sysc->clockact, &v);
 
 	_write_sysconfig(v, oh);
+
+	/*
+	 * Set the auto idle bit only after setting the smartidle bit
+	 * as this is requirement for some modules like USBOTG
+	 * setting this will not have any impact on the other modues.
+	 */
+
+	if (sf & SYSC_HAS_AUTOIDLE) {
+		idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ?
+			0 : 1;
+		_set_module_autoidle(oh, idlemode, &v);
+	}
+	_write_sysconfig(v, oh);
 }
 
 /**

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-23  7:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  0:30 [PATCH 7/9 v3] OMAP: Hwmod api changes Hema HK
     [not found] ` <1285201816-26516-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2010-09-22 16:11   ` Sergei Shtylyov
2010-09-22 21:28   ` Paul Walmsley
2010-09-22 20:43 ` Cousson, Benoit
     [not found]   ` <4C9A6A62.5000100-l0cyMroinI0@public.gmane.org>
2010-09-23  6:23     ` Felipe Balbi
2010-09-23  7:00       ` Kalliguddi, Hema

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.