|
@@ -408,3 +408,114 @@ monet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
|
static char irq_tab[13][5] __initdata = {
|
|
|
/*INT INTA INTB INTC INTD */
|
|
|
{ 45, 45, 45, 45, 45}, /* IdSel 3 21143 PCI1 */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 4 unused */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 5 unused */
|
|
|
+ { 47, 47, 47, 47, 47}, /* IdSel 6 SCSI PCI1 */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 7 ISA Bridge */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 8 P2P PCI1 */
|
|
|
+#if 1
|
|
|
+ { 28, 28, 29, 30, 31}, /* IdSel 14 slot 4 PCI2*/
|
|
|
+ { 24, 24, 25, 26, 27}, /* IdSel 15 slot 5 PCI2*/
|
|
|
+#else
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 9 unused */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 10 unused */
|
|
|
+#endif
|
|
|
+ { 40, 40, 41, 42, 43}, /* IdSel 11 slot 1 PCI0*/
|
|
|
+ { 36, 36, 37, 38, 39}, /* IdSel 12 slot 2 PCI0*/
|
|
|
+ { 32, 32, 33, 34, 35}, /* IdSel 13 slot 3 PCI0*/
|
|
|
+ { 28, 28, 29, 30, 31}, /* IdSel 14 slot 4 PCI2*/
|
|
|
+ { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/
|
|
|
+ };
|
|
|
+ const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5;
|
|
|
+
|
|
|
+ return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP);
|
|
|
+}
|
|
|
+
|
|
|
+static u8 __init
|
|
|
+monet_swizzle(struct pci_dev *dev, u8 *pinp)
|
|
|
+{
|
|
|
+ struct pci_controller *hose = dev->sysdata;
|
|
|
+ int slot, pin = *pinp;
|
|
|
+
|
|
|
+ if (!dev->bus->parent) {
|
|
|
+ slot = PCI_SLOT(dev->devfn);
|
|
|
+ }
|
|
|
+ /* Check for the built-in bridge on hose 1. */
|
|
|
+ else if (hose->index == 1 && PCI_SLOT(dev->bus->self->devfn) == 8) {
|
|
|
+ slot = PCI_SLOT(dev->devfn);
|
|
|
+ } else {
|
|
|
+ /* Must be a card-based bridge. */
|
|
|
+ do {
|
|
|
+ /* Check for built-in bridge on hose 1. */
|
|
|
+ if (hose->index == 1 &&
|
|
|
+ PCI_SLOT(dev->bus->self->devfn) == 8) {
|
|
|
+ slot = PCI_SLOT(dev->devfn);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ pin = pci_swizzle_interrupt_pin(dev, pin);
|
|
|
+
|
|
|
+ /* Move up the chain of bridges. */
|
|
|
+ dev = dev->bus->self;
|
|
|
+ /* Slot of the next bridge. */
|
|
|
+ slot = PCI_SLOT(dev->devfn);
|
|
|
+ } while (dev->bus->self);
|
|
|
+ }
|
|
|
+ *pinp = pin;
|
|
|
+ return slot;
|
|
|
+}
|
|
|
+
|
|
|
+static int __init
|
|
|
+webbrick_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
|
+{
|
|
|
+ static char irq_tab[13][5] __initdata = {
|
|
|
+ /*INT INTA INTB INTC INTD */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 7 ISA Bridge */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 8 unused */
|
|
|
+ { 29, 29, 29, 29, 29}, /* IdSel 9 21143 #1 */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 10 unused */
|
|
|
+ { 30, 30, 30, 30, 30}, /* IdSel 11 21143 #2 */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 12 unused */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 13 unused */
|
|
|
+ { 35, 35, 34, 33, 32}, /* IdSel 14 slot 0 */
|
|
|
+ { 39, 39, 38, 37, 36}, /* IdSel 15 slot 1 */
|
|
|
+ { 43, 43, 42, 41, 40}, /* IdSel 16 slot 2 */
|
|
|
+ { 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */
|
|
|
+ };
|
|
|
+ const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5;
|
|
|
+
|
|
|
+ return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP);
|
|
|
+}
|
|
|
+
|
|
|
+static int __init
|
|
|
+clipper_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
|
+{
|
|
|
+ static char irq_tab[7][5] __initdata = {
|
|
|
+ /*INT INTA INTB INTC INTD */
|
|
|
+ { 16+ 8, 16+ 8, 16+ 9, 16+10, 16+11}, /* IdSel 1 slot 1 */
|
|
|
+ { 16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 2 slot 2 */
|
|
|
+ { 16+16, 16+16, 16+17, 16+18, 16+19}, /* IdSel 3 slot 3 */
|
|
|
+ { 16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 4 slot 4 */
|
|
|
+ { 16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 5 slot 5 */
|
|
|
+ { 16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 6 slot 6 */
|
|
|
+ { -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */
|
|
|
+ };
|
|
|
+ const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5;
|
|
|
+ struct pci_controller *hose = dev->sysdata;
|
|
|
+ int irq = COMMON_TABLE_LOOKUP;
|
|
|
+
|
|
|
+ if (irq > 0)
|
|
|
+ irq += 16 * hose->index;
|
|
|
+
|
|
|
+ return isa_irq_fixup(dev, irq);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init
|
|
|
+dp264_init_pci(void)
|
|
|
+{
|
|
|
+ common_init_pci();
|
|
|
+ SMC669_Init(0);
|
|
|
+ locate_and_init_vga(NULL);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init
|
|
|
+monet_init_pci(void)
|