diff options
-rw-r--r-- | arch/powerpc/boot/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/Kconfig | 19 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/Makefile | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/qpace_setup.c | 152 | ||||
-rw-r--r-- | drivers/edac/Kconfig | 2 |
5 files changed, 175 insertions, 16 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 3d3daa674299..f32829937aad 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -194,6 +194,7 @@ image-$(CONFIG_PPC_MAPLE) += zImage.pseries | |||
194 | image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries | 194 | image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries |
195 | image-$(CONFIG_PPC_PS3) += dtbImage.ps3 | 195 | image-$(CONFIG_PPC_PS3) += dtbImage.ps3 |
196 | image-$(CONFIG_PPC_CELLEB) += zImage.pseries | 196 | image-$(CONFIG_PPC_CELLEB) += zImage.pseries |
197 | image-$(CONFIG_PPC_CELL_QPACE) += zImage.pseries | ||
197 | image-$(CONFIG_PPC_CHRP) += zImage.chrp | 198 | image-$(CONFIG_PPC_CHRP) += zImage.chrp |
198 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp | 199 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp |
199 | image-$(CONFIG_PPC_PMAC) += zImage.pmac | 200 | image-$(CONFIG_PPC_PMAC) += zImage.pmac |
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index 617f84547b30..5cc3279559a4 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig | |||
@@ -2,13 +2,18 @@ config PPC_CELL | |||
2 | bool | 2 | bool |
3 | default n | 3 | default n |
4 | 4 | ||
5 | config PPC_CELL_NATIVE | 5 | config PPC_CELL_COMMON |
6 | bool | 6 | bool |
7 | select PPC_CELL | 7 | select PPC_CELL |
8 | select PPC_DCR_MMIO | 8 | select PPC_DCR_MMIO |
9 | select PPC_OF_PLATFORM_PCI | ||
10 | select PPC_INDIRECT_IO | 9 | select PPC_INDIRECT_IO |
11 | select PPC_NATIVE | 10 | select PPC_NATIVE |
11 | select PPC_RTAS | ||
12 | |||
13 | config PPC_CELL_NATIVE | ||
14 | bool | ||
15 | select PPC_CELL_COMMON | ||
16 | select PPC_OF_PLATFORM_PCI | ||
12 | select MPIC | 17 | select MPIC |
13 | select IBM_NEW_EMAC_EMAC4 | 18 | select IBM_NEW_EMAC_EMAC4 |
14 | select IBM_NEW_EMAC_RGMII | 19 | select IBM_NEW_EMAC_RGMII |
@@ -20,7 +25,6 @@ config PPC_IBM_CELL_BLADE | |||
20 | bool "IBM Cell Blade" | 25 | bool "IBM Cell Blade" |
21 | depends on PPC_MULTIPLATFORM && PPC64 | 26 | depends on PPC_MULTIPLATFORM && PPC64 |
22 | select PPC_CELL_NATIVE | 27 | select PPC_CELL_NATIVE |
23 | select PPC_RTAS | ||
24 | select MMIO_NVRAM | 28 | select MMIO_NVRAM |
25 | select PPC_UDBG_16550 | 29 | select PPC_UDBG_16550 |
26 | select UDBG_RTAS_CONSOLE | 30 | select UDBG_RTAS_CONSOLE |
@@ -28,16 +32,17 @@ config PPC_IBM_CELL_BLADE | |||
28 | config PPC_CELLEB | 32 | config PPC_CELLEB |
29 | bool "Toshiba's Cell Reference Set 'Celleb' Architecture" | 33 | bool "Toshiba's Cell Reference Set 'Celleb' Architecture" |
30 | depends on PPC_MULTIPLATFORM && PPC64 | 34 | depends on PPC_MULTIPLATFORM && PPC64 |
31 | select PPC_CELL | ||
32 | select PPC_CELL_NATIVE | 35 | select PPC_CELL_NATIVE |
33 | select PPC_RTAS | ||
34 | select PPC_INDIRECT_IO | ||
35 | select PPC_OF_PLATFORM_PCI | ||
36 | select HAS_TXX9_SERIAL | 36 | select HAS_TXX9_SERIAL |
37 | select PPC_UDBG_BEAT | 37 | select PPC_UDBG_BEAT |
38 | select USB_OHCI_BIG_ENDIAN_MMIO | 38 | select USB_OHCI_BIG_ENDIAN_MMIO |
39 | select USB_EHCI_BIG_ENDIAN_MMIO | 39 | select USB_EHCI_BIG_ENDIAN_MMIO |
40 | 40 | ||
41 | config PPC_CELL_QPACE | ||
42 | bool "IBM Cell - QPACE" | ||
43 | depends on PPC_MULTIPLATFORM && PPC64 | ||
44 | select PPC_CELL_COMMON | ||
45 | |||
41 | menu "Cell Broadband Engine options" | 46 | menu "Cell Broadband Engine options" |
42 | depends on PPC_CELL | 47 | depends on PPC_CELL |
43 | 48 | ||
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index 7fd830872c43..43eccb270301 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | obj-$(CONFIG_PPC_CELL_NATIVE) += interrupt.o iommu.o setup.o \ | 1 | obj-$(CONFIG_PPC_CELL_COMMON) += cbe_regs.o interrupt.o pervasive.o |
2 | cbe_regs.o spider-pic.o \ | 2 | |
3 | pervasive.o pmu.o io-workarounds.o \ | 3 | obj-$(CONFIG_PPC_CELL_NATIVE) += iommu.o setup.o spider-pic.o \ |
4 | spider-pci.o | 4 | pmu.o io-workarounds.o spider-pci.o |
5 | obj-$(CONFIG_CBE_RAS) += ras.o | 5 | obj-$(CONFIG_CBE_RAS) += ras.o |
6 | 6 | ||
7 | obj-$(CONFIG_CBE_THERM) += cbe_thermal.o | 7 | obj-$(CONFIG_CBE_THERM) += cbe_thermal.o |
@@ -14,13 +14,12 @@ obj-$(CONFIG_PPC_IBM_CELL_POWERBUTTON) += cbe_powerbutton.o | |||
14 | 14 | ||
15 | ifeq ($(CONFIG_SMP),y) | 15 | ifeq ($(CONFIG_SMP),y) |
16 | obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o | 16 | obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o |
17 | obj-$(CONFIG_PPC_CELL_QPACE) += smp.o | ||
17 | endif | 18 | endif |
18 | 19 | ||
19 | # needed only when building loadable spufs.ko | 20 | # needed only when building loadable spufs.ko |
20 | spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o | 21 | spu-priv1-$(CONFIG_PPC_CELL_COMMON) += spu_priv1_mmio.o |
21 | 22 | spu-manage-$(CONFIG_PPC_CELL_COMMON) += spu_manage.o | |
22 | spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o | ||
23 | spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o | ||
24 | 23 | ||
25 | obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ | 24 | obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ |
26 | spu_notify.o \ | 25 | spu_notify.o \ |
@@ -31,6 +30,8 @@ obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ | |||
31 | 30 | ||
32 | obj-$(CONFIG_PCI_MSI) += axon_msi.o | 31 | obj-$(CONFIG_PCI_MSI) += axon_msi.o |
33 | 32 | ||
33 | # qpace setup | ||
34 | obj-$(CONFIG_PPC_CELL_QPACE) += qpace_setup.o | ||
34 | 35 | ||
35 | # celleb stuff | 36 | # celleb stuff |
36 | ifeq ($(CONFIG_PPC_CELLEB),y) | 37 | ifeq ($(CONFIG_PPC_CELLEB),y) |
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c new file mode 100644 index 000000000000..be84e6a16b30 --- /dev/null +++ b/arch/powerpc/platforms/cell/qpace_setup.c | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * linux/arch/powerpc/platforms/cell/qpace_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | ||
5 | * Adapted from 'alpha' version by Gary Thomas | ||
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | ||
7 | * Modified by PPC64 Team, IBM Corp | ||
8 | * Modified by Cell Team, IBM Deutschland Entwicklung GmbH | ||
9 | * Modified by Benjamin Krill <ben@codiert.org>, IBM Corp. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/sched.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/irq.h> | ||
22 | #include <linux/console.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | |||
25 | #include <asm/mmu.h> | ||
26 | #include <asm/processor.h> | ||
27 | #include <asm/io.h> | ||
28 | #include <asm/kexec.h> | ||
29 | #include <asm/pgtable.h> | ||
30 | #include <asm/prom.h> | ||
31 | #include <asm/rtas.h> | ||
32 | #include <asm/dma.h> | ||
33 | #include <asm/machdep.h> | ||
34 | #include <asm/time.h> | ||
35 | #include <asm/cputable.h> | ||
36 | #include <asm/irq.h> | ||
37 | #include <asm/spu.h> | ||
38 | #include <asm/spu_priv1.h> | ||
39 | #include <asm/udbg.h> | ||
40 | #include <asm/cell-regs.h> | ||
41 | |||
42 | #include "interrupt.h" | ||
43 | #include "pervasive.h" | ||
44 | #include "ras.h" | ||
45 | #include "io-workarounds.h" | ||
46 | |||
47 | static void qpace_show_cpuinfo(struct seq_file *m) | ||
48 | { | ||
49 | struct device_node *root; | ||
50 | const char *model = ""; | ||
51 | |||
52 | root = of_find_node_by_path("/"); | ||
53 | if (root) | ||
54 | model = of_get_property(root, "model", NULL); | ||
55 | seq_printf(m, "machine\t\t: CHRP %s\n", model); | ||
56 | of_node_put(root); | ||
57 | } | ||
58 | |||
59 | static void qpace_progress(char *s, unsigned short hex) | ||
60 | { | ||
61 | printk("*** %04x : %s\n", hex, s ? s : ""); | ||
62 | } | ||
63 | |||
64 | static int __init qpace_publish_devices(void) | ||
65 | { | ||
66 | int node; | ||
67 | |||
68 | /* Publish OF platform devices for southbridge IOs */ | ||
69 | of_platform_bus_probe(NULL, NULL, NULL); | ||
70 | |||
71 | /* There is no device for the MIC memory controller, thus we create | ||
72 | * a platform device for it to attach the EDAC driver to. | ||
73 | */ | ||
74 | for_each_online_node(node) { | ||
75 | if (cbe_get_cpu_mic_tm_regs(cbe_node_to_cpu(node)) == NULL) | ||
76 | continue; | ||
77 | platform_device_register_simple("cbe-mic", node, NULL, 0); | ||
78 | } | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | machine_subsys_initcall(qpace, qpace_publish_devices); | ||
83 | |||
84 | extern int qpace_notify(struct device *dev) | ||
85 | { | ||
86 | /* set dma_ops for of_platform bus */ | ||
87 | if (dev->bus && dev->bus->name | ||
88 | && !strcmp(dev->bus->name, "of_platform")) | ||
89 | set_dma_ops(dev, &dma_direct_ops); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static void __init qpace_setup_arch(void) | ||
95 | { | ||
96 | #ifdef CONFIG_SPU_BASE | ||
97 | spu_priv1_ops = &spu_priv1_mmio_ops; | ||
98 | spu_management_ops = &spu_management_of_ops; | ||
99 | #endif | ||
100 | |||
101 | cbe_regs_init(); | ||
102 | |||
103 | #ifdef CONFIG_CBE_RAS | ||
104 | cbe_ras_init(); | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_SMP | ||
108 | smp_init_cell(); | ||
109 | #endif | ||
110 | |||
111 | /* init to some ~sane value until calibrate_delay() runs */ | ||
112 | loops_per_jiffy = 50000000; | ||
113 | |||
114 | cbe_pervasive_init(); | ||
115 | #ifdef CONFIG_DUMMY_CONSOLE | ||
116 | conswitchp = &dummy_con; | ||
117 | #endif | ||
118 | |||
119 | /* set notifier function */ | ||
120 | platform_notify = &qpace_notify; | ||
121 | } | ||
122 | |||
123 | static int __init qpace_probe(void) | ||
124 | { | ||
125 | unsigned long root = of_get_flat_dt_root(); | ||
126 | |||
127 | if (!of_flat_dt_is_compatible(root, "IBM,QPACE")) | ||
128 | return 0; | ||
129 | |||
130 | hpte_init_native(); | ||
131 | |||
132 | return 1; | ||
133 | } | ||
134 | |||
135 | define_machine(qpace) { | ||
136 | .name = "QPACE", | ||
137 | .probe = qpace_probe, | ||
138 | .setup_arch = qpace_setup_arch, | ||
139 | .show_cpuinfo = qpace_show_cpuinfo, | ||
140 | .restart = rtas_restart, | ||
141 | .power_off = rtas_power_off, | ||
142 | .halt = rtas_halt, | ||
143 | .get_boot_time = rtas_get_boot_time, | ||
144 | .calibrate_decr = generic_calibrate_decr, | ||
145 | .progress = qpace_progress, | ||
146 | .init_IRQ = iic_init_IRQ, | ||
147 | #ifdef CONFIG_KEXEC | ||
148 | .machine_kexec = default_machine_kexec, | ||
149 | .machine_kexec_prepare = default_machine_kexec_prepare, | ||
150 | .machine_crash_shutdown = default_machine_crash_shutdown, | ||
151 | #endif | ||
152 | }; | ||
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index e0dbd388757f..e2667a8c2997 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
@@ -161,7 +161,7 @@ config EDAC_PASEMI | |||
161 | 161 | ||
162 | config EDAC_CELL | 162 | config EDAC_CELL |
163 | tristate "Cell Broadband Engine memory controller" | 163 | tristate "Cell Broadband Engine memory controller" |
164 | depends on EDAC_MM_EDAC && PPC_CELL_NATIVE | 164 | depends on EDAC_MM_EDAC && PPC_CELL_COMMON |
165 | help | 165 | help |
166 | Support for error detection and correction on the | 166 | Support for error detection and correction on the |
167 | Cell Broadband Engine internal memory controller | 167 | Cell Broadband Engine internal memory controller |