aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig3
-rw-r--r--arch/powerpc/boot/Makefile7
-rw-r--r--arch/powerpc/boot/addnote.c41
-rw-r--r--arch/powerpc/boot/cuboot-52xx.c4
-rw-r--r--arch/powerpc/boot/cuboot-acadia.c174
-rw-r--r--arch/powerpc/boot/dts/acadia.dts224
-rw-r--r--arch/powerpc/boot/dts/hcu4.dts168
-rw-r--r--arch/powerpc/boot/libfdt-wrapper.c16
-rw-r--r--arch/powerpc/boot/main.c14
-rw-r--r--arch/powerpc/boot/string.S4
-rwxr-xr-xarch/powerpc/boot/wrapper5
-rw-r--r--arch/powerpc/configs/40x/acadia_defconfig921
-rw-r--r--arch/powerpc/configs/40x/hcu4_defconfig929
-rw-r--r--arch/powerpc/include/asm/page.h5
-rw-r--r--arch/powerpc/kernel/cputable.c13
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c13
-rw-r--r--arch/powerpc/kernel/prom_init.c61
-rw-r--r--arch/powerpc/kernel/prom_init_check.sh2
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
-rw-r--r--arch/powerpc/mm/numa.c21
-rw-r--r--arch/powerpc/oprofile/cell/pr_util.h13
-rw-r--r--arch/powerpc/oprofile/cell/spu_profiler.c4
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c236
-rw-r--r--arch/powerpc/platforms/40x/Kconfig38
-rw-r--r--arch/powerpc/platforms/40x/Makefile2
-rw-r--r--arch/powerpc/platforms/40x/hcu4.c61
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c80
-rw-r--r--arch/powerpc/platforms/44x/Kconfig8
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c7
-rw-r--r--arch/powerpc/platforms/cell/smp.c10
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c155
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c24
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h1
-rw-r--r--arch/powerpc/platforms/cell/spufs/sputrace.c37
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c6
-rw-r--r--arch/powerpc/platforms/pseries/smp.c13
-rw-r--r--arch/powerpc/sysdev/Makefile1
-rw-r--r--arch/powerpc/sysdev/ppc4xx_gpio.c217
39 files changed, 3325 insertions, 218 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index c171f5bcf258..bbe149c26518 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -19,9 +19,6 @@ config WORD_SIZE
19 default 64 if PPC64 19 default 64 if PPC64
20 default 32 if !PPC64 20 default 32 if !PPC64
21 21
22config PPC_MERGE
23 def_bool y
24
25config MMU 22config MMU
26 bool 23 bool
27 default y 24 default y
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index aac1406ccba5..8fc6d72849ae 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -68,7 +68,8 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c
68 fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \ 68 fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \
69 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ 69 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
70 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ 70 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
71 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c 71 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
72 cuboot-acadia.c
72src-boot := $(src-wlib) $(src-plat) empty.c 73src-boot := $(src-wlib) $(src-plat) empty.c
73 74
74src-boot := $(addprefix $(obj)/, $(src-boot)) 75src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -211,6 +212,7 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage
211# Board ports in arch/powerpc/platform/40x/Kconfig 212# Board ports in arch/powerpc/platform/40x/Kconfig
212image-$(CONFIG_EP405) += dtbImage.ep405 213image-$(CONFIG_EP405) += dtbImage.ep405
213image-$(CONFIG_WALNUT) += treeImage.walnut 214image-$(CONFIG_WALNUT) += treeImage.walnut
215image-$(CONFIG_ACADIA) += cuImage.acadia
214 216
215# Board ports in arch/powerpc/platform/44x/Kconfig 217# Board ports in arch/powerpc/platform/44x/Kconfig
216image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony 218image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
@@ -319,6 +321,9 @@ $(obj)/zImage.iseries: vmlinux
319$(obj)/uImage: vmlinux $(wrapperbits) 321$(obj)/uImage: vmlinux $(wrapperbits)
320 $(call if_changed,wrap,uboot) 322 $(call if_changed,wrap,uboot)
321 323
324$(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
325 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
326
322$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) 327$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
323 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb) 328 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb)
324 329
diff --git a/arch/powerpc/boot/addnote.c b/arch/powerpc/boot/addnote.c
index dcc9ab2ca823..3091d1d21aef 100644
--- a/arch/powerpc/boot/addnote.c
+++ b/arch/powerpc/boot/addnote.c
@@ -11,7 +11,7 @@
11 * as published by the Free Software Foundation; either version 11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 * 13 *
14 * Usage: addnote zImage [note.elf] 14 * Usage: addnote [-r realbase] zImage [note.elf]
15 * 15 *
16 * If note.elf is supplied, it is the name of an ELF file that contains 16 * If note.elf is supplied, it is the name of an ELF file that contains
17 * an RPA note to use instead of the built-in one. Alternatively, the 17 * an RPA note to use instead of the built-in one. Alternatively, the
@@ -153,18 +153,31 @@ unsigned char *read_rpanote(const char *fname, int *nnp)
153int 153int
154main(int ac, char **av) 154main(int ac, char **av)
155{ 155{
156 int fd, n, i; 156 int fd, n, i, ai;
157 int ph, ps, np; 157 int ph, ps, np;
158 int nnote, nnote2, ns; 158 int nnote, nnote2, ns;
159 unsigned char *rpap; 159 unsigned char *rpap;
160 160 char *p, *endp;
161 if (ac != 2 && ac != 3) { 161
162 fprintf(stderr, "Usage: %s elf-file [rpanote.elf]\n", av[0]); 162 ai = 1;
163 if (ac >= ai + 2 && strcmp(av[ai], "-r") == 0) {
164 /* process -r realbase */
165 p = av[ai + 1];
166 descr[1] = strtol(p, &endp, 16);
167 if (endp == p || *endp != 0) {
168 fprintf(stderr, "Can't parse -r argument '%s' as hex\n",
169 p);
170 exit(1);
171 }
172 ai += 2;
173 }
174 if (ac != ai + 1 && ac != ai + 2) {
175 fprintf(stderr, "Usage: %s [-r realbase] elf-file [rpanote.elf]\n", av[0]);
163 exit(1); 176 exit(1);
164 } 177 }
165 fd = open(av[1], O_RDWR); 178 fd = open(av[ai], O_RDWR);
166 if (fd < 0) { 179 if (fd < 0) {
167 perror(av[1]); 180 perror(av[ai]);
168 exit(1); 181 exit(1);
169 } 182 }
170 183
@@ -184,12 +197,12 @@ main(int ac, char **av)
184 if (buf[E_IDENT+EI_CLASS] != ELFCLASS32 197 if (buf[E_IDENT+EI_CLASS] != ELFCLASS32
185 || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) { 198 || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) {
186 fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n", 199 fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n",
187 av[1]); 200 av[ai]);
188 exit(1); 201 exit(1);
189 } 202 }
190 203
191 if (ac == 3) 204 if (ac == ai + 2)
192 rpap = read_rpanote(av[2], &nnote2); 205 rpap = read_rpanote(av[ai + 1], &nnote2);
193 206
194 ph = GET_32BE(buf, E_PHOFF); 207 ph = GET_32BE(buf, E_PHOFF);
195 ps = GET_16BE(buf, E_PHENTSIZE); 208 ps = GET_16BE(buf, E_PHENTSIZE);
@@ -202,7 +215,7 @@ main(int ac, char **av)
202 for (i = 0; i < np; ++i) { 215 for (i = 0; i < np; ++i) {
203 if (GET_32BE(buf, ph + PH_TYPE) == PT_NOTE) { 216 if (GET_32BE(buf, ph + PH_TYPE) == PT_NOTE) {
204 fprintf(stderr, "%s already has a note entry\n", 217 fprintf(stderr, "%s already has a note entry\n",
205 av[1]); 218 av[ai]);
206 exit(0); 219 exit(0);
207 } 220 }
208 ph += ps; 221 ph += ps;
@@ -260,18 +273,18 @@ main(int ac, char **av)
260 exit(1); 273 exit(1);
261 } 274 }
262 if (i < n) { 275 if (i < n) {
263 fprintf(stderr, "%s: write truncated\n", av[1]); 276 fprintf(stderr, "%s: write truncated\n", av[ai]);
264 exit(1); 277 exit(1);
265 } 278 }
266 279
267 exit(0); 280 exit(0);
268 281
269 notelf: 282 notelf:
270 fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]); 283 fprintf(stderr, "%s does not appear to be an ELF file\n", av[ai]);
271 exit(1); 284 exit(1);
272 285
273 nospace: 286 nospace:
274 fprintf(stderr, "sorry, I can't find space in %s to put the note\n", 287 fprintf(stderr, "sorry, I can't find space in %s to put the note\n",
275 av[1]); 288 av[ai]);
276 exit(1); 289 exit(1);
277} 290}
diff --git a/arch/powerpc/boot/cuboot-52xx.c b/arch/powerpc/boot/cuboot-52xx.c
index a8611546a656..4c42ec8687be 100644
--- a/arch/powerpc/boot/cuboot-52xx.c
+++ b/arch/powerpc/boot/cuboot-52xx.c
@@ -37,6 +37,10 @@ static void platform_fixups(void)
37 * this can do a simple path lookup. 37 * this can do a simple path lookup.
38 */ 38 */
39 soc = find_node_by_devtype(NULL, "soc"); 39 soc = find_node_by_devtype(NULL, "soc");
40 if (!soc)
41 soc = find_node_by_compatible(NULL, "fsl,mpc5200-immr");
42 if (!soc)
43 soc = find_node_by_compatible(NULL, "fsl,mpc5200b-immr");
40 if (soc) { 44 if (soc) {
41 setprop(soc, "bus-frequency", &bd.bi_ipbfreq, 45 setprop(soc, "bus-frequency", &bd.bi_ipbfreq,
42 sizeof(bd.bi_ipbfreq)); 46 sizeof(bd.bi_ipbfreq));
diff --git a/arch/powerpc/boot/cuboot-acadia.c b/arch/powerpc/boot/cuboot-acadia.c
new file mode 100644
index 000000000000..0634aba6348a
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-acadia.c
@@ -0,0 +1,174 @@
1/*
2 * Old U-boot compatibility for Acadia
3 *
4 * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com>
5 *
6 * Copyright 2008 IBM Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published
10 * by the Free Software Foundation.
11 */
12
13#include "ops.h"
14#include "io.h"
15#include "dcr.h"
16#include "stdio.h"
17#include "4xx.h"
18#include "44x.h"
19#include "cuboot.h"
20
21#define TARGET_4xx
22#include "ppcboot.h"
23
24static bd_t bd;
25
26#define CPR_PERD0_SPIDV_MASK 0x000F0000 /* SPI Clock Divider */
27
28#define PLLC_SRC_MASK 0x20000000 /* PLL feedback source */
29
30#define PLLD_FBDV_MASK 0x1F000000 /* PLL feedback divider value */
31#define PLLD_FWDVA_MASK 0x000F0000 /* PLL forward divider A value */
32#define PLLD_FWDVB_MASK 0x00000700 /* PLL forward divider B value */
33
34#define PRIMAD_CPUDV_MASK 0x0F000000 /* CPU Clock Divisor Mask */
35#define PRIMAD_PLBDV_MASK 0x000F0000 /* PLB Clock Divisor Mask */
36#define PRIMAD_OPBDV_MASK 0x00000F00 /* OPB Clock Divisor Mask */
37#define PRIMAD_EBCDV_MASK 0x0000000F /* EBC Clock Divisor Mask */
38
39#define PERD0_PWMDV_MASK 0xFF000000 /* PWM Divider Mask */
40#define PERD0_SPIDV_MASK 0x000F0000 /* SPI Divider Mask */
41#define PERD0_U0DV_MASK 0x0000FF00 /* UART 0 Divider Mask */
42#define PERD0_U1DV_MASK 0x000000FF /* UART 1 Divider Mask */
43
44static void get_clocks(void)
45{
46 unsigned long sysclk, cpr_plld, cpr_pllc, cpr_primad, plloutb, i;
47 unsigned long pllFwdDiv, pllFwdDivB, pllFbkDiv, pllPlbDiv, pllExtBusDiv;
48 unsigned long pllOpbDiv, freqEBC, freqUART, freqOPB;
49 unsigned long div; /* total divisor udiv * bdiv */
50 unsigned long umin; /* minimum udiv */
51 unsigned short diff; /* smallest diff */
52 unsigned long udiv; /* best udiv */
53 unsigned short idiff; /* current diff */
54 unsigned short ibdiv; /* current bdiv */
55 unsigned long est; /* current estimate */
56 unsigned long baud;
57 void *np;
58
59 /* read the sysclk value from the CPLD */
60 sysclk = (in_8((unsigned char *)0x80000000) == 0xc) ? 66666666 : 33333000;
61
62 /*
63 * Read PLL Mode registers
64 */
65 cpr_plld = CPR0_READ(DCRN_CPR0_PLLD);
66 cpr_pllc = CPR0_READ(DCRN_CPR0_PLLC);
67
68 /*
69 * Determine forward divider A
70 */
71 pllFwdDiv = ((cpr_plld & PLLD_FWDVA_MASK) >> 16);
72
73 /*
74 * Determine forward divider B
75 */
76 pllFwdDivB = ((cpr_plld & PLLD_FWDVB_MASK) >> 8);
77 if (pllFwdDivB == 0)
78 pllFwdDivB = 8;
79
80 /*
81 * Determine FBK_DIV.
82 */
83 pllFbkDiv = ((cpr_plld & PLLD_FBDV_MASK) >> 24);
84 if (pllFbkDiv == 0)
85 pllFbkDiv = 256;
86
87 /*
88 * Read CPR_PRIMAD register
89 */
90 cpr_primad = CPR0_READ(DCRN_CPR0_PRIMAD);
91
92 /*
93 * Determine PLB_DIV.
94 */
95 pllPlbDiv = ((cpr_primad & PRIMAD_PLBDV_MASK) >> 16);
96 if (pllPlbDiv == 0)
97 pllPlbDiv = 16;
98
99 /*
100 * Determine EXTBUS_DIV.
101 */
102 pllExtBusDiv = (cpr_primad & PRIMAD_EBCDV_MASK);
103 if (pllExtBusDiv == 0)
104 pllExtBusDiv = 16;
105
106 /*
107 * Determine OPB_DIV.
108 */
109 pllOpbDiv = ((cpr_primad & PRIMAD_OPBDV_MASK) >> 8);
110 if (pllOpbDiv == 0)
111 pllOpbDiv = 16;
112
113 /* There is a bug in U-Boot that prevents us from using
114 * bd.bi_opbfreq because U-Boot doesn't populate it for
115 * 405EZ. We get to calculate it, yay!
116 */
117 freqOPB = (sysclk *pllFbkDiv) /pllOpbDiv;
118
119 freqEBC = (sysclk * pllFbkDiv) / pllExtBusDiv;
120
121 plloutb = ((sysclk * ((cpr_pllc & PLLC_SRC_MASK) ?
122 pllFwdDivB : pllFwdDiv) *
123 pllFbkDiv) / pllFwdDivB);
124
125 np = find_node_by_alias("serial0");
126 if (getprop(np, "current-speed", &baud, sizeof(baud)) != sizeof(baud))
127 fatal("no current-speed property\n\r");
128
129 udiv = 256; /* Assume lowest possible serial clk */
130 div = plloutb / (16 * baud); /* total divisor */
131 umin = (plloutb / freqOPB) << 1; /* 2 x OPB divisor */
132 diff = 256; /* highest possible */
133
134 /* i is the test udiv value -- start with the largest
135 * possible (256) to minimize serial clock and constrain
136 * search to umin.
137 */
138 for (i = 256; i > umin; i--) {
139 ibdiv = div / i;
140 est = i * ibdiv;
141 idiff = (est > div) ? (est-div) : (div-est);
142 if (idiff == 0) {
143 udiv = i;
144 break; /* can't do better */
145 } else if (idiff < diff) {
146 udiv = i; /* best so far */
147 diff = idiff; /* update lowest diff*/
148 }
149 }
150 freqUART = plloutb / udiv;
151
152 dt_fixup_cpu_clocks(bd.bi_procfreq, bd.bi_intfreq, bd.bi_plb_busfreq);
153 dt_fixup_clock("/plb/ebc", freqEBC);
154 dt_fixup_clock("/plb/opb", freqOPB);
155 dt_fixup_clock("/plb/opb/serial@ef600300", freqUART);
156 dt_fixup_clock("/plb/opb/serial@ef600400", freqUART);
157}
158
159static void acadia_fixups(void)
160{
161 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
162 get_clocks();
163 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
164}
165
166void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
167 unsigned long r6, unsigned long r7)
168{
169 CUBOOT_INIT();
170 platform_ops.fixups = acadia_fixups;
171 platform_ops.exit = ibm40x_dbcr_reset;
172 fdt_init(_dtb_start);
173 serial_console_init();
174}
diff --git a/arch/powerpc/boot/dts/acadia.dts b/arch/powerpc/boot/dts/acadia.dts
new file mode 100644
index 000000000000..57291f61ffe7
--- /dev/null
+++ b/arch/powerpc/boot/dts/acadia.dts
@@ -0,0 +1,224 @@
1/*
2 * Device Tree Source for AMCC Acadia (405EZ)
3 *
4 * Copyright IBM Corp. 2008
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/dts-v1/;
12
13/ {
14 #address-cells = <1>;
15 #size-cells = <1>;
16 model = "amcc,acadia";
17 compatible = "amcc,acadia";
18 dcr-parent = <&{/cpus/cpu@0}>;
19
20 aliases {
21 ethernet0 = &EMAC0;
22 serial0 = &UART0;
23 serial1 = &UART1;
24 };
25
26 cpus {
27 #address-cells = <1>;
28 #size-cells = <0>;
29
30 cpu@0 {
31 device_type = "cpu";
32 model = "PowerPC,405EZ";
33 reg = <0x0>;
34 clock-frequency = <0>; /* Filled in by wrapper */
35 timebase-frequency = <0>; /* Filled in by wrapper */
36 i-cache-line-size = <32>;
37 d-cache-line-size = <32>;
38 i-cache-size = <16384>;
39 d-cache-size = <16384>;
40 dcr-controller;
41 dcr-access-method = "native";
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x0 0x0>; /* Filled in by wrapper */
48 };
49
50 UIC0: interrupt-controller {
51 compatible = "ibm,uic-405ez", "ibm,uic";
52 interrupt-controller;
53 dcr-reg = <0x0c0 0x009>;
54 cell-index = <0>;
55 #address-cells = <0>;
56 #size-cells = <0>;
57 #interrupt-cells = <2>;
58 };
59
60 plb {
61 compatible = "ibm,plb-405ez", "ibm,plb3";
62 #address-cells = <1>;
63 #size-cells = <1>;
64 ranges;
65 clock-frequency = <0>; /* Filled in by wrapper */
66
67 MAL0: mcmal {
68 compatible = "ibm,mcmal-405ez", "ibm,mcmal";
69 dcr-reg = <0x380 0x62>;
70 num-tx-chans = <1>;
71 num-rx-chans = <1>;
72 interrupt-parent = <&UIC0>;
73 /* 405EZ has only 3 interrupts to the UIC, as
74 * SERR, TXDE, and RXDE are or'd together into
75 * one UIC bit
76 */
77 interrupts = <
78 0x13 0x4 /* TXEOB */
79 0x15 0x4 /* RXEOB */
80 0x12 0x4 /* SERR, TXDE, RXDE */>;
81 };
82
83 POB0: opb {
84 compatible = "ibm,opb-405ez", "ibm,opb";
85 #address-cells = <1>;
86 #size-cells = <1>;
87 ranges;
88 dcr-reg = <0x0a 0x05>;
89 clock-frequency = <0>; /* Filled in by wrapper */
90
91 UART0: serial@ef600300 {
92 device_type = "serial";
93 compatible = "ns16550";
94 reg = <0xef600300 0x8>;
95 virtual-reg = <0xef600300>;
96 clock-frequency = <0>; /* Filled in by wrapper */
97 current-speed = <115200>;
98 interrupt-parent = <&UIC0>;
99 interrupts = <0x5 0x4>;
100 };
101
102 UART1: serial@ef600400 {
103 device_type = "serial";
104 compatible = "ns16550";
105 reg = <0xef600400 0x8>;
106 clock-frequency = <0>; /* Filled in by wrapper */
107 current-speed = <115200>;
108 interrupt-parent = <&UIC0>;
109 interrupts = <0x6 0x4>;
110 };
111
112 IIC: i2c@ef600500 {
113 compatible = "ibm,iic-405ez", "ibm,iic";
114 reg = <0xef600500 0x11>;
115 interrupt-parent = <&UIC0>;
116 interrupts = <0xa 0x4>;
117 };
118
119 GPIO0: gpio@ef600700 {
120 compatible = "ibm,gpio-405ez";
121 reg = <0xef600700 0x20>;
122 };
123
124 GPIO1: gpio@ef600800 {
125 compatible = "ibm,gpio-405ez";
126 reg = <0xef600800 0x20>;
127 };
128
129 EMAC0: ethernet@ef600900 {
130 device_type = "network";
131 compatible = "ibm,emac-405ez", "ibm,emac";
132 interrupt-parent = <&UIC0>;
133 interrupts = <
134 0x10 0x4 /* Ethernet */
135 0x11 0x4 /* Ethernet Wake up */>;
136 local-mac-address = [000000000000]; /* Filled in by wrapper */
137 reg = <0xef600900 0x70>;
138 mal-device = <&MAL0>;
139 mal-tx-channel = <0>;
140 mal-rx-channel = <0>;
141 cell-index = <0>;
142 max-frame-size = <1500>;
143 rx-fifo-size = <4096>;
144 tx-fifo-size = <2048>;
145 phy-mode = "mii";
146 phy-map = <0x0>;
147 };
148
149 CAN0: can@ef601000 {
150 compatible = "amcc,can-405ez";
151 reg = <0xef601000 0x620>;
152 interrupt-parent = <&UIC0>;
153 interrupts = <0x7 0x4>;
154 };
155
156 CAN1: can@ef601800 {
157 compatible = "amcc,can-405ez";
158 reg = <0xef601800 0x620>;
159 interrupt-parent = <&UIC0>;
160 interrupts = <0x8 0x4>;
161 };
162
163 cameleon@ef602000 {
164 compatible = "amcc,cameleon-405ez";
165 reg = <0xef602000 0x800>;
166 interrupt-parent = <&UIC0>;
167 interrupts = <0xb 0x4 0xc 0x4>;
168 };
169
170 ieee1588@ef602800 {
171 compatible = "amcc,ieee1588-405ez";
172 reg = <0xef602800 0x60>;
173 interrupt-parent = <&UIC0>;
174 interrupts = <0x4 0x4>;
175 /* This thing is a bit weird. It has it's own UIC
176 * that it uses to generate snapshot triggers. We
177 * don't really support this device yet, and it needs
178 * work to figure this out.
179 */
180 dcr-reg = <0xe0 0x9>;
181 };
182
183 usb@ef603000 {
184 compatible = "ohci-be";
185 reg = <0xef603000 0x80>;
186 interrupts-parent = <&UIC0>;
187 interrupts = <0xd 0x4 0xe 0x4>;
188 };
189
190 dac@ef603300 {
191 compatible = "amcc,dac-405ez";
192 reg = <0xef603300 0x40>;
193 interrupt-parent = <&UIC0>;
194 interrupts = <0x18 0x4>;
195 };
196
197 adc@ef603400 {
198 compatible = "amcc,adc-405ez";
199 reg = <0xef603400 0x40>;
200 interrupt-parent = <&UIC0>;
201 interrupts = <0x17 0x4>;
202 };
203
204 spi@ef603500 {
205 compatible = "amcc,spi-405ez";
206 reg = <0xef603500 0x100>;
207 interrupt-parent = <&UIC0>;
208 interrupts = <0x9 0x4>;
209 };
210 };
211
212 EBC0: ebc {
213 compatible = "ibm,ebc-405ez", "ibm,ebc";
214 dcr-reg = <0x12 0x2>;
215 #address-cells = <2>;
216 #size-cells = <1>;
217 clock-frequency = <0>; /* Filled in by wrapper */
218 };
219 };
220
221 chosen {
222 linux,stdout-path = "/plb/opb/serial@ef600300";
223 };
224};
diff --git a/arch/powerpc/boot/dts/hcu4.dts b/arch/powerpc/boot/dts/hcu4.dts
new file mode 100644
index 000000000000..7988598da4c9
--- /dev/null
+++ b/arch/powerpc/boot/dts/hcu4.dts
@@ -0,0 +1,168 @@
1/*
2* Device Tree Source for Netstal Maschinen HCU4
3* based on the IBM Walnut
4*
5* Copyright 2008
6* Niklaus Giger <niklaus.giger@member.fsf.org>
7*
8* Copyright 2007 IBM Corp.
9* Josh Boyer <jwboyer@linux.vnet.ibm.com>
10*
11* This file is licensed under the terms of the GNU General Public
12* License version 2. This program is licensed "as is" without
13* any warranty of any kind, whether express or implied.
14*/
15
16/dts-v1/;
17
18/ {
19 #address-cells = <0x1>;
20 #size-cells = <0x1>;
21 model = "netstal,hcu4";
22 compatible = "netstal,hcu4";
23 dcr-parent = <0x1>;
24
25 aliases {
26 ethernet0 = "/plb/opb/ethernet@ef600800";
27 serial0 = "/plb/opb/serial@ef600300";
28 };
29
30 cpus {
31 #address-cells = <0x1>;
32 #size-cells = <0x0>;
33
34 cpu@0 {
35 device_type = "cpu";
36 model = "PowerPC,405GPr";
37 reg = <0x0>;
38 clock-frequency = <0>; /* Filled in by U-Boot */
39 timebase-frequency = <0x0>; /* Filled in by U-Boot */
40 i-cache-line-size = <0x20>;
41 d-cache-line-size = <0x20>;
42 i-cache-size = <0x4000>;
43 d-cache-size = <0x4000>;
44 dcr-controller;
45 dcr-access-method = "native";
46 linux,phandle = <0x1>;
47 };
48 };
49
50 memory {
51 device_type = "memory";
52 reg = <0x0 0x0>; /* Filled in by U-Boot */
53 };
54
55 UIC0: interrupt-controller {
56 compatible = "ibm,uic";
57 interrupt-controller;
58 cell-index = <0x0>;
59 dcr-reg = <0xc0 0x9>;
60 #address-cells = <0x0>;
61 #size-cells = <0x0>;
62 #interrupt-cells = <0x2>;
63 linux,phandle = <0x2>;
64 };
65
66 plb {
67 compatible = "ibm,plb3";
68 #address-cells = <0x1>;
69 #size-cells = <0x1>;
70 ranges;
71 clock-frequency = <0x0>; /* Filled in by U-Boot */
72
73 SDRAM0: memory-controller {
74 compatible = "ibm,sdram-405gp";
75 dcr-reg = <0x10 0x2>;
76 };
77
78 MAL: mcmal {
79 compatible = "ibm,mcmal-405gp", "ibm,mcmal";
80 dcr-reg = <0x180 0x62>;
81 num-tx-chans = <0x1>;
82 num-rx-chans = <0x1>;
83 interrupt-parent = <0x2>;
84 interrupts = <0xb 0x4 0xc 0x4 0xa 0x4 0xd 0x4 0xe 0x4>;
85 linux,phandle = <0x3>;
86 };
87
88 POB0: opb {
89 compatible = "ibm,opb-405gp", "ibm,opb";
90 #address-cells = <0x1>;
91 #size-cells = <0x1>;
92 ranges = <0xef600000 0xef600000 0xa00000>;
93 dcr-reg = <0xa0 0x5>;
94 clock-frequency = <0x0>; /* Filled in by U-Boot */
95
96 UART0: serial@ef600300 {
97 device_type = "serial";
98 compatible = "ns16550";
99 reg = <0xef600300 0x8>;
100 virtual-reg = <0xef600300>;
101 clock-frequency = <0x0>;/* Filled in by U-Boot */
102 current-speed = <0>; /* Filled in by U-Boot */
103 interrupt-parent = <0x2>;
104 interrupts = <0x0 0x4>;
105 };
106
107 IIC: i2c@ef600500 {
108 compatible = "ibm,iic-405gp", "ibm,iic";
109 reg = <0xef600500 0x11>;
110 interrupt-parent = <0x2>;
111 interrupts = <0x2 0x4>;
112 };
113
114 GPIO: gpio@ef600700 {
115 compatible = "ibm,gpio-405gp";
116 reg = <0xef600700 0x20>;
117 };
118
119 EMAC: ethernet@ef600800 {
120 device_type = "network";
121 compatible = "ibm,emac-405gp", "ibm,emac";
122 interrupt-parent = <0x2>;
123 interrupts = <0xf 0x4 0x9 0x4>;
124 local-mac-address = [00 00 00 00 00 00];
125 reg = <0xef600800 0x70>;
126 mal-device = <0x3>;
127 mal-tx-channel = <0x0>;
128 mal-rx-channel = <0x0>;
129 cell-index = <0x0>;
130 max-frame-size = <0x5dc>;
131 rx-fifo-size = <0x1000>;
132 tx-fifo-size = <0x800>;
133 phy-mode = "rmii";
134 phy-map = <0x1>;
135 };
136 };
137
138 EBC0: ebc {
139 compatible = "ibm,ebc-405gp", "ibm,ebc";
140 dcr-reg = <0x12 0x2>;
141 #address-cells = <0x2>;
142 #size-cells = <0x1>;
143 clock-frequency = <0x0>; /* Filled in by U-Boot */
144
145 sram@0,0 {
146 reg = <0x0 0x0 0x80000>;
147 };
148
149 flash@0,80000 {
150 compatible = "jedec-flash";
151 bank-width = <0x1>;
152 reg = <0x0 0x80000 0x80000>;
153 #address-cells = <0x1>;
154 #size-cells = <0x1>;
155
156 partition@0 {
157 label = "OpenBIOS";
158 reg = <0x0 0x80000>;
159 read-only;
160 };
161 };
162 };
163 };
164
165 chosen {
166 linux,stdout-path = "/plb/opb/serial@ef600300";
167 };
168};
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c
index c541fd8a95d4..1daa73f08ba8 100644
--- a/arch/powerpc/boot/libfdt-wrapper.c
+++ b/arch/powerpc/boot/libfdt-wrapper.c
@@ -165,6 +165,7 @@ static unsigned long fdt_wrapper_finalize(void)
165void fdt_init(void *blob) 165void fdt_init(void *blob)
166{ 166{
167 int err; 167 int err;
168 int bufsize;
168 169
169 dt_ops.finddevice = fdt_wrapper_finddevice; 170 dt_ops.finddevice = fdt_wrapper_finddevice;
170 dt_ops.getprop = fdt_wrapper_getprop; 171 dt_ops.getprop = fdt_wrapper_getprop;
@@ -178,16 +179,15 @@ void fdt_init(void *blob)
178 179
179 /* Make sure the dt blob is the right version and so forth */ 180 /* Make sure the dt blob is the right version and so forth */
180 fdt = blob; 181 fdt = blob;
181 err = fdt_open_into(fdt, fdt, fdt_totalsize(blob)); 182 bufsize = fdt_totalsize(fdt) + 4;
182 if (err == -FDT_ERR_NOSPACE) { 183 buf = malloc(bufsize);
183 int bufsize = fdt_totalsize(fdt) + 4; 184 if(!buf)
184 buf = malloc(bufsize); 185 fatal("malloc failed. can't relocate the device tree\n\r");
185 err = fdt_open_into(fdt, buf, bufsize); 186
186 } 187 err = fdt_open_into(fdt, buf, bufsize);
187 188
188 if (err != 0) 189 if (err != 0)
189 fatal("fdt_init(): %s\n\r", fdt_strerror(err)); 190 fatal("fdt_init(): %s\n\r", fdt_strerror(err));
190 191
191 if (buf) 192 fdt = buf;
192 fdt = buf;
193} 193}
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index 9e7f3ddd9913..ae32801ebd69 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -56,9 +56,19 @@ static struct addr_range prep_kernel(void)
56 if (platform_ops.vmlinux_alloc) { 56 if (platform_ops.vmlinux_alloc) {
57 addr = platform_ops.vmlinux_alloc(ei.memsize); 57 addr = platform_ops.vmlinux_alloc(ei.memsize);
58 } else { 58 } else {
59 if ((unsigned long)_start < ei.memsize) 59 /*
60 * Check if the kernel image (without bss) would overwrite the
61 * bootwrapper. The device tree has been moved in fdt_init()
62 * to an area allocated with malloc() (somewhere past _end).
63 */
64 if ((unsigned long)_start < ei.loadsize)
60 fatal("Insufficient memory for kernel at address 0!" 65 fatal("Insufficient memory for kernel at address 0!"
61 " (_start=%p)\n\r", _start); 66 " (_start=%p, uncomressed size=%08x)\n\r",
67 _start, ei.loadsize);
68
69 if ((unsigned long)_end < ei.memsize)
70 fatal("The final kernel image would overwrite the "
71 "device tree\n\r");
62 } 72 }
63 73
64 /* Finally, gunzip the kernel */ 74 /* Finally, gunzip the kernel */
diff --git a/arch/powerpc/boot/string.S b/arch/powerpc/boot/string.S
index 643e4cb2f11d..acc9428f2789 100644
--- a/arch/powerpc/boot/string.S
+++ b/arch/powerpc/boot/string.S
@@ -235,7 +235,7 @@ memchr:
235 .globl memcmp 235 .globl memcmp
236memcmp: 236memcmp:
237 cmpwi 0,r5,0 237 cmpwi 0,r5,0
238 blelr 238 ble 2f
239 mtctr r5 239 mtctr r5
240 addi r6,r3,-1 240 addi r6,r3,-1
241 addi r4,r4,-1 241 addi r4,r4,-1
@@ -244,6 +244,8 @@ memcmp:
244 subf. r3,r0,r3 244 subf. r3,r0,r3
245 bdnzt 2,1b 245 bdnzt 2,1b
246 blr 246 blr
2472: li r3,0
248 blr
247 249
248 250
249/* 251/*
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index ee0dc41d7c56..f39073511a49 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -306,11 +306,14 @@ fi
306 306
307# post-processing needed for some platforms 307# post-processing needed for some platforms
308case "$platform" in 308case "$platform" in
309pseries|chrp) 309pseries)
310 ${CROSS}objcopy -O binary -j .fakeelf "$kernel" "$ofile".rpanote 310 ${CROSS}objcopy -O binary -j .fakeelf "$kernel" "$ofile".rpanote
311 $objbin/addnote "$ofile" "$ofile".rpanote 311 $objbin/addnote "$ofile" "$ofile".rpanote
312 rm -r "$ofile".rpanote 312 rm -r "$ofile".rpanote
313 ;; 313 ;;
314chrp)
315 $objbin/addnote -r c00000 "$ofile"
316 ;;
314coff) 317coff)
315 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" 318 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
316 $objbin/hack-coff "$ofile" 319 $objbin/hack-coff "$ofile"
diff --git a/arch/powerpc/configs/40x/acadia_defconfig b/arch/powerpc/configs/40x/acadia_defconfig
new file mode 100644
index 000000000000..39bd9eb453f0
--- /dev/null
+++ b/arch/powerpc/configs/40x/acadia_defconfig
@@ -0,0 +1,921 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.27-rc5
4# Mon Oct 13 13:47:16 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14CONFIG_40x=y
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y
31CONFIG_STACKTRACE_SUPPORT=y
32CONFIG_HAVE_LATENCYTOP_SUPPORT=y
33CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
40CONFIG_PPC=y
41CONFIG_EARLY_PRINTK=y
42CONFIG_GENERIC_NVRAM=y
43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51# CONFIG_DEFAULT_UIMAGE is not set
52CONFIG_PPC_DCR_NATIVE=y
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_PPC_DCR=y
55CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
56
57#
58# General setup
59#
60CONFIG_EXPERIMENTAL=y
61CONFIG_BROKEN_ON_SMP=y
62CONFIG_INIT_ENV_ARG_LIMIT=32
63CONFIG_LOCALVERSION=""
64CONFIG_LOCALVERSION_AUTO=y
65CONFIG_SWAP=y
66CONFIG_SYSVIPC=y
67CONFIG_SYSVIPC_SYSCTL=y
68CONFIG_POSIX_MQUEUE=y
69# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set
75CONFIG_GROUP_SCHED=y
76# CONFIG_FAIR_GROUP_SCHED is not set
77# CONFIG_RT_GROUP_SCHED is not set
78CONFIG_USER_SCHED=y
79# CONFIG_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y
81CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set
84CONFIG_BLK_DEV_INITRD=y
85CONFIG_INITRAMFS_SOURCE=""
86# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
87CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y
90CONFIG_KALLSYMS=y
91CONFIG_KALLSYMS_ALL=y
92CONFIG_KALLSYMS_EXTRA_PASS=y
93CONFIG_HOTPLUG=y
94CONFIG_PRINTK=y
95CONFIG_BUG=y
96CONFIG_ELF_CORE=y
97CONFIG_COMPAT_BRK=y
98CONFIG_BASE_FULL=y
99CONFIG_FUTEX=y
100CONFIG_ANON_INODES=y
101CONFIG_EPOLL=y
102CONFIG_SIGNALFD=y
103CONFIG_TIMERFD=y
104CONFIG_EVENTFD=y
105CONFIG_SHMEM=y
106CONFIG_VM_EVENT_COUNTERS=y
107CONFIG_SLUB_DEBUG=y
108# CONFIG_SLAB is not set
109CONFIG_SLUB=y
110# CONFIG_SLOB is not set
111# CONFIG_PROFILING is not set
112# CONFIG_MARKERS is not set
113CONFIG_HAVE_OPROFILE=y
114# CONFIG_KPROBES is not set
115CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
116CONFIG_HAVE_IOREMAP_PROT=y
117CONFIG_HAVE_KPROBES=y
118CONFIG_HAVE_KRETPROBES=y
119CONFIG_HAVE_ARCH_TRACEHOOK=y
120# CONFIG_HAVE_DMA_ATTRS is not set
121# CONFIG_USE_GENERIC_SMP_HELPERS is not set
122# CONFIG_HAVE_CLK is not set
123CONFIG_PROC_PAGE_MONITOR=y
124# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
125CONFIG_SLABINFO=y
126CONFIG_RT_MUTEXES=y
127# CONFIG_TINY_SHMEM is not set
128CONFIG_BASE_SMALL=0
129CONFIG_MODULES=y
130# CONFIG_MODULE_FORCE_LOAD is not set
131CONFIG_MODULE_UNLOAD=y
132# CONFIG_MODULE_FORCE_UNLOAD is not set
133# CONFIG_MODVERSIONS is not set
134# CONFIG_MODULE_SRCVERSION_ALL is not set
135CONFIG_KMOD=y
136CONFIG_BLOCK=y
137CONFIG_LBD=y
138# CONFIG_BLK_DEV_IO_TRACE is not set
139# CONFIG_LSF is not set
140# CONFIG_BLK_DEV_BSG is not set
141# CONFIG_BLK_DEV_INTEGRITY is not set
142
143#
144# IO Schedulers
145#
146CONFIG_IOSCHED_NOOP=y
147CONFIG_IOSCHED_AS=y
148CONFIG_IOSCHED_DEADLINE=y
149CONFIG_IOSCHED_CFQ=y
150CONFIG_DEFAULT_AS=y
151# CONFIG_DEFAULT_DEADLINE is not set
152# CONFIG_DEFAULT_CFQ is not set
153# CONFIG_DEFAULT_NOOP is not set
154CONFIG_DEFAULT_IOSCHED="anticipatory"
155CONFIG_CLASSIC_RCU=y
156# CONFIG_PPC4xx_PCI_EXPRESS is not set
157
158#
159# Platform support
160#
161# CONFIG_PPC_CELL is not set
162# CONFIG_PPC_CELL_NATIVE is not set
163# CONFIG_PQ2ADS is not set
164CONFIG_ACADIA=y
165# CONFIG_EP405 is not set
166# CONFIG_KILAUEA is not set
167# CONFIG_MAKALU is not set
168# CONFIG_WALNUT is not set
169# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
170CONFIG_PPC40x_SIMPLE=y
171CONFIG_405EZ=y
172# CONFIG_IPIC is not set
173# CONFIG_MPIC is not set
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176# CONFIG_PPC_RTAS is not set
177# CONFIG_MMIO_NVRAM is not set
178# CONFIG_PPC_MPC106 is not set
179# CONFIG_PPC_970_NAP is not set
180# CONFIG_PPC_INDIRECT_IO is not set
181# CONFIG_GENERIC_IOMAP is not set
182# CONFIG_CPU_FREQ is not set
183# CONFIG_FSL_ULI1575 is not set
184
185#
186# Kernel options
187#
188# CONFIG_HIGHMEM is not set
189# CONFIG_TICK_ONESHOT is not set
190# CONFIG_NO_HZ is not set
191# CONFIG_HIGH_RES_TIMERS is not set
192CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
193# CONFIG_HZ_100 is not set
194CONFIG_HZ_250=y
195# CONFIG_HZ_300 is not set
196# CONFIG_HZ_1000 is not set
197CONFIG_HZ=250
198# CONFIG_SCHED_HRTICK is not set
199CONFIG_PREEMPT_NONE=y
200# CONFIG_PREEMPT_VOLUNTARY is not set
201# CONFIG_PREEMPT is not set
202CONFIG_BINFMT_ELF=y
203# CONFIG_BINFMT_MISC is not set
204# CONFIG_MATH_EMULATION is not set
205# CONFIG_IOMMU_HELPER is not set
206CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
207CONFIG_ARCH_HAS_WALK_MEMORY=y
208CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
209CONFIG_ARCH_FLATMEM_ENABLE=y
210CONFIG_ARCH_POPULATES_NODE_MAP=y
211CONFIG_SELECT_MEMORY_MODEL=y
212CONFIG_FLATMEM_MANUAL=y
213# CONFIG_DISCONTIGMEM_MANUAL is not set
214# CONFIG_SPARSEMEM_MANUAL is not set
215CONFIG_FLATMEM=y
216CONFIG_FLAT_NODE_MEM_MAP=y
217# CONFIG_SPARSEMEM_STATIC is not set
218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_PAGEFLAGS_EXTENDED=y
220CONFIG_SPLIT_PTLOCK_CPUS=4
221CONFIG_MIGRATION=y
222# CONFIG_RESOURCES_64BIT is not set
223CONFIG_ZONE_DMA_FLAG=1
224CONFIG_BOUNCE=y
225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
227CONFIG_PROC_DEVICETREE=y
228# CONFIG_CMDLINE_BOOL is not set
229CONFIG_EXTRA_TARGETS=""
230# CONFIG_PM is not set
231CONFIG_SECCOMP=y
232CONFIG_ISA_DMA_API=y
233
234#
235# Bus options
236#
237CONFIG_ZONE_DMA=y
238CONFIG_PPC_INDIRECT_PCI=y
239CONFIG_4xx_SOC=y
240CONFIG_PPC_PCI_CHOICE=y
241CONFIG_PCI=y
242CONFIG_PCI_DOMAINS=y
243CONFIG_PCI_SYSCALL=y
244# CONFIG_PCIEPORTBUS is not set
245CONFIG_ARCH_SUPPORTS_MSI=y
246# CONFIG_PCI_MSI is not set
247CONFIG_PCI_LEGACY=y
248# CONFIG_PCI_DEBUG is not set
249# CONFIG_PCCARD is not set
250# CONFIG_HOTPLUG_PCI is not set
251# CONFIG_HAS_RAPIDIO is not set
252
253#
254# Advanced setup
255#
256# CONFIG_ADVANCED_OPTIONS is not set
257
258#
259# Default settings for advanced configuration options are used
260#
261CONFIG_LOWMEM_SIZE=0x30000000
262CONFIG_PAGE_OFFSET=0xc0000000
263CONFIG_KERNEL_START=0xc0000000
264CONFIG_PHYSICAL_START=0x00000000
265CONFIG_TASK_SIZE=0xc0000000
266CONFIG_CONSISTENT_START=0xff100000
267CONFIG_CONSISTENT_SIZE=0x00200000
268CONFIG_NET=y
269
270#
271# Networking options
272#
273CONFIG_PACKET=y
274# CONFIG_PACKET_MMAP is not set
275CONFIG_UNIX=y
276# CONFIG_NET_KEY is not set
277CONFIG_INET=y
278# CONFIG_IP_MULTICAST is not set
279# CONFIG_IP_ADVANCED_ROUTER is not set
280CONFIG_IP_FIB_HASH=y
281CONFIG_IP_PNP=y
282CONFIG_IP_PNP_DHCP=y
283CONFIG_IP_PNP_BOOTP=y
284# CONFIG_IP_PNP_RARP is not set
285# CONFIG_NET_IPIP is not set
286# CONFIG_NET_IPGRE is not set
287# CONFIG_ARPD is not set
288# CONFIG_SYN_COOKIES is not set
289# CONFIG_INET_AH is not set
290# CONFIG_INET_ESP is not set
291# CONFIG_INET_IPCOMP is not set
292# CONFIG_INET_XFRM_TUNNEL is not set
293# CONFIG_INET_TUNNEL is not set
294# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
295# CONFIG_INET_XFRM_MODE_TUNNEL is not set
296# CONFIG_INET_XFRM_MODE_BEET is not set
297# CONFIG_INET_LRO is not set
298CONFIG_INET_DIAG=y
299CONFIG_INET_TCP_DIAG=y
300# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_CUBIC=y
302CONFIG_DEFAULT_TCP_CONG="cubic"
303# CONFIG_TCP_MD5SIG is not set
304# CONFIG_IPV6 is not set
305# CONFIG_NETWORK_SECMARK is not set
306# CONFIG_NETFILTER is not set
307# CONFIG_IP_DCCP is not set
308# CONFIG_IP_SCTP is not set
309# CONFIG_TIPC is not set
310# CONFIG_ATM is not set
311# CONFIG_BRIDGE is not set
312# CONFIG_VLAN_8021Q is not set
313# CONFIG_DECNET is not set
314# CONFIG_LLC2 is not set
315# CONFIG_IPX is not set
316# CONFIG_ATALK is not set
317# CONFIG_X25 is not set
318# CONFIG_LAPB is not set
319# CONFIG_ECONET is not set
320# CONFIG_WAN_ROUTER is not set
321# CONFIG_NET_SCHED is not set
322
323#
324# Network testing
325#
326# CONFIG_NET_PKTGEN is not set
327# CONFIG_HAMRADIO is not set
328# CONFIG_CAN is not set
329# CONFIG_IRDA is not set
330# CONFIG_BT is not set
331# CONFIG_AF_RXRPC is not set
332
333#
334# Wireless
335#
336# CONFIG_CFG80211 is not set
337# CONFIG_WIRELESS_EXT is not set
338# CONFIG_MAC80211 is not set
339# CONFIG_IEEE80211 is not set
340# CONFIG_RFKILL is not set
341# CONFIG_NET_9P is not set
342
343#
344# Device Drivers
345#
346
347#
348# Generic Driver Options
349#
350CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
351CONFIG_STANDALONE=y
352CONFIG_PREVENT_FIRMWARE_BUILD=y
353CONFIG_FW_LOADER=y
354CONFIG_FIRMWARE_IN_KERNEL=y
355CONFIG_EXTRA_FIRMWARE=""
356# CONFIG_DEBUG_DRIVER is not set
357# CONFIG_DEBUG_DEVRES is not set
358# CONFIG_SYS_HYPERVISOR is not set
359CONFIG_CONNECTOR=y
360CONFIG_PROC_EVENTS=y
361CONFIG_MTD=y
362# CONFIG_MTD_DEBUG is not set
363# CONFIG_MTD_CONCAT is not set
364CONFIG_MTD_PARTITIONS=y
365# CONFIG_MTD_REDBOOT_PARTS is not set
366CONFIG_MTD_CMDLINE_PARTS=y
367CONFIG_MTD_OF_PARTS=y
368# CONFIG_MTD_AR7_PARTS is not set
369
370#
371# User Modules And Translation Layers
372#
373CONFIG_MTD_CHAR=y
374CONFIG_MTD_BLKDEVS=m
375CONFIG_MTD_BLOCK=m
376# CONFIG_MTD_BLOCK_RO is not set
377# CONFIG_FTL is not set
378# CONFIG_NFTL is not set
379# CONFIG_INFTL is not set
380# CONFIG_RFD_FTL is not set
381# CONFIG_SSFDC is not set
382# CONFIG_MTD_OOPS is not set
383
384#
385# RAM/ROM/Flash chip drivers
386#
387CONFIG_MTD_CFI=y
388CONFIG_MTD_JEDECPROBE=y
389CONFIG_MTD_GEN_PROBE=y
390# CONFIG_MTD_CFI_ADV_OPTIONS is not set
391CONFIG_MTD_MAP_BANK_WIDTH_1=y
392CONFIG_MTD_MAP_BANK_WIDTH_2=y
393CONFIG_MTD_MAP_BANK_WIDTH_4=y
394# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
395# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
396# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
397CONFIG_MTD_CFI_I1=y
398CONFIG_MTD_CFI_I2=y
399# CONFIG_MTD_CFI_I4 is not set
400# CONFIG_MTD_CFI_I8 is not set
401# CONFIG_MTD_CFI_INTELEXT is not set
402CONFIG_MTD_CFI_AMDSTD=y
403# CONFIG_MTD_CFI_STAA is not set
404CONFIG_MTD_CFI_UTIL=y
405# CONFIG_MTD_RAM is not set
406# CONFIG_MTD_ROM is not set
407# CONFIG_MTD_ABSENT is not set
408
409#
410# Mapping drivers for chip access
411#
412# CONFIG_MTD_COMPLEX_MAPPINGS is not set
413# CONFIG_MTD_PHYSMAP is not set
414CONFIG_MTD_PHYSMAP_OF=y
415# CONFIG_MTD_INTEL_VR_NOR is not set
416# CONFIG_MTD_PLATRAM is not set
417
418#
419# Self-contained MTD device drivers
420#
421# CONFIG_MTD_PMC551 is not set
422# CONFIG_MTD_SLRAM is not set
423# CONFIG_MTD_PHRAM is not set
424# CONFIG_MTD_MTDRAM is not set
425# CONFIG_MTD_BLOCK2MTD is not set
426
427#
428# Disk-On-Chip Device Drivers
429#
430# CONFIG_MTD_DOC2000 is not set
431# CONFIG_MTD_DOC2001 is not set
432# CONFIG_MTD_DOC2001PLUS is not set
433# CONFIG_MTD_NAND is not set
434# CONFIG_MTD_ONENAND is not set
435
436#
437# UBI - Unsorted block images
438#
439# CONFIG_MTD_UBI is not set
440CONFIG_OF_DEVICE=y
441# CONFIG_PARPORT is not set
442CONFIG_BLK_DEV=y
443# CONFIG_BLK_DEV_FD is not set
444# CONFIG_BLK_CPQ_DA is not set
445# CONFIG_BLK_CPQ_CISS_DA is not set
446# CONFIG_BLK_DEV_DAC960 is not set
447# CONFIG_BLK_DEV_UMEM is not set
448# CONFIG_BLK_DEV_COW_COMMON is not set
449# CONFIG_BLK_DEV_LOOP is not set
450# CONFIG_BLK_DEV_NBD is not set
451# CONFIG_BLK_DEV_SX8 is not set
452CONFIG_BLK_DEV_RAM=y
453CONFIG_BLK_DEV_RAM_COUNT=16
454CONFIG_BLK_DEV_RAM_SIZE=35000
455# CONFIG_BLK_DEV_XIP is not set
456# CONFIG_CDROM_PKTCDVD is not set
457# CONFIG_ATA_OVER_ETH is not set
458# CONFIG_XILINX_SYSACE is not set
459# CONFIG_BLK_DEV_HD is not set
460# CONFIG_MISC_DEVICES is not set
461CONFIG_HAVE_IDE=y
462# CONFIG_IDE is not set
463
464#
465# SCSI device support
466#
467# CONFIG_RAID_ATTRS is not set
468# CONFIG_SCSI is not set
469# CONFIG_SCSI_DMA is not set
470# CONFIG_SCSI_NETLINK is not set
471# CONFIG_ATA is not set
472# CONFIG_MD is not set
473# CONFIG_FUSION is not set
474
475#
476# IEEE 1394 (FireWire) support
477#
478
479#
480# Enable only one of the two stacks, unless you know what you are doing
481#
482# CONFIG_FIREWIRE is not set
483# CONFIG_IEEE1394 is not set
484# CONFIG_I2O is not set
485# CONFIG_MACINTOSH_DRIVERS is not set
486CONFIG_NETDEVICES=y
487# CONFIG_DUMMY is not set
488# CONFIG_BONDING is not set
489# CONFIG_MACVLAN is not set
490# CONFIG_EQUALIZER is not set
491# CONFIG_TUN is not set
492# CONFIG_VETH is not set
493# CONFIG_ARCNET is not set
494# CONFIG_PHYLIB is not set
495CONFIG_NET_ETHERNET=y
496CONFIG_MII=y
497# CONFIG_HAPPYMEAL is not set
498# CONFIG_SUNGEM is not set
499# CONFIG_CASSINI is not set
500# CONFIG_NET_VENDOR_3COM is not set
501# CONFIG_NET_TULIP is not set
502# CONFIG_HP100 is not set
503CONFIG_IBM_NEW_EMAC=y
504CONFIG_IBM_NEW_EMAC_RXB=256
505CONFIG_IBM_NEW_EMAC_TXB=256
506CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
507CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
508CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
509CONFIG_IBM_NEW_EMAC_DEBUG=y
510# CONFIG_IBM_NEW_EMAC_ZMII is not set
511# CONFIG_IBM_NEW_EMAC_RGMII is not set
512# CONFIG_IBM_NEW_EMAC_TAH is not set
513# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
514CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL=y
515CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT=y
516CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR=y
517# CONFIG_NET_PCI is not set
518# CONFIG_B44 is not set
519# CONFIG_NETDEV_1000 is not set
520# CONFIG_NETDEV_10000 is not set
521# CONFIG_TR is not set
522
523#
524# Wireless LAN
525#
526# CONFIG_WLAN_PRE80211 is not set
527# CONFIG_WLAN_80211 is not set
528# CONFIG_IWLWIFI_LEDS is not set
529# CONFIG_WAN is not set
530# CONFIG_FDDI is not set
531# CONFIG_HIPPI is not set
532# CONFIG_PPP is not set
533# CONFIG_SLIP is not set
534# CONFIG_NETCONSOLE is not set
535# CONFIG_NETPOLL is not set
536# CONFIG_NET_POLL_CONTROLLER is not set
537# CONFIG_ISDN is not set
538# CONFIG_PHONE is not set
539
540#
541# Input device support
542#
543# CONFIG_INPUT is not set
544
545#
546# Hardware I/O ports
547#
548# CONFIG_SERIO is not set
549# CONFIG_GAMEPORT is not set
550
551#
552# Character devices
553#
554# CONFIG_VT is not set
555CONFIG_DEVKMEM=y
556# CONFIG_SERIAL_NONSTANDARD is not set
557# CONFIG_NOZOMI is not set
558
559#
560# Serial drivers
561#
562CONFIG_SERIAL_8250=y
563CONFIG_SERIAL_8250_CONSOLE=y
564CONFIG_SERIAL_8250_PCI=y
565CONFIG_SERIAL_8250_NR_UARTS=4
566CONFIG_SERIAL_8250_RUNTIME_UARTS=4
567CONFIG_SERIAL_8250_EXTENDED=y
568# CONFIG_SERIAL_8250_MANY_PORTS is not set
569CONFIG_SERIAL_8250_SHARE_IRQ=y
570# CONFIG_SERIAL_8250_DETECT_IRQ is not set
571# CONFIG_SERIAL_8250_RSA is not set
572
573#
574# Non-8250 serial port support
575#
576# CONFIG_SERIAL_UARTLITE is not set
577CONFIG_SERIAL_CORE=y
578CONFIG_SERIAL_CORE_CONSOLE=y
579# CONFIG_SERIAL_JSM is not set
580CONFIG_SERIAL_OF_PLATFORM=y
581CONFIG_UNIX98_PTYS=y
582CONFIG_LEGACY_PTYS=y
583CONFIG_LEGACY_PTY_COUNT=256
584# CONFIG_IPMI_HANDLER is not set
585# CONFIG_HW_RANDOM is not set
586# CONFIG_NVRAM is not set
587# CONFIG_GEN_RTC is not set
588# CONFIG_R3964 is not set
589# CONFIG_APPLICOM is not set
590# CONFIG_RAW_DRIVER is not set
591# CONFIG_TCG_TPM is not set
592CONFIG_DEVPORT=y
593# CONFIG_I2C is not set
594# CONFIG_SPI is not set
595CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
596# CONFIG_GPIOLIB is not set
597# CONFIG_W1 is not set
598# CONFIG_POWER_SUPPLY is not set
599# CONFIG_HWMON is not set
600CONFIG_THERMAL=y
601# CONFIG_WATCHDOG is not set
602
603#
604# Sonics Silicon Backplane
605#
606CONFIG_SSB_POSSIBLE=y
607# CONFIG_SSB is not set
608
609#
610# Multifunction device drivers
611#
612# CONFIG_MFD_CORE is not set
613# CONFIG_MFD_SM501 is not set
614# CONFIG_HTC_PASIC3 is not set
615# CONFIG_MFD_TMIO is not set
616
617#
618# Multimedia devices
619#
620
621#
622# Multimedia core support
623#
624# CONFIG_VIDEO_DEV is not set
625# CONFIG_DVB_CORE is not set
626# CONFIG_VIDEO_MEDIA is not set
627
628#
629# Multimedia drivers
630#
631# CONFIG_DAB is not set
632
633#
634# Graphics support
635#
636# CONFIG_AGP is not set
637# CONFIG_DRM is not set
638# CONFIG_VGASTATE is not set
639# CONFIG_VIDEO_OUTPUT_CONTROL is not set
640# CONFIG_FB is not set
641# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
642
643#
644# Display device support
645#
646# CONFIG_DISPLAY_SUPPORT is not set
647# CONFIG_SOUND is not set
648# CONFIG_USB_SUPPORT is not set
649# CONFIG_MMC is not set
650# CONFIG_MEMSTICK is not set
651# CONFIG_NEW_LEDS is not set
652# CONFIG_ACCESSIBILITY is not set
653# CONFIG_INFINIBAND is not set
654# CONFIG_EDAC is not set
655# CONFIG_RTC_CLASS is not set
656# CONFIG_DMADEVICES is not set
657# CONFIG_UIO is not set
658
659#
660# File systems
661#
662CONFIG_EXT2_FS=y
663# CONFIG_EXT2_FS_XATTR is not set
664# CONFIG_EXT2_FS_XIP is not set
665# CONFIG_EXT3_FS is not set
666# CONFIG_EXT4DEV_FS is not set
667# CONFIG_REISERFS_FS is not set
668# CONFIG_JFS_FS is not set
669# CONFIG_FS_POSIX_ACL is not set
670# CONFIG_XFS_FS is not set
671# CONFIG_OCFS2_FS is not set
672CONFIG_DNOTIFY=y
673CONFIG_INOTIFY=y
674CONFIG_INOTIFY_USER=y
675# CONFIG_QUOTA is not set
676# CONFIG_AUTOFS_FS is not set
677# CONFIG_AUTOFS4_FS is not set
678# CONFIG_FUSE_FS is not set
679
680#
681# CD-ROM/DVD Filesystems
682#
683# CONFIG_ISO9660_FS is not set
684# CONFIG_UDF_FS is not set
685
686#
687# DOS/FAT/NT Filesystems
688#
689# CONFIG_MSDOS_FS is not set
690# CONFIG_VFAT_FS is not set
691# CONFIG_NTFS_FS is not set
692
693#
694# Pseudo filesystems
695#
696CONFIG_PROC_FS=y
697CONFIG_PROC_KCORE=y
698CONFIG_PROC_SYSCTL=y
699CONFIG_SYSFS=y
700CONFIG_TMPFS=y
701# CONFIG_TMPFS_POSIX_ACL is not set
702# CONFIG_HUGETLB_PAGE is not set
703# CONFIG_CONFIGFS_FS is not set
704
705#
706# Miscellaneous filesystems
707#
708# CONFIG_ADFS_FS is not set
709# CONFIG_AFFS_FS is not set
710# CONFIG_HFS_FS is not set
711# CONFIG_HFSPLUS_FS is not set
712# CONFIG_BEFS_FS is not set
713# CONFIG_BFS_FS is not set
714# CONFIG_EFS_FS is not set
715# CONFIG_JFFS2_FS is not set
716CONFIG_CRAMFS=y
717# CONFIG_VXFS_FS is not set
718# CONFIG_MINIX_FS is not set
719# CONFIG_OMFS_FS is not set
720# CONFIG_HPFS_FS is not set
721# CONFIG_QNX4FS_FS is not set
722# CONFIG_ROMFS_FS is not set
723# CONFIG_SYSV_FS is not set
724# CONFIG_UFS_FS is not set
725CONFIG_NETWORK_FILESYSTEMS=y
726CONFIG_NFS_FS=y
727CONFIG_NFS_V3=y
728# CONFIG_NFS_V3_ACL is not set
729# CONFIG_NFS_V4 is not set
730CONFIG_ROOT_NFS=y
731# CONFIG_NFSD is not set
732CONFIG_LOCKD=y
733CONFIG_LOCKD_V4=y
734CONFIG_NFS_COMMON=y
735CONFIG_SUNRPC=y
736# CONFIG_RPCSEC_GSS_KRB5 is not set
737# CONFIG_RPCSEC_GSS_SPKM3 is not set
738# CONFIG_SMB_FS is not set
739# CONFIG_CIFS is not set
740# CONFIG_NCP_FS is not set
741# CONFIG_CODA_FS is not set
742# CONFIG_AFS_FS is not set
743
744#
745# Partition Types
746#
747# CONFIG_PARTITION_ADVANCED is not set
748CONFIG_MSDOS_PARTITION=y
749# CONFIG_NLS is not set
750# CONFIG_DLM is not set
751
752#
753# Library routines
754#
755CONFIG_BITREVERSE=y
756# CONFIG_GENERIC_FIND_FIRST_BIT is not set
757# CONFIG_CRC_CCITT is not set
758# CONFIG_CRC16 is not set
759# CONFIG_CRC_T10DIF is not set
760# CONFIG_CRC_ITU_T is not set
761CONFIG_CRC32=y
762# CONFIG_CRC7 is not set
763# CONFIG_LIBCRC32C is not set
764CONFIG_ZLIB_INFLATE=y
765CONFIG_PLIST=y
766CONFIG_HAS_IOMEM=y
767CONFIG_HAS_IOPORT=y
768CONFIG_HAS_DMA=y
769CONFIG_HAVE_LMB=y
770
771#
772# Kernel hacking
773#
774# CONFIG_PRINTK_TIME is not set
775CONFIG_ENABLE_WARN_DEPRECATED=y
776CONFIG_ENABLE_MUST_CHECK=y
777CONFIG_FRAME_WARN=1024
778CONFIG_MAGIC_SYSRQ=y
779# CONFIG_UNUSED_SYMBOLS is not set
780CONFIG_DEBUG_FS=y
781# CONFIG_HEADERS_CHECK is not set
782CONFIG_DEBUG_KERNEL=y
783# CONFIG_DEBUG_SHIRQ is not set
784CONFIG_DETECT_SOFTLOCKUP=y
785# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
786CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
787CONFIG_SCHED_DEBUG=y
788# CONFIG_SCHEDSTATS is not set
789# CONFIG_TIMER_STATS is not set
790# CONFIG_DEBUG_OBJECTS is not set
791# CONFIG_SLUB_DEBUG_ON is not set
792# CONFIG_SLUB_STATS is not set
793# CONFIG_DEBUG_RT_MUTEXES is not set
794# CONFIG_RT_MUTEX_TESTER is not set
795# CONFIG_DEBUG_SPINLOCK is not set
796# CONFIG_DEBUG_MUTEXES is not set
797# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
798# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
799# CONFIG_DEBUG_KOBJECT is not set
800CONFIG_DEBUG_BUGVERBOSE=y
801# CONFIG_DEBUG_INFO is not set
802# CONFIG_DEBUG_VM is not set
803# CONFIG_DEBUG_WRITECOUNT is not set
804# CONFIG_DEBUG_MEMORY_INIT is not set
805# CONFIG_DEBUG_LIST is not set
806# CONFIG_DEBUG_SG is not set
807# CONFIG_BOOT_PRINTK_DELAY is not set
808# CONFIG_RCU_TORTURE_TEST is not set
809# CONFIG_BACKTRACE_SELF_TEST is not set
810# CONFIG_FAULT_INJECTION is not set
811# CONFIG_LATENCYTOP is not set
812CONFIG_SYSCTL_SYSCALL_CHECK=y
813CONFIG_HAVE_FTRACE=y
814CONFIG_HAVE_DYNAMIC_FTRACE=y
815# CONFIG_FTRACE is not set
816# CONFIG_SCHED_TRACER is not set
817# CONFIG_CONTEXT_SWITCH_TRACER is not set
818# CONFIG_SAMPLES is not set
819CONFIG_HAVE_ARCH_KGDB=y
820# CONFIG_KGDB is not set
821# CONFIG_DEBUG_STACKOVERFLOW is not set
822# CONFIG_DEBUG_STACK_USAGE is not set
823# CONFIG_DEBUG_PAGEALLOC is not set
824# CONFIG_CODE_PATCHING_SELFTEST is not set
825# CONFIG_FTR_FIXUP_SELFTEST is not set
826# CONFIG_MSI_BITMAP_SELFTEST is not set
827# CONFIG_XMON is not set
828# CONFIG_IRQSTACKS is not set
829# CONFIG_VIRQ_DEBUG is not set
830# CONFIG_BDI_SWITCH is not set
831# CONFIG_PPC_EARLY_DEBUG is not set
832
833#
834# Security options
835#
836# CONFIG_KEYS is not set
837# CONFIG_SECURITY is not set
838# CONFIG_SECURITY_FILE_CAPABILITIES is not set
839CONFIG_CRYPTO=y
840
841#
842# Crypto core or helper
843#
844CONFIG_CRYPTO_ALGAPI=y
845CONFIG_CRYPTO_BLKCIPHER=y
846CONFIG_CRYPTO_MANAGER=y
847# CONFIG_CRYPTO_GF128MUL is not set
848# CONFIG_CRYPTO_NULL is not set
849# CONFIG_CRYPTO_CRYPTD is not set
850# CONFIG_CRYPTO_AUTHENC is not set
851# CONFIG_CRYPTO_TEST is not set
852
853#
854# Authenticated Encryption with Associated Data
855#
856# CONFIG_CRYPTO_CCM is not set
857# CONFIG_CRYPTO_GCM is not set
858# CONFIG_CRYPTO_SEQIV is not set
859
860#
861# Block modes
862#
863CONFIG_CRYPTO_CBC=y
864# CONFIG_CRYPTO_CTR is not set
865# CONFIG_CRYPTO_CTS is not set
866CONFIG_CRYPTO_ECB=y
867# CONFIG_CRYPTO_LRW is not set
868CONFIG_CRYPTO_PCBC=y
869# CONFIG_CRYPTO_XTS is not set
870
871#
872# Hash modes
873#
874# CONFIG_CRYPTO_HMAC is not set
875# CONFIG_CRYPTO_XCBC is not set
876
877#
878# Digest
879#
880# CONFIG_CRYPTO_CRC32C is not set
881# CONFIG_CRYPTO_MD4 is not set
882CONFIG_CRYPTO_MD5=y
883# CONFIG_CRYPTO_MICHAEL_MIC is not set
884# CONFIG_CRYPTO_RMD128 is not set
885# CONFIG_CRYPTO_RMD160 is not set
886# CONFIG_CRYPTO_RMD256 is not set
887# CONFIG_CRYPTO_RMD320 is not set
888# CONFIG_CRYPTO_SHA1 is not set
889# CONFIG_CRYPTO_SHA256 is not set
890# CONFIG_CRYPTO_SHA512 is not set
891# CONFIG_CRYPTO_TGR192 is not set
892# CONFIG_CRYPTO_WP512 is not set
893
894#
895# Ciphers
896#
897# CONFIG_CRYPTO_AES is not set
898# CONFIG_CRYPTO_ANUBIS is not set
899# CONFIG_CRYPTO_ARC4 is not set
900# CONFIG_CRYPTO_BLOWFISH is not set
901# CONFIG_CRYPTO_CAMELLIA is not set
902# CONFIG_CRYPTO_CAST5 is not set
903# CONFIG_CRYPTO_CAST6 is not set
904CONFIG_CRYPTO_DES=y
905# CONFIG_CRYPTO_FCRYPT is not set
906# CONFIG_CRYPTO_KHAZAD is not set
907# CONFIG_CRYPTO_SALSA20 is not set
908# CONFIG_CRYPTO_SEED is not set
909# CONFIG_CRYPTO_SERPENT is not set
910# CONFIG_CRYPTO_TEA is not set
911# CONFIG_CRYPTO_TWOFISH is not set
912
913#
914# Compression
915#
916# CONFIG_CRYPTO_DEFLATE is not set
917# CONFIG_CRYPTO_LZO is not set
918CONFIG_CRYPTO_HW=y
919# CONFIG_CRYPTO_DEV_HIFN_795X is not set
920# CONFIG_PPC_CLOCK is not set
921# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/40x/hcu4_defconfig b/arch/powerpc/configs/40x/hcu4_defconfig
new file mode 100644
index 000000000000..682fce02c73a
--- /dev/null
+++ b/arch/powerpc/configs/40x/hcu4_defconfig
@@ -0,0 +1,929 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26.5
4# Tue Sep 16 00:44:33 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14CONFIG_40x=y
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y
31CONFIG_STACKTRACE_SUPPORT=y
32CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50# CONFIG_DEFAULT_UIMAGE is not set
51CONFIG_PPC_DCR_NATIVE=y
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_PPC_DCR=y
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
55
56#
57# General setup
58#
59CONFIG_EXPERIMENTAL=y
60CONFIG_BROKEN_ON_SMP=y
61CONFIG_INIT_ENV_ARG_LIMIT=32
62CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y
65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set
72CONFIG_LOG_BUF_SHIFT=14
73# CONFIG_CGROUPS is not set
74CONFIG_GROUP_SCHED=y
75CONFIG_FAIR_GROUP_SCHED=y
76# CONFIG_RT_GROUP_SCHED is not set
77CONFIG_USER_SCHED=y
78# CONFIG_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80CONFIG_SYSFS_DEPRECATED_V2=y
81# CONFIG_RELAY is not set
82# CONFIG_NAMESPACES is not set
83CONFIG_BLK_DEV_INITRD=y
84CONFIG_INITRAMFS_SOURCE=""
85# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
86CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y
89CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y
91CONFIG_KALLSYMS_ALL=y
92CONFIG_KALLSYMS_EXTRA_PASS=y
93CONFIG_HOTPLUG=y
94CONFIG_PRINTK=y
95# CONFIG_LOGBUFFER is not set
96CONFIG_BUG=y
97CONFIG_ELF_CORE=y
98CONFIG_COMPAT_BRK=y
99CONFIG_BASE_FULL=y
100CONFIG_FUTEX=y
101CONFIG_ANON_INODES=y
102CONFIG_EPOLL=y
103CONFIG_SIGNALFD=y
104CONFIG_TIMERFD=y
105CONFIG_EVENTFD=y
106CONFIG_SHMEM=y
107CONFIG_VM_EVENT_COUNTERS=y
108CONFIG_SLUB_DEBUG=y
109# CONFIG_SLAB is not set
110CONFIG_SLUB=y
111# CONFIG_SLOB is not set
112# CONFIG_PROFILING is not set
113# CONFIG_MARKERS is not set
114CONFIG_HAVE_OPROFILE=y
115# CONFIG_KPROBES is not set
116CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y
118# CONFIG_HAVE_DMA_ATTRS is not set
119CONFIG_PROC_PAGE_MONITOR=y
120CONFIG_SLABINFO=y
121CONFIG_RT_MUTEXES=y
122# CONFIG_TINY_SHMEM is not set
123CONFIG_BASE_SMALL=0
124CONFIG_MODULES=y
125# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y
127# CONFIG_MODULE_FORCE_UNLOAD is not set
128# CONFIG_MODVERSIONS is not set
129# CONFIG_MODULE_SRCVERSION_ALL is not set
130CONFIG_KMOD=y
131CONFIG_BLOCK=y
132CONFIG_LBD=y
133# CONFIG_BLK_DEV_IO_TRACE is not set
134# CONFIG_LSF is not set
135# CONFIG_BLK_DEV_BSG is not set
136
137#
138# IO Schedulers
139#
140CONFIG_IOSCHED_NOOP=y
141CONFIG_IOSCHED_AS=y
142CONFIG_IOSCHED_DEADLINE=y
143CONFIG_IOSCHED_CFQ=y
144CONFIG_DEFAULT_AS=y
145# CONFIG_DEFAULT_DEADLINE is not set
146# CONFIG_DEFAULT_CFQ is not set
147# CONFIG_DEFAULT_NOOP is not set
148CONFIG_DEFAULT_IOSCHED="anticipatory"
149CONFIG_CLASSIC_RCU=y
150# CONFIG_PPC4xx_PCI_EXPRESS is not set
151
152#
153# Platform support
154#
155# CONFIG_PPC_MPC512x is not set
156# CONFIG_PPC_MPC5121 is not set
157# CONFIG_PPC_CELL is not set
158# CONFIG_PPC_CELL_NATIVE is not set
159# CONFIG_PQ2ADS is not set
160# CONFIG_EP405 is not set
161CONFIG_HCU4=y
162# CONFIG_KILAUEA is not set
163# CONFIG_MAKALU is not set
164# CONFIG_WALNUT is not set
165# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
166# CONFIG_IPIC is not set
167# CONFIG_MPIC is not set
168# CONFIG_MPIC_WEIRD is not set
169# CONFIG_PPC_I8259 is not set
170# CONFIG_PPC_RTAS is not set
171# CONFIG_MMIO_NVRAM is not set
172# CONFIG_PPC_MPC106 is not set
173# CONFIG_PPC_970_NAP is not set
174# CONFIG_PPC_INDIRECT_IO is not set
175# CONFIG_GENERIC_IOMAP is not set
176# CONFIG_CPU_FREQ is not set
177# CONFIG_FSL_ULI1575 is not set
178
179#
180# Kernel options
181#
182# CONFIG_HIGHMEM is not set
183# CONFIG_TICK_ONESHOT is not set
184# CONFIG_NO_HZ is not set
185# CONFIG_HIGH_RES_TIMERS is not set
186CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
187# CONFIG_HZ_100 is not set
188CONFIG_HZ_250=y
189# CONFIG_HZ_300 is not set
190# CONFIG_HZ_1000 is not set
191CONFIG_HZ=250
192# CONFIG_SCHED_HRTICK is not set
193CONFIG_PREEMPT_NONE=y
194# CONFIG_PREEMPT_VOLUNTARY is not set
195# CONFIG_PREEMPT is not set
196CONFIG_BINFMT_ELF=y
197# CONFIG_BINFMT_MISC is not set
198# CONFIG_MATH_EMULATION is not set
199# CONFIG_IOMMU_HELPER is not set
200CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
201CONFIG_ARCH_HAS_WALK_MEMORY=y
202CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
203CONFIG_ARCH_FLATMEM_ENABLE=y
204CONFIG_ARCH_POPULATES_NODE_MAP=y
205CONFIG_SELECT_MEMORY_MODEL=y
206CONFIG_FLATMEM_MANUAL=y
207# CONFIG_DISCONTIGMEM_MANUAL is not set
208# CONFIG_SPARSEMEM_MANUAL is not set
209CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
213CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4
215CONFIG_RESOURCES_64BIT=y
216CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y
219CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set
222# CONFIG_PM is not set
223CONFIG_SECCOMP=y
224CONFIG_ISA_DMA_API=y
225
226#
227# Bus options
228#
229CONFIG_ZONE_DMA=y
230CONFIG_PPC_INDIRECT_PCI=y
231CONFIG_4xx_SOC=y
232CONFIG_PCI=y
233CONFIG_PCI_DOMAINS=y
234CONFIG_PCI_SYSCALL=y
235# CONFIG_PCIEPORTBUS is not set
236CONFIG_ARCH_SUPPORTS_MSI=y
237# CONFIG_PCI_MSI is not set
238# CONFIG_PCI_LEGACY is not set
239# CONFIG_PCI_DEBUG is not set
240# CONFIG_PCCARD is not set
241# CONFIG_HOTPLUG_PCI is not set
242# CONFIG_HAS_RAPIDIO is not set
243
244#
245# Advanced setup
246#
247# CONFIG_ADVANCED_OPTIONS is not set
248
249#
250# Default settings for advanced configuration options are used
251#
252CONFIG_LOWMEM_SIZE=0x30000000
253CONFIG_PAGE_OFFSET=0xc0000000
254CONFIG_KERNEL_START=0xc0000000
255CONFIG_PHYSICAL_START=0x00000000
256CONFIG_TASK_SIZE=0xc0000000
257CONFIG_CONSISTENT_START=0xff100000
258CONFIG_CONSISTENT_SIZE=0x00200000
259
260#
261# Networking
262#
263CONFIG_NET=y
264
265#
266# Networking options
267#
268CONFIG_PACKET=y
269# CONFIG_PACKET_MMAP is not set
270CONFIG_UNIX=y
271# CONFIG_NET_KEY is not set
272CONFIG_INET=y
273# CONFIG_IP_MULTICAST is not set
274# CONFIG_IP_ADVANCED_ROUTER is not set
275CONFIG_IP_FIB_HASH=y
276CONFIG_IP_PNP=y
277CONFIG_IP_PNP_DHCP=y
278CONFIG_IP_PNP_BOOTP=y
279# CONFIG_IP_PNP_RARP is not set
280# CONFIG_NET_IPIP is not set
281# CONFIG_NET_IPGRE is not set
282# CONFIG_ARPD is not set
283# CONFIG_SYN_COOKIES is not set
284# CONFIG_INET_AH is not set
285# CONFIG_INET_ESP is not set
286# CONFIG_INET_IPCOMP is not set
287# CONFIG_INET_XFRM_TUNNEL is not set
288# CONFIG_INET_TUNNEL is not set
289# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
290# CONFIG_INET_XFRM_MODE_TUNNEL is not set
291# CONFIG_INET_XFRM_MODE_BEET is not set
292# CONFIG_INET_LRO is not set
293CONFIG_INET_DIAG=y
294CONFIG_INET_TCP_DIAG=y
295# CONFIG_TCP_CONG_ADVANCED is not set
296CONFIG_TCP_CONG_CUBIC=y
297CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_TCP_MD5SIG is not set
299# CONFIG_IPV6 is not set
300# CONFIG_NETWORK_SECMARK is not set
301# CONFIG_NETFILTER is not set
302# CONFIG_IP_DCCP is not set
303# CONFIG_IP_SCTP is not set
304# CONFIG_TIPC is not set
305# CONFIG_ATM is not set
306# CONFIG_BRIDGE is not set
307# CONFIG_VLAN_8021Q is not set
308# CONFIG_DECNET is not set
309# CONFIG_LLC2 is not set
310# CONFIG_IPX is not set
311# CONFIG_ATALK is not set
312# CONFIG_X25 is not set
313# CONFIG_LAPB is not set
314# CONFIG_ECONET is not set
315# CONFIG_WAN_ROUTER is not set
316# CONFIG_NET_SCHED is not set
317
318#
319# Network testing
320#
321# CONFIG_NET_PKTGEN is not set
322# CONFIG_HAMRADIO is not set
323# CONFIG_CAN is not set
324# CONFIG_IRDA is not set
325# CONFIG_BT is not set
326# CONFIG_AF_RXRPC is not set
327
328#
329# Wireless
330#
331# CONFIG_CFG80211 is not set
332# CONFIG_WIRELESS_EXT is not set
333# CONFIG_MAC80211 is not set
334# CONFIG_IEEE80211 is not set
335# CONFIG_RFKILL is not set
336# CONFIG_NET_9P is not set
337
338#
339# Device Drivers
340#
341
342#
343# Generic Driver Options
344#
345CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
346CONFIG_STANDALONE=y
347CONFIG_PREVENT_FIRMWARE_BUILD=y
348CONFIG_FW_LOADER=y
349# CONFIG_DEBUG_DRIVER is not set
350# CONFIG_DEBUG_DEVRES is not set
351# CONFIG_SYS_HYPERVISOR is not set
352CONFIG_CONNECTOR=y
353CONFIG_PROC_EVENTS=y
354CONFIG_MTD=y
355# CONFIG_MTD_DEBUG is not set
356# CONFIG_MTD_CONCAT is not set
357CONFIG_MTD_PARTITIONS=y
358# CONFIG_MTD_REDBOOT_PARTS is not set
359CONFIG_MTD_CMDLINE_PARTS=y
360CONFIG_MTD_OF_PARTS=y
361# CONFIG_MTD_AR7_PARTS is not set
362
363#
364# User Modules And Translation Layers
365#
366CONFIG_MTD_CHAR=y
367CONFIG_MTD_BLKDEVS=m
368CONFIG_MTD_BLOCK=m
369# CONFIG_MTD_BLOCK_RO is not set
370# CONFIG_FTL is not set
371# CONFIG_NFTL is not set
372# CONFIG_INFTL is not set
373# CONFIG_RFD_FTL is not set
374# CONFIG_SSFDC is not set
375# CONFIG_MTD_OOPS is not set
376
377#
378# RAM/ROM/Flash chip drivers
379#
380CONFIG_MTD_CFI=y
381CONFIG_MTD_JEDECPROBE=y
382CONFIG_MTD_GEN_PROBE=y
383# CONFIG_MTD_CFI_ADV_OPTIONS is not set
384CONFIG_MTD_MAP_BANK_WIDTH_1=y
385CONFIG_MTD_MAP_BANK_WIDTH_2=y
386CONFIG_MTD_MAP_BANK_WIDTH_4=y
387# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
388# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
389# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
390CONFIG_MTD_CFI_I1=y
391CONFIG_MTD_CFI_I2=y
392# CONFIG_MTD_CFI_I4 is not set
393# CONFIG_MTD_CFI_I8 is not set
394# CONFIG_MTD_CFI_INTELEXT is not set
395CONFIG_MTD_CFI_AMDSTD=y
396# CONFIG_MTD_CFI_STAA is not set
397CONFIG_MTD_CFI_UTIL=y
398# CONFIG_MTD_RAM is not set
399# CONFIG_MTD_ROM is not set
400# CONFIG_MTD_ABSENT is not set
401
402#
403# Mapping drivers for chip access
404#
405# CONFIG_MTD_COMPLEX_MAPPINGS is not set
406# CONFIG_MTD_PHYSMAP is not set
407CONFIG_MTD_PHYSMAP_OF=y
408# CONFIG_MTD_INTEL_VR_NOR is not set
409# CONFIG_MTD_PLATRAM is not set
410
411#
412# Self-contained MTD device drivers
413#
414# CONFIG_MTD_PMC551 is not set
415# CONFIG_MTD_SLRAM is not set
416# CONFIG_MTD_PHRAM is not set
417# CONFIG_MTD_MTDRAM is not set
418# CONFIG_MTD_BLOCK2MTD is not set
419
420#
421# Disk-On-Chip Device Drivers
422#
423# CONFIG_MTD_DOC2000 is not set
424# CONFIG_MTD_DOC2001 is not set
425# CONFIG_MTD_DOC2001PLUS is not set
426# CONFIG_MTD_NAND is not set
427# CONFIG_MTD_ONENAND is not set
428
429#
430# UBI - Unsorted block images
431#
432# CONFIG_MTD_UBI is not set
433CONFIG_OF_DEVICE=y
434# CONFIG_PARPORT is not set
435CONFIG_BLK_DEV=y
436# CONFIG_BLK_DEV_FD is not set
437# CONFIG_BLK_CPQ_DA is not set
438# CONFIG_BLK_CPQ_CISS_DA is not set
439# CONFIG_BLK_DEV_DAC960 is not set
440# CONFIG_BLK_DEV_UMEM is not set
441# CONFIG_BLK_DEV_COW_COMMON is not set
442# CONFIG_BLK_DEV_LOOP is not set
443# CONFIG_BLK_DEV_NBD is not set
444# CONFIG_BLK_DEV_SX8 is not set
445CONFIG_BLK_DEV_RAM=y
446CONFIG_BLK_DEV_RAM_COUNT=16
447CONFIG_BLK_DEV_RAM_SIZE=35000
448# CONFIG_BLK_DEV_XIP is not set
449# CONFIG_CDROM_PKTCDVD is not set
450# CONFIG_ATA_OVER_ETH is not set
451# CONFIG_XILINX_SYSACE is not set
452CONFIG_MISC_DEVICES=y
453# CONFIG_PHANTOM is not set
454# CONFIG_EEPROM_93CX6 is not set
455# CONFIG_SGI_IOC4 is not set
456# CONFIG_TIFM_CORE is not set
457# CONFIG_ENCLOSURE_SERVICES is not set
458CONFIG_HAVE_IDE=y
459# CONFIG_IDE is not set
460
461#
462# SCSI device support
463#
464# CONFIG_RAID_ATTRS is not set
465# CONFIG_SCSI is not set
466# CONFIG_SCSI_DMA is not set
467# CONFIG_SCSI_NETLINK is not set
468# CONFIG_ATA is not set
469# CONFIG_MD is not set
470# CONFIG_FUSION is not set
471
472#
473# IEEE 1394 (FireWire) support
474#
475
476#
477# Enable only one of the two stacks, unless you know what you are doing
478#
479# CONFIG_FIREWIRE is not set
480# CONFIG_IEEE1394 is not set
481# CONFIG_I2O is not set
482# CONFIG_MACINTOSH_DRIVERS is not set
483CONFIG_NETDEVICES=y
484# CONFIG_NETDEVICES_MULTIQUEUE is not set
485# CONFIG_DUMMY is not set
486# CONFIG_BONDING is not set
487# CONFIG_MACVLAN is not set
488# CONFIG_EQUALIZER is not set
489# CONFIG_TUN is not set
490# CONFIG_VETH is not set
491# CONFIG_ARCNET is not set
492# CONFIG_PHYLIB is not set
493CONFIG_NET_ETHERNET=y
494# CONFIG_MII is not set
495# CONFIG_HAPPYMEAL is not set
496# CONFIG_SUNGEM is not set
497# CONFIG_CASSINI is not set
498# CONFIG_NET_VENDOR_3COM is not set
499# CONFIG_NET_TULIP is not set
500# CONFIG_HP100 is not set
501CONFIG_IBM_NEW_EMAC=y
502CONFIG_IBM_NEW_EMAC_RXB=128
503CONFIG_IBM_NEW_EMAC_TXB=64
504CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
505CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
506CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
507# CONFIG_IBM_NEW_EMAC_DEBUG is not set
508# CONFIG_IBM_NEW_EMAC_ZMII is not set
509# CONFIG_IBM_NEW_EMAC_RGMII is not set
510# CONFIG_IBM_NEW_EMAC_TAH is not set
511# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
512# CONFIG_NET_PCI is not set
513# CONFIG_B44 is not set
514CONFIG_NETDEV_1000=y
515# CONFIG_ACENIC is not set
516# CONFIG_DL2K is not set
517# CONFIG_E1000 is not set
518# CONFIG_E1000E is not set
519# CONFIG_E1000E_ENABLED is not set
520# CONFIG_IP1000 is not set
521# CONFIG_IGB is not set
522# CONFIG_NS83820 is not set
523# CONFIG_HAMACHI is not set
524# CONFIG_YELLOWFIN is not set
525# CONFIG_R8169 is not set
526# CONFIG_SIS190 is not set
527# CONFIG_SKGE is not set
528# CONFIG_SKY2 is not set
529# CONFIG_VIA_VELOCITY is not set
530# CONFIG_TIGON3 is not set
531# CONFIG_BNX2 is not set
532# CONFIG_QLA3XXX is not set
533# CONFIG_ATL1 is not set
534CONFIG_NETDEV_10000=y
535# CONFIG_CHELSIO_T1 is not set
536# CONFIG_CHELSIO_T3 is not set
537# CONFIG_IXGBE is not set
538# CONFIG_IXGB is not set
539# CONFIG_S2IO is not set
540# CONFIG_MYRI10GE is not set
541# CONFIG_NETXEN_NIC is not set
542# CONFIG_NIU is not set
543# CONFIG_MLX4_CORE is not set
544# CONFIG_TEHUTI is not set
545# CONFIG_BNX2X is not set
546# CONFIG_SFC is not set
547# CONFIG_TR is not set
548
549#
550# Wireless LAN
551#
552# CONFIG_WLAN_PRE80211 is not set
553# CONFIG_WLAN_80211 is not set
554# CONFIG_IWLWIFI_LEDS is not set
555# CONFIG_WAN is not set
556# CONFIG_FDDI is not set
557# CONFIG_HIPPI is not set
558# CONFIG_PPP is not set
559# CONFIG_SLIP is not set
560# CONFIG_NETCONSOLE is not set
561# CONFIG_NETPOLL is not set
562# CONFIG_NET_POLL_CONTROLLER is not set
563# CONFIG_ISDN is not set
564# CONFIG_PHONE is not set
565
566#
567# Input device support
568#
569# CONFIG_INPUT is not set
570
571#
572# Hardware I/O ports
573#
574# CONFIG_SERIO is not set
575# CONFIG_GAMEPORT is not set
576
577#
578# Character devices
579#
580# CONFIG_VT is not set
581CONFIG_DEVKMEM=y
582# CONFIG_SERIAL_NONSTANDARD is not set
583# CONFIG_NOZOMI is not set
584
585#
586# Serial drivers
587#
588CONFIG_SERIAL_8250=y
589CONFIG_SERIAL_8250_CONSOLE=y
590CONFIG_SERIAL_8250_PCI=y
591CONFIG_SERIAL_8250_NR_UARTS=4
592CONFIG_SERIAL_8250_RUNTIME_UARTS=4
593CONFIG_SERIAL_8250_EXTENDED=y
594# CONFIG_SERIAL_8250_MANY_PORTS is not set
595CONFIG_SERIAL_8250_SHARE_IRQ=y
596# CONFIG_SERIAL_8250_DETECT_IRQ is not set
597# CONFIG_SERIAL_8250_RSA is not set
598
599#
600# Non-8250 serial port support
601#
602# CONFIG_SERIAL_UARTLITE is not set
603CONFIG_SERIAL_CORE=y
604CONFIG_SERIAL_CORE_CONSOLE=y
605# CONFIG_SERIAL_JSM is not set
606CONFIG_SERIAL_OF_PLATFORM=y
607CONFIG_UNIX98_PTYS=y
608CONFIG_LEGACY_PTYS=y
609CONFIG_LEGACY_PTY_COUNT=256
610# CONFIG_IPMI_HANDLER is not set
611# CONFIG_HW_RANDOM is not set
612# CONFIG_NVRAM is not set
613# CONFIG_GEN_RTC is not set
614# CONFIG_R3964 is not set
615# CONFIG_APPLICOM is not set
616# CONFIG_RAW_DRIVER is not set
617# CONFIG_TCG_TPM is not set
618CONFIG_DEVPORT=y
619# CONFIG_I2C is not set
620# CONFIG_SPI is not set
621# CONFIG_W1 is not set
622# CONFIG_POWER_SUPPLY is not set
623# CONFIG_HWMON is not set
624# CONFIG_THERMAL is not set
625# CONFIG_THERMAL_HWMON is not set
626# CONFIG_WATCHDOG is not set
627
628#
629# Sonics Silicon Backplane
630#
631CONFIG_SSB_POSSIBLE=y
632# CONFIG_SSB is not set
633
634#
635# Multifunction device drivers
636#
637# CONFIG_MFD_SM501 is not set
638# CONFIG_HTC_PASIC3 is not set
639
640#
641# Multimedia devices
642#
643
644#
645# Multimedia core support
646#
647# CONFIG_VIDEO_DEV is not set
648# CONFIG_DVB_CORE is not set
649# CONFIG_VIDEO_MEDIA is not set
650
651#
652# Multimedia drivers
653#
654# CONFIG_DAB is not set
655
656#
657# Graphics support
658#
659# CONFIG_AGP is not set
660# CONFIG_DRM is not set
661# CONFIG_VGASTATE is not set
662CONFIG_VIDEO_OUTPUT_CONTROL=m
663# CONFIG_FB is not set
664# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
665
666#
667# Display device support
668#
669# CONFIG_DISPLAY_SUPPORT is not set
670
671#
672# Sound
673#
674# CONFIG_SOUND is not set
675# CONFIG_USB_SUPPORT is not set
676# CONFIG_MMC is not set
677# CONFIG_MEMSTICK is not set
678# CONFIG_NEW_LEDS is not set
679# CONFIG_ACCESSIBILITY is not set
680# CONFIG_INFINIBAND is not set
681# CONFIG_EDAC is not set
682# CONFIG_RTC_CLASS is not set
683# CONFIG_DMADEVICES is not set
684# CONFIG_UIO is not set
685
686#
687# File systems
688#
689CONFIG_EXT2_FS=y
690# CONFIG_EXT2_FS_XATTR is not set
691# CONFIG_EXT2_FS_XIP is not set
692# CONFIG_EXT3_FS is not set
693# CONFIG_EXT4DEV_FS is not set
694# CONFIG_REISERFS_FS is not set
695# CONFIG_JFS_FS is not set
696# CONFIG_FS_POSIX_ACL is not set
697# CONFIG_XFS_FS is not set
698# CONFIG_OCFS2_FS is not set
699CONFIG_DNOTIFY=y
700CONFIG_INOTIFY=y
701CONFIG_INOTIFY_USER=y
702# CONFIG_QUOTA is not set
703# CONFIG_AUTOFS_FS is not set
704# CONFIG_AUTOFS4_FS is not set
705# CONFIG_FUSE_FS is not set
706
707#
708# CD-ROM/DVD Filesystems
709#
710# CONFIG_ISO9660_FS is not set
711# CONFIG_UDF_FS is not set
712
713#
714# DOS/FAT/NT Filesystems
715#
716# CONFIG_MSDOS_FS is not set
717# CONFIG_VFAT_FS is not set
718# CONFIG_NTFS_FS is not set
719
720#
721# Pseudo filesystems
722#
723CONFIG_PROC_FS=y
724CONFIG_PROC_KCORE=y
725CONFIG_PROC_SYSCTL=y
726CONFIG_SYSFS=y
727CONFIG_TMPFS=y
728# CONFIG_TMPFS_POSIX_ACL is not set
729# CONFIG_HUGETLB_PAGE is not set
730# CONFIG_CONFIGFS_FS is not set
731
732#
733# Miscellaneous filesystems
734#
735# CONFIG_ADFS_FS is not set
736# CONFIG_AFFS_FS is not set
737# CONFIG_HFS_FS is not set
738# CONFIG_HFSPLUS_FS is not set
739# CONFIG_BEFS_FS is not set
740# CONFIG_BFS_FS is not set
741# CONFIG_EFS_FS is not set
742# CONFIG_YAFFS_FS is not set
743# CONFIG_JFFS2_FS is not set
744CONFIG_CRAMFS=y
745# CONFIG_VXFS_FS is not set
746# CONFIG_MINIX_FS is not set
747# CONFIG_HPFS_FS is not set
748# CONFIG_QNX4FS_FS is not set
749# CONFIG_ROMFS_FS is not set
750# CONFIG_SYSV_FS is not set
751# CONFIG_UFS_FS is not set
752CONFIG_NETWORK_FILESYSTEMS=y
753CONFIG_NFS_FS=y
754CONFIG_NFS_V3=y
755# CONFIG_NFS_V3_ACL is not set
756# CONFIG_NFS_V4 is not set
757# CONFIG_NFSD is not set
758CONFIG_ROOT_NFS=y
759CONFIG_LOCKD=y
760CONFIG_LOCKD_V4=y
761CONFIG_NFS_COMMON=y
762CONFIG_SUNRPC=y
763# CONFIG_SUNRPC_BIND34 is not set
764# CONFIG_RPCSEC_GSS_KRB5 is not set
765# CONFIG_RPCSEC_GSS_SPKM3 is not set
766# CONFIG_SMB_FS is not set
767# CONFIG_CIFS is not set
768# CONFIG_NCP_FS is not set
769# CONFIG_CODA_FS is not set
770# CONFIG_AFS_FS is not set
771
772#
773# Partition Types
774#
775# CONFIG_PARTITION_ADVANCED is not set
776CONFIG_MSDOS_PARTITION=y
777# CONFIG_NLS is not set
778# CONFIG_DLM is not set
779
780#
781# Library routines
782#
783CONFIG_BITREVERSE=y
784# CONFIG_GENERIC_FIND_FIRST_BIT is not set
785# CONFIG_CRC_CCITT is not set
786# CONFIG_CRC16 is not set
787# CONFIG_CRC_ITU_T is not set
788CONFIG_CRC32=y
789# CONFIG_CRC7 is not set
790# CONFIG_LIBCRC32C is not set
791CONFIG_ZLIB_INFLATE=y
792CONFIG_PLIST=y
793CONFIG_HAS_IOMEM=y
794CONFIG_HAS_IOPORT=y
795CONFIG_HAS_DMA=y
796CONFIG_HAVE_LMB=y
797
798#
799# Kernel hacking
800#
801# CONFIG_PRINTK_TIME is not set
802CONFIG_ENABLE_WARN_DEPRECATED=y
803CONFIG_ENABLE_MUST_CHECK=y
804CONFIG_FRAME_WARN=1024
805CONFIG_MAGIC_SYSRQ=y
806# CONFIG_UNUSED_SYMBOLS is not set
807CONFIG_DEBUG_FS=y
808# CONFIG_HEADERS_CHECK is not set
809CONFIG_DEBUG_KERNEL=y
810# CONFIG_DEBUG_SHIRQ is not set
811CONFIG_DETECT_SOFTLOCKUP=y
812CONFIG_SCHED_DEBUG=y
813# CONFIG_SCHEDSTATS is not set
814# CONFIG_TIMER_STATS is not set
815# CONFIG_DEBUG_OBJECTS is not set
816# CONFIG_SLUB_DEBUG_ON is not set
817# CONFIG_SLUB_STATS is not set
818# CONFIG_DEBUG_RT_MUTEXES is not set
819# CONFIG_RT_MUTEX_TESTER is not set
820# CONFIG_DEBUG_SPINLOCK is not set
821# CONFIG_DEBUG_MUTEXES is not set
822# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
823# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
824# CONFIG_DEBUG_KOBJECT is not set
825CONFIG_DEBUG_BUGVERBOSE=y
826# CONFIG_DEBUG_INFO is not set
827# CONFIG_DEBUG_VM is not set
828# CONFIG_DEBUG_WRITECOUNT is not set
829# CONFIG_DEBUG_LIST is not set
830# CONFIG_DEBUG_SG is not set
831# CONFIG_BOOT_PRINTK_DELAY is not set
832# CONFIG_RCU_TORTURE_TEST is not set
833# CONFIG_BACKTRACE_SELF_TEST is not set
834# CONFIG_FAULT_INJECTION is not set
835# CONFIG_SAMPLES is not set
836# CONFIG_DEBUG_STACKOVERFLOW is not set
837# CONFIG_DEBUG_STACK_USAGE is not set
838# CONFIG_DEBUG_PAGEALLOC is not set
839# CONFIG_DEBUGGER is not set
840# CONFIG_IRQSTACKS is not set
841# CONFIG_VIRQ_DEBUG is not set
842# CONFIG_BDI_SWITCH is not set
843# CONFIG_PPC_EARLY_DEBUG is not set
844
845#
846# Security options
847#
848# CONFIG_KEYS is not set
849# CONFIG_SECURITY is not set
850# CONFIG_SECURITY_FILE_CAPABILITIES is not set
851CONFIG_CRYPTO=y
852
853#
854# Crypto core or helper
855#
856CONFIG_CRYPTO_ALGAPI=y
857CONFIG_CRYPTO_BLKCIPHER=y
858CONFIG_CRYPTO_MANAGER=y
859# CONFIG_CRYPTO_GF128MUL is not set
860# CONFIG_CRYPTO_NULL is not set
861# CONFIG_CRYPTO_CRYPTD is not set
862# CONFIG_CRYPTO_AUTHENC is not set
863# CONFIG_CRYPTO_TEST is not set
864
865#
866# Authenticated Encryption with Associated Data
867#
868# CONFIG_CRYPTO_CCM is not set
869# CONFIG_CRYPTO_GCM is not set
870# CONFIG_CRYPTO_SEQIV is not set
871
872#
873# Block modes
874#
875CONFIG_CRYPTO_CBC=y
876# CONFIG_CRYPTO_CTR is not set
877# CONFIG_CRYPTO_CTS is not set
878CONFIG_CRYPTO_ECB=y
879# CONFIG_CRYPTO_LRW is not set
880CONFIG_CRYPTO_PCBC=y
881# CONFIG_CRYPTO_XTS is not set
882
883#
884# Hash modes
885#
886# CONFIG_CRYPTO_HMAC is not set
887# CONFIG_CRYPTO_XCBC is not set
888
889#
890# Digest
891#
892# CONFIG_CRYPTO_CRC32C is not set
893# CONFIG_CRYPTO_MD4 is not set
894CONFIG_CRYPTO_MD5=y
895# CONFIG_CRYPTO_MICHAEL_MIC is not set
896# CONFIG_CRYPTO_SHA1 is not set
897# CONFIG_CRYPTO_SHA256 is not set
898# CONFIG_CRYPTO_SHA512 is not set
899# CONFIG_CRYPTO_TGR192 is not set
900# CONFIG_CRYPTO_WP512 is not set
901
902#
903# Ciphers
904#
905# CONFIG_CRYPTO_AES is not set
906# CONFIG_CRYPTO_ANUBIS is not set
907# CONFIG_CRYPTO_ARC4 is not set
908# CONFIG_CRYPTO_BLOWFISH is not set
909# CONFIG_CRYPTO_CAMELLIA is not set
910# CONFIG_CRYPTO_CAST5 is not set
911# CONFIG_CRYPTO_CAST6 is not set
912CONFIG_CRYPTO_DES=y
913# CONFIG_CRYPTO_FCRYPT is not set
914# CONFIG_CRYPTO_KHAZAD is not set
915# CONFIG_CRYPTO_SALSA20 is not set
916# CONFIG_CRYPTO_SEED is not set
917# CONFIG_CRYPTO_SERPENT is not set
918# CONFIG_CRYPTO_TEA is not set
919# CONFIG_CRYPTO_TWOFISH is not set
920
921#
922# Compression
923#
924# CONFIG_CRYPTO_DEFLATE is not set
925# CONFIG_CRYPTO_LZO is not set
926CONFIG_CRYPTO_HW=y
927# CONFIG_CRYPTO_DEV_HIFN_795X is not set
928# CONFIG_PPC_CLOCK is not set
929# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index 64e144505f65..120f4d494257 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -12,7 +12,9 @@
12 12
13#include <asm/asm-compat.h> 13#include <asm/asm-compat.h>
14#include <asm/kdump.h> 14#include <asm/kdump.h>
15#include <asm/types.h> 15#ifndef __ASSEMBLY__
16#include <linux/types.h>
17#endif
16 18
17/* 19/*
18 * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software 20 * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software
@@ -73,6 +75,7 @@
73 75
74#if defined(CONFIG_RELOCATABLE) 76#if defined(CONFIG_RELOCATABLE)
75#ifndef __ASSEMBLY__ 77#ifndef __ASSEMBLY__
78
76extern phys_addr_t memstart_addr; 79extern phys_addr_t memstart_addr;
77extern phys_addr_t kernstart_addr; 80extern phys_addr_t kernstart_addr;
78#endif 81#endif
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index e70d0483fb4e..b1eb834bc0fc 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1277,6 +1277,19 @@ static struct cpu_spec __initdata cpu_specs[] = {
1277 .machine_check = machine_check_4xx, 1277 .machine_check = machine_check_4xx,
1278 .platform = "ppc405", 1278 .platform = "ppc405",
1279 }, 1279 },
1280 {
1281 /* 405EZ */
1282 .pvr_mask = 0xffff0000,
1283 .pvr_value = 0x41510000,
1284 .cpu_name = "405EZ",
1285 .cpu_features = CPU_FTRS_40X,
1286 .cpu_user_features = PPC_FEATURE_32 |
1287 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1288 .icache_bsize = 32,
1289 .dcache_bsize = 32,
1290 .machine_check = machine_check_4xx,
1291 .platform = "ppc405",
1292 },
1280 { /* default match */ 1293 { /* default match */
1281 .pvr_mask = 0x00000000, 1294 .pvr_mask = 0x00000000,
1282 .pvr_value = 0x00000000, 1295 .pvr_value = 0x00000000,
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a168514d8609..4bd8b4f5e70d 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -312,11 +312,24 @@ static struct property kernel_end_prop = {
312static void __init export_htab_values(void) 312static void __init export_htab_values(void)
313{ 313{
314 struct device_node *node; 314 struct device_node *node;
315 struct property *prop;
315 316
316 node = of_find_node_by_path("/chosen"); 317 node = of_find_node_by_path("/chosen");
317 if (!node) 318 if (!node)
318 return; 319 return;
319 320
321 /* remove any stale propertys so ours can be found */
322 prop = of_find_property(node, kernel_end_prop.name, NULL);
323 if (prop)
324 prom_remove_property(node, prop);
325 prop = of_find_property(node, htab_base_prop.name, NULL);
326 if (prop)
327 prom_remove_property(node, prop);
328 prop = of_find_property(node, htab_size_prop.name, NULL);
329 if (prop)
330 prom_remove_property(node, prop);
331
332 /* information needed by userspace when using default_machine_kexec */
320 kernel_end = __pa(_end); 333 kernel_end = __pa(_end);
321 prom_add_property(node, &kernel_end_prop); 334 prom_add_property(node, &kernel_end_prop);
322 335
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 2fdbc18ae94a..23e0db203329 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -487,67 +487,6 @@ static int __init prom_setprop(phandle node, const char *nodename,
487 return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd); 487 return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd);
488} 488}
489 489
490/* We can't use the standard versions because of RELOC headaches. */
491#define isxdigit(c) (('0' <= (c) && (c) <= '9') \
492 || ('a' <= (c) && (c) <= 'f') \
493 || ('A' <= (c) && (c) <= 'F'))
494
495#define isdigit(c) ('0' <= (c) && (c) <= '9')
496#define islower(c) ('a' <= (c) && (c) <= 'z')
497#define toupper(c) (islower(c) ? ((c) - 'a' + 'A') : (c))
498
499unsigned long prom_strtoul(const char *cp, const char **endp)
500{
501 unsigned long result = 0, base = 10, value;
502
503 if (*cp == '0') {
504 base = 8;
505 cp++;
506 if (toupper(*cp) == 'X') {
507 cp++;
508 base = 16;
509 }
510 }
511
512 while (isxdigit(*cp) &&
513 (value = isdigit(*cp) ? *cp - '0' : toupper(*cp) - 'A' + 10) < base) {
514 result = result * base + value;
515 cp++;
516 }
517
518 if (endp)
519 *endp = cp;
520
521 return result;
522}
523
524unsigned long prom_memparse(const char *ptr, const char **retptr)
525{
526 unsigned long ret = prom_strtoul(ptr, retptr);
527 int shift = 0;
528
529 /*
530 * We can't use a switch here because GCC *may* generate a
531 * jump table which won't work, because we're not running at
532 * the address we're linked at.
533 */
534 if ('G' == **retptr || 'g' == **retptr)
535 shift = 30;
536
537 if ('M' == **retptr || 'm' == **retptr)
538 shift = 20;
539
540 if ('K' == **retptr || 'k' == **retptr)
541 shift = 10;
542
543 if (shift) {
544 ret <<= shift;
545 (*retptr)++;
546 }
547
548 return ret;
549}
550
551/* 490/*
552 * Early parsing of the command line passed to the kernel, used for 491 * Early parsing of the command line passed to the kernel, used for
553 * "mem=x" and the options that affect the iommu 492 * "mem=x" and the options that affect the iommu
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
index 2c7e8e87f770..ea3a2ec03ffa 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -20,7 +20,7 @@ WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
20_end enter_prom memcpy memset reloc_offset __secondary_hold 20_end enter_prom memcpy memset reloc_offset __secondary_hold
21__secondary_hold_acknowledge __secondary_hold_spinloop __start 21__secondary_hold_acknowledge __secondary_hold_spinloop __start
22strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 22strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224
23reloc_got2 kernstart_addr" 23reloc_got2 kernstart_addr memstart_addr"
24 24
25NM="$1" 25NM="$1"
26OBJ="$2" 26OBJ="$2"
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index cb01ebc59387..7b7da8cfd5e8 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -142,7 +142,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
142 speed = (clock / prescaler) / (divisor * 16); 142 speed = (clock / prescaler) / (divisor * 16);
143 143
144 /* sanity check */ 144 /* sanity check */
145 if (speed < 0 || speed > (clock / 16)) 145 if (speed > (clock / 16))
146 speed = 9600; 146 speed = 9600;
147 147
148 return speed; 148 return speed;
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 6cf5c71c431f..eb505ad34a85 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -116,6 +116,7 @@ static int __init get_active_region_work_fn(unsigned long start_pfn,
116 116
117/* 117/*
118 * get_node_active_region - Return active region containing start_pfn 118 * get_node_active_region - Return active region containing start_pfn
119 * Active range returned is empty if none found.
119 * @start_pfn: The page to return the region for. 120 * @start_pfn: The page to return the region for.
120 * @node_ar: Returned set to the active region containing start_pfn 121 * @node_ar: Returned set to the active region containing start_pfn
121 */ 122 */
@@ -126,6 +127,7 @@ static void __init get_node_active_region(unsigned long start_pfn,
126 127
127 node_ar->nid = nid; 128 node_ar->nid = nid;
128 node_ar->start_pfn = start_pfn; 129 node_ar->start_pfn = start_pfn;
130 node_ar->end_pfn = start_pfn;
129 work_with_active_regions(nid, get_active_region_work_fn, node_ar); 131 work_with_active_regions(nid, get_active_region_work_fn, node_ar);
130} 132}
131 133
@@ -526,12 +528,10 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start,
526 /* 528 /*
527 * We use lmb_end_of_DRAM() in here instead of memory_limit because 529 * We use lmb_end_of_DRAM() in here instead of memory_limit because
528 * we've already adjusted it for the limit and it takes care of 530 * we've already adjusted it for the limit and it takes care of
529 * having memory holes below the limit. 531 * having memory holes below the limit. Also, in the case of
532 * iommu_is_off, memory_limit is not set but is implicitly enforced.
530 */ 533 */
531 534
532 if (! memory_limit)
533 return size;
534
535 if (start + size <= lmb_end_of_DRAM()) 535 if (start + size <= lmb_end_of_DRAM())
536 return size; 536 return size;
537 537
@@ -933,18 +933,20 @@ void __init do_init_bootmem(void)
933 struct node_active_region node_ar; 933 struct node_active_region node_ar;
934 934
935 get_node_active_region(start_pfn, &node_ar); 935 get_node_active_region(start_pfn, &node_ar);
936 while (start_pfn < end_pfn) { 936 while (start_pfn < end_pfn &&
937 node_ar.start_pfn < node_ar.end_pfn) {
938 unsigned long reserve_size = size;
937 /* 939 /*
938 * if reserved region extends past active region 940 * if reserved region extends past active region
939 * then trim size to active region 941 * then trim size to active region
940 */ 942 */
941 if (end_pfn > node_ar.end_pfn) 943 if (end_pfn > node_ar.end_pfn)
942 size = (node_ar.end_pfn << PAGE_SHIFT) 944 reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
943 - (start_pfn << PAGE_SHIFT); 945 - (start_pfn << PAGE_SHIFT);
944 dbg("reserve_bootmem %lx %lx nid=%d\n", physbase, size, 946 dbg("reserve_bootmem %lx %lx nid=%d\n", physbase,
945 node_ar.nid); 947 reserve_size, node_ar.nid);
946 reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase, 948 reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
947 size, BOOTMEM_DEFAULT); 949 reserve_size, BOOTMEM_DEFAULT);
948 /* 950 /*
949 * if reserved region is contained in the active region 951 * if reserved region is contained in the active region
950 * then done. 952 * then done.
@@ -959,6 +961,7 @@ void __init do_init_bootmem(void)
959 */ 961 */
960 start_pfn = node_ar.end_pfn; 962 start_pfn = node_ar.end_pfn;
961 physbase = start_pfn << PAGE_SHIFT; 963 physbase = start_pfn << PAGE_SHIFT;
964 size = size - reserve_size;
962 get_node_active_region(start_pfn, &node_ar); 965 get_node_active_region(start_pfn, &node_ar);
963 } 966 }
964 967
diff --git a/arch/powerpc/oprofile/cell/pr_util.h b/arch/powerpc/oprofile/cell/pr_util.h
index 22e4e8d4eb2c..628009c01958 100644
--- a/arch/powerpc/oprofile/cell/pr_util.h
+++ b/arch/powerpc/oprofile/cell/pr_util.h
@@ -24,6 +24,11 @@
24#define SKIP_GENERIC_SYNC 0 24#define SKIP_GENERIC_SYNC 0
25#define SYNC_START_ERROR -1 25#define SYNC_START_ERROR -1
26#define DO_GENERIC_SYNC 1 26#define DO_GENERIC_SYNC 1
27#define SPUS_PER_NODE 8
28#define DEFAULT_TIMER_EXPIRE (HZ / 10)
29
30extern struct delayed_work spu_work;
31extern int spu_prof_running;
27 32
28struct spu_overlay_info { /* map of sections within an SPU overlay */ 33struct spu_overlay_info { /* map of sections within an SPU overlay */
29 unsigned int vma; /* SPU virtual memory address from elf */ 34 unsigned int vma; /* SPU virtual memory address from elf */
@@ -62,6 +67,14 @@ struct vma_to_fileoffset_map { /* map of sections within an SPU program */
62 67
63}; 68};
64 69
70struct spu_buffer {
71 int last_guard_val;
72 int ctx_sw_seen;
73 unsigned long *buff;
74 unsigned int head, tail;
75};
76
77
65/* The three functions below are for maintaining and accessing 78/* The three functions below are for maintaining and accessing
66 * the vma-to-fileoffset map. 79 * the vma-to-fileoffset map.
67 */ 80 */
diff --git a/arch/powerpc/oprofile/cell/spu_profiler.c b/arch/powerpc/oprofile/cell/spu_profiler.c
index 380d7e217531..6edaebd5099a 100644
--- a/arch/powerpc/oprofile/cell/spu_profiler.c
+++ b/arch/powerpc/oprofile/cell/spu_profiler.c
@@ -23,12 +23,11 @@
23 23
24static u32 *samples; 24static u32 *samples;
25 25
26static int spu_prof_running; 26int spu_prof_running;
27static unsigned int profiling_interval; 27static unsigned int profiling_interval;
28 28
29#define NUM_SPU_BITS_TRBUF 16 29#define NUM_SPU_BITS_TRBUF 16
30#define SPUS_PER_TB_ENTRY 4 30#define SPUS_PER_TB_ENTRY 4
31#define SPUS_PER_NODE 8
32 31
33#define SPU_PC_MASK 0xFFFF 32#define SPU_PC_MASK 0xFFFF
34 33
@@ -208,6 +207,7 @@ int start_spu_profiling(unsigned int cycles_reset)
208 207
209 spu_prof_running = 1; 208 spu_prof_running = 1;
210 hrtimer_start(&timer, kt, HRTIMER_MODE_REL); 209 hrtimer_start(&timer, kt, HRTIMER_MODE_REL);
210 schedule_delayed_work(&spu_work, DEFAULT_TIMER_EXPIRE);
211 211
212 return 0; 212 return 0;
213} 213}
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index 2a9b4a049329..2949126d28d1 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -35,7 +35,102 @@ static DEFINE_SPINLOCK(buffer_lock);
35static DEFINE_SPINLOCK(cache_lock); 35static DEFINE_SPINLOCK(cache_lock);
36static int num_spu_nodes; 36static int num_spu_nodes;
37int spu_prof_num_nodes; 37int spu_prof_num_nodes;
38int last_guard_val[MAX_NUMNODES * 8]; 38
39struct spu_buffer spu_buff[MAX_NUMNODES * SPUS_PER_NODE];
40struct delayed_work spu_work;
41static unsigned max_spu_buff;
42
43static void spu_buff_add(unsigned long int value, int spu)
44{
45 /* spu buff is a circular buffer. Add entries to the
46 * head. Head is the index to store the next value.
47 * The buffer is full when there is one available entry
48 * in the queue, i.e. head and tail can't be equal.
49 * That way we can tell the difference between the
50 * buffer being full versus empty.
51 *
52 * ASSUPTION: the buffer_lock is held when this function
53 * is called to lock the buffer, head and tail.
54 */
55 int full = 1;
56
57 if (spu_buff[spu].head >= spu_buff[spu].tail) {
58 if ((spu_buff[spu].head - spu_buff[spu].tail)
59 < (max_spu_buff - 1))
60 full = 0;
61
62 } else if (spu_buff[spu].tail > spu_buff[spu].head) {
63 if ((spu_buff[spu].tail - spu_buff[spu].head)
64 > 1)
65 full = 0;
66 }
67
68 if (!full) {
69 spu_buff[spu].buff[spu_buff[spu].head] = value;
70 spu_buff[spu].head++;
71
72 if (spu_buff[spu].head >= max_spu_buff)
73 spu_buff[spu].head = 0;
74 } else {
75 /* From the user's perspective make the SPU buffer
76 * size management/overflow look like we are using
77 * per cpu buffers. The user uses the same
78 * per cpu parameter to adjust the SPU buffer size.
79 * Increment the sample_lost_overflow to inform
80 * the user the buffer size needs to be increased.
81 */
82 oprofile_cpu_buffer_inc_smpl_lost();
83 }
84}
85
86/* This function copies the per SPU buffers to the
87 * OProfile kernel buffer.
88 */
89void sync_spu_buff(void)
90{
91 int spu;
92 unsigned long flags;
93 int curr_head;
94
95 for (spu = 0; spu < num_spu_nodes; spu++) {
96 /* In case there was an issue and the buffer didn't
97 * get created skip it.
98 */
99 if (spu_buff[spu].buff == NULL)
100 continue;
101
102 /* Hold the lock to make sure the head/tail
103 * doesn't change while spu_buff_add() is
104 * deciding if the buffer is full or not.
105 * Being a little paranoid.
106 */
107 spin_lock_irqsave(&buffer_lock, flags);
108 curr_head = spu_buff[spu].head;
109 spin_unlock_irqrestore(&buffer_lock, flags);
110
111 /* Transfer the current contents to the kernel buffer.
112 * data can still be added to the head of the buffer.
113 */
114 oprofile_put_buff(spu_buff[spu].buff,
115 spu_buff[spu].tail,
116 curr_head, max_spu_buff);
117
118 spin_lock_irqsave(&buffer_lock, flags);
119 spu_buff[spu].tail = curr_head;
120 spin_unlock_irqrestore(&buffer_lock, flags);
121 }
122
123}
124
125static void wq_sync_spu_buff(struct work_struct *work)
126{
127 /* move data from spu buffers to kernel buffer */
128 sync_spu_buff();
129
130 /* only reschedule if profiling is not done */
131 if (spu_prof_running)
132 schedule_delayed_work(&spu_work, DEFAULT_TIMER_EXPIRE);
133}
39 134
40/* Container for caching information about an active SPU task. */ 135/* Container for caching information about an active SPU task. */
41struct cached_info { 136struct cached_info {
@@ -305,14 +400,21 @@ static int process_context_switch(struct spu *spu, unsigned long objectId)
305 400
306 /* Record context info in event buffer */ 401 /* Record context info in event buffer */
307 spin_lock_irqsave(&buffer_lock, flags); 402 spin_lock_irqsave(&buffer_lock, flags);
308 add_event_entry(ESCAPE_CODE); 403 spu_buff_add(ESCAPE_CODE, spu->number);
309 add_event_entry(SPU_CTX_SWITCH_CODE); 404 spu_buff_add(SPU_CTX_SWITCH_CODE, spu->number);
310 add_event_entry(spu->number); 405 spu_buff_add(spu->number, spu->number);
311 add_event_entry(spu->pid); 406 spu_buff_add(spu->pid, spu->number);
312 add_event_entry(spu->tgid); 407 spu_buff_add(spu->tgid, spu->number);
313 add_event_entry(app_dcookie); 408 spu_buff_add(app_dcookie, spu->number);
314 add_event_entry(spu_cookie); 409 spu_buff_add(spu_cookie, spu->number);
315 add_event_entry(offset); 410 spu_buff_add(offset, spu->number);
411
412 /* Set flag to indicate SPU PC data can now be written out. If
413 * the SPU program counter data is seen before an SPU context
414 * record is seen, the postprocessing will fail.
415 */
416 spu_buff[spu->number].ctx_sw_seen = 1;
417
316 spin_unlock_irqrestore(&buffer_lock, flags); 418 spin_unlock_irqrestore(&buffer_lock, flags);
317 smp_wmb(); /* insure spu event buffer updates are written */ 419 smp_wmb(); /* insure spu event buffer updates are written */
318 /* don't want entries intermingled... */ 420 /* don't want entries intermingled... */
@@ -360,6 +462,47 @@ static int number_of_online_nodes(void)
360 return nodes; 462 return nodes;
361} 463}
362 464
465static int oprofile_spu_buff_create(void)
466{
467 int spu;
468
469 max_spu_buff = oprofile_get_cpu_buffer_size();
470
471 for (spu = 0; spu < num_spu_nodes; spu++) {
472 /* create circular buffers to store the data in.
473 * use locks to manage accessing the buffers
474 */
475 spu_buff[spu].head = 0;
476 spu_buff[spu].tail = 0;
477
478 /*
479 * Create a buffer for each SPU. Can't reliably
480 * create a single buffer for all spus due to not
481 * enough contiguous kernel memory.
482 */
483
484 spu_buff[spu].buff = kzalloc((max_spu_buff
485 * sizeof(unsigned long)),
486 GFP_KERNEL);
487
488 if (!spu_buff[spu].buff) {
489 printk(KERN_ERR "SPU_PROF: "
490 "%s, line %d: oprofile_spu_buff_create "
491 "failed to allocate spu buffer %d.\n",
492 __func__, __LINE__, spu);
493
494 /* release the spu buffers that have been allocated */
495 while (spu >= 0) {
496 kfree(spu_buff[spu].buff);
497 spu_buff[spu].buff = 0;
498 spu--;
499 }
500 return -ENOMEM;
501 }
502 }
503 return 0;
504}
505
363/* The main purpose of this function is to synchronize 506/* The main purpose of this function is to synchronize
364 * OProfile with SPUFS by registering to be notified of 507 * OProfile with SPUFS by registering to be notified of
365 * SPU task switches. 508 * SPU task switches.
@@ -372,20 +515,35 @@ static int number_of_online_nodes(void)
372 */ 515 */
373int spu_sync_start(void) 516int spu_sync_start(void)
374{ 517{
375 int k; 518 int spu;
376 int ret = SKIP_GENERIC_SYNC; 519 int ret = SKIP_GENERIC_SYNC;
377 int register_ret; 520 int register_ret;
378 unsigned long flags = 0; 521 unsigned long flags = 0;
379 522
380 spu_prof_num_nodes = number_of_online_nodes(); 523 spu_prof_num_nodes = number_of_online_nodes();
381 num_spu_nodes = spu_prof_num_nodes * 8; 524 num_spu_nodes = spu_prof_num_nodes * 8;
525 INIT_DELAYED_WORK(&spu_work, wq_sync_spu_buff);
526
527 /* create buffer for storing the SPU data to put in
528 * the kernel buffer.
529 */
530 ret = oprofile_spu_buff_create();
531 if (ret)
532 goto out;
382 533
383 spin_lock_irqsave(&buffer_lock, flags); 534 spin_lock_irqsave(&buffer_lock, flags);
384 add_event_entry(ESCAPE_CODE); 535 for (spu = 0; spu < num_spu_nodes; spu++) {
385 add_event_entry(SPU_PROFILING_CODE); 536 spu_buff_add(ESCAPE_CODE, spu);
386 add_event_entry(num_spu_nodes); 537 spu_buff_add(SPU_PROFILING_CODE, spu);
538 spu_buff_add(num_spu_nodes, spu);
539 }
387 spin_unlock_irqrestore(&buffer_lock, flags); 540 spin_unlock_irqrestore(&buffer_lock, flags);
388 541
542 for (spu = 0; spu < num_spu_nodes; spu++) {
543 spu_buff[spu].ctx_sw_seen = 0;
544 spu_buff[spu].last_guard_val = 0;
545 }
546
389 /* Register for SPU events */ 547 /* Register for SPU events */
390 register_ret = spu_switch_event_register(&spu_active); 548 register_ret = spu_switch_event_register(&spu_active);
391 if (register_ret) { 549 if (register_ret) {
@@ -393,8 +551,6 @@ int spu_sync_start(void)
393 goto out; 551 goto out;
394 } 552 }
395 553
396 for (k = 0; k < (MAX_NUMNODES * 8); k++)
397 last_guard_val[k] = 0;
398 pr_debug("spu_sync_start -- running.\n"); 554 pr_debug("spu_sync_start -- running.\n");
399out: 555out:
400 return ret; 556 return ret;
@@ -446,13 +602,20 @@ void spu_sync_buffer(int spu_num, unsigned int *samples,
446 * use. We need to discard samples taken during the time 602 * use. We need to discard samples taken during the time
447 * period which an overlay occurs (i.e., guard value changes). 603 * period which an overlay occurs (i.e., guard value changes).
448 */ 604 */
449 if (grd_val && grd_val != last_guard_val[spu_num]) { 605 if (grd_val && grd_val != spu_buff[spu_num].last_guard_val) {
450 last_guard_val[spu_num] = grd_val; 606 spu_buff[spu_num].last_guard_val = grd_val;
451 /* Drop the rest of the samples. */ 607 /* Drop the rest of the samples. */
452 break; 608 break;
453 } 609 }
454 610
455 add_event_entry(file_offset | spu_num_shifted); 611 /* We must ensure that the SPU context switch has been written
612 * out before samples for the SPU. Otherwise, the SPU context
613 * information is not available and the postprocessing of the
614 * SPU PC will fail with no available anonymous map information.
615 */
616 if (spu_buff[spu_num].ctx_sw_seen)
617 spu_buff_add((file_offset | spu_num_shifted),
618 spu_num);
456 } 619 }
457 spin_unlock(&buffer_lock); 620 spin_unlock(&buffer_lock);
458out: 621out:
@@ -463,20 +626,41 @@ out:
463int spu_sync_stop(void) 626int spu_sync_stop(void)
464{ 627{
465 unsigned long flags = 0; 628 unsigned long flags = 0;
466 int ret = spu_switch_event_unregister(&spu_active); 629 int ret;
467 if (ret) { 630 int k;
631
632 ret = spu_switch_event_unregister(&spu_active);
633
634 if (ret)
468 printk(KERN_ERR "SPU_PROF: " 635 printk(KERN_ERR "SPU_PROF: "
469 "%s, line %d: spu_switch_event_unregister returned %d\n", 636 "%s, line %d: spu_switch_event_unregister " \
470 __func__, __LINE__, ret); 637 "returned %d\n",
471 goto out; 638 __func__, __LINE__, ret);
472 } 639
640 /* flush any remaining data in the per SPU buffers */
641 sync_spu_buff();
473 642
474 spin_lock_irqsave(&cache_lock, flags); 643 spin_lock_irqsave(&cache_lock, flags);
475 ret = release_cached_info(RELEASE_ALL); 644 ret = release_cached_info(RELEASE_ALL);
476 spin_unlock_irqrestore(&cache_lock, flags); 645 spin_unlock_irqrestore(&cache_lock, flags);
477out: 646
647 /* remove scheduled work queue item rather then waiting
648 * for every queued entry to execute. Then flush pending
649 * system wide buffer to event buffer.
650 */
651 cancel_delayed_work(&spu_work);
652
653 for (k = 0; k < num_spu_nodes; k++) {
654 spu_buff[k].ctx_sw_seen = 0;
655
656 /*
657 * spu_sys_buff will be null if there was a problem
658 * allocating the buffer. Only delete if it exists.
659 */
660 kfree(spu_buff[k].buff);
661 spu_buff[k].buff = 0;
662 }
478 pr_debug("spu_sync_stop -- done.\n"); 663 pr_debug("spu_sync_stop -- done.\n");
479 return ret; 664 return ret;
480} 665}
481 666
482
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig
index a9260e21451e..65730275e012 100644
--- a/arch/powerpc/platforms/40x/Kconfig
+++ b/arch/powerpc/platforms/40x/Kconfig
@@ -14,6 +14,15 @@
14# help 14# help
15# This option enables support for the CPCI405 board. 15# This option enables support for the CPCI405 board.
16 16
17config ACADIA
18 bool "Acadia"
19 depends on 40x
20 default n
21 select PPC40x_SIMPLE
22 select 405EZ
23 help
24 This option enables support for the AMCC 405EZ Acadia evaluation board.
25
17config EP405 26config EP405
18 bool "EP405/EP405PC" 27 bool "EP405/EP405PC"
19 depends on 40x 28 depends on 40x
@@ -23,6 +32,14 @@ config EP405
23 help 32 help
24 This option enables support for the EP405/EP405PC boards. 33 This option enables support for the EP405/EP405PC boards.
25 34
35config HCU4
36 bool "Hcu4"
37 depends on 40x
38 default y
39 select 405GPR
40 help
41 This option enables support for the Nestal Maschinen HCU4 board.
42
26config KILAUEA 43config KILAUEA
27 bool "Kilauea" 44 bool "Kilauea"
28 depends on 40x 45 depends on 40x
@@ -93,6 +110,13 @@ config XILINX_VIRTEX_GENERIC_BOARD
93 Most Virtex designs should use this unless it needs to do some 110 Most Virtex designs should use this unless it needs to do some
94 special configuration at board probe time. 111 special configuration at board probe time.
95 112
113config PPC40x_SIMPLE
114 bool "Simple PowerPC 40x board support"
115 depends on 40x
116 default n
117 help
118 This option enables the simple PowerPC 40x platform support.
119
96# 40x specific CPU modules, selected based on the board above. 120# 40x specific CPU modules, selected based on the board above.
97config NP405H 121config NP405H
98 bool 122 bool
@@ -118,6 +142,12 @@ config 405EX
118 select IBM_NEW_EMAC_EMAC4 142 select IBM_NEW_EMAC_EMAC4
119 select IBM_NEW_EMAC_RGMII 143 select IBM_NEW_EMAC_RGMII
120 144
145config 405EZ
146 bool
147 select IBM_NEW_EMAC_NO_FLOW_CTRL
148 select IBM_NEW_EMAC_MAL_CLR_ICINTSTAT
149 select IBM_NEW_EMAC_MAL_COMMON_ERR
150
121config 405GPR 151config 405GPR
122 bool 152 bool
123 153
@@ -139,6 +169,14 @@ config STB03xxx
139 select IBM405_ERR77 169 select IBM405_ERR77
140 select IBM405_ERR51 170 select IBM405_ERR51
141 171
172config PPC4xx_GPIO
173 bool "PPC4xx GPIO support"
174 depends on 40x
175 select ARCH_REQUIRE_GPIOLIB
176 select GENERIC_GPIO
177 help
178 Enable gpiolib support for ppc40x based boards
179
142# 40x errata/workaround config symbols, selected by the CPU models above 180# 40x errata/workaround config symbols, selected by the CPU models above
143 181
144# All 405-based cores up until the 405GPR and 405EP have this errata. 182# All 405-based cores up until the 405GPR and 405EP have this errata.
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile
index 5533a5c8ce4e..9bab76a652a6 100644
--- a/arch/powerpc/platforms/40x/Makefile
+++ b/arch/powerpc/platforms/40x/Makefile
@@ -1,5 +1,7 @@
1obj-$(CONFIG_KILAUEA) += kilauea.o 1obj-$(CONFIG_KILAUEA) += kilauea.o
2obj-$(CONFIG_HCU4) += hcu4.o
2obj-$(CONFIG_MAKALU) += makalu.o 3obj-$(CONFIG_MAKALU) += makalu.o
3obj-$(CONFIG_WALNUT) += walnut.o 4obj-$(CONFIG_WALNUT) += walnut.o
4obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o 5obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
5obj-$(CONFIG_EP405) += ep405.o 6obj-$(CONFIG_EP405) += ep405.o
7obj-$(CONFIG_PPC40x_SIMPLE) += ppc40x_simple.o
diff --git a/arch/powerpc/platforms/40x/hcu4.c b/arch/powerpc/platforms/40x/hcu4.c
new file mode 100644
index 000000000000..60b2afecab75
--- /dev/null
+++ b/arch/powerpc/platforms/40x/hcu4.c
@@ -0,0 +1,61 @@
1/*
2 * Architecture- / platform-specific boot-time initialization code for
3 * IBM PowerPC 4xx based boards. Adapted from original
4 * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
5 * <dan@net4x.com>.
6 *
7 * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
8 *
9 * Rewritten and ported to the merged powerpc tree:
10 * Copyright 2007 IBM Corporation
11 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
12 *
13 * 2002 (c) MontaVista, Software, Inc. This file is licensed under
14 * the terms of the GNU General Public License version 2. This program
15 * is licensed "as is" without any warranty of any kind, whether express
16 * or implied.
17 */
18
19#include <linux/init.h>
20#include <linux/of_platform.h>
21
22#include <asm/machdep.h>
23#include <asm/prom.h>
24#include <asm/udbg.h>
25#include <asm/time.h>
26#include <asm/uic.h>
27#include <asm/ppc4xx.h>
28
29static __initdata struct of_device_id hcu4_of_bus[] = {
30 { .compatible = "ibm,plb3", },
31 { .compatible = "ibm,opb", },
32 { .compatible = "ibm,ebc", },
33 {},
34};
35
36static int __init hcu4_device_probe(void)
37{
38 of_platform_bus_probe(NULL, hcu4_of_bus, NULL);
39 return 0;
40}
41machine_device_initcall(hcu4, hcu4_device_probe);
42
43static int __init hcu4_probe(void)
44{
45 unsigned long root = of_get_flat_dt_root();
46
47 if (!of_flat_dt_is_compatible(root, "netstal,hcu4"))
48 return 0;
49
50 return 1;
51}
52
53define_machine(hcu4) {
54 .name = "HCU4",
55 .probe = hcu4_probe,
56 .progress = udbg_progress,
57 .init_IRQ = uic_init_tree,
58 .get_irq = uic_get_irq,
59 .restart = ppc4xx_reset_system,
60 .calibrate_decr = generic_calibrate_decr,
61};
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
new file mode 100644
index 000000000000..4498a86b46c3
--- /dev/null
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -0,0 +1,80 @@
1/*
2 * Generic PowerPC 40x platform support
3 *
4 * Copyright 2008 IBM Corporation
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; version 2 of the License.
9 *
10 * This implements simple platform support for PowerPC 44x chips. This is
11 * mostly used for eval boards or other simple and "generic" 44x boards. If
12 * your board has custom functions or hardware, then you will likely want to
13 * implement your own board.c file to accommodate it.
14 */
15
16#include <asm/machdep.h>
17#include <asm/pci-bridge.h>
18#include <asm/ppc4xx.h>
19#include <asm/prom.h>
20#include <asm/time.h>
21#include <asm/udbg.h>
22#include <asm/uic.h>
23
24#include <linux/init.h>
25#include <linux/of_platform.h>
26
27static __initdata struct of_device_id ppc40x_of_bus[] = {
28 { .compatible = "ibm,plb3", },
29 { .compatible = "ibm,plb4", },
30 { .compatible = "ibm,opb", },
31 { .compatible = "ibm,ebc", },
32 { .compatible = "simple-bus", },
33 {},
34};
35
36static int __init ppc40x_device_probe(void)
37{
38 of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);
39
40 return 0;
41}
42machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
43
44/* This is the list of boards that can be supported by this simple
45 * platform code. This does _not_ mean the boards are compatible,
46 * as they most certainly are not from a device tree perspective.
47 * However, their differences are handled by the device tree and the
48 * drivers and therefore they don't need custom board support files.
49 *
50 * Again, if your board needs to do things differently then create a
51 * board.c file for it rather than adding it to this list.
52 */
53static char *board[] __initdata = {
54 "amcc,acadia"
55};
56
57static int __init ppc40x_probe(void)
58{
59 unsigned long root = of_get_flat_dt_root();
60 int i = 0;
61
62 for (i = 0; i < ARRAY_SIZE(board); i++) {
63 if (of_flat_dt_is_compatible(root, board[i])) {
64 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
65 return 1;
66 }
67 }
68
69 return 0;
70}
71
72define_machine(ppc40x_simple) {
73 .name = "PowerPC 40x Platform",
74 .probe = ppc40x_probe,
75 .progress = udbg_progress,
76 .init_IRQ = uic_init_tree,
77 .get_irq = uic_get_irq,
78 .restart = ppc4xx_reset_system,
79 .calibrate_decr = generic_calibrate_decr,
80};
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 79c1154f88d4..3496bc05058e 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -167,6 +167,14 @@ config PPC44x_SIMPLE
167 help 167 help
168 This option enables the simple PowerPC 44x platform support. 168 This option enables the simple PowerPC 44x platform support.
169 169
170config PPC4xx_GPIO
171 bool "PPC4xx GPIO support"
172 depends on 44x
173 select ARCH_REQUIRE_GPIOLIB
174 select GENERIC_GPIO
175 help
176 Enable gpiolib support for ppc440 based boards
177
170# 44x specific CPU modules, selected based on the board above. 178# 44x specific CPU modules, selected based on the board above.
171config 440EP 179config 440EP
172 bool 180 bool
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 044b4e6e8743..ae7c34f37e1c 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -99,11 +99,14 @@ mpc5200_setup_xlb_arbiter(void)
99 out_be32(&xlb->master_pri_enable, 0xff); 99 out_be32(&xlb->master_pri_enable, 0xff);
100 out_be32(&xlb->master_priority, 0x11111111); 100 out_be32(&xlb->master_priority, 0x11111111);
101 101
102 /* Disable XLB pipelining 102 /*
103 * Disable XLB pipelining
103 * (cfr errate 292. We could do this only just before ATA PIO 104 * (cfr errate 292. We could do this only just before ATA PIO
104 * transaction and re-enable it afterwards ...) 105 * transaction and re-enable it afterwards ...)
106 * Not needed on MPC5200B.
105 */ 107 */
106 out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS); 108 if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) == MPC5200_SVR)
109 out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS);
107 110
108 iounmap(xlb); 111 iounmap(xlb);
109} 112}
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index efb3964457b1..c0d86e1f56ea 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -54,8 +54,8 @@
54#endif 54#endif
55 55
56/* 56/*
57 * The primary thread of each non-boot processor is recorded here before 57 * The Primary thread of each non-boot processor was started from the OF client
58 * smp init. 58 * interface by prom_hold_cpus and is spinning on secondary_hold_spinloop.
59 */ 59 */
60static cpumask_t of_spin_map; 60static cpumask_t of_spin_map;
61 61
@@ -208,11 +208,7 @@ void __init smp_init_cell(void)
208 /* Mark threads which are still spinning in hold loops. */ 208 /* Mark threads which are still spinning in hold loops. */
209 if (cpu_has_feature(CPU_FTR_SMT)) { 209 if (cpu_has_feature(CPU_FTR_SMT)) {
210 for_each_present_cpu(i) { 210 for_each_present_cpu(i) {
211 if (i % 2 == 0) 211 if (cpu_thread_in_core(i) == 0)
212 /*
213 * Even-numbered logical cpus correspond to
214 * primary threads.
215 */
216 cpu_set(i, of_spin_map); 212 cpu_set(i, of_spin_map);
217 } 213 }
218 } else { 214 } else {
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 010a51f59796..b73c369cc6f1 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -548,6 +548,11 @@ spufs_regs_read(struct file *file, char __user *buffer,
548 int ret; 548 int ret;
549 struct spu_context *ctx = file->private_data; 549 struct spu_context *ctx = file->private_data;
550 550
551 /* pre-check for file position: if we'd return EOF, there's no point
552 * causing a deschedule */
553 if (*pos >= sizeof(ctx->csa.lscsa->gprs))
554 return 0;
555
551 ret = spu_acquire_saved(ctx); 556 ret = spu_acquire_saved(ctx);
552 if (ret) 557 if (ret)
553 return ret; 558 return ret;
@@ -2426,38 +2431,49 @@ static inline int spufs_switch_log_avail(struct spu_context *ctx)
2426static int spufs_switch_log_open(struct inode *inode, struct file *file) 2431static int spufs_switch_log_open(struct inode *inode, struct file *file)
2427{ 2432{
2428 struct spu_context *ctx = SPUFS_I(inode)->i_ctx; 2433 struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
2434 int rc;
2435
2436 rc = spu_acquire(ctx);
2437 if (rc)
2438 return rc;
2429 2439
2430 /*
2431 * We (ab-)use the mapping_lock here because it serves the similar
2432 * purpose for synchronizing open/close elsewhere. Maybe it should
2433 * be renamed eventually.
2434 */
2435 mutex_lock(&ctx->mapping_lock);
2436 if (ctx->switch_log) { 2440 if (ctx->switch_log) {
2437 spin_lock(&ctx->switch_log->lock); 2441 rc = -EBUSY;
2438 ctx->switch_log->head = 0; 2442 goto out;
2439 ctx->switch_log->tail = 0;
2440 spin_unlock(&ctx->switch_log->lock);
2441 } else {
2442 /*
2443 * We allocate the switch log data structures on first open.
2444 * They will never be free because we assume a context will
2445 * be traced until it goes away.
2446 */
2447 ctx->switch_log = kzalloc(sizeof(struct switch_log) +
2448 SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
2449 GFP_KERNEL);
2450 if (!ctx->switch_log)
2451 goto out;
2452 spin_lock_init(&ctx->switch_log->lock);
2453 init_waitqueue_head(&ctx->switch_log->wait);
2454 } 2443 }
2455 mutex_unlock(&ctx->mapping_lock); 2444
2445 ctx->switch_log = kmalloc(sizeof(struct switch_log) +
2446 SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
2447 GFP_KERNEL);
2448
2449 if (!ctx->switch_log) {
2450 rc = -ENOMEM;
2451 goto out;
2452 }
2453
2454 ctx->switch_log->head = ctx->switch_log->tail = 0;
2455 init_waitqueue_head(&ctx->switch_log->wait);
2456 rc = 0;
2457
2458out:
2459 spu_release(ctx);
2460 return rc;
2461}
2462
2463static int spufs_switch_log_release(struct inode *inode, struct file *file)
2464{
2465 struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
2466 int rc;
2467
2468 rc = spu_acquire(ctx);
2469 if (rc)
2470 return rc;
2471
2472 kfree(ctx->switch_log);
2473 ctx->switch_log = NULL;
2474 spu_release(ctx);
2456 2475
2457 return 0; 2476 return 0;
2458 out:
2459 mutex_unlock(&ctx->mapping_lock);
2460 return -ENOMEM;
2461} 2477}
2462 2478
2463static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n) 2479static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n)
@@ -2485,42 +2501,54 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
2485 if (!buf || len < 0) 2501 if (!buf || len < 0)
2486 return -EINVAL; 2502 return -EINVAL;
2487 2503
2504 error = spu_acquire(ctx);
2505 if (error)
2506 return error;
2507
2488 while (cnt < len) { 2508 while (cnt < len) {
2489 char tbuf[128]; 2509 char tbuf[128];
2490 int width; 2510 int width;
2491 2511
2492 if (file->f_flags & O_NONBLOCK) { 2512 if (spufs_switch_log_used(ctx) == 0) {
2493 if (spufs_switch_log_used(ctx) <= 0) 2513 if (cnt > 0) {
2494 return cnt ? cnt : -EAGAIN; 2514 /* If there's data ready to go, we can
2495 } else { 2515 * just return straight away */
2496 /* Wait for data in buffer */ 2516 break;
2497 error = wait_event_interruptible(ctx->switch_log->wait, 2517
2498 spufs_switch_log_used(ctx) > 0); 2518 } else if (file->f_flags & O_NONBLOCK) {
2499 if (error) 2519 error = -EAGAIN;
2500 break; 2520 break;
2501 }
2502 2521
2503 spin_lock(&ctx->switch_log->lock); 2522 } else {
2504 if (ctx->switch_log->head == ctx->switch_log->tail) { 2523 /* spufs_wait will drop the mutex and
2505 /* multiple readers race? */ 2524 * re-acquire, but since we're in read(), the
2506 spin_unlock(&ctx->switch_log->lock); 2525 * file cannot be _released (and so
2507 continue; 2526 * ctx->switch_log is stable).
2527 */
2528 error = spufs_wait(ctx->switch_log->wait,
2529 spufs_switch_log_used(ctx) > 0);
2530
2531 /* On error, spufs_wait returns without the
2532 * state mutex held */
2533 if (error)
2534 return error;
2535
2536 /* We may have had entries read from underneath
2537 * us while we dropped the mutex in spufs_wait,
2538 * so re-check */
2539 if (spufs_switch_log_used(ctx) == 0)
2540 continue;
2541 }
2508 } 2542 }
2509 2543
2510 width = switch_log_sprint(ctx, tbuf, sizeof(tbuf)); 2544 width = switch_log_sprint(ctx, tbuf, sizeof(tbuf));
2511 if (width < len) { 2545 if (width < len)
2512 ctx->switch_log->tail = 2546 ctx->switch_log->tail =
2513 (ctx->switch_log->tail + 1) % 2547 (ctx->switch_log->tail + 1) %
2514 SWITCH_LOG_BUFSIZE; 2548 SWITCH_LOG_BUFSIZE;
2515 } 2549 else
2516 2550 /* If the record is greater than space available return
2517 spin_unlock(&ctx->switch_log->lock); 2551 * partial buffer (so far) */
2518
2519 /*
2520 * If the record is greater than space available return
2521 * partial buffer (so far)
2522 */
2523 if (width >= len)
2524 break; 2552 break;
2525 2553
2526 error = copy_to_user(buf + cnt, tbuf, width); 2554 error = copy_to_user(buf + cnt, tbuf, width);
@@ -2529,6 +2557,8 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
2529 cnt += width; 2557 cnt += width;
2530 } 2558 }
2531 2559
2560 spu_release(ctx);
2561
2532 return cnt == 0 ? error : cnt; 2562 return cnt == 0 ? error : cnt;
2533} 2563}
2534 2564
@@ -2537,29 +2567,41 @@ static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait)
2537 struct inode *inode = file->f_path.dentry->d_inode; 2567 struct inode *inode = file->f_path.dentry->d_inode;
2538 struct spu_context *ctx = SPUFS_I(inode)->i_ctx; 2568 struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
2539 unsigned int mask = 0; 2569 unsigned int mask = 0;
2570 int rc;
2540 2571
2541 poll_wait(file, &ctx->switch_log->wait, wait); 2572 poll_wait(file, &ctx->switch_log->wait, wait);
2542 2573
2574 rc = spu_acquire(ctx);
2575 if (rc)
2576 return rc;
2577
2543 if (spufs_switch_log_used(ctx) > 0) 2578 if (spufs_switch_log_used(ctx) > 0)
2544 mask |= POLLIN; 2579 mask |= POLLIN;
2545 2580
2581 spu_release(ctx);
2582
2546 return mask; 2583 return mask;
2547} 2584}
2548 2585
2549static const struct file_operations spufs_switch_log_fops = { 2586static const struct file_operations spufs_switch_log_fops = {
2550 .owner = THIS_MODULE, 2587 .owner = THIS_MODULE,
2551 .open = spufs_switch_log_open, 2588 .open = spufs_switch_log_open,
2552 .read = spufs_switch_log_read, 2589 .read = spufs_switch_log_read,
2553 .poll = spufs_switch_log_poll, 2590 .poll = spufs_switch_log_poll,
2591 .release = spufs_switch_log_release,
2554}; 2592};
2555 2593
2594/**
2595 * Log a context switch event to a switch log reader.
2596 *
2597 * Must be called with ctx->state_mutex held.
2598 */
2556void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, 2599void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx,
2557 u32 type, u32 val) 2600 u32 type, u32 val)
2558{ 2601{
2559 if (!ctx->switch_log) 2602 if (!ctx->switch_log)
2560 return; 2603 return;
2561 2604
2562 spin_lock(&ctx->switch_log->lock);
2563 if (spufs_switch_log_avail(ctx) > 1) { 2605 if (spufs_switch_log_avail(ctx) > 1) {
2564 struct switch_log_entry *p; 2606 struct switch_log_entry *p;
2565 2607
@@ -2573,7 +2615,6 @@ void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx,
2573 ctx->switch_log->head = 2615 ctx->switch_log->head =
2574 (ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE; 2616 (ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE;
2575 } 2617 }
2576 spin_unlock(&ctx->switch_log->lock);
2577 2618
2578 wake_up(&ctx->switch_log->wait); 2619 wake_up(&ctx->switch_log->wait);
2579} 2620}
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index c9bb7cfd3dca..c58bd36b0c5b 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -249,6 +249,7 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc,
249 249
250 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); 250 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
251 clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags); 251 clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags);
252 spu_switch_log_notify(NULL, ctx, SWITCH_LOG_EXIT, *status);
252 spu_release(ctx); 253 spu_release(ctx);
253 254
254 if (signal_pending(current)) 255 if (signal_pending(current))
@@ -417,8 +418,6 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
417 ret = spu_run_fini(ctx, npc, &status); 418 ret = spu_run_fini(ctx, npc, &status);
418 spu_yield(ctx); 419 spu_yield(ctx);
419 420
420 spu_switch_log_notify(NULL, ctx, SWITCH_LOG_EXIT, status);
421
422 if ((status & SPU_STATUS_STOPPED_BY_STOP) && 421 if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
423 (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100)) 422 (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100))
424 ctx->stats.libassist++; 423 ctx->stats.libassist++;
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 67595bc380dc..2ad914c47493 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -312,6 +312,15 @@ static struct spu *aff_ref_location(struct spu_context *ctx, int mem_aff,
312 */ 312 */
313 node = cpu_to_node(raw_smp_processor_id()); 313 node = cpu_to_node(raw_smp_processor_id());
314 for (n = 0; n < MAX_NUMNODES; n++, node++) { 314 for (n = 0; n < MAX_NUMNODES; n++, node++) {
315 /*
316 * "available_spus" counts how many spus are not potentially
317 * going to be used by other affinity gangs whose reference
318 * context is already in place. Although this code seeks to
319 * avoid having affinity gangs with a summed amount of
320 * contexts bigger than the amount of spus in the node,
321 * this may happen sporadically. In this case, available_spus
322 * becomes negative, which is harmless.
323 */
315 int available_spus; 324 int available_spus;
316 325
317 node = (node < MAX_NUMNODES) ? node : 0; 326 node = (node < MAX_NUMNODES) ? node : 0;
@@ -321,12 +330,10 @@ static struct spu *aff_ref_location(struct spu_context *ctx, int mem_aff,
321 available_spus = 0; 330 available_spus = 0;
322 mutex_lock(&cbe_spu_info[node].list_mutex); 331 mutex_lock(&cbe_spu_info[node].list_mutex);
323 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { 332 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
324 if (spu->ctx && spu->ctx->gang 333 if (spu->ctx && spu->ctx->gang && !spu->ctx->aff_offset
325 && spu->ctx->aff_offset == 0) 334 && spu->ctx->gang->aff_ref_spu)
326 available_spus -= 335 available_spus -= spu->ctx->gang->contexts;
327 (spu->ctx->gang->contexts - 1); 336 available_spus++;
328 else
329 available_spus++;
330 } 337 }
331 if (available_spus < ctx->gang->contexts) { 338 if (available_spus < ctx->gang->contexts) {
332 mutex_unlock(&cbe_spu_info[node].list_mutex); 339 mutex_unlock(&cbe_spu_info[node].list_mutex);
@@ -437,6 +444,11 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
437 atomic_dec(&cbe_spu_info[spu->node].reserved_spus); 444 atomic_dec(&cbe_spu_info[spu->node].reserved_spus);
438 445
439 if (ctx->gang) 446 if (ctx->gang)
447 /*
448 * If ctx->gang->aff_sched_count is positive, SPU affinity is
449 * being considered in this gang. Using atomic_dec_if_positive
450 * allow us to skip an explicit check for affinity in this gang
451 */
440 atomic_dec_if_positive(&ctx->gang->aff_sched_count); 452 atomic_dec_if_positive(&ctx->gang->aff_sched_count);
441 453
442 spu_switch_notify(spu, NULL); 454 spu_switch_notify(spu, NULL);
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 8ae8ef9dfc22..15c62d3ca129 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -65,7 +65,6 @@ enum {
65}; 65};
66 66
67struct switch_log { 67struct switch_log {
68 spinlock_t lock;
69 wait_queue_head_t wait; 68 wait_queue_head_t wait;
70 unsigned long head; 69 unsigned long head;
71 unsigned long tail; 70 unsigned long tail;
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
index 92d20e993ede..a2460e2e1928 100644
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
@@ -40,6 +40,7 @@ static DECLARE_WAIT_QUEUE_HEAD(sputrace_wait);
40static ktime_t sputrace_start; 40static ktime_t sputrace_start;
41static unsigned long sputrace_head, sputrace_tail; 41static unsigned long sputrace_head, sputrace_tail;
42static struct sputrace *sputrace_log; 42static struct sputrace *sputrace_log;
43static int sputrace_logging;
43 44
44static int sputrace_used(void) 45static int sputrace_used(void)
45{ 46{
@@ -79,6 +80,11 @@ static ssize_t sputrace_read(struct file *file, char __user *buf,
79 char tbuf[128]; 80 char tbuf[128];
80 int width; 81 int width;
81 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
82 error = wait_event_interruptible(sputrace_wait, 88 error = wait_event_interruptible(sputrace_wait,
83 sputrace_used() > 0); 89 sputrace_used() > 0);
84 if (error) 90 if (error)
@@ -109,24 +115,49 @@ static ssize_t sputrace_read(struct file *file, char __user *buf,
109 115
110static int sputrace_open(struct inode *inode, struct file *file) 116static int sputrace_open(struct inode *inode, struct file *file)
111{ 117{
118 int rc;
119
112 spin_lock(&sputrace_lock); 120 spin_lock(&sputrace_lock);
121 if (sputrace_logging) {
122 rc = -EBUSY;
123 goto out;
124 }
125
126 sputrace_logging = 1;
113 sputrace_head = sputrace_tail = 0; 127 sputrace_head = sputrace_tail = 0;
114 sputrace_start = ktime_get(); 128 sputrace_start = ktime_get();
129 rc = 0;
130
131out:
115 spin_unlock(&sputrace_lock); 132 spin_unlock(&sputrace_lock);
133 return rc;
134}
116 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);
117 return 0; 141 return 0;
118} 142}
119 143
120static const struct file_operations sputrace_fops = { 144static const struct file_operations sputrace_fops = {
121 .owner = THIS_MODULE, 145 .owner = THIS_MODULE,
122 .open = sputrace_open, 146 .open = sputrace_open,
123 .read = sputrace_read, 147 .read = sputrace_read,
148 .release = sputrace_release,
124}; 149};
125 150
126static void sputrace_log_item(const char *name, struct spu_context *ctx, 151static void sputrace_log_item(const char *name, struct spu_context *ctx,
127 struct spu *spu) 152 struct spu *spu)
128{ 153{
129 spin_lock(&sputrace_lock); 154 spin_lock(&sputrace_lock);
155
156 if (!sputrace_logging) {
157 spin_unlock(&sputrace_lock);
158 return;
159 }
160
130 if (sputrace_avail() > 1) { 161 if (sputrace_avail() > 1) {
131 struct sputrace *t = sputrace_log + sputrace_head; 162 struct sputrace *t = sputrace_log + sputrace_head;
132 163
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 140d02a5232a..a623ad256e9e 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -22,6 +22,12 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
22 int ret; 22 int ret;
23 23
24 start_pfn = base >> PAGE_SHIFT; 24 start_pfn = base >> PAGE_SHIFT;
25
26 if (!pfn_valid(start_pfn)) {
27 lmb_remove(base, lmb_size);
28 return 0;
29 }
30
25 zone = page_zone(pfn_to_page(start_pfn)); 31 zone = page_zone(pfn_to_page(start_pfn));
26 32
27 /* 33 /*
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index e00f96baa381..1a231c389ba0 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -52,8 +52,8 @@
52 52
53 53
54/* 54/*
55 * The primary thread of each non-boot processor is recorded here before 55 * The Primary thread of each non-boot processor was started from the OF client
56 * smp init. 56 * interface by prom_hold_cpus and is spinning on secondary_hold_spinloop.
57 */ 57 */
58static cpumask_t of_spin_map; 58static cpumask_t of_spin_map;
59 59
@@ -161,8 +161,7 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
161static int smp_pSeries_cpu_bootable(unsigned int nr) 161static int smp_pSeries_cpu_bootable(unsigned int nr)
162{ 162{
163 /* Special case - we inhibit secondary thread startup 163 /* Special case - we inhibit secondary thread startup
164 * during boot if the user requests it. Odd-numbered 164 * during boot if the user requests it.
165 * cpus are assumed to be secondary threads.
166 */ 165 */
167 if (system_state < SYSTEM_RUNNING && 166 if (system_state < SYSTEM_RUNNING &&
168 cpu_has_feature(CPU_FTR_SMT) && 167 cpu_has_feature(CPU_FTR_SMT) &&
@@ -199,11 +198,7 @@ static void __init smp_init_pseries(void)
199 /* Mark threads which are still spinning in hold loops. */ 198 /* Mark threads which are still spinning in hold loops. */
200 if (cpu_has_feature(CPU_FTR_SMT)) { 199 if (cpu_has_feature(CPU_FTR_SMT)) {
201 for_each_present_cpu(i) { 200 for_each_present_cpu(i) {
202 if (i % 2 == 0) 201 if (cpu_thread_in_core(i) == 0)
203 /*
204 * Even-numbered logical cpus correspond to
205 * primary threads.
206 */
207 cpu_set(i, of_spin_map); 202 cpu_set(i, of_spin_map);
208 } 203 }
209 } else { 204 } else {
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index a44709a94f97..5afce115ab1f 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_OF_RTC) += of_rtc.o
37ifeq ($(CONFIG_PCI),y) 37ifeq ($(CONFIG_PCI),y)
38obj-$(CONFIG_4xx) += ppc4xx_pci.o 38obj-$(CONFIG_4xx) += ppc4xx_pci.o
39endif 39endif
40obj-$(CONFIG_PPC4xx_GPIO) += ppc4xx_gpio.o
40 41
41obj-$(CONFIG_CPM) += cpm_common.o 42obj-$(CONFIG_CPM) += cpm_common.o
42obj-$(CONFIG_CPM2) += cpm2.o cpm2_pic.o 43obj-$(CONFIG_CPM2) += cpm2.o cpm2_pic.o
diff --git a/arch/powerpc/sysdev/ppc4xx_gpio.c b/arch/powerpc/sysdev/ppc4xx_gpio.c
new file mode 100644
index 000000000000..110efe2a54fc
--- /dev/null
+++ b/arch/powerpc/sysdev/ppc4xx_gpio.c
@@ -0,0 +1,217 @@
1/*
2 * PPC4xx gpio driver
3 *
4 * Copyright (c) 2008 Harris Corporation
5 * Copyright (c) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
6 * Copyright (c) MontaVista Software, Inc. 2008.
7 *
8 * Author: Steve Falco <sfalco@harris.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 * as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/spinlock.h>
27#include <linux/io.h>
28#include <linux/of.h>
29#include <linux/of_gpio.h>
30#include <linux/gpio.h>
31#include <linux/types.h>
32
33#define GPIO_MASK(gpio) (0x80000000 >> (gpio))
34#define GPIO_MASK2(gpio) (0xc0000000 >> ((gpio) * 2))
35
36/* Physical GPIO register layout */
37struct ppc4xx_gpio {
38 __be32 or;
39 __be32 tcr;
40 __be32 osrl;
41 __be32 osrh;
42 __be32 tsrl;
43 __be32 tsrh;
44 __be32 odr;
45 __be32 ir;
46 __be32 rr1;
47 __be32 rr2;
48 __be32 rr3;
49 __be32 reserved1;
50 __be32 isr1l;
51 __be32 isr1h;
52 __be32 isr2l;
53 __be32 isr2h;
54 __be32 isr3l;
55 __be32 isr3h;
56};
57
58struct ppc4xx_gpio_chip {
59 struct of_mm_gpio_chip mm_gc;
60 spinlock_t lock;
61};
62
63/*
64 * GPIO LIB API implementation for GPIOs
65 *
66 * There are a maximum of 32 gpios in each gpio controller.
67 */
68
69static inline struct ppc4xx_gpio_chip *
70to_ppc4xx_gpiochip(struct of_mm_gpio_chip *mm_gc)
71{
72 return container_of(mm_gc, struct ppc4xx_gpio_chip, mm_gc);
73}
74
75static int ppc4xx_gpio_get(struct gpio_chip *gc, unsigned int gpio)
76{
77 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
78 struct ppc4xx_gpio __iomem *regs = mm_gc->regs;
79
80 return in_be32(&regs->ir) & GPIO_MASK(gpio);
81}
82
83static inline void
84__ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
85{
86 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
87 struct ppc4xx_gpio __iomem *regs = mm_gc->regs;
88
89 if (val)
90 setbits32(&regs->or, GPIO_MASK(gpio));
91 else
92 clrbits32(&regs->or, GPIO_MASK(gpio));
93}
94
95static void
96ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
97{
98 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
99 struct ppc4xx_gpio_chip *chip = to_ppc4xx_gpiochip(mm_gc);
100 unsigned long flags;
101
102 spin_lock_irqsave(&chip->lock, flags);
103
104 __ppc4xx_gpio_set(gc, gpio, val);
105
106 spin_unlock_irqrestore(&chip->lock, flags);
107
108 pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
109}
110
111static int ppc4xx_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
112{
113 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
114 struct ppc4xx_gpio_chip *chip = to_ppc4xx_gpiochip(mm_gc);
115 struct ppc4xx_gpio __iomem *regs = mm_gc->regs;
116 unsigned long flags;
117
118 spin_lock_irqsave(&chip->lock, flags);
119
120 /* Disable open-drain function */
121 clrbits32(&regs->odr, GPIO_MASK(gpio));
122
123 /* Float the pin */
124 clrbits32(&regs->tcr, GPIO_MASK(gpio));
125
126 /* Bits 0-15 use TSRL/OSRL, bits 16-31 use TSRH/OSRH */
127 if (gpio < 16) {
128 clrbits32(&regs->osrl, GPIO_MASK2(gpio));
129 clrbits32(&regs->tsrl, GPIO_MASK2(gpio));
130 } else {
131 clrbits32(&regs->osrh, GPIO_MASK2(gpio));
132 clrbits32(&regs->tsrh, GPIO_MASK2(gpio));
133 }
134
135 spin_unlock_irqrestore(&chip->lock, flags);
136
137 return 0;
138}
139
140static int
141ppc4xx_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
142{
143 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
144 struct ppc4xx_gpio_chip *chip = to_ppc4xx_gpiochip(mm_gc);
145 struct ppc4xx_gpio __iomem *regs = mm_gc->regs;
146 unsigned long flags;
147
148 spin_lock_irqsave(&chip->lock, flags);
149
150 /* First set initial value */
151 __ppc4xx_gpio_set(gc, gpio, val);
152
153 /* Disable open-drain function */
154 clrbits32(&regs->odr, GPIO_MASK(gpio));
155
156 /* Drive the pin */
157 setbits32(&regs->tcr, GPIO_MASK(gpio));
158
159 /* Bits 0-15 use TSRL, bits 16-31 use TSRH */
160 if (gpio < 16) {
161 clrbits32(&regs->osrl, GPIO_MASK2(gpio));
162 clrbits32(&regs->tsrl, GPIO_MASK2(gpio));
163 } else {
164 clrbits32(&regs->osrh, GPIO_MASK2(gpio));
165 clrbits32(&regs->tsrh, GPIO_MASK2(gpio));
166 }
167
168 spin_unlock_irqrestore(&chip->lock, flags);
169
170 pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
171
172 return 0;
173}
174
175static int __init ppc4xx_add_gpiochips(void)
176{
177 struct device_node *np;
178
179 for_each_compatible_node(np, NULL, "ibm,ppc4xx-gpio") {
180 int ret;
181 struct ppc4xx_gpio_chip *ppc4xx_gc;
182 struct of_mm_gpio_chip *mm_gc;
183 struct of_gpio_chip *of_gc;
184 struct gpio_chip *gc;
185
186 ppc4xx_gc = kzalloc(sizeof(*ppc4xx_gc), GFP_KERNEL);
187 if (!ppc4xx_gc) {
188 ret = -ENOMEM;
189 goto err;
190 }
191
192 spin_lock_init(&ppc4xx_gc->lock);
193
194 mm_gc = &ppc4xx_gc->mm_gc;
195 of_gc = &mm_gc->of_gc;
196 gc = &of_gc->gc;
197
198 of_gc->gpio_cells = 2;
199 gc->ngpio = 32;
200 gc->direction_input = ppc4xx_gpio_dir_in;
201 gc->direction_output = ppc4xx_gpio_dir_out;
202 gc->get = ppc4xx_gpio_get;
203 gc->set = ppc4xx_gpio_set;
204
205 ret = of_mm_gpiochip_add(np, mm_gc);
206 if (ret)
207 goto err;
208 continue;
209err:
210 pr_err("%s: registration failed with status %d\n",
211 np->full_name, ret);
212 kfree(ppc4xx_gc);
213 /* try others anyway */
214 }
215 return 0;
216}
217arch_initcall(ppc4xx_add_gpiochips);