aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-integrator/pci_v3.c5
-rw-r--r--arch/microblaze/pci/pci-common.c9
-rw-r--r--arch/mips/pci/fixup-lantiq.c5
-rw-r--r--arch/mips/pci/pci-rt3883.c6
-rw-r--r--arch/powerpc/kernel/pci-common.c9
-rw-r--r--arch/powerpc/platforms/cell/celleb_scc_pciex.c5
-rw-r--r--arch/powerpc/platforms/cell/celleb_scc_sio.c5
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c6
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c12
-rw-r--r--arch/powerpc/platforms/fsl_uli1575.c8
-rw-r--r--arch/powerpc/platforms/powermac/pic.c8
-rw-r--r--arch/powerpc/platforms/pseries/event_sources.c7
-rw-r--r--arch/powerpc/sysdev/mpic_msi.c6
-rw-r--r--arch/x86/kernel/devicetree.c5
-rw-r--r--drivers/of/irq.c15
-rw-r--r--drivers/of/of_pci_irq.c2
-rw-r--r--drivers/pci/host/pci-mvebu.c5
-rw-r--r--include/linux/of_irq.h24
-rw-r--r--include/linux/of_pci.h4
19 files changed, 58 insertions, 88 deletions
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index 0f496cc51f36..2d6b4da90fb4 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -837,7 +837,7 @@ static struct hw_pci pci_v3 __initdata = {
837 837
838static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin) 838static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
839{ 839{
840 struct of_irq oirq; 840 struct of_phandle_args oirq;
841 int ret; 841 int ret;
842 842
843 ret = of_irq_parse_pci(dev, &oirq); 843 ret = of_irq_parse_pci(dev, &oirq);
@@ -847,8 +847,7 @@ static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
847 return 0; 847 return 0;
848 } 848 }
849 849
850 return irq_create_of_mapping(oirq.controller, oirq.specifier, 850 return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
851 oirq.size);
852} 851}
853 852
854static int __init pci_v3_dtprobe(struct platform_device *pdev, 853static int __init pci_v3_dtprobe(struct platform_device *pdev,
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 4d5b1a9cd790..c9302c4f8a57 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -199,7 +199,7 @@ void pcibios_set_master(struct pci_dev *dev)
199 */ 199 */
200int pci_read_irq_line(struct pci_dev *pci_dev) 200int pci_read_irq_line(struct pci_dev *pci_dev)
201{ 201{
202 struct of_irq oirq; 202 struct of_phandle_args oirq;
203 unsigned int virq; 203 unsigned int virq;
204 204
205 /* The current device-tree that iSeries generates from the HV 205 /* The current device-tree that iSeries generates from the HV
@@ -243,11 +243,10 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
243 irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); 243 irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
244 } else { 244 } else {
245 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", 245 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
246 oirq.size, oirq.specifier[0], oirq.specifier[1], 246 oirq.args_count, oirq.args[0], oirq.args[1],
247 of_node_full_name(oirq.controller)); 247 of_node_full_name(oirq.np));
248 248
249 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 249 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
250 oirq.size);
251 } 250 }
252 if (!virq) { 251 if (!virq) {
253 pr_debug(" Failed to map !\n"); 252 pr_debug(" Failed to map !\n");
diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c
index 2e8dbfedae53..81ff0b5e6efa 100644
--- a/arch/mips/pci/fixup-lantiq.c
+++ b/arch/mips/pci/fixup-lantiq.c
@@ -25,7 +25,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
25 25
26int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 26int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
27{ 27{
28 struct of_irq dev_irq; 28 struct of_phandle_args dev_irq;
29 int irq; 29 int irq;
30 30
31 if (of_irq_parse_pci(dev, &dev_irq)) { 31 if (of_irq_parse_pci(dev, &dev_irq)) {
@@ -33,8 +33,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
33 slot, pin); 33 slot, pin);
34 return 0; 34 return 0;
35 } 35 }
36 irq = irq_create_of_mapping(dev_irq.controller, dev_irq.specifier, 36 irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count);
37 dev_irq.size);
38 dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq); 37 dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq);
39 return irq; 38 return irq;
40} 39}
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c
index cae92a05ee70..0f08a5ba0b2a 100644
--- a/arch/mips/pci/pci-rt3883.c
+++ b/arch/mips/pci/pci-rt3883.c
@@ -583,7 +583,7 @@ err_put_intc_node:
583 583
584int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 584int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
585{ 585{
586 struct of_irq dev_irq; 586 struct of_phandle_args dev_irq;
587 int err; 587 int err;
588 int irq; 588 int irq;
589 589
@@ -594,9 +594,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
594 return 0; 594 return 0;
595 } 595 }
596 596
597 irq = irq_create_of_mapping(dev_irq.controller, 597 irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count);
598 dev_irq.specifier,
599 dev_irq.size);
600 598
601 if (irq == 0) 599 if (irq == 0)
602 pr_crit("pci %s: no irq found for pin %u\n", 600 pr_crit("pci %s: no irq found for pin %u\n",
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 2f4185425ed5..96c46235fda2 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -228,7 +228,7 @@ int pcibios_add_platform_entries(struct pci_dev *pdev)
228 */ 228 */
229static int pci_read_irq_line(struct pci_dev *pci_dev) 229static int pci_read_irq_line(struct pci_dev *pci_dev)
230{ 230{
231 struct of_irq oirq; 231 struct of_phandle_args oirq;
232 unsigned int virq; 232 unsigned int virq;
233 233
234 pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); 234 pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev));
@@ -263,11 +263,10 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
263 irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); 263 irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
264 } else { 264 } else {
265 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", 265 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
266 oirq.size, oirq.specifier[0], oirq.specifier[1], 266 oirq.args_count, oirq.args[0], oirq.args[1],
267 of_node_full_name(oirq.controller)); 267 of_node_full_name(oirq.np));
268 268
269 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 269 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
270 oirq.size);
271 } 270 }
272 if(virq == NO_IRQ) { 271 if(virq == NO_IRQ) {
273 pr_debug(" Failed to map !\n"); 272 pr_debug(" Failed to map !\n");
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
index 40bc371096b7..e8d34d1f640d 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
@@ -486,7 +486,7 @@ static __init int celleb_setup_pciex(struct device_node *node,
486 struct pci_controller *phb) 486 struct pci_controller *phb)
487{ 487{
488 struct resource r; 488 struct resource r;
489 struct of_irq oirq; 489 struct of_phandle_args oirq;
490 int virq; 490 int virq;
491 491
492 /* SMMIO registers; used inside this file */ 492 /* SMMIO registers; used inside this file */
@@ -511,8 +511,7 @@ static __init int celleb_setup_pciex(struct device_node *node,
511 pr_err("PCIEXC:Failed to map irq\n"); 511 pr_err("PCIEXC:Failed to map irq\n");
512 goto error; 512 goto error;
513 } 513 }
514 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 514 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
515 oirq.size);
516 if (request_irq(virq, pciex_handle_internal_irq, 515 if (request_irq(virq, pciex_handle_internal_irq,
517 0, "pciex", (void *)phb)) { 516 0, "pciex", (void *)phb)) {
518 pr_err("PCIEXC:Failed to request irq\n"); 517 pr_err("PCIEXC:Failed to request irq\n");
diff --git a/arch/powerpc/platforms/cell/celleb_scc_sio.c b/arch/powerpc/platforms/cell/celleb_scc_sio.c
index 96388b202f4e..06046d512130 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_sio.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_sio.c
@@ -45,7 +45,7 @@ static int __init txx9_serial_init(void)
45 struct device_node *node; 45 struct device_node *node;
46 int i; 46 int i;
47 struct uart_port req; 47 struct uart_port req;
48 struct of_irq irq; 48 struct of_phandle_args irq;
49 struct resource res; 49 struct resource res;
50 50
51 for_each_compatible_node(node, "serial", "toshiba,sio-scc") { 51 for_each_compatible_node(node, "serial", "toshiba,sio-scc") {
@@ -66,8 +66,7 @@ static int __init txx9_serial_init(void)
66#ifdef CONFIG_SERIAL_TXX9_CONSOLE 66#ifdef CONFIG_SERIAL_TXX9_CONSOLE
67 req.membase = ioremap(req.mapbase, 0x24); 67 req.membase = ioremap(req.mapbase, 0x24);
68#endif 68#endif
69 req.irq = irq_create_of_mapping(irq.controller, 69 req.irq = irq_create_of_mapping(irq.np, irq.args, irq.args_count);
70 irq.specifier, irq.size);
71 req.flags |= UPF_IOREMAP | UPF_BUGGY_UART 70 req.flags |= UPF_IOREMAP | UPF_BUGGY_UART
72 /*HAVE_CTS_LINE*/; 71 /*HAVE_CTS_LINE*/;
73 req.uartclk = 83300000; 72 req.uartclk = 83300000;
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index b491f406560a..6e842fdbfcab 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -235,10 +235,10 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
235 /* First, we check whether we have a real "interrupts" in the device 235 /* First, we check whether we have a real "interrupts" in the device
236 * tree in case the device-tree is ever fixed 236 * tree in case the device-tree is ever fixed
237 */ 237 */
238 struct of_irq oirq; 238 struct of_phandle_args oirq;
239 if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) { 239 if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) {
240 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 240 virq = irq_create_of_mapping(oirq.np, oirq.args,
241 oirq.size); 241 oirq.args_count);
242 return virq; 242 return virq;
243 } 243 }
244 244
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index e6cdb81a0959..e9eb4f83b1d5 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -177,7 +177,7 @@ out:
177 177
178static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) 178static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
179{ 179{
180 struct of_irq oirq; 180 struct of_phandle_args oirq;
181 int ret; 181 int ret;
182 int i; 182 int i;
183 183
@@ -188,10 +188,10 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
188 goto err; 188 goto err;
189 } 189 }
190 ret = -EINVAL; 190 ret = -EINVAL;
191 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0], 191 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0],
192 oirq.controller->full_name); 192 oirq.np->full_name);
193 spu->irqs[i] = irq_create_of_mapping(oirq.controller, 193 spu->irqs[i] = irq_create_of_mapping(oirq.np,
194 oirq.specifier, oirq.size); 194 oirq.args, oirq.args_count);
195 if (spu->irqs[i] == NO_IRQ) { 195 if (spu->irqs[i] == NO_IRQ) {
196 pr_debug("spu_new: failed to map it !\n"); 196 pr_debug("spu_new: failed to map it !\n");
197 goto err; 197 goto err;
@@ -200,7 +200,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
200 return 0; 200 return 0;
201 201
202err: 202err:
203 pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier, 203 pr_debug("failed to map irq %x for spu %s\n", *oirq.args,
204 spu->name); 204 spu->name);
205 for (; i >= 0; i--) { 205 for (; i >= 0; i--) {
206 if (spu->irqs[i] != NO_IRQ) 206 if (spu->irqs[i] != NO_IRQ)
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index ac539c1cd808..288226deffa3 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -321,8 +321,8 @@ static void hpcd_final_uli5288(struct pci_dev *dev)
321{ 321{
322 struct pci_controller *hose = pci_bus_to_host(dev->bus); 322 struct pci_controller *hose = pci_bus_to_host(dev->bus);
323 struct device_node *hosenode = hose ? hose->dn : NULL; 323 struct device_node *hosenode = hose ? hose->dn : NULL;
324 struct of_irq oirq; 324 struct of_phandle_args oirq;
325 int virq, pin = 2; 325 int pin = 2;
326 u32 laddr[3]; 326 u32 laddr[3];
327 327
328 if (!machine_is(mpc86xx_hpcd)) 328 if (!machine_is(mpc86xx_hpcd))
@@ -334,9 +334,7 @@ static void hpcd_final_uli5288(struct pci_dev *dev)
334 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); 334 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8);
335 laddr[1] = laddr[2] = 0; 335 laddr[1] = laddr[2] = 0;
336 of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq); 336 of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq);
337 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 337 dev->irq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
338 oirq.size);
339 dev->irq = virq;
340} 338}
341 339
342DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); 340DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575);
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 720663e29f47..4c24bf60d39d 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -394,7 +394,7 @@ static void __init pmac_pic_probe_oldstyle(void)
394} 394}
395 395
396int of_irq_parse_oldworld(struct device_node *device, int index, 396int of_irq_parse_oldworld(struct device_node *device, int index,
397 struct of_irq *out_irq) 397 struct of_phandle_args *out_irq)
398{ 398{
399 const u32 *ints = NULL; 399 const u32 *ints = NULL;
400 int intlen; 400 int intlen;
@@ -422,9 +422,9 @@ int of_irq_parse_oldworld(struct device_node *device, int index,
422 if (index >= intlen) 422 if (index >= intlen)
423 return -EINVAL; 423 return -EINVAL;
424 424
425 out_irq->controller = NULL; 425 out_irq->np = NULL;
426 out_irq->specifier[0] = ints[index]; 426 out_irq->args[0] = ints[index];
427 out_irq->size = 1; 427 out_irq->args_count = 1;
428 428
429 return 0; 429 return 0;
430} 430}
diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c
index 850c18c457ad..6dcf9cc38ffb 100644
--- a/arch/powerpc/platforms/pseries/event_sources.c
+++ b/arch/powerpc/platforms/pseries/event_sources.c
@@ -25,7 +25,7 @@ void request_event_sources_irqs(struct device_node *np,
25 const char *name) 25 const char *name)
26{ 26{
27 int i, index, count = 0; 27 int i, index, count = 0;
28 struct of_irq oirq; 28 struct of_phandle_args oirq;
29 const u32 *opicprop; 29 const u32 *opicprop;
30 unsigned int opicplen; 30 unsigned int opicplen;
31 unsigned int virqs[16]; 31 unsigned int virqs[16];
@@ -59,9 +59,8 @@ void request_event_sources_irqs(struct device_node *np,
59 index++) { 59 index++) {
60 if (count > 15) 60 if (count > 15)
61 break; 61 break;
62 virqs[count] = irq_create_of_mapping(oirq.controller, 62 virqs[count] = irq_create_of_mapping(oirq.np, oirq.args,
63 oirq.specifier, 63 oirq.args_count);
64 oirq.size);
65 if (virqs[count] == NO_IRQ) { 64 if (virqs[count] == NO_IRQ) {
66 pr_err("event-sources: Unable to allocate " 65 pr_err("event-sources: Unable to allocate "
67 "interrupt number for %s\n", 66 "interrupt number for %s\n",
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c
index 463e3a7c193c..7dc39f35a4cc 100644
--- a/arch/powerpc/sysdev/mpic_msi.c
+++ b/arch/powerpc/sysdev/mpic_msi.c
@@ -35,7 +35,7 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
35 const struct irq_domain_ops *ops = mpic->irqhost->ops; 35 const struct irq_domain_ops *ops = mpic->irqhost->ops;
36 struct device_node *np; 36 struct device_node *np;
37 int flags, index, i; 37 int flags, index, i;
38 struct of_irq oirq; 38 struct of_phandle_args oirq;
39 39
40 pr_debug("mpic: found U3, guessing msi allocator setup\n"); 40 pr_debug("mpic: found U3, guessing msi allocator setup\n");
41 41
@@ -64,8 +64,8 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
64 64
65 index = 0; 65 index = 0;
66 while (of_irq_parse_one(np, index++, &oirq) == 0) { 66 while (of_irq_parse_one(np, index++, &oirq) == 0) {
67 ops->xlate(mpic->irqhost, NULL, oirq.specifier, 67 ops->xlate(mpic->irqhost, NULL, oirq.args,
68 oirq.size, &hwirq, &flags); 68 oirq.args_count, &hwirq, &flags);
69 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); 69 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq);
70 } 70 }
71 } 71 }
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 3ac6398e5361..00986988a10e 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -105,7 +105,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
105 105
106static int x86_of_pci_irq_enable(struct pci_dev *dev) 106static int x86_of_pci_irq_enable(struct pci_dev *dev)
107{ 107{
108 struct of_irq oirq; 108 struct of_phandle_args oirq;
109 u32 virq; 109 u32 virq;
110 int ret; 110 int ret;
111 u8 pin; 111 u8 pin;
@@ -120,8 +120,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev)
120 if (ret) 120 if (ret)
121 return ret; 121 return ret;
122 122
123 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 123 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
124 oirq.size);
125 if (virq == 0) 124 if (virq == 0)
126 return -EINVAL; 125 return -EINVAL;
127 dev->irq = virq; 126 dev->irq = virq;
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 410aa2415f42..a7db38a63403 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -36,13 +36,12 @@
36 */ 36 */
37unsigned int irq_of_parse_and_map(struct device_node *dev, int index) 37unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
38{ 38{
39 struct of_irq oirq; 39 struct of_phandle_args oirq;
40 40
41 if (of_irq_parse_one(dev, index, &oirq)) 41 if (of_irq_parse_one(dev, index, &oirq))
42 return 0; 42 return 0;
43 43
44 return irq_create_of_mapping(oirq.controller, oirq.specifier, 44 return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
45 oirq.size);
46} 45}
47EXPORT_SYMBOL_GPL(irq_of_parse_and_map); 46EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
48 47
@@ -94,7 +93,7 @@ struct device_node *of_irq_find_parent(struct device_node *child)
94 * node exist for the parent. 93 * node exist for the parent.
95 */ 94 */
96int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec, 95int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec,
97 u32 ointsize, const __be32 *addr, struct of_irq *out_irq) 96 u32 ointsize, const __be32 *addr, struct of_phandle_args *out_irq)
98{ 97{
99 struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL; 98 struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL;
100 const __be32 *tmp, *imap, *imask; 99 const __be32 *tmp, *imap, *imask;
@@ -156,10 +155,10 @@ int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec,
156 NULL) { 155 NULL) {
157 pr_debug(" -> got it !\n"); 156 pr_debug(" -> got it !\n");
158 for (i = 0; i < intsize; i++) 157 for (i = 0; i < intsize; i++)
159 out_irq->specifier[i] = 158 out_irq->args[i] =
160 of_read_number(intspec +i, 1); 159 of_read_number(intspec +i, 1);
161 out_irq->size = intsize; 160 out_irq->args_count = intsize;
162 out_irq->controller = ipar; 161 out_irq->np = ipar;
163 of_node_put(old); 162 of_node_put(old);
164 return 0; 163 return 0;
165 } 164 }
@@ -280,7 +279,7 @@ EXPORT_SYMBOL_GPL(of_irq_parse_raw);
280 * This function resolves an interrupt, walking the tree, for a given 279 * This function resolves an interrupt, walking the tree, for a given
281 * device-tree node. It's the high level pendant to of_irq_parse_raw(). 280 * device-tree node. It's the high level pendant to of_irq_parse_raw().
282 */ 281 */
283int of_irq_parse_one(struct device_node *device, int index, struct of_irq *out_irq) 282int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_args *out_irq)
284{ 283{
285 struct device_node *p; 284 struct device_node *p;
286 const __be32 *intspec, *tmp, *addr; 285 const __be32 *intspec, *tmp, *addr;
diff --git a/drivers/of/of_pci_irq.c b/drivers/of/of_pci_irq.c
index dceec1048dab..ee3293d4b66b 100644
--- a/drivers/of/of_pci_irq.c
+++ b/drivers/of/of_pci_irq.c
@@ -15,7 +15,7 @@
15 * PCI tree until an device-node is found, at which point it will finish 15 * PCI tree until an device-node is found, at which point it will finish
16 * resolving using the OF tree walking. 16 * resolving using the OF tree walking.
17 */ 17 */
18int of_irq_parse_pci(const struct pci_dev *pdev, struct of_irq *out_irq) 18int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq)
19{ 19{
20 struct device_node *dn, *ppnode; 20 struct device_node *dn, *ppnode;
21 struct pci_dev *ppdev; 21 struct pci_dev *ppdev;
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 05f81807d05b..c5e57f82b9af 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -647,15 +647,14 @@ static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
647 647
648static int __init mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 648static int __init mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
649{ 649{
650 struct of_irq oirq; 650 struct of_phandle_args oirq;
651 int ret; 651 int ret;
652 652
653 ret = of_irq_parse_pci(dev, &oirq); 653 ret = of_irq_parse_pci(dev, &oirq);
654 if (ret) 654 if (ret)
655 return ret; 655 return ret;
656 656
657 return irq_create_of_mapping(oirq.controller, oirq.specifier, 657 return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count);
658 oirq.size);
659} 658}
660 659
661static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys) 660static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys)
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index a00bc71e62a3..8d9f85560d48 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -8,22 +8,6 @@
8#include <linux/ioport.h> 8#include <linux/ioport.h>
9#include <linux/of.h> 9#include <linux/of.h>
10 10
11/**
12 * of_irq - container for device_node/irq_specifier pair for an irq controller
13 * @controller: pointer to interrupt controller device tree node
14 * @size: size of interrupt specifier
15 * @specifier: array of cells @size long specifing the specific interrupt
16 *
17 * This structure is returned when an interrupt is mapped. The controller
18 * field needs to be put() after use
19 */
20#define OF_MAX_IRQ_SPEC 4 /* We handle specifiers of at most 4 cells */
21struct of_irq {
22 struct device_node *controller; /* Interrupt controller node */
23 u32 size; /* Specifier size */
24 u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */
25};
26
27typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *); 11typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
28 12
29/* 13/*
@@ -36,12 +20,12 @@ typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
36extern unsigned int of_irq_workarounds; 20extern unsigned int of_irq_workarounds;
37extern struct device_node *of_irq_dflt_pic; 21extern struct device_node *of_irq_dflt_pic;
38extern int of_irq_parse_oldworld(struct device_node *device, int index, 22extern int of_irq_parse_oldworld(struct device_node *device, int index,
39 struct of_irq *out_irq); 23 struct of_phandle_args *out_irq);
40#else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ 24#else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */
41#define of_irq_workarounds (0) 25#define of_irq_workarounds (0)
42#define of_irq_dflt_pic (NULL) 26#define of_irq_dflt_pic (NULL)
43static inline int of_irq_parse_oldworld(struct device_node *device, int index, 27static inline int of_irq_parse_oldworld(struct device_node *device, int index,
44 struct of_irq *out_irq) 28 struct of_phandle_args *out_irq)
45{ 29{
46 return -EINVAL; 30 return -EINVAL;
47} 31}
@@ -50,9 +34,9 @@ static inline int of_irq_parse_oldworld(struct device_node *device, int index,
50 34
51extern int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec, 35extern int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec,
52 u32 ointsize, const __be32 *addr, 36 u32 ointsize, const __be32 *addr,
53 struct of_irq *out_irq); 37 struct of_phandle_args *out_irq);
54extern int of_irq_parse_one(struct device_node *device, int index, 38extern int of_irq_parse_one(struct device_node *device, int index,
55 struct of_irq *out_irq); 39 struct of_phandle_args *out_irq);
56extern unsigned int irq_create_of_mapping(struct device_node *controller, 40extern unsigned int irq_create_of_mapping(struct device_node *controller,
57 const u32 *intspec, 41 const u32 *intspec,
58 unsigned int intsize); 42 unsigned int intsize);
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h
index 839ba20808fe..f297237349e8 100644
--- a/include/linux/of_pci.h
+++ b/include/linux/of_pci.h
@@ -5,8 +5,8 @@
5#include <linux/msi.h> 5#include <linux/msi.h>
6 6
7struct pci_dev; 7struct pci_dev;
8struct of_irq; 8struct of_phandle_args;
9int of_irq_parse_pci(const struct pci_dev *pdev, struct of_irq *out_irq); 9int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq);
10 10
11struct device_node; 11struct device_node;
12struct device_node *of_pci_find_child_device(struct device_node *parent, 12struct device_node *of_pci_find_child_device(struct device_node *parent,