diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 01:59:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 01:59:39 -0400 |
commit | 184475029a724b6b900d88fc3a5f462a6107d5af (patch) | |
tree | 408320b46df221a2424bf94282b1b8e5b7aff7a1 /arch/powerpc/platforms/85xx | |
parent | 3b76eefe0f970c2e19f165d4a1650abc523d10bc (diff) | |
parent | f1f4ee01c0d3dce0e3aa7d04e4332677db7af478 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (99 commits)
drivers/virt: add missing linux/interrupt.h to fsl_hypervisor.c
powerpc/85xx: fix mpic configuration in CAMP mode
powerpc: Copy back TIF flags on return from softirq stack
powerpc/64: Make server perfmon only built on ppc64 server devices
powerpc/pseries: Fix hvc_vio.c build due to recent changes
powerpc: Exporting boot_cpuid_phys
powerpc: Add CFAR to oops output
hvc_console: Add kdb support
powerpc/pseries: Fix hvterm_raw_get_chars to accept < 16 chars, fixing xmon
powerpc/irq: Quieten irq mapping printks
powerpc: Enable lockup and hung task detectors in pseries and ppc64 defeconfigs
powerpc: Add mpt2sas driver to pseries and ppc64 defconfig
powerpc: Disable IRQs off tracer in ppc64 defconfig
powerpc: Sync pseries and ppc64 defconfigs
powerpc/pseries/hvconsole: Fix dropped console output
hvc_console: Improve tty/console put_chars handling
powerpc/kdump: Fix timeout in crash_kexec_wait_realmode
powerpc/mm: Fix output of total_ram.
powerpc/cpufreq: Add cpufreq driver for Momentum Maple boards
powerpc: Correct annotations of pmu registration functions
...
Fix up trivial Kconfig/Makefile conflicts in arch/powerpc, drivers, and
drivers/cpufreq
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r-- | arch/powerpc/platforms/85xx/Kconfig | 31 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/corenet_ds.c | 41 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p1010rdb.c | 122 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p1022_ds.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p1023_rds.c | 162 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p2040_rdb.c | 88 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p3041_ds.c | 28 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p4080_ds.c | 38 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p5020_ds.c | 32 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/smp.c | 30 |
13 files changed, 552 insertions, 49 deletions
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index b6976e1726e4..498534cd5265 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -67,6 +67,16 @@ config MPC85xx_RDB | |||
67 | help | 67 | help |
68 | This option enables support for the MPC85xx RDB (P2020 RDB) board | 68 | This option enables support for the MPC85xx RDB (P2020 RDB) board |
69 | 69 | ||
70 | config P1010_RDB | ||
71 | bool "Freescale P1010RDB" | ||
72 | select DEFAULT_UIMAGE | ||
73 | help | ||
74 | This option enables support for the MPC85xx RDB (P1010 RDB) board | ||
75 | |||
76 | P1010RDB contains P1010Si, which provides CPU performance up to 800 | ||
77 | MHz and 1600 DMIPS, additional functionality and faster interfaces | ||
78 | (DDR3/3L, SATA II, and PCI Express). | ||
79 | |||
70 | config P1022_DS | 80 | config P1022_DS |
71 | bool "Freescale P1022 DS" | 81 | bool "Freescale P1022 DS" |
72 | select DEFAULT_UIMAGE | 82 | select DEFAULT_UIMAGE |
@@ -75,6 +85,12 @@ config P1022_DS | |||
75 | help | 85 | help |
76 | This option enables support for the Freescale P1022DS reference board. | 86 | This option enables support for the Freescale P1022DS reference board. |
77 | 87 | ||
88 | config P1023_RDS | ||
89 | bool "Freescale P1023 RDS" | ||
90 | select DEFAULT_UIMAGE | ||
91 | help | ||
92 | This option enables support for the P1023 RDS board | ||
93 | |||
78 | config SOCRATES | 94 | config SOCRATES |
79 | bool "Socrates" | 95 | bool "Socrates" |
80 | select DEFAULT_UIMAGE | 96 | select DEFAULT_UIMAGE |
@@ -155,6 +171,18 @@ config SBC8560 | |||
155 | help | 171 | help |
156 | This option enables support for the Wind River SBC8560 board | 172 | This option enables support for the Wind River SBC8560 board |
157 | 173 | ||
174 | config P2040_RDB | ||
175 | bool "Freescale P2040 RDB" | ||
176 | select DEFAULT_UIMAGE | ||
177 | select PPC_E500MC | ||
178 | select PHYS_64BIT | ||
179 | select SWIOTLB | ||
180 | select MPC8xxx_GPIO | ||
181 | select HAS_RAPIDIO | ||
182 | select PPC_EPAPR_HV_PIC | ||
183 | help | ||
184 | This option enables support for the P2040 RDB board | ||
185 | |||
158 | config P3041_DS | 186 | config P3041_DS |
159 | bool "Freescale P3041 DS" | 187 | bool "Freescale P3041 DS" |
160 | select DEFAULT_UIMAGE | 188 | select DEFAULT_UIMAGE |
@@ -163,6 +191,7 @@ config P3041_DS | |||
163 | select SWIOTLB | 191 | select SWIOTLB |
164 | select MPC8xxx_GPIO | 192 | select MPC8xxx_GPIO |
165 | select HAS_RAPIDIO | 193 | select HAS_RAPIDIO |
194 | select PPC_EPAPR_HV_PIC | ||
166 | help | 195 | help |
167 | This option enables support for the P3041 DS board | 196 | This option enables support for the P3041 DS board |
168 | 197 | ||
@@ -174,6 +203,7 @@ config P4080_DS | |||
174 | select SWIOTLB | 203 | select SWIOTLB |
175 | select MPC8xxx_GPIO | 204 | select MPC8xxx_GPIO |
176 | select HAS_RAPIDIO | 205 | select HAS_RAPIDIO |
206 | select PPC_EPAPR_HV_PIC | ||
177 | help | 207 | help |
178 | This option enables support for the P4080 DS board | 208 | This option enables support for the P4080 DS board |
179 | 209 | ||
@@ -188,6 +218,7 @@ config P5020_DS | |||
188 | select SWIOTLB | 218 | select SWIOTLB |
189 | select MPC8xxx_GPIO | 219 | select MPC8xxx_GPIO |
190 | select HAS_RAPIDIO | 220 | select HAS_RAPIDIO |
221 | select PPC_EPAPR_HV_PIC | ||
191 | help | 222 | help |
192 | This option enables support for the P5020 DS board | 223 | This option enables support for the P5020 DS board |
193 | 224 | ||
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index dd70db77d63e..a971b32c5c0a 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -10,7 +10,10 @@ obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o | |||
10 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o | 10 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o |
11 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o | 11 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o |
12 | obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o | 12 | obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o |
13 | obj-$(CONFIG_P1010_RDB) += p1010rdb.o | ||
13 | obj-$(CONFIG_P1022_DS) += p1022_ds.o | 14 | obj-$(CONFIG_P1022_DS) += p1022_ds.o |
15 | obj-$(CONFIG_P1023_RDS) += p1023_rds.o | ||
16 | obj-$(CONFIG_P2040_RDB) += p2040_rdb.o corenet_ds.o | ||
14 | obj-$(CONFIG_P3041_DS) += p3041_ds.o corenet_ds.o | 17 | obj-$(CONFIG_P3041_DS) += p3041_ds.o corenet_ds.o |
15 | obj-$(CONFIG_P4080_DS) += p4080_ds.o corenet_ds.o | 18 | obj-$(CONFIG_P4080_DS) += p4080_ds.o corenet_ds.o |
16 | obj-$(CONFIG_P5020_DS) += p5020_ds.o corenet_ds.o | 19 | obj-$(CONFIG_P5020_DS) += p5020_ds.o corenet_ds.o |
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c index 2ab338c9ac37..802ad110b757 100644 --- a/arch/powerpc/platforms/85xx/corenet_ds.c +++ b/arch/powerpc/platforms/85xx/corenet_ds.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | 4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) |
5 | * | 5 | * |
6 | * Copyright 2009 Freescale Semiconductor Inc. | 6 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/machdep.h> | 23 | #include <asm/machdep.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | #include <asm/ppc-pci.h> | ||
25 | #include <mm/mmu_decl.h> | 26 | #include <mm/mmu_decl.h> |
26 | #include <asm/prom.h> | 27 | #include <asm/prom.h> |
27 | #include <asm/udbg.h> | 28 | #include <asm/udbg.h> |
@@ -61,10 +62,6 @@ void __init corenet_ds_pic_init(void) | |||
61 | mpic_init(mpic); | 62 | mpic_init(mpic); |
62 | } | 63 | } |
63 | 64 | ||
64 | #ifdef CONFIG_PCI | ||
65 | static int primary_phb_addr; | ||
66 | #endif | ||
67 | |||
68 | /* | 65 | /* |
69 | * Setup the architecture | 66 | * Setup the architecture |
70 | */ | 67 | */ |
@@ -85,18 +82,19 @@ void __init corenet_ds_setup_arch(void) | |||
85 | #endif | 82 | #endif |
86 | 83 | ||
87 | #ifdef CONFIG_PCI | 84 | #ifdef CONFIG_PCI |
88 | for_each_compatible_node(np, "pci", "fsl,p4080-pcie") { | 85 | for_each_node_by_type(np, "pci") { |
89 | struct resource rsrc; | 86 | if (of_device_is_compatible(np, "fsl,p4080-pcie") || |
90 | of_address_to_resource(np, 0, &rsrc); | 87 | of_device_is_compatible(np, "fsl,qoriq-pcie-v2.2")) { |
91 | if ((rsrc.start & 0xfffff) == primary_phb_addr) | ||
92 | fsl_add_bridge(np, 1); | ||
93 | else | ||
94 | fsl_add_bridge(np, 0); | 88 | fsl_add_bridge(np, 0); |
95 | 89 | hose = pci_find_hose_for_OF_device(np); | |
96 | hose = pci_find_hose_for_OF_device(np); | 90 | max = min(max, hose->dma_window_base_cur + |
97 | max = min(max, hose->dma_window_base_cur + | 91 | hose->dma_window_size); |
98 | hose->dma_window_size); | 92 | } |
99 | } | 93 | } |
94 | |||
95 | #ifdef CONFIG_PPC64 | ||
96 | pci_devs_phb_init(); | ||
97 | #endif | ||
100 | #endif | 98 | #endif |
101 | 99 | ||
102 | #ifdef CONFIG_SWIOTLB | 100 | #ifdef CONFIG_SWIOTLB |
@@ -116,6 +114,19 @@ static const struct of_device_id of_device_ids[] __devinitconst = { | |||
116 | { | 114 | { |
117 | .compatible = "fsl,rapidio-delta", | 115 | .compatible = "fsl,rapidio-delta", |
118 | }, | 116 | }, |
117 | { | ||
118 | .compatible = "fsl,p4080-pcie", | ||
119 | }, | ||
120 | { | ||
121 | .compatible = "fsl,qoriq-pcie-v2.2", | ||
122 | }, | ||
123 | /* The following two are for the Freescale hypervisor */ | ||
124 | { | ||
125 | .name = "hypervisor", | ||
126 | }, | ||
127 | { | ||
128 | .name = "handles", | ||
129 | }, | ||
119 | {} | 130 | {} |
120 | }; | 131 | }; |
121 | 132 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index c7b97f70312e..1b9a8cf1873a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -83,7 +83,8 @@ void __init mpc85xx_ds_pic_init(void) | |||
83 | if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) { | 83 | if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) { |
84 | mpic = mpic_alloc(np, r.start, | 84 | mpic = mpic_alloc(np, r.start, |
85 | MPIC_PRIMARY | | 85 | MPIC_PRIMARY | |
86 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, | 86 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS | |
87 | MPIC_SINGLE_DEST_CPU, | ||
87 | 0, 256, " OpenPIC "); | 88 | 0, 256, " OpenPIC "); |
88 | } else { | 89 | } else { |
89 | mpic = mpic_alloc(np, r.start, | 90 | mpic = mpic_alloc(np, r.start, |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 088f30b0c088..f5ff9110c97e 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c | |||
@@ -58,10 +58,11 @@ void __init mpc85xx_rdb_pic_init(void) | |||
58 | return; | 58 | return; |
59 | } | 59 | } |
60 | 60 | ||
61 | if (of_flat_dt_is_compatible(root, "fsl,85XXRDB-CAMP")) { | 61 | if (of_flat_dt_is_compatible(root, "fsl,MPC85XXRDB-CAMP")) { |
62 | mpic = mpic_alloc(np, r.start, | 62 | mpic = mpic_alloc(np, r.start, |
63 | MPIC_PRIMARY | | 63 | MPIC_PRIMARY | |
64 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, | 64 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS | |
65 | MPIC_SINGLE_DEST_CPU, | ||
65 | 0, 256, " OpenPIC "); | 66 | 0, 256, " OpenPIC "); |
66 | } else { | 67 | } else { |
67 | mpic = mpic_alloc(np, r.start, | 68 | mpic = mpic_alloc(np, r.start, |
diff --git a/arch/powerpc/platforms/85xx/p1010rdb.c b/arch/powerpc/platforms/85xx/p1010rdb.c new file mode 100644 index 000000000000..d7387fa7f534 --- /dev/null +++ b/arch/powerpc/platforms/85xx/p1010rdb.c | |||
@@ -0,0 +1,122 @@ | |||
1 | /* | ||
2 | * P1010RDB Board Setup | ||
3 | * | ||
4 | * Copyright 2011 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/stddef.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/delay.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | #include <asm/system.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/machdep.h> | ||
22 | #include <asm/pci-bridge.h> | ||
23 | #include <mm/mmu_decl.h> | ||
24 | #include <asm/prom.h> | ||
25 | #include <asm/udbg.h> | ||
26 | #include <asm/mpic.h> | ||
27 | |||
28 | #include <sysdev/fsl_soc.h> | ||
29 | #include <sysdev/fsl_pci.h> | ||
30 | |||
31 | void __init p1010_rdb_pic_init(void) | ||
32 | { | ||
33 | struct mpic *mpic; | ||
34 | struct resource r; | ||
35 | struct device_node *np; | ||
36 | |||
37 | np = of_find_node_by_type(NULL, "open-pic"); | ||
38 | if (np == NULL) { | ||
39 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | if (of_address_to_resource(np, 0, &r)) { | ||
44 | printk(KERN_ERR "Failed to map mpic register space\n"); | ||
45 | of_node_put(np); | ||
46 | return; | ||
47 | } | ||
48 | |||
49 | mpic = mpic_alloc(np, r.start, MPIC_PRIMARY | MPIC_WANTS_RESET | | ||
50 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU, | ||
51 | 0, 256, " OpenPIC "); | ||
52 | |||
53 | BUG_ON(mpic == NULL); | ||
54 | of_node_put(np); | ||
55 | |||
56 | mpic_init(mpic); | ||
57 | |||
58 | } | ||
59 | |||
60 | |||
61 | /* | ||
62 | * Setup the architecture | ||
63 | */ | ||
64 | static void __init p1010_rdb_setup_arch(void) | ||
65 | { | ||
66 | #ifdef CONFIG_PCI | ||
67 | struct device_node *np; | ||
68 | #endif | ||
69 | |||
70 | if (ppc_md.progress) | ||
71 | ppc_md.progress("p1010_rdb_setup_arch()", 0); | ||
72 | |||
73 | #ifdef CONFIG_PCI | ||
74 | for_each_node_by_type(np, "pci") { | ||
75 | if (of_device_is_compatible(np, "fsl,p1010-pcie")) | ||
76 | fsl_add_bridge(np, 0); | ||
77 | } | ||
78 | |||
79 | #endif | ||
80 | |||
81 | printk(KERN_INFO "P1010 RDB board from Freescale Semiconductor\n"); | ||
82 | } | ||
83 | |||
84 | static struct of_device_id __initdata p1010rdb_ids[] = { | ||
85 | { .type = "soc", }, | ||
86 | { .compatible = "soc", }, | ||
87 | { .compatible = "simple-bus", }, | ||
88 | {}, | ||
89 | }; | ||
90 | |||
91 | static int __init p1010rdb_publish_devices(void) | ||
92 | { | ||
93 | return of_platform_bus_probe(NULL, p1010rdb_ids, NULL); | ||
94 | } | ||
95 | machine_device_initcall(p1010_rdb, p1010rdb_publish_devices); | ||
96 | machine_arch_initcall(p1010_rdb, swiotlb_setup_bus_notifier); | ||
97 | |||
98 | /* | ||
99 | * Called very early, device-tree isn't unflattened | ||
100 | */ | ||
101 | static int __init p1010_rdb_probe(void) | ||
102 | { | ||
103 | unsigned long root = of_get_flat_dt_root(); | ||
104 | |||
105 | if (of_flat_dt_is_compatible(root, "fsl,P1010RDB")) | ||
106 | return 1; | ||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | define_machine(p1010_rdb) { | ||
111 | .name = "P1010 RDB", | ||
112 | .probe = p1010_rdb_probe, | ||
113 | .setup_arch = p1010_rdb_setup_arch, | ||
114 | .init_IRQ = p1010_rdb_pic_init, | ||
115 | #ifdef CONFIG_PCI | ||
116 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
117 | #endif | ||
118 | .get_irq = mpic_get_irq, | ||
119 | .restart = fsl_rstcr_restart, | ||
120 | .calibrate_decr = generic_calibrate_decr, | ||
121 | .progress = udbg_progress, | ||
122 | }; | ||
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index 7eb5c40c069f..266b3aadfe5e 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c | |||
@@ -129,6 +129,7 @@ static void p1022ds_set_gamma_table(int monitor_port, char *gamma_table_base) | |||
129 | static void p1022ds_set_monitor_port(int monitor_port) | 129 | static void p1022ds_set_monitor_port(int monitor_port) |
130 | { | 130 | { |
131 | struct device_node *pixis_node; | 131 | struct device_node *pixis_node; |
132 | void __iomem *pixis; | ||
132 | u8 __iomem *brdcfg1; | 133 | u8 __iomem *brdcfg1; |
133 | 134 | ||
134 | pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis"); | 135 | pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis"); |
@@ -137,12 +138,12 @@ static void p1022ds_set_monitor_port(int monitor_port) | |||
137 | return; | 138 | return; |
138 | } | 139 | } |
139 | 140 | ||
140 | brdcfg1 = of_iomap(pixis_node, 0); | 141 | pixis = of_iomap(pixis_node, 0); |
141 | if (!brdcfg1) { | 142 | if (!pixis) { |
142 | pr_err("p1022ds: could not map ngPIXIS registers\n"); | 143 | pr_err("p1022ds: could not map ngPIXIS registers\n"); |
143 | return; | 144 | return; |
144 | } | 145 | } |
145 | brdcfg1 += 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */ | 146 | brdcfg1 = pixis + 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */ |
146 | 147 | ||
147 | switch (monitor_port) { | 148 | switch (monitor_port) { |
148 | case 0: /* DVI */ | 149 | case 0: /* DVI */ |
@@ -158,6 +159,8 @@ static void p1022ds_set_monitor_port(int monitor_port) | |||
158 | default: | 159 | default: |
159 | pr_err("p1022ds: unsupported monitor port %i\n", monitor_port); | 160 | pr_err("p1022ds: unsupported monitor port %i\n", monitor_port); |
160 | } | 161 | } |
162 | |||
163 | iounmap(pixis); | ||
161 | } | 164 | } |
162 | 165 | ||
163 | /** | 166 | /** |
@@ -192,8 +195,13 @@ void p1022ds_set_pixel_clock(unsigned int pixclock) | |||
192 | do_div(temp, pixclock); | 195 | do_div(temp, pixclock); |
193 | freq = temp; | 196 | freq = temp; |
194 | 197 | ||
195 | /* pixclk is the ratio of the platform clock to the pixel clock */ | 198 | /* |
199 | * 'pxclk' is the ratio of the platform clock to the pixel clock. | ||
200 | * This number is programmed into the CLKDVDR register, and the valid | ||
201 | * range of values is 2-255. | ||
202 | */ | ||
196 | pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); | 203 | pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); |
204 | pxclk = clamp_t(u32, pxclk, 2, 255); | ||
197 | 205 | ||
198 | /* Disable the pixel clock, and set it to non-inverted and no delay */ | 206 | /* Disable the pixel clock, and set it to non-inverted and no delay */ |
199 | clrbits32(&guts->clkdvdr, | 207 | clrbits32(&guts->clkdvdr, |
@@ -201,6 +209,8 @@ void p1022ds_set_pixel_clock(unsigned int pixclock) | |||
201 | 209 | ||
202 | /* Enable the clock and set the pxclk */ | 210 | /* Enable the clock and set the pxclk */ |
203 | setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16)); | 211 | setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16)); |
212 | |||
213 | iounmap(guts); | ||
204 | } | 214 | } |
205 | 215 | ||
206 | /** | 216 | /** |
diff --git a/arch/powerpc/platforms/85xx/p1023_rds.c b/arch/powerpc/platforms/85xx/p1023_rds.c new file mode 100644 index 000000000000..835e0b335bfa --- /dev/null +++ b/arch/powerpc/platforms/85xx/p1023_rds.c | |||
@@ -0,0 +1,162 @@ | |||
1 | /* | ||
2 | * Copyright 2010-2011 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * Author: Roy Zang <tie-fei.zang@freescale.com> | ||
5 | * | ||
6 | * Description: | ||
7 | * P1023 RDS Board Setup | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/errno.h> | ||
18 | #include <linux/pci.h> | ||
19 | #include <linux/delay.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <linux/fsl_devices.h> | ||
22 | #include <linux/of_platform.h> | ||
23 | #include <linux/of_device.h> | ||
24 | |||
25 | #include <asm/system.h> | ||
26 | #include <asm/time.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/pci-bridge.h> | ||
29 | #include <mm/mmu_decl.h> | ||
30 | #include <asm/prom.h> | ||
31 | #include <asm/udbg.h> | ||
32 | #include <asm/mpic.h> | ||
33 | |||
34 | #include <sysdev/fsl_soc.h> | ||
35 | #include <sysdev/fsl_pci.h> | ||
36 | |||
37 | /* ************************************************************************ | ||
38 | * | ||
39 | * Setup the architecture | ||
40 | * | ||
41 | */ | ||
42 | #ifdef CONFIG_SMP | ||
43 | void __init mpc85xx_smp_init(void); | ||
44 | #endif | ||
45 | |||
46 | static void __init mpc85xx_rds_setup_arch(void) | ||
47 | { | ||
48 | struct device_node *np; | ||
49 | |||
50 | if (ppc_md.progress) | ||
51 | ppc_md.progress("p1023_rds_setup_arch()", 0); | ||
52 | |||
53 | /* Map BCSR area */ | ||
54 | np = of_find_node_by_name(NULL, "bcsr"); | ||
55 | if (np != NULL) { | ||
56 | static u8 __iomem *bcsr_regs; | ||
57 | |||
58 | bcsr_regs = of_iomap(np, 0); | ||
59 | of_node_put(np); | ||
60 | |||
61 | if (!bcsr_regs) { | ||
62 | printk(KERN_ERR | ||
63 | "BCSR: Failed to map bcsr register space\n"); | ||
64 | return; | ||
65 | } else { | ||
66 | #define BCSR15_I2C_BUS0_SEG_CLR 0x07 | ||
67 | #define BCSR15_I2C_BUS0_SEG2 0x02 | ||
68 | /* | ||
69 | * Note: Accessing exclusively i2c devices. | ||
70 | * | ||
71 | * The i2c controller selects initially ID EEPROM in the u-boot; | ||
72 | * but if menu configuration selects RTC support in the kernel, | ||
73 | * the i2c controller switches to select RTC chip in the kernel. | ||
74 | */ | ||
75 | #ifdef CONFIG_RTC_CLASS | ||
76 | /* Enable RTC chip on the segment #2 of i2c */ | ||
77 | clrbits8(&bcsr_regs[15], BCSR15_I2C_BUS0_SEG_CLR); | ||
78 | setbits8(&bcsr_regs[15], BCSR15_I2C_BUS0_SEG2); | ||
79 | #endif | ||
80 | |||
81 | iounmap(bcsr_regs); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | #ifdef CONFIG_PCI | ||
86 | for_each_compatible_node(np, "pci", "fsl,p1023-pcie") | ||
87 | fsl_add_bridge(np, 0); | ||
88 | #endif | ||
89 | |||
90 | #ifdef CONFIG_SMP | ||
91 | mpc85xx_smp_init(); | ||
92 | #endif | ||
93 | } | ||
94 | |||
95 | static struct of_device_id p1023_ids[] = { | ||
96 | { .type = "soc", }, | ||
97 | { .compatible = "soc", }, | ||
98 | { .compatible = "simple-bus", }, | ||
99 | {}, | ||
100 | }; | ||
101 | |||
102 | |||
103 | static int __init p1023_publish_devices(void) | ||
104 | { | ||
105 | of_platform_bus_probe(NULL, p1023_ids, NULL); | ||
106 | |||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | machine_device_initcall(p1023_rds, p1023_publish_devices); | ||
111 | |||
112 | static void __init mpc85xx_rds_pic_init(void) | ||
113 | { | ||
114 | struct mpic *mpic; | ||
115 | struct resource r; | ||
116 | struct device_node *np = NULL; | ||
117 | |||
118 | np = of_find_node_by_type(NULL, "open-pic"); | ||
119 | if (!np) { | ||
120 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
121 | return; | ||
122 | } | ||
123 | |||
124 | if (of_address_to_resource(np, 0, &r)) { | ||
125 | printk(KERN_ERR "Failed to map mpic register space\n"); | ||
126 | of_node_put(np); | ||
127 | return; | ||
128 | } | ||
129 | |||
130 | mpic = mpic_alloc(np, r.start, | ||
131 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN | | ||
132 | MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU, | ||
133 | 0, 256, " OpenPIC "); | ||
134 | |||
135 | BUG_ON(mpic == NULL); | ||
136 | of_node_put(np); | ||
137 | |||
138 | mpic_init(mpic); | ||
139 | } | ||
140 | |||
141 | static int __init p1023_rds_probe(void) | ||
142 | { | ||
143 | unsigned long root = of_get_flat_dt_root(); | ||
144 | |||
145 | return of_flat_dt_is_compatible(root, "fsl,P1023RDS"); | ||
146 | |||
147 | } | ||
148 | |||
149 | define_machine(p1023_rds) { | ||
150 | .name = "P1023 RDS", | ||
151 | .probe = p1023_rds_probe, | ||
152 | .setup_arch = mpc85xx_rds_setup_arch, | ||
153 | .init_IRQ = mpc85xx_rds_pic_init, | ||
154 | .get_irq = mpic_get_irq, | ||
155 | .restart = fsl_rstcr_restart, | ||
156 | .calibrate_decr = generic_calibrate_decr, | ||
157 | .progress = udbg_progress, | ||
158 | #ifdef CONFIG_PCI | ||
159 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
160 | #endif | ||
161 | }; | ||
162 | |||
diff --git a/arch/powerpc/platforms/85xx/p2040_rdb.c b/arch/powerpc/platforms/85xx/p2040_rdb.c new file mode 100644 index 000000000000..32b56ac73dfb --- /dev/null +++ b/arch/powerpc/platforms/85xx/p2040_rdb.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * P2040 RDB Setup | ||
3 | * | ||
4 | * Copyright 2011 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/pci.h> | ||
14 | #include <linux/kdev_t.h> | ||
15 | #include <linux/delay.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/phy.h> | ||
18 | |||
19 | #include <asm/system.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/machdep.h> | ||
22 | #include <asm/pci-bridge.h> | ||
23 | #include <mm/mmu_decl.h> | ||
24 | #include <asm/prom.h> | ||
25 | #include <asm/udbg.h> | ||
26 | #include <asm/mpic.h> | ||
27 | |||
28 | #include <linux/of_platform.h> | ||
29 | #include <sysdev/fsl_soc.h> | ||
30 | #include <sysdev/fsl_pci.h> | ||
31 | #include <asm/ehv_pic.h> | ||
32 | |||
33 | #include "corenet_ds.h" | ||
34 | |||
35 | /* | ||
36 | * Called very early, device-tree isn't unflattened | ||
37 | */ | ||
38 | static int __init p2040_rdb_probe(void) | ||
39 | { | ||
40 | unsigned long root = of_get_flat_dt_root(); | ||
41 | #ifdef CONFIG_SMP | ||
42 | extern struct smp_ops_t smp_85xx_ops; | ||
43 | #endif | ||
44 | |||
45 | if (of_flat_dt_is_compatible(root, "fsl,P2040RDB")) | ||
46 | return 1; | ||
47 | |||
48 | /* Check if we're running under the Freescale hypervisor */ | ||
49 | if (of_flat_dt_is_compatible(root, "fsl,P2040RDB-hv")) { | ||
50 | ppc_md.init_IRQ = ehv_pic_init; | ||
51 | ppc_md.get_irq = ehv_pic_get_irq; | ||
52 | ppc_md.restart = fsl_hv_restart; | ||
53 | ppc_md.power_off = fsl_hv_halt; | ||
54 | ppc_md.halt = fsl_hv_halt; | ||
55 | #ifdef CONFIG_SMP | ||
56 | /* | ||
57 | * Disable the timebase sync operations because we can't write | ||
58 | * to the timebase registers under the hypervisor. | ||
59 | */ | ||
60 | smp_85xx_ops.give_timebase = NULL; | ||
61 | smp_85xx_ops.take_timebase = NULL; | ||
62 | #endif | ||
63 | return 1; | ||
64 | } | ||
65 | |||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | define_machine(p2040_rdb) { | ||
70 | .name = "P2040 RDB", | ||
71 | .probe = p2040_rdb_probe, | ||
72 | .setup_arch = corenet_ds_setup_arch, | ||
73 | .init_IRQ = corenet_ds_pic_init, | ||
74 | #ifdef CONFIG_PCI | ||
75 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
76 | #endif | ||
77 | .get_irq = mpic_get_coreint_irq, | ||
78 | .restart = fsl_rstcr_restart, | ||
79 | .calibrate_decr = generic_calibrate_decr, | ||
80 | .progress = udbg_progress, | ||
81 | .power_save = e500_idle, | ||
82 | }; | ||
83 | |||
84 | machine_device_initcall(p2040_rdb, corenet_ds_publish_devices); | ||
85 | |||
86 | #ifdef CONFIG_SWIOTLB | ||
87 | machine_arch_initcall(p2040_rdb, swiotlb_setup_bus_notifier); | ||
88 | #endif | ||
diff --git a/arch/powerpc/platforms/85xx/p3041_ds.c b/arch/powerpc/platforms/85xx/p3041_ds.c index 0ed52e18298c..96d99a374dcf 100644 --- a/arch/powerpc/platforms/85xx/p3041_ds.c +++ b/arch/powerpc/platforms/85xx/p3041_ds.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <sysdev/fsl_soc.h> | 31 | #include <sysdev/fsl_soc.h> |
32 | #include <sysdev/fsl_pci.h> | 32 | #include <sysdev/fsl_pci.h> |
33 | #include <asm/ehv_pic.h> | ||
33 | 34 | ||
34 | #include "corenet_ds.h" | 35 | #include "corenet_ds.h" |
35 | 36 | ||
@@ -39,8 +40,32 @@ | |||
39 | static int __init p3041_ds_probe(void) | 40 | static int __init p3041_ds_probe(void) |
40 | { | 41 | { |
41 | unsigned long root = of_get_flat_dt_root(); | 42 | unsigned long root = of_get_flat_dt_root(); |
43 | #ifdef CONFIG_SMP | ||
44 | extern struct smp_ops_t smp_85xx_ops; | ||
45 | #endif | ||
46 | |||
47 | if (of_flat_dt_is_compatible(root, "fsl,P3041DS")) | ||
48 | return 1; | ||
49 | |||
50 | /* Check if we're running under the Freescale hypervisor */ | ||
51 | if (of_flat_dt_is_compatible(root, "fsl,P3041DS-hv")) { | ||
52 | ppc_md.init_IRQ = ehv_pic_init; | ||
53 | ppc_md.get_irq = ehv_pic_get_irq; | ||
54 | ppc_md.restart = fsl_hv_restart; | ||
55 | ppc_md.power_off = fsl_hv_halt; | ||
56 | ppc_md.halt = fsl_hv_halt; | ||
57 | #ifdef CONFIG_SMP | ||
58 | /* | ||
59 | * Disable the timebase sync operations because we can't write | ||
60 | * to the timebase registers under the hypervisor. | ||
61 | */ | ||
62 | smp_85xx_ops.give_timebase = NULL; | ||
63 | smp_85xx_ops.take_timebase = NULL; | ||
64 | #endif | ||
65 | return 1; | ||
66 | } | ||
42 | 67 | ||
43 | return of_flat_dt_is_compatible(root, "fsl,P3041DS"); | 68 | return 0; |
44 | } | 69 | } |
45 | 70 | ||
46 | define_machine(p3041_ds) { | 71 | define_machine(p3041_ds) { |
@@ -55,6 +80,7 @@ define_machine(p3041_ds) { | |||
55 | .restart = fsl_rstcr_restart, | 80 | .restart = fsl_rstcr_restart, |
56 | .calibrate_decr = generic_calibrate_decr, | 81 | .calibrate_decr = generic_calibrate_decr, |
57 | .progress = udbg_progress, | 82 | .progress = udbg_progress, |
83 | .power_save = e500_idle, | ||
58 | }; | 84 | }; |
59 | 85 | ||
60 | machine_device_initcall(p3041_ds, corenet_ds_publish_devices); | 86 | machine_device_initcall(p3041_ds, corenet_ds_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/p4080_ds.c b/arch/powerpc/platforms/85xx/p4080_ds.c index 84170460497b..d1b21d7663e3 100644 --- a/arch/powerpc/platforms/85xx/p4080_ds.c +++ b/arch/powerpc/platforms/85xx/p4080_ds.c | |||
@@ -29,31 +29,42 @@ | |||
29 | #include <linux/of_platform.h> | 29 | #include <linux/of_platform.h> |
30 | #include <sysdev/fsl_soc.h> | 30 | #include <sysdev/fsl_soc.h> |
31 | #include <sysdev/fsl_pci.h> | 31 | #include <sysdev/fsl_pci.h> |
32 | #include <asm/ehv_pic.h> | ||
32 | 33 | ||
33 | #include "corenet_ds.h" | 34 | #include "corenet_ds.h" |
34 | 35 | ||
35 | #ifdef CONFIG_PCI | ||
36 | static int primary_phb_addr; | ||
37 | #endif | ||
38 | |||
39 | /* | 36 | /* |
40 | * Called very early, device-tree isn't unflattened | 37 | * Called very early, device-tree isn't unflattened |
41 | */ | 38 | */ |
42 | static int __init p4080_ds_probe(void) | 39 | static int __init p4080_ds_probe(void) |
43 | { | 40 | { |
44 | unsigned long root = of_get_flat_dt_root(); | 41 | unsigned long root = of_get_flat_dt_root(); |
42 | #ifdef CONFIG_SMP | ||
43 | extern struct smp_ops_t smp_85xx_ops; | ||
44 | #endif | ||
45 | 45 | ||
46 | if (of_flat_dt_is_compatible(root, "fsl,P4080DS")) { | 46 | if (of_flat_dt_is_compatible(root, "fsl,P4080DS")) |
47 | #ifdef CONFIG_PCI | 47 | return 1; |
48 | /* treat PCIe1 as primary, | 48 | |
49 | * shouldn't matter as we have no ISA on the board | 49 | /* Check if we're running under the Freescale hypervisor */ |
50 | */ | 50 | if (of_flat_dt_is_compatible(root, "fsl,P4080DS-hv")) { |
51 | primary_phb_addr = 0x0000; | 51 | ppc_md.init_IRQ = ehv_pic_init; |
52 | ppc_md.get_irq = ehv_pic_get_irq; | ||
53 | ppc_md.restart = fsl_hv_restart; | ||
54 | ppc_md.power_off = fsl_hv_halt; | ||
55 | ppc_md.halt = fsl_hv_halt; | ||
56 | #ifdef CONFIG_SMP | ||
57 | /* | ||
58 | * Disable the timebase sync operations because we can't write | ||
59 | * to the timebase registers under the hypervisor. | ||
60 | */ | ||
61 | smp_85xx_ops.give_timebase = NULL; | ||
62 | smp_85xx_ops.take_timebase = NULL; | ||
52 | #endif | 63 | #endif |
53 | return 1; | 64 | return 1; |
54 | } else { | ||
55 | return 0; | ||
56 | } | 65 | } |
66 | |||
67 | return 0; | ||
57 | } | 68 | } |
58 | 69 | ||
59 | define_machine(p4080_ds) { | 70 | define_machine(p4080_ds) { |
@@ -68,7 +79,10 @@ define_machine(p4080_ds) { | |||
68 | .restart = fsl_rstcr_restart, | 79 | .restart = fsl_rstcr_restart, |
69 | .calibrate_decr = generic_calibrate_decr, | 80 | .calibrate_decr = generic_calibrate_decr, |
70 | .progress = udbg_progress, | 81 | .progress = udbg_progress, |
82 | .power_save = e500_idle, | ||
71 | }; | 83 | }; |
72 | 84 | ||
73 | machine_device_initcall(p4080_ds, corenet_ds_publish_devices); | 85 | machine_device_initcall(p4080_ds, corenet_ds_publish_devices); |
86 | #ifdef CONFIG_SWIOTLB | ||
74 | machine_arch_initcall(p4080_ds, swiotlb_setup_bus_notifier); | 87 | machine_arch_initcall(p4080_ds, swiotlb_setup_bus_notifier); |
88 | #endif | ||
diff --git a/arch/powerpc/platforms/85xx/p5020_ds.c b/arch/powerpc/platforms/85xx/p5020_ds.c index 7467b712ee00..e8cba5004fd8 100644 --- a/arch/powerpc/platforms/85xx/p5020_ds.c +++ b/arch/powerpc/platforms/85xx/p5020_ds.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <sysdev/fsl_soc.h> | 31 | #include <sysdev/fsl_soc.h> |
32 | #include <sysdev/fsl_pci.h> | 32 | #include <sysdev/fsl_pci.h> |
33 | #include <asm/ehv_pic.h> | ||
33 | 34 | ||
34 | #include "corenet_ds.h" | 35 | #include "corenet_ds.h" |
35 | 36 | ||
@@ -39,8 +40,32 @@ | |||
39 | static int __init p5020_ds_probe(void) | 40 | static int __init p5020_ds_probe(void) |
40 | { | 41 | { |
41 | unsigned long root = of_get_flat_dt_root(); | 42 | unsigned long root = of_get_flat_dt_root(); |
43 | #ifdef CONFIG_SMP | ||
44 | extern struct smp_ops_t smp_85xx_ops; | ||
45 | #endif | ||
46 | |||
47 | if (of_flat_dt_is_compatible(root, "fsl,P5020DS")) | ||
48 | return 1; | ||
49 | |||
50 | /* Check if we're running under the Freescale hypervisor */ | ||
51 | if (of_flat_dt_is_compatible(root, "fsl,P5020DS-hv")) { | ||
52 | ppc_md.init_IRQ = ehv_pic_init; | ||
53 | ppc_md.get_irq = ehv_pic_get_irq; | ||
54 | ppc_md.restart = fsl_hv_restart; | ||
55 | ppc_md.power_off = fsl_hv_halt; | ||
56 | ppc_md.halt = fsl_hv_halt; | ||
57 | #ifdef CONFIG_SMP | ||
58 | /* | ||
59 | * Disable the timebase sync operations because we can't write | ||
60 | * to the timebase registers under the hypervisor. | ||
61 | */ | ||
62 | smp_85xx_ops.give_timebase = NULL; | ||
63 | smp_85xx_ops.take_timebase = NULL; | ||
64 | #endif | ||
65 | return 1; | ||
66 | } | ||
42 | 67 | ||
43 | return of_flat_dt_is_compatible(root, "fsl,P5020DS"); | 68 | return 0; |
44 | } | 69 | } |
45 | 70 | ||
46 | define_machine(p5020_ds) { | 71 | define_machine(p5020_ds) { |
@@ -60,6 +85,11 @@ define_machine(p5020_ds) { | |||
60 | .restart = fsl_rstcr_restart, | 85 | .restart = fsl_rstcr_restart, |
61 | .calibrate_decr = generic_calibrate_decr, | 86 | .calibrate_decr = generic_calibrate_decr, |
62 | .progress = udbg_progress, | 87 | .progress = udbg_progress, |
88 | #ifdef CONFIG_PPC64 | ||
89 | .power_save = book3e_idle, | ||
90 | #else | ||
91 | .power_save = e500_idle, | ||
92 | #endif | ||
63 | }; | 93 | }; |
64 | 94 | ||
65 | machine_device_initcall(p5020_ds, corenet_ds_publish_devices); | 95 | machine_device_initcall(p5020_ds, corenet_ds_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index d6a93a10c0f5..5b9b901f6443 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Author: Andy Fleming <afleming@freescale.com> | 2 | * Author: Andy Fleming <afleming@freescale.com> |
3 | * Kumar Gala <galak@kernel.crashing.org> | 3 | * Kumar Gala <galak@kernel.crashing.org> |
4 | * | 4 | * |
5 | * Copyright 2006-2008 Freescale Semiconductor Inc. | 5 | * Copyright 2006-2008, 2011 Freescale Semiconductor Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
@@ -111,14 +111,6 @@ smp_85xx_kick_cpu(int nr) | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static void __init | ||
115 | smp_85xx_setup_cpu(int cpu_nr) | ||
116 | { | ||
117 | mpic_setup_this_cpu(); | ||
118 | if (cpu_has_feature(CPU_FTR_DBELL)) | ||
119 | doorbell_setup_this_cpu(); | ||
120 | } | ||
121 | |||
122 | struct smp_ops_t smp_85xx_ops = { | 114 | struct smp_ops_t smp_85xx_ops = { |
123 | .kick_cpu = smp_85xx_kick_cpu, | 115 | .kick_cpu = smp_85xx_kick_cpu, |
124 | #ifdef CONFIG_KEXEC | 116 | #ifdef CONFIG_KEXEC |
@@ -224,24 +216,36 @@ static void mpc85xx_smp_machine_kexec(struct kimage *image) | |||
224 | } | 216 | } |
225 | #endif /* CONFIG_KEXEC */ | 217 | #endif /* CONFIG_KEXEC */ |
226 | 218 | ||
219 | static void __init | ||
220 | smp_85xx_setup_cpu(int cpu_nr) | ||
221 | { | ||
222 | if (smp_85xx_ops.probe == smp_mpic_probe) | ||
223 | mpic_setup_this_cpu(); | ||
224 | |||
225 | if (cpu_has_feature(CPU_FTR_DBELL)) | ||
226 | doorbell_setup_this_cpu(); | ||
227 | } | ||
228 | |||
227 | void __init mpc85xx_smp_init(void) | 229 | void __init mpc85xx_smp_init(void) |
228 | { | 230 | { |
229 | struct device_node *np; | 231 | struct device_node *np; |
230 | 232 | ||
233 | smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; | ||
234 | |||
231 | np = of_find_node_by_type(NULL, "open-pic"); | 235 | np = of_find_node_by_type(NULL, "open-pic"); |
232 | if (np) { | 236 | if (np) { |
233 | smp_85xx_ops.probe = smp_mpic_probe; | 237 | smp_85xx_ops.probe = smp_mpic_probe; |
234 | smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; | ||
235 | smp_85xx_ops.message_pass = smp_mpic_message_pass; | 238 | smp_85xx_ops.message_pass = smp_mpic_message_pass; |
236 | } | 239 | } |
237 | 240 | ||
238 | if (cpu_has_feature(CPU_FTR_DBELL)) { | 241 | if (cpu_has_feature(CPU_FTR_DBELL)) { |
239 | smp_85xx_ops.message_pass = smp_muxed_ipi_message_pass; | 242 | /* |
243 | * If left NULL, .message_pass defaults to | ||
244 | * smp_muxed_ipi_message_pass | ||
245 | */ | ||
240 | smp_85xx_ops.cause_ipi = doorbell_cause_ipi; | 246 | smp_85xx_ops.cause_ipi = doorbell_cause_ipi; |
241 | } | 247 | } |
242 | 248 | ||
243 | BUG_ON(!smp_85xx_ops.message_pass); | ||
244 | |||
245 | smp_ops = &smp_85xx_ops; | 249 | smp_ops = &smp_85xx_ops; |
246 | 250 | ||
247 | #ifdef CONFIG_KEXEC | 251 | #ifdef CONFIG_KEXEC |