diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-29 11:43:45 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-08-01 21:49:33 +0800 |
commit | 5f56079cd5175d1dc87e21951544959b786bda9a (patch) | |
tree | 8f27bdbfd5420f562d1c81c7ae59f443030c8622 /arch/arm/lib/armlinux.c | |
parent | aab32057b3c9860e0171987e7fcfcced1f3a401f (diff) | |
download | barebox-5f56079cd5175d1dc87e21951544959b786bda9a.tar.gz barebox-5f56079cd5175d1dc87e21951544959b786bda9a.tar.xz |
ARM: move armlinux_add_dram to location which is always compiled
We want to use the memory banks later in the MMU which is
independent of Linux, so move this to a location which is
always compiled.
Also, make the memory bank list global and add an iterator
for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib/armlinux.c')
-rw-r--r-- | arch/arm/lib/armlinux.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index e35e45d953..c8ed402a8a 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -42,6 +42,7 @@ #include <asm/barebox-arm.h> #include <asm/armlinux.h> #include <asm/system.h> +#include <asm/memory.h> static struct tag *params; static int armlinux_architecture = 0; @@ -64,18 +65,11 @@ static void setup_start_tag(void) params = tag_next(params); } -struct arm_memory { - struct list_head list; - struct device_d *dev; -}; - -static LIST_HEAD(memory_list); - static void setup_memory_tags(void) { struct arm_memory *mem; - list_for_each_entry(mem, &memory_list, list) { + for_each_sdram_bank(mem) { params->hdr.tag = ATAG_MEM; params->hdr.size = tag_size(tag_mem32); @@ -196,15 +190,6 @@ void armlinux_set_architecture(int architecture) armlinux_architecture = architecture; } -void armlinux_add_dram(struct device_d *dev) -{ - struct arm_memory *mem = xzalloc(sizeof(*mem)); - - mem->dev = dev; - - list_add_tail(&mem->list, &memory_list); -} - void armlinux_set_revision(unsigned int rev) { system_rev = rev; |