diff mbox

OMAP: hwmod: if IDLEST fields are not set, use module defaults

Message ID 1274399970-21732-2-git-send-email-khilman@deeprootsystems.com (mailing list archive)
State Superseded
Delegated to: Kevin Hilman
Headers show

Commit Message

Kevin Hilman May 20, 2010, 11:59 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index a127c9b..77fef90 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1036,6 +1036,12 @@  static int _setup(struct omap_hwmod *oh)
 
 	oh->_state = _HWMOD_STATE_INITIALIZED;
 
+	/* if IDLEST values are not set, use module defaults */
+	if (!oh->prcm.omap2.idlest_reg_id)
+		oh->prcm.omap2.idlest_reg_id = oh->prcm.omap2.prcm_reg_id;
+	if (!oh->prcm.omap2.idlest_idle_bit)
+		oh->prcm.omap2.idlest_idle_bit = oh->prcm.omap2.module_bit;
+
 	r = _enable(oh);
 	if (r) {
 		pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n",