mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/5] arm/setup_memory_tags: add multiple resource support
Date: Fri, 12 Nov 2010 19:18:56 +0100	[thread overview]
Message-ID: <1289585938-22813-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20101112180228.GC13661@game.jcrosoft.org>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/lib/armlinux.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index d1f8281..b74c5e8 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -73,15 +73,20 @@ static LIST_HEAD(memory_list);
 static void setup_memory_tags(void)
 {
 	struct arm_memory *mem;
+	struct resource *res;
+	int i;
 
 	list_for_each_entry(mem, &memory_list, list) {
-		params->hdr.tag = ATAG_MEM;
-		params->hdr.size = tag_size(tag_mem32);
+		for (i = 0; i < mem->dev->num_resources; i++) {
+			res = &mem->dev->resource[i];
+			params->hdr.tag = ATAG_MEM;
+			params->hdr.size = tag_size(tag_mem32);
 
-		params->u.mem.start = dev_resource_get_start(mem->dev);
-		params->u.mem.size = dev_resource_get_size(mem->dev);
+			params->u.mem.start = res->start;
+			params->u.mem.size = res->size;
 
-		params = tag_next(params);
+			params = tag_next(params);
+		}
 	}
 }
 
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-11-12 18:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 18:02 [To test] [PATCH 0/5] device: introduce resource structure Jean-Christophe PLAGNIOL-VILLARD
2010-11-12 18:18 ` [PATCH 1/5] device: introduce resource structure to simplify resource delaration Jean-Christophe PLAGNIOL-VILLARD
2010-11-19  8:00   ` Sascha Hauer
2010-11-19 11:30     ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 13:40       ` Sascha Hauer
2010-11-20 13:58         ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-21  4:28           ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-21  6:46             ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-23  7:36             ` Sascha Hauer
2010-11-23  8:25               ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-23 11:34                 ` Sascha Hauer
2011-01-27  8:20   ` Sascha Hauer
2010-11-12 18:18 ` [PATCH 2/5] mem: add multiple resource support Jean-Christophe PLAGNIOL-VILLARD
2010-11-12 18:18 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-11-12 18:18 ` [PATCH 4/5] edb93xx: convert to multiple mem resources Jean-Christophe PLAGNIOL-VILLARD
2010-11-12 18:18 ` [PATCH 5/5] pcm037: " Jean-Christophe PLAGNIOL-VILLARD
2010-11-17 13:59 ` [PATCH 1/2] mem: multiple resource support allow exclude a resource Jean-Christophe PLAGNIOL-VILLARD
2010-11-19  8:24   ` Sascha Hauer
2010-11-19 11:31     ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-17 13:59 ` [PATCH 2/2] mem: convert to DEVFS_MEM_BAREBOX_ONLY for freescale-mx25-3-stack/pcm037/pvm038 Jean-Christophe PLAGNIOL-VILLARD
2010-11-17 14:09   ` Baruch Siach
2010-11-17 14:02 ` [To test] [PATCH 0/5] device: introduce resource structure Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289585938-22813-3-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox