aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/prom.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 1375f8c91612..6845af93ba91 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -20,7 +20,6 @@
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>
24 23
25/* Definitions used by the flattened device tree */ 24/* Definitions used by the flattened device tree */
26#define OF_DT_HEADER 0xd00dfeed /* marker */ 25#define OF_DT_HEADER 0xd00dfeed /* marker */
@@ -337,16 +336,14 @@ extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
337extern int of_irq_to_resource(struct device_node *dev, int index, 336extern int of_irq_to_resource(struct device_node *dev, int index,
338 struct resource *r); 337 struct resource *r);
339 338
340static inline void __iomem *of_iomap(struct device_node *np, int index) 339/**
341{ 340 * of_iomap - Maps the memory mapped IO for a given device_node
342 struct resource res; 341 * @device: the device whose io range will be mapped
343 342 * @index: index of the io range
344 if (of_address_to_resource(np, index, &res)) 343 *
345 return NULL; 344 * Returns a pointer to the mapped memory
346 345 */
347 return ioremap(res.start, 1 + res.end - res.start); 346extern void __iomem *of_iomap(struct device_node *device, int index);
348}
349
350 347
351#endif /* __KERNEL__ */ 348#endif /* __KERNEL__ */
352#endif /* _POWERPC_PROM_H */ 349#endif /* _POWERPC_PROM_H */