123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- #ifdef CONFIG_PCI
- #include <linux/types.h>
- #include <linux/pci.h>
- #include <linux/kernel.h>
- #include <linux/init.h>
- #include <asm/byteorder.h>
- #include <msp_pci.h>
- #include <msp_cic_int.h>
- #define IRQ4 MSP_INT_EXT4
- #define IRQ5 MSP_INT_EXT5
- #define IRQ6 MSP_INT_EXT6
- #if defined(CONFIG_PMC_MSP7120_GW)
- static char irq_tab[][5] __initdata = {
-
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, IRQ4, IRQ4, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, IRQ5, IRQ5, 0, 0 },
- {0, IRQ6, IRQ6, 0, 0 }
- };
- #elif defined(CONFIG_PMC_MSP7120_EVAL)
- static char irq_tab[][5] __initdata = {
-
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, IRQ6, IRQ6, 0, 0 },
- {0, IRQ5, IRQ5, 0, 0 },
- {0, IRQ4, IRQ4, IRQ4, IRQ4},
- {0, IRQ5, IRQ5, IRQ5, IRQ5},
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 }
- };
- #else
- static char irq_tab[][5] __initdata = {
-
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 },
- {0, 0, 0, 0, 0 }
- };
- #endif
- int pcibios_plat_dev_init(struct pci_dev *dev)
- {
- return PCIBIOS_SUCCESSFUL;
- }
- int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
- {
- #if !defined(CONFIG_PMC_MSP7120_GW) && !defined(CONFIG_PMC_MSP7120_EVAL)
- printk(KERN_WARNING "PCI: unknown board, no PCI IRQs assigned.\n");
- #endif
- printk(KERN_WARNING "PCI: irq_tab returned %d for slot=%d pin=%d\n",
- irq_tab[slot][pin], slot, pin);
- return irq_tab[slot][pin];
- }
- #endif
|