summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/cm.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-01-28 22:38:25 +0100
committerGrant Likely <grant.likely@secretlab.ca>2010-01-28 22:38:25 +0100
commit0ada0a73120c28cc432bcdbac061781465c2f48f (patch)
treed17cadd4ea47e25d9e48e7d409a39c84268fbd27 /arch/arm/mach-omap2/cm.c
parentof: unify phandle name in struct device_node (diff)
parentLinux 2.6.33-rc5 (diff)
downloadlinux-0ada0a73120c28cc432bcdbac061781465c2f48f.tar.xz
linux-0ada0a73120c28cc432bcdbac061781465c2f48f.zip
Merge commit 'v2.6.33-rc5' into secretlab/test-devicetree
Diffstat (limited to 'arch/arm/mach-omap2/cm.c')
-rw-r--r--arch/arm/mach-omap2/cm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
index 8eb2dab8c7db..58e4a1c557d8 100644
--- a/arch/arm/mach-omap2/cm.c
+++ b/arch/arm/mach-omap2/cm.c
@@ -21,6 +21,8 @@
#include <asm/atomic.h>
+#include <plat/common.h>
+
#include "cm.h"
#include "cm-regbits-24xx.h"
#include "cm-regbits-34xx.h"
@@ -61,9 +63,8 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
mask = 1 << idlest_shift;
/* XXX should be OMAP2 CM */
- while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) != ena) &&
- (i++ < MAX_MODULE_READY_TIME))
- udelay(1);
+ omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena),
+ MAX_MODULE_READY_TIME, i);
return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
}