X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/17c7b6c3fdc48301e50d22cc6138ede16bd1be24..a989a4bdd97f2e2a5340bfb96494d84b93027573:/target/linux/brcm47xx/files/arch/mips/bcm947xx/irq.c diff --git a/target/linux/brcm47xx/files/arch/mips/bcm947xx/irq.c b/target/linux/brcm47xx/files/arch/mips/bcm947xx/irq.c index 56d4c84b7..c6b85a959 100644 --- a/target/linux/brcm47xx/files/arch/mips/bcm947xx/irq.c +++ b/target/linux/brcm47xx/files/arch/mips/bcm947xx/irq.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * Copyright (C) 2008 Michael Buesch * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -29,12 +30,18 @@ #include #include #include +#include +#include #include #include #include #include + +extern struct ssb_bus ssb; + + void plat_irq_dispatch(void) { u32 cause; @@ -61,3 +68,19 @@ void __init arch_init_irq(void) { mips_cpu_irq_init(); } + +int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) +{ + int res; + + res = ssb_pcibios_map_irq(dev, slot, pin); + if (res < 0) { + printk(KERN_ALERT "PCI: Failed to map IRQ of device %s\n", + pci_name((struct pci_dev *)dev)); + return 0; + } + /* IRQ-0 and IRQ-1 are software interrupts. */ + WARN_ON((res == 0) || (res == 1)); + + return res; +}