[PATCH 1/2] mem: multiple resource support allow exclude a resource

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Nov 17 08:59:24 EST 2010


introduce DEVFS_MEM_BAREBOX_ONLY for this purpose

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/lib/armlinux.c |    4 ++++
 include/driver.h        |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index b74c5e8..55d1401 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -79,6 +79,10 @@ static void setup_memory_tags(void)
 	list_for_each_entry(mem, &memory_list, list) {
 		for (i = 0; i < mem->dev->num_resources; i++) {
 			res = &mem->dev->resource[i];
+
+			if (res->flags & DEVFS_MEM_BAREBOX_ONLY)
+				break;
+
 			params->hdr.tag = ATAG_MEM;
 			params->hdr.size = tag_size(tag_mem32);
 
diff --git a/include/driver.h b/include/driver.h
index c7dce1e..e98455c 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -354,6 +354,7 @@ ssize_t cdev_write(struct cdev *cdev, const void *buf, size_t count, ulong offse
 #define DEVFS_PARTITION_READONLY	(1 << 1)
 #define DEVFS_IS_PARTITION		(1 << 2)
 #define DEVFS_RDWR			(1 << 3)
+#define DEVFS_MEM_BAREBOX_ONLY		(1 << 4)
 
 int devfs_add_partition(const char *devname, unsigned long offset, size_t size,
 		int flags, const char *name);
-- 
1.7.1




More information about the barebox mailing list