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/mach-mx3/clock.c | |
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/mach-mx3/clock.c')
-rw-r--r-- | arch/arm/mach-mx3/clock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c index b2a3bcf8266e..bec097d176e6 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock.c | |||
@@ -616,6 +616,8 @@ int __init mx31_clocks_init(unsigned long fref) | |||
616 | 616 | ||
617 | clk_enable(&serial_pll_clk); | 617 | clk_enable(&serial_pll_clk); |
618 | 618 | ||
619 | mx31_read_cpu_rev(); | ||
620 | |||
619 | if (mx31_revision() >= CHIP_REV_2_0) { | 621 | if (mx31_revision() >= CHIP_REV_2_0) { |
620 | reg = __raw_readl(MXC_CCM_PMCR1); | 622 | reg = __raw_readl(MXC_CCM_PMCR1); |
621 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ | 623 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ |