diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-11-05 03:01:10 -0500 |
---|---|---|
committer | Matt Fleming <matt@console-pimps.org> | 2010-01-16 09:31:44 -0500 |
commit | 6f82b6ebb1dcc0c3c23820a70a5d79a60c4f5e84 (patch) | |
tree | fa12777307f9153742d445bdd7c2305b24ae8ab2 /arch/sh/boards/board-sh7785lcr.c | |
parent | 4d35b93a66e9b87df20784fcf130d2e8760be53f (diff) |
sh: Use ioremap_fixmed to map the SM501 DRAM config register
We need to write to the DRAM config register very early and at such an
early stage ioremap() is not available. So use ioremap_fixed() to map
the register.
The reason that we are avoiding using the legacy P2 mapping is that
there will come a day when the legacy P2 mappings no longer exist.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Diffstat (limited to 'arch/sh/boards/board-sh7785lcr.c')
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 7eea90db6cea..511de38d2046 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -332,8 +332,15 @@ static void __init sh7785lcr_setup(char **cmdline_p) | |||
332 | pm_power_off = sh7785lcr_power_off; | 332 | pm_power_off = sh7785lcr_power_off; |
333 | 333 | ||
334 | /* sm501 DRAM configuration */ | 334 | /* sm501 DRAM configuration */ |
335 | sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; | 335 | sm501_reg = ioremap_fixed(SM107_REG_ADDR, SM501_DRAM_CONTROL, |
336 | writel(0x000307c2, sm501_reg); | 336 | PAGE_KERNEL); |
337 | if (!sm501_reg) { | ||
338 | printk(KERN_ERR "%s: ioremap error.\n", __func__); | ||
339 | return; | ||
340 | } | ||
341 | |||
342 | writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL); | ||
343 | iounmap_fixed(sm501_reg); | ||
337 | } | 344 | } |
338 | 345 | ||
339 | /* Return the board specific boot mode pin configuration */ | 346 | /* Return the board specific boot mode pin configuration */ |