aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:52:26 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:52:26 -0400
commitccaa36f73544163ef6e15eb29a620130755f6001 (patch)
treeb5cf50592c45e25edbd66fea451e6941e455fa83 /arch/powerpc
parentb4a9071af62f95dc6d22040a0b37ac7225ce4d54 (diff)
parent5e980823581682d1566e7b5089cf827ddd5f3c94 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits) [POWERPC] Fix rheap alignment problem [POWERPC] Use check_legacy_ioport() for ISAPnP [POWERPC] Avoid NULL pointer in gpio1_interrupt [POWERPC] Enable generic rtc hook for the MPC8349 mITX [POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot [POWERPC] fix spin lock nesting in hvc_iseries [POWERPC] EEH failure to mark pci slot as frozen. [POWERPC] update powerpc defconfig files after libata kconfig breakage [POWERPC] enable sysrq in pmac32_defconfig [POWERPC] UPIO_TSI cleanup [POWERPC] rewrite mkprep and mkbugboot in sane C [POWERPC] maple/pci iomem annotations [POWERPC] powerpc oprofile __user annotations [POWERPC] cell spufs iomem annotations [POWERPC] NULL noise removal: spufs [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c [POWERPC] update mpc8349_itx_defconfig and remove some debug settings [POWERPC] Always call cede in pseries dedicated idle loop [POWERPC] Fix loop logic in irq_alloc_virt() ...
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Makefile6
-rw-r--r--arch/powerpc/boot/Makefile224
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts302
-rwxr-xr-xarch/powerpc/boot/wrapper204
-rw-r--r--arch/powerpc/boot/zImage.coff.lds.S (renamed from arch/powerpc/boot/zImage.coff.lds)0
-rw-r--r--arch/powerpc/boot/zImage.lds.S (renamed from arch/powerpc/boot/zImage.lds)0
-rw-r--r--arch/powerpc/configs/chrp32_defconfig2
-rw-r--r--arch/powerpc/configs/g5_defconfig28
-rw-r--r--arch/powerpc/configs/iseries_defconfig2
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig28
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig53
-rw-r--r--arch/powerpc/configs/mpc8560_ads_defconfig854
-rw-r--r--arch/powerpc/configs/pmac32_defconfig4
-rw-r--r--arch/powerpc/configs/ppc64_defconfig28
-rw-r--r--arch/powerpc/configs/pseries_defconfig2
-rw-r--r--arch/powerpc/kernel/irq.c19
-rw-r--r--arch/powerpc/kernel/ptrace.c13
-rw-r--r--arch/powerpc/kernel/sysfs.c4
-rw-r--r--arch/powerpc/kernel/time.c42
-rw-r--r--arch/powerpc/lib/Makefile6
-rw-r--r--arch/powerpc/lib/rheap.c24
-rw-r--r--arch/powerpc/math-emu/Makefile3
-rw-r--r--arch/powerpc/oprofile/backtrace.c11
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c4
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig21
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c120
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.h61
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c2
-rw-r--r--arch/powerpc/platforms/cell/spufs/hw_ops.c4
-rw-r--r--arch/powerpc/platforms/maple/pci.c60
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c7
-rw-r--r--arch/powerpc/platforms/pseries/setup.c24
-rw-r--r--arch/powerpc/sysdev/Makefile5
-rw-r--r--arch/powerpc/sysdev/cpm2_common.c309
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.c256
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.h10
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c281
-rw-r--r--arch/powerpc/sysdev/fsl_soc.h2
40 files changed, 2731 insertions, 299 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 01667d1d571d..a00fe7236555 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -20,6 +20,7 @@ CROSS32_COMPILE ?=
20CROSS32CC := $(CROSS32_COMPILE)gcc 20CROSS32CC := $(CROSS32_COMPILE)gcc
21CROSS32AS := $(CROSS32_COMPILE)as 21CROSS32AS := $(CROSS32_COMPILE)as
22CROSS32LD := $(CROSS32_COMPILE)ld 22CROSS32LD := $(CROSS32_COMPILE)ld
23CROSS32AR := $(CROSS32_COMPILE)ar
23CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy 24CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy
24 25
25ifeq ($(HAS_BIARCH),y) 26ifeq ($(HAS_BIARCH),y)
@@ -28,10 +29,11 @@ CROSS32CC := $(CC) -m32
28CROSS32AS := $(AS) -a32 29CROSS32AS := $(AS) -a32
29CROSS32LD := $(LD) -m elf32ppc 30CROSS32LD := $(LD) -m elf32ppc
30CROSS32OBJCOPY := $(OBJCOPY) 31CROSS32OBJCOPY := $(OBJCOPY)
32CROSS32AR := $(AR)
31endif 33endif
32endif 34endif
33 35
34export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY 36export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY
35 37
36KBUILD_DEFCONFIG := $(shell uname -m)_defconfig 38KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
37 39
@@ -146,7 +148,7 @@ all: $(KBUILD_IMAGE)
146 148
147CPPFLAGS_vmlinux.lds := -Upowerpc 149CPPFLAGS_vmlinux.lds := -Upowerpc
148 150
149BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin 151BOOT_TARGETS = zImage zImage.initrd uImage
150 152
151PHONY += $(BOOT_TARGETS) 153PHONY += $(BOOT_TARGETS)
152 154
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index e73774136b55..c383d56bbe18 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -20,33 +20,34 @@
20# CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE 20# CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE
21# in the toplevel makefile. 21# in the toplevel makefile.
22 22
23all: $(obj)/zImage
23 24
24HOSTCC := gcc 25HOSTCC := gcc
25BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ 26BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \
26 $(shell $(CROSS32CC) -print-file-name=include) -fPIC 27 $(shell $(CROSS32CC) -print-file-name=include) -fPIC
27BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc 28BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
28OBJCOPYFLAGS := contents,alloc,load,readonly,data 29
29OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000 30ifeq ($(call cc-option-yn, -fstack-protector),y)
30OBJCOPY_MIB_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment 31BOOTCFLAGS += -fno-stack-protector
32endif
33
34BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
31 35
32zlib := inffast.c inflate.c inftrees.c 36zlib := inffast.c inflate.c inftrees.c
33zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h 37zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
34zliblinuxheader := zlib.h zconf.h zutil.h 38zliblinuxheader := zlib.h zconf.h zutil.h
35 39
36$(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) 40$(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \
37#$(addprefix $(obj)/,main.o): $(addprefix $(obj)/,zlib.h) 41 $(addprefix $(obj)/,$(zlibheader))
42
43src-wlib := string.S stdio.c main.c div64.S $(zlib)
44src-plat := of.c
45src-boot := crt0.S $(src-wlib) $(src-plat) empty.c
38 46
39src-boot-$(CONFIG_PPC_MULTIPLATFORM) := of.c
40src-boot := crt0.S string.S stdio.c main.c div64.S $(src-boot-y)
41src-boot += $(zlib)
42src-boot := $(addprefix $(obj)/, $(src-boot)) 47src-boot := $(addprefix $(obj)/, $(src-boot))
43obj-boot := $(addsuffix .o, $(basename $(src-boot))) 48obj-boot := $(addsuffix .o, $(basename $(src-boot)))
44 49obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib))))
45ifeq ($(call cc-option-yn, -fstack-protector),y) 50obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat))))
46BOOTCFLAGS += -fno-stack-protector
47endif
48
49BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
50 51
51quiet_cmd_copy_zlib = COPY $@ 52quiet_cmd_copy_zlib = COPY $@
52 cmd_copy_zlib = sed "s@__attribute_used__@@;s@<linux/\([^>]\+\).*@\"\1\"@" $< > $@ 53 cmd_copy_zlib = sed "s@__attribute_used__@@;s@<linux/\([^>]\+\).*@\"\1\"@" $< > $@
@@ -66,8 +67,14 @@ $(addprefix $(obj)/,$(zlibheader)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
66$(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/%: $(srctree)/include/linux/% 67$(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/%: $(srctree)/include/linux/%
67 $(call cmd,copy_zliblinuxheader) 68 $(call cmd,copy_zliblinuxheader)
68 69
69clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) 70$(obj)/empty.c:
71 @touch $@
72
73$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S
74 @cp $< $@
70 75
76clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
77 $(obj)/empty.c
71 78
72quiet_cmd_bootcc = BOOTCC $@ 79quiet_cmd_bootcc = BOOTCC $@
73 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 80 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -75,146 +82,97 @@ quiet_cmd_bootcc = BOOTCC $@
75quiet_cmd_bootas = BOOTAS $@ 82quiet_cmd_bootas = BOOTAS $@
76 cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< 83 cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
77 84
78quiet_cmd_bootld = BOOTLD $@ 85quiet_cmd_bootar = BOOTAR $@
79 cmd_bootld = $(CROSS32LD) -T $(srctree)/$(src)/$(3) -o $@ $(2) 86 cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $^; mv $@.$$$$ $@
80 87
81$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c 88$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c
82 $(call if_changed_dep,bootcc) 89 $(call if_changed_dep,bootcc)
83$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S 90$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S
84 $(call if_changed_dep,bootas) 91 $(call if_changed_dep,bootas)
85 92
86#----------------------------------------------------------- 93$(obj)/wrapper.a: $(obj-wlib)
87# ELF sections within the zImage bootloader/wrapper 94 $(call cmd,bootar)
88#-----------------------------------------------------------
89required := vmlinux.strip
90initrd := initrd
91 95
92obj-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.o, $(section))) 96hostprogs-y := addnote addRamDisk hack-coff
93src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section)))
94gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section)))
95 97
96hostprogs-y := addnote addRamDisk hack-coff 98extra-y := $(obj)/crt0.o $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
99 $(obj)/zImage.lds $(obj)/zImage.coff.lds
97 100
98targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \ 101wrapper :=$(srctree)/$(src)/wrapper
99 zImage.coff zImage.initrd.coff miboot.image miboot.initrd.image \ 102wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff)
100 $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \
101 $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \
102 $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \
103 vmlinux.initrd dummy.o
104extra-y := initrd.o
105 103
106quiet_cmd_ramdisk = RAMDISK $@ 104#############
107 cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@ 105# Bits for building various flavours of zImage
108 106
109quiet_cmd_stripvm = STRIP $@ 107ifneq ($(CROSS32_COMPILE),)
110 cmd_stripvm = $(STRIP) -s -R .comment $< -o $@ 108CROSSWRAP := -C $(CROSS32_COMPILE)
109else
110ifneq ($(CROSS_COMPILE),)
111CROSSWRAP := -C $(CROSS_COMPILE)
112endif
113endif
111 114
112vmlinux.strip: vmlinux 115quiet_cmd_wrap = WRAP $@
113 $(call if_changed,stripvm) 116 cmd_wrap =$(wrapper) -c -o $@ -p $2 $(CROSSWRAP) vmlinux
114$(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz 117quiet_cmd_wrap_initrd = WRAP $@
115 $(call if_changed,ramdisk) 118 cmd_wrap_initrd =$(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
119 -i $(obj)/ramdisk.image.gz vmlinux
116 120
117quiet_cmd_addsection = ADDSEC $@ 121$(obj)/zImage.chrp: vmlinux $(wrapperbits)
118 cmd_addsection = $(CROSS32OBJCOPY) $@ \ 122 $(call cmd,wrap,chrp)
119 --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(patsubst %.o,%.gz, $@) \
120 --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(OBJCOPYFLAGS)
121 123
122quiet_cmd_addnote = ADDNOTE $@ 124$(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits)
123 cmd_addnote = $(obj)/addnote $@ 125 $(call cmd,wrap_initrd,chrp)
124 126
125quiet_cmd_gen-miboot = GEN $@ 127$(obj)/zImage.pseries: vmlinux $(wrapperbits)
126 cmd_gen-miboot = $(OBJCOPY) $(OBJCOPY_MIB_ARGS) \ 128 $(call cmd,wrap,pseries)
127 --add-section=$1=$(word 2, $^) $< $@
128 129
129quiet_cmd_gencoff = COFF $@ 130$(obj)/zImage.initrd.pseries: vmlinux $(wrapperbits)
130 cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \ 131 $(call cmd,wrap_initrd,pseries)
131 $(obj)/hack-coff $@
132 132
133$(call gz-sec, $(required)): $(obj)/kernel-%.gz: % 133$(obj)/zImage.pmac: vmlinux $(wrapperbits)
134 $(call if_changed,gzip) 134 $(call cmd,wrap,pmac)
135 135
136$(obj)/kernel-initrd.gz: $(obj)/ramdisk.image.gz 136$(obj)/zImage.initrd.pmac: vmlinux $(wrapperbits)
137 cp -f $(obj)/ramdisk.image.gz $@ 137 $(call cmd,wrap_initrd,pmac)
138 138
139$(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz 139$(obj)/zImage.coff: vmlinux $(wrapperbits)
140 @touch $@ 140 $(call cmd,wrap,pmaccoff)
141 141
142$(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c 142$(obj)/zImage.initrd.coff: vmlinux $(wrapperbits)
143 $(call if_changed_dep,bootcc) 143 $(call cmd,wrap_initrd,pmaccoff)
144 $(call cmd,addsection) 144
145$(obj)/zImage.miboot: vmlinux $(wrapperbits)
146 $(call cmd,wrap,miboot)
145 147
146$(obj)/zImage.vmode $(obj)/zImage.coff: obj-boot += $(call obj-sec, $(required)) 148$(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits)
147$(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) $(srctree)/$(src)/zImage.lds 149 $(call cmd,wrap_initrd,miboot)
148 $(call cmd,bootld,$(obj-boot),zImage.lds)
149 150
150$(obj)/zImage.initrd.vmode $(obj)/zImage.initrd.coff: obj-boot += $(call obj-sec, $(required) $(initrd)) 151$(obj)/uImage: vmlinux $(wrapperbits)
151$(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds 152 $(call cmd,wrap,uboot)
152 $(call cmd,bootld,$(obj-boot),zImage.lds) 153
154image-$(CONFIG_PPC_PSERIES) += zImage.pseries
155image-$(CONFIG_PPC_MAPLE) += zImage.pseries
156image-$(CONFIG_PPC_CELL) += zImage.pseries
157image-$(CONFIG_PPC_CHRP) += zImage.chrp
158image-$(CONFIG_PPC_PMAC) += zImage.pmac
159image-$(CONFIG_DEFAULT_UIMAGE) += uImage
153 160
154# For 32-bit powermacs, build the COFF and miboot images 161# For 32-bit powermacs, build the COFF and miboot images
155# as well as the ELF images. 162# as well as the ELF images.
156coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff 163ifeq ($(CONFIG_PPC32),y)
157coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff 164image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot
158mibootimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.image 165endif
159mibrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.initrd.image 166
160 167initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y))
161$(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) \ 168
162 $(mibootimg-y-y) 169$(obj)/zImage: $(addprefix $(obj)/, $(image-y))
163 @cp -f $< $@ 170 @rm -f $@; ln $< $@
164 $(call if_changed,addnote) 171$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
165 172 @rm -f $@; ln $< $@
166$(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote \ 173
167 $(coffrdimg-y-y) $(mibrdimg-y-y) 174install: $(CONFIGURE) $(image-y)
168 @cp -f $< $@ 175 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
169 $(call if_changed,addnote) 176
170 177clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip.gz)
171$(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) \ 178clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.bin.gz)
172 $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff
173 $(call cmd,bootld,$(obj-boot),zImage.coff.lds)
174 $(call cmd,gencoff)
175
176$(obj)/zImage.initrd.coff: $(call obj-sec, $(required) $(initrd)) $(obj-boot) \
177 $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff
178 $(call cmd,bootld,$(obj-boot),zImage.coff.lds)
179 $(call cmd,gencoff)
180
181$(obj)/miboot.image: $(obj)/dummy.o $(obj)/vmlinux.gz
182 $(call cmd,gen-miboot,image)
183
184$(obj)/miboot.initrd.image: $(obj)/miboot.image $(images)/ramdisk.image.gz
185 $(call cmd,gen-miboot,initrd)
186
187#-----------------------------------------------------------
188# build u-boot images
189#-----------------------------------------------------------
190quiet_cmd_mygzip = GZIP $@
191cmd_mygzip = gzip -f -9 < $< > $@.$$$$ && mv $@.$$$$ $@
192
193quiet_cmd_objbin = OBJCOPY $@
194 cmd_objbin = $(OBJCOPY) -O binary $< $@
195
196quiet_cmd_uimage = UIMAGE $@
197 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T kernel \
198 -C gzip -a 00000000 -e 00000000 -n 'Linux-$(KERNELRELEASE)' \
199 -d $< $@
200
201MKIMAGE := $(srctree)/scripts/mkuboot.sh
202targets += uImage
203extra-y += vmlinux.bin vmlinux.gz
204
205$(obj)/vmlinux.bin: vmlinux FORCE
206 $(call if_changed,objbin)
207
208$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
209 $(call if_changed,mygzip)
210
211$(obj)/uImage: $(obj)/vmlinux.gz
212 $(Q)rm -f $@
213 $(call cmd,uimage)
214 @echo -n ' Image: $@ '
215 @if [ -f $@ ]; then echo 'is ready' ; else echo 'not made'; fi
216
217install: $(CONFIGURE) $(BOOTIMAGE)
218 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)"
219
220clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip)
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
new file mode 100644
index 000000000000..2b168486aeba
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -0,0 +1,302 @@
1/*
2 * MPC8560 ADS Device Tree Source
3 *
4 * Copyright 2006 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/ {
14 model = "MPC8560ADS";
15 compatible = "MPC85xxADS";
16 #address-cells = <1>;
17 #size-cells = <1>;
18 linux,phandle = <100>;
19
20 cpus {
21 #cpus = <1>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 linux,phandle = <200>;
25
26 PowerPC,8560@0 {
27 device_type = "cpu";
28 reg = <0>;
29 d-cache-line-size = <20>; // 32 bytes
30 i-cache-line-size = <20>; // 32 bytes
31 d-cache-size = <8000>; // L1, 32K
32 i-cache-size = <8000>; // L1, 32K
33 timebase-frequency = <04ead9a0>;
34 bus-frequency = <13ab6680>;
35 clock-frequency = <312c8040>;
36 32-bit;
37 linux,phandle = <201>;
38 linux,boot-cpu;
39 };
40 };
41
42 memory {
43 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 10000000>;
46 };
47
48 soc8560@e0000000 {
49 #address-cells = <1>;
50 #size-cells = <1>;
51 #interrupt-cells = <2>;
52 device_type = "soc";
53 ranges = <0 e0000000 00100000>;
54 reg = <e0000000 00000200>;
55 bus-frequency = <13ab6680>;
56
57 mdio@24520 {
58 device_type = "mdio";
59 compatible = "gianfar";
60 reg = <24520 20>;
61 linux,phandle = <24520>;
62 #address-cells = <1>;
63 #size-cells = <0>;
64 ethernet-phy@0 {
65 linux,phandle = <2452000>;
66 interrupt-parent = <40000>;
67 interrupts = <35 1>;
68 reg = <0>;
69 device_type = "ethernet-phy";
70 };
71 ethernet-phy@1 {
72 linux,phandle = <2452001>;
73 interrupt-parent = <40000>;
74 interrupts = <35 1>;
75 reg = <1>;
76 device_type = "ethernet-phy";
77 };
78 ethernet-phy@2 {
79 linux,phandle = <2452002>;
80 interrupt-parent = <40000>;
81 interrupts = <37 1>;
82 reg = <2>;
83 device_type = "ethernet-phy";
84 };
85 ethernet-phy@3 {
86 linux,phandle = <2452003>;
87 interrupt-parent = <40000>;
88 interrupts = <37 1>;
89 reg = <3>;
90 device_type = "ethernet-phy";
91 };
92 };
93
94 ethernet@24000 {
95 device_type = "network";
96 model = "TSEC";
97 compatible = "gianfar";
98 reg = <24000 1000>;
99 address = [ 00 00 0C 00 00 FD ];
100 interrupts = <d 2 e 2 12 2>;
101 interrupt-parent = <40000>;
102 phy-handle = <2452000>;
103 };
104
105 ethernet@25000 {
106 #address-cells = <1>;
107 #size-cells = <0>;
108 device_type = "network";
109 model = "TSEC";
110 compatible = "gianfar";
111 reg = <25000 1000>;
112 address = [ 00 00 0C 00 01 FD ];
113 interrupts = <13 2 14 2 18 2>;
114 interrupt-parent = <40000>;
115 phy-handle = <2452001>;
116 };
117
118 pci@8000 {
119 linux,phandle = <8000>;
120 #interrupt-cells = <1>;
121 #size-cells = <2>;
122 #address-cells = <3>;
123 compatible = "85xx";
124 device_type = "pci";
125 reg = <8000 400>;
126 clock-frequency = <3f940aa>;
127 interrupt-map-mask = <f800 0 0 7>;
128 interrupt-map = <
129
130 /* IDSEL 0x2 */
131 1000 0 0 1 40000 31 1
132 1000 0 0 2 40000 32 1
133 1000 0 0 3 40000 33 1
134 1000 0 0 4 40000 34 1
135
136 /* IDSEL 0x3 */
137 1800 0 0 1 40000 34 1
138 1800 0 0 2 40000 31 1
139 1800 0 0 3 40000 32 1
140 1800 0 0 4 40000 33 1
141
142 /* IDSEL 0x4 */
143 2000 0 0 1 40000 33 1
144 2000 0 0 2 40000 34 1
145 2000 0 0 3 40000 31 1
146 2000 0 0 4 40000 32 1
147
148 /* IDSEL 0x5 */
149 2800 0 0 1 40000 32 1
150 2800 0 0 2 40000 33 1
151 2800 0 0 3 40000 34 1
152 2800 0 0 4 40000 31 1
153
154 /* IDSEL 12 */
155 6000 0 0 1 40000 31 1
156 6000 0 0 2 40000 32 1
157 6000 0 0 3 40000 33 1
158 6000 0 0 4 40000 34 1
159
160 /* IDSEL 13 */
161 6800 0 0 1 40000 34 1
162 6800 0 0 2 40000 31 1
163 6800 0 0 3 40000 32 1
164 6800 0 0 4 40000 33 1
165
166 /* IDSEL 14*/
167 7000 0 0 1 40000 33 1
168 7000 0 0 2 40000 34 1
169 7000 0 0 3 40000 31 1
170 7000 0 0 4 40000 32 1
171
172 /* IDSEL 15 */
173 7800 0 0 1 40000 32 1
174 7800 0 0 2 40000 33 1
175 7800 0 0 3 40000 34 1
176 7800 0 0 4 40000 31 1
177
178 /* IDSEL 18 */
179 9000 0 0 1 40000 31 1
180 9000 0 0 2 40000 32 1
181 9000 0 0 3 40000 33 1
182 9000 0 0 4 40000 34 1
183
184 /* IDSEL 19 */
185 9800 0 0 1 40000 34 1
186 9800 0 0 2 40000 31 1
187 9800 0 0 3 40000 32 1
188 9800 0 0 4 40000 33 1
189
190 /* IDSEL 20 */
191 a000 0 0 1 40000 33 1
192 a000 0 0 2 40000 34 1
193 a000 0 0 3 40000 31 1
194 a000 0 0 4 40000 32 1
195
196 /* IDSEL 21 */
197 a800 0 0 1 40000 32 1
198 a800 0 0 2 40000 33 1
199 a800 0 0 3 40000 34 1
200 a800 0 0 4 40000 31 1>;
201
202 interrupt-parent = <40000>;
203 interrupts = <42 0>;
204 bus-range = <0 0>;
205 ranges = <02000000 0 80000000 80000000 0 20000000
206 01000000 0 00000000 e2000000 0 01000000>;
207 };
208
209 pic@40000 {
210 linux,phandle = <40000>;
211 interrupt-controller;
212 #address-cells = <0>;
213 #interrupt-cells = <2>;
214 reg = <40000 20100>;
215 built-in;
216 device_type = "open-pic";
217 };
218
219 cpm@e0000000 {
220 linux,phandle = <e0000000>;
221 #address-cells = <1>;
222 #size-cells = <1>;
223 #interrupt-cells = <2>;
224 device_type = "cpm";
225 model = "CPM2";
226 ranges = <0 0 c0000>;
227 reg = <80000 40000>;
228 command-proc = <919c0>;
229 brg-frequency = <9d5b340>;
230
231 pic@90c00 {
232 linux,phandle = <90c00>;
233 interrupt-controller;
234 #address-cells = <0>;
235 #interrupt-cells = <2>;
236 interrupts = <1e 0>;
237 interrupt-parent = <40000>;
238 reg = <90c00 80>;
239 built-in;
240 device_type = "cpm-pic";
241 };
242
243 scc@91a00 {
244 device_type = "serial";
245 compatible = "cpm_uart";
246 model = "SCC";
247 device-id = <1>;
248 reg = <91a00 20 88000 100>;
249 clock-setup = <00ffffff 0>;
250 rx-clock = <1>;
251 tx-clock = <1>;
252 current-speed = <1c200>;
253 interrupts = <64 1>;
254 interrupt-parent = <90c00>;
255 };
256
257 scc@91a20 {
258 device_type = "serial";
259 compatible = "cpm_uart";
260 model = "SCC";
261 device-id = <2>;
262 reg = <91a20 20 88100 100>;
263 clock-setup = <ff00ffff 90000>;
264 rx-clock = <2>;
265 tx-clock = <2>;
266 current-speed = <1c200>;
267 interrupts = <65 1>;
268 interrupt-parent = <90c00>;
269 };
270
271 fcc@91320 {
272 device_type = "network";
273 compatible = "fs_enet";
274 model = "FCC";
275 device-id = <2>;
276 reg = <91320 20 88500 100 913a0 30>;
277 mac-address = [ 00 00 0C 00 02 FD ];
278 clock-setup = <ff00ffff 250000>;
279 rx-clock = <15>;
280 tx-clock = <16>;
281 interrupts = <5d 1>;
282 interrupt-parent = <90c00>;
283 phy-handle = <2452002>;
284 };
285
286 fcc@91340 {
287 device_type = "network";
288 compatible = "fs_enet";
289 model = "FCC";
290 device-id = <3>;
291 reg = <91340 20 88600 100 913d0 30>;
292 mac-address = [ 00 00 0C 00 03 FD ];
293 clock-setup = <ffff00ff 3700>;
294 rx-clock = <17>;
295 tx-clock = <18>;
296 interrupts = <5e 1>;
297 interrupt-parent = <90c00>;
298 phy-handle = <2452003>;
299 };
300 };
301 };
302};
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
new file mode 100755
index 000000000000..eab7318729e9
--- /dev/null
+++ b/arch/powerpc/boot/wrapper
@@ -0,0 +1,204 @@
1#!/bin/sh
2
3# Copyright (C) 2006 Paul Mackerras, IBM Corporation <paulus@samba.org>
4# This program may be used under the terms of version 2 of the GNU
5# General Public License.
6
7# This script takes a kernel binary and optionally an initrd image
8# and/or a device-tree blob, and creates a bootable zImage for a
9# given platform.
10
11# Options:
12# -o zImage specify output file
13# -p platform specify platform (links in $platform.o)
14# -i initrd specify initrd file
15# -d devtree specify device-tree blob
16# -s tree.dts specify device-tree source file (needs dtc installed)
17# -c cache $kernel.strip.gz (use if present & newer, else make)
18# -C prefix specify command prefix for cross-building tools
19# (strip, objcopy, ld)
20# -D dir specify directory containing data files used by script
21# (default ./arch/powerpc/boot)
22# -W dir specify working directory for temporary files (default .)
23
24# defaults
25kernel=
26ofile=zImage
27platform=of
28initrd=
29dtb=
30dts=
31cacheit=
32
33# cross-compilation prefix
34CROSS=
35
36# directory for object and other files used by this script
37object=arch/powerpc/boot
38
39# directory for working files
40tmpdir=.
41
42usage() {
43 echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' >&2
44 echo ' [-d devtree] [-s tree.dts] [-c] [-C cross-prefix]' >&2
45 echo ' [-D datadir] [-W workingdir] [vmlinux]' >&2
46 exit 1
47}
48
49while [ "$#" -gt 0 ]; do
50 case "$1" in
51 -o)
52 shift
53 [ "$#" -gt 0 ] || usage
54 ofile="$1"
55 ;;
56 -p)
57 shift
58 [ "$#" -gt 0 ] || usage
59 platform="$1"
60 ;;
61 -i)
62 shift
63 [ "$#" -gt 0 ] || usage
64 initrd="$1"
65 ;;
66 -d)
67 shift
68 [ "$#" -gt 0 ] || usage
69 dtb="$1"
70 ;;
71 -s)
72 shift
73 [ "$#" -gt 0 ] || usage
74 dts="$1"
75 ;;
76 -c)
77 cacheit=y
78 ;;
79 -C)
80 shift
81 [ "$#" -gt 0 ] || usage
82 CROSS="$1"
83 ;;
84 -D)
85 shift
86 [ "$#" -gt 0 ] || usage
87 object="$1"
88 ;;
89 -W)
90 shift
91 [ "$#" -gt 0 ] || usage
92 tmpdir="$1"
93 ;;
94 -?)
95 usage
96 ;;
97 *)
98 [ -z "$kernel" ] || usage
99 kernel="$1"
100 ;;
101 esac
102 shift
103done
104
105if [ -n "$dts" ]; then
106 if [ -z "$dtb" ]; then
107 dtb="$platform.dtb"
108 fi
109 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" || exit 1
110fi
111
112if [ -z "$kernel" ]; then
113 kernel=vmlinux
114fi
115
116platformo=$object/"$platform".o
117lds=$object/zImage.lds
118ext=strip
119objflags=-S
120tmp=$tmpdir/zImage.$$.o
121ksection=.kernel:vmlinux.strip
122isection=.kernel:initrd
123
124case "$platform" in
125pmac|pseries|chrp)
126 platformo=$object/of.o
127 ;;
128pmaccoff)
129 platformo=$object/of.o
130 lds=$object/zImage.coff.lds
131 ;;
132miboot|uboot)
133 # miboot and U-boot want just the bare bits, not an ELF binary
134 ext=bin
135 objflags="-O binary"
136 tmp="$ofile"
137 ksection=image
138 isection=initrd
139 ;;
140esac
141
142vmz="$tmpdir/`basename \"$kernel\"`.$ext"
143if [ -z "$cacheit" -o ! -f "$vmz.gz" -o "$vmz.gz" -ot "$kernel" ]; then
144 ${CROSS}objcopy $objflags "$kernel" "$vmz.$$"
145 gzip -f -9 "$vmz.$$"
146 if [ -n "$cacheit" ]; then
147 mv -f "$vmz.$$.gz" "$vmz.gz"
148 else
149 vmz="$vmz.$$"
150 fi
151fi
152
153case "$platform" in
154uboot)
155 rm -f "$ofile"
156 version=`${CROSS}strings "$kernel" | grep '^Linux version [-0-9.]' | \
157 cut -d' ' -f3`
158 if [ -n "$version" ]; then
159 version="-n Linux-$version"
160 fi
161 mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \
162 $version -d "$vmz.gz" "$ofile"
163 if [ -z "$cacheit" ]; then
164 rm -f $vmz.gz
165 fi
166 exit 0
167 ;;
168esac
169
170addsec() {
171 ${CROSS}objcopy $4 $1 \
172 --add-section=$3="$2" \
173 --set-section-flags=$3=contents,alloc,load,readonly,data
174}
175
176addsec $tmp "$vmz.gz" $ksection $object/empty.o
177if [ -z "$cacheit" ]; then
178 rm -f "$vmz.gz"
179fi
180
181if [ -n "$initrd" ]; then
182 addsec $tmp "$initrd" initrd
183fi
184
185if [ -n "$dtb" ]; then
186 addsec $tmp "$dtb" dtb
187fi
188
189if [ "$platform" != "miboot" ]; then
190 ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \
191 $object/crt0.o $platformo $tmp $object/wrapper.a
192 rm $tmp
193fi
194
195# post-processing needed for some platforms
196case "$platform" in
197pseries|chrp)
198 $object/addnote "$ofile"
199 ;;
200pmaccoff)
201 ${CROSS}objcopy -O aixcoff-rs6000 --set-start 0x500000 "$ofile"
202 $object/hack-coff "$ofile"
203 ;;
204esac
diff --git a/arch/powerpc/boot/zImage.coff.lds b/arch/powerpc/boot/zImage.coff.lds.S
index 6016251a1a2c..6016251a1a2c 100644
--- a/arch/powerpc/boot/zImage.coff.lds
+++ b/arch/powerpc/boot/zImage.coff.lds.S
diff --git a/arch/powerpc/boot/zImage.lds b/arch/powerpc/boot/zImage.lds.S
index 4b6bb3ffe3dc..4b6bb3ffe3dc 100644
--- a/arch/powerpc/boot/zImage.lds
+++ b/arch/powerpc/boot/zImage.lds.S
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index bbf2b5f8a8cb..fee72f8a2fb7 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -492,7 +492,7 @@ CONFIG_SCSI_SPI_ATTRS=y
492# CONFIG_MEGARAID_NEWGEN is not set 492# CONFIG_MEGARAID_NEWGEN is not set
493# CONFIG_MEGARAID_LEGACY is not set 493# CONFIG_MEGARAID_LEGACY is not set
494# CONFIG_MEGARAID_SAS is not set 494# CONFIG_MEGARAID_SAS is not set
495# CONFIG_SCSI_SATA is not set 495# CONFIG_ATA is not set
496# CONFIG_SCSI_HPTIOP is not set 496# CONFIG_SCSI_HPTIOP is not set
497# CONFIG_SCSI_BUSLOGIC is not set 497# CONFIG_SCSI_BUSLOGIC is not set
498# CONFIG_SCSI_DMX3191D is not set 498# CONFIG_SCSI_DMX3191D is not set
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 4b9c2ed925f5..92d0a9dd0b8f 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -490,23 +490,23 @@ CONFIG_SCSI_SPI_ATTRS=y
490# CONFIG_MEGARAID_NEWGEN is not set 490# CONFIG_MEGARAID_NEWGEN is not set
491# CONFIG_MEGARAID_LEGACY is not set 491# CONFIG_MEGARAID_LEGACY is not set
492# CONFIG_MEGARAID_SAS is not set 492# CONFIG_MEGARAID_SAS is not set
493CONFIG_SCSI_SATA=y 493CONFIG_ATA=y
494# CONFIG_SCSI_SATA_AHCI is not set 494# CONFIG_SATA_AHCI is not set
495CONFIG_SCSI_SATA_SVW=y 495CONFIG_SATA_SVW=y
496# CONFIG_SCSI_ATA_PIIX is not set 496# CONFIG_SCSI_ATA_PIIX is not set
497# CONFIG_SCSI_SATA_MV is not set 497# CONFIG_SATA_MV is not set
498# CONFIG_SCSI_SATA_NV is not set 498# CONFIG_SATA_NV is not set
499# CONFIG_SCSI_PDC_ADMA is not set 499# CONFIG_SCSI_PDC_ADMA is not set
500# CONFIG_SCSI_HPTIOP is not set 500# CONFIG_SCSI_HPTIOP is not set
501# CONFIG_SCSI_SATA_QSTOR is not set 501# CONFIG_SATA_QSTOR is not set
502# CONFIG_SCSI_SATA_PROMISE is not set 502# CONFIG_SATA_PROMISE is not set
503# CONFIG_SCSI_SATA_SX4 is not set 503# CONFIG_SATA_SX4 is not set
504# CONFIG_SCSI_SATA_SIL is not set 504# CONFIG_SATA_SIL is not set
505# CONFIG_SCSI_SATA_SIL24 is not set 505# CONFIG_SATA_SIL24 is not set
506# CONFIG_SCSI_SATA_SIS is not set 506# CONFIG_SATA_SIS is not set
507# CONFIG_SCSI_SATA_ULI is not set 507# CONFIG_SATA_ULI is not set
508# CONFIG_SCSI_SATA_VIA is not set 508# CONFIG_SATA_VIA is not set
509# CONFIG_SCSI_SATA_VITESSE is not set 509# CONFIG_SATA_VITESSE is not set
510# CONFIG_SCSI_BUSLOGIC is not set 510# CONFIG_SCSI_BUSLOGIC is not set
511# CONFIG_SCSI_DMX3191D is not set 511# CONFIG_SCSI_DMX3191D is not set
512# CONFIG_SCSI_EATA is not set 512# CONFIG_SCSI_EATA is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index eb0885ea0731..d58f82f836f8 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -475,7 +475,7 @@ CONFIG_SCSI_FC_ATTRS=y
475# CONFIG_MEGARAID_NEWGEN is not set 475# CONFIG_MEGARAID_NEWGEN is not set
476# CONFIG_MEGARAID_LEGACY is not set 476# CONFIG_MEGARAID_LEGACY is not set
477# CONFIG_MEGARAID_SAS is not set 477# CONFIG_MEGARAID_SAS is not set
478# CONFIG_SCSI_SATA is not set 478# CONFIG_ATA is not set
479# CONFIG_SCSI_HPTIOP is not set 479# CONFIG_SCSI_HPTIOP is not set
480# CONFIG_SCSI_BUSLOGIC is not set 480# CONFIG_SCSI_BUSLOGIC is not set
481# CONFIG_SCSI_DMX3191D is not set 481# CONFIG_SCSI_DMX3191D is not set
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index 719fba4eb421..d1811e754518 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig
@@ -413,23 +413,23 @@ CONFIG_BLK_DEV_SD=y
413# CONFIG_MEGARAID_NEWGEN is not set 413# CONFIG_MEGARAID_NEWGEN is not set
414# CONFIG_MEGARAID_LEGACY is not set 414# CONFIG_MEGARAID_LEGACY is not set
415# CONFIG_MEGARAID_SAS is not set 415# CONFIG_MEGARAID_SAS is not set
416CONFIG_SCSI_SATA=y 416CONFIG_ATA=y
417# CONFIG_SCSI_SATA_AHCI is not set 417# CONFIG_SATA_AHCI is not set
418# CONFIG_SCSI_SATA_SVW is not set 418# CONFIG_SATA_SVW is not set
419# CONFIG_SCSI_ATA_PIIX is not set 419# CONFIG_SCSI_ATA_PIIX is not set
420CONFIG_SCSI_SATA_MV=y 420CONFIG_SATA_MV=y
421# CONFIG_SCSI_SATA_NV is not set 421# CONFIG_SATA_NV is not set
422# CONFIG_SCSI_PDC_ADMA is not set 422# CONFIG_SCSI_PDC_ADMA is not set
423# CONFIG_SCSI_HPTIOP is not set 423# CONFIG_SCSI_HPTIOP is not set
424# CONFIG_SCSI_SATA_QSTOR is not set 424# CONFIG_SATA_QSTOR is not set
425# CONFIG_SCSI_SATA_PROMISE is not set 425# CONFIG_SATA_PROMISE is not set
426# CONFIG_SCSI_SATA_SX4 is not set 426# CONFIG_SATA_SX4 is not set
427# CONFIG_SCSI_SATA_SIL is not set 427# CONFIG_SATA_SIL is not set
428# CONFIG_SCSI_SATA_SIL24 is not set 428# CONFIG_SATA_SIL24 is not set
429# CONFIG_SCSI_SATA_SIS is not set 429# CONFIG_SATA_SIS is not set
430# CONFIG_SCSI_SATA_ULI is not set 430# CONFIG_SATA_ULI is not set
431# CONFIG_SCSI_SATA_VIA is not set 431# CONFIG_SATA_VIA is not set
432# CONFIG_SCSI_SATA_VITESSE is not set 432# CONFIG_SATA_VITESSE is not set
433# CONFIG_SCSI_BUSLOGIC is not set 433# CONFIG_SCSI_BUSLOGIC is not set
434# CONFIG_SCSI_DMX3191D is not set 434# CONFIG_SCSI_DMX3191D is not set
435# CONFIG_SCSI_EATA is not set 435# CONFIG_SCSI_EATA is not set
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 8da6a47f0339..cd3535e1a095 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc6 3# Linux kernel version: 2.6.18
4# Sun Sep 10 10:28:05 2006 4# Mon Sep 25 19:41:14 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -21,6 +21,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y 21CONFIG_PPC_OF=y
22CONFIG_PPC_UDBG_16550=y 22CONFIG_PPC_UDBG_16550=y
23# CONFIG_GENERIC_TBSYNC is not set 23# CONFIG_GENERIC_TBSYNC is not set
24CONFIG_AUDIT_ARCH=y
24CONFIG_DEFAULT_UIMAGE=y 25CONFIG_DEFAULT_UIMAGE=y
25 26
26# 27#
@@ -61,25 +62,25 @@ CONFIG_SYSVIPC=y
61# CONFIG_POSIX_MQUEUE is not set 62# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set 64# CONFIG_TASKSTATS is not set
64CONFIG_SYSCTL=y
65# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
67# CONFIG_RELAY is not set 67# CONFIG_RELAY is not set
68CONFIG_INITRAMFS_SOURCE="" 68CONFIG_INITRAMFS_SOURCE=""
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_EMBEDDED=y 70CONFIG_EMBEDDED=y
71CONFIG_SYSCTL=y
71# CONFIG_KALLSYMS is not set 72# CONFIG_KALLSYMS is not set
72CONFIG_HOTPLUG=y 73CONFIG_HOTPLUG=y
73CONFIG_PRINTK=y 74CONFIG_PRINTK=y
74CONFIG_BUG=y 75CONFIG_BUG=y
75CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
76CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
77CONFIG_RT_MUTEXES=y
78CONFIG_FUTEX=y 78CONFIG_FUTEX=y
79# CONFIG_EPOLL is not set 79# CONFIG_EPOLL is not set
80CONFIG_SHMEM=y 80CONFIG_SHMEM=y
81CONFIG_SLAB=y 81CONFIG_SLAB=y
82CONFIG_VM_EVENT_COUNTERS=y 82CONFIG_VM_EVENT_COUNTERS=y
83CONFIG_RT_MUTEXES=y
83# CONFIG_TINY_SHMEM is not set 84# CONFIG_TINY_SHMEM is not set
84CONFIG_BASE_SMALL=0 85CONFIG_BASE_SMALL=0
85# CONFIG_SLOB is not set 86# CONFIG_SLOB is not set
@@ -259,7 +260,6 @@ CONFIG_TCP_CONG_BIC=y
259# CONFIG_ATALK is not set 260# CONFIG_ATALK is not set
260# CONFIG_X25 is not set 261# CONFIG_X25 is not set
261# CONFIG_LAPB is not set 262# CONFIG_LAPB is not set
262# CONFIG_NET_DIVERT is not set
263# CONFIG_ECONET is not set 263# CONFIG_ECONET is not set
264# CONFIG_WAN_ROUTER is not set 264# CONFIG_WAN_ROUTER is not set
265 265
@@ -313,6 +313,7 @@ CONFIG_MTD_CHAR=y
313# CONFIG_NFTL is not set 313# CONFIG_NFTL is not set
314# CONFIG_INFTL is not set 314# CONFIG_INFTL is not set
315# CONFIG_RFD_FTL is not set 315# CONFIG_RFD_FTL is not set
316# CONFIG_SSFDC is not set
316 317
317# 318#
318# RAM/ROM/Flash chip drivers 319# RAM/ROM/Flash chip drivers
@@ -464,23 +465,23 @@ CONFIG_SCSI_SPI_ATTRS=y
464# CONFIG_MEGARAID_NEWGEN is not set 465# CONFIG_MEGARAID_NEWGEN is not set
465# CONFIG_MEGARAID_LEGACY is not set 466# CONFIG_MEGARAID_LEGACY is not set
466# CONFIG_MEGARAID_SAS is not set 467# CONFIG_MEGARAID_SAS is not set
467CONFIG_SCSI_SATA=y 468CONFIG_ATA=y
468# CONFIG_SCSI_SATA_AHCI is not set 469# CONFIG_SATA_AHCI is not set
469# CONFIG_SCSI_SATA_SVW is not set 470# CONFIG_SATA_SVW is not set
470# CONFIG_SCSI_ATA_PIIX is not set 471# CONFIG_SCSI_ATA_PIIX is not set
471# CONFIG_SCSI_SATA_MV is not set 472# CONFIG_SATA_MV is not set
472# CONFIG_SCSI_SATA_NV is not set 473# CONFIG_SATA_NV is not set
473# CONFIG_SCSI_PDC_ADMA is not set 474# CONFIG_SCSI_PDC_ADMA is not set
474# CONFIG_SCSI_HPTIOP is not set 475# CONFIG_SCSI_HPTIOP is not set
475# CONFIG_SCSI_SATA_QSTOR is not set 476# CONFIG_SATA_QSTOR is not set
476# CONFIG_SCSI_SATA_PROMISE is not set 477# CONFIG_SATA_PROMISE is not set
477# CONFIG_SCSI_SATA_SX4 is not set 478# CONFIG_SATA_SX4 is not set
478CONFIG_SCSI_SATA_SIL=y 479CONFIG_SATA_SIL=y
479# CONFIG_SCSI_SATA_SIL24 is not set 480# CONFIG_SATA_SIL24 is not set
480# CONFIG_SCSI_SATA_SIS is not set 481# CONFIG_SATA_SIS is not set
481# CONFIG_SCSI_SATA_ULI is not set 482# CONFIG_SATA_ULI is not set
482# CONFIG_SCSI_SATA_VIA is not set 483# CONFIG_SATA_VIA is not set
483# CONFIG_SCSI_SATA_VITESSE is not set 484# CONFIG_SATA_VITESSE is not set
484# CONFIG_SCSI_BUSLOGIC is not set 485# CONFIG_SCSI_BUSLOGIC is not set
485# CONFIG_SCSI_DMX3191D is not set 486# CONFIG_SCSI_DMX3191D is not set
486# CONFIG_SCSI_EATA is not set 487# CONFIG_SCSI_EATA is not set
@@ -1277,11 +1278,11 @@ CONFIG_PLIST=y
1277# 1278#
1278# Kernel hacking 1279# Kernel hacking
1279# 1280#
1280CONFIG_PRINTK_TIME=y 1281# CONFIG_PRINTK_TIME is not set
1281# CONFIG_MAGIC_SYSRQ is not set 1282# CONFIG_MAGIC_SYSRQ is not set
1282# CONFIG_UNUSED_SYMBOLS is not set 1283# CONFIG_UNUSED_SYMBOLS is not set
1283CONFIG_DEBUG_KERNEL=y 1284CONFIG_DEBUG_KERNEL=y
1284CONFIG_LOG_BUF_SHIFT=17 1285CONFIG_LOG_BUF_SHIFT=14
1285CONFIG_DETECT_SOFTLOCKUP=y 1286CONFIG_DETECT_SOFTLOCKUP=y
1286# CONFIG_SCHEDSTATS is not set 1287# CONFIG_SCHEDSTATS is not set
1287# CONFIG_DEBUG_SLAB is not set 1288# CONFIG_DEBUG_SLAB is not set
@@ -1293,15 +1294,15 @@ CONFIG_DETECT_SOFTLOCKUP=y
1293# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1294# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1294# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1295# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1295# CONFIG_DEBUG_KOBJECT is not set 1296# CONFIG_DEBUG_KOBJECT is not set
1296CONFIG_DEBUG_INFO=y 1297# CONFIG_DEBUG_INFO is not set
1297# CONFIG_DEBUG_FS is not set 1298# CONFIG_DEBUG_FS is not set
1298# CONFIG_DEBUG_VM is not set 1299# CONFIG_DEBUG_VM is not set
1299CONFIG_FORCED_INLINING=y 1300CONFIG_FORCED_INLINING=y
1300# CONFIG_RCU_TORTURE_TEST is not set 1301# CONFIG_RCU_TORTURE_TEST is not set
1301# CONFIG_DEBUGGER is not set 1302# CONFIG_DEBUGGER is not set
1302# CONFIG_BDI_SWITCH is not set 1303# CONFIG_BDI_SWITCH is not set
1303CONFIG_BOOTX_TEXT=y 1304# CONFIG_BOOTX_TEXT is not set
1304CONFIG_SERIAL_TEXT_DEBUG=y 1305# CONFIG_SERIAL_TEXT_DEBUG is not set
1305# CONFIG_PPC_EARLY_DEBUG is not set 1306# CONFIG_PPC_EARLY_DEBUG is not set
1306 1307
1307# 1308#
@@ -1314,6 +1315,8 @@ CONFIG_SERIAL_TEXT_DEBUG=y
1314# Cryptographic options 1315# Cryptographic options
1315# 1316#
1316CONFIG_CRYPTO=y 1317CONFIG_CRYPTO=y
1318CONFIG_CRYPTO_ALGAPI=y
1319# CONFIG_CRYPTO_MANAGER is not set
1317# CONFIG_CRYPTO_HMAC is not set 1320# CONFIG_CRYPTO_HMAC is not set
1318# CONFIG_CRYPTO_NULL is not set 1321# CONFIG_CRYPTO_NULL is not set
1319# CONFIG_CRYPTO_MD4 is not set 1322# CONFIG_CRYPTO_MD4 is not set
@@ -1323,6 +1326,8 @@ CONFIG_CRYPTO_MD5=y
1323# CONFIG_CRYPTO_SHA512 is not set 1326# CONFIG_CRYPTO_SHA512 is not set
1324# CONFIG_CRYPTO_WP512 is not set 1327# CONFIG_CRYPTO_WP512 is not set
1325# CONFIG_CRYPTO_TGR192 is not set 1328# CONFIG_CRYPTO_TGR192 is not set
1329# CONFIG_CRYPTO_ECB is not set
1330# CONFIG_CRYPTO_CBC is not set
1326CONFIG_CRYPTO_DES=y 1331CONFIG_CRYPTO_DES=y
1327# CONFIG_CRYPTO_BLOWFISH is not set 1332# CONFIG_CRYPTO_BLOWFISH is not set
1328# CONFIG_CRYPTO_TWOFISH is not set 1333# CONFIG_CRYPTO_TWOFISH is not set
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/mpc8560_ads_defconfig
new file mode 100644
index 000000000000..ddc2a7b07ba0
--- /dev/null
+++ b/arch/powerpc/configs/mpc8560_ads_defconfig
@@ -0,0 +1,854 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc4
4# Fri Aug 11 16:45:05 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24CONFIG_DEFAULT_UIMAGE=y
25
26#
27# Processor support
28#
29# CONFIG_CLASSIC32 is not set
30# CONFIG_PPC_52xx is not set
31# CONFIG_PPC_82xx is not set
32# CONFIG_PPC_83xx is not set
33CONFIG_PPC_85xx=y
34# CONFIG_PPC_86xx is not set
35# CONFIG_40x is not set
36# CONFIG_44x is not set
37# CONFIG_8xx is not set
38# CONFIG_E200 is not set
39CONFIG_85xx=y
40CONFIG_E500=y
41CONFIG_BOOKE=y
42CONFIG_FSL_BOOKE=y
43# CONFIG_PHYS_64BIT is not set
44CONFIG_SPE=y
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
46
47#
48# Code maturity level options
49#
50CONFIG_EXPERIMENTAL=y
51CONFIG_BROKEN_ON_SMP=y
52CONFIG_INIT_ENV_ARG_LIMIT=32
53
54#
55# General setup
56#
57CONFIG_LOCALVERSION=""
58CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y
60CONFIG_SYSVIPC=y
61# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
64CONFIG_SYSCTL=y
65# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set
67# CONFIG_RELAY is not set
68CONFIG_INITRAMFS_SOURCE=""
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_EMBEDDED=y
71CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_ALL is not set
73# CONFIG_KALLSYMS_EXTRA_PASS is not set
74CONFIG_HOTPLUG=y
75CONFIG_PRINTK=y
76CONFIG_BUG=y
77CONFIG_ELF_CORE=y
78CONFIG_BASE_FULL=y
79CONFIG_RT_MUTEXES=y
80CONFIG_FUTEX=y
81CONFIG_EPOLL=y
82CONFIG_SHMEM=y
83CONFIG_SLAB=y
84CONFIG_VM_EVENT_COUNTERS=y
85# CONFIG_TINY_SHMEM is not set
86CONFIG_BASE_SMALL=0
87# CONFIG_SLOB is not set
88
89#
90# Loadable module support
91#
92# CONFIG_MODULES is not set
93
94#
95# Block layer
96#
97# CONFIG_LBD is not set
98# CONFIG_BLK_DEV_IO_TRACE is not set
99# CONFIG_LSF is not set
100
101#
102# IO Schedulers
103#
104CONFIG_IOSCHED_NOOP=y
105CONFIG_IOSCHED_AS=y
106CONFIG_IOSCHED_DEADLINE=y
107CONFIG_IOSCHED_CFQ=y
108CONFIG_DEFAULT_AS=y
109# CONFIG_DEFAULT_DEADLINE is not set
110# CONFIG_DEFAULT_CFQ is not set
111# CONFIG_DEFAULT_NOOP is not set
112CONFIG_DEFAULT_IOSCHED="anticipatory"
113CONFIG_MPIC=y
114CONFIG_CPM2=y
115# CONFIG_WANT_EARLY_SERIAL is not set
116
117#
118# Platform support
119#
120# CONFIG_MPC8540_ADS is not set
121CONFIG_MPC8560_ADS=y
122# CONFIG_MPC85xx_CDS is not set
123CONFIG_MPC8560=y
124CONFIG_PPC_INDIRECT_PCI_BE=y
125
126#
127# Kernel options
128#
129# CONFIG_HIGHMEM is not set
130# CONFIG_HZ_100 is not set
131CONFIG_HZ_250=y
132# CONFIG_HZ_1000 is not set
133CONFIG_HZ=250
134CONFIG_PREEMPT_NONE=y
135# CONFIG_PREEMPT_VOLUNTARY is not set
136# CONFIG_PREEMPT is not set
137CONFIG_BINFMT_ELF=y
138CONFIG_BINFMT_MISC=y
139# CONFIG_MATH_EMULATION is not set
140CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
141# CONFIG_PC_KEYBOARD is not set
142CONFIG_ARCH_FLATMEM_ENABLE=y
143CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y
145# CONFIG_DISCONTIGMEM_MANUAL is not set
146# CONFIG_SPARSEMEM_MANUAL is not set
147CONFIG_FLATMEM=y
148CONFIG_FLAT_NODE_MEM_MAP=y
149# CONFIG_SPARSEMEM_STATIC is not set
150CONFIG_SPLIT_PTLOCK_CPUS=4
151# CONFIG_RESOURCES_64BIT is not set
152# CONFIG_PROC_DEVICETREE is not set
153# CONFIG_CMDLINE_BOOL is not set
154# CONFIG_PM is not set
155# CONFIG_SOFTWARE_SUSPEND is not set
156# CONFIG_SECCOMP is not set
157CONFIG_ISA_DMA_API=y
158
159#
160# Bus options
161#
162# CONFIG_PPC_I8259 is not set
163CONFIG_PPC_INDIRECT_PCI=y
164CONFIG_FSL_SOC=y
165CONFIG_PCI=y
166CONFIG_PCI_DOMAINS=y
167# CONFIG_PCIEPORTBUS is not set
168CONFIG_PCI_DEBUG=y
169
170#
171# PCCARD (PCMCIA/CardBus) support
172#
173# CONFIG_PCCARD is not set
174
175#
176# PCI Hotplug Support
177#
178# CONFIG_HOTPLUG_PCI is not set
179
180#
181# Advanced setup
182#
183# CONFIG_ADVANCED_OPTIONS is not set
184
185#
186# Default settings for advanced configuration options are used
187#
188CONFIG_HIGHMEM_START=0xfe000000
189CONFIG_LOWMEM_SIZE=0x30000000
190CONFIG_KERNEL_START=0xc0000000
191CONFIG_TASK_SIZE=0x80000000
192CONFIG_BOOT_LOAD=0x00800000
193
194#
195# Networking
196#
197CONFIG_NET=y
198
199#
200# Networking options
201#
202# CONFIG_NETDEBUG is not set
203CONFIG_PACKET=y
204# CONFIG_PACKET_MMAP is not set
205CONFIG_UNIX=y
206CONFIG_XFRM=y
207# CONFIG_XFRM_USER is not set
208# CONFIG_NET_KEY is not set
209CONFIG_INET=y
210CONFIG_IP_MULTICAST=y
211# CONFIG_IP_ADVANCED_ROUTER is not set
212CONFIG_IP_FIB_HASH=y
213CONFIG_IP_PNP=y
214CONFIG_IP_PNP_DHCP=y
215CONFIG_IP_PNP_BOOTP=y
216# CONFIG_IP_PNP_RARP is not set
217# CONFIG_NET_IPIP is not set
218# CONFIG_NET_IPGRE is not set
219# CONFIG_IP_MROUTE is not set
220# CONFIG_ARPD is not set
221CONFIG_SYN_COOKIES=y
222# CONFIG_INET_AH is not set
223# CONFIG_INET_ESP is not set
224# CONFIG_INET_IPCOMP is not set
225# CONFIG_INET_XFRM_TUNNEL is not set
226# CONFIG_INET_TUNNEL is not set
227CONFIG_INET_XFRM_MODE_TRANSPORT=y
228CONFIG_INET_XFRM_MODE_TUNNEL=y
229CONFIG_INET_DIAG=y
230CONFIG_INET_TCP_DIAG=y
231# CONFIG_TCP_CONG_ADVANCED is not set
232CONFIG_TCP_CONG_BIC=y
233# CONFIG_IPV6 is not set
234# CONFIG_INET6_XFRM_TUNNEL is not set
235# CONFIG_INET6_TUNNEL is not set
236# CONFIG_NETWORK_SECMARK is not set
237# CONFIG_NETFILTER is not set
238
239#
240# DCCP Configuration (EXPERIMENTAL)
241#
242# CONFIG_IP_DCCP is not set
243
244#
245# SCTP Configuration (EXPERIMENTAL)
246#
247# CONFIG_IP_SCTP is not set
248
249#
250# TIPC Configuration (EXPERIMENTAL)
251#
252# CONFIG_TIPC is not set
253# CONFIG_ATM is not set
254# CONFIG_BRIDGE is not set
255# CONFIG_VLAN_8021Q is not set
256# CONFIG_DECNET is not set
257# CONFIG_LLC2 is not set
258# CONFIG_IPX is not set
259# CONFIG_ATALK is not set
260# CONFIG_X25 is not set
261# CONFIG_LAPB is not set
262# CONFIG_NET_DIVERT is not set
263# CONFIG_ECONET is not set
264# CONFIG_WAN_ROUTER is not set
265
266#
267# QoS and/or fair queueing
268#
269# CONFIG_NET_SCHED is not set
270
271#
272# Network testing
273#
274# CONFIG_NET_PKTGEN is not set
275# CONFIG_HAMRADIO is not set
276# CONFIG_IRDA is not set
277# CONFIG_BT is not set
278# CONFIG_IEEE80211 is not set
279
280#
281# Device Drivers
282#
283
284#
285# Generic Driver Options
286#
287CONFIG_STANDALONE=y
288CONFIG_PREVENT_FIRMWARE_BUILD=y
289# CONFIG_FW_LOADER is not set
290# CONFIG_DEBUG_DRIVER is not set
291# CONFIG_SYS_HYPERVISOR is not set
292
293#
294# Connector - unified userspace <-> kernelspace linker
295#
296# CONFIG_CONNECTOR is not set
297
298#
299# Memory Technology Devices (MTD)
300#
301# CONFIG_MTD is not set
302
303#
304# Parallel port support
305#
306# CONFIG_PARPORT is not set
307
308#
309# Plug and Play support
310#
311
312#
313# Block devices
314#
315# CONFIG_BLK_DEV_FD is not set
316# CONFIG_BLK_CPQ_DA is not set
317# CONFIG_BLK_CPQ_CISS_DA is not set
318# CONFIG_BLK_DEV_DAC960 is not set
319# CONFIG_BLK_DEV_UMEM is not set
320# CONFIG_BLK_DEV_COW_COMMON is not set
321CONFIG_BLK_DEV_LOOP=y
322# CONFIG_BLK_DEV_CRYPTOLOOP is not set
323# CONFIG_BLK_DEV_NBD is not set
324# CONFIG_BLK_DEV_SX8 is not set
325CONFIG_BLK_DEV_RAM=y
326CONFIG_BLK_DEV_RAM_COUNT=16
327CONFIG_BLK_DEV_RAM_SIZE=32768
328CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
329CONFIG_BLK_DEV_INITRD=y
330# CONFIG_CDROM_PKTCDVD is not set
331# CONFIG_ATA_OVER_ETH is not set
332
333#
334# ATA/ATAPI/MFM/RLL support
335#
336# CONFIG_IDE is not set
337
338#
339# SCSI device support
340#
341# CONFIG_RAID_ATTRS is not set
342# CONFIG_SCSI is not set
343
344#
345# Multi-device support (RAID and LVM)
346#
347# CONFIG_MD is not set
348
349#
350# Fusion MPT device support
351#
352# CONFIG_FUSION is not set
353
354#
355# IEEE 1394 (FireWire) support
356#
357# CONFIG_IEEE1394 is not set
358
359#
360# I2O device support
361#
362# CONFIG_I2O is not set
363
364#
365# Macintosh device drivers
366#
367# CONFIG_WINDFARM is not set
368
369#
370# Network device support
371#
372CONFIG_NETDEVICES=y
373# CONFIG_DUMMY is not set
374# CONFIG_BONDING is not set
375# CONFIG_EQUALIZER is not set
376# CONFIG_TUN is not set
377
378#
379# ARCnet devices
380#
381# CONFIG_ARCNET is not set
382
383#
384# PHY device support
385#
386CONFIG_PHYLIB=y
387
388#
389# MII PHY device drivers
390#
391CONFIG_MARVELL_PHY=y
392CONFIG_DAVICOM_PHY=y
393# CONFIG_QSEMI_PHY is not set
394# CONFIG_LXT_PHY is not set
395# CONFIG_CICADA_PHY is not set
396# CONFIG_VITESSE_PHY is not set
397# CONFIG_SMSC_PHY is not set
398# CONFIG_FIXED_PHY is not set
399
400#
401# Ethernet (10 or 100Mbit)
402#
403CONFIG_NET_ETHERNET=y
404CONFIG_MII=y
405# CONFIG_HAPPYMEAL is not set
406# CONFIG_SUNGEM is not set
407# CONFIG_CASSINI is not set
408# CONFIG_NET_VENDOR_3COM is not set
409
410#
411# Tulip family network device support
412#
413# CONFIG_NET_TULIP is not set
414# CONFIG_HP100 is not set
415# CONFIG_NET_PCI is not set
416CONFIG_FS_ENET=y
417# CONFIG_FS_ENET_HAS_SCC is not set
418CONFIG_FS_ENET_HAS_FCC=y
419
420#
421# Ethernet (1000 Mbit)
422#
423# CONFIG_ACENIC is not set
424# CONFIG_DL2K is not set
425CONFIG_E1000=y
426CONFIG_E1000_NAPI=y
427# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
428# CONFIG_NS83820 is not set
429# CONFIG_HAMACHI is not set
430# CONFIG_YELLOWFIN is not set
431# CONFIG_R8169 is not set
432# CONFIG_SIS190 is not set
433# CONFIG_SKGE is not set
434# CONFIG_SKY2 is not set
435# CONFIG_SK98LIN is not set
436# CONFIG_TIGON3 is not set
437# CONFIG_BNX2 is not set
438CONFIG_GIANFAR=y
439CONFIG_GFAR_NAPI=y
440
441#
442# Ethernet (10000 Mbit)
443#
444# CONFIG_CHELSIO_T1 is not set
445# CONFIG_IXGB is not set
446# CONFIG_S2IO is not set
447# CONFIG_MYRI10GE is not set
448
449#
450# Token Ring devices
451#
452# CONFIG_TR is not set
453
454#
455# Wireless LAN (non-hamradio)
456#
457# CONFIG_NET_RADIO is not set
458
459#
460# Wan interfaces
461#
462# CONFIG_WAN is not set
463# CONFIG_FDDI is not set
464# CONFIG_HIPPI is not set
465# CONFIG_PPP is not set
466# CONFIG_SLIP is not set
467# CONFIG_SHAPER is not set
468# CONFIG_NETCONSOLE is not set
469# CONFIG_NETPOLL is not set
470# CONFIG_NET_POLL_CONTROLLER is not set
471
472#
473# ISDN subsystem
474#
475# CONFIG_ISDN is not set
476
477#
478# Telephony Support
479#
480# CONFIG_PHONE is not set
481
482#
483# Input device support
484#
485CONFIG_INPUT=y
486
487#
488# Userland interfaces
489#
490# CONFIG_INPUT_MOUSEDEV is not set
491# CONFIG_INPUT_JOYDEV is not set
492# CONFIG_INPUT_TSDEV is not set
493# CONFIG_INPUT_EVDEV is not set
494# CONFIG_INPUT_EVBUG is not set
495
496#
497# Input Device Drivers
498#
499# CONFIG_INPUT_KEYBOARD is not set
500# CONFIG_INPUT_MOUSE is not set
501# CONFIG_INPUT_JOYSTICK is not set
502# CONFIG_INPUT_TOUCHSCREEN is not set
503# CONFIG_INPUT_MISC is not set
504
505#
506# Hardware I/O ports
507#
508# CONFIG_SERIO is not set
509# CONFIG_GAMEPORT is not set
510
511#
512# Character devices
513#
514# CONFIG_VT is not set
515# CONFIG_SERIAL_NONSTANDARD is not set
516
517#
518# Serial drivers
519#
520# CONFIG_SERIAL_8250 is not set
521
522#
523# Non-8250 serial port support
524#
525CONFIG_SERIAL_CORE=y
526CONFIG_SERIAL_CORE_CONSOLE=y
527CONFIG_SERIAL_CPM=y
528CONFIG_SERIAL_CPM_CONSOLE=y
529CONFIG_SERIAL_CPM_SCC1=y
530CONFIG_SERIAL_CPM_SCC2=y
531# CONFIG_SERIAL_CPM_SCC3 is not set
532# CONFIG_SERIAL_CPM_SCC4 is not set
533# CONFIG_SERIAL_CPM_SMC1 is not set
534# CONFIG_SERIAL_CPM_SMC2 is not set
535# CONFIG_SERIAL_JSM is not set
536CONFIG_UNIX98_PTYS=y
537CONFIG_LEGACY_PTYS=y
538CONFIG_LEGACY_PTY_COUNT=256
539# CONFIG_BRIQ_PANEL is not set
540
541#
542# IPMI
543#
544# CONFIG_IPMI_HANDLER is not set
545
546#
547# Watchdog Cards
548#
549# CONFIG_WATCHDOG is not set
550CONFIG_HW_RANDOM=y
551# CONFIG_NVRAM is not set
552CONFIG_GEN_RTC=y
553# CONFIG_GEN_RTC_X is not set
554# CONFIG_DTLK is not set
555# CONFIG_R3964 is not set
556# CONFIG_APPLICOM is not set
557
558#
559# Ftape, the floppy tape device driver
560#
561# CONFIG_AGP is not set
562# CONFIG_DRM is not set
563# CONFIG_RAW_DRIVER is not set
564
565#
566# TPM devices
567#
568# CONFIG_TCG_TPM is not set
569# CONFIG_TELCLOCK is not set
570
571#
572# I2C support
573#
574# CONFIG_I2C is not set
575
576#
577# SPI support
578#
579# CONFIG_SPI is not set
580# CONFIG_SPI_MASTER is not set
581
582#
583# Dallas's 1-wire bus
584#
585
586#
587# Hardware Monitoring support
588#
589CONFIG_HWMON=y
590# CONFIG_HWMON_VID is not set
591# CONFIG_SENSORS_ABITUGURU is not set
592# CONFIG_SENSORS_F71805F is not set
593# CONFIG_HWMON_DEBUG_CHIP is not set
594
595#
596# Misc devices
597#
598
599#
600# Multimedia devices
601#
602# CONFIG_VIDEO_DEV is not set
603CONFIG_VIDEO_V4L2=y
604
605#
606# Digital Video Broadcasting Devices
607#
608# CONFIG_DVB is not set
609
610#
611# Graphics support
612#
613CONFIG_FIRMWARE_EDID=y
614# CONFIG_FB is not set
615# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
616
617#
618# Sound
619#
620# CONFIG_SOUND is not set
621
622#
623# USB support
624#
625CONFIG_USB_ARCH_HAS_HCD=y
626CONFIG_USB_ARCH_HAS_OHCI=y
627CONFIG_USB_ARCH_HAS_EHCI=y
628# CONFIG_USB is not set
629
630#
631# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
632#
633
634#
635# USB Gadget Support
636#
637# CONFIG_USB_GADGET is not set
638
639#
640# MMC/SD Card support
641#
642# CONFIG_MMC is not set
643
644#
645# LED devices
646#
647# CONFIG_NEW_LEDS is not set
648
649#
650# LED drivers
651#
652
653#
654# LED Triggers
655#
656
657#
658# InfiniBand support
659#
660# CONFIG_INFINIBAND is not set
661
662#
663# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
664#
665
666#
667# Real Time Clock
668#
669# CONFIG_RTC_CLASS is not set
670
671#
672# DMA Engine support
673#
674# CONFIG_DMA_ENGINE is not set
675
676#
677# DMA Clients
678#
679
680#
681# DMA Devices
682#
683
684#
685# File systems
686#
687CONFIG_EXT2_FS=y
688# CONFIG_EXT2_FS_XATTR is not set
689# CONFIG_EXT2_FS_XIP is not set
690CONFIG_EXT3_FS=y
691CONFIG_EXT3_FS_XATTR=y
692# CONFIG_EXT3_FS_POSIX_ACL is not set
693# CONFIG_EXT3_FS_SECURITY is not set
694CONFIG_JBD=y
695# CONFIG_JBD_DEBUG is not set
696CONFIG_FS_MBCACHE=y
697# CONFIG_REISERFS_FS is not set
698# CONFIG_JFS_FS is not set
699# CONFIG_FS_POSIX_ACL is not set
700# CONFIG_XFS_FS is not set
701# CONFIG_OCFS2_FS is not set
702# CONFIG_MINIX_FS is not set
703# CONFIG_ROMFS_FS is not set
704CONFIG_INOTIFY=y
705CONFIG_INOTIFY_USER=y
706# CONFIG_QUOTA is not set
707CONFIG_DNOTIFY=y
708# CONFIG_AUTOFS_FS is not set
709# CONFIG_AUTOFS4_FS is not set
710# CONFIG_FUSE_FS is not set
711
712#
713# CD-ROM/DVD Filesystems
714#
715# CONFIG_ISO9660_FS is not set
716# CONFIG_UDF_FS is not set
717
718#
719# DOS/FAT/NT Filesystems
720#
721# CONFIG_MSDOS_FS is not set
722# CONFIG_VFAT_FS is not set
723# CONFIG_NTFS_FS is not set
724
725#
726# Pseudo filesystems
727#
728CONFIG_PROC_FS=y
729CONFIG_PROC_KCORE=y
730CONFIG_SYSFS=y
731CONFIG_TMPFS=y
732# CONFIG_HUGETLB_PAGE is not set
733CONFIG_RAMFS=y
734# CONFIG_CONFIGFS_FS is not set
735
736#
737# Miscellaneous filesystems
738#
739# CONFIG_ADFS_FS is not set
740# CONFIG_AFFS_FS is not set
741# CONFIG_HFS_FS is not set
742# CONFIG_HFSPLUS_FS is not set
743# CONFIG_BEFS_FS is not set
744# CONFIG_BFS_FS is not set
745# CONFIG_EFS_FS is not set
746# CONFIG_CRAMFS is not set
747# CONFIG_VXFS_FS is not set
748# CONFIG_HPFS_FS is not set
749# CONFIG_QNX4FS_FS is not set
750# CONFIG_SYSV_FS is not set
751# CONFIG_UFS_FS is not set
752
753#
754# Network File Systems
755#
756CONFIG_NFS_FS=y
757# CONFIG_NFS_V3 is not set
758# CONFIG_NFS_V4 is not set
759# CONFIG_NFS_DIRECTIO is not set
760# CONFIG_NFSD is not set
761CONFIG_ROOT_NFS=y
762CONFIG_LOCKD=y
763CONFIG_NFS_COMMON=y
764CONFIG_SUNRPC=y
765# CONFIG_RPCSEC_GSS_KRB5 is not set
766# CONFIG_RPCSEC_GSS_SPKM3 is not set
767# CONFIG_SMB_FS is not set
768# CONFIG_CIFS is not set
769# CONFIG_NCP_FS is not set
770# CONFIG_CODA_FS is not set
771# CONFIG_AFS_FS is not set
772# CONFIG_9P_FS is not set
773
774#
775# Partition Types
776#
777CONFIG_PARTITION_ADVANCED=y
778# CONFIG_ACORN_PARTITION is not set
779# CONFIG_OSF_PARTITION is not set
780# CONFIG_AMIGA_PARTITION is not set
781# CONFIG_ATARI_PARTITION is not set
782# CONFIG_MAC_PARTITION is not set
783# CONFIG_MSDOS_PARTITION is not set
784# CONFIG_LDM_PARTITION is not set
785# CONFIG_SGI_PARTITION is not set
786# CONFIG_ULTRIX_PARTITION is not set
787# CONFIG_SUN_PARTITION is not set
788# CONFIG_KARMA_PARTITION is not set
789# CONFIG_EFI_PARTITION is not set
790
791#
792# Native Language Support
793#
794# CONFIG_NLS is not set
795
796#
797# Library routines
798#
799# CONFIG_CRC_CCITT is not set
800# CONFIG_CRC16 is not set
801CONFIG_CRC32=y
802# CONFIG_LIBCRC32C is not set
803CONFIG_PLIST=y
804
805#
806# Instrumentation Support
807#
808# CONFIG_PROFILING is not set
809
810#
811# Kernel hacking
812#
813# CONFIG_PRINTK_TIME is not set
814# CONFIG_MAGIC_SYSRQ is not set
815# CONFIG_UNUSED_SYMBOLS is not set
816CONFIG_DEBUG_KERNEL=y
817CONFIG_LOG_BUF_SHIFT=14
818CONFIG_DETECT_SOFTLOCKUP=y
819# CONFIG_SCHEDSTATS is not set
820# CONFIG_DEBUG_SLAB is not set
821# CONFIG_DEBUG_RT_MUTEXES is not set
822# CONFIG_RT_MUTEX_TESTER is not set
823# CONFIG_DEBUG_SPINLOCK is not set
824CONFIG_DEBUG_MUTEXES=y
825# CONFIG_DEBUG_RWSEMS is not set
826# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
827# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
828# CONFIG_DEBUG_KOBJECT is not set
829# CONFIG_DEBUG_INFO is not set
830# CONFIG_DEBUG_FS is not set
831# CONFIG_DEBUG_VM is not set
832# CONFIG_UNWIND_INFO is not set
833CONFIG_FORCED_INLINING=y
834# CONFIG_RCU_TORTURE_TEST is not set
835# CONFIG_DEBUGGER is not set
836# CONFIG_KGDB_CONSOLE is not set
837# CONFIG_BDI_SWITCH is not set
838# CONFIG_BOOTX_TEXT is not set
839# CONFIG_PPC_EARLY_DEBUG is not set
840
841#
842# Security options
843#
844# CONFIG_KEYS is not set
845# CONFIG_SECURITY is not set
846
847#
848# Cryptographic options
849#
850# CONFIG_CRYPTO is not set
851
852#
853# Hardware crypto devices
854#
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 6861dde7d77b..765c8bb90ddd 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -682,7 +682,7 @@ CONFIG_SCSI_AIC7XXX_OLD=m
682# CONFIG_MEGARAID_NEWGEN is not set 682# CONFIG_MEGARAID_NEWGEN is not set
683# CONFIG_MEGARAID_LEGACY is not set 683# CONFIG_MEGARAID_LEGACY is not set
684# CONFIG_MEGARAID_SAS is not set 684# CONFIG_MEGARAID_SAS is not set
685# CONFIG_SCSI_SATA is not set 685# CONFIG_ATA is not set
686# CONFIG_SCSI_HPTIOP is not set 686# CONFIG_SCSI_HPTIOP is not set
687# CONFIG_SCSI_BUSLOGIC is not set 687# CONFIG_SCSI_BUSLOGIC is not set
688# CONFIG_SCSI_DMX3191D is not set 688# CONFIG_SCSI_DMX3191D is not set
@@ -1826,7 +1826,7 @@ CONFIG_OPROFILE=y
1826# Kernel hacking 1826# Kernel hacking
1827# 1827#
1828# CONFIG_PRINTK_TIME is not set 1828# CONFIG_PRINTK_TIME is not set
1829# CONFIG_MAGIC_SYSRQ is not set 1829CONFIG_MAGIC_SYSRQ=y
1830# CONFIG_UNUSED_SYMBOLS is not set 1830# CONFIG_UNUSED_SYMBOLS is not set
1831CONFIG_DEBUG_KERNEL=y 1831CONFIG_DEBUG_KERNEL=y
1832CONFIG_LOG_BUF_SHIFT=14 1832CONFIG_LOG_BUF_SHIFT=14
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 7517d0c5303f..be11df7c11aa 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -520,23 +520,23 @@ CONFIG_SCSI_ISCSI_ATTRS=m
520# CONFIG_MEGARAID_NEWGEN is not set 520# CONFIG_MEGARAID_NEWGEN is not set
521# CONFIG_MEGARAID_LEGACY is not set 521# CONFIG_MEGARAID_LEGACY is not set
522# CONFIG_MEGARAID_SAS is not set 522# CONFIG_MEGARAID_SAS is not set
523CONFIG_SCSI_SATA=y 523CONFIG_ATA=y
524# CONFIG_SCSI_SATA_AHCI is not set 524# CONFIG_SATA_AHCI is not set
525CONFIG_SCSI_SATA_SVW=y 525CONFIG_SATA_SVW=y
526# CONFIG_SCSI_ATA_PIIX is not set 526# CONFIG_SCSI_ATA_PIIX is not set
527# CONFIG_SCSI_SATA_MV is not set 527# CONFIG_SATA_MV is not set
528# CONFIG_SCSI_SATA_NV is not set 528# CONFIG_SATA_NV is not set
529# CONFIG_SCSI_PDC_ADMA is not set 529# CONFIG_SCSI_PDC_ADMA is not set
530# CONFIG_SCSI_HPTIOP is not set 530# CONFIG_SCSI_HPTIOP is not set
531# CONFIG_SCSI_SATA_QSTOR is not set 531# CONFIG_SATA_QSTOR is not set
532# CONFIG_SCSI_SATA_PROMISE is not set 532# CONFIG_SATA_PROMISE is not set
533# CONFIG_SCSI_SATA_SX4 is not set 533# CONFIG_SATA_SX4 is not set
534# CONFIG_SCSI_SATA_SIL is not set 534# CONFIG_SATA_SIL is not set
535# CONFIG_SCSI_SATA_SIL24 is not set 535# CONFIG_SATA_SIL24 is not set
536# CONFIG_SCSI_SATA_SIS is not set 536# CONFIG_SATA_SIS is not set
537# CONFIG_SCSI_SATA_ULI is not set 537# CONFIG_SATA_ULI is not set
538# CONFIG_SCSI_SATA_VIA is not set 538# CONFIG_SATA_VIA is not set
539# CONFIG_SCSI_SATA_VITESSE is not set 539# CONFIG_SATA_VITESSE is not set
540# CONFIG_SCSI_BUSLOGIC is not set 540# CONFIG_SCSI_BUSLOGIC is not set
541# CONFIG_SCSI_DMX3191D is not set 541# CONFIG_SCSI_DMX3191D is not set
542# CONFIG_SCSI_EATA is not set 542# CONFIG_SCSI_EATA is not set
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index a8cdf312e1b0..44175fb7adec 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -506,7 +506,7 @@ CONFIG_SCSI_SAS_ATTRS=m
506# CONFIG_MEGARAID_NEWGEN is not set 506# CONFIG_MEGARAID_NEWGEN is not set
507# CONFIG_MEGARAID_LEGACY is not set 507# CONFIG_MEGARAID_LEGACY is not set
508# CONFIG_MEGARAID_SAS is not set 508# CONFIG_MEGARAID_SAS is not set
509# CONFIG_SCSI_SATA is not set 509# CONFIG_ATA is not set
510# CONFIG_SCSI_HPTIOP is not set 510# CONFIG_SCSI_HPTIOP is not set
511# CONFIG_SCSI_BUSLOGIC is not set 511# CONFIG_SCSI_BUSLOGIC is not set
512# CONFIG_SCSI_DMX3191D is not set 512# CONFIG_SCSI_DMX3191D is not set
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index b4432332341f..c3f58f2f9f52 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -777,7 +777,6 @@ unsigned int irq_alloc_virt(struct irq_host *host,
777{ 777{
778 unsigned long flags; 778 unsigned long flags;
779 unsigned int i, j, found = NO_IRQ; 779 unsigned int i, j, found = NO_IRQ;
780 unsigned int limit = irq_virq_count - count;
781 780
782 if (count == 0 || count > (irq_virq_count - NUM_ISA_INTERRUPTS)) 781 if (count == 0 || count > (irq_virq_count - NUM_ISA_INTERRUPTS))
783 return NO_IRQ; 782 return NO_IRQ;
@@ -794,14 +793,16 @@ unsigned int irq_alloc_virt(struct irq_host *host,
794 /* Look for count consecutive numbers in the allocatable 793 /* Look for count consecutive numbers in the allocatable
795 * (non-legacy) space 794 * (non-legacy) space
796 */ 795 */
797 for (i = NUM_ISA_INTERRUPTS; i <= limit; ) { 796 for (i = NUM_ISA_INTERRUPTS, j = 0; i < irq_virq_count; i++) {
798 for (j = i; j < (i + count); j++) 797 if (irq_map[i].host != NULL)
799 if (irq_map[j].host != NULL) { 798 j = 0;
800 i = j + 1; 799 else
801 continue; 800 j++;
802 } 801
803 found = i; 802 if (j == count) {
804 break; 803 found = i - count + 1;
804 break;
805 }
805 } 806 }
806 if (found == NO_IRQ) { 807 if (found == NO_IRQ) {
807 spin_unlock_irqrestore(&irq_big_lock, flags); 808 spin_unlock_irqrestore(&irq_big_lock, flags);
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index dea75d73f983..975102a020d9 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -526,9 +526,7 @@ static void do_syscall_trace(void)
526 526
527void do_syscall_trace_enter(struct pt_regs *regs) 527void do_syscall_trace_enter(struct pt_regs *regs)
528{ 528{
529#ifdef CONFIG_PPC64
530 secure_computing(regs->gpr[0]); 529 secure_computing(regs->gpr[0]);
531#endif
532 530
533 if (test_thread_flag(TIF_SYSCALL_TRACE) 531 if (test_thread_flag(TIF_SYSCALL_TRACE)
534 && (current->ptrace & PT_PTRACED)) 532 && (current->ptrace & PT_PTRACED))
@@ -548,12 +546,8 @@ void do_syscall_trace_enter(struct pt_regs *regs)
548 546
549void do_syscall_trace_leave(struct pt_regs *regs) 547void do_syscall_trace_leave(struct pt_regs *regs)
550{ 548{
551#ifdef CONFIG_PPC32
552 secure_computing(regs->gpr[0]);
553#endif
554
555 if (unlikely(current->audit_context)) 549 if (unlikely(current->audit_context))
556 audit_syscall_exit((regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS, 550 audit_syscall_exit((regs->ccr&0x10000000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
557 regs->result); 551 regs->result);
558 552
559 if ((test_thread_flag(TIF_SYSCALL_TRACE) 553 if ((test_thread_flag(TIF_SYSCALL_TRACE)
@@ -561,8 +555,3 @@ void do_syscall_trace_leave(struct pt_regs *regs)
561 && (current->ptrace & PT_PTRACED)) 555 && (current->ptrace & PT_PTRACED))
562 do_syscall_trace(); 556 do_syscall_trace();
563} 557}
564
565#ifdef CONFIG_PPC32
566EXPORT_SYMBOL(do_syscall_trace_enter);
567EXPORT_SYMBOL(do_syscall_trace_leave);
568#endif
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 406f308ddead..d45a168bdaca 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -25,8 +25,8 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
25/* SMT stuff */ 25/* SMT stuff */
26 26
27#ifdef CONFIG_PPC_MULTIPLATFORM 27#ifdef CONFIG_PPC_MULTIPLATFORM
28/* default to snooze disabled */ 28/* Time in microseconds we delay before sleeping in the idle loop */
29DEFINE_PER_CPU(unsigned long, smt_snooze_delay); 29DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 };
30 30
31static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, 31static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf,
32 size_t count) 32 size_t count)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 8b278d85ca4e..85b9244a098c 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1041,6 +1041,48 @@ void __init time_init(void)
1041 set_dec(tb_ticks_per_jiffy); 1041 set_dec(tb_ticks_per_jiffy);
1042} 1042}
1043 1043
1044#ifdef CONFIG_RTC_CLASS
1045static int set_rtc_class_time(struct rtc_time *tm)
1046{
1047 int err;
1048 struct class_device *class_dev =
1049 rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
1050
1051 if (class_dev == NULL)
1052 return -ENODEV;
1053
1054 err = rtc_set_time(class_dev, tm);
1055
1056 rtc_class_close(class_dev);
1057
1058 return 0;
1059}
1060
1061static void get_rtc_class_time(struct rtc_time *tm)
1062{
1063 int err;
1064 struct class_device *class_dev =
1065 rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
1066
1067 if (class_dev == NULL)
1068 return;
1069
1070 err = rtc_read_time(class_dev, tm);
1071
1072 rtc_class_close(class_dev);
1073
1074 return;
1075}
1076
1077int __init rtc_class_hookup(void)
1078{
1079 ppc_md.get_rtc_time = get_rtc_class_time;
1080 ppc_md.set_rtc_time = set_rtc_class_time;
1081
1082 return 0;
1083}
1084#endif /* CONFIG_RTC_CLASS */
1085
1044 1086
1045#define FEBRUARY 2 1087#define FEBRUARY 2
1046#define STARTOFTIME 1970 1088#define STARTOFTIME 1970
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 336dd191f768..a0360ae10d0c 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -14,9 +14,15 @@ endif
14obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ 14obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
15 memcpy_64.o usercopy_64.o mem_64.o string.o \ 15 memcpy_64.o usercopy_64.o mem_64.o string.o \
16 strcase.o 16 strcase.o
17obj-$(CONFIG_QUICC_ENGINE) += rheap.o
17obj-$(CONFIG_XMON) += sstep.o 18obj-$(CONFIG_XMON) += sstep.o
18 19
19ifeq ($(CONFIG_PPC64),y) 20ifeq ($(CONFIG_PPC64),y)
20obj-$(CONFIG_SMP) += locks.o 21obj-$(CONFIG_SMP) += locks.o
21obj-$(CONFIG_DEBUG_KERNEL) += sstep.o 22obj-$(CONFIG_DEBUG_KERNEL) += sstep.o
22endif 23endif
24
25# Temporary hack until we have migrated to asm-powerpc
26ifeq ($(CONFIG_PPC_MERGE),y)
27obj-$(CONFIG_CPM2) += rheap.o
28endif
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 31e511856dc5..57bf991ccd6e 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -423,17 +423,21 @@ void *rh_detach_region(rh_info_t * info, void *start, int size)
423 return (void *)s; 423 return (void *)s;
424} 424}
425 425
426void *rh_alloc(rh_info_t * info, int size, const char *owner) 426void *rh_alloc_align(rh_info_t * info, int size, int alignment, const char *owner)
427{ 427{
428 struct list_head *l; 428 struct list_head *l;
429 rh_block_t *blk; 429 rh_block_t *blk;
430 rh_block_t *newblk; 430 rh_block_t *newblk;
431 void *start; 431 void *start;
432 432
433 /* Validate size */ 433 /* Validate size, (must be power of two) */
434 if (size <= 0) 434 if (size <= 0 || (alignment & (alignment - 1)) != 0)
435 return ERR_PTR(-EINVAL); 435 return ERR_PTR(-EINVAL);
436 436
437 /* given alignment larger that default rheap alignment */
438 if (alignment > info->alignment)
439 size += alignment - 1;
440
437 /* Align to configured alignment */ 441 /* Align to configured alignment */
438 size = (size + (info->alignment - 1)) & ~(info->alignment - 1); 442 size = (size + (info->alignment - 1)) & ~(info->alignment - 1);
439 443
@@ -476,15 +480,27 @@ void *rh_alloc(rh_info_t * info, int size, const char *owner)
476 480
477 attach_taken_block(info, newblk); 481 attach_taken_block(info, newblk);
478 482
483 /* for larger alignment return fixed up pointer */
484 /* this is no problem with the deallocator since */
485 /* we scan for pointers that lie in the blocks */
486 if (alignment > info->alignment)
487 start = (void *)(((unsigned long)start + alignment - 1) &
488 ~(alignment - 1));
489
479 return start; 490 return start;
480} 491}
481 492
493void *rh_alloc(rh_info_t * info, int size, const char *owner)
494{
495 return rh_alloc_align(info, size, info->alignment, owner);
496}
497
482/* allocate at precisely the given address */ 498/* allocate at precisely the given address */
483void *rh_alloc_fixed(rh_info_t * info, void *start, int size, const char *owner) 499void *rh_alloc_fixed(rh_info_t * info, void *start, int size, const char *owner)
484{ 500{
485 struct list_head *l; 501 struct list_head *l;
486 rh_block_t *blk, *newblk1, *newblk2; 502 rh_block_t *blk, *newblk1, *newblk2;
487 unsigned long s, e, m, bs, be; 503 unsigned long s, e, m, bs = 0, be = 0;
488 504
489 /* Validate size */ 505 /* Validate size */
490 if (size <= 0) 506 if (size <= 0)
diff --git a/arch/powerpc/math-emu/Makefile b/arch/powerpc/math-emu/Makefile
index 754143e8936b..29bc9126241b 100644
--- a/arch/powerpc/math-emu/Makefile
+++ b/arch/powerpc/math-emu/Makefile
@@ -11,3 +11,6 @@ obj-$(CONFIG_MATH_EMULATION) += fabs.o fadd.o fadds.o fcmpo.o fcmpu.o \
11 mcrfs.o mffs.o mtfsb0.o mtfsb1.o \ 11 mcrfs.o mffs.o mtfsb0.o mtfsb1.o \
12 mtfsf.o mtfsfi.o stfiwx.o stfs.o \ 12 mtfsf.o mtfsfi.o stfiwx.o stfs.o \
13 udivmodti4.o 13 udivmodti4.o
14
15CFLAGS_fabs.o = -fno-builtin-fabs
16CFLAGS_math.o = -fno-builtin-fabs
diff --git a/arch/powerpc/oprofile/backtrace.c b/arch/powerpc/oprofile/backtrace.c
index 75f57bc96b40..b4278cfd1f80 100644
--- a/arch/powerpc/oprofile/backtrace.c
+++ b/arch/powerpc/oprofile/backtrace.c
@@ -11,6 +11,7 @@
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <asm/processor.h> 12#include <asm/processor.h>
13#include <asm/uaccess.h> 13#include <asm/uaccess.h>
14#include <asm/compat.h>
14 15
15#define STACK_SP(STACK) *(STACK) 16#define STACK_SP(STACK) *(STACK)
16 17
@@ -26,8 +27,9 @@
26static unsigned int user_getsp32(unsigned int sp, int is_first) 27static unsigned int user_getsp32(unsigned int sp, int is_first)
27{ 28{
28 unsigned int stack_frame[2]; 29 unsigned int stack_frame[2];
30 void __user *p = compat_ptr(sp);
29 31
30 if (!access_ok(VERIFY_READ, sp, sizeof(stack_frame))) 32 if (!access_ok(VERIFY_READ, p, sizeof(stack_frame)))
31 return 0; 33 return 0;
32 34
33 /* 35 /*
@@ -35,8 +37,7 @@ static unsigned int user_getsp32(unsigned int sp, int is_first)
35 * which means that we've done all that we can do from 37 * which means that we've done all that we can do from
36 * interrupt context. 38 * interrupt context.
37 */ 39 */
38 if (__copy_from_user_inatomic(stack_frame, (void *)(long)sp, 40 if (__copy_from_user_inatomic(stack_frame, p, sizeof(stack_frame)))
39 sizeof(stack_frame)))
40 return 0; 41 return 0;
41 42
42 if (!is_first) 43 if (!is_first)
@@ -54,10 +55,10 @@ static unsigned long user_getsp64(unsigned long sp, int is_first)
54{ 55{
55 unsigned long stack_frame[3]; 56 unsigned long stack_frame[3];
56 57
57 if (!access_ok(VERIFY_READ, sp, sizeof(stack_frame))) 58 if (!access_ok(VERIFY_READ, (void __user *)sp, sizeof(stack_frame)))
58 return 0; 59 return 0;
59 60
60 if (__copy_from_user_inatomic(stack_frame, (void *)sp, 61 if (__copy_from_user_inatomic(stack_frame, (void __user *)sp,
61 sizeof(stack_frame))) 62 sizeof(stack_frame)))
62 return 0; 63 return 0;
63 64
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 969fbb6d8c46..8c676d763bb0 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(void)
109 return 1; 109 return 1;
110} 110}
111 111
112#ifdef CONFIG_RTC_CLASS
113late_initcall(rtc_class_hookup);
114#endif
115
112define_machine(mpc834x_itx) { 116define_machine(mpc834x_itx) {
113 .name = "MPC834x ITX", 117 .name = "MPC834x ITX",
114 .probe = mpc834x_itx_probe, 118 .probe = mpc834x_itx_probe,
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index c3268d9877e4..0584f3c7e884 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -11,6 +11,12 @@ config MPC8540_ADS
11 help 11 help
12 This option enables support for the MPC 8540 ADS board 12 This option enables support for the MPC 8540 ADS board
13 13
14config MPC8560_ADS
15 bool "Freescale MPC8560 ADS"
16 select DEFAULT_UIMAGE
17 help
18 This option enables support for the MPC 8560 ADS board
19
14config MPC85xx_CDS 20config MPC85xx_CDS
15 bool "Freescale MPC85xx CDS" 21 bool "Freescale MPC85xx CDS"
16 select DEFAULT_UIMAGE 22 select DEFAULT_UIMAGE
@@ -25,6 +31,11 @@ config MPC8540
25 select PPC_INDIRECT_PCI 31 select PPC_INDIRECT_PCI
26 default y if MPC8540_ADS || MPC85xx_CDS 32 default y if MPC8540_ADS || MPC85xx_CDS
27 33
34config MPC8560
35 bool
36 select PPC_INDIRECT_PCI
37 default y if MPC8560_ADS
38
28config PPC_INDIRECT_PCI_BE 39config PPC_INDIRECT_PCI_BE
29 bool 40 bool
30 depends on PPC_85xx 41 depends on PPC_85xx
@@ -34,4 +45,14 @@ config MPIC
34 bool 45 bool
35 default y 46 default y
36 47
48config CPM2
49 bool
50 depends on MPC8560
51 default y
52 help
53 The CPM2 (Communications Processor Module) is a coprocessor on
54 embedded CPUs made by Motorola. Selecting this option means that
55 you wish to build a kernel for a machine with a CPM2 coprocessor
56 on it.
57
37endmenu 58endmenu
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 7615aa59c78b..282f5d0d0152 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -3,4 +3,5 @@
3# 3#
4obj-$(CONFIG_PPC_85xx) += misc.o pci.o 4obj-$(CONFIG_PPC_85xx) += misc.o pci.o
5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o 5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
6obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o 7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index cae6b73357d5..28070e7ae507 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -32,6 +32,13 @@
32#include <sysdev/fsl_soc.h> 32#include <sysdev/fsl_soc.h>
33#include "mpc85xx.h" 33#include "mpc85xx.h"
34 34
35#ifdef CONFIG_CPM2
36#include <linux/fs_enet_pd.h>
37#include <asm/cpm2.h>
38#include <sysdev/cpm2_pic.h>
39#include <asm/fs_pd.h>
40#endif
41
35#ifndef CONFIG_PCI 42#ifndef CONFIG_PCI
36unsigned long isa_io_base = 0; 43unsigned long isa_io_base = 0;
37unsigned long isa_mem_base = 0; 44unsigned long isa_mem_base = 0;
@@ -57,12 +64,29 @@ mpc85xx_pcibios_fixup(void)
57} 64}
58#endif /* CONFIG_PCI */ 65#endif /* CONFIG_PCI */
59 66
67#ifdef CONFIG_CPM2
68
69static void cpm2_cascade(unsigned int irq, struct irq_desc *desc,
70 struct pt_regs *regs)
71{
72 int cascade_irq;
73
74 while ((cascade_irq = cpm2_get_irq(regs)) >= 0) {
75 generic_handle_irq(cascade_irq, regs);
76 }
77 desc->chip->eoi(irq);
78}
79
80#endif /* CONFIG_CPM2 */
60 81
61void __init mpc85xx_ads_pic_init(void) 82void __init mpc85xx_ads_pic_init(void)
62{ 83{
63 struct mpic *mpic; 84 struct mpic *mpic;
64 struct resource r; 85 struct resource r;
65 struct device_node *np = NULL; 86 struct device_node *np = NULL;
87#ifdef CONFIG_CPM2
88 int irq;
89#endif
66 90
67 np = of_find_node_by_type(np, "open-pic"); 91 np = of_find_node_by_type(np, "open-pic");
68 92
@@ -104,11 +128,103 @@ void __init mpc85xx_ads_pic_init(void)
104 mpic_assign_isu(mpic, 14, r.start + 0x10100); 128 mpic_assign_isu(mpic, 14, r.start + 0x10100);
105 129
106 mpic_init(mpic); 130 mpic_init(mpic);
131
132#ifdef CONFIG_CPM2
133 /* Setup CPM2 PIC */
134 np = of_find_node_by_type(NULL, "cpm-pic");
135 if (np == NULL) {
136 printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
137 return;
138 }
139 irq = irq_of_parse_and_map(np, 0);
140
141 cpm2_pic_init(np);
142 set_irq_chained_handler(irq, cpm2_cascade);
143#endif
107} 144}
108 145
109/* 146/*
110 * Setup the architecture 147 * Setup the architecture
111 */ 148 */
149#ifdef CONFIG_CPM2
150void init_fcc_ioports(struct fs_platform_info *fpi)
151{
152 struct io_port *io = cpm2_map(im_ioport);
153 int fcc_no = fs_get_fcc_index(fpi->fs_no);
154 int target;
155 u32 tempval;
156
157 switch(fcc_no) {
158 case 1:
159 tempval = in_be32(&io->iop_pdirb);
160 tempval &= ~PB2_DIRB0;
161 tempval |= PB2_DIRB1;
162 out_be32(&io->iop_pdirb, tempval);
163
164 tempval = in_be32(&io->iop_psorb);
165 tempval &= ~PB2_PSORB0;
166 tempval |= PB2_PSORB1;
167 out_be32(&io->iop_psorb, tempval);
168
169 tempval = in_be32(&io->iop_pparb);
170 tempval |= (PB2_DIRB0 | PB2_DIRB1);
171 out_be32(&io->iop_pparb, tempval);
172
173 target = CPM_CLK_FCC2;
174 break;
175 case 2:
176 tempval = in_be32(&io->iop_pdirb);
177 tempval &= ~PB3_DIRB0;
178 tempval |= PB3_DIRB1;
179 out_be32(&io->iop_pdirb, tempval);
180
181 tempval = in_be32(&io->iop_psorb);
182 tempval &= ~PB3_PSORB0;
183 tempval |= PB3_PSORB1;
184 out_be32(&io->iop_psorb, tempval);
185
186 tempval = in_be32(&io->iop_pparb);
187 tempval |= (PB3_DIRB0 | PB3_DIRB1);
188 out_be32(&io->iop_pparb, tempval);
189
190 tempval = in_be32(&io->iop_pdirc);
191 tempval |= PC3_DIRC1;
192 out_be32(&io->iop_pdirc, tempval);
193
194 tempval = in_be32(&io->iop_pparc);
195 tempval |= PC3_DIRC1;
196 out_be32(&io->iop_pparc, tempval);
197
198 target = CPM_CLK_FCC3;
199 break;
200 default:
201 printk(KERN_ERR "init_fcc_ioports: invalid FCC number\n");
202 return;
203 }
204
205 /* Port C has clocks...... */
206 tempval = in_be32(&io->iop_psorc);
207 tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
208 out_be32(&io->iop_psorc, tempval);
209
210 tempval = in_be32(&io->iop_pdirc);
211 tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
212 out_be32(&io->iop_pdirc, tempval);
213 tempval = in_be32(&io->iop_pparc);
214 tempval |= (PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
215 out_be32(&io->iop_pparc, tempval);
216
217 cpm2_unmap(io);
218
219 /* Configure Serial Interface clock routing.
220 * First, clear FCC bits to zero,
221 * then set the ones we want.
222 */
223 cpm2_clk_setup(target, fpi->clk_rx, CPM_CLK_RX);
224 cpm2_clk_setup(target, fpi->clk_tx, CPM_CLK_TX);
225}
226#endif
227
112static void __init mpc85xx_ads_setup_arch(void) 228static void __init mpc85xx_ads_setup_arch(void)
113{ 229{
114 struct device_node *cpu; 230 struct device_node *cpu;
@@ -131,6 +247,10 @@ static void __init mpc85xx_ads_setup_arch(void)
131 of_node_put(cpu); 247 of_node_put(cpu);
132 } 248 }
133 249
250#ifdef CONFIG_CPM2
251 cpm2_reset();
252#endif
253
134#ifdef CONFIG_PCI 254#ifdef CONFIG_PCI
135 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 255 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
136 add_bridge(np); 256 add_bridge(np);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.h b/arch/powerpc/platforms/85xx/mpc85xx_ads.h
new file mode 100644
index 000000000000..effcbf78f851
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.h
@@ -0,0 +1,61 @@
1/*
2 * MPC85xx ADS board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
7 *
8 * 2006 (c) MontaVista Software, Inc.
9 * Vitaly Bordug <vbordug@ru.mvista.com>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 *
16 */
17
18#ifndef __MACH_MPC85XXADS_H
19#define __MACH_MPC85XXADS_H
20
21#include <linux/config.h>
22#include <linux/initrd.h>
23#include <sysdev/fsl_soc.h>
24
25#define BCSR_ADDR ((uint)0xf8000000)
26#define BCSR_SIZE ((uint)(32 * 1024))
27
28#ifdef CONFIG_CPM2
29
30#define MPC85xx_CPM_OFFSET (0x80000)
31
32#define CPM_MAP_ADDR (get_immrbase() + MPC85xx_CPM_OFFSET)
33#define CPM_IRQ_OFFSET 60
34
35#define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET)
36#define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET)
37#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET)
38#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET)
39#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET)
40#define SIU_INT_SCC4 ((uint)0x2b+CPM_IRQ_OFFSET)
41
42/* FCC1 Clock Source Configuration. These can be
43 * redefined in the board specific file.
44 * Can only choose from CLK9-12 */
45#define F1_RXCLK 12
46#define F1_TXCLK 11
47
48/* FCC2 Clock Source Configuration. These can be
49 * redefined in the board specific file.
50 * Can only choose from CLK13-16 */
51#define F2_RXCLK 13
52#define F2_TXCLK 14
53
54/* FCC3 Clock Source Configuration. These can be
55 * redefined in the board specific file.
56 * Can only choose from CLK13-16 */
57#define F3_RXCLK 15
58#define F3_TXCLK 16
59
60#endif /* CONFIG_CPM2 */
61#endif /* __MACH_MPC85XXADS_H */
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 3bd36d46ab4a..0f5c8ebc7fc3 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -538,7 +538,7 @@ static void __iomem * __init map_spe_prop(struct spu *spu,
538 538
539 const void *p; 539 const void *p;
540 int proplen; 540 int proplen;
541 void* ret = NULL; 541 void __iomem *ret = NULL;
542 int err = 0; 542 int err = 0;
543 543
544 p = get_property(n, name, &proplen); 544 p = get_property(n, name, &proplen);
@@ -562,7 +562,7 @@ static void spu_unmap(struct spu *spu)
562 iounmap(spu->priv2); 562 iounmap(spu->priv2);
563 iounmap(spu->priv1); 563 iounmap(spu->priv1);
564 iounmap(spu->problem); 564 iounmap(spu->problem);
565 iounmap((u8 __iomem *)spu->local_store); 565 iounmap((__force u8 __iomem *)spu->local_store);
566} 566}
567 567
568/* This function shall be abstracted for HV platforms */ 568/* This function shall be abstracted for HV platforms */
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 58e794f9da1b..51fd197ab5dd 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -1342,7 +1342,7 @@ static u64 spufs_id_get(void *data)
1342 1342
1343 return num; 1343 return num;
1344} 1344}
1345DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, 0, "0x%llx\n") 1345DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, NULL, "0x%llx\n")
1346 1346
1347struct tree_descr spufs_dir_contents[] = { 1347struct tree_descr spufs_dir_contents[] = {
1348 { "mem", &spufs_mem_fops, 0666, }, 1348 { "mem", &spufs_mem_fops, 0666, },
diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c
index c8670f519734..efc452e71ab0 100644
--- a/arch/powerpc/platforms/cell/spufs/hw_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c
@@ -234,7 +234,7 @@ static void spu_hw_runcntl_stop(struct spu_context *ctx)
234 234
235static int spu_hw_set_mfc_query(struct spu_context * ctx, u32 mask, u32 mode) 235static int spu_hw_set_mfc_query(struct spu_context * ctx, u32 mask, u32 mode)
236{ 236{
237 struct spu_problem *prob = ctx->spu->problem; 237 struct spu_problem __iomem *prob = ctx->spu->problem;
238 int ret; 238 int ret;
239 239
240 spin_lock_irq(&ctx->spu->register_lock); 240 spin_lock_irq(&ctx->spu->register_lock);
@@ -263,7 +263,7 @@ static int spu_hw_send_mfc_command(struct spu_context *ctx,
263 struct mfc_dma_command *cmd) 263 struct mfc_dma_command *cmd)
264{ 264{
265 u32 status; 265 u32 status;
266 struct spu_problem *prob = ctx->spu->problem; 266 struct spu_problem __iomem *prob = ctx->spu->problem;
267 267
268 spin_lock_irq(&ctx->spu->register_lock); 268 spin_lock_irq(&ctx->spu->register_lock);
269 out_be32(&prob->mfc_lsa_W, cmd->lsa); 269 out_be32(&prob->mfc_lsa_W, cmd->lsa);
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index c3aa46b8e2b9..1b827618e05f 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -96,14 +96,14 @@ static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off)
96 1UL; 96 1UL;
97} 97}
98 98
99static unsigned long u3_agp_cfg_access(struct pci_controller* hose, 99static volatile void __iomem *u3_agp_cfg_access(struct pci_controller* hose,
100 u8 bus, u8 dev_fn, u8 offset) 100 u8 bus, u8 dev_fn, u8 offset)
101{ 101{
102 unsigned int caddr; 102 unsigned int caddr;
103 103
104 if (bus == hose->first_busno) { 104 if (bus == hose->first_busno) {
105 if (dev_fn < (11 << 3)) 105 if (dev_fn < (11 << 3))
106 return 0; 106 return NULL;
107 caddr = u3_agp_cfa0(dev_fn, offset); 107 caddr = u3_agp_cfa0(dev_fn, offset);
108 } else 108 } else
109 caddr = u3_agp_cfa1(bus, dev_fn, offset); 109 caddr = u3_agp_cfa1(bus, dev_fn, offset);
@@ -114,14 +114,14 @@ static unsigned long u3_agp_cfg_access(struct pci_controller* hose,
114 } while (in_le32(hose->cfg_addr) != caddr); 114 } while (in_le32(hose->cfg_addr) != caddr);
115 115
116 offset &= 0x07; 116 offset &= 0x07;
117 return ((unsigned long)hose->cfg_data) + offset; 117 return hose->cfg_data + offset;
118} 118}
119 119
120static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, 120static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn,
121 int offset, int len, u32 *val) 121 int offset, int len, u32 *val)
122{ 122{
123 struct pci_controller *hose; 123 struct pci_controller *hose;
124 unsigned long addr; 124 volatile void __iomem *addr;
125 125
126 hose = pci_bus_to_host(bus); 126 hose = pci_bus_to_host(bus);
127 if (hose == NULL) 127 if (hose == NULL)
@@ -136,13 +136,13 @@ static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn,
136 */ 136 */
137 switch (len) { 137 switch (len) {
138 case 1: 138 case 1:
139 *val = in_8((u8 *)addr); 139 *val = in_8(addr);
140 break; 140 break;
141 case 2: 141 case 2:
142 *val = in_le16((u16 *)addr); 142 *val = in_le16(addr);
143 break; 143 break;
144 default: 144 default:
145 *val = in_le32((u32 *)addr); 145 *val = in_le32(addr);
146 break; 146 break;
147 } 147 }
148 return PCIBIOS_SUCCESSFUL; 148 return PCIBIOS_SUCCESSFUL;
@@ -152,7 +152,7 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn,
152 int offset, int len, u32 val) 152 int offset, int len, u32 val)
153{ 153{
154 struct pci_controller *hose; 154 struct pci_controller *hose;
155 unsigned long addr; 155 volatile void __iomem *addr;
156 156
157 hose = pci_bus_to_host(bus); 157 hose = pci_bus_to_host(bus);
158 if (hose == NULL) 158 if (hose == NULL)
@@ -167,16 +167,16 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn,
167 */ 167 */
168 switch (len) { 168 switch (len) {
169 case 1: 169 case 1:
170 out_8((u8 *)addr, val); 170 out_8(addr, val);
171 (void) in_8((u8 *)addr); 171 (void) in_8(addr);
172 break; 172 break;
173 case 2: 173 case 2:
174 out_le16((u16 *)addr, val); 174 out_le16(addr, val);
175 (void) in_le16((u16 *)addr); 175 (void) in_le16(addr);
176 break; 176 break;
177 default: 177 default:
178 out_le32((u32 *)addr, val); 178 out_le32(addr, val);
179 (void) in_le32((u32 *)addr); 179 (void) in_le32(addr);
180 break; 180 break;
181 } 181 }
182 return PCIBIOS_SUCCESSFUL; 182 return PCIBIOS_SUCCESSFUL;
@@ -198,22 +198,22 @@ static unsigned long u3_ht_cfa1(u8 bus, u8 devfn, u8 off)
198 return u3_ht_cfa0(devfn, off) + (bus << 16) + 0x01000000UL; 198 return u3_ht_cfa0(devfn, off) + (bus << 16) + 0x01000000UL;
199} 199}
200 200
201static unsigned long u3_ht_cfg_access(struct pci_controller* hose, 201static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose,
202 u8 bus, u8 devfn, u8 offset) 202 u8 bus, u8 devfn, u8 offset)
203{ 203{
204 if (bus == hose->first_busno) { 204 if (bus == hose->first_busno) {
205 if (PCI_SLOT(devfn) == 0) 205 if (PCI_SLOT(devfn) == 0)
206 return 0; 206 return NULL;
207 return ((unsigned long)hose->cfg_data) + u3_ht_cfa0(devfn, offset); 207 return hose->cfg_data + u3_ht_cfa0(devfn, offset);
208 } else 208 } else
209 return ((unsigned long)hose->cfg_data) + u3_ht_cfa1(bus, devfn, offset); 209 return hose->cfg_data + u3_ht_cfa1(bus, devfn, offset);
210} 210}
211 211
212static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, 212static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
213 int offset, int len, u32 *val) 213 int offset, int len, u32 *val)
214{ 214{
215 struct pci_controller *hose; 215 struct pci_controller *hose;
216 unsigned long addr; 216 volatile void __iomem *addr;
217 217
218 hose = pci_bus_to_host(bus); 218 hose = pci_bus_to_host(bus);
219 if (hose == NULL) 219 if (hose == NULL)
@@ -232,13 +232,13 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
232 */ 232 */
233 switch (len) { 233 switch (len) {
234 case 1: 234 case 1:
235 *val = in_8((u8 *)addr); 235 *val = in_8(addr);
236 break; 236 break;
237 case 2: 237 case 2:
238 *val = in_le16((u16 *)addr); 238 *val = in_le16(addr);
239 break; 239 break;
240 default: 240 default:
241 *val = in_le32((u32 *)addr); 241 *val = in_le32(addr);
242 break; 242 break;
243 } 243 }
244 return PCIBIOS_SUCCESSFUL; 244 return PCIBIOS_SUCCESSFUL;
@@ -248,7 +248,7 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
248 int offset, int len, u32 val) 248 int offset, int len, u32 val)
249{ 249{
250 struct pci_controller *hose; 250 struct pci_controller *hose;
251 unsigned long addr; 251 volatile void __iomem *addr;
252 252
253 hose = pci_bus_to_host(bus); 253 hose = pci_bus_to_host(bus);
254 if (hose == NULL) 254 if (hose == NULL)
@@ -266,16 +266,16 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
266 */ 266 */
267 switch (len) { 267 switch (len) {
268 case 1: 268 case 1:
269 out_8((u8 *)addr, val); 269 out_8(addr, val);
270 (void) in_8((u8 *)addr); 270 (void) in_8(addr);
271 break; 271 break;
272 case 2: 272 case 2:
273 out_le16((u16 *)addr, val); 273 out_le16(addr, val);
274 (void) in_le16((u16 *)addr); 274 (void) in_le16(addr);
275 break; 275 break;
276 default: 276 default:
277 out_le32((u32 *)addr, val); 277 out_le32(addr, val);
278 (void) in_le32((u32 *)addr); 278 (void) in_le32(addr);
279 break; 279 break;
280 } 280 }
281 return PCIBIOS_SUCCESSFUL; 281 return PCIBIOS_SUCCESSFUL;
@@ -315,7 +315,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
315 * the reg address cell, we shall fix that by killing struct 315 * the reg address cell, we shall fix that by killing struct
316 * reg_property and using some accessor functions instead 316 * reg_property and using some accessor functions instead
317 */ 317 */
318 hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, 0x02000000); 318 hose->cfg_data = ioremap(0xf2000000, 0x02000000);
319 319
320 hose->first_busno = 0; 320 hose->first_busno = 0;
321 hose->last_busno = 0xef; 321 hose->last_busno = 0xef;
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 84bc8f7e17ef..3c2d63ebf787 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -225,6 +225,7 @@ static void __eeh_mark_slot (struct device_node *dn, int mode_flag)
225 225
226void eeh_mark_slot (struct device_node *dn, int mode_flag) 226void eeh_mark_slot (struct device_node *dn, int mode_flag)
227{ 227{
228 struct pci_dev *dev;
228 dn = find_device_pe (dn); 229 dn = find_device_pe (dn);
229 230
230 /* Back up one, since config addrs might be shared */ 231 /* Back up one, since config addrs might be shared */
@@ -232,6 +233,12 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag)
232 dn = dn->parent; 233 dn = dn->parent;
233 234
234 PCI_DN(dn)->eeh_mode |= mode_flag; 235 PCI_DN(dn)->eeh_mode |= mode_flag;
236
237 /* Mark the pci device too */
238 dev = PCI_DN(dn)->pcidev;
239 if (dev)
240 dev->error_state = pci_channel_io_frozen;
241
235 __eeh_mark_slot (dn->child, mode_flag); 242 __eeh_mark_slot (dn->child, mode_flag);
236} 243}
237 244
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 4f0097f31bdb..43dbf737698c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -477,7 +477,6 @@ static void pseries_dedicated_idle_sleep(void)
477{ 477{
478 unsigned int cpu = smp_processor_id(); 478 unsigned int cpu = smp_processor_id();
479 unsigned long start_snooze; 479 unsigned long start_snooze;
480 unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay);
481 480
482 /* 481 /*
483 * Indicate to the HV that we are idle. Now would be 482 * Indicate to the HV that we are idle. Now would be
@@ -490,9 +489,9 @@ static void pseries_dedicated_idle_sleep(void)
490 * has been checked recently. If we should poll for a little 489 * has been checked recently. If we should poll for a little
491 * while, do so. 490 * while, do so.
492 */ 491 */
493 if (*smt_snooze_delay) { 492 if (__get_cpu_var(smt_snooze_delay)) {
494 start_snooze = get_tb() + 493 start_snooze = get_tb() +
495 *smt_snooze_delay * tb_ticks_per_usec; 494 __get_cpu_var(smt_snooze_delay) * tb_ticks_per_usec;
496 local_irq_enable(); 495 local_irq_enable();
497 set_thread_flag(TIF_POLLING_NRFLAG); 496 set_thread_flag(TIF_POLLING_NRFLAG);
498 497
@@ -512,24 +511,7 @@ static void pseries_dedicated_idle_sleep(void)
512 goto out; 511 goto out;
513 } 512 }
514 513
515 /* 514 cede_processor();
516 * If not SMT, cede processor. If CPU is running SMT
517 * cede if the other thread is not idle, so that it can
518 * go single-threaded. If the other thread is idle,
519 * we ask the hypervisor if it has pending work it
520 * wants to do and cede if it does. Otherwise we keep
521 * polling in order to reduce interrupt latency.
522 *
523 * Doing the cede when the other thread is active will
524 * result in this thread going dormant, meaning the other
525 * thread gets to run in single-threaded (ST) mode, which
526 * is slightly faster than SMT mode with this thread at
527 * very low priority. The cede enables interrupts, which
528 * doesn't matter here.
529 */
530 if (!cpu_has_feature(CPU_FTR_SMT) || !lppaca[cpu ^ 1].idle
531 || poll_pending() == H_PENDING)
532 cede_processor();
533 515
534out: 516out:
535 HMT_medium(); 517 HMT_medium();
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index e5e999ea891a..f15f4d78aee9 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -17,3 +17,8 @@ ifeq ($(CONFIG_PPC_MERGE),y)
17obj-$(CONFIG_PPC_I8259) += i8259.o 17obj-$(CONFIG_PPC_I8259) += i8259.o
18obj-$(CONFIG_PPC_83xx) += ipic.o 18obj-$(CONFIG_PPC_83xx) += ipic.o
19endif 19endif
20
21# Temporary hack until we have migrated to asm-powerpc
22ifeq ($(ARCH),powerpc)
23obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o
24endif
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c
new file mode 100644
index 000000000000..ec265995d5d8
--- /dev/null
+++ b/arch/powerpc/sysdev/cpm2_common.c
@@ -0,0 +1,309 @@
1/*
2 * General Purpose functions for the global management of the
3 * 8260 Communication Processor Module.
4 * Copyright (c) 1999-2001 Dan Malek <dan@embeddedalley.com>
5 * Copyright (c) 2000 MontaVista Software, Inc (source@mvista.com)
6 * 2.3.99 Updates
7 *
8 * 2006 (c) MontaVista Software, Inc.
9 * Vitaly Bordug <vbordug@ru.mvista.com>
10 * Merged to arch/powerpc from arch/ppc/syslib/cpm2_common.c
11 *
12 * This file is licensed under the terms of the GNU General Public License
13 * version 2. This program is licensed "as is" without any warranty of any
14 * kind, whether express or implied.
15 */
16
17/*
18 *
19 * In addition to the individual control of the communication
20 * channels, there are a few functions that globally affect the
21 * communication processor.
22 *
23 * Buffer descriptors must be allocated from the dual ported memory
24 * space. The allocator for that is here. When the communication
25 * process is reset, we reclaim the memory available. There is
26 * currently no deallocator for this memory.
27 */
28#include <linux/errno.h>
29#include <linux/sched.h>
30#include <linux/kernel.h>
31#include <linux/param.h>
32#include <linux/string.h>
33#include <linux/mm.h>
34#include <linux/interrupt.h>
35#include <linux/module.h>
36#include <asm/io.h>
37#include <asm/irq.h>
38#include <asm/mpc8260.h>
39#include <asm/page.h>
40#include <asm/pgtable.h>
41#include <asm/cpm2.h>
42#include <asm/rheap.h>
43#include <asm/fs_pd.h>
44
45#include <sysdev/fsl_soc.h>
46
47static void cpm2_dpinit(void);
48cpm_cpm2_t *cpmp; /* Pointer to comm processor space */
49
50/* We allocate this here because it is used almost exclusively for
51 * the communication processor devices.
52 */
53cpm2_map_t *cpm2_immr;
54intctl_cpm2_t *cpm2_intctl;
55
56#define CPM_MAP_SIZE (0x40000) /* 256k - the PQ3 reserve this amount
57 of space for CPM as it is larger
58 than on PQ2 */
59
60void
61cpm2_reset(void)
62{
63 cpm2_immr = (cpm2_map_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE);
64 cpm2_intctl = cpm2_map(im_intctl);
65
66 /* Reclaim the DP memory for our use.
67 */
68 cpm2_dpinit();
69
70 /* Tell everyone where the comm processor resides.
71 */
72 cpmp = &cpm2_immr->im_cpm;
73}
74
75/* Set a baud rate generator. This needs lots of work. There are
76 * eight BRGs, which can be connected to the CPM channels or output
77 * as clocks. The BRGs are in two different block of internal
78 * memory mapped space.
79 * The baud rate clock is the system clock divided by something.
80 * It was set up long ago during the initial boot phase and is
81 * is given to us.
82 * Baud rate clocks are zero-based in the driver code (as that maps
83 * to port numbers). Documentation uses 1-based numbering.
84 */
85#define BRG_INT_CLK (get_brgfreq())
86#define BRG_UART_CLK (BRG_INT_CLK/16)
87
88/* This function is used by UARTS, or anything else that uses a 16x
89 * oversampled clock.
90 */
91void
92cpm_setbrg(uint brg, uint rate)
93{
94 volatile uint *bp;
95
96 /* This is good enough to get SMCs running.....
97 */
98 if (brg < 4) {
99 bp = cpm2_map_size(im_brgc1, 16);
100 } else {
101 bp = cpm2_map_size(im_brgc5, 16);
102 brg -= 4;
103 }
104 bp += brg;
105 *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
106
107 cpm2_unmap(bp);
108}
109
110/* This function is used to set high speed synchronous baud rate
111 * clocks.
112 */
113void
114cpm2_fastbrg(uint brg, uint rate, int div16)
115{
116 volatile uint *bp;
117
118 if (brg < 4) {
119 bp = cpm2_map_size(im_brgc1, 16);
120 }
121 else {
122 bp = cpm2_map_size(im_brgc5, 16);
123 brg -= 4;
124 }
125 bp += brg;
126 *bp = ((BRG_INT_CLK / rate) << 1) | CPM_BRG_EN;
127 if (div16)
128 *bp |= CPM_BRG_DIV16;
129
130 cpm2_unmap(bp);
131}
132
133int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode)
134{
135 int ret = 0;
136 int shift;
137 int i, bits = 0;
138 cpmux_t *im_cpmux;
139 u32 *reg;
140 u32 mask = 7;
141 u8 clk_map [24][3] = {
142 {CPM_CLK_FCC1, CPM_BRG5, 0},
143 {CPM_CLK_FCC1, CPM_BRG6, 1},
144 {CPM_CLK_FCC1, CPM_BRG7, 2},
145 {CPM_CLK_FCC1, CPM_BRG8, 3},
146 {CPM_CLK_FCC1, CPM_CLK9, 4},
147 {CPM_CLK_FCC1, CPM_CLK10, 5},
148 {CPM_CLK_FCC1, CPM_CLK11, 6},
149 {CPM_CLK_FCC1, CPM_CLK12, 7},
150 {CPM_CLK_FCC2, CPM_BRG5, 0},
151 {CPM_CLK_FCC2, CPM_BRG6, 1},
152 {CPM_CLK_FCC2, CPM_BRG7, 2},
153 {CPM_CLK_FCC2, CPM_BRG8, 3},
154 {CPM_CLK_FCC2, CPM_CLK13, 4},
155 {CPM_CLK_FCC2, CPM_CLK14, 5},
156 {CPM_CLK_FCC2, CPM_CLK15, 6},
157 {CPM_CLK_FCC2, CPM_CLK16, 7},
158 {CPM_CLK_FCC3, CPM_BRG5, 0},
159 {CPM_CLK_FCC3, CPM_BRG6, 1},
160 {CPM_CLK_FCC3, CPM_BRG7, 2},
161 {CPM_CLK_FCC3, CPM_BRG8, 3},
162 {CPM_CLK_FCC3, CPM_CLK13, 4},
163 {CPM_CLK_FCC3, CPM_CLK14, 5},
164 {CPM_CLK_FCC3, CPM_CLK15, 6},
165 {CPM_CLK_FCC3, CPM_CLK16, 7}
166 };
167
168 im_cpmux = cpm2_map(im_cpmux);
169
170 switch (target) {
171 case CPM_CLK_SCC1:
172 reg = &im_cpmux->cmx_scr;
173 shift = 24;
174 case CPM_CLK_SCC2:
175 reg = &im_cpmux->cmx_scr;
176 shift = 16;
177 break;
178 case CPM_CLK_SCC3:
179 reg = &im_cpmux->cmx_scr;
180 shift = 8;
181 break;
182 case CPM_CLK_SCC4:
183 reg = &im_cpmux->cmx_scr;
184 shift = 0;
185 break;
186 case CPM_CLK_FCC1:
187 reg = &im_cpmux->cmx_fcr;
188 shift = 24;
189 break;
190 case CPM_CLK_FCC2:
191 reg = &im_cpmux->cmx_fcr;
192 shift = 16;
193 break;
194 case CPM_CLK_FCC3:
195 reg = &im_cpmux->cmx_fcr;
196 shift = 8;
197 break;
198 default:
199 printk(KERN_ERR "cpm2_clock_setup: invalid clock target\n");
200 return -EINVAL;
201 }
202
203 if (mode == CPM_CLK_RX)
204 shift +=3;
205
206 for (i=0; i<24; i++) {
207 if (clk_map[i][0] == target && clk_map[i][1] == clock) {
208 bits = clk_map[i][2];
209 break;
210 }
211 }
212 if (i == sizeof(clk_map)/3)
213 ret = -EINVAL;
214
215 bits <<= shift;
216 mask <<= shift;
217 out_be32(reg, (in_be32(reg) & ~mask) | bits);
218
219 cpm2_unmap(im_cpmux);
220 return ret;
221}
222
223/*
224 * dpalloc / dpfree bits.
225 */
226static spinlock_t cpm_dpmem_lock;
227/* 16 blocks should be enough to satisfy all requests
228 * until the memory subsystem goes up... */
229static rh_block_t cpm_boot_dpmem_rh_block[16];
230static rh_info_t cpm_dpmem_info;
231static u8* im_dprambase;
232
233static void cpm2_dpinit(void)
234{
235 spin_lock_init(&cpm_dpmem_lock);
236
237 im_dprambase = ioremap(CPM_MAP_ADDR, CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE);
238
239 /* initialize the info header */
240 rh_init(&cpm_dpmem_info, 1,
241 sizeof(cpm_boot_dpmem_rh_block) /
242 sizeof(cpm_boot_dpmem_rh_block[0]),
243 cpm_boot_dpmem_rh_block);
244
245 /* Attach the usable dpmem area */
246 /* XXX: This is actually crap. CPM_DATAONLY_BASE and
247 * CPM_DATAONLY_SIZE is only a subset of the available dpram. It
248 * varies with the processor and the microcode patches activated.
249 * But the following should be at least safe.
250 */
251 rh_attach_region(&cpm_dpmem_info, (void *)CPM_DATAONLY_BASE,
252 CPM_DATAONLY_SIZE);
253}
254
255/* This function returns an index into the DPRAM area.
256 */
257uint cpm_dpalloc(uint size, uint align)
258{
259 void *start;
260 unsigned long flags;
261
262 spin_lock_irqsave(&cpm_dpmem_lock, flags);
263 cpm_dpmem_info.alignment = align;
264 start = rh_alloc(&cpm_dpmem_info, size, "commproc");
265 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
266
267 return (uint)start;
268}
269EXPORT_SYMBOL(cpm_dpalloc);
270
271int cpm_dpfree(uint offset)
272{
273 int ret;
274 unsigned long flags;
275
276 spin_lock_irqsave(&cpm_dpmem_lock, flags);
277 ret = rh_free(&cpm_dpmem_info, (void *)offset);
278 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
279
280 return ret;
281}
282EXPORT_SYMBOL(cpm_dpfree);
283
284/* not sure if this is ever needed */
285uint cpm_dpalloc_fixed(uint offset, uint size, uint align)
286{
287 void *start;
288 unsigned long flags;
289
290 spin_lock_irqsave(&cpm_dpmem_lock, flags);
291 cpm_dpmem_info.alignment = align;
292 start = rh_alloc_fixed(&cpm_dpmem_info, (void *)offset, size, "commproc");
293 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
294
295 return (uint)start;
296}
297EXPORT_SYMBOL(cpm_dpalloc_fixed);
298
299void cpm_dpdump(void)
300{
301 rh_dump(&cpm_dpmem_info);
302}
303EXPORT_SYMBOL(cpm_dpdump);
304
305void *cpm_dpram_addr(uint offset)
306{
307 return (void *)(im_dprambase + offset);
308}
309EXPORT_SYMBOL(cpm_dpram_addr);
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
new file mode 100644
index 000000000000..51752990f7b9
--- /dev/null
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -0,0 +1,256 @@
1/*
2 * Platform information definitions.
3 *
4 * Copied from arch/ppc/syslib/cpm2_pic.c with minor subsequent updates
5 * to make in work in arch/powerpc/. Original (c) belongs to Dan Malek.
6 *
7 * Author: Vitaly Bordug <vbordug@ru.mvista.com>
8 *
9 * 1999-2001 (c) Dan Malek <dan@embeddedalley.com>
10 * 2006 (c) MontaVista Software, Inc.
11 *
12 * This file is licensed under the terms of the GNU General Public License
13 * version 2. This program is licensed "as is" without any warranty of any
14 * kind, whether express or implied.
15 */
16
17/* The CPM2 internal interrupt controller. It is usually
18 * the only interrupt controller.
19 * There are two 32-bit registers (high/low) for up to 64
20 * possible interrupts.
21 *
22 * Now, the fun starts.....Interrupt Numbers DO NOT MAP
23 * in a simple arithmetic fashion to mask or pending registers.
24 * That is, interrupt 4 does not map to bit position 4.
25 * We create two tables, indexed by vector number, to indicate
26 * which register to use and which bit in the register to use.
27 */
28
29#include <linux/stddef.h>
30#include <linux/init.h>
31#include <linux/sched.h>
32#include <linux/signal.h>
33#include <linux/irq.h>
34
35#include <asm/immap_cpm2.h>
36#include <asm/mpc8260.h>
37#include <asm/io.h>
38#include <asm/prom.h>
39
40#include "cpm2_pic.h"
41
42static struct device_node *cpm2_pic_node;
43static struct irq_host *cpm2_pic_host;
44#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
45static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
46
47static const u_char irq_to_siureg[] = {
48 1, 1, 1, 1, 1, 1, 1, 1,
49 1, 1, 1, 1, 1, 1, 1, 1,
50 0, 0, 0, 0, 0, 0, 0, 0,
51 0, 0, 0, 0, 0, 0, 0, 0,
52 1, 1, 1, 1, 1, 1, 1, 1,
53 1, 1, 1, 1, 1, 1, 1, 1,
54 0, 0, 0, 0, 0, 0, 0, 0,
55 0, 0, 0, 0, 0, 0, 0, 0
56};
57
58/* bit numbers do not match the docs, these are precomputed so the bit for
59 * a given irq is (1 << irq_to_siubit[irq]) */
60static const u_char irq_to_siubit[] = {
61 0, 15, 14, 13, 12, 11, 10, 9,
62 8, 7, 6, 5, 4, 3, 2, 1,
63 2, 1, 0, 14, 13, 12, 11, 10,
64 9, 8, 7, 6, 5, 4, 3, 0,
65 31, 30, 29, 28, 27, 26, 25, 24,
66 23, 22, 21, 20, 19, 18, 17, 16,
67 16, 17, 18, 19, 20, 21, 22, 23,
68 24, 25, 26, 27, 28, 29, 30, 31,
69};
70
71static void cpm2_mask_irq(unsigned int irq_nr)
72{
73 int bit, word;
74 volatile uint *simr;
75
76 irq_nr -= CPM_IRQ_OFFSET;
77
78 bit = irq_to_siubit[irq_nr];
79 word = irq_to_siureg[irq_nr];
80
81 simr = &(cpm2_intctl->ic_simrh);
82 ppc_cached_irq_mask[word] &= ~(1 << bit);
83 simr[word] = ppc_cached_irq_mask[word];
84}
85
86static void cpm2_unmask_irq(unsigned int irq_nr)
87{
88 int bit, word;
89 volatile uint *simr;
90
91 irq_nr -= CPM_IRQ_OFFSET;
92
93 bit = irq_to_siubit[irq_nr];
94 word = irq_to_siureg[irq_nr];
95
96 simr = &(cpm2_intctl->ic_simrh);
97 ppc_cached_irq_mask[word] |= 1 << bit;
98 simr[word] = ppc_cached_irq_mask[word];
99}
100
101static void cpm2_mask_and_ack(unsigned int irq_nr)
102{
103 int bit, word;
104 volatile uint *simr, *sipnr;
105
106 irq_nr -= CPM_IRQ_OFFSET;
107
108 bit = irq_to_siubit[irq_nr];
109 word = irq_to_siureg[irq_nr];
110
111 simr = &(cpm2_intctl->ic_simrh);
112 sipnr = &(cpm2_intctl->ic_sipnrh);
113 ppc_cached_irq_mask[word] &= ~(1 << bit);
114 simr[word] = ppc_cached_irq_mask[word];
115 sipnr[word] = 1 << bit;
116}
117
118static void cpm2_end_irq(unsigned int irq_nr)
119{
120 int bit, word;
121 volatile uint *simr;
122
123 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
124 && irq_desc[irq_nr].action) {
125
126 irq_nr -= CPM_IRQ_OFFSET;
127 bit = irq_to_siubit[irq_nr];
128 word = irq_to_siureg[irq_nr];
129
130 simr = &(cpm2_intctl->ic_simrh);
131 ppc_cached_irq_mask[word] |= 1 << bit;
132 simr[word] = ppc_cached_irq_mask[word];
133 /*
134 * Work around large numbers of spurious IRQs on PowerPC 82xx
135 * systems.
136 */
137 mb();
138 }
139}
140
141static struct irq_chip cpm2_pic = {
142 .typename = " CPM2 SIU ",
143 .enable = cpm2_unmask_irq,
144 .disable = cpm2_mask_irq,
145 .unmask = cpm2_unmask_irq,
146 .mask_ack = cpm2_mask_and_ack,
147 .end = cpm2_end_irq,
148};
149
150int cpm2_get_irq(struct pt_regs *regs)
151{
152 int irq;
153 unsigned long bits;
154
155 /* For CPM2, read the SIVEC register and shift the bits down
156 * to get the irq number. */
157 bits = cpm2_intctl->ic_sivec;
158 irq = bits >> 26;
159
160 if (irq == 0)
161 return(-1);
162 return irq+CPM_IRQ_OFFSET;
163}
164
165static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node)
166{
167 return cpm2_pic_node == NULL || cpm2_pic_node == node;
168}
169
170static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq,
171 irq_hw_number_t hw)
172{
173 pr_debug("cpm2_pic_host_map(%d, 0x%lx)\n", virq, hw);
174
175 get_irq_desc(virq)->status |= IRQ_LEVEL;
176 set_irq_chip_and_handler(virq, &cpm2_pic, handle_level_irq);
177 return 0;
178}
179
180static void cpm2_host_unmap(struct irq_host *h, unsigned int virq)
181{
182 /* Make sure irq is masked in hardware */
183 cpm2_mask_irq(virq);
184
185 /* remove chip and handler */
186 set_irq_chip_and_handler(virq, NULL, NULL);
187}
188
189static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct,
190 u32 *intspec, unsigned int intsize,
191 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
192{
193 static const unsigned char map_cpm2_senses[4] = {
194 IRQ_TYPE_LEVEL_LOW,
195 IRQ_TYPE_LEVEL_HIGH,
196 IRQ_TYPE_EDGE_FALLING,
197 IRQ_TYPE_EDGE_RISING,
198 };
199
200 *out_hwirq = intspec[0];
201 if (intsize > 1 && intspec[1] < 4)
202 *out_flags = map_cpm2_senses[intspec[1]];
203 else
204 *out_flags = IRQ_TYPE_NONE;
205
206 return 0;
207}
208
209static struct irq_host_ops cpm2_pic_host_ops = {
210 .match = cpm2_pic_host_match,
211 .map = cpm2_pic_host_map,
212 .unmap = cpm2_host_unmap,
213 .xlate = cpm2_pic_host_xlate,
214};
215
216void cpm2_pic_init(struct device_node *node)
217{
218 int i;
219
220 /* Clear the CPM IRQ controller, in case it has any bits set
221 * from the bootloader
222 */
223
224 /* Mask out everything */
225
226 cpm2_intctl->ic_simrh = 0x00000000;
227 cpm2_intctl->ic_simrl = 0x00000000;
228
229 wmb();
230
231 /* Ack everything */
232 cpm2_intctl->ic_sipnrh = 0xffffffff;
233 cpm2_intctl->ic_sipnrl = 0xffffffff;
234 wmb();
235
236 /* Dummy read of the vector */
237 i = cpm2_intctl->ic_sivec;
238 rmb();
239
240 /* Initialize the default interrupt mapping priorities,
241 * in case the boot rom changed something on us.
242 */
243 cpm2_intctl->ic_sicr = 0;
244 cpm2_intctl->ic_scprrh = 0x05309770;
245 cpm2_intctl->ic_scprrl = 0x05309770;
246
247 /* create a legacy host */
248 if (node)
249 cpm2_pic_node = of_node_get(node);
250
251 cpm2_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm2_pic_host_ops, 64);
252 if (cpm2_pic_host == NULL) {
253 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n");
254 return;
255 }
256}
diff --git a/arch/powerpc/sysdev/cpm2_pic.h b/arch/powerpc/sysdev/cpm2_pic.h
new file mode 100644
index 000000000000..d63e45d4df58
--- /dev/null
+++ b/arch/powerpc/sysdev/cpm2_pic.h
@@ -0,0 +1,10 @@
1#ifndef _PPC_KERNEL_CPM2_H
2#define _PPC_KERNEL_CPM2_H
3
4extern intctl_cpm2_t *cpm2_intctl;
5
6extern int cpm2_get_irq(struct pt_regs *regs);
7
8extern void cpm2_pic_init(struct device_node*);
9
10#endif /* _PPC_KERNEL_CPM2_H */
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 92ba378b7990..022ed275ea68 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -3,6 +3,9 @@
3 * 3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information) 4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 * 5 *
6 * 2006 (c) MontaVista Software, Inc.
7 * Vitaly Bordug <vbordug@ru.mvista.com>
8 *
6 * This program is free software; you can redistribute it and/or modify it 9 * 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 10 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
@@ -20,15 +23,20 @@
20#include <linux/device.h> 23#include <linux/device.h>
21#include <linux/platform_device.h> 24#include <linux/platform_device.h>
22#include <linux/fsl_devices.h> 25#include <linux/fsl_devices.h>
26#include <linux/fs_enet_pd.h>
27#include <linux/fs_uart_pd.h>
23 28
24#include <asm/system.h> 29#include <asm/system.h>
25#include <asm/atomic.h> 30#include <asm/atomic.h>
26#include <asm/io.h> 31#include <asm/io.h>
27#include <asm/irq.h> 32#include <asm/irq.h>
33#include <asm/time.h>
28#include <asm/prom.h> 34#include <asm/prom.h>
29#include <sysdev/fsl_soc.h> 35#include <sysdev/fsl_soc.h>
30#include <mm/mmu_decl.h> 36#include <mm/mmu_decl.h>
37#include <asm/cpm2.h>
31 38
39extern void init_fcc_ioports(struct fs_platform_info*);
32static phys_addr_t immrbase = -1; 40static phys_addr_t immrbase = -1;
33 41
34phys_addr_t get_immrbase(void) 42phys_addr_t get_immrbase(void)
@@ -42,7 +50,9 @@ phys_addr_t get_immrbase(void)
42 if (soc) { 50 if (soc) {
43 unsigned int size; 51 unsigned int size;
44 const void *prop = get_property(soc, "reg", &size); 52 const void *prop = get_property(soc, "reg", &size);
45 immrbase = of_translate_address(soc, prop); 53
54 if (prop)
55 immrbase = of_translate_address(soc, prop);
46 of_node_put(soc); 56 of_node_put(soc);
47 }; 57 };
48 58
@@ -51,6 +61,59 @@ phys_addr_t get_immrbase(void)
51 61
52EXPORT_SYMBOL(get_immrbase); 62EXPORT_SYMBOL(get_immrbase);
53 63
64#ifdef CONFIG_CPM2
65
66static u32 brgfreq = -1;
67
68u32 get_brgfreq(void)
69{
70 struct device_node *node;
71
72 if (brgfreq != -1)
73 return brgfreq;
74
75 node = of_find_node_by_type(NULL, "cpm");
76 if (node) {
77 unsigned int size;
78 const unsigned int *prop = get_property(node, "brg-frequency",
79 &size);
80
81 if (prop)
82 brgfreq = *prop;
83 of_node_put(node);
84 };
85
86 return brgfreq;
87}
88
89EXPORT_SYMBOL(get_brgfreq);
90
91static u32 fs_baudrate = -1;
92
93u32 get_baudrate(void)
94{
95 struct device_node *node;
96
97 if (fs_baudrate != -1)
98 return fs_baudrate;
99
100 node = of_find_node_by_type(NULL, "serial");
101 if (node) {
102 unsigned int size;
103 const unsigned int *prop = get_property(node, "current-speed",
104 &size);
105
106 if (prop)
107 fs_baudrate = *prop;
108 of_node_put(node);
109 };
110
111 return fs_baudrate;
112}
113
114EXPORT_SYMBOL(get_baudrate);
115#endif /* CONFIG_CPM2 */
116
54static int __init gfar_mdio_of_init(void) 117static int __init gfar_mdio_of_init(void)
55{ 118{
56 struct device_node *np; 119 struct device_node *np;
@@ -85,8 +148,11 @@ static int __init gfar_mdio_of_init(void)
85 mdio_data.irq[k] = -1; 148 mdio_data.irq[k] = -1;
86 149
87 while ((child = of_get_next_child(np, child)) != NULL) { 150 while ((child = of_get_next_child(np, child)) != NULL) {
88 const u32 *id = get_property(child, "reg", NULL); 151 int irq = irq_of_parse_and_map(child, 0);
89 mdio_data.irq[*id] = irq_of_parse_and_map(child, 0); 152 if (irq != NO_IRQ) {
153 const u32 *id = get_property(child, "reg", NULL);
154 mdio_data.irq[*id] = irq;
155 }
90 } 156 }
91 157
92 ret = 158 ret =
@@ -128,7 +194,7 @@ static int __init gfar_of_init(void)
128 const char *model; 194 const char *model;
129 const void *mac_addr; 195 const void *mac_addr;
130 const phandle *ph; 196 const phandle *ph;
131 int n_res = 1; 197 int n_res = 2;
132 198
133 memset(r, 0, sizeof(r)); 199 memset(r, 0, sizeof(r));
134 memset(&gfar_data, 0, sizeof(gfar_data)); 200 memset(&gfar_data, 0, sizeof(gfar_data));
@@ -159,7 +225,7 @@ static int __init gfar_of_init(void)
159 225
160 gfar_dev = 226 gfar_dev =
161 platform_device_register_simple("fsl-gianfar", i, &r[0], 227 platform_device_register_simple("fsl-gianfar", i, &r[0],
162 n_res + 1); 228 n_res);
163 229
164 if (IS_ERR(gfar_dev)) { 230 if (IS_ERR(gfar_dev)) {
165 ret = PTR_ERR(gfar_dev); 231 ret = PTR_ERR(gfar_dev);
@@ -478,3 +544,208 @@ err:
478} 544}
479 545
480arch_initcall(fsl_usb_of_init); 546arch_initcall(fsl_usb_of_init);
547
548#ifdef CONFIG_CPM2
549
550static const char fcc_regs[] = "fcc_regs";
551static const char fcc_regs_c[] = "fcc_regs_c";
552static const char fcc_pram[] = "fcc_pram";
553static char bus_id[9][BUS_ID_SIZE];
554
555static int __init fs_enet_of_init(void)
556{
557 struct device_node *np;
558 unsigned int i;
559 struct platform_device *fs_enet_dev;
560 struct resource res;
561 int ret;
562
563 for (np = NULL, i = 0;
564 (np = of_find_compatible_node(np, "network", "fs_enet")) != NULL;
565 i++) {
566 struct resource r[4];
567 struct device_node *phy, *mdio;
568 struct fs_platform_info fs_enet_data;
569 const unsigned int *id, *phy_addr;
570 const void *mac_addr;
571 const phandle *ph;
572 const char *model;
573
574 memset(r, 0, sizeof(r));
575 memset(&fs_enet_data, 0, sizeof(fs_enet_data));
576
577 ret = of_address_to_resource(np, 0, &r[0]);
578 if (ret)
579 goto err;
580 r[0].name = fcc_regs;
581
582 ret = of_address_to_resource(np, 1, &r[1]);
583 if (ret)
584 goto err;
585 r[1].name = fcc_pram;
586
587 ret = of_address_to_resource(np, 2, &r[2]);
588 if (ret)
589 goto err;
590 r[2].name = fcc_regs_c;
591
592 r[3].start = r[3].end = irq_of_parse_and_map(np, 0);
593 r[3].flags = IORESOURCE_IRQ;
594
595 fs_enet_dev =
596 platform_device_register_simple("fsl-cpm-fcc", i, &r[0], 4);
597
598 if (IS_ERR(fs_enet_dev)) {
599 ret = PTR_ERR(fs_enet_dev);
600 goto err;
601 }
602
603 model = get_property(np, "model", NULL);
604 if (model == NULL) {
605 ret = -ENODEV;
606 goto unreg;
607 }
608
609 mac_addr = get_property(np, "mac-address", NULL);
610 memcpy(fs_enet_data.macaddr, mac_addr, 6);
611
612 ph = get_property(np, "phy-handle", NULL);
613 phy = of_find_node_by_phandle(*ph);
614
615 if (phy == NULL) {
616 ret = -ENODEV;
617 goto unreg;
618 }
619
620 phy_addr = get_property(phy, "reg", NULL);
621 fs_enet_data.phy_addr = *phy_addr;
622
623 id = get_property(np, "device-id", NULL);
624 fs_enet_data.fs_no = *id;
625 strcpy(fs_enet_data.fs_type, model);
626
627 mdio = of_get_parent(phy);
628 ret = of_address_to_resource(mdio, 0, &res);
629 if (ret) {
630 of_node_put(phy);
631 of_node_put(mdio);
632 goto unreg;
633 }
634
635 fs_enet_data.clk_rx = *((u32 *) get_property(np, "rx-clock", NULL));
636 fs_enet_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL));
637
638 if (strstr(model, "FCC")) {
639 int fcc_index = *id - 1;
640
641 fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0);
642 fs_enet_data.rx_ring = 32;
643 fs_enet_data.tx_ring = 32;
644 fs_enet_data.rx_copybreak = 240;
645 fs_enet_data.use_napi = 0;
646 fs_enet_data.napi_weight = 17;
647 fs_enet_data.mem_offset = FCC_MEM_OFFSET(fcc_index);
648 fs_enet_data.cp_page = CPM_CR_FCC_PAGE(fcc_index);
649 fs_enet_data.cp_block = CPM_CR_FCC_SBLOCK(fcc_index);
650
651 snprintf((char*)&bus_id[(*id)], BUS_ID_SIZE, "%x:%02x",
652 (u32)res.start, fs_enet_data.phy_addr);
653 fs_enet_data.bus_id = (char*)&bus_id[(*id)];
654 fs_enet_data.init_ioports = init_fcc_ioports;
655 }
656
657 of_node_put(phy);
658 of_node_put(mdio);
659
660 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
661 sizeof(struct
662 fs_platform_info));
663 if (ret)
664 goto unreg;
665 }
666 return 0;
667
668unreg:
669 platform_device_unregister(fs_enet_dev);
670err:
671 return ret;
672}
673
674arch_initcall(fs_enet_of_init);
675
676static const char scc_regs[] = "regs";
677static const char scc_pram[] = "pram";
678
679static int __init cpm_uart_of_init(void)
680{
681 struct device_node *np;
682 unsigned int i;
683 struct platform_device *cpm_uart_dev;
684 int ret;
685
686 for (np = NULL, i = 0;
687 (np = of_find_compatible_node(np, "serial", "cpm_uart")) != NULL;
688 i++) {
689 struct resource r[3];
690 struct fs_uart_platform_info cpm_uart_data;
691 const int *id;
692 const char *model;
693
694 memset(r, 0, sizeof(r));
695 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
696
697 ret = of_address_to_resource(np, 0, &r[0]);
698 if (ret)
699 goto err;
700
701 r[0].name = scc_regs;
702
703 ret = of_address_to_resource(np, 1, &r[1]);
704 if (ret)
705 goto err;
706 r[1].name = scc_pram;
707
708 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
709 r[2].flags = IORESOURCE_IRQ;
710
711 cpm_uart_dev =
712 platform_device_register_simple("fsl-cpm-scc:uart", i, &r[0], 3);
713
714 if (IS_ERR(cpm_uart_dev)) {
715 ret = PTR_ERR(cpm_uart_dev);
716 goto err;
717 }
718
719 id = get_property(np, "device-id", NULL);
720 cpm_uart_data.fs_no = *id;
721
722 model = (char*)get_property(np, "model", NULL);
723 strcpy(cpm_uart_data.fs_type, model);
724
725 cpm_uart_data.uart_clk = ppc_proc_freq;
726
727 cpm_uart_data.tx_num_fifo = 4;
728 cpm_uart_data.tx_buf_size = 32;
729 cpm_uart_data.rx_num_fifo = 4;
730 cpm_uart_data.rx_buf_size = 32;
731 cpm_uart_data.clk_rx = *((u32 *) get_property(np, "rx-clock", NULL));
732 cpm_uart_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL));
733
734 ret =
735 platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
736 sizeof(struct
737 fs_uart_platform_info));
738 if (ret)
739 goto unreg;
740 }
741
742 return 0;
743
744unreg:
745 platform_device_unregister(cpm_uart_dev);
746err:
747 return ret;
748}
749
750arch_initcall(cpm_uart_of_init);
751#endif /* CONFIG_CPM2 */
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index 5a3dd480d2fd..04e145b5fc32 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -5,6 +5,8 @@
5#include <asm/mmu.h> 5#include <asm/mmu.h>
6 6
7extern phys_addr_t get_immrbase(void); 7extern phys_addr_t get_immrbase(void);
8extern u32 get_brgfreq(void);
9extern u32 get_baudrate(void);
8 10
9#endif 11#endif
10#endif 12#endif