diff options
author | Hema HK <hemahk@ti.com> | 2010-09-24 12:23:19 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-09-24 12:23:19 -0400 |
commit | 78f26e872f77b6312273216de1a8f836c6f2e143 (patch) | |
tree | 905ce78ac51bf4ef1adc405782d88945c8eeb1d2 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | ff173d45525701d65d394cb8687e71845bfb34dc (diff) |
OMAP: hwmod: Set autoidle after smartidle during _sysc_enable
OMAP USBOTG module has a requirement to set the autoidle bit only after
setting smartidle bit. Modified the _sys_enable api to set the smartidle
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: Partha Basak <p-basak2@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index c3a5889d8add..955861acc0c4 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -777,12 +777,6 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
777 | _set_master_standbymode(oh, idlemode, &v); | 777 | _set_master_standbymode(oh, idlemode, &v); |
778 | } | 778 | } |
779 | 779 | ||
780 | if (sf & SYSC_HAS_AUTOIDLE) { | ||
781 | idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ? | ||
782 | 0 : 1; | ||
783 | _set_module_autoidle(oh, idlemode, &v); | ||
784 | } | ||
785 | |||
786 | /* | 780 | /* |
787 | * XXX The clock framework should handle this, by | 781 | * XXX The clock framework should handle this, by |
788 | * calling into this code. But this must wait until the | 782 | * calling into this code. But this must wait until the |
@@ -797,6 +791,17 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
797 | /* If slave is in SMARTIDLE, also enable wakeup */ | 791 | /* If slave is in SMARTIDLE, also enable wakeup */ |
798 | if ((sf & SYSC_HAS_SIDLEMODE) && !(oh->flags & HWMOD_SWSUP_SIDLE)) | 792 | if ((sf & SYSC_HAS_SIDLEMODE) && !(oh->flags & HWMOD_SWSUP_SIDLE)) |
799 | _enable_wakeup(oh); | 793 | _enable_wakeup(oh); |
794 | |||
795 | /* | ||
796 | * Set the autoidle bit only after setting the smartidle bit | ||
797 | * Setting this will not have any impact on the other modules. | ||
798 | */ | ||
799 | if (sf & SYSC_HAS_AUTOIDLE) { | ||
800 | idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ? | ||
801 | 0 : 1; | ||
802 | _set_module_autoidle(oh, idlemode, &v); | ||
803 | _write_sysconfig(v, oh); | ||
804 | } | ||
800 | } | 805 | } |
801 | 806 | ||
802 | /** | 807 | /** |