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/at91sam9263ek | |
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/at91sam9263ek')
-rw-r--r-- | arch/arm/boards/at91sam9263ek/init.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c index 036a1c4845..46f3a7ede2 100644 --- a/arch/arm/boards/at91sam9263ek/init.c +++ b/arch/arm/boards/at91sam9263ek/init.c @@ -107,6 +107,14 @@ static void ek_add_device_mci(void) static void ek_add_device_mci(void) {} #endif +static int at91sam9263ek_mem_init(void) +{ + at91_add_device_sdram(64 * 1024 * 1024); + + return 0; +} +mem_initcall(at91sam9263ek_mem_init); + static int at91sam9263ek_devices_init(void) { /* @@ -117,7 +125,6 @@ static int at91sam9263ek_devices_init(void) at91_set_gpio_output(AT91_PIN_PB27, 1); at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */ - at91_add_device_sdram(64 * 1024 * 1024); ek_add_device_nand(); at91_add_device_eth(&macb_pdata); add_cfi_flash_device(0, AT91_CHIPSELECT_0, 8 * 1024 * 1024, 0); |