Commit 749e8081 authored by Roy Zang's avatar Roy Zang Committed by Kumar Gala

[POWERPC] Remove redundant pci_read_irq_line() function for 85xx platform

Remove redundant pci_read_irq_line() function for 85xx CDS board.
This function has been realized in common ppc pci code.
Signed-off-by: default avatarRoy Zang <tie-fei.zang@freescale.com>
Acked-by: default avatarAndy Fleming <afleming@freescale.com>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 80a7cc6c
...@@ -69,13 +69,12 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, ...@@ -69,13 +69,12 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
} }
static void __init mpc85xx_cds_pcibios_fixup(void) static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
{ {
struct pci_dev *dev;
u_char c; u_char c;
if (dev->vendor == PCI_VENDOR_ID_VIA) {
if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, switch (dev->device) {
PCI_DEVICE_ID_VIA_82C586_1, NULL))) { case PCI_DEVICE_ID_VIA_82C586_1:
/* /*
* U-Boot does not set the enable bits * U-Boot does not set the enable bits
* for the IDE device. Force them on here. * for the IDE device. Force them on here.
...@@ -91,30 +90,23 @@ static void __init mpc85xx_cds_pcibios_fixup(void) ...@@ -91,30 +90,23 @@ static void __init mpc85xx_cds_pcibios_fixup(void)
*/ */
dev->irq = 14; dev->irq = 14;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
pci_dev_put(dev); break;
}
/* /*
* Force legacy USB interrupt routing * Force legacy USB interrupt routing
*/ */
if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, case PCI_DEVICE_ID_VIA_82C586_2:
PCI_DEVICE_ID_VIA_82C586_2, NULL))) { /* There are two USB controllers.
* Identify them by functon number
*/
if (PCI_FUNC(dev->devfn))
dev->irq = 11;
else
dev->irq = 10; dev->irq = 10;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
pci_dev_put(dev); default:
break;
} }
if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_82C586_2, dev))) {
dev->irq = 11;
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
pci_dev_put(dev);
} }
/* Now map all the PCI irqs */
dev = NULL;
for_each_pci_dev(dev)
pci_read_irq_line(dev);
} }
#ifdef CONFIG_PPC_I8259 #ifdef CONFIG_PPC_I8259
...@@ -229,7 +221,7 @@ static void __init mpc85xx_cds_setup_arch(void) ...@@ -229,7 +221,7 @@ static void __init mpc85xx_cds_setup_arch(void)
for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
mpc85xx_add_bridge(np); mpc85xx_add_bridge(np);
ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
ppc_md.pci_exclude_device = mpc85xx_exclude_device; ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment