summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-22 12:47:45 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-23 09:23:40 +0800
commit166388bcf67edaf932fc026ef98b8749562e50f9 (patch)
treef46e14fcf6711efadedf76751fada75c417c01c1 /include
parent826708d5d8c3d7e3b5cd518ea44fb0bdbaad0175 (diff)
downloadbarebox-166388bcf67edaf932fc026ef98b8749562e50f9.tar.gz
barebox-166388bcf67edaf932fc026ef98b8749562e50f9.tar.xz
resource: introduce add_cfi_device to register simple cfi device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 738cfaee5a..af34803936 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -220,6 +220,13 @@ static inline struct device_d *add_mem_device(const char *name, resource_size_t
IORESOURCE_MEM | flags, NULL);
}
+static inline struct device_d *add_cfi_flash_device(int id, resource_size_t start,
+ resource_size_t size, unsigned int flags)
+{
+ return add_generic_device("cfi_flash", id, NULL, start, size,
+ IORESOURCE_MEM | flags, NULL);
+}
+
/* linear list over all available devices
*/
extern struct list_head device_list;