summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/prom.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index e73a2b482a1..f31af713e6a 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <asm/irq.h>
#include <asm/atomic.h>
+#include <asm/io.h>
/* Definitions used by the flattened device tree */
#define OF_DT_HEADER 0xd00dfeed /* marker */
@@ -355,6 +356,16 @@ static inline int of_irq_to_resource(struct device_node *dev, int index, struct
return irq;
}
+static inline void __iomem *of_iomap(struct device_node *np, int index)
+{
+ struct resource res;
+
+ if (of_address_to_resource(np, index, &res))
+ return NULL;
+
+ return ioremap(res.start, 1 + res.end - res.start);
+}
+
#endif /* __KERNEL__ */
#endif /* _POWERPC_PROM_H */