summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/edb93xx
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-07-29 11:43:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-01 16:32:00 +0200
commitf9f35ee93821048bbace895c5c688bafbda2c3f3 (patch)
treeadab257c88226972d58ae3e47aeea7f7a3ae36b5 /arch/arm/boards/edb93xx
parent2222dbc28668e478ec27cff13f8d4c9498d8519a (diff)
downloadbarebox-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/edb93xx')
-rw-r--r--arch/arm/boards/edb93xx/edb93xx.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/arch/arm/boards/edb93xx/edb93xx.c b/arch/arm/boards/edb93xx/edb93xx.c
index fd838bf705..3e4e0b04a0 100644
--- a/arch/arm/boards/edb93xx/edb93xx.c
+++ b/arch/arm/boards/edb93xx/edb93xx.c
@@ -34,19 +34,8 @@
#define DEVCFG_U1EN (1 << 18)
-static int ep93xx_devices_init(void)
+static int ep93xx_mem_init(void)
{
- add_cfi_flash_device(-1, 0x60000000, EDB93XX_CFI_FLASH_SIZE, 0);
-
- /*
- * Create partitions that should be
- * not touched by any regular user
- */
- devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self0");
- devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0");
-
- protect_file("/dev/env0", 1);
-
arm_add_mem_device("ram0", CONFIG_EP93XX_SDRAM_BANK0_BASE,
CONFIG_EP93XX_SDRAM_BANK0_SIZE);
#if (CONFIG_EP93XX_SDRAM_NUM_BANKS >= 2)
@@ -62,6 +51,23 @@ static int ep93xx_devices_init(void)
CONFIG_EP93XX_SDRAM_BANK2_SIZE);
#endif
+ return 0;
+}
+mem_initcall(ep93xx_mem_init);
+
+static int ep93xx_devices_init(void)
+{
+ add_cfi_flash_device(-1, 0x60000000, EDB93XX_CFI_FLASH_SIZE, 0);
+
+ /*
+ * Create partitions that should be
+ * not touched by any regular user
+ */
+ devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self0");
+ devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0");
+
+ protect_file("/dev/env0", 1);
+
/*
* Up to 32MiB NOR type flash, connected to
* CS line 6, data width is 16 bit