diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-07-05 08:06:24 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-07-05 08:06:24 +0000 |
commit | 54038e054025c86eb959204ccfeb145c0586bffc (patch) | |
tree | 33d9fcd8f2209a9d9c40080c353027a61a0a93f9 /target/linux/ar71xx/files/arch/mips/ar71xx | |
parent | 1e84d049a472ee0a8c1a6b398e4d72058825c888 (diff) | |
download | master-31e0f0ae-54038e054025c86eb959204ccfeb145c0586bffc.tar.gz master-31e0f0ae-54038e054025c86eb959204ccfeb145c0586bffc.tar.bz2 master-31e0f0ae-54038e054025c86eb959204ccfeb145c0586bffc.zip |
add AR7240 specific PCI code
SVN-Revision: 16674
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ar71xx')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/pci.c | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/pci.c b/target/linux/ar71xx/files/arch/mips/ar71xx/pci.c index 7e18d8b2db..19199f15d0 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/pci.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/pci.c @@ -38,15 +38,48 @@ int pcibios_plat_dev_init(struct pci_dev *dev) int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin) { - return ar71xx_pcibios_map_irq(dev, slot, pin); + int ret = 0; + + switch (ar71xx_soc) { + case AR71XX_SOC_AR7130: + case AR71XX_SOC_AR7141: + case AR71XX_SOC_AR7161: + ret = ar71xx_pcibios_map_irq(dev, slot, pin); + break; + + case AR71XX_SOC_AR7240: + ret = ar724x_pcibios_map_irq(dev, slot, pin); + break; + + default: + break; + } + + return ret; } int __init ar71xx_pci_init(unsigned nr_irqs, struct ar71xx_pci_irq *map) { + int ret = 0; + + switch (ar71xx_soc) { + case AR71XX_SOC_AR7130: + case AR71XX_SOC_AR7141: + case AR71XX_SOC_AR7161: + board_be_handler = ar71xx_be_handler; + ret = ar71xx_pcibios_init(); + break; + + case AR71XX_SOC_AR7240: + ret = ar724x_pcibios_init(); + break; + + default: + return 0; + } + ar71xx_pci_nr_irqs = nr_irqs; ar71xx_pci_irq_map = map; - board_be_handler = ar71xx_be_handler; - - return ar71xx_pcibios_init(); + return ret; } |