This source file includes following definitions.
- mss2_pci_map_irq
- mss2_pci_init
- mss2_power_off
- mss2_init
1
2
3
4
5
6
7
8 #include <linux/kernel.h>
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/pci.h>
12 #include <linux/irq.h>
13 #include <asm/mach-types.h>
14 #include <asm/mach/arch.h>
15 #include <asm/mach/pci.h>
16 #include "orion5x.h"
17 #include "bridge-regs.h"
18 #include "common.h"
19
20
21
22
23
24
25
26
27 static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
28 {
29 int irq;
30
31
32
33
34 irq = orion5x_pci_map_irq(dev, slot, pin);
35 if (irq != -1)
36 return irq;
37
38 return -1;
39 }
40
41 static struct hw_pci mss2_pci __initdata = {
42 .nr_controllers = 2,
43 .setup = orion5x_pci_sys_setup,
44 .scan = orion5x_pci_sys_scan_bus,
45 .map_irq = mss2_pci_map_irq,
46 };
47
48 static int __init mss2_pci_init(void)
49 {
50 if (machine_is_mss2())
51 pci_common_init(&mss2_pci);
52
53 return 0;
54 }
55 subsys_initcall(mss2_pci_init);
56
57
58
59
60
61
62
63
64
65
66 static void mss2_power_off(void)
67 {
68 u32 reg;
69
70
71
72
73 reg = readl(RSTOUTn_MASK);
74 reg |= 1 << 2;
75 writel(reg, RSTOUTn_MASK);
76
77 reg = readl(CPU_SOFT_RESET);
78 reg |= 1;
79 writel(reg, CPU_SOFT_RESET);
80 }
81
82 void __init mss2_init(void)
83 {
84
85 pm_power_off = mss2_power_off;
86 }