diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-11-21 14:17:18 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-11-23 05:51:18 -0500 |
commit | 52939c03e53b151848da9e83fd839bddfda29e78 (patch) | |
tree | 01ac7de1d40e608ec5323f93dd9cec711ae1f4f4 /arch/arm/plat-mxc/include | |
parent | 2cc326833f616ee49f73be94d4bf0ab1bc9a72d9 (diff) |
ARM: MX3: fix CPU revision number detection
The macro mx31_revision() used to take the global variable system_rev to
determine the CPU revision number. However, this number is expected to
be set by the bootloader and is usually zero (at least on my MX31 based
boards here). More than that, it is usually taken to identify the
board's revision, not the CPU's.
Fix that by reading the the CPU's SREV register instead.
Right now, mx31_read_cpu_rev() is called from mx31_clocks_init() which
is admittedly not a good place for it. However, we need to enable the
IIM clock first, and the clock code also has conditional code that
depends on mx31_revision() returning the right thing.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/include')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx3x.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h index 8cedf29eee16..be69272407ad 100644 --- a/arch/arm/plat-mxc/include/mach/mx3x.h +++ b/arch/arm/plat-mxc/include/mach/mx3x.h | |||
@@ -260,11 +260,12 @@ | |||
260 | 260 | ||
261 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | 261 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) |
262 | 262 | ||
263 | extern unsigned int system_rev; | 263 | extern unsigned int mx31_cpu_rev; |
264 | extern void mx31_read_cpu_rev(void); | ||
264 | 265 | ||
265 | static inline int mx31_revision(void) | 266 | static inline int mx31_revision(void) |
266 | { | 267 | { |
267 | return system_rev; | 268 | return mx31_cpu_rev; |
268 | } | 269 | } |
269 | #endif | 270 | #endif |
270 | 271 | ||