diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-05-20 14:31:08 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-05-20 14:31:08 -0400 |
commit | d9e6625c70ff007ae246c9d62f8cdec8d08b2457 (patch) | |
tree | f10388b8693520d4f42420605657cac148ca4eb5 | |
parent | 53934aa74d49daa7c31c38028fd05c99475489d6 (diff) |
OMAP: CM: Move MAX_MODULE_READY_TIME to cm.h
The maximum timeout to wait for the PRCM to request that a module
exit idle or reach functionnal state is common to OMAP2/3/4 SoCs,
so, move it to the chip family-common cm.h include file.
Reduce the timeout from 20 ms to 2 ms.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r-- | arch/arm/mach-omap2/cm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cm.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cm4xxx.c | 18 |
3 files changed, 10 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c index 58e4a1c557d8..2d83565d2be2 100644 --- a/arch/arm/mach-omap2/cm.c +++ b/arch/arm/mach-omap2/cm.c | |||
@@ -27,9 +27,6 @@ | |||
27 | #include "cm-regbits-24xx.h" | 27 | #include "cm-regbits-24xx.h" |
28 | #include "cm-regbits-34xx.h" | 28 | #include "cm-regbits-34xx.h" |
29 | 29 | ||
30 | /* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */ | ||
31 | #define MAX_MODULE_READY_TIME 20000 | ||
32 | |||
33 | static const u8 cm_idlest_offs[] = { | 30 | static const u8 cm_idlest_offs[] = { |
34 | CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3 | 31 | CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3 |
35 | }; | 32 | }; |
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h index b6ab183212df..bbc69df3bf3d 100644 --- a/arch/arm/mach-omap2/cm.h +++ b/arch/arm/mach-omap2/cm.h | |||
@@ -144,4 +144,13 @@ static inline u32 cm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) | |||
144 | #define OMAP24XX_CM_IDLEST_VAL 0 | 144 | #define OMAP24XX_CM_IDLEST_VAL 0 |
145 | #define OMAP34XX_CM_IDLEST_VAL 1 | 145 | #define OMAP34XX_CM_IDLEST_VAL 1 |
146 | 146 | ||
147 | /* | ||
148 | * MAX_MODULE_READY_TIME: max duration in microseconds to wait for the | ||
149 | * PRCM to request that a module exit the inactive state in the case of | ||
150 | * OMAP2 & 3. | ||
151 | * In the case of OMAP4 this is the max duration in microseconds for the | ||
152 | * module to reach the functionnal state from an inactive state. | ||
153 | */ | ||
154 | #define MAX_MODULE_READY_TIME 2000 | ||
155 | |||
147 | #endif | 156 | #endif |
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c index 4af76bb1003a..af32a457a46b 100644 --- a/arch/arm/mach-omap2/cm4xxx.c +++ b/arch/arm/mach-omap2/cm4xxx.c | |||
@@ -22,23 +22,7 @@ | |||
22 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
23 | 23 | ||
24 | #include "cm.h" | 24 | #include "cm.h" |
25 | 25 | #include "cm-regbits-44xx.h" | |
26 | /* XXX move this to cm.h */ | ||
27 | /* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */ | ||
28 | #define MAX_MODULE_READY_TIME 20000 | ||
29 | |||
30 | /* | ||
31 | * OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK: isolates the IDLEST field in the | ||
32 | * CM_CLKCTRL register. | ||
33 | */ | ||
34 | #define OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK (0x2 << 16) | ||
35 | |||
36 | /* | ||
37 | * OMAP4 prcm_mod u32 fields contain packed data: the CM ID in bit 16 and | ||
38 | * the PRCM module offset address (from the CM module base) in bits 15-0. | ||
39 | */ | ||
40 | #define OMAP4_PRCM_MOD_CM_ID_SHIFT 16 | ||
41 | #define OMAP4_PRCM_MOD_OFFS_MASK 0xffff | ||
42 | 26 | ||
43 | /** | 27 | /** |
44 | * omap4_cm_wait_idlest_ready - wait for a module to leave idle or standby | 28 | * omap4_cm_wait_idlest_ready - wait for a module to leave idle or standby |