3 * arch/mips/vr41xx/tanbac-tb0226/pci_fixup.c
5 * BRIEF MODULE DESCRIPTION
6 * The TANBAC TB0226 specific PCI fixups.
8 * Copyright 2002,2003 Yoichi Yuasa
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/init.h>
17 #include <linux/pci.h>
19 #include <asm/vr41xx/tb0226.h>
21 void __init pcibios_fixup_irqs(void)
23 struct pci_dev *dev = NULL;
26 while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
27 slot = PCI_SLOT(dev->devfn);
32 vr41xx_set_irq_trigger(GD82559_1_PIN,
35 vr41xx_set_irq_level(GD82559_1_PIN, LEVEL_LOW);
36 dev->irq = GD82559_1_IRQ;
39 vr41xx_set_irq_trigger(GD82559_2_PIN,
42 vr41xx_set_irq_level(GD82559_2_PIN, LEVEL_LOW);
43 dev->irq = GD82559_2_IRQ;
46 pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
49 vr41xx_set_irq_trigger(UPD720100_INTA_PIN,
52 vr41xx_set_irq_level(UPD720100_INTA_PIN,
54 dev->irq = UPD720100_INTA_IRQ;
57 vr41xx_set_irq_trigger(UPD720100_INTB_PIN,
60 vr41xx_set_irq_level(UPD720100_INTB_PIN,
62 dev->irq = UPD720100_INTB_IRQ;
65 vr41xx_set_irq_trigger(UPD720100_INTC_PIN,
68 vr41xx_set_irq_level(UPD720100_INTC_PIN,
70 dev->irq = UPD720100_INTC_IRQ;
76 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);