diff options
Diffstat (limited to 'include/asm-powerpc/prom.h')
-rw-r--r-- | include/asm-powerpc/prom.h | 19 |
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 @@ #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 */ @@ -337,16 +336,14 @@ extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); extern int of_irq_to_resource(struct device_node *dev, int index, struct resource *r); -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); -} - +/** + * of_iomap - Maps the memory mapped IO for a given device_node + * @device: the device whose io range will be mapped + * @index: index of the io range + * + * Returns a pointer to the mapped memory + */ +extern void __iomem *of_iomap(struct device_node *device, int index); #endif /* __KERNEL__ */ #endif /* _POWERPC_PROM_H */ |