Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fixup-wrppmc.c
Go to the documentation of this file.
1 /*
2  * fixup-wrppmc.c: PPMC board specific PCI fixup
3  *
4  * This file is subject to the terms and conditions of the GNU General Public
5  * License. See the file "COPYING" in the main directory of this archive
6  * for more details.
7  *
8  * Copyright (C) 2006, Wind River Inc. Rongkai.zhan ([email protected])
9  */
10 #include <linux/init.h>
11 #include <linux/pci.h>
12 #include <asm/gt64120.h>
13 
14 /* PCI interrupt pins */
15 #define PCI_INTA 1
16 #define PCI_INTB 2
17 #define PCI_INTC 3
18 #define PCI_INTD 4
19 
20 #define PCI_SLOT_MAXNR 32 /* Each PCI bus has 32 physical slots */
21 
22 static char pci_irq_tab[PCI_SLOT_MAXNR][5] __initdata = {
23  /* 0 INTA INTB INTC INTD */
24  [0] = {0, 0, 0, 0, 0}, /* Slot 0: GT64120 PCI bridge */
25  [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0},
26 };
27 
28 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
29 {
30  return pci_irq_tab[slot][pin];
31 }
32 
33 /* Do platform specific device initialization at pci_enable_device() time */
35 {
36  return 0;
37 }