summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/armlinux.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:27 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:27 +0200
commit42e2dbc120f1a74c8588b5643471bb11e3625a13 (patch)
tree6cb23ba269bf9f22344ee368f0d968d799d491eb /arch/arm/lib/armlinux.c
parentaabb4586a415ea39b84dd0ddfa8b4eba2d09de5e (diff)
downloadbarebox-42e2dbc120f1a74c8588b5643471bb11e3625a13.tar.gz
barebox-42e2dbc120f1a74c8588b5643471bb11e3625a13.tar.xz
svn_rev_149
no need for bi_dram in global data (untested)
Diffstat (limited to 'arch/arm/lib/armlinux.c')
-rw-r--r--arch/arm/lib/armlinux.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index df5a61bdd..432b4fb8c 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -23,6 +23,7 @@
#include <common.h>
#include <command.h>
+#include <driver.h>
#include <image.h>
#include <zlib.h>
#include <asm/byteorder.h>
@@ -277,14 +278,19 @@ static void setup_start_tag (bd_t *bd)
#ifdef CONFIG_SETUP_MEMORY_TAGS
static void setup_memory_tags (bd_t *bd)
{
- int i;
+ struct device_d *dev = NULL;
+
+ while (1) {
+ dev = get_device_by_type(DEVICE_TYPE_DRAM, dev);
+
+ if (!dev)
+ return;
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
params->hdr.tag = ATAG_MEM;
params->hdr.size = tag_size (tag_mem32);
- params->u.mem.start = bd->bi_dram[i].start;
- params->u.mem.size = bd->bi_dram[i].size;
+ params->u.mem.start = dev->map_base;
+ params->u.mem.size = dev->size;
params = tag_next (params);
}