summaryrefslogtreecommitdiff
path: root/include/linux/io.h
diff options
context:
space:
mode:
authorMatthias Brugger <matthias.bgg@gmail.com>2014-07-18 11:36:39 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2014-07-23 12:02:30 +0200
commitefd342fb0031a17758571dce42e3f373d94e2fec (patch)
tree914578b4b0944ae5ca884e18ffe13cd223dccb14 /include/linux/io.h
parent7e1391876c8f95df9241deb78fa98e799e7bb05e (diff)
of: Provide a function to request and map memory
A call to of_iomap does not request the memory region. This patch adds the function of_io_request_and_map which requests the memory region before mapping it. Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Suggested-by: Thomas Gleixner <tglx@linutronix.de> Suggested-by: Rob Herring <robh@kernel.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'include/linux/io.h')
-rw-r--r--include/linux/io.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/io.h b/include/linux/io.h
index b76e6e545806..d5fc9b8d8b03 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -58,6 +58,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
}
#endif
+#define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err)
+
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
unsigned long size);
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,