aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/pci/irq.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index da21b1d07c15..83458f81e661 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -227,6 +227,24 @@ static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, i
227} 227}
228 228
229/* 229/*
230 * The VIA pirq rules are nibble-based, like ALI,
231 * but without the ugly irq number munging.
232 * However, for 82C586, nibble map is different .
233 */
234static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
235{
236 static unsigned int pirqmap[4] = { 3, 2, 5, 1 };
237 return read_config_nybble(router, 0x55, pirqmap[pirq-1]);
238}
239
240static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
241{
242 static unsigned int pirqmap[4] = { 3, 2, 5, 1 };
243 write_config_nybble(router, 0x55, pirqmap[pirq-1], irq);
244 return 1;
245}
246
247/*
230 * ITE 8330G pirq rules are nibble-based 248 * ITE 8330G pirq rules are nibble-based
231 * FIXME: pirqmap may be { 1, 0, 3, 2 }, 249 * FIXME: pirqmap may be { 1, 0, 3, 2 },
232 * 2+3 are both mapped to irq 9 on my system 250 * 2+3 are both mapped to irq 9 on my system
@@ -512,6 +530,10 @@ static __init int via_router_probe(struct irq_router *r, struct pci_dev *router,
512 switch(device) 530 switch(device)
513 { 531 {
514 case PCI_DEVICE_ID_VIA_82C586_0: 532 case PCI_DEVICE_ID_VIA_82C586_0:
533 r->name = "VIA";
534 r->get = pirq_via586_get;
535 r->set = pirq_via586_set;
536 return 1;
515 case PCI_DEVICE_ID_VIA_82C596: 537 case PCI_DEVICE_ID_VIA_82C596:
516 case PCI_DEVICE_ID_VIA_82C686: 538 case PCI_DEVICE_ID_VIA_82C686:
517 case PCI_DEVICE_ID_VIA_8231: 539 case PCI_DEVICE_ID_VIA_8231: