summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-10-17 15:05:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-30 10:24:12 +0100
commitd54f5b1b48046a418781352d53567130edd5bcde (patch)
treec20a17b2d450e070e989660b42a83f294df10306 /include
parent87feda4eb17229ec10dbc919cf3ee3d39959037b (diff)
downloadbarebox-d54f5b1b48046a418781352d53567130edd5bcde.tar.gz
barebox-d54f5b1b48046a418781352d53567130edd5bcde.tar.xz
driver: add support for requesting resource by name
this will allow to avoid issue with resource order Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 4918054887..f8d815c619 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -193,6 +193,21 @@ static inline const char *dev_name(const struct device_d *dev)
}
/*
+ * get resource base 'name' for a device
+ */
+struct resource *dev_get_resource_by_name(struct device_d *dev,
+ const char *name);
+/*
+ * get register base 'name' for a device
+ */
+void *dev_get_mem_region_by_name(struct device_d *dev, const char *name);
+
+/*
+ * exlusively request register base 'name' for a device
+ */
+void __iomem *dev_request_mem_region_by_name(struct device_d *dev,
+ const char *name);
+/*
* get register base 'num' for a device
*/
void *dev_get_mem_region(struct device_d *dev, int num);