aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/cm4xxx.c9
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c17
2 files changed, 16 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c
index b101091e95d..f8a660a1a4a 100644
--- a/arch/arm/mach-omap2/cm4xxx.c
+++ b/arch/arm/mach-omap2/cm4xxx.c
@@ -43,7 +43,6 @@
43 * using separate functional clock 43 * using separate functional clock
44 * 0x3 disabled: Module is disabled and cannot be accessed 44 * 0x3 disabled: Module is disabled and cannot be accessed
45 * 45 *
46 * TODO: Need to handle module accessible in idle state
47 */ 46 */
48int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg) 47int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg)
49{ 48{
@@ -52,9 +51,11 @@ int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg)
52 if (!clkctrl_reg) 51 if (!clkctrl_reg)
53 return 0; 52 return 0;
54 53
55 omap_test_timeout(((__raw_readl(clkctrl_reg) & 54 omap_test_timeout((
56 OMAP4430_IDLEST_MASK) == 0), 55 ((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) == 0) ||
57 MAX_MODULE_READY_TIME, i); 56 (((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) >>
57 OMAP4430_IDLEST_SHIFT) == 0x2)),
58 MAX_MODULE_READY_TIME, i);
58 59
59 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; 60 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
60} 61}
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index c3a5889d8ad..955861acc0c 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/**