summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-13 11:56:22 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-15 08:07:39 +0100
commitc38ff416cbe1bab66d0018a164b60c1bb4dd23f3 (patch)
tree2b246a6084fe7cc49ec4ff88714ea69ea761f487 /include
parent8e006fa8a9cd13e8b0f6febeefa107d403a2803d (diff)
downloadbarebox-c38ff416cbe1bab66d0018a164b60c1bb4dd23f3.tar.gz
barebox-c38ff416cbe1bab66d0018a164b60c1bb4dd23f3.tar.xz
driver: implement dev_platform_get_and_ioremap_resource
To simplify porting of Linux drivers that make use of this function, add an implementation to barebox. This was so far not done, because AT91 has I/O memory regions that conflict with the error pointers. Therefore, we emit a warning if we run into such a conflict. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240313105631.686778-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index b7c950620b..1d7d4efdd8 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -289,6 +289,10 @@ struct resource *dev_request_mem_resource(struct device *dev, int num);
struct resource *dev_request_mem_resource_by_name(struct device *dev,
const char *name);
+void __iomem *dev_platform_get_and_ioremap_resource(struct device *dev,
+ int num,
+ struct resource **out_res);
+
/*
* exlusively request register base 'num' for a device
* will return NULL on error