aboutsummaryrefslogtreecommitdiffstats
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 e73a2b482a15..f31af713e6a4 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -20,6 +20,7 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/atomic.h> 22#include <asm/atomic.h>
23#include <asm/io.h>
23 24
24/* Definitions used by the flattened device tree */ 25/* Definitions used by the flattened device tree */
25#define OF_DT_HEADER 0xd00dfeed /* marker */ 26#define OF_DT_HEADER 0xd00dfeed /* marker */
@@ -355,6 +356,16 @@ static inline int of_irq_to_resource(struct device_node *dev, int index, struct
355 return irq; 356 return irq;
356} 357}
357 358
359static inline void __iomem *of_iomap(struct device_node *np, int index)
360{
361 struct resource res;
362
363 if (of_address_to_resource(np, index, &res))
364 return NULL;
365
366 return ioremap(res.start, 1 + res.end - res.start);
367}
368
358 369
359#endif /* __KERNEL__ */ 370#endif /* __KERNEL__ */
360#endif /* _POWERPC_PROM_H */ 371#endif /* _POWERPC_PROM_H */