summaryrefslogtreecommitdiff
path: root/include/asm-powerpc/prom.h
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2006-10-19 19:52:26 -0500
committerPaul Mackerras <paulus@samba.org>2006-11-13 14:48:52 +1100
commita9b14973a8c42b2aecc968851372203c6567e196 (patch)
treeaa18a83855bbe5977504ceb3ab5efde89d5eb2d6 /include/asm-powerpc/prom.h
parentc37858d333a50815c74349396e31a535f4128e0b (diff)
[PATCH] Slight refactor of interrupt mapping for FSL parts
* Cleaned up interrupt mapping a little by adding a helper function which parses the irq out of the device-tree, and puts it into a resource. * Changed the arch/ppc platform files to specify PHY_POLL, instead of -1 * Changed the fixed phy to use PHY_IGNORE_INTERRUPT * Added ethtool.h and mii.h to phy.h includes Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/prom.h')
-rw-r--r--include/asm-powerpc/prom.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 524629769336..39f04ef96f38 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -17,6 +17,7 @@
*/
#include <linux/types.h>
#include <linux/proc_fs.h>
+#include <linux/platform_device.h>
#include <asm/atomic.h>
/* Definitions used by the flattened device tree */
@@ -331,6 +332,12 @@ extern int of_irq_map_one(struct device_node *device, int index,
struct pci_dev;
extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
+static inline void of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
+{
+ r->start = r->end = irq_of_parse_and_map(dev, index);
+ r->flags = IORESOURCE_IRQ;
+}
+
#endif /* __KERNEL__ */
#endif /* _POWERPC_PROM_H */