aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-15 12:51:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-15 12:51:09 -0400
commit723e9db7a46e328527cc3da2b478b831184fe828 (patch)
treecdeda255633057dcb4c84097bed27b2bbf76970f /arch/powerpc/platforms
parentada3fa15057205b7d3f727bba5cd26b5912e350f (diff)
parentd331d8305cba713605854aab63a000fb892353a7 (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: (134 commits) powerpc/nvram: Enable use Generic NVRAM driver for different size chips powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline powerpc/ps3: Workaround for flash memory I/O error powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead powerpc/perf_counters: Reduce stack usage of power_check_constraints powerpc: Fix bug where perf_counters breaks oprofile powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops powerpc/irq: Improve nanodoc powerpc: Fix some late PowerMac G5 with PCIe ATI graphics powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT powerpc/book3e: Add missing page sizes powerpc/pseries: Fix to handle slb resize across migration powerpc/powermac: Thermal control turns system off too eagerly powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan() powerpc/405ex: support cuImage via included dtb powerpc/405ex: provide necessary fixup function to support cuImage powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support. powerpc/44x: Update Arches defconfig powerpc/44x: Update Arches dts ... Fix up conflicts in drivers/char/agp/uninorth-agp.c
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/40x/Kconfig10
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c3
-rw-r--r--arch/powerpc/platforms/44x/Kconfig12
-rw-r--r--arch/powerpc/platforms/44x/ppc44x_simple.c1
-rw-r--r--arch/powerpc/platforms/82xx/mgcoge.c69
-rw-r--r--arch/powerpc/platforms/82xx/mpc8272_ads.c22
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig4
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c28
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h4
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/85xx/Makefile3
-rw-r--r--arch/powerpc/platforms/85xx/mpc8536_ds.c3
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c3
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c7
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_rdb.c141
-rw-r--r--arch/powerpc/platforms/85xx/sbc8560.c39
-rw-r--r--arch/powerpc/platforms/85xx/smp.c23
-rw-r--r--arch/powerpc/platforms/86xx/gef_ppc9a.c37
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c3
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_smp.c1
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype38
-rw-r--r--arch/powerpc/platforms/amigaone/setup.c6
-rw-r--r--arch/powerpc/platforms/cell/Kconfig7
-rw-r--r--arch/powerpc/platforms/cell/celleb_setup.c3
-rw-r--r--arch/powerpc/platforms/cell/iommu.c2
-rw-r--r--arch/powerpc/platforms/cell/smp.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/Makefile3
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h5
-rw-r--r--arch/powerpc/platforms/cell/spufs/sputrace.c272
-rw-r--r--arch/powerpc/platforms/cell/spufs/sputrace.h39
-rw-r--r--arch/powerpc/platforms/iseries/exception.S59
-rw-r--r--arch/powerpc/platforms/iseries/exception.h6
-rw-r--r--arch/powerpc/platforms/iseries/mf.c2
-rw-r--r--arch/powerpc/platforms/pasemi/idle.c2
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c8
-rw-r--r--arch/powerpc/platforms/powermac/feature.c13
-rw-r--r--arch/powerpc/platforms/powermac/pci.c61
-rw-r--r--arch/powerpc/platforms/powermac/smp.c2
-rw-r--r--arch/powerpc/platforms/ps3/mm.c2
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c6
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c2
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c9
-rw-r--r--arch/powerpc/platforms/pseries/setup.c4
-rw-r--r--arch/powerpc/platforms/pseries/smp.c2
47 files changed, 579 insertions, 402 deletions
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig
index a6e43cb6f825..ec64264f7a50 100644
--- a/arch/powerpc/platforms/40x/Kconfig
+++ b/arch/powerpc/platforms/40x/Kconfig
@@ -40,6 +40,16 @@ config HCU4
40 help 40 help
41 This option enables support for the Nestal Maschinen HCU4 board. 41 This option enables support for the Nestal Maschinen HCU4 board.
42 42
43config HOTFOOT
44 bool "Hotfoot"
45 depends on 40x
46 default n
47 select 405EP
48 select PPC40x_SIMPLE
49 select PCI
50 help
51 This option enables support for the ESTEEM 195E Hotfoot board.
52
43config KILAUEA 53config KILAUEA
44 bool "Kilauea" 54 bool "Kilauea"
45 depends on 40x 55 depends on 40x
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 5fd5a5974001..546bbc229d19 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -54,7 +54,8 @@ static char *board[] __initdata = {
54 "amcc,acadia", 54 "amcc,acadia",
55 "amcc,haleakala", 55 "amcc,haleakala",
56 "amcc,kilauea", 56 "amcc,kilauea",
57 "amcc,makalu" 57 "amcc,makalu",
58 "est,hotfoot"
58}; 59};
59 60
60static int __init ppc40x_probe(void) 61static int __init ppc40x_probe(void)
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 90e3192611a4..7486bffd3ebb 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -129,6 +129,18 @@ config REDWOOD
129 help 129 help
130 This option enables support for the AMCC PPC460SX Redwood board. 130 This option enables support for the AMCC PPC460SX Redwood board.
131 131
132config EIGER
133 bool "Eiger"
134 depends on 44x
135 default n
136 select PPC44x_SIMPLE
137 select 460SX
138 select PCI
139 select PPC4xx_PCI_EXPRESS
140 select IBM_NEW_EMAC_RGMII
141 help
142 This option enables support for the AMCC PPC460SX evaluation board.
143
132config YOSEMITE 144config YOSEMITE
133 bool "Yosemite" 145 bool "Yosemite"
134 depends on 44x 146 depends on 44x
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c
index 5bcd441885e8..e8c23ccaa1fc 100644
--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
@@ -55,6 +55,7 @@ static char *board[] __initdata = {
55 "amcc,canyonlands", 55 "amcc,canyonlands",
56 "amcc,glacier", 56 "amcc,glacier",
57 "ibm,ebony", 57 "ibm,ebony",
58 "amcc,eiger",
58 "amcc,katmai", 59 "amcc,katmai",
59 "amcc,rainier", 60 "amcc,rainier",
60 "amcc,redwood", 61 "amcc,redwood",
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/mgcoge.c
index c2af169c1d1d..7a5de9eb3c73 100644
--- a/arch/powerpc/platforms/82xx/mgcoge.c
+++ b/arch/powerpc/platforms/82xx/mgcoge.c
@@ -50,16 +50,63 @@ struct cpm_pin {
50static __initdata struct cpm_pin mgcoge_pins[] = { 50static __initdata struct cpm_pin mgcoge_pins[] = {
51 51
52 /* SMC2 */ 52 /* SMC2 */
53 {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 53 {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
54 {1, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 54 {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
55 55
56 /* SCC4 */ 56 /* SCC4 */
57 {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 57 {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
58 {3, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 58 {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
59 {3, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 59 {2, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
60 {3, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 60 {2, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
61 {4, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 61 {3, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
62 {4, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 62 {3, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
63
64 /* FCC1 */
65 {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
66 {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
67 {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
68 {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
69 {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
70 {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
71 {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
72 {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
73 {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
74 {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
75 {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
76 {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
77 {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
78 {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
79
80 {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
81 {2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
82
83 /* FCC2 */
84 {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
85 {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
86 {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
87 {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
88 {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
89 {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
90 {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
91 {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
92 {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
93 {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
94 {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
95 {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
96 {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
97 {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
98
99 {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
100 {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
101
102 /* MDC */
103 {0, 13, CPM_PIN_OUTPUT | CPM_PIN_GPIO},
104
105#if defined(CONFIG_I2C_CPM)
106 /* I2C */
107 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
108 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
109#endif
63}; 110};
64 111
65static void __init init_ioports(void) 112static void __init init_ioports(void)
@@ -68,12 +115,16 @@ static void __init init_ioports(void)
68 115
69 for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { 116 for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) {
70 const struct cpm_pin *pin = &mgcoge_pins[i]; 117 const struct cpm_pin *pin = &mgcoge_pins[i];
71 cpm2_set_pin(pin->port - 1, pin->pin, pin->flags); 118 cpm2_set_pin(pin->port, pin->pin, pin->flags);
72 } 119 }
73 120
74 cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); 121 cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8);
75 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); 122 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX);
76 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); 123 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX);
124 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX);
125 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX);
126 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
127 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
77} 128}
78 129
79static void __init mgcoge_setup_arch(void) 130static void __init mgcoge_setup_arch(void)
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index 8054c685d323..30394b409b3f 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -29,7 +29,6 @@
29#include <sysdev/fsl_soc.h> 29#include <sysdev/fsl_soc.h>
30#include <sysdev/cpm2_pic.h> 30#include <sysdev/cpm2_pic.h>
31 31
32#include "pq2ads.h"
33#include "pq2.h" 32#include "pq2.h"
34 33
35static void __init mpc8272_ads_pic_init(void) 34static void __init mpc8272_ads_pic_init(void)
@@ -100,6 +99,15 @@ static struct cpm_pin mpc8272_ads_pins[] = {
100 /* I2C */ 99 /* I2C */
101 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 100 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
102 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 101 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
102
103 /* USB */
104 {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
105 {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
106 {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
107 {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
108 {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
109 {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
110 {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
103}; 111};
104 112
105static void __init init_ioports(void) 113static void __init init_ioports(void)
@@ -113,6 +121,8 @@ static void __init init_ioports(void)
113 121
114 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); 122 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
115 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); 123 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
124 cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_RX);
125 cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX);
116 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX); 126 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_RX);
117 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX); 127 cpm2_clk_setup(CPM_CLK_SCC4, CPM_BRG4, CPM_CLK_TX);
118 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX); 128 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX);
@@ -144,12 +154,22 @@ static void __init mpc8272_ads_setup_arch(void)
144 return; 154 return;
145 } 155 }
146 156
157#define BCSR1_FETHIEN 0x08000000
158#define BCSR1_FETH_RST 0x04000000
159#define BCSR1_RS232_EN1 0x02000000
160#define BCSR1_RS232_EN2 0x01000000
161#define BCSR3_USB_nEN 0x80000000
162#define BCSR3_FETHIEN2 0x10000000
163#define BCSR3_FETH2_RST 0x08000000
164
147 clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN); 165 clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN);
148 setbits32(&bcsr[1], BCSR1_FETH_RST); 166 setbits32(&bcsr[1], BCSR1_FETH_RST);
149 167
150 clrbits32(&bcsr[3], BCSR3_FETHIEN2); 168 clrbits32(&bcsr[3], BCSR3_FETHIEN2);
151 setbits32(&bcsr[3], BCSR3_FETH2_RST); 169 setbits32(&bcsr[3], BCSR3_FETH2_RST);
152 170
171 clrbits32(&bcsr[3], BCSR3_USB_nEN);
172
153 iounmap(bcsr); 173 iounmap(bcsr);
154 174
155 init_ioports(); 175 init_ioports();
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 083ebee9a16d..f49a2548c5ff 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -75,11 +75,11 @@ config MPC837x_MDS
75 This option enables support for the MPC837x MDS Processor Board. 75 This option enables support for the MPC837x MDS Processor Board.
76 76
77config MPC837x_RDB 77config MPC837x_RDB
78 bool "Freescale MPC837x RDB" 78 bool "Freescale MPC837x RDB/WLAN"
79 select DEFAULT_UIMAGE 79 select DEFAULT_UIMAGE
80 select PPC_MPC837x 80 select PPC_MPC837x
81 help 81 help
82 This option enables support for the MPC837x RDB Board. 82 This option enables support for the MPC837x RDB and WLAN Boards.
83 83
84config SBC834x 84config SBC834x
85 bool "Wind River SBC834x" 85 bool "Wind River SBC834x"
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 76f3b32a155e..a1908d261240 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -17,10 +17,32 @@
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ipic.h> 18#include <asm/ipic.h>
19#include <asm/udbg.h> 19#include <asm/udbg.h>
20#include <sysdev/fsl_soc.h>
20#include <sysdev/fsl_pci.h> 21#include <sysdev/fsl_pci.h>
21 22
22#include "mpc83xx.h" 23#include "mpc83xx.h"
23 24
25static void mpc837x_rdb_sd_cfg(void)
26{
27 void __iomem *im;
28
29 im = ioremap(get_immrbase(), 0x1000);
30 if (!im) {
31 WARN_ON(1);
32 return;
33 }
34
35 /*
36 * On RDB boards (in contrast to MDS) USBB pins are used for SD only,
37 * so we can safely mux them away from the USB block.
38 */
39 clrsetbits_be32(im + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USBB_MASK,
40 MPC837X_SICRL_SD);
41 clrsetbits_be32(im + MPC83XX_SICRH_OFFS, MPC837X_SICRH_SPI_MASK,
42 MPC837X_SICRH_SD);
43 iounmap(im);
44}
45
24/* ************************************************************************ 46/* ************************************************************************
25 * 47 *
26 * Setup the architecture 48 * Setup the architecture
@@ -42,6 +64,7 @@ static void __init mpc837x_rdb_setup_arch(void)
42 mpc83xx_add_bridge(np); 64 mpc83xx_add_bridge(np);
43#endif 65#endif
44 mpc837x_usb_cfg(); 66 mpc837x_usb_cfg();
67 mpc837x_rdb_sd_cfg();
45} 68}
46 69
47static struct of_device_id mpc837x_ids[] = { 70static struct of_device_id mpc837x_ids[] = {
@@ -86,11 +109,12 @@ static int __init mpc837x_rdb_probe(void)
86 109
87 return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") || 110 return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") ||
88 of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") || 111 of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") ||
89 of_flat_dt_is_compatible(root, "fsl,mpc8379rdb"); 112 of_flat_dt_is_compatible(root, "fsl,mpc8379rdb") ||
113 of_flat_dt_is_compatible(root, "fsl,mpc8377wlan");
90} 114}
91 115
92define_machine(mpc837x_rdb) { 116define_machine(mpc837x_rdb) {
93 .name = "MPC837x RDB", 117 .name = "MPC837x RDB/WLAN",
94 .probe = mpc837x_rdb_probe, 118 .probe = mpc837x_rdb_probe,
95 .setup_arch = mpc837x_rdb_setup_arch, 119 .setup_arch = mpc837x_rdb_setup_arch,
96 .init_IRQ = mpc837x_rdb_init_IRQ, 120 .init_IRQ = mpc837x_rdb_init_IRQ,
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index d1dc5b0b4fbf..0fea8811d45b 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -30,6 +30,8 @@
30#define MPC8315_SICRL_USB_ULPI 0x00000054 30#define MPC8315_SICRL_USB_ULPI 0x00000054
31#define MPC837X_SICRL_USB_MASK 0xf0000000 31#define MPC837X_SICRL_USB_MASK 0xf0000000
32#define MPC837X_SICRL_USB_ULPI 0x50000000 32#define MPC837X_SICRL_USB_ULPI 0x50000000
33#define MPC837X_SICRL_USBB_MASK 0x30000000
34#define MPC837X_SICRL_SD 0x20000000
33 35
34/* system i/o configuration register high */ 36/* system i/o configuration register high */
35#define MPC83XX_SICRH_OFFS 0x118 37#define MPC83XX_SICRH_OFFS 0x118
@@ -38,6 +40,8 @@
38#define MPC831X_SICRH_USB_ULPI 0x000000a0 40#define MPC831X_SICRH_USB_ULPI 0x000000a0
39#define MPC8315_SICRH_USB_MASK 0x0000ff00 41#define MPC8315_SICRH_USB_MASK 0x0000ff00
40#define MPC8315_SICRH_USB_ULPI 0x00000000 42#define MPC8315_SICRH_USB_ULPI 0x00000000
43#define MPC837X_SICRH_SPI_MASK 0x00000003
44#define MPC837X_SICRH_SD 0x00000001
41 45
42/* USB Control Register */ 46/* USB Control Register */
43#define FSL_USB2_CONTROL_OFFS 0x500 47#define FSL_USB2_CONTROL_OFFS 0x500
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index a9b416688975..d3a975e8fd3e 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -55,6 +55,15 @@ config MPC85xx_DS
55 help 55 help
56 This option enables support for the MPC85xx DS (MPC8544 DS) board 56 This option enables support for the MPC85xx DS (MPC8544 DS) board
57 57
58config MPC85xx_RDB
59 bool "Freescale MPC85xx RDB"
60 select PPC_I8259
61 select DEFAULT_UIMAGE
62 select FSL_ULI1575
63 select SWIOTLB
64 help
65 This option enables support for the MPC85xx RDB (P2020 RDB) board
66
58config SOCRATES 67config SOCRATES
59 bool "Socrates" 68 bool "Socrates"
60 select DEFAULT_UIMAGE 69 select DEFAULT_UIMAGE
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 835733f2b12c..9098aea0cf32 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -9,10 +9,11 @@ obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
9obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o 9obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o
10obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o 10obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o
11obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o 11obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o
12obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o
12obj-$(CONFIG_STX_GP3) += stx_gp3.o 13obj-$(CONFIG_STX_GP3) += stx_gp3.o
13obj-$(CONFIG_TQM85xx) += tqm85xx.o 14obj-$(CONFIG_TQM85xx) += tqm85xx.o
14obj-$(CONFIG_SBC8560) += sbc8560.o 15obj-$(CONFIG_SBC8560) += sbc8560.o
15obj-$(CONFIG_SBC8548) += sbc8548.o 16obj-$(CONFIG_SBC8548) += sbc8548.o
16obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o 17obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o
17obj-$(CONFIG_KSI8560) += ksi8560.o 18obj-$(CONFIG_KSI8560) += ksi8560.o
18obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o \ No newline at end of file 19obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index 055ff417bae9..004b7d36cdb7 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -96,7 +96,8 @@ static void __init mpc8536_ds_setup_arch(void)
96#ifdef CONFIG_SWIOTLB 96#ifdef CONFIG_SWIOTLB
97 if (lmb_end_of_DRAM() > max) { 97 if (lmb_end_of_DRAM() > max) {
98 ppc_swiotlb_enable = 1; 98 ppc_swiotlb_enable = 1;
99 set_pci_dma_ops(&swiotlb_pci_dma_ops); 99 set_pci_dma_ops(&swiotlb_dma_ops);
100 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
100 } 101 }
101#endif 102#endif
102 103
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 849c0ac0025f..544011a562fb 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -192,7 +192,8 @@ static void __init mpc85xx_ds_setup_arch(void)
192#ifdef CONFIG_SWIOTLB 192#ifdef CONFIG_SWIOTLB
193 if (lmb_end_of_DRAM() > max) { 193 if (lmb_end_of_DRAM() > max) {
194 ppc_swiotlb_enable = 1; 194 ppc_swiotlb_enable = 1;
195 set_pci_dma_ops(&swiotlb_pci_dma_ops); 195 set_pci_dma_ops(&swiotlb_dma_ops);
196 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
196 } 197 }
197#endif 198#endif
198 199
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index bfb32834ab0c..3909d57b86e3 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -47,6 +47,7 @@
47#include <asm/udbg.h> 47#include <asm/udbg.h>
48#include <sysdev/fsl_soc.h> 48#include <sysdev/fsl_soc.h>
49#include <sysdev/fsl_pci.h> 49#include <sysdev/fsl_pci.h>
50#include <sysdev/simple_gpio.h>
50#include <asm/qe.h> 51#include <asm/qe.h>
51#include <asm/qe_ic.h> 52#include <asm/qe_ic.h>
52#include <asm/mpic.h> 53#include <asm/mpic.h>
@@ -254,7 +255,8 @@ static void __init mpc85xx_mds_setup_arch(void)
254#ifdef CONFIG_SWIOTLB 255#ifdef CONFIG_SWIOTLB
255 if (lmb_end_of_DRAM() > max) { 256 if (lmb_end_of_DRAM() > max) {
256 ppc_swiotlb_enable = 1; 257 ppc_swiotlb_enable = 1;
257 set_pci_dma_ops(&swiotlb_pci_dma_ops); 258 set_pci_dma_ops(&swiotlb_dma_ops);
259 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
258 } 260 }
259#endif 261#endif
260} 262}
@@ -304,6 +306,9 @@ static struct of_device_id mpc85xx_ids[] = {
304 306
305static int __init mpc85xx_publish_devices(void) 307static int __init mpc85xx_publish_devices(void)
306{ 308{
309 if (machine_is(mpc8569_mds))
310 simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio");
311
307 /* Publish the QE devices */ 312 /* Publish the QE devices */
308 of_platform_bus_probe(NULL, mpc85xx_ids, NULL); 313 of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
309 314
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
new file mode 100644
index 000000000000..c8468de4acf6
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -0,0 +1,141 @@
1/*
2 * MPC85xx RDB Board Setup
3 *
4 * Copyright 2009 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/kdev_t.h>
16#include <linux/delay.h>
17#include <linux/seq_file.h>
18#include <linux/interrupt.h>
19#include <linux/of_platform.h>
20
21#include <asm/system.h>
22#include <asm/time.h>
23#include <asm/machdep.h>
24#include <asm/pci-bridge.h>
25#include <mm/mmu_decl.h>
26#include <asm/prom.h>
27#include <asm/udbg.h>
28#include <asm/mpic.h>
29
30#include <sysdev/fsl_soc.h>
31#include <sysdev/fsl_pci.h>
32
33#undef DEBUG
34
35#ifdef DEBUG
36#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
37#else
38#define DBG(fmt, args...)
39#endif
40
41
42void __init mpc85xx_rdb_pic_init(void)
43{
44 struct mpic *mpic;
45 struct resource r;
46 struct device_node *np;
47
48 np = of_find_node_by_type(NULL, "open-pic");
49 if (np == NULL) {
50 printk(KERN_ERR "Could not find open-pic node\n");
51 return;
52 }
53
54 if (of_address_to_resource(np, 0, &r)) {
55 printk(KERN_ERR "Failed to map mpic register space\n");
56 of_node_put(np);
57 return;
58 }
59
60 mpic = mpic_alloc(np, r.start,
61 MPIC_PRIMARY | MPIC_WANTS_RESET |
62 MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS |
63 MPIC_SINGLE_DEST_CPU,
64 0, 256, " OpenPIC ");
65
66 BUG_ON(mpic == NULL);
67 of_node_put(np);
68
69 mpic_init(mpic);
70
71}
72
73/*
74 * Setup the architecture
75 */
76#ifdef CONFIG_SMP
77extern void __init mpc85xx_smp_init(void);
78#endif
79static void __init mpc85xx_rdb_setup_arch(void)
80{
81#ifdef CONFIG_PCI
82 struct device_node *np;
83#endif
84
85 if (ppc_md.progress)
86 ppc_md.progress("mpc85xx_rdb_setup_arch()", 0);
87
88#ifdef CONFIG_PCI
89 for_each_node_by_type(np, "pci") {
90 if (of_device_is_compatible(np, "fsl,mpc8548-pcie"))
91 fsl_add_bridge(np, 0);
92 }
93
94#endif
95
96#ifdef CONFIG_SMP
97 mpc85xx_smp_init();
98#endif
99
100 printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n");
101}
102
103static struct of_device_id __initdata mpc85xxrdb_ids[] = {
104 { .type = "soc", },
105 { .compatible = "soc", },
106 { .compatible = "simple-bus", },
107 { .compatible = "gianfar", },
108 {},
109};
110
111static int __init mpc85xxrdb_publish_devices(void)
112{
113 return of_platform_bus_probe(NULL, mpc85xxrdb_ids, NULL);
114}
115machine_device_initcall(p2020_rdb, mpc85xxrdb_publish_devices);
116
117/*
118 * Called very early, device-tree isn't unflattened
119 */
120static int __init p2020_rdb_probe(void)
121{
122 unsigned long root = of_get_flat_dt_root();
123
124 if (of_flat_dt_is_compatible(root, "fsl,P2020RDB"))
125 return 1;
126 return 0;
127}
128
129define_machine(p2020_rdb) {
130 .name = "P2020 RDB",
131 .probe = p2020_rdb_probe,
132 .setup_arch = mpc85xx_rdb_setup_arch,
133 .init_IRQ = mpc85xx_rdb_pic_init,
134#ifdef CONFIG_PCI
135 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
136#endif
137 .get_irq = mpic_get_irq,
138 .restart = fsl_rstcr_restart,
139 .calibrate_decr = generic_calibrate_decr,
140 .progress = udbg_progress,
141};
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
index cc27807a8b64..a5ad1c7794bf 100644
--- a/arch/powerpc/platforms/85xx/sbc8560.c
+++ b/arch/powerpc/platforms/85xx/sbc8560.c
@@ -267,6 +267,43 @@ arch_initcall(sbc8560_rtc_init);
267 267
268#endif /* M48T59 */ 268#endif /* M48T59 */
269 269
270static __u8 __iomem *brstcr;
271
272static int __init sbc8560_bdrstcr_init(void)
273{
274 struct device_node *np;
275 struct resource res;
276
277 np = of_find_compatible_node(NULL, NULL, "wrs,sbc8560-brstcr");
278 if (np == NULL) {
279 printk(KERN_WARNING "sbc8560: No board specific RSTCR in DTB.\n");
280 return -ENODEV;
281 }
282
283 of_address_to_resource(np, 0, &res);
284
285 printk(KERN_INFO "sbc8560: Found BRSTCR at i/o 0x%x\n", res.start);
286
287 brstcr = ioremap(res.start, res.end - res.start);
288 if(!brstcr)
289 printk(KERN_WARNING "sbc8560: ioremap of brstcr failed.\n");
290
291 of_node_put(np);
292
293 return 0;
294}
295
296arch_initcall(sbc8560_bdrstcr_init);
297
298void sbc8560_rstcr_restart(char * cmd)
299{
300 local_irq_disable();
301 if(brstcr)
302 clrbits8(brstcr, 0x80);
303
304 while(1);
305}
306
270define_machine(sbc8560) { 307define_machine(sbc8560) {
271 .name = "SBC8560", 308 .name = "SBC8560",
272 .probe = sbc8560_probe, 309 .probe = sbc8560_probe,
@@ -274,7 +311,7 @@ define_machine(sbc8560) {
274 .init_IRQ = sbc8560_pic_init, 311 .init_IRQ = sbc8560_pic_init,
275 .show_cpuinfo = sbc8560_show_cpuinfo, 312 .show_cpuinfo = sbc8560_show_cpuinfo,
276 .get_irq = mpic_get_irq, 313 .get_irq = mpic_get_irq,
277 .restart = fsl_rstcr_restart, 314 .restart = sbc8560_rstcr_restart,
278 .calibrate_decr = generic_calibrate_decr, 315 .calibrate_decr = generic_calibrate_decr,
279 .progress = udbg_progress, 316 .progress = udbg_progress,
280}; 317};
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 62c592ede641..04160a4cc699 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -25,7 +25,6 @@
25 25
26#include <sysdev/fsl_soc.h> 26#include <sysdev/fsl_soc.h>
27 27
28extern volatile unsigned long __secondary_hold_acknowledge;
29extern void __early_start(void); 28extern void __early_start(void);
30 29
31#define BOOT_ENTRY_ADDR_UPPER 0 30#define BOOT_ENTRY_ADDR_UPPER 0
@@ -80,46 +79,24 @@ smp_85xx_kick_cpu(int nr)
80} 79}
81 80
82static void __init 81static void __init
83smp_85xx_basic_setup(int cpu_nr)
84{
85 /* Clear any pending timer interrupts */
86 mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
87
88 /* Enable decrementer interrupt */
89 mtspr(SPRN_TCR, TCR_DIE);
90}
91
92static void __init
93smp_85xx_setup_cpu(int cpu_nr) 82smp_85xx_setup_cpu(int cpu_nr)
94{ 83{
95 mpic_setup_this_cpu(); 84 mpic_setup_this_cpu();
96
97 smp_85xx_basic_setup(cpu_nr);
98} 85}
99 86
100struct smp_ops_t smp_85xx_ops = { 87struct smp_ops_t smp_85xx_ops = {
101 .kick_cpu = smp_85xx_kick_cpu, 88 .kick_cpu = smp_85xx_kick_cpu,
102}; 89};
103 90
104static int __init smp_dummy_probe(void)
105{
106 return NR_CPUS;
107}
108
109void __init mpc85xx_smp_init(void) 91void __init mpc85xx_smp_init(void)
110{ 92{
111 struct device_node *np; 93 struct device_node *np;
112 94
113 smp_85xx_ops.message_pass = NULL;
114
115 np = of_find_node_by_type(NULL, "open-pic"); 95 np = of_find_node_by_type(NULL, "open-pic");
116 if (np) { 96 if (np) {
117 smp_85xx_ops.probe = smp_mpic_probe; 97 smp_85xx_ops.probe = smp_mpic_probe;
118 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; 98 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
119 smp_85xx_ops.message_pass = smp_mpic_message_pass; 99 smp_85xx_ops.message_pass = smp_mpic_message_pass;
120 } else {
121 smp_85xx_ops.probe = smp_dummy_probe;
122 smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
123 } 100 }
124 101
125 if (cpu_has_feature(CPU_FTR_DBELL)) 102 if (cpu_has_feature(CPU_FTR_DBELL))
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c
index 2efa052975e6..287f7bd17dd9 100644
--- a/arch/powerpc/platforms/86xx/gef_ppc9a.c
+++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c
@@ -102,8 +102,8 @@ static unsigned int gef_ppc9a_get_pcb_rev(void)
102{ 102{
103 unsigned int reg; 103 unsigned int reg;
104 104
105 reg = ioread32(ppc9a_regs); 105 reg = ioread32be(ppc9a_regs);
106 return (reg >> 8) & 0xff; 106 return (reg >> 16) & 0xff;
107} 107}
108 108
109/* Return the board (software) revision */ 109/* Return the board (software) revision */
@@ -111,8 +111,8 @@ static unsigned int gef_ppc9a_get_board_rev(void)
111{ 111{
112 unsigned int reg; 112 unsigned int reg;
113 113
114 reg = ioread32(ppc9a_regs); 114 reg = ioread32be(ppc9a_regs);
115 return (reg >> 16) & 0xff; 115 return (reg >> 8) & 0xff;
116} 116}
117 117
118/* Return the FPGA revision */ 118/* Return the FPGA revision */
@@ -120,8 +120,26 @@ static unsigned int gef_ppc9a_get_fpga_rev(void)
120{ 120{
121 unsigned int reg; 121 unsigned int reg;
122 122
123 reg = ioread32(ppc9a_regs); 123 reg = ioread32be(ppc9a_regs);
124 return (reg >> 24) & 0xf; 124 return reg & 0xf;
125}
126
127/* Return VME Geographical Address */
128static unsigned int gef_ppc9a_get_vme_geo_addr(void)
129{
130 unsigned int reg;
131
132 reg = ioread32be(ppc9a_regs + 0x4);
133 return reg & 0x1f;
134}
135
136/* Return VME System Controller Status */
137static unsigned int gef_ppc9a_get_vme_is_syscon(void)
138{
139 unsigned int reg;
140
141 reg = ioread32be(ppc9a_regs + 0x4);
142 return (reg >> 9) & 0x1;
125} 143}
126 144
127static void gef_ppc9a_show_cpuinfo(struct seq_file *m) 145static void gef_ppc9a_show_cpuinfo(struct seq_file *m)
@@ -131,10 +149,15 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m)
131 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); 149 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");
132 150
133 seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(), 151 seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(),
134 ('A' + gef_ppc9a_get_board_rev() - 1)); 152 ('A' + gef_ppc9a_get_board_rev()));
135 seq_printf(m, "FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev()); 153 seq_printf(m, "FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev());
136 154
137 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 155 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
156
157 seq_printf(m, "VME geo. addr\t: %u\n", gef_ppc9a_get_vme_geo_addr());
158
159 seq_printf(m, "VME syscon\t: %s\n",
160 gef_ppc9a_get_vme_is_syscon() ? "yes" : "no");
138} 161}
139 162
140static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev) 163static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev)
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 66327024a6a6..2aa69a69bcc8 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -105,7 +105,8 @@ mpc86xx_hpcn_setup_arch(void)
105#ifdef CONFIG_SWIOTLB 105#ifdef CONFIG_SWIOTLB
106 if (lmb_end_of_DRAM() > max) { 106 if (lmb_end_of_DRAM() > max) {
107 ppc_swiotlb_enable = 1; 107 ppc_swiotlb_enable = 1;
108 set_pci_dma_ops(&swiotlb_pci_dma_ops); 108 set_pci_dma_ops(&swiotlb_dma_ops);
109 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
109 } 110 }
110#endif 111#endif
111} 112}
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
index d84bbb508ee7..eacea0e3fcc8 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
@@ -27,7 +27,6 @@
27#include "mpc86xx.h" 27#include "mpc86xx.h"
28 28
29extern void __secondary_start_mpc86xx(void); 29extern void __secondary_start_mpc86xx(void);
30extern unsigned long __secondary_hold_acknowledge;
31 30
32#define MCM_PORT_CONFIG_OFFSET 0x10 31#define MCM_PORT_CONFIG_OFFSET 0x10
33 32
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 61187bec7506..9efc8bda01b4 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -57,15 +57,35 @@ config E200
57 57
58endchoice 58endchoice
59 59
60config PPC_BOOK3S_64 60choice
61 def_bool y 61 prompt "Processor Type"
62 depends on PPC64 62 depends on PPC64
63 help
64 There are two families of 64 bit PowerPC chips supported.
65 The most common ones are the desktop and server CPUs
66 (POWER3, RS64, POWER4, POWER5, POWER5+, POWER6, ...)
67
68 The other are the "embedded" processors compliant with the
69 "Book 3E" variant of the architecture
70
71config PPC_BOOK3S_64
72 bool "Server processors"
63 select PPC_FPU 73 select PPC_FPU
64 74
75config PPC_BOOK3E_64
76 bool "Embedded processors"
77 select PPC_FPU # Make it a choice ?
78
79endchoice
80
65config PPC_BOOK3S 81config PPC_BOOK3S
66 def_bool y 82 def_bool y
67 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 83 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
68 84
85config PPC_BOOK3E
86 def_bool y
87 depends on PPC_BOOK3E_64
88
69config POWER4_ONLY 89config POWER4_ONLY
70 bool "Optimize for POWER4" 90 bool "Optimize for POWER4"
71 depends on PPC64 && PPC_BOOK3S 91 depends on PPC64 && PPC_BOOK3S
@@ -125,7 +145,7 @@ config 4xx
125 145
126config BOOKE 146config BOOKE
127 bool 147 bool
128 depends on E200 || E500 || 44x 148 depends on E200 || E500 || 44x || PPC_BOOK3E
129 default y 149 default y
130 150
131config FSL_BOOKE 151config FSL_BOOKE
@@ -223,9 +243,17 @@ config PPC_MMU_NOHASH
223 def_bool y 243 def_bool y
224 depends on !PPC_STD_MMU 244 depends on !PPC_STD_MMU
225 245
246config PPC_MMU_NOHASH_32
247 def_bool y
248 depends on PPC_MMU_NOHASH && PPC32
249
250config PPC_MMU_NOHASH_64
251 def_bool y
252 depends on PPC_MMU_NOHASH && PPC64
253
226config PPC_BOOK3E_MMU 254config PPC_BOOK3E_MMU
227 def_bool y 255 def_bool y
228 depends on FSL_BOOKE 256 depends on FSL_BOOKE || PPC_BOOK3E
229 257
230config PPC_MM_SLICES 258config PPC_MM_SLICES
231 bool 259 bool
@@ -257,7 +285,7 @@ config PPC_PERF_CTRS
257 This enables the powerpc-specific perf_counter back-end. 285 This enables the powerpc-specific perf_counter back-end.
258 286
259config SMP 287config SMP
260 depends on PPC_STD_MMU || FSL_BOOKE 288 depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE
261 bool "Symmetric multi-processing support" 289 bool "Symmetric multi-processing support"
262 ---help--- 290 ---help---
263 This enables support for systems with more than one CPU. If you have 291 This enables support for systems with more than one CPU. If you have
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c
index 443035366c12..9290a7a442d0 100644
--- a/arch/powerpc/platforms/amigaone/setup.c
+++ b/arch/powerpc/platforms/amigaone/setup.c
@@ -110,13 +110,16 @@ void __init amigaone_init_IRQ(void)
110 irq_set_default_host(i8259_get_host()); 110 irq_set_default_host(i8259_get_host());
111} 111}
112 112
113void __init amigaone_init(void) 113static int __init request_isa_regions(void)
114{ 114{
115 request_region(0x00, 0x20, "dma1"); 115 request_region(0x00, 0x20, "dma1");
116 request_region(0x40, 0x20, "timer"); 116 request_region(0x40, 0x20, "timer");
117 request_region(0x80, 0x10, "dma page reg"); 117 request_region(0x80, 0x10, "dma page reg");
118 request_region(0xc0, 0x20, "dma2"); 118 request_region(0xc0, 0x20, "dma2");
119
120 return 0;
119} 121}
122machine_device_initcall(amigaone, request_isa_regions);
120 123
121void amigaone_restart(char *cmd) 124void amigaone_restart(char *cmd)
122{ 125{
@@ -161,7 +164,6 @@ define_machine(amigaone) {
161 .name = "AmigaOne", 164 .name = "AmigaOne",
162 .probe = amigaone_probe, 165 .probe = amigaone_probe,
163 .setup_arch = amigaone_setup_arch, 166 .setup_arch = amigaone_setup_arch,
164 .init = amigaone_init,
165 .show_cpuinfo = amigaone_show_cpuinfo, 167 .show_cpuinfo = amigaone_show_cpuinfo,
166 .init_IRQ = amigaone_init_IRQ, 168 .init_IRQ = amigaone_init_IRQ,
167 .restart = amigaone_restart, 169 .restart = amigaone_restart,
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 50f17bdd3c16..48cd7d2e1b75 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -80,13 +80,6 @@ config SPU_FS_64K_LS
80 uses 4K pages. This can improve performances of applications 80 uses 4K pages. This can improve performances of applications
81 using multiple SPEs by lowering the TLB pressure on them. 81 using multiple SPEs by lowering the TLB pressure on them.
82 82
83config SPU_TRACE
84 tristate "SPU event tracing support"
85 depends on SPU_FS && MARKERS
86 help
87 This option allows reading a trace of spu-related events through
88 the sputrace file in procfs.
89
90config SPU_BASE 83config SPU_BASE
91 bool 84 bool
92 default n 85 default n
diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c
index 07c234f6b2b6..e53845579770 100644
--- a/arch/powerpc/platforms/cell/celleb_setup.c
+++ b/arch/powerpc/platforms/cell/celleb_setup.c
@@ -80,8 +80,7 @@ static void celleb_show_cpuinfo(struct seq_file *m)
80 80
81static int __init celleb_machine_type_hack(char *ptr) 81static int __init celleb_machine_type_hack(char *ptr)
82{ 82{
83 strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); 83 strlcpy(celleb_machine_type, ptr, sizeof(celleb_machine_type));
84 celleb_machine_type[sizeof(celleb_machine_type)-1] = 0;
85 return 0; 84 return 0;
86} 85}
87 86
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 5b34fc211f35..416db17eb18f 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struct device *dev, u64 mask)
642 642
643static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); 643static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
644 644
645struct dma_mapping_ops dma_iommu_fixed_ops = { 645struct dma_map_ops dma_iommu_fixed_ops = {
646 .alloc_coherent = dma_fixed_alloc_coherent, 646 .alloc_coherent = dma_fixed_alloc_coherent,
647 .free_coherent = dma_fixed_free_coherent, 647 .free_coherent = dma_fixed_free_coherent,
648 .map_sg = dma_fixed_map_sg, 648 .map_sg = dma_fixed_map_sg,
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index bc97fada48c6..f774530075b7 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -58,8 +58,6 @@
58 */ 58 */
59static cpumask_t of_spin_map; 59static cpumask_t of_spin_map;
60 60
61extern void generic_secondary_smp_init(unsigned long);
62
63/** 61/**
64 * smp_startup_cpu() - start the given cpu 62 * smp_startup_cpu() - start the given cpu
65 * 63 *
diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile
index 99610a6361f2..b93f877ba504 100644
--- a/arch/powerpc/platforms/cell/spufs/Makefile
+++ b/arch/powerpc/platforms/cell/spufs/Makefile
@@ -4,7 +4,8 @@ spufs-y += inode.o file.o context.o syscalls.o coredump.o
4spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o 4spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o
5spufs-y += switch.o fault.o lscsa_alloc.o 5spufs-y += switch.o fault.o lscsa_alloc.o
6 6
7obj-$(CONFIG_SPU_TRACE) += sputrace.o 7# magic for the trace events
8CFLAGS_sched.o := -I$(src)
8 9
9# Rules to build switch.o with the help of SPU tool chain 10# Rules to build switch.o with the help of SPU tool chain
10SPU_CROSS := spu- 11SPU_CROSS := spu-
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index db5398c0339f..0c87bcd2452a 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -28,6 +28,7 @@
28#include <asm/spu.h> 28#include <asm/spu.h>
29#include <asm/spu_csa.h> 29#include <asm/spu_csa.h>
30#include "spufs.h" 30#include "spufs.h"
31#include "sputrace.h"
31 32
32 33
33atomic_t nr_spu_contexts = ATOMIC_INIT(0); 34atomic_t nr_spu_contexts = ATOMIC_INIT(0);
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index d6a519e6e1c1..ab8aef9bb8ea 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -38,6 +38,7 @@
38#include <asm/uaccess.h> 38#include <asm/uaccess.h>
39 39
40#include "spufs.h" 40#include "spufs.h"
41#include "sputrace.h"
41 42
42#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) 43#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
43 44
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index f085369301b1..bb5b77c66d05 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -47,6 +47,8 @@
47#include <asm/spu_csa.h> 47#include <asm/spu_csa.h>
48#include <asm/spu_priv1.h> 48#include <asm/spu_priv1.h>
49#include "spufs.h" 49#include "spufs.h"
50#define CREATE_TRACE_POINTS
51#include "sputrace.h"
50 52
51struct spu_prio_array { 53struct spu_prio_array {
52 DECLARE_BITMAP(bitmap, MAX_PRIO); 54 DECLARE_BITMAP(bitmap, MAX_PRIO);
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index ae31573bea4a..c448bac65518 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -373,9 +373,4 @@ extern void spu_free_lscsa(struct spu_state *csa);
373extern void spuctx_switch_state(struct spu_context *ctx, 373extern void spuctx_switch_state(struct spu_context *ctx,
374 enum spu_utilization_state new_state); 374 enum spu_utilization_state new_state);
375 375
376#define spu_context_trace(name, ctx, spu) \
377 trace_mark(name, "ctx %p spu %p", ctx, spu);
378#define spu_context_nospu_trace(name, ctx) \
379 trace_mark(name, "ctx %p", ctx);
380
381#endif 376#endif
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
deleted file mode 100644
index d0b1f3f4d9c8..000000000000
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ /dev/null
@@ -1,272 +0,0 @@
1/*
2 * Copyright (C) 2007 IBM Deutschland Entwicklung GmbH
3 * Released under GPL v2.
4 *
5 * Partially based on net/ipv4/tcp_probe.c.
6 *
7 * Simple tracing facility for spu contexts.
8 */
9#include <linux/sched.h>
10#include <linux/kernel.h>
11#include <linux/module.h>
12#include <linux/marker.h>
13#include <linux/proc_fs.h>
14#include <linux/wait.h>
15#include <asm/atomic.h>
16#include <asm/uaccess.h>
17#include "spufs.h"
18
19struct spu_probe {
20 const char *name;
21 const char *format;
22 marker_probe_func *probe_func;
23};
24
25struct sputrace {
26 ktime_t tstamp;
27 int owner_tid; /* owner */
28 int curr_tid;
29 const char *name;
30 int number;
31};
32
33static int bufsize __read_mostly = 16384;
34MODULE_PARM_DESC(bufsize, "Log buffer size (number of records)");
35module_param(bufsize, int, 0);
36
37
38static DEFINE_SPINLOCK(sputrace_lock);
39static DECLARE_WAIT_QUEUE_HEAD(sputrace_wait);
40static ktime_t sputrace_start;
41static unsigned long sputrace_head, sputrace_tail;
42static struct sputrace *sputrace_log;
43static int sputrace_logging;
44
45static int sputrace_used(void)
46{
47 return (sputrace_head - sputrace_tail) % bufsize;
48}
49
50static inline int sputrace_avail(void)
51{
52 return bufsize - sputrace_used();
53}
54
55static int sputrace_sprint(char *tbuf, int n)
56{
57 const struct sputrace *t = sputrace_log + sputrace_tail % bufsize;
58 struct timespec tv =
59 ktime_to_timespec(ktime_sub(t->tstamp, sputrace_start));
60
61 return snprintf(tbuf, n,
62 "[%lu.%09lu] %d: %s (ctxthread = %d, spu = %d)\n",
63 (unsigned long) tv.tv_sec,
64 (unsigned long) tv.tv_nsec,
65 t->curr_tid,
66 t->name,
67 t->owner_tid,
68 t->number);
69}
70
71static ssize_t sputrace_read(struct file *file, char __user *buf,
72 size_t len, loff_t *ppos)
73{
74 int error = 0, cnt = 0;
75
76 if (!buf || len < 0)
77 return -EINVAL;
78
79 while (cnt < len) {
80 char tbuf[128];
81 int width;
82
83 /* If we have data ready to return, don't block waiting
84 * for more */
85 if (cnt > 0 && sputrace_used() == 0)
86 break;
87
88 error = wait_event_interruptible(sputrace_wait,
89 sputrace_used() > 0);
90 if (error)
91 break;
92
93 spin_lock(&sputrace_lock);
94 if (sputrace_head == sputrace_tail) {
95 spin_unlock(&sputrace_lock);
96 continue;
97 }
98
99 width = sputrace_sprint(tbuf, sizeof(tbuf));
100 if (width < len)
101 sputrace_tail = (sputrace_tail + 1) % bufsize;
102 spin_unlock(&sputrace_lock);
103
104 if (width >= len)
105 break;
106
107 error = copy_to_user(buf + cnt, tbuf, width);
108 if (error)
109 break;
110 cnt += width;
111 }
112
113 return cnt == 0 ? error : cnt;
114}
115
116static int sputrace_open(struct inode *inode, struct file *file)
117{
118 int rc;
119
120 spin_lock(&sputrace_lock);
121 if (sputrace_logging) {
122 rc = -EBUSY;
123 goto out;
124 }
125
126 sputrace_logging = 1;
127 sputrace_head = sputrace_tail = 0;
128 sputrace_start = ktime_get();
129 rc = 0;
130
131out:
132 spin_unlock(&sputrace_lock);
133 return rc;
134}
135
136static int sputrace_release(struct inode *inode, struct file *file)
137{
138 spin_lock(&sputrace_lock);
139 sputrace_logging = 0;
140 spin_unlock(&sputrace_lock);
141 return 0;
142}
143
144static const struct file_operations sputrace_fops = {
145 .owner = THIS_MODULE,
146 .open = sputrace_open,
147 .read = sputrace_read,
148 .release = sputrace_release,
149};
150
151static void sputrace_log_item(const char *name, struct spu_context *ctx,
152 struct spu *spu)
153{
154 spin_lock(&sputrace_lock);
155
156 if (!sputrace_logging) {
157 spin_unlock(&sputrace_lock);
158 return;
159 }
160
161 if (sputrace_avail() > 1) {
162 struct sputrace *t = sputrace_log + sputrace_head;
163
164 t->tstamp = ktime_get();
165 t->owner_tid = ctx->tid;
166 t->name = name;
167 t->curr_tid = current->pid;
168 t->number = spu ? spu->number : -1;
169
170 sputrace_head = (sputrace_head + 1) % bufsize;
171 } else {
172 printk(KERN_WARNING
173 "sputrace: lost samples due to full buffer.\n");
174 }
175 spin_unlock(&sputrace_lock);
176
177 wake_up(&sputrace_wait);
178}
179
180static void spu_context_event(void *probe_private, void *call_data,
181 const char *format, va_list *args)
182{
183 struct spu_probe *p = probe_private;
184 struct spu_context *ctx;
185 struct spu *spu;
186
187 ctx = va_arg(*args, struct spu_context *);
188 spu = va_arg(*args, struct spu *);
189
190 sputrace_log_item(p->name, ctx, spu);
191}
192
193static void spu_context_nospu_event(void *probe_private, void *call_data,
194 const char *format, va_list *args)
195{
196 struct spu_probe *p = probe_private;
197 struct spu_context *ctx;
198
199 ctx = va_arg(*args, struct spu_context *);
200
201 sputrace_log_item(p->name, ctx, NULL);
202}
203
204struct spu_probe spu_probes[] = {
205 { "spu_bind_context__enter", "ctx %p spu %p", spu_context_event },
206 { "spu_unbind_context__enter", "ctx %p spu %p", spu_context_event },
207 { "spu_get_idle__enter", "ctx %p", spu_context_nospu_event },
208 { "spu_get_idle__found", "ctx %p spu %p", spu_context_event },
209 { "spu_get_idle__not_found", "ctx %p", spu_context_nospu_event },
210 { "spu_find_victim__enter", "ctx %p", spu_context_nospu_event },
211 { "spusched_tick__preempt", "ctx %p spu %p", spu_context_event },
212 { "spusched_tick__newslice", "ctx %p", spu_context_nospu_event },
213 { "spu_yield__enter", "ctx %p", spu_context_nospu_event },
214 { "spu_deactivate__enter", "ctx %p", spu_context_nospu_event },
215 { "__spu_deactivate__unload", "ctx %p spu %p", spu_context_event },
216 { "spufs_ps_fault__enter", "ctx %p", spu_context_nospu_event },
217 { "spufs_ps_fault__sleep", "ctx %p", spu_context_nospu_event },
218 { "spufs_ps_fault__wake", "ctx %p spu %p", spu_context_event },
219 { "spufs_ps_fault__insert", "ctx %p spu %p", spu_context_event },
220 { "spu_acquire_saved__enter", "ctx %p", spu_context_nospu_event },
221 { "destroy_spu_context__enter", "ctx %p", spu_context_nospu_event },
222 { "spufs_stop_callback__enter", "ctx %p spu %p", spu_context_event },
223};
224
225static int __init sputrace_init(void)
226{
227 struct proc_dir_entry *entry;
228 int i, error = -ENOMEM;
229
230 sputrace_log = kcalloc(bufsize, sizeof(struct sputrace), GFP_KERNEL);
231 if (!sputrace_log)
232 goto out;
233
234 entry = proc_create("sputrace", S_IRUSR, NULL, &sputrace_fops);
235 if (!entry)
236 goto out_free_log;
237
238 for (i = 0; i < ARRAY_SIZE(spu_probes); i++) {
239 struct spu_probe *p = &spu_probes[i];
240
241 error = marker_probe_register(p->name, p->format,
242 p->probe_func, p);
243 if (error)
244 printk(KERN_INFO "Unable to register probe %s\n",
245 p->name);
246 }
247
248 return 0;
249
250out_free_log:
251 kfree(sputrace_log);
252out:
253 return -ENOMEM;
254}
255
256static void __exit sputrace_exit(void)
257{
258 int i;
259
260 for (i = 0; i < ARRAY_SIZE(spu_probes); i++)
261 marker_probe_unregister(spu_probes[i].name,
262 spu_probes[i].probe_func, &spu_probes[i]);
263
264 remove_proc_entry("sputrace", NULL);
265 kfree(sputrace_log);
266 marker_synchronize_unregister();
267}
268
269module_init(sputrace_init);
270module_exit(sputrace_exit);
271
272MODULE_LICENSE("GPL");
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.h b/arch/powerpc/platforms/cell/spufs/sputrace.h
new file mode 100644
index 000000000000..db2656aa4103
--- /dev/null
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.h
@@ -0,0 +1,39 @@
1#if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_SPUFS_H
3
4#include <linux/tracepoint.h>
5
6#undef TRACE_SYSTEM
7#define TRACE_SYSTEM spufs
8
9TRACE_EVENT(spufs_context,
10 TP_PROTO(struct spu_context *ctx, struct spu *spu, const char *name),
11 TP_ARGS(ctx, spu, name),
12
13 TP_STRUCT__entry(
14 __field(const char *, name)
15 __field(int, owner_tid)
16 __field(int, number)
17 ),
18
19 TP_fast_assign(
20 __entry->name = name;
21 __entry->owner_tid = ctx->tid;
22 __entry->number = spu ? spu->number : -1;
23 ),
24
25 TP_printk("%s (ctxthread = %d, spu = %d)",
26 __entry->name, __entry->owner_tid, __entry->number)
27);
28
29#define spu_context_trace(name, ctx, spu) \
30 trace_spufs_context(ctx, spu, __stringify(name))
31#define spu_context_nospu_trace(name, ctx) \
32 trace_spufs_context(ctx, NULL, __stringify(name))
33
34#endif /* _TRACE_SPUFS_H */
35
36#undef TRACE_INCLUDE_PATH
37#define TRACE_INCLUDE_PATH .
38#define TRACE_INCLUDE_FILE sputrace
39#include <trace/define_trace.h>
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S
index 2f581521eb9b..5369653dcf6a 100644
--- a/arch/powerpc/platforms/iseries/exception.S
+++ b/arch/powerpc/platforms/iseries/exception.S
@@ -47,7 +47,7 @@ system_reset_iSeries:
47 LOAD_REG_ADDR(r13, paca) 47 LOAD_REG_ADDR(r13, paca)
48 mulli r0,r23,PACA_SIZE 48 mulli r0,r23,PACA_SIZE
49 add r13,r13,r0 49 add r13,r13,r0
50 mtspr SPRN_SPRG3,r13 /* Save it away for the future */ 50 mtspr SPRN_SPRG_PACA,r13 /* Save it away for the future */
51 mfmsr r24 51 mfmsr r24
52 ori r24,r24,MSR_RI 52 ori r24,r24,MSR_RI
53 mtmsrd r24 /* RI on */ 53 mtmsrd r24 /* RI on */
@@ -116,7 +116,7 @@ iSeries_secondary_smp_loop:
116#endif /* CONFIG_SMP */ 116#endif /* CONFIG_SMP */
117 li r0,-1 /* r0=-1 indicates a Hypervisor call */ 117 li r0,-1 /* r0=-1 indicates a Hypervisor call */
118 sc /* Invoke the hypervisor via a system call */ 118 sc /* Invoke the hypervisor via a system call */
119 mfspr r13,SPRN_SPRG3 /* Put r13 back ???? */ 119 mfspr r13,SPRN_SPRG_PACA /* Put r13 back ???? */
120 b 2b /* If SMP not configured, secondaries 120 b 2b /* If SMP not configured, secondaries
121 * loop forever */ 121 * loop forever */
122 122
@@ -126,34 +126,45 @@ iSeries_secondary_smp_loop:
126 126
127 .globl data_access_iSeries 127 .globl data_access_iSeries
128data_access_iSeries: 128data_access_iSeries:
129 mtspr SPRN_SPRG1,r13 129 mtspr SPRN_SPRG_SCRATCH0,r13
130BEGIN_FTR_SECTION 130BEGIN_FTR_SECTION
131 mtspr SPRN_SPRG2,r12 131 mfspr r13,SPRN_SPRG_PACA
132 mfspr r13,SPRN_DAR 132 std r9,PACA_EXSLB+EX_R9(r13)
133 mfspr r12,SPRN_DSISR 133 std r10,PACA_EXSLB+EX_R10(r13)
134 srdi r13,r13,60 134 mfspr r10,SPRN_DAR
135 rlwimi r13,r12,16,0x20 135 mfspr r9,SPRN_DSISR
136 mfcr r12 136 srdi r10,r10,60
137 cmpwi r13,0x2c 137 rlwimi r10,r9,16,0x20
138 mfcr r9
139 cmpwi r10,0x2c
138 beq .do_stab_bolted_iSeries 140 beq .do_stab_bolted_iSeries
139 mtcrf 0x80,r12 141 ld r10,PACA_EXSLB+EX_R10(r13)
140 mfspr r12,SPRN_SPRG2 142 std r11,PACA_EXGEN+EX_R11(r13)
141END_FTR_SECTION_IFCLR(CPU_FTR_SLB) 143 ld r11,PACA_EXSLB+EX_R9(r13)
144 std r12,PACA_EXGEN+EX_R12(r13)
145 mfspr r12,SPRN_SPRG_SCRATCH0
146 std r10,PACA_EXGEN+EX_R10(r13)
147 std r11,PACA_EXGEN+EX_R9(r13)
148 std r12,PACA_EXGEN+EX_R13(r13)
149 EXCEPTION_PROLOG_ISERIES_1
150FTR_SECTION_ELSE
142 EXCEPTION_PROLOG_1(PACA_EXGEN) 151 EXCEPTION_PROLOG_1(PACA_EXGEN)
143 EXCEPTION_PROLOG_ISERIES_1 152 EXCEPTION_PROLOG_ISERIES_1
153ALT_FTR_SECTION_END_IFCLR(CPU_FTR_SLB)
144 b data_access_common 154 b data_access_common
145 155
146.do_stab_bolted_iSeries: 156.do_stab_bolted_iSeries:
147 mtcrf 0x80,r12 157 std r11,PACA_EXSLB+EX_R11(r13)
148 mfspr r12,SPRN_SPRG2 158 std r12,PACA_EXSLB+EX_R12(r13)
149 EXCEPTION_PROLOG_1(PACA_EXSLB) 159 mfspr r10,SPRN_SPRG_SCRATCH0
160 std r10,PACA_EXSLB+EX_R13(r13)
150 EXCEPTION_PROLOG_ISERIES_1 161 EXCEPTION_PROLOG_ISERIES_1
151 b .do_stab_bolted 162 b .do_stab_bolted
152 163
153 .globl data_access_slb_iSeries 164 .globl data_access_slb_iSeries
154data_access_slb_iSeries: 165data_access_slb_iSeries:
155 mtspr SPRN_SPRG1,r13 /* save r13 */ 166 mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */
156 mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ 167 mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */
157 std r3,PACA_EXSLB+EX_R3(r13) 168 std r3,PACA_EXSLB+EX_R3(r13)
158 mfspr r3,SPRN_DAR 169 mfspr r3,SPRN_DAR
159 std r9,PACA_EXSLB+EX_R9(r13) 170 std r9,PACA_EXSLB+EX_R9(r13)
@@ -165,7 +176,7 @@ data_access_slb_iSeries:
165 std r10,PACA_EXSLB+EX_R10(r13) 176 std r10,PACA_EXSLB+EX_R10(r13)
166 std r11,PACA_EXSLB+EX_R11(r13) 177 std r11,PACA_EXSLB+EX_R11(r13)
167 std r12,PACA_EXSLB+EX_R12(r13) 178 std r12,PACA_EXSLB+EX_R12(r13)
168 mfspr r10,SPRN_SPRG1 179 mfspr r10,SPRN_SPRG_SCRATCH0
169 std r10,PACA_EXSLB+EX_R13(r13) 180 std r10,PACA_EXSLB+EX_R13(r13)
170 ld r12,PACALPPACAPTR(r13) 181 ld r12,PACALPPACAPTR(r13)
171 ld r12,LPPACASRR1(r12) 182 ld r12,LPPACASRR1(r12)
@@ -175,8 +186,8 @@ data_access_slb_iSeries:
175 186
176 .globl instruction_access_slb_iSeries 187 .globl instruction_access_slb_iSeries
177instruction_access_slb_iSeries: 188instruction_access_slb_iSeries:
178 mtspr SPRN_SPRG1,r13 /* save r13 */ 189 mtspr SPRN_SPRG_SCRATCH0,r13 /* save r13 */
179 mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ 190 mfspr r13,SPRN_SPRG_PACA /* get paca address into r13 */
180 std r3,PACA_EXSLB+EX_R3(r13) 191 std r3,PACA_EXSLB+EX_R3(r13)
181 ld r3,PACALPPACAPTR(r13) 192 ld r3,PACALPPACAPTR(r13)
182 ld r3,LPPACASRR0(r3) /* get SRR0 value */ 193 ld r3,LPPACASRR0(r3) /* get SRR0 value */
@@ -189,7 +200,7 @@ instruction_access_slb_iSeries:
189 std r10,PACA_EXSLB+EX_R10(r13) 200 std r10,PACA_EXSLB+EX_R10(r13)
190 std r11,PACA_EXSLB+EX_R11(r13) 201 std r11,PACA_EXSLB+EX_R11(r13)
191 std r12,PACA_EXSLB+EX_R12(r13) 202 std r12,PACA_EXSLB+EX_R12(r13)
192 mfspr r10,SPRN_SPRG1 203 mfspr r10,SPRN_SPRG_SCRATCH0
193 std r10,PACA_EXSLB+EX_R13(r13) 204 std r10,PACA_EXSLB+EX_R13(r13)
194 ld r12,PACALPPACAPTR(r13) 205 ld r12,PACALPPACAPTR(r13)
195 ld r12,LPPACASRR1(r12) 206 ld r12,LPPACASRR1(r12)
@@ -200,7 +211,7 @@ slb_miss_user_iseries:
200 std r10,PACA_EXGEN+EX_R10(r13) 211 std r10,PACA_EXGEN+EX_R10(r13)
201 std r11,PACA_EXGEN+EX_R11(r13) 212 std r11,PACA_EXGEN+EX_R11(r13)
202 std r12,PACA_EXGEN+EX_R12(r13) 213 std r12,PACA_EXGEN+EX_R12(r13)
203 mfspr r10,SPRG1 214 mfspr r10,SPRG_SCRATCH0
204 ld r11,PACA_EXSLB+EX_R9(r13) 215 ld r11,PACA_EXSLB+EX_R9(r13)
205 ld r12,PACA_EXSLB+EX_R3(r13) 216 ld r12,PACA_EXSLB+EX_R3(r13)
206 std r10,PACA_EXGEN+EX_R13(r13) 217 std r10,PACA_EXGEN+EX_R13(r13)
@@ -221,7 +232,7 @@ slb_miss_user_iseries:
221 .globl system_call_iSeries 232 .globl system_call_iSeries
222system_call_iSeries: 233system_call_iSeries:
223 mr r9,r13 234 mr r9,r13
224 mfspr r13,SPRN_SPRG3 235 mfspr r13,SPRN_SPRG_PACA
225 EXCEPTION_PROLOG_ISERIES_1 236 EXCEPTION_PROLOG_ISERIES_1
226 b system_call_common 237 b system_call_common
227 238
diff --git a/arch/powerpc/platforms/iseries/exception.h b/arch/powerpc/platforms/iseries/exception.h
index ced45a8fa1aa..bae3fba5ad8e 100644
--- a/arch/powerpc/platforms/iseries/exception.h
+++ b/arch/powerpc/platforms/iseries/exception.h
@@ -24,7 +24,7 @@
24 * as published by the Free Software Foundation; either version 24 * as published by the Free Software Foundation; either version
25 * 2 of the License, or (at your option) any later version. 25 * 2 of the License, or (at your option) any later version.
26 */ 26 */
27#include <asm/exception.h> 27#include <asm/exception-64s.h>
28 28
29#define EXCEPTION_PROLOG_ISERIES_1 \ 29#define EXCEPTION_PROLOG_ISERIES_1 \
30 mfmsr r10; \ 30 mfmsr r10; \
@@ -38,7 +38,7 @@
38 .globl label##_iSeries; \ 38 .globl label##_iSeries; \
39label##_iSeries: \ 39label##_iSeries: \
40 HMT_MEDIUM; \ 40 HMT_MEDIUM; \
41 mtspr SPRN_SPRG1,r13; /* save r13 */ \ 41 mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
42 EXCEPTION_PROLOG_1(area); \ 42 EXCEPTION_PROLOG_1(area); \
43 EXCEPTION_PROLOG_ISERIES_1; \ 43 EXCEPTION_PROLOG_ISERIES_1; \
44 b label##_common 44 b label##_common
@@ -47,7 +47,7 @@ label##_iSeries: \
47 .globl label##_iSeries; \ 47 .globl label##_iSeries; \
48label##_iSeries: \ 48label##_iSeries: \
49 HMT_MEDIUM; \ 49 HMT_MEDIUM; \
50 mtspr SPRN_SPRG1,r13; /* save r13 */ \ 50 mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
51 EXCEPTION_PROLOG_1(PACA_EXGEN); \ 51 EXCEPTION_PROLOG_1(PACA_EXGEN); \
52 lbz r10,PACASOFTIRQEN(r13); \ 52 lbz r10,PACASOFTIRQEN(r13); \
53 cmpwi 0,r10,0; \ 53 cmpwi 0,r10,0; \
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index fef4d5150517..0d9343df35bc 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -872,7 +872,7 @@ static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
872 count = 256 - off; 872 count = 256 - off;
873 873
874 dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); 874 dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE);
875 if (dma_mapping_error(NULL, dma_addr)) 875 if (dma_addr == DMA_ERROR_CODE)
876 return -ENOMEM; 876 return -ENOMEM;
877 memset(page, 0, off + count); 877 memset(page, 0, off + count);
878 memset(&vsp_cmd, 0, sizeof(vsp_cmd)); 878 memset(&vsp_cmd, 0, sizeof(vsp_cmd));
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
index 43911d8b0206..75b296bc51af 100644
--- a/arch/powerpc/platforms/pasemi/idle.c
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -90,7 +90,7 @@ machine_late_initcall(pasemi, pasemi_idle_init);
90static int __init idle_param(char *p) 90static int __init idle_param(char *p)
91{ 91{
92 int i; 92 int i;
93 for (i = 0; i < sizeof(modes)/sizeof(struct sleep_mode); i++) { 93 for (i = 0; i < ARRAY_SIZE(modes); i++) {
94 if (!strcmp(modes[i].name, p)) { 94 if (!strcmp(modes[i].name, p)) {
95 current_mode = i; 95 current_mode = i;
96 break; 96 break;
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index 65c585b8b00d..08d94e4cedd3 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -44,14 +44,6 @@
44 */ 44 */
45#undef DEBUG_FREQ 45#undef DEBUG_FREQ
46 46
47/*
48 * There is a problem with the core cpufreq code on SMP kernels,
49 * it won't recalculate the Bogomips properly
50 */
51#ifdef CONFIG_SMP
52#warning "WARNING, CPUFREQ not recommended on SMP kernels"
53#endif
54
55extern void low_choose_7447a_dfs(int dfs); 47extern void low_choose_7447a_dfs(int dfs);
56extern void low_choose_750fx_pll(int pll); 48extern void low_choose_750fx_pll(int pll);
57extern void low_sleep_handler(void); 49extern void low_sleep_handler(void);
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index e6c0040ee797..fbc9bbd74dbd 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -2419,13 +2419,13 @@ static int __init probe_motherboard(void)
2419 dt = of_find_node_by_name(NULL, "device-tree"); 2419 dt = of_find_node_by_name(NULL, "device-tree");
2420 if (dt != NULL) 2420 if (dt != NULL)
2421 model = of_get_property(dt, "model", NULL); 2421 model = of_get_property(dt, "model", NULL);
2422 for(i=0; model && i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) { 2422 for(i=0; model && i<ARRAY_SIZE(pmac_mb_defs); i++) {
2423 if (strcmp(model, pmac_mb_defs[i].model_string) == 0) { 2423 if (strcmp(model, pmac_mb_defs[i].model_string) == 0) {
2424 pmac_mb = pmac_mb_defs[i]; 2424 pmac_mb = pmac_mb_defs[i];
2425 goto found; 2425 goto found;
2426 } 2426 }
2427 } 2427 }
2428 for(i=0; i<(sizeof(pmac_mb_defs)/sizeof(struct pmac_mb_def)); i++) { 2428 for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) {
2429 if (machine_is_compatible(pmac_mb_defs[i].model_string)) { 2429 if (machine_is_compatible(pmac_mb_defs[i].model_string)) {
2430 pmac_mb = pmac_mb_defs[i]; 2430 pmac_mb = pmac_mb_defs[i];
2431 goto found; 2431 goto found;
@@ -2589,9 +2589,16 @@ static void __init probe_uninorth(void)
2589 if (address == 0) 2589 if (address == 0)
2590 return; 2590 return;
2591 uninorth_base = ioremap(address, 0x40000); 2591 uninorth_base = ioremap(address, 0x40000);
2592 if (uninorth_base == NULL)
2593 return;
2592 uninorth_rev = in_be32(UN_REG(UNI_N_VERSION)); 2594 uninorth_rev = in_be32(UN_REG(UNI_N_VERSION));
2593 if (uninorth_maj == 3 || uninorth_maj == 4) 2595 if (uninorth_maj == 3 || uninorth_maj == 4) {
2594 u3_ht_base = ioremap(address + U3_HT_CONFIG_BASE, 0x1000); 2596 u3_ht_base = ioremap(address + U3_HT_CONFIG_BASE, 0x1000);
2597 if (u3_ht_base == NULL) {
2598 iounmap(uninorth_base);
2599 return;
2600 }
2601 }
2595 2602
2596 printk(KERN_INFO "Found %s memory controller & host bridge" 2603 printk(KERN_INFO "Found %s memory controller & host bridge"
2597 " @ 0x%08x revision: 0x%02x\n", uninorth_maj == 3 ? "U3" : 2604 " @ 0x%08x revision: 0x%02x\n", uninorth_maj == 3 ? "U3" :
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 04cdd32624d4..e81403b245b5 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -1286,3 +1286,64 @@ static void fixup_k2_sata(struct pci_dev* dev)
1286} 1286}
1287DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata); 1287DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 0x0240, fixup_k2_sata);
1288 1288
1289/*
1290 * On U4 (aka CPC945) the PCIe root complex "P2P" bridge resource ranges aren't
1291 * configured by the firmware. The bridge itself seems to ignore them but it
1292 * causes problems with Linux which then re-assigns devices below the bridge,
1293 * thus changing addresses of those devices from what was in the device-tree,
1294 * which sucks when those are video cards using offb
1295 *
1296 * We could just mark it transparent but I prefer fixing up the resources to
1297 * properly show what's going on here, as I have some doubts about having them
1298 * badly configured potentially being an issue for DMA.
1299 *
1300 * We leave PIO alone, it seems to be fine
1301 *
1302 * Oh and there's another funny bug. The OF properties advertize the region
1303 * 0xf1000000..0xf1ffffff as being forwarded as memory space. But that's
1304 * actually not true, this region is the memory mapped config space. So we
1305 * also need to filter it out or we'll map things in the wrong place.
1306 */
1307static void fixup_u4_pcie(struct pci_dev* dev)
1308{
1309 struct pci_controller *host = pci_bus_to_host(dev->bus);
1310 struct resource *region = NULL;
1311 u32 reg;
1312 int i;
1313
1314 /* Only do that on PowerMac */
1315 if (!machine_is(powermac))
1316 return;
1317
1318 /* Find the largest MMIO region */
1319 for (i = 0; i < 3; i++) {
1320 struct resource *r = &host->mem_resources[i];
1321 if (!(r->flags & IORESOURCE_MEM))
1322 continue;
1323 /* Skip the 0xf0xxxxxx..f2xxxxxx regions, we know they
1324 * are reserved by HW for other things
1325 */
1326 if (r->start >= 0xf0000000 && r->start < 0xf3000000)
1327 continue;
1328 if (!region || (r->end - r->start) >
1329 (region->end - region->start))
1330 region = r;
1331 }
1332 /* Nothing found, bail */
1333 if (region == 0)
1334 return;
1335
1336 /* Print things out */
1337 printk(KERN_INFO "PCI: Fixup U4 PCIe bridge range: %pR\n", region);
1338
1339 /* Fixup bridge config space. We know it's a Mac, resource aren't
1340 * offset so let's just blast them as-is. We also know that they
1341 * fit in 32 bits
1342 */
1343 reg = ((region->start >> 16) & 0xfff0) | (region->end & 0xfff00000);
1344 pci_write_config_dword(dev, PCI_MEMORY_BASE, reg);
1345 pci_write_config_dword(dev, PCI_PREF_BASE_UPPER32, 0);
1346 pci_write_config_dword(dev, PCI_PREF_LIMIT_UPPER32, 0);
1347 pci_write_config_dword(dev, PCI_PREF_MEMORY_BASE, 0);
1348}
1349DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U4_PCIE, fixup_u4_pcie);
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 6d4da7b46b41..937a38e73178 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -408,7 +408,7 @@ static void __init smp_psurge_setup_cpu(int cpu_nr)
408 /* reset the entry point so if we get another intr we won't 408 /* reset the entry point so if we get another intr we won't
409 * try to startup again */ 409 * try to startup again */
410 out_be32(psurge_start, 0x100); 410 out_be32(psurge_start, 0x100);
411 if (setup_irq(30, &psurge_irqaction)) 411 if (setup_irq(irq_create_mapping(NULL, 30), &psurge_irqaction))
412 printk(KERN_ERR "Couldn't get primary IPI interrupt"); 412 printk(KERN_ERR "Couldn't get primary IPI interrupt");
413} 413}
414 414
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 846eb8b57fd1..189a25b80735 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -23,8 +23,8 @@
23#include <linux/memory_hotplug.h> 23#include <linux/memory_hotplug.h>
24#include <linux/lmb.h> 24#include <linux/lmb.h>
25 25
26#include <asm/cell-regs.h>
26#include <asm/firmware.h> 27#include <asm/firmware.h>
27#include <asm/iommu.h>
28#include <asm/prom.h> 28#include <asm/prom.h>
29#include <asm/udbg.h> 29#include <asm/udbg.h>
30#include <asm/lv1call.h> 30#include <asm/lv1call.h>
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 3f763c5284ac..e34b305a7a52 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -27,7 +27,7 @@
27#include <asm/udbg.h> 27#include <asm/udbg.h>
28#include <asm/lv1call.h> 28#include <asm/lv1call.h>
29#include <asm/firmware.h> 29#include <asm/firmware.h>
30#include <asm/iommu.h> 30#include <asm/cell-regs.h>
31 31
32#include "platform.h" 32#include "platform.h"
33 33
@@ -694,7 +694,7 @@ static int ps3_dma_supported(struct device *_dev, u64 mask)
694 return mask >= DMA_BIT_MASK(32); 694 return mask >= DMA_BIT_MASK(32);
695} 695}
696 696
697static struct dma_mapping_ops ps3_sb_dma_ops = { 697static struct dma_map_ops ps3_sb_dma_ops = {
698 .alloc_coherent = ps3_alloc_coherent, 698 .alloc_coherent = ps3_alloc_coherent,
699 .free_coherent = ps3_free_coherent, 699 .free_coherent = ps3_free_coherent,
700 .map_sg = ps3_sb_map_sg, 700 .map_sg = ps3_sb_map_sg,
@@ -704,7 +704,7 @@ static struct dma_mapping_ops ps3_sb_dma_ops = {
704 .unmap_page = ps3_unmap_page, 704 .unmap_page = ps3_unmap_page,
705}; 705};
706 706
707static struct dma_mapping_ops ps3_ioc0_dma_ops = { 707static struct dma_map_ops ps3_ioc0_dma_ops = {
708 .alloc_coherent = ps3_alloc_coherent, 708 .alloc_coherent = ps3_alloc_coherent,
709 .free_coherent = ps3_free_coherent, 709 .free_coherent = ps3_free_coherent,
710 .map_sg = ps3_ioc0_map_sg, 710 .map_sg = ps3_ioc0_map_sg,
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index ad152a0e3946..b6fa3e4b51b5 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -151,7 +151,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
151 if (dn->child) 151 if (dn->child)
152 eeh_add_device_tree_early(dn); 152 eeh_add_device_tree_early(dn);
153 153
154 scan_phb(phb); 154 pcibios_scan_phb(phb, dn);
155 pcibios_finish_adding_to_bus(phb->bus); 155 pcibios_finish_adding_to_bus(phb->bus);
156 156
157 return phb; 157 return phb;
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index b6f1b137d427..2e2bbe120b90 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -20,6 +20,7 @@
20#include <asm/machdep.h> 20#include <asm/machdep.h>
21#include <asm/uaccess.h> 21#include <asm/uaccess.h>
22#include <asm/pSeries_reconfig.h> 22#include <asm/pSeries_reconfig.h>
23#include <asm/mmu.h>
23 24
24 25
25 26
@@ -439,9 +440,15 @@ static int do_update_property(char *buf, size_t bufsize)
439 if (!newprop) 440 if (!newprop)
440 return -ENOMEM; 441 return -ENOMEM;
441 442
443 if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size"))
444 slb_set_size(*(int *)value);
445
442 oldprop = of_find_property(np, name,NULL); 446 oldprop = of_find_property(np, name,NULL);
443 if (!oldprop) 447 if (!oldprop) {
448 if (strlen(name))
449 return prom_add_property(np, newprop);
444 return -ENODEV; 450 return -ENODEV;
451 }
445 452
446 rc = prom_update_property(np, newprop, oldprop); 453 rc = prom_update_property(np, newprop, oldprop);
447 if (rc) 454 if (rc)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 8d75ea21296f..ca5f2e10972c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -223,10 +223,6 @@ static void pseries_lpar_enable_pmcs(void)
223 set = 1UL << 63; 223 set = 1UL << 63;
224 reset = 0; 224 reset = 0;
225 plpar_hcall_norets(H_PERFMON, set, reset); 225 plpar_hcall_norets(H_PERFMON, set, reset);
226
227 /* instruct hypervisor to maintain PMCs */
228 if (firmware_has_feature(FW_FEATURE_SPLPAR))
229 get_lppaca()->pmcregs_in_use = 1;
230} 226}
231 227
232static void __init pseries_discover_pic(void) 228static void __init pseries_discover_pic(void)
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 1f8f6cfb94f7..440000cc7130 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -56,8 +56,6 @@
56 */ 56 */
57static cpumask_t of_spin_map; 57static cpumask_t of_spin_map;
58 58
59extern void generic_secondary_smp_init(unsigned long);
60
61/** 59/**
62 * smp_startup_cpu() - start the given cpu 60 * smp_startup_cpu() - start the given cpu
63 * 61 *