diff options
author | Dmitri Vorobiev <dmitri.vorobiev@gmail.com> | 2008-01-14 16:27:46 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-21 19:35:23 -0500 |
commit | 0487de91427925e7c43debeb948bdf53b10ef32c (patch) | |
tree | e911ecd1291b7ac0c7fe85d1a28102a07e150f21 /arch | |
parent | c2a04c4f0e1b09b58d7279e2facd306c40583ec1 (diff) |
[MIPS] Malta: Fix reading the PCI clock frequency on big-endian
The JMPRS register on Malta boards keeps a 32-bit CPU-endian
value. The readw() function assumes that the value it reads is a
little-endian 16-bit number. Therefore, using readw() to obtain
the value of the JMPRS register is a mistake. This error leads
to incorrect reading of the PCI clock frequency on big-endian
during board start-up.
Change readw() to __raw_readl().
This was tested by injecting a call to printk() and verifying
that the value of the jmpr variable was consistent with current
setting of the JP4 "PCI CLK" jumper.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/mips-boards/malta/malta_setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 9a2636e56243..bc43a5c2224d 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -149,7 +149,7 @@ void __init plat_mem_setup(void) | |||
149 | /* Check PCI clock */ | 149 | /* Check PCI clock */ |
150 | { | 150 | { |
151 | unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int)); | 151 | unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int)); |
152 | int jmpr = (readw(jmpr_p) >> 2) & 0x07; | 152 | int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07; |
153 | static const int pciclocks[] __initdata = { | 153 | static const int pciclocks[] __initdata = { |
154 | 33, 20, 25, 30, 12, 16, 37, 10 | 154 | 33, 20, 25, 30, 12, 16, 37, 10 |
155 | }; | 155 | }; |