summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-07-19 09:58:32 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-18 20:32:45 +0800
commitf928efa818adfe56a08350569a9b0f3c2fb791d2 (patch)
tree4fc754655afbd235d466a5c9d7a63ce89faed24b /include
parent88618eb5f12c27be7bb4400eb13768e4c2822ae7 (diff)
downloadbarebox-f928efa818adfe56a08350569a9b0f3c2fb791d2.tar.gz
barebox-f928efa818adfe56a08350569a9b0f3c2fb791d2.tar.xz
add a add_mem_device function
Add a helper function for boards to register their memory devices. This makes the board code smaller and also helps getting rid of map_base and struct memory_platform_data. And switch all of the memory to it Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/driver.h b/include/driver.h
index 05c399186b..11c42fef43 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -202,6 +202,12 @@ static inline void __iomem *dev_request_mem_region(struct device_d *dev, int num
return dev_get_mem_region(dev, num);
}
+/*
+ * register a memory device
+ */
+struct device_d *add_mem_device(const char *name, resource_size_t start,
+ resource_size_t size, unsigned int flags);
+
/* linear list over all available devices
*/
extern struct list_head device_list;
@@ -349,10 +355,5 @@ int devfs_add_partition(const char *devname, unsigned long offset, size_t size,
int flags, const char *name);
int devfs_del_partition(const char *name);
-struct memory_platform_data {
- char *name;
- unsigned int flags;
-};
-
#endif /* DRIVER_H */