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/pcm043 | |
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/pcm043')
-rw-r--r-- | arch/arm/boards/pcm043/pcm043.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c index 0f25354ef9..10d319fa1d 100644 --- a/arch/arm/boards/pcm043/pcm043.c +++ b/arch/arm/boards/pcm043/pcm043.c @@ -99,9 +99,11 @@ static struct imx_ipu_fb_platform_data ipu_fb_data = { .bpp = 16, }; -#ifdef CONFIG_MMU -static int pcm043_mmu_init(void) +static int pcm043_mem_init(void) { + arm_add_mem_device("ram0", IMX_SDRAM_CS0, 128 * 1024 * 1024); + +#ifdef CONFIG_MMU mmu_init(); arm_create_section(0x80000000, 0x80000000, 128, PMD_SECT_DEF_CACHED); @@ -114,10 +116,11 @@ static int pcm043_mmu_init(void) #ifdef CONFIG_CACHE_L2X0 l2x0_init((void __iomem *)0x30000000, 0x00030024, 0x00000000); #endif +#endif return 0; } -postcore_initcall(pcm043_mmu_init); -#endif +mem_initcall(pcm043_mem_init); + struct gpio_led led0 = { .gpio = 1 * 32 + 6, @@ -170,7 +173,6 @@ static int imx35_devices_init(void) } - arm_add_mem_device("ram0", IMX_SDRAM_CS0, 128 * 1024 * 1024); imx35_add_fb(&ipu_fb_data); armlinux_set_bootparams((void *)0x80000100); @@ -216,6 +218,7 @@ static int imx35_console_init(void) mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); imx35_add_uart0(); + return 0; } |