This source file includes following definitions.
- wg302v2_pci_preinit
- wg302v2_map_irq
- wg302v2_pci_init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #include <linux/kernel.h>
17 #include <linux/pci.h>
18 #include <linux/init.h>
19 #include <linux/irq.h>
20
21 #include <asm/mach-types.h>
22 #include <mach/hardware.h>
23
24 #include <asm/mach/pci.h>
25
26 #include "irqs.h"
27
28 void __init wg302v2_pci_preinit(void)
29 {
30 irq_set_irq_type(IRQ_IXP4XX_GPIO8, IRQ_TYPE_LEVEL_LOW);
31 irq_set_irq_type(IRQ_IXP4XX_GPIO9, IRQ_TYPE_LEVEL_LOW);
32
33 ixp4xx_pci_preinit();
34 }
35
36 static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
37 {
38 if (slot == 1)
39 return IRQ_IXP4XX_GPIO8;
40 else if (slot == 2)
41 return IRQ_IXP4XX_GPIO9;
42 else return -1;
43 }
44
45 struct hw_pci wg302v2_pci __initdata = {
46 .nr_controllers = 1,
47 .ops = &ixp4xx_ops,
48 .preinit = wg302v2_pci_preinit,
49 .setup = ixp4xx_setup,
50 .map_irq = wg302v2_map_irq,
51 };
52
53 int __init wg302v2_pci_init(void)
54 {
55 if (machine_is_wg302v2())
56 pci_common_init(&wg302v2_pci);
57 return 0;
58 }
59
60 subsys_initcall(wg302v2_pci_init);