diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2021-01-01 23:51:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-01-05 13:55:14 +0100 |
commit | 3124a8eb473273f712c86b0bd370d1d2279fb56b (patch) | |
tree | 9382bf4beff91cda90c6163663d1c462d7de6160 /include/driver.h | |
parent | cada638c2f116ce79973824d3bf088799625f624 (diff) | |
download | barebox-3124a8eb473273f712c86b0bd370d1d2279fb56b.tar.gz barebox-3124a8eb473273f712c86b0bd370d1d2279fb56b.tar.xz |
driver: provide dev_request_mem_resource_by_name() helper
There are both dev_request_mem_resource() and dev_request_mem_region(),
which return the struct resource and a IOMEM(.start) respectively.
There is only dev_request_mem_region_by_name(), but
no dev_request_mem_resource_by_name(), so add the latter for symmetry.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r-- | include/driver.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index e2886d051d..0d43b36148 100644 --- a/include/driver.h +++ b/include/driver.h @@ -215,6 +215,11 @@ void __iomem *dev_request_mem_region(struct device_d *dev, int num); struct resource *dev_request_mem_resource(struct device_d *dev, int num); /* + * exlusively request resource 'name' for a device + */ +struct resource *dev_request_mem_resource_by_name(struct device_d *dev, const char *name); + +/* * exlusively request register base 'num' for a device * will return NULL on error * only used on platform like at91 where the Ressource address collision with |