3 * arch/mips/vr41xx/tanbac-tb0229/pci_fixup.c
5 * BRIEF MODULE DESCRIPTION
6 * The TANBAC TB0229(VR4131DIMM) specific PCI fixups.
8 * Copyright 2003 Megasolution Inc.
9 * matsu@megasolution.jp
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
16 #include <linux/config.h>
17 #include <linux/init.h>
18 #include <linux/pci.h>
20 #include <asm/vr41xx/tb0229.h>
22 void __init pcibios_fixup_irqs(void)
24 #ifdef CONFIG_TANBAC_TB0219
25 struct pci_dev *dev = NULL;
28 while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
29 slot = PCI_SLOT(dev->devfn);
34 vr41xx_set_irq_trigger(TB0219_PCI_SLOT1_PIN,
37 vr41xx_set_irq_level(TB0219_PCI_SLOT1_PIN,
39 dev->irq = TB0219_PCI_SLOT1_IRQ;
42 vr41xx_set_irq_trigger(TB0219_PCI_SLOT2_PIN,
45 vr41xx_set_irq_level(TB0219_PCI_SLOT2_PIN,
47 dev->irq = TB0219_PCI_SLOT2_IRQ;
50 vr41xx_set_irq_trigger(TB0219_PCI_SLOT3_PIN,
53 vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN,
55 dev->irq = TB0219_PCI_SLOT3_IRQ;
61 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);