#include <linux/init.h>1#include <linux/kernel.h>2#include <linux/pci.h>3#include <asm/ip32/ip32_ints.h>4/*5* O2 has up to 5 PCI devices connected into the MACE bridge. The device6* map looks like this:7*8* 0 aic7xxx 09* 1 aic7xxx 110* 2 expansion slot11* 3 N/C12* 4 N/C13*/1415#define SCSI0 MACEPCI_SCSI0_IRQ16#define SCSI1 MACEPCI_SCSI1_IRQ17#define INTA0 MACEPCI_SLOT0_IRQ18#define INTA1 MACEPCI_SLOT1_IRQ19#define INTA2 MACEPCI_SLOT2_IRQ20#define INTB MACEPCI_SHARED0_IRQ21#define INTC MACEPCI_SHARED1_IRQ22#define INTD MACEPCI_SHARED2_IRQ23static char irq_tab_mace[][5] __initdata = {24/* Dummy INT#A INT#B INT#C INT#D */25{0, 0, 0, 0, 0}, /* This is placeholder row - never used */26{0, SCSI0, SCSI0, SCSI0, SCSI0},27{0, SCSI1, SCSI1, SCSI1, SCSI1},28{0, INTA0, INTB, INTC, INTD},29{0, INTA1, INTC, INTD, INTB},30{0, INTA2, INTD, INTB, INTC},31};323334/*35* Given a PCI slot number (a la PCI_SLOT(...)) and the interrupt pin of36* the device (1-4 => A-D), tell what irq to use. Note that we don't37* in theory have slots 4 and 5, and we never normally use the shared38* irqs. I suppose a device without a pin A will thank us for doing it39* right if there exists such a broken piece of crap.40*/41int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)42{43return irq_tab_mace[slot][pin];44}4546/* Do platform specific device initialization at pci_enable_device() time */47int pcibios_plat_dev_init(struct pci_dev *dev)48{49return 0;50}515253