diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 09:48:06 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 18:14:25 -0400 |
commit | 7dc2e1134a22dc242175d5321c0c9e97d16eb87b (patch) | |
tree | 213406e4688340c788b40a8eb272255e8c44c8fe /arch/microblaze/include | |
parent | b83da291b4c73eaddc20e2edb614123a6d681b3b (diff) |
of/irq: merge irq mapping code
Merge common irq mapping code between PowerPC and Microblaze.
This patch merges of_irq_find_parent(), of_irq_map_raw() and
of_irq_map_one(). The functions are dependent on one another, so all
three are merged in a single patch. Other than cosmetic difference
(ie. DBG() vs. pr_debug()), the implementations are identical.
of_irq_to_resource() is also merged, but in this case the
implementations are different. This patch drops the microblaze version
and uses the powerpc implementation unchanged. The microblaze version
essentially open-coded irq_of_parse_and_map() which it does not need
to do. Therefore the powerpc version is safe to adopt.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
CC: Michal Simek <monstr@monstr.eu>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/prom.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index 4f34bc5baa83..5fbdfe76fe76 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h | |||
@@ -89,34 +89,6 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); | |||
89 | /* Get the MAC address */ | 89 | /* Get the MAC address */ |
90 | extern const void *of_get_mac_address(struct device_node *np); | 90 | extern const void *of_get_mac_address(struct device_node *np); |
91 | 91 | ||
92 | /* | ||
93 | * OF interrupt mapping | ||
94 | */ | ||
95 | |||
96 | #define OF_IMAP_OLDWORLD_MAC 0x00000001 | ||
97 | #define OF_IMAP_NO_PHANDLE 0x00000002 | ||
98 | |||
99 | /** | ||
100 | * of_irq_map_raw - Low level interrupt tree parsing | ||
101 | * @parent: the device interrupt parent | ||
102 | * @intspec: interrupt specifier ("interrupts" property of the device) | ||
103 | * @ointsize: size of the passed in interrupt specifier | ||
104 | * @addr: address specifier (start of "reg" property of the device) | ||
105 | * @out_irq: structure of_irq filled by this function | ||
106 | * | ||
107 | * Returns 0 on success and a negative number on error | ||
108 | * | ||
109 | * This function is a low-level interrupt tree walking function. It | ||
110 | * can be used to do a partial walk with synthetized reg and interrupts | ||
111 | * properties, for example when resolving PCI interrupts when no device | ||
112 | * node exist for the parent. | ||
113 | * | ||
114 | */ | ||
115 | |||
116 | extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, | ||
117 | u32 ointsize, const u32 *addr, | ||
118 | struct of_irq *out_irq); | ||
119 | |||
120 | /** | 92 | /** |
121 | * of_irq_map_pci - Resolve the interrupt for a PCI device | 93 | * of_irq_map_pci - Resolve the interrupt for a PCI device |
122 | * @pdev: the device whose interrupt is to be resolved | 94 | * @pdev: the device whose interrupt is to be resolved |
@@ -131,9 +103,6 @@ extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, | |||
131 | struct pci_dev; | 103 | struct pci_dev; |
132 | extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); | 104 | extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); |
133 | 105 | ||
134 | extern int of_irq_to_resource(struct device_node *dev, int index, | ||
135 | struct resource *r); | ||
136 | |||
137 | /** | 106 | /** |
138 | * of_iomap - Maps the memory mapped IO for a given device_node | 107 | * of_iomap - Maps the memory mapped IO for a given device_node |
139 | * @device: the device whose io range will be mapped | 108 | * @device: the device whose io range will be mapped |