diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-29 11:43:48 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-01 16:32:00 +0200 |
commit | f9f35ee93821048bbace895c5c688bafbda2c3f3 (patch) | |
tree | adab257c88226972d58ae3e47aeea7f7a3ae36b5 /arch/arm/boards/panda/board.c | |
parent | 2222dbc28668e478ec27cff13f8d4c9498d8519a (diff) | |
download | barebox-f9f35ee93821048bbace895c5c688bafbda2c3f3.tar.gz barebox-f9f35ee93821048bbace895c5c688bafbda2c3f3.tar.xz |
ARM boards: move sdram setup before mmu setup
The new MMU setup will need SDRAM base addresses and sizes.
For this reason convert the MMU enabled ARM boards:
- move mem setup to mem_initcall. This is early but
still makes sure that we already have the console available
- move MMU setup in this initcall temporary as after the mmu_init will generic
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/panda/board.c')
-rw-r--r-- | arch/arm/boards/panda/board.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c index e27f0a45ef..696d44a819 100644 --- a/arch/arm/boards/panda/board.c +++ b/arch/arm/boards/panda/board.c @@ -44,20 +44,21 @@ static int panda_console_init(void) } console_initcall(panda_console_init); -#ifdef CONFIG_MMU -static int panda_mmu_init(void) +static int panda_mem_init(void) { + arm_add_mem_device("ram0", 0x80000000, SZ_1G); + +#ifdef CONFIG_MMU mmu_init(); arm_create_section(0x80000000, 0x80000000, 256, PMD_SECT_DEF_CACHED); arm_create_section(0x90000000, 0x80000000, 256, PMD_SECT_DEF_UNCACHED); mmu_enable(); - +#endif return 0; } -device_initcall(panda_mmu_init); -#endif +mem_initcall(panda_mem_init); #ifdef CONFIG_USB_EHCI static struct ehci_platform_data ehci_pdata = { @@ -139,7 +140,6 @@ static int panda_devices_init(void) sr32(OMAP44XX_SCRM_ALTCLKSRC, 2, 2, 0x3); } - arm_add_mem_device("ram0", 0x80000000, SZ_1G); add_generic_device("omap-hsmmc", -1, NULL, 0x4809C100, SZ_4K, IORESOURCE_MEM, NULL); panda_ehci_init(); |