aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 11:28:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 11:28:25 -0400
commit9bf9b2f3ad6362cdc9ef79291d440a92960b8f51 (patch)
treec50a317a619096a6ec84c243fafef50388004df6
parent9779a8325a9bbf4ccd3853e0e4064984cf9da9c9 (diff)
parent54622f10a6aabb8bb2bdacf3dd070046f03dc246 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (53 commits) powerpc: Support for relocatable kdump kernel powerpc: Don't use a 16G page if beyond mem= limits powerpc: Add del_node() for early boot code to prune inapplicable devices. powerpc: Further compile fixup for STRICT_MM_TYPECHECKS powerpc: Remove empty #else from signal_64.c powerpc: Move memory size print into common show_cpuinfo for 32-bit hvc_console: Remove __devexit annotation of hvc_remove() hvc_console: Add support for tty window resizing hvc_console: Fix loop if put_char() returns 0 hvc_console: Add tty driver flag TTY_DRIVER_RESET_TERMIOS hvc_console: Add a hangup notifier for backends powerpc/83xx: Add DS1339 RTC support for MPC8349E-mITX boards .dts powerpc/83xx: Add support for MCU microcontroller in .dts files powerpc/85xx: Move mpc8572ds.dts to address-cells/size-cells = <2> of/spi: Support specifying chip select as active high via device tree powerpc: Remove device_type = "board_control" properties in .dts files i2c-cpm: Suppress autoprobing for devices powerpc/85xx: Fix mpc8536ds dma interrupt numbers powerpc/85xx: Enable enhanced functions for 8536 TSEC powerpc: Delete unused prom_strtoul and prom_memparse ...
-rw-r--r--Documentation/kdump/kdump.txt14
-rw-r--r--Documentation/powerpc/booting-without-of.txt2
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/board.txt4
-rw-r--r--arch/powerpc/Kconfig13
-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/dts/mpc8315erdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts16
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc8536ds.dts12
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds.dts27
-rw-r--r--arch/powerpc/boot/libfdt-wrapper.c22
-rw-r--r--arch/powerpc/boot/main.c14
-rw-r--r--arch/powerpc/boot/ops.h6
-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/kdump.h17
-rw-r--r--arch/powerpc/include/asm/page.h1
-rw-r--r--arch/powerpc/kernel/cputable.c13
-rw-r--r--arch/powerpc/kernel/crash_dump.c2
-rw-r--r--arch/powerpc/kernel/head_64.S39
-rw-r--r--arch/powerpc/kernel/iommu.c69
-rw-r--r--arch/powerpc/kernel/machine_kexec.c2
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c26
-rw-r--r--arch/powerpc/kernel/misc_64.S9
-rw-r--r--arch/powerpc/kernel/pci-common.c3
-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/setup-common.c7
-rw-r--r--arch/powerpc/kernel/signal_64.c2
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
-rw-r--r--arch/powerpc/mm/hash_utils_64.c6
-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/85xx/ksi8560.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c4
-rw-r--r--arch/powerpc/platforms/85xx/sbc8548.c4
-rw-r--r--arch/powerpc/platforms/85xx/sbc8560.c4
-rw-r--r--arch/powerpc/platforms/85xx/stx_gp3.c4
-rw-r--r--arch/powerpc/platforms/85xx/tqm85xx.c4
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc610.c2
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c2
-rw-r--r--arch/powerpc/platforms/86xx/sbc8641d.c2
-rw-r--r--arch/powerpc/platforms/cell/ras.c6
-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/embedded6xx/c2k.c3
-rw-r--r--arch/powerpc/platforms/embedded6xx/prpmc2800.c3
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-memory.c6
-rw-r--r--arch/powerpc/platforms/pseries/iommu.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
-rw-r--r--drivers/char/hvc_console.c86
-rw-r--r--drivers/char/hvc_console.h12
-rw-r--r--drivers/char/hvc_irq.c5
-rw-r--r--drivers/char/hvc_iseries.c1
-rw-r--r--drivers/char/hvc_vio.c1
-rw-r--r--drivers/char/hvc_xen.c1
-rw-r--r--drivers/char/virtio_console.c1
-rw-r--r--drivers/i2c/busses/i2c-cpm.c1
-rw-r--r--drivers/net/fec_mpc52xx_phy.c55
-rw-r--r--drivers/net/ibm_newemac/core.c10
-rw-r--r--drivers/net/ibm_newemac/mal.c15
-rw-r--r--drivers/of/of_i2c.c2
-rw-r--r--drivers/of/of_spi.c2
-rw-r--r--drivers/oprofile/buffer_sync.c24
-rw-r--r--drivers/oprofile/cpu_buffer.c15
-rw-r--r--drivers/oprofile/event_buffer.h7
-rw-r--r--include/linux/oprofile.h16
96 files changed, 3745 insertions, 414 deletions
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 0705040531a5..3f4bc840da8b 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -109,7 +109,8 @@ There are two possible methods of using Kdump.
1092) Or use the system kernel binary itself as dump-capture kernel and there is 1092) Or use the system kernel binary itself as dump-capture kernel and there is
110 no need to build a separate dump-capture kernel. This is possible 110 no need to build a separate dump-capture kernel. This is possible
111 only with the architecutres which support a relocatable kernel. As 111 only with the architecutres which support a relocatable kernel. As
112 of today, i386, x86_64 and ia64 architectures support relocatable kernel. 112 of today, i386, x86_64, ppc64 and ia64 architectures support relocatable
113 kernel.
113 114
114Building a relocatable kernel is advantageous from the point of view that 115Building a relocatable kernel is advantageous from the point of view that
115one does not have to build a second kernel for capturing the dump. But 116one does not have to build a second kernel for capturing the dump. But
@@ -207,8 +208,15 @@ Dump-capture kernel config options (Arch Dependent, i386 and x86_64)
207Dump-capture kernel config options (Arch Dependent, ppc64) 208Dump-capture kernel config options (Arch Dependent, ppc64)
208---------------------------------------------------------- 209----------------------------------------------------------
209 210
210* Make and install the kernel and its modules. DO NOT add this kernel 2111) Enable "Build a kdump crash kernel" support under "Kernel" options:
211 to the boot loader configuration files. 212
213 CONFIG_CRASH_DUMP=y
214
2152) Enable "Build a relocatable kernel" support
216
217 CONFIG_RELOCATABLE=y
218
219 Make and install the kernel and its modules.
212 220
213Dump-capture kernel config options (Arch Dependent, ia64) 221Dump-capture kernel config options (Arch Dependent, ia64)
214---------------------------------------------------------- 222----------------------------------------------------------
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index de4063cb4fdc..02ea9a971b8e 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1917,6 +1917,8 @@ platforms are moved over to use the flattened-device-tree model.
1917 inverse clock polarity (CPOL) mode 1917 inverse clock polarity (CPOL) mode
1918 - spi-cpha - (optional) Empty property indicating device requires 1918 - spi-cpha - (optional) Empty property indicating device requires
1919 shifted clock phase (CPHA) mode 1919 shifted clock phase (CPHA) mode
1920 - spi-cs-high - (optional) Empty property indicating device requires
1921 chip select active high
1920 1922
1921 SPI example for an MPC5200 SPI bus: 1923 SPI example for an MPC5200 SPI bus:
1922 spi@f00 { 1924 spi@f00 {
diff --git a/Documentation/powerpc/dts-bindings/fsl/board.txt b/Documentation/powerpc/dts-bindings/fsl/board.txt
index 74ae6f1cd2d6..81a917ef96e9 100644
--- a/Documentation/powerpc/dts-bindings/fsl/board.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/board.txt
@@ -2,13 +2,13 @@
2 2
3Required properties: 3Required properties:
4 4
5 - device_type : Should be "board-control" 5 - compatible : Should be "fsl,<board>-bcsr"
6 - reg : Offset and length of the register set for the device 6 - reg : Offset and length of the register set for the device
7 7
8Example: 8Example:
9 9
10 bcsr@f8000000 { 10 bcsr@f8000000 {
11 device_type = "board-control"; 11 compatible = "fsl,mpc8360mds-bcsr";
12 reg = <f8000000 8000>; 12 reg = <f8000000 8000>;
13 }; 13 };
14 14
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9391199d9e77..5b1527883fcb 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 ARCH_PHYS_ADDR_T_64BIT 22config ARCH_PHYS_ADDR_T_64BIT
26 def_bool PPC64 || PHYS_64BIT 23 def_bool PPC64 || PHYS_64BIT
27 24
@@ -326,13 +323,11 @@ config KEXEC
326 323
327config CRASH_DUMP 324config CRASH_DUMP
328 bool "Build a kdump crash kernel" 325 bool "Build a kdump crash kernel"
329 depends on PPC_MULTIPLATFORM && PPC64 326 depends on PPC_MULTIPLATFORM && PPC64 && RELOCATABLE
330 help 327 help
331 Build a kernel suitable for use as a kdump capture kernel. 328 Build a kernel suitable for use as a kdump capture kernel.
332 The kernel will be linked at a different address than normal, and 329 The same kernel binary can be used as production kernel and dump
333 so can only be used for Kdump. 330 capture kernel.
334
335 Don't change this unless you know what you are doing.
336 331
337config PHYP_DUMP 332config PHYP_DUMP
338 bool "Hypervisor-assisted dump (EXPERIMENTAL)" 333 bool "Hypervisor-assisted dump (EXPERIMENTAL)"
@@ -832,11 +827,9 @@ config PAGE_OFFSET
832 default "0xc000000000000000" 827 default "0xc000000000000000"
833config KERNEL_START 828config KERNEL_START
834 hex 829 hex
835 default "0xc000000002000000" if CRASH_DUMP
836 default "0xc000000000000000" 830 default "0xc000000000000000"
837config PHYSICAL_START 831config PHYSICAL_START
838 hex 832 hex
839 default "0x02000000" if CRASH_DUMP
840 default "0x00000000" 833 default "0x00000000"
841endif 834endif
842 835
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/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
index 7449e54c1a90..6b850670de1d 100644
--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -121,6 +121,14 @@
121 compatible = "dallas,ds1339"; 121 compatible = "dallas,ds1339";
122 reg = <0x68>; 122 reg = <0x68>;
123 }; 123 };
124
125 mcu_pio: mcu@a {
126 #gpio-cells = <2>;
127 compatible = "fsl,mc9s08qg8-mpc8315erdb",
128 "fsl,mcu-mpc8349emitx";
129 reg = <0x0a>;
130 gpio-controller;
131 };
124 }; 132 };
125 133
126 spi@7000 { 134 spi@7000 {
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index e4cc1768f241..57c595bf1071 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -60,7 +60,7 @@
60 }; 60 };
61 61
62 bcsr@f8000000 { 62 bcsr@f8000000 {
63 device_type = "board-control"; 63 compatible = "fsl,mpc8323mds-bcsr";
64 reg = <0xf8000000 0x8000>; 64 reg = <0xf8000000 0x8000>;
65 }; 65 };
66 66
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5cedf373a1d8..2c9d54a35bc3 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -83,6 +83,14 @@
83 interrupts = <15 0x8>; 83 interrupts = <15 0x8>;
84 interrupt-parent = <&ipic>; 84 interrupt-parent = <&ipic>;
85 dfsrr; 85 dfsrr;
86
87 rtc@68 {
88 device_type = "rtc";
89 compatible = "dallas,ds1339";
90 reg = <0x68>;
91 interrupts = <18 0x8>;
92 interrupt-parent = <&ipic>;
93 };
86 }; 94 };
87 95
88 spi@7000 { 96 spi@7000 {
@@ -131,6 +139,14 @@
131 interrupt-parent = <&ipic>; 139 interrupt-parent = <&ipic>;
132 interrupts = <71 8>; 140 interrupts = <71 8>;
133 }; 141 };
142
143 mcu_pio: mcu@a {
144 #gpio-cells = <2>;
145 compatible = "fsl,mc9s08qg8-mpc8349emitx",
146 "fsl,mcu-mpc8349emitx";
147 reg = <0x0a>;
148 gpio-controller;
149 };
134 }; 150 };
135 151
136 usb@22000 { 152 usb@22000 {
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index 81ae1d3e9440..fa40647ee62e 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -81,6 +81,14 @@
81 interrupts = <15 0x8>; 81 interrupts = <15 0x8>;
82 interrupt-parent = <&ipic>; 82 interrupt-parent = <&ipic>;
83 dfsrr; 83 dfsrr;
84
85 rtc@68 {
86 device_type = "rtc";
87 compatible = "dallas,ds1339";
88 reg = <0x68>;
89 interrupts = <18 0x8>;
90 interrupt-parent = <&ipic>;
91 };
84 }; 92 };
85 93
86 spi@7000 { 94 spi@7000 {
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 04bfde3ea605..c986c541e9bb 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -49,7 +49,7 @@
49 }; 49 };
50 50
51 bcsr@e2400000 { 51 bcsr@e2400000 {
52 device_type = "board-control"; 52 compatible = "fsl,mpc8349mds-bcsr";
53 reg = <0xe2400000 0x8000>; 53 reg = <0xe2400000 0x8000>;
54 }; 54 };
55 55
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 66a12d2631fb..14534d04e4db 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -69,7 +69,7 @@
69 }; 69 };
70 70
71 bcsr@1,0 { 71 bcsr@1,0 {
72 device_type = "board-control"; 72 compatible = "fsl,mpc8360mds-bcsr";
73 reg = <1 0 0x8000>; 73 reg = <1 0 0x8000>;
74 }; 74 };
75 }; 75 };
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 53191ba67aaa..435ef3dd022d 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -121,6 +121,14 @@
121 compatible = "dallas,ds1339"; 121 compatible = "dallas,ds1339";
122 reg = <0x68>; 122 reg = <0x68>;
123 }; 123 };
124
125 mcu_pio: mcu@a {
126 #gpio-cells = <2>;
127 compatible = "fsl,mc9s08qg8-mpc8377erdb",
128 "fsl,mcu-mpc8349emitx";
129 reg = <0x0a>;
130 gpio-controller;
131 };
124 }; 132 };
125 133
126 i2c@3100 { 134 i2c@3100 {
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 4a09153d160c..b11e68f56a06 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -121,6 +121,14 @@
121 compatible = "dallas,ds1339"; 121 compatible = "dallas,ds1339";
122 reg = <0x68>; 122 reg = <0x68>;
123 }; 123 };
124
125 mcu_pio: mcu@a {
126 #gpio-cells = <2>;
127 compatible = "fsl,mc9s08qg8-mpc8378erdb",
128 "fsl,mcu-mpc8349emitx";
129 reg = <0x0a>;
130 gpio-controller;
131 };
124 }; 132 };
125 133
126 i2c@3100 { 134 i2c@3100 {
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index bbd884ac9dc0..337af6ea26d3 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -121,6 +121,14 @@
121 compatible = "dallas,ds1339"; 121 compatible = "dallas,ds1339";
122 reg = <0x68>; 122 reg = <0x68>;
123 }; 123 };
124
125 mcu_pio: mcu@a {
126 #gpio-cells = <2>;
127 compatible = "fsl,mc9s08qg8-mpc8379erdb",
128 "fsl,mcu-mpc8349emitx";
129 reg = <0x0a>;
130 gpio-controller;
131 };
124 }; 132 };
125 133
126 i2c@3100 { 134 i2c@3100 {
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts
index 93fdd99901b6..35db1e5440c7 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dts
+++ b/arch/powerpc/boot/dts/mpc8536ds.dts
@@ -109,7 +109,7 @@
109 reg = <0x0 0x80>; 109 reg = <0x0 0x80>;
110 cell-index = <0>; 110 cell-index = <0>;
111 interrupt-parent = <&mpic>; 111 interrupt-parent = <&mpic>;
112 interrupts = <14 0x2>; 112 interrupts = <20 2>;
113 }; 113 };
114 dma-channel@80 { 114 dma-channel@80 {
115 compatible = "fsl,mpc8536-dma-channel", 115 compatible = "fsl,mpc8536-dma-channel",
@@ -117,7 +117,7 @@
117 reg = <0x80 0x80>; 117 reg = <0x80 0x80>;
118 cell-index = <1>; 118 cell-index = <1>;
119 interrupt-parent = <&mpic>; 119 interrupt-parent = <&mpic>;
120 interrupts = <15 0x2>; 120 interrupts = <21 2>;
121 }; 121 };
122 dma-channel@100 { 122 dma-channel@100 {
123 compatible = "fsl,mpc8536-dma-channel", 123 compatible = "fsl,mpc8536-dma-channel",
@@ -125,7 +125,7 @@
125 reg = <0x100 0x80>; 125 reg = <0x100 0x80>;
126 cell-index = <2>; 126 cell-index = <2>;
127 interrupt-parent = <&mpic>; 127 interrupt-parent = <&mpic>;
128 interrupts = <16 0x2>; 128 interrupts = <22 2>;
129 }; 129 };
130 dma-channel@180 { 130 dma-channel@180 {
131 compatible = "fsl,mpc8536-dma-channel", 131 compatible = "fsl,mpc8536-dma-channel",
@@ -133,7 +133,7 @@
133 reg = <0x180 0x80>; 133 reg = <0x180 0x80>;
134 cell-index = <3>; 134 cell-index = <3>;
135 interrupt-parent = <&mpic>; 135 interrupt-parent = <&mpic>;
136 interrupts = <17 0x2>; 136 interrupts = <23 2>;
137 }; 137 };
138 }; 138 };
139 139
@@ -180,7 +180,7 @@
180 enet0: ethernet@24000 { 180 enet0: ethernet@24000 {
181 cell-index = <0>; 181 cell-index = <0>;
182 device_type = "network"; 182 device_type = "network";
183 model = "TSEC"; 183 model = "eTSEC";
184 compatible = "gianfar"; 184 compatible = "gianfar";
185 reg = <0x24000 0x1000>; 185 reg = <0x24000 0x1000>;
186 local-mac-address = [ 00 00 00 00 00 00 ]; 186 local-mac-address = [ 00 00 00 00 00 00 ];
@@ -193,7 +193,7 @@
193 enet1: ethernet@26000 { 193 enet1: ethernet@26000 {
194 cell-index = <1>; 194 cell-index = <1>;
195 device_type = "network"; 195 device_type = "network";
196 model = "TSEC"; 196 model = "eTSEC";
197 compatible = "gianfar"; 197 compatible = "gianfar";
198 reg = <0x26000 0x1000>; 198 reg = <0x26000 0x1000>;
199 local-mac-address = [ 00 00 00 00 00 00 ]; 199 local-mac-address = [ 00 00 00 00 00 00 ];
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index a15f10343f53..c80158f7741d 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -52,7 +52,7 @@
52 }; 52 };
53 53
54 bcsr@f8000000 { 54 bcsr@f8000000 {
55 device_type = "board-control"; 55 compatible = "fsl,mpc8568mds-bcsr";
56 reg = <0xf8000000 0x8000>; 56 reg = <0xf8000000 0x8000>;
57 }; 57 };
58 58
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index e124dd18fb5a..cadd4652a695 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -13,8 +13,8 @@
13/ { 13/ {
14 model = "fsl,MPC8572DS"; 14 model = "fsl,MPC8572DS";
15 compatible = "fsl,MPC8572DS"; 15 compatible = "fsl,MPC8572DS";
16 #address-cells = <1>; 16 #address-cells = <2>;
17 #size-cells = <1>; 17 #size-cells = <2>;
18 18
19 aliases { 19 aliases {
20 ethernet0 = &enet0; 20 ethernet0 = &enet0;
@@ -61,7 +61,6 @@
61 61
62 memory { 62 memory {
63 device_type = "memory"; 63 device_type = "memory";
64 reg = <0x0 0x0>; // Filled by U-Boot
65 }; 64 };
66 65
67 soc8572@ffe00000 { 66 soc8572@ffe00000 {
@@ -69,8 +68,8 @@
69 #size-cells = <1>; 68 #size-cells = <1>;
70 device_type = "soc"; 69 device_type = "soc";
71 compatible = "simple-bus"; 70 compatible = "simple-bus";
72 ranges = <0x0 0xffe00000 0x100000>; 71 ranges = <0x0 0 0xffe00000 0x100000>;
73 reg = <0xffe00000 0x1000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed 72 reg = <0 0xffe00000 0 0x1000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed
74 bus-frequency = <0>; // Filled out by uboot. 73 bus-frequency = <0>; // Filled out by uboot.
75 74
76 memory-controller@2000 { 75 memory-controller@2000 {
@@ -351,10 +350,10 @@
351 #interrupt-cells = <1>; 350 #interrupt-cells = <1>;
352 #size-cells = <2>; 351 #size-cells = <2>;
353 #address-cells = <3>; 352 #address-cells = <3>;
354 reg = <0xffe08000 0x1000>; 353 reg = <0 0xffe08000 0 0x1000>;
355 bus-range = <0 255>; 354 bus-range = <0 255>;
356 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000 355 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
357 0x1000000 0x0 0x0 0xffc00000 0x0 0x10000>; 356 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x00010000>;
358 clock-frequency = <33333333>; 357 clock-frequency = <33333333>;
359 interrupt-parent = <&mpic>; 358 interrupt-parent = <&mpic>;
360 interrupts = <24 2>; 359 interrupts = <24 2>;
@@ -561,10 +560,10 @@
561 #interrupt-cells = <1>; 560 #interrupt-cells = <1>;
562 #size-cells = <2>; 561 #size-cells = <2>;
563 #address-cells = <3>; 562 #address-cells = <3>;
564 reg = <0xffe09000 0x1000>; 563 reg = <0 0xffe09000 0 0x1000>;
565 bus-range = <0 255>; 564 bus-range = <0 255>;
566 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000 565 ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
567 0x1000000 0x0 0x0 0xffc10000 0x0 0x10000>; 566 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x00010000>;
568 clock-frequency = <33333333>; 567 clock-frequency = <33333333>;
569 interrupt-parent = <&mpic>; 568 interrupt-parent = <&mpic>;
570 interrupts = <26 2>; 569 interrupts = <26 2>;
@@ -598,10 +597,10 @@
598 #interrupt-cells = <1>; 597 #interrupt-cells = <1>;
599 #size-cells = <2>; 598 #size-cells = <2>;
600 #address-cells = <3>; 599 #address-cells = <3>;
601 reg = <0xffe0a000 0x1000>; 600 reg = <0 0xffe0a000 0 0x1000>;
602 bus-range = <0 255>; 601 bus-range = <0 255>;
603 ranges = <0x2000000 0x0 0xc0000000 0xc0000000 0x0 0x20000000 602 ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
604 0x1000000 0x0 0x0 0xffc20000 0x0 0x10000>; 603 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x00010000>;
605 clock-frequency = <33333333>; 604 clock-frequency = <33333333>;
606 interrupt-parent = <&mpic>; 605 interrupt-parent = <&mpic>;
607 interrupts = <27 2>; 606 interrupts = <27 2>;
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c
index c541fd8a95d4..9276327bc2bb 100644
--- a/arch/powerpc/boot/libfdt-wrapper.c
+++ b/arch/powerpc/boot/libfdt-wrapper.c
@@ -105,6 +105,11 @@ static int fdt_wrapper_setprop(const void *devp, const char *name,
105 return check_err(rc); 105 return check_err(rc);
106} 106}
107 107
108static int fdt_wrapper_del_node(const void *devp)
109{
110 return fdt_del_node(fdt, devp_offset(devp));
111}
112
108static void *fdt_wrapper_get_parent(const void *devp) 113static void *fdt_wrapper_get_parent(const void *devp)
109{ 114{
110 return offset_devp(fdt_parent_offset(fdt, devp_offset(devp))); 115 return offset_devp(fdt_parent_offset(fdt, devp_offset(devp)));
@@ -165,6 +170,7 @@ static unsigned long fdt_wrapper_finalize(void)
165void fdt_init(void *blob) 170void fdt_init(void *blob)
166{ 171{
167 int err; 172 int err;
173 int bufsize;
168 174
169 dt_ops.finddevice = fdt_wrapper_finddevice; 175 dt_ops.finddevice = fdt_wrapper_finddevice;
170 dt_ops.getprop = fdt_wrapper_getprop; 176 dt_ops.getprop = fdt_wrapper_getprop;
@@ -173,21 +179,21 @@ void fdt_init(void *blob)
173 dt_ops.create_node = fdt_wrapper_create_node; 179 dt_ops.create_node = fdt_wrapper_create_node;
174 dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value; 180 dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value;
175 dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible; 181 dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible;
182 dt_ops.del_node = fdt_wrapper_del_node;
176 dt_ops.get_path = fdt_wrapper_get_path; 183 dt_ops.get_path = fdt_wrapper_get_path;
177 dt_ops.finalize = fdt_wrapper_finalize; 184 dt_ops.finalize = fdt_wrapper_finalize;
178 185
179 /* Make sure the dt blob is the right version and so forth */ 186 /* Make sure the dt blob is the right version and so forth */
180 fdt = blob; 187 fdt = blob;
181 err = fdt_open_into(fdt, fdt, fdt_totalsize(blob)); 188 bufsize = fdt_totalsize(fdt) + 4;
182 if (err == -FDT_ERR_NOSPACE) { 189 buf = malloc(bufsize);
183 int bufsize = fdt_totalsize(fdt) + 4; 190 if(!buf)
184 buf = malloc(bufsize); 191 fatal("malloc failed. can't relocate the device tree\n\r");
185 err = fdt_open_into(fdt, buf, bufsize); 192
186 } 193 err = fdt_open_into(fdt, buf, bufsize);
187 194
188 if (err != 0) 195 if (err != 0)
189 fatal("fdt_init(): %s\n\r", fdt_strerror(err)); 196 fatal("fdt_init(): %s\n\r", fdt_strerror(err));
190 197
191 if (buf) 198 fdt = buf;
192 fdt = buf;
193} 199}
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/ops.h b/arch/powerpc/boot/ops.h
index 321e2f5afe71..b3218ce451bb 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -40,6 +40,7 @@ struct dt_ops {
40 const int buflen); 40 const int buflen);
41 int (*setprop)(const void *phandle, const char *name, 41 int (*setprop)(const void *phandle, const char *name,
42 const void *buf, const int buflen); 42 const void *buf, const int buflen);
43 int (*del_node)(const void *phandle);
43 void *(*get_parent)(const void *phandle); 44 void *(*get_parent)(const void *phandle);
44 /* The node must not already exist. */ 45 /* The node must not already exist. */
45 void *(*create_node)(const void *parent, const char *name); 46 void *(*create_node)(const void *parent, const char *name);
@@ -126,6 +127,11 @@ static inline int setprop_str(void *devp, const char *name, const char *buf)
126 return -1; 127 return -1;
127} 128}
128 129
130static inline int del_node(const void *devp)
131{
132 return dt_ops.del_node ? dt_ops.del_node(devp) : -1;
133}
134
129static inline void *get_parent(const char *devp) 135static inline void *get_parent(const char *devp)
130{ 136{
131 return dt_ops.get_parent ? dt_ops.get_parent(devp) : NULL; 137 return dt_ops.get_parent ? dt_ops.get_parent(devp) : NULL;
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/kdump.h b/arch/powerpc/include/asm/kdump.h
index f6c93c716898..a503da9d56f3 100644
--- a/arch/powerpc/include/asm/kdump.h
+++ b/arch/powerpc/include/asm/kdump.h
@@ -9,6 +9,12 @@
9 * Reserve to the end of the FWNMI area, see head_64.S */ 9 * Reserve to the end of the FWNMI area, see head_64.S */
10#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */ 10#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
11 11
12/*
13 * Used to differentiate between relocatable kdump kernel and other
14 * kernels
15 */
16#define KDUMP_SIGNATURE 0xfeed1234
17
12#ifdef CONFIG_CRASH_DUMP 18#ifdef CONFIG_CRASH_DUMP
13 19
14#define KDUMP_TRAMPOLINE_START 0x0100 20#define KDUMP_TRAMPOLINE_START 0x0100
@@ -19,17 +25,18 @@
19#endif /* CONFIG_CRASH_DUMP */ 25#endif /* CONFIG_CRASH_DUMP */
20 26
21#ifndef __ASSEMBLY__ 27#ifndef __ASSEMBLY__
22#ifdef CONFIG_CRASH_DUMP
23 28
29extern unsigned long __kdump_flag;
30
31#if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_RELOCATABLE)
24extern void reserve_kdump_trampoline(void); 32extern void reserve_kdump_trampoline(void);
25extern void setup_kdump_trampoline(void); 33extern void setup_kdump_trampoline(void);
26 34#else
27#else /* !CONFIG_CRASH_DUMP */ 35/* !CRASH_DUMP || RELOCATABLE */
28
29static inline void reserve_kdump_trampoline(void) { ; } 36static inline void reserve_kdump_trampoline(void) { ; }
30static inline void setup_kdump_trampoline(void) { ; } 37static inline void setup_kdump_trampoline(void) { ; }
38#endif
31 39
32#endif /* CONFIG_CRASH_DUMP */
33#endif /* __ASSEMBLY__ */ 40#endif /* __ASSEMBLY__ */
34 41
35#endif /* __PPC64_KDUMP_H */ 42#endif /* __PPC64_KDUMP_H */
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index 5ac51e6efc1d..c0b8d4a29a91 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -77,6 +77,7 @@
77 77
78#if defined(CONFIG_RELOCATABLE) 78#if defined(CONFIG_RELOCATABLE)
79#ifndef __ASSEMBLY__ 79#ifndef __ASSEMBLY__
80
80extern phys_addr_t memstart_addr; 81extern phys_addr_t memstart_addr;
81extern phys_addr_t kernstart_addr; 82extern phys_addr_t kernstart_addr;
82#endif 83#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/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 97e056379728..19671aca6591 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -30,6 +30,7 @@
30/* Stores the physical address of elf header of crash image. */ 30/* Stores the physical address of elf header of crash image. */
31unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; 31unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
32 32
33#ifndef CONFIG_RELOCATABLE
33void __init reserve_kdump_trampoline(void) 34void __init reserve_kdump_trampoline(void)
34{ 35{
35 lmb_reserve(0, KDUMP_RESERVE_LIMIT); 36 lmb_reserve(0, KDUMP_RESERVE_LIMIT);
@@ -68,6 +69,7 @@ void __init setup_kdump_trampoline(void)
68 69
69 DBG(" <- setup_kdump_trampoline()\n"); 70 DBG(" <- setup_kdump_trampoline()\n");
70} 71}
72#endif /* CONFIG_RELOCATABLE */
71 73
72/* 74/*
73 * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by 75 * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 84856bee33a5..69489bd3210c 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -97,6 +97,12 @@ __secondary_hold_spinloop:
97__secondary_hold_acknowledge: 97__secondary_hold_acknowledge:
98 .llong 0x0 98 .llong 0x0
99 99
100 /* This flag is set by purgatory if we should be a kdump kernel. */
101 /* Do not move this variable as purgatory knows about it. */
102 .globl __kdump_flag
103__kdump_flag:
104 .llong 0x0
105
100#ifdef CONFIG_PPC_ISERIES 106#ifdef CONFIG_PPC_ISERIES
101 /* 107 /*
102 * At offset 0x20, there is a pointer to iSeries LPAR data. 108 * At offset 0x20, there is a pointer to iSeries LPAR data.
@@ -1384,7 +1390,13 @@ _STATIC(__after_prom_start)
1384 /* process relocations for the final address of the kernel */ 1390 /* process relocations for the final address of the kernel */
1385 lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */ 1391 lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */
1386 sldi r25,r25,32 1392 sldi r25,r25,32
1387 mr r3,r25 1393#ifdef CONFIG_CRASH_DUMP
1394 ld r7,__kdump_flag-_stext(r26)
1395 cmpldi cr0,r7,1 /* kdump kernel ? - stay where we are */
1396 bne 1f
1397 add r25,r25,r26
1398#endif
13991: mr r3,r25
1388 bl .relocate 1400 bl .relocate
1389#endif 1401#endif
1390 1402
@@ -1398,11 +1410,26 @@ _STATIC(__after_prom_start)
1398 li r3,0 /* target addr */ 1410 li r3,0 /* target addr */
1399 mr. r4,r26 /* In some cases the loader may */ 1411 mr. r4,r26 /* In some cases the loader may */
1400 beq 9f /* have already put us at zero */ 1412 beq 9f /* have already put us at zero */
1401 lis r5,(copy_to_here - _stext)@ha
1402 addi r5,r5,(copy_to_here - _stext)@l /* # bytes of memory to copy */
1403 li r6,0x100 /* Start offset, the first 0x100 */ 1413 li r6,0x100 /* Start offset, the first 0x100 */
1404 /* bytes were copied earlier. */ 1414 /* bytes were copied earlier. */
1405 1415
1416#ifdef CONFIG_CRASH_DUMP
1417/*
1418 * Check if the kernel has to be running as relocatable kernel based on the
1419 * variable __kdump_flag, if it is set the kernel is treated as relocatable
1420 * kernel, otherwise it will be moved to PHYSICAL_START
1421 */
1422 ld r7,__kdump_flag-_stext(r26)
1423 cmpldi cr0,r7,1
1424 bne 3f
1425
1426 li r5,__end_interrupts - _stext /* just copy interrupts */
1427 b 5f
14283:
1429#endif
1430 lis r5,(copy_to_here - _stext)@ha
1431 addi r5,r5,(copy_to_here - _stext)@l /* # bytes of memory to copy */
1432
1406 bl .copy_and_flush /* copy the first n bytes */ 1433 bl .copy_and_flush /* copy the first n bytes */
1407 /* this includes the code being */ 1434 /* this includes the code being */
1408 /* executed here. */ 1435 /* executed here. */
@@ -1411,15 +1438,15 @@ _STATIC(__after_prom_start)
1411 mtctr r8 1438 mtctr r8
1412 bctr 1439 bctr
1413 1440
1441p_end: .llong _end - _stext
1442
14144: /* Now copy the rest of the kernel up to _end */ 14434: /* Now copy the rest of the kernel up to _end */
1415 addis r5,r26,(p_end - _stext)@ha 1444 addis r5,r26,(p_end - _stext)@ha
1416 ld r5,(p_end - _stext)@l(r5) /* get _end */ 1445 ld r5,(p_end - _stext)@l(r5) /* get _end */
1417 bl .copy_and_flush /* copy the rest */ 14465: bl .copy_and_flush /* copy the rest */
1418 1447
14199: b .start_here_multiplatform 14489: b .start_here_multiplatform
1420 1449
1421p_end: .llong _end - _stext
1422
1423/* 1450/*
1424 * Copy routine used to copy the kernel to start at physical address 0 1451 * Copy routine used to copy the kernel to start at physical address 0
1425 * and flush and invalidate the caches as needed. 1452 * and flush and invalidate the caches as needed.
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index ea1ba89f9c90..3857d7e2af0c 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -458,6 +458,42 @@ void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
458 spin_unlock_irqrestore(&(tbl->it_lock), flags); 458 spin_unlock_irqrestore(&(tbl->it_lock), flags);
459} 459}
460 460
461static void iommu_table_clear(struct iommu_table *tbl)
462{
463 if (!__kdump_flag) {
464 /* Clear the table in case firmware left allocations in it */
465 ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);
466 return;
467 }
468
469#ifdef CONFIG_CRASH_DUMP
470 if (ppc_md.tce_get) {
471 unsigned long index, tceval, tcecount = 0;
472
473 /* Reserve the existing mappings left by the first kernel. */
474 for (index = 0; index < tbl->it_size; index++) {
475 tceval = ppc_md.tce_get(tbl, index + tbl->it_offset);
476 /*
477 * Freed TCE entry contains 0x7fffffffffffffff on JS20
478 */
479 if (tceval && (tceval != 0x7fffffffffffffffUL)) {
480 __set_bit(index, tbl->it_map);
481 tcecount++;
482 }
483 }
484
485 if ((tbl->it_size - tcecount) < KDUMP_MIN_TCE_ENTRIES) {
486 printk(KERN_WARNING "TCE table is full; freeing ");
487 printk(KERN_WARNING "%d entries for the kdump boot\n",
488 KDUMP_MIN_TCE_ENTRIES);
489 for (index = tbl->it_size - KDUMP_MIN_TCE_ENTRIES;
490 index < tbl->it_size; index++)
491 __clear_bit(index, tbl->it_map);
492 }
493 }
494#endif
495}
496
461/* 497/*
462 * Build a iommu_table structure. This contains a bit map which 498 * Build a iommu_table structure. This contains a bit map which
463 * is used to manage allocation of the tce space. 499 * is used to manage allocation of the tce space.
@@ -484,38 +520,7 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
484 tbl->it_largehint = tbl->it_halfpoint; 520 tbl->it_largehint = tbl->it_halfpoint;
485 spin_lock_init(&tbl->it_lock); 521 spin_lock_init(&tbl->it_lock);
486 522
487#ifdef CONFIG_CRASH_DUMP 523 iommu_table_clear(tbl);
488 if (ppc_md.tce_get) {
489 unsigned long index;
490 unsigned long tceval;
491 unsigned long tcecount = 0;
492
493 /*
494 * Reserve the existing mappings left by the first kernel.
495 */
496 for (index = 0; index < tbl->it_size; index++) {
497 tceval = ppc_md.tce_get(tbl, index + tbl->it_offset);
498 /*
499 * Freed TCE entry contains 0x7fffffffffffffff on JS20
500 */
501 if (tceval && (tceval != 0x7fffffffffffffffUL)) {
502 __set_bit(index, tbl->it_map);
503 tcecount++;
504 }
505 }
506 if ((tbl->it_size - tcecount) < KDUMP_MIN_TCE_ENTRIES) {
507 printk(KERN_WARNING "TCE table is full; ");
508 printk(KERN_WARNING "freeing %d entries for the kdump boot\n",
509 KDUMP_MIN_TCE_ENTRIES);
510 for (index = tbl->it_size - KDUMP_MIN_TCE_ENTRIES;
511 index < tbl->it_size; index++)
512 __clear_bit(index, tbl->it_map);
513 }
514 }
515#else
516 /* Clear the hardware table in case firmware left allocations in it */
517 ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);
518#endif
519 524
520 if (!welcomed) { 525 if (!welcomed) {
521 printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n", 526 printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index aab76887a842..ac2a21f45c75 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -88,11 +88,13 @@ void __init reserve_crashkernel(void)
88 88
89 crash_size = crashk_res.end - crashk_res.start + 1; 89 crash_size = crashk_res.end - crashk_res.start + 1;
90 90
91#ifndef CONFIG_RELOCATABLE
91 if (crashk_res.start != KDUMP_KERNELBASE) 92 if (crashk_res.start != KDUMP_KERNELBASE)
92 printk("Crash kernel location must be 0x%x\n", 93 printk("Crash kernel location must be 0x%x\n",
93 KDUMP_KERNELBASE); 94 KDUMP_KERNELBASE);
94 95
95 crashk_res.start = KDUMP_KERNELBASE; 96 crashk_res.start = KDUMP_KERNELBASE;
97#endif
96 crash_size = PAGE_ALIGN(crash_size); 98 crash_size = PAGE_ALIGN(crash_size);
97 crashk_res.end = crashk_res.start + crash_size - 1; 99 crashk_res.end = crashk_res.start + crash_size - 1;
98 100
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a168514d8609..e6efec788c4d 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -255,11 +255,14 @@ static union thread_union kexec_stack
255/* Our assembly helper, in kexec_stub.S */ 255/* Our assembly helper, in kexec_stub.S */
256extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start, 256extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
257 void *image, void *control, 257 void *image, void *control,
258 void (*clear_all)(void)) ATTRIB_NORET; 258 void (*clear_all)(void),
259 unsigned long kdump_flag) ATTRIB_NORET;
259 260
260/* too late to fail here */ 261/* too late to fail here */
261void default_machine_kexec(struct kimage *image) 262void default_machine_kexec(struct kimage *image)
262{ 263{
264 unsigned long kdump_flag = 0;
265
263 /* prepare control code if any */ 266 /* prepare control code if any */
264 267
265 /* 268 /*
@@ -270,8 +273,10 @@ void default_machine_kexec(struct kimage *image)
270 * using debugger IPI. 273 * using debugger IPI.
271 */ 274 */
272 275
273 if (crashing_cpu == -1) 276 if (crashing_cpu == -1)
274 kexec_prepare_cpus(); 277 kexec_prepare_cpus();
278 else
279 kdump_flag = KDUMP_SIGNATURE;
275 280
276 /* switch to a staticly allocated stack. Based on irq stack code. 281 /* switch to a staticly allocated stack. Based on irq stack code.
277 * XXX: the task struct will likely be invalid once we do the copy! 282 * XXX: the task struct will likely be invalid once we do the copy!
@@ -284,7 +289,7 @@ void default_machine_kexec(struct kimage *image)
284 */ 289 */
285 kexec_sequence(&kexec_stack, image->start, image, 290 kexec_sequence(&kexec_stack, image->start, image,
286 page_address(image->control_code_page), 291 page_address(image->control_code_page),
287 ppc_md.hpte_clear_all); 292 ppc_md.hpte_clear_all, kdump_flag);
288 /* NOTREACHED */ 293 /* NOTREACHED */
289} 294}
290 295
@@ -312,11 +317,24 @@ static struct property kernel_end_prop = {
312static void __init export_htab_values(void) 317static void __init export_htab_values(void)
313{ 318{
314 struct device_node *node; 319 struct device_node *node;
320 struct property *prop;
315 321
316 node = of_find_node_by_path("/chosen"); 322 node = of_find_node_by_path("/chosen");
317 if (!node) 323 if (!node)
318 return; 324 return;
319 325
326 /* remove any stale propertys so ours can be found */
327 prop = of_find_property(node, kernel_end_prop.name, NULL);
328 if (prop)
329 prom_remove_property(node, prop);
330 prop = of_find_property(node, htab_base_prop.name, NULL);
331 if (prop)
332 prom_remove_property(node, prop);
333 prop = of_find_property(node, htab_size_prop.name, NULL);
334 if (prop)
335 prom_remove_property(node, prop);
336
337 /* information needed by userspace when using default_machine_kexec */
320 kernel_end = __pa(_end); 338 kernel_end = __pa(_end);
321 prom_add_property(node, &kernel_end_prop); 339 prom_add_property(node, &kernel_end_prop);
322 340
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 3053fe5c62f2..a243fd072a77 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -611,10 +611,12 @@ real_mode: /* assume normal blr return */
611 611
612 612
613/* 613/*
614 * kexec_sequence(newstack, start, image, control, clear_all()) 614 * kexec_sequence(newstack, start, image, control, clear_all(), kdump_flag)
615 * 615 *
616 * does the grungy work with stack switching and real mode switches 616 * does the grungy work with stack switching and real mode switches
617 * also does simple calls to other code 617 * also does simple calls to other code
618 *
619 * kdump_flag says whether the next kernel should be a kdump kernel.
618 */ 620 */
619 621
620_GLOBAL(kexec_sequence) 622_GLOBAL(kexec_sequence)
@@ -647,7 +649,7 @@ _GLOBAL(kexec_sequence)
647 mr r29,r5 /* image (virt) */ 649 mr r29,r5 /* image (virt) */
648 mr r28,r6 /* control, unused */ 650 mr r28,r6 /* control, unused */
649 mr r27,r7 /* clear_all() fn desc */ 651 mr r27,r7 /* clear_all() fn desc */
650 mr r26,r8 /* spare */ 652 mr r26,r8 /* kdump flag */
651 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */ 653 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */
652 654
653 /* disable interrupts, we are overwriting kernel data next */ 655 /* disable interrupts, we are overwriting kernel data next */
@@ -709,5 +711,6 @@ _GLOBAL(kexec_sequence)
709 mr r4,r30 # start, aka phys mem offset 711 mr r4,r30 # start, aka phys mem offset
710 mtlr 4 712 mtlr 4
711 li r5,0 713 li r5,0
712 blr /* image->start(physid, image->start, 0); */ 714 mr r6,r26 /* kdump_flag */
715 blr /* image->start(physid, image->start, 0, kdump_flag); */
713#endif /* CONFIG_KEXEC */ 716#endif /* CONFIG_KEXEC */
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 3815d84a1ef4..1ec73938a00f 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -610,7 +610,8 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus,
610 pr_debug(" -> mapping phys %llx\n", (unsigned long long)offset); 610 pr_debug(" -> mapping phys %llx\n", (unsigned long long)offset);
611 611
612 vma->vm_pgoff = offset >> PAGE_SHIFT; 612 vma->vm_pgoff = offset >> PAGE_SHIFT;
613 vma->vm_page_prot |= _PAGE_NO_CACHE | _PAGE_GUARDED; 613 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
614 | _PAGE_NO_CACHE | _PAGE_GUARDED);
614 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, 615 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
615 vma->vm_end - vma->vm_start, 616 vma->vm_end - vma->vm_start,
616 vma->vm_page_prot); 617 vma->vm_page_prot);
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/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 5ec56ff03e86..705fc4bf3800 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -59,6 +59,7 @@
59#include <asm/mmu.h> 59#include <asm/mmu.h>
60#include <asm/xmon.h> 60#include <asm/xmon.h>
61#include <asm/cputhreads.h> 61#include <asm/cputhreads.h>
62#include <mm/mmu_decl.h>
62 63
63#include "setup.h" 64#include "setup.h"
64 65
@@ -190,6 +191,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
190 if (ppc_md.show_cpuinfo != NULL) 191 if (ppc_md.show_cpuinfo != NULL)
191 ppc_md.show_cpuinfo(m); 192 ppc_md.show_cpuinfo(m);
192 193
194#ifdef CONFIG_PPC32
195 /* Display the amount of memory */
196 seq_printf(m, "Memory\t\t: %d MB\n",
197 (unsigned int)(total_memory / (1024 * 1024)));
198#endif
199
193 return 0; 200 return 0;
194 } 201 }
195 202
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 65ad925c3a8f..c6a8f2326b6f 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -235,8 +235,6 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
235 else 235 else
236 for (i = 0; i < 32 ; i++) 236 for (i = 0; i < 32 ; i++)
237 current->thread.fpr[i][TS_VSRLOWOFFSET] = 0; 237 current->thread.fpr[i][TS_VSRLOWOFFSET] = 0;
238
239#else
240#endif 238#endif
241 return err; 239 return err;
242} 240}
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/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 5c64af174752..8d5b4758c13a 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -382,8 +382,10 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
382 printk(KERN_INFO "Huge page(16GB) memory: " 382 printk(KERN_INFO "Huge page(16GB) memory: "
383 "addr = 0x%lX size = 0x%lX pages = %d\n", 383 "addr = 0x%lX size = 0x%lX pages = %d\n",
384 phys_addr, block_size, expected_pages); 384 phys_addr, block_size, expected_pages);
385 lmb_reserve(phys_addr, block_size * expected_pages); 385 if (phys_addr + (16 * GB) <= lmb_end_of_DRAM()) {
386 add_gpage(phys_addr, block_size, expected_pages); 386 lmb_reserve(phys_addr, block_size * expected_pages);
387 add_gpage(phys_addr, block_size, expected_pages);
388 }
387 return 0; 389 return 0;
388} 390}
389#endif /* CONFIG_HUGETLB_PAGE */ 391#endif /* CONFIG_HUGETLB_PAGE */
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/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
index 8a3b117b6ce2..81cee7bbf2d2 100644
--- a/arch/powerpc/platforms/85xx/ksi8560.c
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -193,7 +193,6 @@ static void __init ksi8560_setup_arch(void)
193static void ksi8560_show_cpuinfo(struct seq_file *m) 193static void ksi8560_show_cpuinfo(struct seq_file *m)
194{ 194{
195 uint pvid, svid, phid1; 195 uint pvid, svid, phid1;
196 uint memsize = total_memory;
197 196
198 pvid = mfspr(SPRN_PVR); 197 pvid = mfspr(SPRN_PVR);
199 svid = mfspr(SPRN_SVR); 198 svid = mfspr(SPRN_SVR);
@@ -215,9 +214,6 @@ static void ksi8560_show_cpuinfo(struct seq_file *m)
215 /* Display cpu Pll setting */ 214 /* Display cpu Pll setting */
216 phid1 = mfspr(SPRN_HID1); 215 phid1 = mfspr(SPRN_HID1);
217 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 216 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
218
219 /* Display the amount of memory */
220 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
221} 217}
222 218
223static struct of_device_id __initdata of_bus_ids[] = { 219static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 0293e3d3580f..21f009023e26 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -207,7 +207,6 @@ static void __init mpc85xx_ads_setup_arch(void)
207static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) 207static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
208{ 208{
209 uint pvid, svid, phid1; 209 uint pvid, svid, phid1;
210 uint memsize = total_memory;
211 210
212 pvid = mfspr(SPRN_PVR); 211 pvid = mfspr(SPRN_PVR);
213 svid = mfspr(SPRN_SVR); 212 svid = mfspr(SPRN_SVR);
@@ -219,9 +218,6 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
219 /* Display cpu Pll setting */ 218 /* Display cpu Pll setting */
220 phid1 = mfspr(SPRN_HID1); 219 phid1 = mfspr(SPRN_HID1);
221 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 220 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
222
223 /* Display the amount of memory */
224 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
225} 221}
226 222
227static struct of_device_id __initdata of_bus_ids[] = { 223static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 50d7ea8f922b..aeb6a5bc5522 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -307,7 +307,6 @@ static void __init mpc85xx_cds_setup_arch(void)
307static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) 307static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
308{ 308{
309 uint pvid, svid, phid1; 309 uint pvid, svid, phid1;
310 uint memsize = total_memory;
311 310
312 pvid = mfspr(SPRN_PVR); 311 pvid = mfspr(SPRN_PVR);
313 svid = mfspr(SPRN_SVR); 312 svid = mfspr(SPRN_SVR);
@@ -320,9 +319,6 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
320 /* Display cpu Pll setting */ 319 /* Display cpu Pll setting */
321 phid1 = mfspr(SPRN_HID1); 320 phid1 = mfspr(SPRN_HID1);
322 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 321 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
323
324 /* Display the amount of memory */
325 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
326} 322}
327 323
328 324
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c
index b9246ea0928a..7ec77ce12dad 100644
--- a/arch/powerpc/platforms/85xx/sbc8548.c
+++ b/arch/powerpc/platforms/85xx/sbc8548.c
@@ -136,7 +136,6 @@ static void __init sbc8548_setup_arch(void)
136static void sbc8548_show_cpuinfo(struct seq_file *m) 136static void sbc8548_show_cpuinfo(struct seq_file *m)
137{ 137{
138 uint pvid, svid, phid1; 138 uint pvid, svid, phid1;
139 uint memsize = total_memory;
140 139
141 pvid = mfspr(SPRN_PVR); 140 pvid = mfspr(SPRN_PVR);
142 svid = mfspr(SPRN_SVR); 141 svid = mfspr(SPRN_SVR);
@@ -149,9 +148,6 @@ static void sbc8548_show_cpuinfo(struct seq_file *m)
149 /* Display cpu Pll setting */ 148 /* Display cpu Pll setting */
150 phid1 = mfspr(SPRN_HID1); 149 phid1 = mfspr(SPRN_HID1);
151 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 150 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
152
153 /* Display the amount of memory */
154 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
155} 151}
156 152
157static struct of_device_id __initdata of_bus_ids[] = { 153static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
index 0c9a856f66b6..472f254a19d2 100644
--- a/arch/powerpc/platforms/85xx/sbc8560.c
+++ b/arch/powerpc/platforms/85xx/sbc8560.c
@@ -194,7 +194,6 @@ static void __init sbc8560_setup_arch(void)
194static void sbc8560_show_cpuinfo(struct seq_file *m) 194static void sbc8560_show_cpuinfo(struct seq_file *m)
195{ 195{
196 uint pvid, svid, phid1; 196 uint pvid, svid, phid1;
197 uint memsize = total_memory;
198 197
199 pvid = mfspr(SPRN_PVR); 198 pvid = mfspr(SPRN_PVR);
200 svid = mfspr(SPRN_SVR); 199 svid = mfspr(SPRN_SVR);
@@ -206,9 +205,6 @@ static void sbc8560_show_cpuinfo(struct seq_file *m)
206 /* Display cpu Pll setting */ 205 /* Display cpu Pll setting */
207 phid1 = mfspr(SPRN_HID1); 206 phid1 = mfspr(SPRN_HID1);
208 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 207 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
209
210 /* Display the amount of memory */
211 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
212} 208}
213 209
214static struct of_device_id __initdata of_bus_ids[] = { 210static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c
index 18499d7c9d9e..0cca8f5cb272 100644
--- a/arch/powerpc/platforms/85xx/stx_gp3.c
+++ b/arch/powerpc/platforms/85xx/stx_gp3.c
@@ -130,7 +130,6 @@ static void __init stx_gp3_setup_arch(void)
130static void stx_gp3_show_cpuinfo(struct seq_file *m) 130static void stx_gp3_show_cpuinfo(struct seq_file *m)
131{ 131{
132 uint pvid, svid, phid1; 132 uint pvid, svid, phid1;
133 uint memsize = total_memory;
134 133
135 pvid = mfspr(SPRN_PVR); 134 pvid = mfspr(SPRN_PVR);
136 svid = mfspr(SPRN_SVR); 135 svid = mfspr(SPRN_SVR);
@@ -142,9 +141,6 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m)
142 /* Display cpu Pll setting */ 141 /* Display cpu Pll setting */
143 phid1 = mfspr(SPRN_HID1); 142 phid1 = mfspr(SPRN_HID1);
144 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 143 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
145
146 /* Display the amount of memory */
147 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
148} 144}
149 145
150static struct of_device_id __initdata of_bus_ids[] = { 146static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index d850880d6964..2933a8e827d9 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -138,7 +138,6 @@ static void __init tqm85xx_setup_arch(void)
138static void tqm85xx_show_cpuinfo(struct seq_file *m) 138static void tqm85xx_show_cpuinfo(struct seq_file *m)
139{ 139{
140 uint pvid, svid, phid1; 140 uint pvid, svid, phid1;
141 uint memsize = total_memory;
142 141
143 pvid = mfspr(SPRN_PVR); 142 pvid = mfspr(SPRN_PVR);
144 svid = mfspr(SPRN_SVR); 143 svid = mfspr(SPRN_SVR);
@@ -150,9 +149,6 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m)
150 /* Display cpu Pll setting */ 149 /* Display cpu Pll setting */
151 phid1 = mfspr(SPRN_HID1); 150 phid1 = mfspr(SPRN_HID1);
152 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 151 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
153
154 /* Display the amount of memory */
155 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
156} 152}
157 153
158static struct of_device_id __initdata of_bus_ids[] = { 154static struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index 821c45fac18b..fb371f5ce132 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -127,7 +127,6 @@ static unsigned int gef_sbc610_get_fpga_rev(void)
127 127
128static void gef_sbc610_show_cpuinfo(struct seq_file *m) 128static void gef_sbc610_show_cpuinfo(struct seq_file *m)
129{ 129{
130 uint memsize = total_memory;
131 uint svid = mfspr(SPRN_SVR); 130 uint svid = mfspr(SPRN_SVR);
132 131
133 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); 132 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");
@@ -137,7 +136,6 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
137 seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev()); 136 seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev());
138 137
139 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 138 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
140 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
141} 139}
142 140
143static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev) 141static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev)
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 2672829a71dc..27e0e682d8e1 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -101,13 +101,11 @@ mpc86xx_hpcn_setup_arch(void)
101static void 101static void
102mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) 102mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
103{ 103{
104 uint memsize = total_memory;
105 uint svid = mfspr(SPRN_SVR); 104 uint svid = mfspr(SPRN_SVR);
106 105
107 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); 106 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
108 107
109 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 108 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
110 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
111} 109}
112 110
113 111
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c
index da677a74e2d1..5fd7ed40986f 100644
--- a/arch/powerpc/platforms/86xx/sbc8641d.c
+++ b/arch/powerpc/platforms/86xx/sbc8641d.c
@@ -63,13 +63,11 @@ sbc8641_setup_arch(void)
63static void 63static void
64sbc8641_show_cpuinfo(struct seq_file *m) 64sbc8641_show_cpuinfo(struct seq_file *m)
65{ 65{
66 uint memsize = total_memory;
67 uint svid = mfspr(SPRN_SVR); 66 uint svid = mfspr(SPRN_SVR);
68 67
69 seq_printf(m, "Vendor\t\t: Wind River Systems\n"); 68 seq_printf(m, "Vendor\t\t: Wind River Systems\n");
70 69
71 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 70 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
72 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
73} 71}
74 72
75 73
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index 2a14b052abcd..665af1c4195b 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -21,6 +21,7 @@
21#include <asm/machdep.h> 21#include <asm/machdep.h>
22#include <asm/rtas.h> 22#include <asm/rtas.h>
23#include <asm/cell-regs.h> 23#include <asm/cell-regs.h>
24#include <asm/kdump.h>
24 25
25#include "ras.h" 26#include "ras.h"
26 27
@@ -111,9 +112,8 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
111 int ret = -ENOMEM; 112 int ret = -ENOMEM;
112 unsigned long addr; 113 unsigned long addr;
113 114
114#ifdef CONFIG_CRASH_DUMP 115 if (__kdump_flag)
115 rtas_call(ptcal_stop_tok, 1, 1, NULL, nid); 116 rtas_call(ptcal_stop_tok, 1, 1, NULL, nid);
116#endif
117 117
118 area = kmalloc(sizeof(*area), GFP_KERNEL); 118 area = kmalloc(sizeof(*area), GFP_KERNEL);
119 if (!area) 119 if (!area)
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 2ece399f2862..d0b1f3f4d9c8 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/embedded6xx/c2k.c b/arch/powerpc/platforms/embedded6xx/c2k.c
index d0b25b8c39d1..32ba0fa0ad03 100644
--- a/arch/powerpc/platforms/embedded6xx/c2k.c
+++ b/arch/powerpc/platforms/embedded6xx/c2k.c
@@ -116,10 +116,7 @@ static void c2k_restart(char *cmd)
116 116
117void c2k_show_cpuinfo(struct seq_file *m) 117void c2k_show_cpuinfo(struct seq_file *m)
118{ 118{
119 uint memsize = total_memory;
120
121 seq_printf(m, "Vendor\t\t: GEFanuc\n"); 119 seq_printf(m, "Vendor\t\t: GEFanuc\n");
122 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
123 seq_printf(m, "coherency\t: %s\n", COHERENCY_SETTING); 120 seq_printf(m, "coherency\t: %s\n", COHERENCY_SETTING);
124} 121}
125 122
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
index 5a19b9a1457c..4c485e984236 100644
--- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -119,10 +119,7 @@ static void prpmc2800_restart(char *cmd)
119 119
120void prpmc2800_show_cpuinfo(struct seq_file *m) 120void prpmc2800_show_cpuinfo(struct seq_file *m)
121{ 121{
122 uint memsize = total_memory;
123
124 seq_printf(m, "Vendor\t\t: Motorola\n"); 122 seq_printf(m, "Vendor\t\t: Motorola\n");
125 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
126 seq_printf(m, "coherency\t: %s\n", PPRPM2800_COHERENCY_SETTING); 123 seq_printf(m, "coherency\t: %s\n", PPRPM2800_COHERENCY_SETTING);
127} 124}
128 125
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/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index a8c446697f9e..d56491d182d3 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -44,6 +44,7 @@
44#include <asm/tce.h> 44#include <asm/tce.h>
45#include <asm/ppc-pci.h> 45#include <asm/ppc-pci.h>
46#include <asm/udbg.h> 46#include <asm/udbg.h>
47#include <asm/kdump.h>
47 48
48#include "plpar_wrappers.h" 49#include "plpar_wrappers.h"
49 50
@@ -291,9 +292,8 @@ static void iommu_table_setparms(struct pci_controller *phb,
291 292
292 tbl->it_base = (unsigned long)__va(*basep); 293 tbl->it_base = (unsigned long)__va(*basep);
293 294
294#ifndef CONFIG_CRASH_DUMP 295 if (!__kdump_flag)
295 memset((void *)tbl->it_base, 0, *sizep); 296 memset((void *)tbl->it_base, 0, *sizep);
296#endif
297 297
298 tbl->it_busno = phb->bus->number; 298 tbl->it_busno = phb->bus->number;
299 299
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);
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index bf70450a49cc..5b819b12675a 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -161,7 +161,7 @@ static void hvc_console_print(struct console *co, const char *b,
161 } 161 }
162 } else { 162 } else {
163 r = cons_ops[index]->put_chars(vtermnos[index], c, i); 163 r = cons_ops[index]->put_chars(vtermnos[index], c, i);
164 if (r < 0) { 164 if (r <= 0) {
165 /* throw away chars on error */ 165 /* throw away chars on error */
166 i = 0; 166 i = 0;
167 } else if (r > 0) { 167 } else if (r > 0) {
@@ -374,6 +374,9 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
374 if (hp->ops->notifier_del) 374 if (hp->ops->notifier_del)
375 hp->ops->notifier_del(hp, hp->data); 375 hp->ops->notifier_del(hp, hp->data);
376 376
377 /* cancel pending tty resize work */
378 cancel_work_sync(&hp->tty_resize);
379
377 /* 380 /*
378 * Chain calls chars_in_buffer() and returns immediately if 381 * Chain calls chars_in_buffer() and returns immediately if
379 * there is no buffered data otherwise sleeps on a wait queue 382 * there is no buffered data otherwise sleeps on a wait queue
@@ -399,6 +402,9 @@ static void hvc_hangup(struct tty_struct *tty)
399 if (!hp) 402 if (!hp)
400 return; 403 return;
401 404
405 /* cancel pending tty resize work */
406 cancel_work_sync(&hp->tty_resize);
407
402 spin_lock_irqsave(&hp->lock, flags); 408 spin_lock_irqsave(&hp->lock, flags);
403 409
404 /* 410 /*
@@ -418,8 +424,8 @@ static void hvc_hangup(struct tty_struct *tty)
418 424
419 spin_unlock_irqrestore(&hp->lock, flags); 425 spin_unlock_irqrestore(&hp->lock, flags);
420 426
421 if (hp->ops->notifier_del) 427 if (hp->ops->notifier_hangup)
422 hp->ops->notifier_del(hp, hp->data); 428 hp->ops->notifier_hangup(hp, hp->data);
423 429
424 while(temp_open_count) { 430 while(temp_open_count) {
425 --temp_open_count; 431 --temp_open_count;
@@ -431,7 +437,7 @@ static void hvc_hangup(struct tty_struct *tty)
431 * Push buffered characters whether they were just recently buffered or waiting 437 * Push buffered characters whether they were just recently buffered or waiting
432 * on a blocked hypervisor. Call this function with hp->lock held. 438 * on a blocked hypervisor. Call this function with hp->lock held.
433 */ 439 */
434static void hvc_push(struct hvc_struct *hp) 440static int hvc_push(struct hvc_struct *hp)
435{ 441{
436 int n; 442 int n;
437 443
@@ -439,7 +445,7 @@ static void hvc_push(struct hvc_struct *hp)
439 if (n <= 0) { 445 if (n <= 0) {
440 if (n == 0) { 446 if (n == 0) {
441 hp->do_wakeup = 1; 447 hp->do_wakeup = 1;
442 return; 448 return 0;
443 } 449 }
444 /* throw away output on error; this happens when 450 /* throw away output on error; this happens when
445 there is no session connected to the vterm. */ 451 there is no session connected to the vterm. */
@@ -450,6 +456,8 @@ static void hvc_push(struct hvc_struct *hp)
450 memmove(hp->outbuf, hp->outbuf + n, hp->n_outbuf); 456 memmove(hp->outbuf, hp->outbuf + n, hp->n_outbuf);
451 else 457 else
452 hp->do_wakeup = 1; 458 hp->do_wakeup = 1;
459
460 return n;
453} 461}
454 462
455static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count) 463static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count)
@@ -492,6 +500,39 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count
492 return written; 500 return written;
493} 501}
494 502
503/**
504 * hvc_set_winsz() - Resize the hvc tty terminal window.
505 * @work: work structure.
506 *
507 * The routine shall not be called within an atomic context because it
508 * might sleep.
509 *
510 * Locking: hp->lock
511 */
512static void hvc_set_winsz(struct work_struct *work)
513{
514 struct hvc_struct *hp;
515 unsigned long hvc_flags;
516 struct tty_struct *tty;
517 struct winsize ws;
518
519 hp = container_of(work, struct hvc_struct, tty_resize);
520 if (!hp)
521 return;
522
523 spin_lock_irqsave(&hp->lock, hvc_flags);
524 if (!hp->tty) {
525 spin_unlock_irqrestore(&hp->lock, hvc_flags);
526 return;
527 }
528 ws = hp->ws;
529 tty = tty_kref_get(hp->tty);
530 spin_unlock_irqrestore(&hp->lock, hvc_flags);
531
532 tty_do_resize(tty, tty, &ws);
533 tty_kref_put(tty);
534}
535
495/* 536/*
496 * This is actually a contract between the driver and the tty layer outlining 537 * This is actually a contract between the driver and the tty layer outlining
497 * how much write room the driver can guarantee will be sent OR BUFFERED. This 538 * how much write room the driver can guarantee will be sent OR BUFFERED. This
@@ -538,16 +579,20 @@ int hvc_poll(struct hvc_struct *hp)
538 char buf[N_INBUF] __ALIGNED__; 579 char buf[N_INBUF] __ALIGNED__;
539 unsigned long flags; 580 unsigned long flags;
540 int read_total = 0; 581 int read_total = 0;
582 int written_total = 0;
541 583
542 spin_lock_irqsave(&hp->lock, flags); 584 spin_lock_irqsave(&hp->lock, flags);
543 585
544 /* Push pending writes */ 586 /* Push pending writes */
545 if (hp->n_outbuf > 0) 587 if (hp->n_outbuf > 0)
546 hvc_push(hp); 588 written_total = hvc_push(hp);
547 589
548 /* Reschedule us if still some write pending */ 590 /* Reschedule us if still some write pending */
549 if (hp->n_outbuf > 0) 591 if (hp->n_outbuf > 0) {
550 poll_mask |= HVC_POLL_WRITE; 592 poll_mask |= HVC_POLL_WRITE;
593 /* If hvc_push() was not able to write, sleep a few msecs */
594 timeout = (written_total) ? 0 : MIN_TIMEOUT;
595 }
551 596
552 /* No tty attached, just skip */ 597 /* No tty attached, just skip */
553 tty = hp->tty; 598 tty = hp->tty;
@@ -632,6 +677,24 @@ int hvc_poll(struct hvc_struct *hp)
632} 677}
633EXPORT_SYMBOL_GPL(hvc_poll); 678EXPORT_SYMBOL_GPL(hvc_poll);
634 679
680/**
681 * hvc_resize() - Update terminal window size information.
682 * @hp: HVC console pointer
683 * @ws: Terminal window size structure
684 *
685 * Stores the specified window size information in the hvc structure of @hp.
686 * The function schedule the tty resize update.
687 *
688 * Locking: Locking free; the function MUST be called holding hp->lock
689 */
690void hvc_resize(struct hvc_struct *hp, struct winsize ws)
691{
692 if ((hp->ws.ws_row != ws.ws_row) || (hp->ws.ws_col != ws.ws_col)) {
693 hp->ws = ws;
694 schedule_work(&hp->tty_resize);
695 }
696}
697
635/* 698/*
636 * This kthread is either polling or interrupt driven. This is determined by 699 * This kthread is either polling or interrupt driven. This is determined by
637 * calling hvc_poll() who determines whether a console adapter support 700 * calling hvc_poll() who determines whether a console adapter support
@@ -659,10 +722,6 @@ static int khvcd(void *unused)
659 poll_mask |= HVC_POLL_READ; 722 poll_mask |= HVC_POLL_READ;
660 if (hvc_kicked) 723 if (hvc_kicked)
661 continue; 724 continue;
662 if (poll_mask & HVC_POLL_WRITE) {
663 yield();
664 continue;
665 }
666 set_current_state(TASK_INTERRUPTIBLE); 725 set_current_state(TASK_INTERRUPTIBLE);
667 if (!hvc_kicked) { 726 if (!hvc_kicked) {
668 if (poll_mask == 0) 727 if (poll_mask == 0)
@@ -718,6 +777,7 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
718 777
719 kref_init(&hp->kref); 778 kref_init(&hp->kref);
720 779
780 INIT_WORK(&hp->tty_resize, hvc_set_winsz);
721 spin_lock_init(&hp->lock); 781 spin_lock_init(&hp->lock);
722 spin_lock(&hvc_structs_lock); 782 spin_lock(&hvc_structs_lock);
723 783
@@ -743,7 +803,7 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
743} 803}
744EXPORT_SYMBOL_GPL(hvc_alloc); 804EXPORT_SYMBOL_GPL(hvc_alloc);
745 805
746int __devexit hvc_remove(struct hvc_struct *hp) 806int hvc_remove(struct hvc_struct *hp)
747{ 807{
748 unsigned long flags; 808 unsigned long flags;
749 struct tty_struct *tty; 809 struct tty_struct *tty;
@@ -796,7 +856,7 @@ static int hvc_init(void)
796 drv->minor_start = HVC_MINOR; 856 drv->minor_start = HVC_MINOR;
797 drv->type = TTY_DRIVER_TYPE_SYSTEM; 857 drv->type = TTY_DRIVER_TYPE_SYSTEM;
798 drv->init_termios = tty_std_termios; 858 drv->init_termios = tty_std_termios;
799 drv->flags = TTY_DRIVER_REAL_RAW; 859 drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
800 tty_set_operations(drv, &hvc_ops); 860 tty_set_operations(drv, &hvc_ops);
801 861
802 /* Always start the kthread because there can be hotplug vty adapters 862 /* Always start the kthread because there can be hotplug vty adapters
diff --git a/drivers/char/hvc_console.h b/drivers/char/hvc_console.h
index 9790201718ae..8297dbc2e6ec 100644
--- a/drivers/char/hvc_console.h
+++ b/drivers/char/hvc_console.h
@@ -27,6 +27,7 @@
27#ifndef HVC_CONSOLE_H 27#ifndef HVC_CONSOLE_H
28#define HVC_CONSOLE_H 28#define HVC_CONSOLE_H
29#include <linux/kref.h> 29#include <linux/kref.h>
30#include <linux/tty.h>
30 31
31/* 32/*
32 * This is the max number of console adapters that can/will be found as 33 * This is the max number of console adapters that can/will be found as
@@ -56,6 +57,8 @@ struct hvc_struct {
56 struct hv_ops *ops; 57 struct hv_ops *ops;
57 int irq_requested; 58 int irq_requested;
58 int data; 59 int data;
60 struct winsize ws;
61 struct work_struct tty_resize;
59 struct list_head next; 62 struct list_head next;
60 struct kref kref; /* ref count & hvc_struct lifetime */ 63 struct kref kref; /* ref count & hvc_struct lifetime */
61}; 64};
@@ -65,9 +68,10 @@ struct hv_ops {
65 int (*get_chars)(uint32_t vtermno, char *buf, int count); 68 int (*get_chars)(uint32_t vtermno, char *buf, int count);
66 int (*put_chars)(uint32_t vtermno, const char *buf, int count); 69 int (*put_chars)(uint32_t vtermno, const char *buf, int count);
67 70
68 /* Callbacks for notification. Called in open and close */ 71 /* Callbacks for notification. Called in open, close and hangup */
69 int (*notifier_add)(struct hvc_struct *hp, int irq); 72 int (*notifier_add)(struct hvc_struct *hp, int irq);
70 void (*notifier_del)(struct hvc_struct *hp, int irq); 73 void (*notifier_del)(struct hvc_struct *hp, int irq);
74 void (*notifier_hangup)(struct hvc_struct *hp, int irq);
71}; 75};
72 76
73/* Register a vterm and a slot index for use as a console (console_init) */ 77/* Register a vterm and a slot index for use as a console (console_init) */
@@ -77,15 +81,19 @@ extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);
77extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int data, 81extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int data,
78 struct hv_ops *ops, int outbuf_size); 82 struct hv_ops *ops, int outbuf_size);
79/* remove a vterm from hvc tty operation (module_exit or hotplug remove) */ 83/* remove a vterm from hvc tty operation (module_exit or hotplug remove) */
80extern int __devexit hvc_remove(struct hvc_struct *hp); 84extern int hvc_remove(struct hvc_struct *hp);
81 85
82/* data available */ 86/* data available */
83int hvc_poll(struct hvc_struct *hp); 87int hvc_poll(struct hvc_struct *hp);
84void hvc_kick(void); 88void hvc_kick(void);
85 89
90/* Resize hvc tty terminal window */
91extern void hvc_resize(struct hvc_struct *hp, struct winsize ws);
92
86/* default notifier for irq based notification */ 93/* default notifier for irq based notification */
87extern int notifier_add_irq(struct hvc_struct *hp, int data); 94extern int notifier_add_irq(struct hvc_struct *hp, int data);
88extern void notifier_del_irq(struct hvc_struct *hp, int data); 95extern void notifier_del_irq(struct hvc_struct *hp, int data);
96extern void notifier_hangup_irq(struct hvc_struct *hp, int data);
89 97
90 98
91#if defined(CONFIG_XMON) && defined(CONFIG_SMP) 99#if defined(CONFIG_XMON) && defined(CONFIG_SMP)
diff --git a/drivers/char/hvc_irq.c b/drivers/char/hvc_irq.c
index 73a59cdb8947..d09e5688d449 100644
--- a/drivers/char/hvc_irq.c
+++ b/drivers/char/hvc_irq.c
@@ -42,3 +42,8 @@ void notifier_del_irq(struct hvc_struct *hp, int irq)
42 free_irq(irq, hp); 42 free_irq(irq, hp);
43 hp->irq_requested = 0; 43 hp->irq_requested = 0;
44} 44}
45
46void notifier_hangup_irq(struct hvc_struct *hp, int irq)
47{
48 notifier_del_irq(hp, irq);
49}
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c
index b71c610fe5ae..b74a2f8ab908 100644
--- a/drivers/char/hvc_iseries.c
+++ b/drivers/char/hvc_iseries.c
@@ -202,6 +202,7 @@ static struct hv_ops hvc_get_put_ops = {
202 .put_chars = put_chars, 202 .put_chars = put_chars,
203 .notifier_add = notifier_add_irq, 203 .notifier_add = notifier_add_irq,
204 .notifier_del = notifier_del_irq, 204 .notifier_del = notifier_del_irq,
205 .notifier_hangup = notifier_hangup_irq,
205}; 206};
206 207
207static int __devinit hvc_vio_probe(struct vio_dev *vdev, 208static int __devinit hvc_vio_probe(struct vio_dev *vdev,
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index 93f3840c1682..019e0b58593d 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -82,6 +82,7 @@ static struct hv_ops hvc_get_put_ops = {
82 .put_chars = hvc_put_chars, 82 .put_chars = hvc_put_chars,
83 .notifier_add = notifier_add_irq, 83 .notifier_add = notifier_add_irq,
84 .notifier_del = notifier_del_irq, 84 .notifier_del = notifier_del_irq,
85 .notifier_hangup = notifier_hangup_irq,
85}; 86};
86 87
87static int __devinit hvc_vio_probe(struct vio_dev *vdev, 88static int __devinit hvc_vio_probe(struct vio_dev *vdev,
diff --git a/drivers/char/hvc_xen.c b/drivers/char/hvc_xen.c
index 538ceea5e7df..eba999f8598d 100644
--- a/drivers/char/hvc_xen.c
+++ b/drivers/char/hvc_xen.c
@@ -102,6 +102,7 @@ static struct hv_ops hvc_ops = {
102 .put_chars = write_console, 102 .put_chars = write_console,
103 .notifier_add = notifier_add_irq, 103 .notifier_add = notifier_add_irq,
104 .notifier_del = notifier_del_irq, 104 .notifier_del = notifier_del_irq,
105 .notifier_hangup = notifier_hangup_irq,
105}; 106};
106 107
107static int __init xen_init(void) 108static int __init xen_init(void)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index d0f4eb6fdb7f..3fb0d2c88ba5 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -198,6 +198,7 @@ static int __devinit virtcons_probe(struct virtio_device *dev)
198 virtio_cons.put_chars = put_chars; 198 virtio_cons.put_chars = put_chars;
199 virtio_cons.notifier_add = notifier_add_vio; 199 virtio_cons.notifier_add = notifier_add_vio;
200 virtio_cons.notifier_del = notifier_del_vio; 200 virtio_cons.notifier_del = notifier_del_vio;
201 virtio_cons.notifier_hangup = notifier_del_vio;
201 202
202 /* The first argument of hvc_alloc() is the virtual console number, so 203 /* The first argument of hvc_alloc() is the virtual console number, so
203 * we use zero. The second argument is the parameter for the 204 * we use zero. The second argument is the parameter for the
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 8164de1f4d72..228f75723063 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -423,7 +423,6 @@ static const struct i2c_adapter cpm_ops = {
423 .owner = THIS_MODULE, 423 .owner = THIS_MODULE,
424 .name = "i2c-cpm", 424 .name = "i2c-cpm",
425 .algo = &cpm_i2c_algo, 425 .algo = &cpm_i2c_algo,
426 .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
427}; 426};
428 427
429static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) 428static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index 08e18bcb970f..45dd9bdc5d62 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -2,6 +2,7 @@
2 * Driver for the MPC5200 Fast Ethernet Controller - MDIO bus driver 2 * Driver for the MPC5200 Fast Ethernet Controller - MDIO bus driver
3 * 3 *
4 * Copyright (C) 2007 Domen Puncer, Telargo, Inc. 4 * Copyright (C) 2007 Domen Puncer, Telargo, Inc.
5 * Copyright (C) 2008 Wolfram Sang, Pengutronix
5 * 6 *
6 * This file is licensed under the terms of the GNU General Public License 7 * 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 * version 2. This program is licensed "as is" without any warranty of any
@@ -21,58 +22,45 @@ struct mpc52xx_fec_mdio_priv {
21 struct mpc52xx_fec __iomem *regs; 22 struct mpc52xx_fec __iomem *regs;
22}; 23};
23 24
24static int mpc52xx_fec_mdio_read(struct mii_bus *bus, int phy_id, int reg) 25static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int phy_id,
26 int reg, u32 value)
25{ 27{
26 struct mpc52xx_fec_mdio_priv *priv = bus->priv; 28 struct mpc52xx_fec_mdio_priv *priv = bus->priv;
27 struct mpc52xx_fec __iomem *fec; 29 struct mpc52xx_fec __iomem *fec;
28 int tries = 100; 30 int tries = 100;
29 u32 request = FEC_MII_READ_FRAME; 31
32 value |= (phy_id << FEC_MII_DATA_PA_SHIFT) & FEC_MII_DATA_PA_MSK;
33 value |= (reg << FEC_MII_DATA_RA_SHIFT) & FEC_MII_DATA_RA_MSK;
30 34
31 fec = priv->regs; 35 fec = priv->regs;
32 out_be32(&fec->ievent, FEC_IEVENT_MII); 36 out_be32(&fec->ievent, FEC_IEVENT_MII);
33 37 out_be32(&priv->regs->mii_data, value);
34 request |= (phy_id << FEC_MII_DATA_PA_SHIFT) & FEC_MII_DATA_PA_MSK;
35 request |= (reg << FEC_MII_DATA_RA_SHIFT) & FEC_MII_DATA_RA_MSK;
36
37 out_be32(&priv->regs->mii_data, request);
38 38
39 /* wait for it to finish, this takes about 23 us on lite5200b */ 39 /* wait for it to finish, this takes about 23 us on lite5200b */
40 while (!(in_be32(&fec->ievent) & FEC_IEVENT_MII) && --tries) 40 while (!(in_be32(&fec->ievent) & FEC_IEVENT_MII) && --tries)
41 udelay(5); 41 udelay(5);
42 42
43 if (tries == 0) 43 if (!tries)
44 return -ETIMEDOUT; 44 return -ETIMEDOUT;
45 45
46 return in_be32(&priv->regs->mii_data) & FEC_MII_DATA_DATAMSK; 46 return value & FEC_MII_DATA_OP_RD ?
47 in_be32(&priv->regs->mii_data) & FEC_MII_DATA_DATAMSK : 0;
47} 48}
48 49
49static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 data) 50static int mpc52xx_fec_mdio_read(struct mii_bus *bus, int phy_id, int reg)
50{ 51{
51 struct mpc52xx_fec_mdio_priv *priv = bus->priv; 52 return mpc52xx_fec_mdio_transfer(bus, phy_id, reg, FEC_MII_READ_FRAME);
52 struct mpc52xx_fec __iomem *fec; 53}
53 u32 value = data;
54 int tries = 100;
55
56 fec = priv->regs;
57 out_be32(&fec->ievent, FEC_IEVENT_MII);
58
59 value |= FEC_MII_WRITE_FRAME;
60 value |= (phy_id << FEC_MII_DATA_PA_SHIFT) & FEC_MII_DATA_PA_MSK;
61 value |= (reg << FEC_MII_DATA_RA_SHIFT) & FEC_MII_DATA_RA_MSK;
62
63 out_be32(&priv->regs->mii_data, value);
64
65 /* wait for request to finish */
66 while (!(in_be32(&fec->ievent) & FEC_IEVENT_MII) && --tries)
67 udelay(5);
68
69 if (tries == 0)
70 return -ETIMEDOUT;
71 54
72 return 0; 55static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg,
56 u16 data)
57{
58 return mpc52xx_fec_mdio_transfer(bus, phy_id, reg,
59 data | FEC_MII_WRITE_FRAME);
73} 60}
74 61
75static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_id *match) 62static int mpc52xx_fec_mdio_probe(struct of_device *of,
63 const struct of_device_id *match)
76{ 64{
77 struct device *dev = &of->dev; 65 struct device *dev = &of->dev;
78 struct device_node *np = of->node; 66 struct device_node *np = of->node;
@@ -131,7 +119,8 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_i
131 dev_set_drvdata(dev, bus); 119 dev_set_drvdata(dev, bus);
132 120
133 /* set MII speed */ 121 /* set MII speed */
134 out_be32(&priv->regs->mii_speed, ((mpc52xx_find_ipb_freq(of->node) >> 20) / 5) << 1); 122 out_be32(&priv->regs->mii_speed,
123 ((mpc52xx_find_ipb_freq(of->node) >> 20) / 5) << 1);
135 124
136 /* enable MII interrupt */ 125 /* enable MII interrupt */
137 out_be32(&priv->regs->imask, in_be32(&priv->regs->imask) | FEC_IMASK_MII); 126 out_be32(&priv->regs->imask, in_be32(&priv->regs->imask) | FEC_IMASK_MII);
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index efcf21c9f5c7..2ee2622258f5 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2604,8 +2604,16 @@ static int __devinit emac_init_config(struct emac_instance *dev)
2604 if (of_device_is_compatible(np, "ibm,emac-440ep") || 2604 if (of_device_is_compatible(np, "ibm,emac-440ep") ||
2605 of_device_is_compatible(np, "ibm,emac-440gr")) 2605 of_device_is_compatible(np, "ibm,emac-440gr"))
2606 dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; 2606 dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX;
2607 if (of_device_is_compatible(np, "ibm,emac-405ez")) 2607 if (of_device_is_compatible(np, "ibm,emac-405ez")) {
2608#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL
2608 dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; 2609 dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
2610#else
2611 printk(KERN_ERR "%s: Flow control not disabled!\n",
2612 np->full_name);
2613 return -ENXIO;
2614#endif
2615 }
2616
2609 } 2617 }
2610 2618
2611 /* Fixup some feature bits based on the device tree */ 2619 /* Fixup some feature bits based on the device tree */
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c
index 1839d3f154a3..ecf9798987fa 100644
--- a/drivers/net/ibm_newemac/mal.c
+++ b/drivers/net/ibm_newemac/mal.c
@@ -280,9 +280,11 @@ static irqreturn_t mal_txeob(int irq, void *dev_instance)
280 mal_schedule_poll(mal); 280 mal_schedule_poll(mal);
281 set_mal_dcrn(mal, MAL_TXEOBISR, r); 281 set_mal_dcrn(mal, MAL_TXEOBISR, r);
282 282
283#ifdef CONFIG_PPC_DCR_NATIVE
283 if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) 284 if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT))
284 mtdcri(SDR0, DCRN_SDR_ICINTSTAT, 285 mtdcri(SDR0, DCRN_SDR_ICINTSTAT,
285 (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICTX)); 286 (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICTX));
287#endif
286 288
287 return IRQ_HANDLED; 289 return IRQ_HANDLED;
288} 290}
@@ -298,9 +300,11 @@ static irqreturn_t mal_rxeob(int irq, void *dev_instance)
298 mal_schedule_poll(mal); 300 mal_schedule_poll(mal);
299 set_mal_dcrn(mal, MAL_RXEOBISR, r); 301 set_mal_dcrn(mal, MAL_RXEOBISR, r);
300 302
303#ifdef CONFIG_PPC_DCR_NATIVE
301 if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT)) 304 if (mal_has_feature(mal, MAL_FTR_CLEAR_ICINTSTAT))
302 mtdcri(SDR0, DCRN_SDR_ICINTSTAT, 305 mtdcri(SDR0, DCRN_SDR_ICINTSTAT,
303 (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICRX)); 306 (mfdcri(SDR0, DCRN_SDR_ICINTSTAT) | ICINTSTAT_ICRX));
307#endif
304 308
305 return IRQ_HANDLED; 309 return IRQ_HANDLED;
306} 310}
@@ -572,9 +576,18 @@ static int __devinit mal_probe(struct of_device *ofdev,
572 goto fail; 576 goto fail;
573 } 577 }
574 578
575 if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) 579 if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) {
580#if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \
581 defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR)
576 mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | 582 mal->features |= (MAL_FTR_CLEAR_ICINTSTAT |
577 MAL_FTR_COMMON_ERR_INT); 583 MAL_FTR_COMMON_ERR_INT);
584#else
585 printk(KERN_ERR "%s: Support for 405EZ not enabled!\n",
586 ofdev->node->full_name);
587 err = -ENODEV;
588 goto fail;
589#endif
590 }
578 591
579 mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); 592 mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0);
580 mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); 593 mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1);
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 6a98dc8aa30b..24bbef777c19 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -41,7 +41,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
41 41
42 info.addr = *addr; 42 info.addr = *addr;
43 43
44 request_module(info.type); 44 request_module("%s", info.type);
45 45
46 result = i2c_new_device(adap, &info); 46 result = i2c_new_device(adap, &info);
47 if (result == NULL) { 47 if (result == NULL) {
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c
index b01eec026f68..bed0ed6dcdc1 100644
--- a/drivers/of/of_spi.c
+++ b/drivers/of/of_spi.c
@@ -61,6 +61,8 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
61 spi->mode |= SPI_CPHA; 61 spi->mode |= SPI_CPHA;
62 if (of_find_property(nc, "spi-cpol", NULL)) 62 if (of_find_property(nc, "spi-cpol", NULL))
63 spi->mode |= SPI_CPOL; 63 spi->mode |= SPI_CPOL;
64 if (of_find_property(nc, "spi-cs-high", NULL))
65 spi->mode |= SPI_CS_HIGH;
64 66
65 /* Device speed */ 67 /* Device speed */
66 prop = of_get_property(nc, "spi-max-frequency", &len); 68 prop = of_get_property(nc, "spi-max-frequency", &len);
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index ed982273fb8b..37681700b61a 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -628,3 +628,27 @@ void sync_buffer(int cpu)
628 628
629 mutex_unlock(&buffer_mutex); 629 mutex_unlock(&buffer_mutex);
630} 630}
631
632/* The function can be used to add a buffer worth of data directly to
633 * the kernel buffer. The buffer is assumed to be a circular buffer.
634 * Take the entries from index start and end at index end, wrapping
635 * at max_entries.
636 */
637void oprofile_put_buff(unsigned long *buf, unsigned int start,
638 unsigned int stop, unsigned int max)
639{
640 int i;
641
642 i = start;
643
644 mutex_lock(&buffer_mutex);
645 while (i != stop) {
646 add_event_entry(buf[i++]);
647
648 if (i >= max)
649 i = 0;
650 }
651
652 mutex_unlock(&buffer_mutex);
653}
654
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index e1bd5a937f6c..7ba39fe20a8a 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -38,13 +38,26 @@ static int work_enabled;
38void free_cpu_buffers(void) 38void free_cpu_buffers(void)
39{ 39{
40 int i; 40 int i;
41 41
42 for_each_online_cpu(i) { 42 for_each_online_cpu(i) {
43 vfree(per_cpu(cpu_buffer, i).buffer); 43 vfree(per_cpu(cpu_buffer, i).buffer);
44 per_cpu(cpu_buffer, i).buffer = NULL; 44 per_cpu(cpu_buffer, i).buffer = NULL;
45 } 45 }
46} 46}
47 47
48unsigned long oprofile_get_cpu_buffer_size(void)
49{
50 return fs_cpu_buffer_size;
51}
52
53void oprofile_cpu_buffer_inc_smpl_lost(void)
54{
55 struct oprofile_cpu_buffer *cpu_buf
56 = &__get_cpu_var(cpu_buffer);
57
58 cpu_buf->sample_lost_overflow++;
59}
60
48int alloc_cpu_buffers(void) 61int alloc_cpu_buffers(void)
49{ 62{
50 int i; 63 int i;
diff --git a/drivers/oprofile/event_buffer.h b/drivers/oprofile/event_buffer.h
index 5076ed1ebd8f..84bf324c5771 100644
--- a/drivers/oprofile/event_buffer.h
+++ b/drivers/oprofile/event_buffer.h
@@ -17,6 +17,13 @@ int alloc_event_buffer(void);
17 17
18void free_event_buffer(void); 18void free_event_buffer(void);
19 19
20/**
21 * Add data to the event buffer.
22 * The data passed is free-form, but typically consists of
23 * file offsets, dcookies, context information, and ESCAPE codes.
24 */
25void add_event_entry(unsigned long data);
26
20/* wake up the process sleeping on the event file */ 27/* wake up the process sleeping on the event file */
21void wake_up_buffer_waiter(void); 28void wake_up_buffer_waiter(void);
22 29
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index bcb8f725427c..5231861f357d 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -86,13 +86,6 @@ int oprofile_arch_init(struct oprofile_operations * ops);
86void oprofile_arch_exit(void); 86void oprofile_arch_exit(void);
87 87
88/** 88/**
89 * Add data to the event buffer.
90 * The data passed is free-form, but typically consists of
91 * file offsets, dcookies, context information, and ESCAPE codes.
92 */
93void add_event_entry(unsigned long data);
94
95/**
96 * Add a sample. This may be called from any context. Pass 89 * Add a sample. This may be called from any context. Pass
97 * smp_processor_id() as cpu. 90 * smp_processor_id() as cpu.
98 */ 91 */
@@ -162,5 +155,14 @@ int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, siz
162 155
163/** lock for read/write safety */ 156/** lock for read/write safety */
164extern spinlock_t oprofilefs_lock; 157extern spinlock_t oprofilefs_lock;
158
159/**
160 * Add the contents of a circular buffer to the event buffer.
161 */
162void oprofile_put_buff(unsigned long *buf, unsigned int start,
163 unsigned int stop, unsigned int max);
164
165unsigned long oprofile_get_cpu_buffer_size(void);
166void oprofile_cpu_buffer_inc_smpl_lost(void);
165 167
166#endif /* OPROFILE_H */ 168#endif /* OPROFILE_H */