diff options
Diffstat (limited to 'arch/arm/mach-omap2/cm.c')
-rw-r--r-- | arch/arm/mach-omap2/cm.c | 7 |
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 @@ | |||
21 | 21 | ||
22 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
23 | 23 | ||
24 | #include <plat/common.h> | ||
25 | |||
24 | #include "cm.h" | 26 | #include "cm.h" |
25 | #include "cm-regbits-24xx.h" | 27 | #include "cm-regbits-24xx.h" |
26 | #include "cm-regbits-34xx.h" | 28 | #include "cm-regbits-34xx.h" |
@@ -61,9 +63,8 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift) | |||
61 | mask = 1 << idlest_shift; | 63 | mask = 1 << idlest_shift; |
62 | 64 | ||
63 | /* XXX should be OMAP2 CM */ | 65 | /* XXX should be OMAP2 CM */ |
64 | while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) != ena) && | 66 | omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena), |
65 | (i++ < MAX_MODULE_READY_TIME)) | 67 | MAX_MODULE_READY_TIME, i); |
66 | udelay(1); | ||
67 | 68 | ||
68 | return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; | 69 | return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; |
69 | } | 70 | } |