diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 17 | ||||
-rw-r--r-- | arch/mips/pci/fixup-lantiq.c | 12 | ||||
-rw-r--r-- | arch/mips/pci/pci-rt3883.c | 22 | ||||
-rw-r--r-- | arch/x86/kernel/devicetree.c | 7 |
4 files changed, 4 insertions, 54 deletions
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index bb3aeb31a54e..a87e510fe0c4 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -835,21 +835,6 @@ static struct hw_pci pci_v3 __initdata = { | |||
835 | 835 | ||
836 | #ifdef CONFIG_OF | 836 | #ifdef CONFIG_OF |
837 | 837 | ||
838 | static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin) | ||
839 | { | ||
840 | struct of_phandle_args oirq; | ||
841 | int ret; | ||
842 | |||
843 | ret = of_irq_parse_pci(dev, &oirq); | ||
844 | if (ret) { | ||
845 | dev_err(&dev->dev, "of_irq_parse_pci() %d\n", ret); | ||
846 | /* Proper return code 0 == NO_IRQ */ | ||
847 | return 0; | ||
848 | } | ||
849 | |||
850 | return irq_create_of_mapping(&oirq); | ||
851 | } | ||
852 | |||
853 | static int __init pci_v3_dtprobe(struct platform_device *pdev, | 838 | static int __init pci_v3_dtprobe(struct platform_device *pdev, |
854 | struct device_node *np) | 839 | struct device_node *np) |
855 | { | 840 | { |
@@ -918,7 +903,7 @@ static int __init pci_v3_dtprobe(struct platform_device *pdev, | |||
918 | return -EINVAL; | 903 | return -EINVAL; |
919 | } | 904 | } |
920 | 905 | ||
921 | pci_v3.map_irq = pci_v3_map_irq_dt; | 906 | pci_v3.map_irq = of_irq_parse_and_map_pci; |
922 | pci_common_init_dev(&pdev->dev, &pci_v3); | 907 | pci_common_init_dev(&pdev->dev, &pci_v3); |
923 | 908 | ||
924 | return 0; | 909 | return 0; |
diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c index aef60e75003e..c2ce41ea61d7 100644 --- a/arch/mips/pci/fixup-lantiq.c +++ b/arch/mips/pci/fixup-lantiq.c | |||
@@ -25,15 +25,5 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
25 | 25 | ||
26 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 26 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
27 | { | 27 | { |
28 | struct of_phandle_args dev_irq; | 28 | return of_irq_parse_and_map_pci(dev, slot, pin); |
29 | int irq; | ||
30 | |||
31 | if (of_irq_parse_pci(dev, &dev_irq)) { | ||
32 | dev_err(&dev->dev, "trying to map irq for unknown slot:%d pin:%d\n", | ||
33 | slot, pin); | ||
34 | return 0; | ||
35 | } | ||
36 | irq = irq_create_of_mapping(&dev_irq); | ||
37 | dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq); | ||
38 | return irq; | ||
39 | } | 29 | } |
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index eadc4310cd36..adeff2bfe4cd 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c | |||
@@ -583,27 +583,7 @@ err_put_intc_node: | |||
583 | 583 | ||
584 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 584 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
585 | { | 585 | { |
586 | struct of_phandle_args dev_irq; | 586 | return of_irq_parse_and_map_pci(dev, slot, pin); |
587 | int err; | ||
588 | int irq; | ||
589 | |||
590 | err = of_irq_parse_pci(dev, &dev_irq); | ||
591 | if (err) { | ||
592 | pr_err("pci %s: unable to get irq map, err=%d\n", | ||
593 | pci_name((struct pci_dev *) dev), err); | ||
594 | return 0; | ||
595 | } | ||
596 | |||
597 | irq = irq_create_of_mapping(&dev_irq); | ||
598 | |||
599 | if (irq == 0) | ||
600 | pr_crit("pci %s: no irq found for pin %u\n", | ||
601 | pci_name((struct pci_dev *) dev), pin); | ||
602 | else | ||
603 | pr_info("pci %s: using irq %d for pin %u\n", | ||
604 | pci_name((struct pci_dev *) dev), irq, pin); | ||
605 | |||
606 | return irq; | ||
607 | } | 587 | } |
608 | 588 | ||
609 | int pcibios_plat_dev_init(struct pci_dev *dev) | 589 | int pcibios_plat_dev_init(struct pci_dev *dev) |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index d39948f654a0..69c826a3d07e 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -105,7 +105,6 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) | |||
105 | 105 | ||
106 | static int x86_of_pci_irq_enable(struct pci_dev *dev) | 106 | static int x86_of_pci_irq_enable(struct pci_dev *dev) |
107 | { | 107 | { |
108 | struct of_phandle_args oirq; | ||
109 | u32 virq; | 108 | u32 virq; |
110 | int ret; | 109 | int ret; |
111 | u8 pin; | 110 | u8 pin; |
@@ -116,11 +115,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev) | |||
116 | if (!pin) | 115 | if (!pin) |
117 | return 0; | 116 | return 0; |
118 | 117 | ||
119 | ret = of_irq_parse_pci(dev, &oirq); | 118 | virq = of_irq_parse_and_map_pci(dev, 0, 0); |
120 | if (ret) | ||
121 | return ret; | ||
122 | |||
123 | virq = irq_create_of_mapping(&oirq); | ||
124 | if (virq == 0) | 119 | if (virq == 0) |
125 | return -EINVAL; | 120 | return -EINVAL; |
126 | dev->irq = virq; | 121 | dev->irq = virq; |