diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/include/mach/board-apollon.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/cpu.h | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/sram.c | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/include/mach/board-apollon.h b/arch/arm/plat-omap/include/mach/board-apollon.h index 731c858cf3fe..61bd5e8f09b1 100644 --- a/arch/arm/plat-omap/include/mach/board-apollon.h +++ b/arch/arm/plat-omap/include/mach/board-apollon.h | |||
@@ -29,12 +29,14 @@ | |||
29 | #ifndef __ASM_ARCH_OMAP_APOLLON_H | 29 | #ifndef __ASM_ARCH_OMAP_APOLLON_H |
30 | #define __ASM_ARCH_OMAP_APOLLON_H | 30 | #define __ASM_ARCH_OMAP_APOLLON_H |
31 | 31 | ||
32 | #include <mach/cpu.h> | ||
33 | |||
32 | extern void apollon_mmc_init(void); | 34 | extern void apollon_mmc_init(void); |
33 | 35 | ||
34 | static inline int apollon_plus(void) | 36 | static inline int apollon_plus(void) |
35 | { | 37 | { |
36 | /* The apollon plus has IDCODE revision 5 */ | 38 | /* The apollon plus has IDCODE revision 5 */ |
37 | return system_rev & 0xc0; | 39 | return omap_rev() & 0xc0; |
38 | } | 40 | } |
39 | 41 | ||
40 | /* Placeholder for APOLLON specific defines */ | 42 | /* Placeholder for APOLLON specific defines */ |
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h index 4325bbc97477..b2062f1175de 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/mach/cpu.h | |||
@@ -34,12 +34,12 @@ struct omap_chip_id { | |||
34 | #define OMAP_CHIP_INIT(x) { .oc = x } | 34 | #define OMAP_CHIP_INIT(x) { .oc = x } |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * system_rev bits: | 37 | * omap_rev bits: |
38 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | 38 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] |
39 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | 39 | * CPU revision (See _REV_ defined in cpu.h) [15:08] |
40 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | 40 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] |
41 | */ | 41 | */ |
42 | extern unsigned int system_rev; | 42 | unsigned int omap_rev(void); |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Test if multicore OMAP support is needed | 45 | * Test if multicore OMAP support is needed |
@@ -113,7 +113,7 @@ extern unsigned int system_rev; | |||
113 | * cpu_is_omap243x(): True for OMAP2430 | 113 | * cpu_is_omap243x(): True for OMAP2430 |
114 | * cpu_is_omap343x(): True for OMAP3430 | 114 | * cpu_is_omap343x(): True for OMAP3430 |
115 | */ | 115 | */ |
116 | #define GET_OMAP_CLASS (system_rev & 0xff) | 116 | #define GET_OMAP_CLASS (omap_rev() & 0xff) |
117 | 117 | ||
118 | #define IS_OMAP_CLASS(class, id) \ | 118 | #define IS_OMAP_CLASS(class, id) \ |
119 | static inline int is_omap ##class (void) \ | 119 | static inline int is_omap ##class (void) \ |
@@ -121,7 +121,7 @@ static inline int is_omap ##class (void) \ | |||
121 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | 121 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ |
122 | } | 122 | } |
123 | 123 | ||
124 | #define GET_OMAP_SUBCLASS ((system_rev >> 20) & 0x0fff) | 124 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) |
125 | 125 | ||
126 | #define IS_OMAP_SUBCLASS(subclass, id) \ | 126 | #define IS_OMAP_SUBCLASS(subclass, id) \ |
127 | static inline int is_omap ##subclass (void) \ | 127 | static inline int is_omap ##subclass (void) \ |
@@ -231,7 +231,7 @@ IS_OMAP_SUBCLASS(343x, 0x343) | |||
231 | * cpu_is_omap2430(): True for OMAP2430 | 231 | * cpu_is_omap2430(): True for OMAP2430 |
232 | * cpu_is_omap3430(): True for OMAP3430 | 232 | * cpu_is_omap3430(): True for OMAP3430 |
233 | */ | 233 | */ |
234 | #define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff) | 234 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) |
235 | 235 | ||
236 | #define IS_OMAP_TYPE(type, id) \ | 236 | #define IS_OMAP_TYPE(type, id) \ |
237 | static inline int is_omap ##type (void) \ | 237 | static inline int is_omap ##type (void) \ |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index dcd9d16da2e9..be7bcaf2b832 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <mach/sram.h> | 25 | #include <mach/sram.h> |
26 | #include <mach/board.h> | 26 | #include <mach/board.h> |
27 | #include <mach/cpu.h> | ||
27 | 28 | ||
28 | #include <mach/control.h> | 29 | #include <mach/control.h> |
29 | 30 | ||
@@ -87,7 +88,7 @@ static int is_sram_locked(void) | |||
87 | int type = 0; | 88 | int type = 0; |
88 | 89 | ||
89 | if (cpu_is_omap242x()) | 90 | if (cpu_is_omap242x()) |
90 | type = system_rev & OMAP2_DEVICETYPE_MASK; | 91 | type = omap_rev() & OMAP2_DEVICETYPE_MASK; |
91 | 92 | ||
92 | if (type == GP_DEVICE) { | 93 | if (type == GP_DEVICE) { |
93 | /* RAMFW: R/W access to all initiators for all qualifier sets */ | 94 | /* RAMFW: R/W access to all initiators for all qualifier sets */ |