1 /* 2 * FILE NAME 3 * arch/mips/vr41xx/victor-mpc30x/pci_fixup.c 4 * 5 * BRIEF MODULE DESCRIPTION 6 * The Victor MP-C303/304 specific PCI fixups. 7 * 8 * Copyright 2002 Yoichi Yuasa 9 * yuasa@hh.iij4u.or.jp 10 * 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. 15 */ 16 #include <linux/config.h> 17 #include <linux/init.h> 18 #include <linux/pci.h> 19 20 #include <asm/vr41xx/vrc4173.h> 21 #include <asm/vr41xx/mpc30x.h> 22 pcibios_fixup_resources(struct pci_dev * dev)23void __init pcibios_fixup_resources(struct pci_dev *dev) 24 { 25 } 26 pcibios_fixup(void)27void __init pcibios_fixup(void) 28 { 29 } 30 pcibios_fixup_irqs(void)31void __init pcibios_fixup_irqs(void) 32 { 33 struct pci_dev *dev; 34 u8 slot, func; 35 36 pci_for_each_dev(dev) { 37 slot = PCI_SLOT(dev->devfn); 38 func = PCI_FUNC(dev->devfn); 39 dev->irq = 0; 40 41 switch (slot) { 42 case 12: /* NEC VRC4173 CARDU1 */ 43 dev->irq = VRC4173_PCMCIA1_IRQ; 44 break; 45 case 13: /* NEC VRC4173 CARDU2 */ 46 dev->irq = VRC4173_PCMCIA2_IRQ; 47 break; 48 case 29: /* mediaQ MQ-200 */ 49 dev->irq = MQ200_IRQ; 50 break; 51 case 30: 52 switch (func) { 53 case 0: /* NEC VRC4173 */ 54 dev->irq = VRC4173_CASCADE_IRQ; 55 break; 56 case 1: /* NEC VRC4173 AC97U */ 57 dev->irq = VRC4173_AC97_IRQ; 58 break; 59 case 2: /* NEC VRC4173 USBU */ 60 dev->irq = VRC4173_USB_IRQ; 61 break; 62 } 63 break; 64 } 65 66 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); 67 } 68 } 69 pcibios_assign_all_busses(void)70unsigned int pcibios_assign_all_busses(void) 71 { 72 return 0; 73 } 74