2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2004 Montavista Software Inc.
7 * Author: Manish Lachwani (mlachwani@mvista.com)
9 * Looking at the schematics for the Ocelot-3 board, there are
10 * two PCI busses and each bus has two PCI slots.
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/pci.h>
15 #include <asm/mipsregs.h>
18 * Do platform specific device initialization at
19 * pci_enable_device() time
21 int pcibios_plat_dev_init(struct pci_dev *dev)
26 int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
28 int bus = dev->bus->number;
30 if (bus == 0 && slot == 1)
31 return 2; /* PCI-X A */
32 if (bus == 0 && slot == 2)
33 return 3; /* PCI-X B */
34 if (bus == 1 && slot == 1)
36 if (bus == 1 && slot == 2)
40 panic("Whooops in pcibios_map_irq");