From 12f364aa991507719ec809b00969da90f62d21fa Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 6 Nov 2006 18:05:08 +0000 Subject: [PATCH] --- yaml --- r: 40781 b: refs/heads/master c: 4e5852f31a22094a19bbc305e42651b6c92f3008 h: refs/heads/master i: 40779: 8c527c787983135cef557fe8294cd39e0e68eec0 v: v3 --- [refs] | 2 +- trunk/arch/mips/pci/Makefile | 2 +- trunk/arch/mips/pci/fixup-ev64120.c | 34 ----------------------------- trunk/arch/mips/pci/pci-ev64120.c | 21 ++++++++++++++++++ 4 files changed, 23 insertions(+), 36 deletions(-) delete mode 100644 trunk/arch/mips/pci/fixup-ev64120.c create mode 100644 trunk/arch/mips/pci/pci-ev64120.c diff --git a/[refs] b/[refs] index 2d71c8cd78fd..6ff51a9d55c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a4cf77923eeb3cec40a302656d6ab5ced04ba48 +refs/heads/master: 4e5852f31a22094a19bbc305e42651b6c92f3008 diff --git a/trunk/arch/mips/pci/Makefile b/trunk/arch/mips/pci/Makefile index 3cf0dd4ba548..70cb55b89df6 100644 --- a/trunk/arch/mips/pci/Makefile +++ b/trunk/arch/mips/pci/Makefile @@ -26,7 +26,7 @@ obj-$(CONFIG_DDB5477) += fixup-ddb5477.o pci-ddb5477.o ops-ddb5477.o obj-$(CONFIG_LASAT) += pci-lasat.o obj-$(CONFIG_MIPS_ATLAS) += fixup-atlas.o obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o -obj-$(CONFIG_MIPS_EV64120) += fixup-ev64120.o +obj-$(CONFIG_MIPS_EV64120) += pci-ev64120.o obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o diff --git a/trunk/arch/mips/pci/fixup-ev64120.c b/trunk/arch/mips/pci/fixup-ev64120.c deleted file mode 100644 index 8dbb90d63f0a..000000000000 --- a/trunk/arch/mips/pci/fixup-ev64120.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include - -int pci_range_ck(unsigned char bus, unsigned char dev) -{ - if (((bus == 0) || (bus == 1)) && (dev >= 6) && (dev <= 8)) - return 0; - - return -1; -} - -/* - * After detecting all agents over the PCI , this function is called - * in order to give an interrupt number for each PCI device starting - * from IRQ 20. It does also enables master for each device. - */ -void __devinit pcibios_fixup_bus(struct pci_bus *bus) -{ - unsigned int irq = 20; - struct pci_bus *current_bus = bus; - struct pci_dev *dev; - struct list_head *devices_link; - - list_for_each(devices_link, &(current_bus->devices)) { - dev = pci_dev_b(devices_link); - if (dev != NULL) { - dev->irq = irq++; - - /* Assign an interrupt number for the device */ - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); - pcibios_set_master(dev); - } - } -} diff --git a/trunk/arch/mips/pci/pci-ev64120.c b/trunk/arch/mips/pci/pci-ev64120.c new file mode 100644 index 000000000000..9cd859ef1842 --- /dev/null +++ b/trunk/arch/mips/pci/pci-ev64120.c @@ -0,0 +1,21 @@ +#include + +int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if (!pin) + return 0; + + irq = allocate_irqno(); + if (irq < 0) + return 0; + + return irq; +} + +/* Do platform specific device initialization at pci_enable_device() time */ +int pcibios_plat_dev_init(struct pci_dev *dev) +{ + return 0; +}