diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
commit | ccaa36f73544163ef6e15eb29a620130755f6001 (patch) | |
tree | b5cf50592c45e25edbd66fea451e6941e455fa83 | |
parent | b4a9071af62f95dc6d22040a0b37ac7225ce4d54 (diff) | |
parent | 5e980823581682d1566e7b5089cf827ddd5f3c94 (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()
...
61 files changed, 3395 insertions, 749 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 ?= | |||
20 | CROSS32CC := $(CROSS32_COMPILE)gcc | 20 | CROSS32CC := $(CROSS32_COMPILE)gcc |
21 | CROSS32AS := $(CROSS32_COMPILE)as | 21 | CROSS32AS := $(CROSS32_COMPILE)as |
22 | CROSS32LD := $(CROSS32_COMPILE)ld | 22 | CROSS32LD := $(CROSS32_COMPILE)ld |
23 | CROSS32AR := $(CROSS32_COMPILE)ar | ||
23 | CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy | 24 | CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy |
24 | 25 | ||
25 | ifeq ($(HAS_BIARCH),y) | 26 | ifeq ($(HAS_BIARCH),y) |
@@ -28,10 +29,11 @@ CROSS32CC := $(CC) -m32 | |||
28 | CROSS32AS := $(AS) -a32 | 29 | CROSS32AS := $(AS) -a32 |
29 | CROSS32LD := $(LD) -m elf32ppc | 30 | CROSS32LD := $(LD) -m elf32ppc |
30 | CROSS32OBJCOPY := $(OBJCOPY) | 31 | CROSS32OBJCOPY := $(OBJCOPY) |
32 | CROSS32AR := $(AR) | ||
31 | endif | 33 | endif |
32 | endif | 34 | endif |
33 | 35 | ||
34 | export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY | 36 | export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY |
35 | 37 | ||
36 | KBUILD_DEFCONFIG := $(shell uname -m)_defconfig | 38 | KBUILD_DEFCONFIG := $(shell uname -m)_defconfig |
37 | 39 | ||
@@ -146,7 +148,7 @@ all: $(KBUILD_IMAGE) | |||
146 | 148 | ||
147 | CPPFLAGS_vmlinux.lds := -Upowerpc | 149 | CPPFLAGS_vmlinux.lds := -Upowerpc |
148 | 150 | ||
149 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin | 151 | BOOT_TARGETS = zImage zImage.initrd uImage |
150 | 152 | ||
151 | PHONY += $(BOOT_TARGETS) | 153 | PHONY += $(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 | ||
23 | all: $(obj)/zImage | ||
23 | 24 | ||
24 | HOSTCC := gcc | 25 | HOSTCC := gcc |
25 | BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ | 26 | BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ |
26 | $(shell $(CROSS32CC) -print-file-name=include) -fPIC | 27 | $(shell $(CROSS32CC) -print-file-name=include) -fPIC |
27 | BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc | 28 | BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc |
28 | OBJCOPYFLAGS := contents,alloc,load,readonly,data | 29 | |
29 | OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000 | 30 | ifeq ($(call cc-option-yn, -fstack-protector),y) |
30 | OBJCOPY_MIB_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment | 31 | BOOTCFLAGS += -fno-stack-protector |
32 | endif | ||
33 | |||
34 | BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) | ||
31 | 35 | ||
32 | zlib := inffast.c inflate.c inftrees.c | 36 | zlib := inffast.c inflate.c inftrees.c |
33 | zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h | 37 | zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h |
34 | zliblinuxheader := zlib.h zconf.h zutil.h | 38 | zliblinuxheader := 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 | |||
43 | src-wlib := string.S stdio.c main.c div64.S $(zlib) | ||
44 | src-plat := of.c | ||
45 | src-boot := crt0.S $(src-wlib) $(src-plat) empty.c | ||
38 | 46 | ||
39 | src-boot-$(CONFIG_PPC_MULTIPLATFORM) := of.c | ||
40 | src-boot := crt0.S string.S stdio.c main.c div64.S $(src-boot-y) | ||
41 | src-boot += $(zlib) | ||
42 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 47 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
43 | obj-boot := $(addsuffix .o, $(basename $(src-boot))) | 48 | obj-boot := $(addsuffix .o, $(basename $(src-boot))) |
44 | 49 | obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib)))) | |
45 | ifeq ($(call cc-option-yn, -fstack-protector),y) | 50 | obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) |
46 | BOOTCFLAGS += -fno-stack-protector | ||
47 | endif | ||
48 | |||
49 | BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) | ||
50 | 51 | ||
51 | quiet_cmd_copy_zlib = COPY $@ | 52 | quiet_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 | ||
69 | clean-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 | ||
76 | clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ | ||
77 | $(obj)/empty.c | ||
71 | 78 | ||
72 | quiet_cmd_bootcc = BOOTCC $@ | 79 | quiet_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 $@ | |||
75 | quiet_cmd_bootas = BOOTAS $@ | 82 | quiet_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 | ||
78 | quiet_cmd_bootld = BOOTLD $@ | 85 | quiet_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 | #----------------------------------------------------------- | ||
89 | required := vmlinux.strip | ||
90 | initrd := initrd | ||
91 | 95 | ||
92 | obj-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.o, $(section))) | 96 | hostprogs-y := addnote addRamDisk hack-coff |
93 | src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section))) | ||
94 | gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) | ||
95 | 97 | ||
96 | hostprogs-y := addnote addRamDisk hack-coff | 98 | extra-y := $(obj)/crt0.o $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ |
99 | $(obj)/zImage.lds $(obj)/zImage.coff.lds | ||
97 | 100 | ||
98 | targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \ | 101 | wrapper :=$(srctree)/$(src)/wrapper |
99 | zImage.coff zImage.initrd.coff miboot.image miboot.initrd.image \ | 102 | wrapperbits := $(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 | ||
104 | extra-y := initrd.o | ||
105 | 103 | ||
106 | quiet_cmd_ramdisk = RAMDISK $@ | 104 | ############# |
107 | cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@ | 105 | # Bits for building various flavours of zImage |
108 | 106 | ||
109 | quiet_cmd_stripvm = STRIP $@ | 107 | ifneq ($(CROSS32_COMPILE),) |
110 | cmd_stripvm = $(STRIP) -s -R .comment $< -o $@ | 108 | CROSSWRAP := -C $(CROSS32_COMPILE) |
109 | else | ||
110 | ifneq ($(CROSS_COMPILE),) | ||
111 | CROSSWRAP := -C $(CROSS_COMPILE) | ||
112 | endif | ||
113 | endif | ||
111 | 114 | ||
112 | vmlinux.strip: vmlinux | 115 | quiet_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 | 117 | quiet_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 | ||
117 | quiet_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 | ||
122 | quiet_cmd_addnote = ADDNOTE $@ | 124 | $(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits) |
123 | cmd_addnote = $(obj)/addnote $@ | 125 | $(call cmd,wrap_initrd,chrp) |
124 | 126 | ||
125 | quiet_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 | ||
129 | quiet_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 | |
154 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries | ||
155 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries | ||
156 | image-$(CONFIG_PPC_CELL) += zImage.pseries | ||
157 | image-$(CONFIG_PPC_CHRP) += zImage.chrp | ||
158 | image-$(CONFIG_PPC_PMAC) += zImage.pmac | ||
159 | image-$(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. |
156 | coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff | 163 | ifeq ($(CONFIG_PPC32),y) |
157 | coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff | 164 | image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot |
158 | mibootimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.image | 165 | endif |
159 | mibrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.initrd.image | 166 | |
160 | 167 | initrd-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) | 174 | install: $(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 | 177 | clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip.gz) | |
171 | $(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) \ | 178 | clean-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 | #----------------------------------------------------------- | ||
190 | quiet_cmd_mygzip = GZIP $@ | ||
191 | cmd_mygzip = gzip -f -9 < $< > $@.$$$$ && mv $@.$$$$ $@ | ||
192 | |||
193 | quiet_cmd_objbin = OBJCOPY $@ | ||
194 | cmd_objbin = $(OBJCOPY) -O binary $< $@ | ||
195 | |||
196 | quiet_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 | |||
201 | MKIMAGE := $(srctree)/scripts/mkuboot.sh | ||
202 | targets += uImage | ||
203 | extra-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 | |||
217 | install: $(CONFIGURE) $(BOOTIMAGE) | ||
218 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" | ||
219 | |||
220 | clean-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 | ||
25 | kernel= | ||
26 | ofile=zImage | ||
27 | platform=of | ||
28 | initrd= | ||
29 | dtb= | ||
30 | dts= | ||
31 | cacheit= | ||
32 | |||
33 | # cross-compilation prefix | ||
34 | CROSS= | ||
35 | |||
36 | # directory for object and other files used by this script | ||
37 | object=arch/powerpc/boot | ||
38 | |||
39 | # directory for working files | ||
40 | tmpdir=. | ||
41 | |||
42 | usage() { | ||
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 | |||
49 | while [ "$#" -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 | ||
103 | done | ||
104 | |||
105 | if [ -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 | ||
110 | fi | ||
111 | |||
112 | if [ -z "$kernel" ]; then | ||
113 | kernel=vmlinux | ||
114 | fi | ||
115 | |||
116 | platformo=$object/"$platform".o | ||
117 | lds=$object/zImage.lds | ||
118 | ext=strip | ||
119 | objflags=-S | ||
120 | tmp=$tmpdir/zImage.$$.o | ||
121 | ksection=.kernel:vmlinux.strip | ||
122 | isection=.kernel:initrd | ||
123 | |||
124 | case "$platform" in | ||
125 | pmac|pseries|chrp) | ||
126 | platformo=$object/of.o | ||
127 | ;; | ||
128 | pmaccoff) | ||
129 | platformo=$object/of.o | ||
130 | lds=$object/zImage.coff.lds | ||
131 | ;; | ||
132 | miboot|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 | ;; | ||
140 | esac | ||
141 | |||
142 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | ||
143 | if [ -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 | ||
151 | fi | ||
152 | |||
153 | case "$platform" in | ||
154 | uboot) | ||
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 | ;; | ||
168 | esac | ||
169 | |||
170 | addsec() { | ||
171 | ${CROSS}objcopy $4 $1 \ | ||
172 | --add-section=$3="$2" \ | ||
173 | --set-section-flags=$3=contents,alloc,load,readonly,data | ||
174 | } | ||
175 | |||
176 | addsec $tmp "$vmz.gz" $ksection $object/empty.o | ||
177 | if [ -z "$cacheit" ]; then | ||
178 | rm -f "$vmz.gz" | ||
179 | fi | ||
180 | |||
181 | if [ -n "$initrd" ]; then | ||
182 | addsec $tmp "$initrd" initrd | ||
183 | fi | ||
184 | |||
185 | if [ -n "$dtb" ]; then | ||
186 | addsec $tmp "$dtb" dtb | ||
187 | fi | ||
188 | |||
189 | if [ "$platform" != "miboot" ]; then | ||
190 | ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ | ||
191 | $object/crt0.o $platformo $tmp $object/wrapper.a | ||
192 | rm $tmp | ||
193 | fi | ||
194 | |||
195 | # post-processing needed for some platforms | ||
196 | case "$platform" in | ||
197 | pseries|chrp) | ||
198 | $object/addnote "$ofile" | ||
199 | ;; | ||
200 | pmaccoff) | ||
201 | ${CROSS}objcopy -O aixcoff-rs6000 --set-start 0x500000 "$ofile" | ||
202 | $object/hack-coff "$ofile" | ||
203 | ;; | ||
204 | esac | ||
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 |
493 | CONFIG_SCSI_SATA=y | 493 | CONFIG_ATA=y |
494 | # CONFIG_SCSI_SATA_AHCI is not set | 494 | # CONFIG_SATA_AHCI is not set |
495 | CONFIG_SCSI_SATA_SVW=y | 495 | CONFIG_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 |
416 | CONFIG_SCSI_SATA=y | 416 | CONFIG_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 |
420 | CONFIG_SCSI_SATA_MV=y | 420 | CONFIG_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 |
7 | CONFIG_PPC32=y | 7 | CONFIG_PPC32=y |
@@ -21,6 +21,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y | |||
21 | CONFIG_PPC_OF=y | 21 | CONFIG_PPC_OF=y |
22 | CONFIG_PPC_UDBG_16550=y | 22 | CONFIG_PPC_UDBG_16550=y |
23 | # CONFIG_GENERIC_TBSYNC is not set | 23 | # CONFIG_GENERIC_TBSYNC is not set |
24 | CONFIG_AUDIT_ARCH=y | ||
24 | CONFIG_DEFAULT_UIMAGE=y | 25 | CONFIG_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 |
64 | CONFIG_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 |
68 | CONFIG_INITRAMFS_SOURCE="" | 68 | CONFIG_INITRAMFS_SOURCE="" |
69 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 69 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
70 | CONFIG_EMBEDDED=y | 70 | CONFIG_EMBEDDED=y |
71 | CONFIG_SYSCTL=y | ||
71 | # CONFIG_KALLSYMS is not set | 72 | # CONFIG_KALLSYMS is not set |
72 | CONFIG_HOTPLUG=y | 73 | CONFIG_HOTPLUG=y |
73 | CONFIG_PRINTK=y | 74 | CONFIG_PRINTK=y |
74 | CONFIG_BUG=y | 75 | CONFIG_BUG=y |
75 | CONFIG_ELF_CORE=y | 76 | CONFIG_ELF_CORE=y |
76 | CONFIG_BASE_FULL=y | 77 | CONFIG_BASE_FULL=y |
77 | CONFIG_RT_MUTEXES=y | ||
78 | CONFIG_FUTEX=y | 78 | CONFIG_FUTEX=y |
79 | # CONFIG_EPOLL is not set | 79 | # CONFIG_EPOLL is not set |
80 | CONFIG_SHMEM=y | 80 | CONFIG_SHMEM=y |
81 | CONFIG_SLAB=y | 81 | CONFIG_SLAB=y |
82 | CONFIG_VM_EVENT_COUNTERS=y | 82 | CONFIG_VM_EVENT_COUNTERS=y |
83 | CONFIG_RT_MUTEXES=y | ||
83 | # CONFIG_TINY_SHMEM is not set | 84 | # CONFIG_TINY_SHMEM is not set |
84 | CONFIG_BASE_SMALL=0 | 85 | CONFIG_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 |
467 | CONFIG_SCSI_SATA=y | 468 | CONFIG_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 |
478 | CONFIG_SCSI_SATA_SIL=y | 479 | CONFIG_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 | # |
1280 | CONFIG_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 |
1283 | CONFIG_DEBUG_KERNEL=y | 1284 | CONFIG_DEBUG_KERNEL=y |
1284 | CONFIG_LOG_BUF_SHIFT=17 | 1285 | CONFIG_LOG_BUF_SHIFT=14 |
1285 | CONFIG_DETECT_SOFTLOCKUP=y | 1286 | CONFIG_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 |
1296 | CONFIG_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 |
1299 | CONFIG_FORCED_INLINING=y | 1300 | CONFIG_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 |
1303 | CONFIG_BOOTX_TEXT=y | 1304 | # CONFIG_BOOTX_TEXT is not set |
1304 | CONFIG_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 | # |
1316 | CONFIG_CRYPTO=y | 1317 | CONFIG_CRYPTO=y |
1318 | CONFIG_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 | ||
1326 | CONFIG_CRYPTO_DES=y | 1331 | CONFIG_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 | ||
7 | CONFIG_PPC32=y | ||
8 | CONFIG_PPC_MERGE=y | ||
9 | CONFIG_MMU=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_IRQ_PER_CPU=y | ||
12 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
13 | CONFIG_GENERIC_HWEIGHT=y | ||
14 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
15 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
16 | CONFIG_PPC=y | ||
17 | CONFIG_EARLY_PRINTK=y | ||
18 | CONFIG_GENERIC_NVRAM=y | ||
19 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
20 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
21 | CONFIG_PPC_OF=y | ||
22 | # CONFIG_PPC_UDBG_16550 is not set | ||
23 | # CONFIG_GENERIC_TBSYNC is not set | ||
24 | CONFIG_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 | ||
33 | CONFIG_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 | ||
39 | CONFIG_85xx=y | ||
40 | CONFIG_E500=y | ||
41 | CONFIG_BOOKE=y | ||
42 | CONFIG_FSL_BOOKE=y | ||
43 | # CONFIG_PHYS_64BIT is not set | ||
44 | CONFIG_SPE=y | ||
45 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
46 | |||
47 | # | ||
48 | # Code maturity level options | ||
49 | # | ||
50 | CONFIG_EXPERIMENTAL=y | ||
51 | CONFIG_BROKEN_ON_SMP=y | ||
52 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
53 | |||
54 | # | ||
55 | # General setup | ||
56 | # | ||
57 | CONFIG_LOCALVERSION="" | ||
58 | CONFIG_LOCALVERSION_AUTO=y | ||
59 | CONFIG_SWAP=y | ||
60 | CONFIG_SYSVIPC=y | ||
61 | # CONFIG_POSIX_MQUEUE is not set | ||
62 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
63 | # CONFIG_TASKSTATS is not set | ||
64 | CONFIG_SYSCTL=y | ||
65 | # CONFIG_AUDIT is not set | ||
66 | # CONFIG_IKCONFIG is not set | ||
67 | # CONFIG_RELAY is not set | ||
68 | CONFIG_INITRAMFS_SOURCE="" | ||
69 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
70 | CONFIG_EMBEDDED=y | ||
71 | CONFIG_KALLSYMS=y | ||
72 | # CONFIG_KALLSYMS_ALL is not set | ||
73 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
74 | CONFIG_HOTPLUG=y | ||
75 | CONFIG_PRINTK=y | ||
76 | CONFIG_BUG=y | ||
77 | CONFIG_ELF_CORE=y | ||
78 | CONFIG_BASE_FULL=y | ||
79 | CONFIG_RT_MUTEXES=y | ||
80 | CONFIG_FUTEX=y | ||
81 | CONFIG_EPOLL=y | ||
82 | CONFIG_SHMEM=y | ||
83 | CONFIG_SLAB=y | ||
84 | CONFIG_VM_EVENT_COUNTERS=y | ||
85 | # CONFIG_TINY_SHMEM is not set | ||
86 | CONFIG_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 | # | ||
104 | CONFIG_IOSCHED_NOOP=y | ||
105 | CONFIG_IOSCHED_AS=y | ||
106 | CONFIG_IOSCHED_DEADLINE=y | ||
107 | CONFIG_IOSCHED_CFQ=y | ||
108 | CONFIG_DEFAULT_AS=y | ||
109 | # CONFIG_DEFAULT_DEADLINE is not set | ||
110 | # CONFIG_DEFAULT_CFQ is not set | ||
111 | # CONFIG_DEFAULT_NOOP is not set | ||
112 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
113 | CONFIG_MPIC=y | ||
114 | CONFIG_CPM2=y | ||
115 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
116 | |||
117 | # | ||
118 | # Platform support | ||
119 | # | ||
120 | # CONFIG_MPC8540_ADS is not set | ||
121 | CONFIG_MPC8560_ADS=y | ||
122 | # CONFIG_MPC85xx_CDS is not set | ||
123 | CONFIG_MPC8560=y | ||
124 | CONFIG_PPC_INDIRECT_PCI_BE=y | ||
125 | |||
126 | # | ||
127 | # Kernel options | ||
128 | # | ||
129 | # CONFIG_HIGHMEM is not set | ||
130 | # CONFIG_HZ_100 is not set | ||
131 | CONFIG_HZ_250=y | ||
132 | # CONFIG_HZ_1000 is not set | ||
133 | CONFIG_HZ=250 | ||
134 | CONFIG_PREEMPT_NONE=y | ||
135 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
136 | # CONFIG_PREEMPT is not set | ||
137 | CONFIG_BINFMT_ELF=y | ||
138 | CONFIG_BINFMT_MISC=y | ||
139 | # CONFIG_MATH_EMULATION is not set | ||
140 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
141 | # CONFIG_PC_KEYBOARD is not set | ||
142 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
143 | CONFIG_SELECT_MEMORY_MODEL=y | ||
144 | CONFIG_FLATMEM_MANUAL=y | ||
145 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
146 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
147 | CONFIG_FLATMEM=y | ||
148 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
149 | # CONFIG_SPARSEMEM_STATIC is not set | ||
150 | CONFIG_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 | ||
157 | CONFIG_ISA_DMA_API=y | ||
158 | |||
159 | # | ||
160 | # Bus options | ||
161 | # | ||
162 | # CONFIG_PPC_I8259 is not set | ||
163 | CONFIG_PPC_INDIRECT_PCI=y | ||
164 | CONFIG_FSL_SOC=y | ||
165 | CONFIG_PCI=y | ||
166 | CONFIG_PCI_DOMAINS=y | ||
167 | # CONFIG_PCIEPORTBUS is not set | ||
168 | CONFIG_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 | # | ||
188 | CONFIG_HIGHMEM_START=0xfe000000 | ||
189 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
190 | CONFIG_KERNEL_START=0xc0000000 | ||
191 | CONFIG_TASK_SIZE=0x80000000 | ||
192 | CONFIG_BOOT_LOAD=0x00800000 | ||
193 | |||
194 | # | ||
195 | # Networking | ||
196 | # | ||
197 | CONFIG_NET=y | ||
198 | |||
199 | # | ||
200 | # Networking options | ||
201 | # | ||
202 | # CONFIG_NETDEBUG is not set | ||
203 | CONFIG_PACKET=y | ||
204 | # CONFIG_PACKET_MMAP is not set | ||
205 | CONFIG_UNIX=y | ||
206 | CONFIG_XFRM=y | ||
207 | # CONFIG_XFRM_USER is not set | ||
208 | # CONFIG_NET_KEY is not set | ||
209 | CONFIG_INET=y | ||
210 | CONFIG_IP_MULTICAST=y | ||
211 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
212 | CONFIG_IP_FIB_HASH=y | ||
213 | CONFIG_IP_PNP=y | ||
214 | CONFIG_IP_PNP_DHCP=y | ||
215 | CONFIG_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 | ||
221 | CONFIG_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 | ||
227 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
228 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
229 | CONFIG_INET_DIAG=y | ||
230 | CONFIG_INET_TCP_DIAG=y | ||
231 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
232 | CONFIG_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 | # | ||
287 | CONFIG_STANDALONE=y | ||
288 | CONFIG_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 | ||
321 | CONFIG_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 | ||
325 | CONFIG_BLK_DEV_RAM=y | ||
326 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
327 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
328 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
329 | CONFIG_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 | # | ||
372 | CONFIG_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 | # | ||
386 | CONFIG_PHYLIB=y | ||
387 | |||
388 | # | ||
389 | # MII PHY device drivers | ||
390 | # | ||
391 | CONFIG_MARVELL_PHY=y | ||
392 | CONFIG_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 | # | ||
403 | CONFIG_NET_ETHERNET=y | ||
404 | CONFIG_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 | ||
416 | CONFIG_FS_ENET=y | ||
417 | # CONFIG_FS_ENET_HAS_SCC is not set | ||
418 | CONFIG_FS_ENET_HAS_FCC=y | ||
419 | |||
420 | # | ||
421 | # Ethernet (1000 Mbit) | ||
422 | # | ||
423 | # CONFIG_ACENIC is not set | ||
424 | # CONFIG_DL2K is not set | ||
425 | CONFIG_E1000=y | ||
426 | CONFIG_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 | ||
438 | CONFIG_GIANFAR=y | ||
439 | CONFIG_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 | # | ||
485 | CONFIG_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 | # | ||
525 | CONFIG_SERIAL_CORE=y | ||
526 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
527 | CONFIG_SERIAL_CPM=y | ||
528 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
529 | CONFIG_SERIAL_CPM_SCC1=y | ||
530 | CONFIG_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 | ||
536 | CONFIG_UNIX98_PTYS=y | ||
537 | CONFIG_LEGACY_PTYS=y | ||
538 | CONFIG_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 | ||
550 | CONFIG_HW_RANDOM=y | ||
551 | # CONFIG_NVRAM is not set | ||
552 | CONFIG_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 | # | ||
589 | CONFIG_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 | ||
603 | CONFIG_VIDEO_V4L2=y | ||
604 | |||
605 | # | ||
606 | # Digital Video Broadcasting Devices | ||
607 | # | ||
608 | # CONFIG_DVB is not set | ||
609 | |||
610 | # | ||
611 | # Graphics support | ||
612 | # | ||
613 | CONFIG_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 | # | ||
625 | CONFIG_USB_ARCH_HAS_HCD=y | ||
626 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
627 | CONFIG_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 | # | ||
687 | CONFIG_EXT2_FS=y | ||
688 | # CONFIG_EXT2_FS_XATTR is not set | ||
689 | # CONFIG_EXT2_FS_XIP is not set | ||
690 | CONFIG_EXT3_FS=y | ||
691 | CONFIG_EXT3_FS_XATTR=y | ||
692 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
693 | # CONFIG_EXT3_FS_SECURITY is not set | ||
694 | CONFIG_JBD=y | ||
695 | # CONFIG_JBD_DEBUG is not set | ||
696 | CONFIG_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 | ||
704 | CONFIG_INOTIFY=y | ||
705 | CONFIG_INOTIFY_USER=y | ||
706 | # CONFIG_QUOTA is not set | ||
707 | CONFIG_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 | # | ||
728 | CONFIG_PROC_FS=y | ||
729 | CONFIG_PROC_KCORE=y | ||
730 | CONFIG_SYSFS=y | ||
731 | CONFIG_TMPFS=y | ||
732 | # CONFIG_HUGETLB_PAGE is not set | ||
733 | CONFIG_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 | # | ||
756 | CONFIG_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 | ||
761 | CONFIG_ROOT_NFS=y | ||
762 | CONFIG_LOCKD=y | ||
763 | CONFIG_NFS_COMMON=y | ||
764 | CONFIG_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 | # | ||
777 | CONFIG_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 | ||
801 | CONFIG_CRC32=y | ||
802 | # CONFIG_LIBCRC32C is not set | ||
803 | CONFIG_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 | ||
816 | CONFIG_DEBUG_KERNEL=y | ||
817 | CONFIG_LOG_BUF_SHIFT=14 | ||
818 | CONFIG_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 | ||
824 | CONFIG_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 | ||
833 | CONFIG_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 | 1829 | CONFIG_MAGIC_SYSRQ=y |
1830 | # CONFIG_UNUSED_SYMBOLS is not set | 1830 | # CONFIG_UNUSED_SYMBOLS is not set |
1831 | CONFIG_DEBUG_KERNEL=y | 1831 | CONFIG_DEBUG_KERNEL=y |
1832 | CONFIG_LOG_BUF_SHIFT=14 | 1832 | CONFIG_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 |
523 | CONFIG_SCSI_SATA=y | 523 | CONFIG_ATA=y |
524 | # CONFIG_SCSI_SATA_AHCI is not set | 524 | # CONFIG_SATA_AHCI is not set |
525 | CONFIG_SCSI_SATA_SVW=y | 525 | CONFIG_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 | ||
527 | void do_syscall_trace_enter(struct pt_regs *regs) | 527 | void 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 | ||
549 | void do_syscall_trace_leave(struct pt_regs *regs) | 547 | void 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 | ||
566 | EXPORT_SYMBOL(do_syscall_trace_enter); | ||
567 | EXPORT_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 */ |
29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay); | 29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; |
30 | 30 | ||
31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | 31 | static 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 | ||
1045 | static 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 | |||
1061 | static 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 | |||
1077 | int __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 | |||
14 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ | 14 | obj-$(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 |
17 | obj-$(CONFIG_QUICC_ENGINE) += rheap.o | ||
17 | obj-$(CONFIG_XMON) += sstep.o | 18 | obj-$(CONFIG_XMON) += sstep.o |
18 | 19 | ||
19 | ifeq ($(CONFIG_PPC64),y) | 20 | ifeq ($(CONFIG_PPC64),y) |
20 | obj-$(CONFIG_SMP) += locks.o | 21 | obj-$(CONFIG_SMP) += locks.o |
21 | obj-$(CONFIG_DEBUG_KERNEL) += sstep.o | 22 | obj-$(CONFIG_DEBUG_KERNEL) += sstep.o |
22 | endif | 23 | endif |
24 | |||
25 | # Temporary hack until we have migrated to asm-powerpc | ||
26 | ifeq ($(CONFIG_PPC_MERGE),y) | ||
27 | obj-$(CONFIG_CPM2) += rheap.o | ||
28 | endif | ||
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 | ||
426 | void *rh_alloc(rh_info_t * info, int size, const char *owner) | 426 | void *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 | ||
493 | void *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 */ |
483 | void *rh_alloc_fixed(rh_info_t * info, void *start, int size, const char *owner) | 499 | void *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 | |||
15 | CFLAGS_fabs.o = -fno-builtin-fabs | ||
16 | CFLAGS_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 @@ | |||
26 | static unsigned int user_getsp32(unsigned int sp, int is_first) | 27 | static 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 | ||
113 | late_initcall(rtc_class_hookup); | ||
114 | #endif | ||
115 | |||
112 | define_machine(mpc834x_itx) { | 116 | define_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 | ||
14 | config 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 | |||
14 | config MPC85xx_CDS | 20 | config 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 | ||
34 | config MPC8560 | ||
35 | bool | ||
36 | select PPC_INDIRECT_PCI | ||
37 | default y if MPC8560_ADS | ||
38 | |||
28 | config PPC_INDIRECT_PCI_BE | 39 | config 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 | ||
48 | config 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 | |||
37 | endmenu | 58 | endmenu |
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 | # |
4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o | 4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o |
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | 5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o |
6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o | ||
6 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o | 7 | obj-$(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 |
36 | unsigned long isa_io_base = 0; | 43 | unsigned long isa_io_base = 0; |
37 | unsigned long isa_mem_base = 0; | 44 | unsigned 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 | |||
69 | static 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 | ||
61 | void __init mpc85xx_ads_pic_init(void) | 82 | void __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 | ||
150 | void 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 | |||
112 | static void __init mpc85xx_ads_setup_arch(void) | 228 | static 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 | } |
1345 | DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, 0, "0x%llx\n") | 1345 | DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, NULL, "0x%llx\n") |
1346 | 1346 | ||
1347 | struct tree_descr spufs_dir_contents[] = { | 1347 | struct 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 | ||
235 | static int spu_hw_set_mfc_query(struct spu_context * ctx, u32 mask, u32 mode) | 235 | static 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 | ||
99 | static unsigned long u3_agp_cfg_access(struct pci_controller* hose, | 99 | static 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 | ||
120 | static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, | 120 | static 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 | ||
201 | static unsigned long u3_ht_cfg_access(struct pci_controller* hose, | 201 | static 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 | ||
212 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | 212 | static 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 | ||
226 | void eeh_mark_slot (struct device_node *dn, int mode_flag) | 226 | void 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 | ||
534 | out: | 516 | out: |
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) | |||
17 | obj-$(CONFIG_PPC_I8259) += i8259.o | 17 | obj-$(CONFIG_PPC_I8259) += i8259.o |
18 | obj-$(CONFIG_PPC_83xx) += ipic.o | 18 | obj-$(CONFIG_PPC_83xx) += ipic.o |
19 | endif | 19 | endif |
20 | |||
21 | # Temporary hack until we have migrated to asm-powerpc | ||
22 | ifeq ($(ARCH),powerpc) | ||
23 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o | ||
24 | endif | ||
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 | |||
47 | static void cpm2_dpinit(void); | ||
48 | cpm_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 | */ | ||
53 | cpm2_map_t *cpm2_immr; | ||
54 | intctl_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 | |||
60 | void | ||
61 | cpm2_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 | */ | ||
91 | void | ||
92 | cpm_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 | */ | ||
113 | void | ||
114 | cpm2_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 | |||
133 | int 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 | */ | ||
226 | static spinlock_t cpm_dpmem_lock; | ||
227 | /* 16 blocks should be enough to satisfy all requests | ||
228 | * until the memory subsystem goes up... */ | ||
229 | static rh_block_t cpm_boot_dpmem_rh_block[16]; | ||
230 | static rh_info_t cpm_dpmem_info; | ||
231 | static u8* im_dprambase; | ||
232 | |||
233 | static 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 | */ | ||
257 | uint 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 | } | ||
269 | EXPORT_SYMBOL(cpm_dpalloc); | ||
270 | |||
271 | int 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 | } | ||
282 | EXPORT_SYMBOL(cpm_dpfree); | ||
283 | |||
284 | /* not sure if this is ever needed */ | ||
285 | uint 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 | } | ||
297 | EXPORT_SYMBOL(cpm_dpalloc_fixed); | ||
298 | |||
299 | void cpm_dpdump(void) | ||
300 | { | ||
301 | rh_dump(&cpm_dpmem_info); | ||
302 | } | ||
303 | EXPORT_SYMBOL(cpm_dpdump); | ||
304 | |||
305 | void *cpm_dpram_addr(uint offset) | ||
306 | { | ||
307 | return (void *)(im_dprambase + offset); | ||
308 | } | ||
309 | EXPORT_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 | |||
42 | static struct device_node *cpm2_pic_node; | ||
43 | static struct irq_host *cpm2_pic_host; | ||
44 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | ||
45 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | ||
46 | |||
47 | static 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]) */ | ||
60 | static 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 | |||
71 | static 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 | |||
86 | static 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 | |||
101 | static 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 | |||
118 | static 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 | |||
141 | static 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 | |||
150 | int 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 | |||
165 | static 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 | |||
170 | static 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 | |||
180 | static 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 | |||
189 | static 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 | |||
209 | static 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 | |||
216 | void 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 | |||
4 | extern intctl_cpm2_t *cpm2_intctl; | ||
5 | |||
6 | extern int cpm2_get_irq(struct pt_regs *regs); | ||
7 | |||
8 | extern 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 | ||
39 | extern void init_fcc_ioports(struct fs_platform_info*); | ||
32 | static phys_addr_t immrbase = -1; | 40 | static phys_addr_t immrbase = -1; |
33 | 41 | ||
34 | phys_addr_t get_immrbase(void) | 42 | phys_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 | ||
52 | EXPORT_SYMBOL(get_immrbase); | 62 | EXPORT_SYMBOL(get_immrbase); |
53 | 63 | ||
64 | #ifdef CONFIG_CPM2 | ||
65 | |||
66 | static u32 brgfreq = -1; | ||
67 | |||
68 | u32 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 | |||
89 | EXPORT_SYMBOL(get_brgfreq); | ||
90 | |||
91 | static u32 fs_baudrate = -1; | ||
92 | |||
93 | u32 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 | |||
114 | EXPORT_SYMBOL(get_baudrate); | ||
115 | #endif /* CONFIG_CPM2 */ | ||
116 | |||
54 | static int __init gfar_mdio_of_init(void) | 117 | static 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 | ||
480 | arch_initcall(fsl_usb_of_init); | 546 | arch_initcall(fsl_usb_of_init); |
547 | |||
548 | #ifdef CONFIG_CPM2 | ||
549 | |||
550 | static const char fcc_regs[] = "fcc_regs"; | ||
551 | static const char fcc_regs_c[] = "fcc_regs_c"; | ||
552 | static const char fcc_pram[] = "fcc_pram"; | ||
553 | static char bus_id[9][BUS_ID_SIZE]; | ||
554 | |||
555 | static 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 | |||
668 | unreg: | ||
669 | platform_device_unregister(fs_enet_dev); | ||
670 | err: | ||
671 | return ret; | ||
672 | } | ||
673 | |||
674 | arch_initcall(fs_enet_of_init); | ||
675 | |||
676 | static const char scc_regs[] = "regs"; | ||
677 | static const char scc_pram[] = "pram"; | ||
678 | |||
679 | static 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 | |||
744 | unreg: | ||
745 | platform_device_unregister(cpm_uart_dev); | ||
746 | err: | ||
747 | return ret; | ||
748 | } | ||
749 | |||
750 | arch_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 | ||
7 | extern phys_addr_t get_immrbase(void); | 7 | extern phys_addr_t get_immrbase(void); |
8 | extern u32 get_brgfreq(void); | ||
9 | extern u32 get_baudrate(void); | ||
8 | 10 | ||
9 | #endif | 11 | #endif |
10 | #endif | 12 | #endif |
diff --git a/arch/ppc/boot/utils/mkbugboot.c b/arch/ppc/boot/utils/mkbugboot.c index 29115e01f60a..1640c4199ca6 100644 --- a/arch/ppc/boot/utils/mkbugboot.c +++ b/arch/ppc/boot/utils/mkbugboot.c | |||
@@ -19,36 +19,13 @@ | |||
19 | #include <stdlib.h> | 19 | #include <stdlib.h> |
20 | #include <errno.h> | 20 | #include <errno.h> |
21 | #include <fcntl.h> | 21 | #include <fcntl.h> |
22 | #include <netinet/in.h> | ||
22 | #ifdef __sun__ | 23 | #ifdef __sun__ |
23 | #include <inttypes.h> | 24 | #include <inttypes.h> |
24 | #else | 25 | #else |
25 | #include <stdint.h> | 26 | #include <stdint.h> |
26 | #endif | 27 | #endif |
27 | 28 | ||
28 | #ifdef __i386__ | ||
29 | #define cpu_to_be32(x) le32_to_cpu(x) | ||
30 | #define cpu_to_be16(x) le16_to_cpu(x) | ||
31 | #else | ||
32 | #define cpu_to_be32(x) (x) | ||
33 | #define cpu_to_be16(x) (x) | ||
34 | #endif | ||
35 | |||
36 | #define cpu_to_le32(x) le32_to_cpu((x)) | ||
37 | unsigned long le32_to_cpu(unsigned long x) | ||
38 | { | ||
39 | return (((x & 0x000000ffU) << 24) | | ||
40 | ((x & 0x0000ff00U) << 8) | | ||
41 | ((x & 0x00ff0000U) >> 8) | | ||
42 | ((x & 0xff000000U) >> 24)); | ||
43 | } | ||
44 | |||
45 | #define cpu_to_le16(x) le16_to_cpu((x)) | ||
46 | unsigned short le16_to_cpu(unsigned short x) | ||
47 | { | ||
48 | return (((x & 0x00ff) << 8) | | ||
49 | ((x & 0xff00) >> 8)); | ||
50 | } | ||
51 | |||
52 | /* size of read buffer */ | 29 | /* size of read buffer */ |
53 | #define SIZE 0x1000 | 30 | #define SIZE 0x1000 |
54 | 31 | ||
@@ -62,124 +39,109 @@ typedef struct bug_boot_header { | |||
62 | 39 | ||
63 | #define HEADER_SIZE sizeof(bug_boot_header_t) | 40 | #define HEADER_SIZE sizeof(bug_boot_header_t) |
64 | 41 | ||
65 | uint32_t copy_image(int32_t in_fd, int32_t out_fd) | 42 | void update_checksum(void *buf, size_t size, uint16_t *sum) |
66 | { | 43 | { |
67 | uint8_t buf[SIZE]; | 44 | uint32_t csum = *sum; |
68 | int n; | 45 | |
69 | uint32_t image_size = 0; | 46 | while (size) { |
70 | uint8_t zero = 0; | 47 | csum += *(uint16_t *)buf; |
71 | 48 | if (csum > 0xffff) | |
72 | lseek(in_fd, ELF_HEADER_SIZE, SEEK_SET); | 49 | csum -= 0xffff; |
73 | 50 | buf = (uint16_t *)buf + 1; | |
74 | /* Copy an image while recording its size */ | 51 | size -= 2; |
75 | while ( (n = read(in_fd, buf, SIZE)) > 0 ) | 52 | } |
76 | { | 53 | *sum = csum; |
77 | image_size = image_size + n; | ||
78 | write(out_fd, buf, n); | ||
79 | } | ||
80 | |||
81 | /* BUG romboot requires that our size is divisible by 2 */ | ||
82 | /* align image to 2 byte boundary */ | ||
83 | if (image_size % 2) | ||
84 | { | ||
85 | image_size++; | ||
86 | write(out_fd, &zero, 1); | ||
87 | } | ||
88 | |||
89 | return image_size; | ||
90 | } | 54 | } |
91 | 55 | ||
92 | void write_bugboot_header(int32_t out_fd, uint32_t boot_size) | 56 | uint32_t copy_image(int in_fd, int out_fd, uint16_t *sum) |
93 | { | 57 | { |
94 | uint8_t header_block[HEADER_SIZE]; | 58 | uint8_t buf[SIZE]; |
95 | bug_boot_header_t *bbh = (bug_boot_header_t *)&header_block[0]; | 59 | int offset = 0; |
96 | 60 | int n; | |
97 | memset(header_block, 0, HEADER_SIZE); | 61 | uint32_t image_size = 0; |
98 | 62 | ||
99 | /* Fill in the PPCBUG ROM boot header */ | 63 | lseek(in_fd, ELF_HEADER_SIZE, SEEK_SET); |
100 | strncpy(bbh->magic_word, "BOOT", 4); /* PPCBUG magic word */ | 64 | |
101 | bbh->entry_offset = cpu_to_be32(HEADER_SIZE); /* Entry address */ | 65 | /* Copy an image while recording its size */ |
102 | bbh->routine_length= cpu_to_be32(HEADER_SIZE+boot_size+2); /* Routine length */ | 66 | while ( (n = read(in_fd, buf + offset, SIZE - offset)) > 0 ) { |
103 | strncpy(bbh->routine_name, "LINUXROM", 8); /* Routine name */ | 67 | n += offset; |
104 | 68 | offset = n & 1; | |
105 | /* Output the header and bootloader to the file */ | 69 | n -= offset; |
106 | write(out_fd, header_block, HEADER_SIZE); | 70 | image_size = image_size + n; |
71 | /* who's going to deal with short writes? */ | ||
72 | write(out_fd, buf, n); | ||
73 | update_checksum(buf, n, sum); | ||
74 | if (offset) | ||
75 | buf[0] = buf[n]; | ||
76 | } | ||
77 | |||
78 | /* BUG romboot requires that our size is divisible by 2 */ | ||
79 | /* align image to 2 byte boundary */ | ||
80 | if (offset) { | ||
81 | image_size += 2; | ||
82 | buf[1] = '\0'; | ||
83 | write(out_fd, buf, 2); | ||
84 | update_checksum(buf, 2, sum); | ||
85 | } | ||
86 | return image_size; | ||
107 | } | 87 | } |
108 | 88 | ||
109 | uint16_t calc_checksum(int32_t bug_fd) | 89 | void write_bugboot_header(int out_fd, uint32_t boot_size, uint16_t *sum) |
110 | { | 90 | { |
111 | uint32_t checksum_var = 0; | 91 | static bug_boot_header_t bbh = { |
112 | uint8_t buf[2]; | 92 | .magic_word = "BOOT", |
113 | int n; | 93 | .routine_name = "LINUXROM" |
114 | 94 | }; | |
115 | /* Checksum loop */ | 95 | |
116 | while ( (n = read(bug_fd, buf, 2) ) ) | 96 | /* Fill in the PPCBUG ROM boot header */ |
117 | { | 97 | bbh.entry_offset = htonl(HEADER_SIZE); /* Entry address */ |
118 | checksum_var = checksum_var + *(uint16_t *)buf; | 98 | bbh.routine_length= htonl(HEADER_SIZE+boot_size+2); /* Routine length */ |
119 | 99 | ||
120 | /* If we carry out, mask it and add one to the checksum */ | 100 | /* Output the header and bootloader to the file */ |
121 | if (checksum_var >> 16) | 101 | write(out_fd, &bbh, sizeof(bug_boot_header_t)); |
122 | checksum_var = (checksum_var & 0x0000ffff) + 1; | 102 | update_checksum(&bbh, sizeof(bug_boot_header_t), sum); |
123 | } | ||
124 | |||
125 | return checksum_var; | ||
126 | } | 103 | } |
127 | 104 | ||
128 | int main(int argc, char *argv[]) | 105 | int main(int argc, char *argv[]) |
129 | { | 106 | { |
130 | int32_t image_fd, bugboot_fd; | 107 | int image_fd, bugboot_fd; |
131 | int argptr = 1; | 108 | uint32_t kernel_size = 0; |
132 | uint32_t kernel_size = 0; | 109 | uint16_t checksum = 0; |
133 | uint16_t checksum = 0; | ||
134 | uint8_t bugbootname[256]; | ||
135 | |||
136 | if ( (argc != 3) ) | ||
137 | { | ||
138 | fprintf(stderr, "usage: %s <kernel_image> <bugboot>\n",argv[0]); | ||
139 | exit(-1); | ||
140 | } | ||
141 | |||
142 | /* Get file args */ | ||
143 | |||
144 | /* kernel image file */ | ||
145 | if ((image_fd = open( argv[argptr] , 0)) < 0) | ||
146 | exit(-1); | ||
147 | argptr++; | ||
148 | 110 | ||
149 | /* bugboot file */ | 111 | if (argc != 3) { |
150 | if ( !strcmp( argv[argptr], "-" ) ) | 112 | fprintf(stderr, "usage: %s <kernel_image> <bugboot>\n",argv[0]); |
151 | bugboot_fd = 1; /* stdout */ | 113 | exit(-1); |
152 | else | 114 | } |
153 | if ((bugboot_fd = creat( argv[argptr] , 0755)) < 0) | ||
154 | exit(-1); | ||
155 | else | ||
156 | strcpy(bugbootname, argv[argptr]); | ||
157 | argptr++; | ||
158 | 115 | ||
159 | /* Set file position after ROM header block where zImage will be written */ | 116 | /* Get file args */ |
160 | lseek(bugboot_fd, HEADER_SIZE, SEEK_SET); | ||
161 | 117 | ||
162 | /* Copy kernel image into bugboot image */ | 118 | /* kernel image file */ |
163 | kernel_size = copy_image(image_fd, bugboot_fd); | 119 | if ((image_fd = open(argv[1] , 0)) < 0) |
164 | close(image_fd); | 120 | exit(-1); |
165 | 121 | ||
166 | /* Set file position to beginning where header/romboot will be written */ | 122 | /* bugboot file */ |
167 | lseek(bugboot_fd, 0, SEEK_SET); | 123 | if (!strcmp(argv[2], "-")) |
124 | bugboot_fd = 1; /* stdout */ | ||
125 | else if ((bugboot_fd = creat(argv[2] , 0755)) < 0) | ||
126 | exit(-1); | ||
168 | 127 | ||
169 | /* Write out BUG header/romboot */ | 128 | /* Set file position after ROM header block where zImage will be written */ |
170 | write_bugboot_header(bugboot_fd, kernel_size); | 129 | lseek(bugboot_fd, HEADER_SIZE, SEEK_SET); |
171 | 130 | ||
172 | /* Close bugboot file */ | 131 | /* Copy kernel image into bugboot image */ |
173 | close(bugboot_fd); | 132 | kernel_size = copy_image(image_fd, bugboot_fd, &checksum); |
174 | 133 | ||
175 | /* Reopen it as read/write */ | 134 | /* Set file position to beginning where header/romboot will be written */ |
176 | bugboot_fd = open(bugbootname, O_RDWR); | 135 | lseek(bugboot_fd, 0, SEEK_SET); |
177 | 136 | ||
178 | /* Calculate checksum */ | 137 | /* Write out BUG header/romboot */ |
179 | checksum = calc_checksum(bugboot_fd); | 138 | write_bugboot_header(bugboot_fd, kernel_size, &checksum); |
180 | 139 | ||
181 | /* Write out the calculated checksum */ | 140 | /* Write out the calculated checksum */ |
182 | write(bugboot_fd, &checksum, 2); | 141 | lseek(bugboot_fd, 0, SEEK_END); |
142 | write(bugboot_fd, &checksum, 2); | ||
183 | 143 | ||
184 | return 0; | 144 | /* Close bugboot file */ |
145 | close(bugboot_fd); | ||
146 | return 0; | ||
185 | } | 147 | } |
diff --git a/arch/ppc/boot/utils/mkprep.c b/arch/ppc/boot/utils/mkprep.c index f6d5a2f2fcf6..192bb397126f 100644 --- a/arch/ppc/boot/utils/mkprep.c +++ b/arch/ppc/boot/utils/mkprep.c | |||
@@ -15,279 +15,227 @@ | |||
15 | * Modified for Sparc hosted builds by Peter Wahl <PeterWahl@web.de> | 15 | * Modified for Sparc hosted builds by Peter Wahl <PeterWahl@web.de> |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <fcntl.h> | ||
19 | #include <stdio.h> | 18 | #include <stdio.h> |
20 | #include <stdlib.h> | ||
21 | #include <string.h> | 19 | #include <string.h> |
22 | #include <strings.h> | 20 | #include <stdlib.h> |
23 | #include <sys/stat.h> | ||
24 | #include <unistd.h> | ||
25 | |||
26 | #define cpu_to_le32(x) le32_to_cpu((x)) | ||
27 | unsigned long le32_to_cpu(unsigned long x) | ||
28 | { | ||
29 | return (((x & 0x000000ffU) << 24) | | ||
30 | ((x & 0x0000ff00U) << 8) | | ||
31 | ((x & 0x00ff0000U) >> 8) | | ||
32 | ((x & 0xff000000U) >> 24)); | ||
33 | } | ||
34 | |||
35 | |||
36 | #define cpu_to_le16(x) le16_to_cpu((x)) | ||
37 | unsigned short le16_to_cpu(unsigned short x) | ||
38 | { | ||
39 | return (((x & 0x00ff) << 8) | | ||
40 | ((x & 0xff00) >> 8)); | ||
41 | } | ||
42 | |||
43 | #define cpu_to_be32(x) (x) | ||
44 | #define be32_to_cpu(x) (x) | ||
45 | #define cpu_to_be16(x) (x) | ||
46 | #define be16_to_cpu(x) (x) | ||
47 | 21 | ||
48 | /* size of read buffer */ | 22 | /* size of read buffer */ |
49 | #define SIZE 0x1000 | 23 | #define SIZE 0x1000 |
50 | 24 | ||
51 | |||
52 | typedef unsigned long dword_t; | ||
53 | typedef unsigned short word_t; | ||
54 | typedef unsigned char byte_t; | ||
55 | typedef byte_t block_t[512]; | ||
56 | typedef byte_t page_t[4096]; | ||
57 | |||
58 | |||
59 | /* | 25 | /* |
60 | * Partition table entry | 26 | * Partition table entry |
61 | * - from the PReP spec | 27 | * - from the PReP spec |
62 | */ | 28 | */ |
63 | typedef struct partition_entry { | 29 | typedef struct partition_entry { |
64 | byte_t boot_indicator; | 30 | unsigned char boot_indicator; |
65 | byte_t starting_head; | 31 | unsigned char starting_head; |
66 | byte_t starting_sector; | 32 | unsigned char starting_sector; |
67 | byte_t starting_cylinder; | 33 | unsigned char starting_cylinder; |
68 | 34 | ||
69 | byte_t system_indicator; | 35 | unsigned char system_indicator; |
70 | byte_t ending_head; | 36 | unsigned char ending_head; |
71 | byte_t ending_sector; | 37 | unsigned char ending_sector; |
72 | byte_t ending_cylinder; | 38 | unsigned char ending_cylinder; |
73 | 39 | ||
74 | dword_t beginning_sector; | 40 | unsigned char beginning_sector[4]; |
75 | dword_t number_of_sectors; | 41 | unsigned char number_of_sectors[4]; |
76 | } partition_entry_t; | 42 | } partition_entry_t; |
77 | 43 | ||
78 | #define BootActive 0x80 | 44 | #define BootActive 0x80 |
79 | #define SystemPrep 0x41 | 45 | #define SystemPrep 0x41 |
80 | 46 | ||
81 | void copy_image(int , int); | 47 | void copy_image(FILE *, FILE *); |
82 | void write_prep_partition(int , int ); | 48 | void write_prep_partition(FILE *, FILE *); |
83 | void write_asm_data( int in, int out ); | 49 | void write_asm_data(FILE *, FILE *); |
84 | 50 | ||
85 | unsigned int elfhdr_size = 65536; | 51 | unsigned int elfhdr_size = 65536; |
86 | 52 | ||
87 | int main(int argc, char *argv[]) | 53 | int main(int argc, char *argv[]) |
88 | { | 54 | { |
89 | int in_fd, out_fd; | 55 | FILE *in, *out; |
90 | int argptr = 1; | 56 | int argptr = 1; |
91 | unsigned int prep = 0; | 57 | int prep = 0; |
92 | unsigned int asmoutput = 0; | 58 | int asmoutput = 0; |
93 | 59 | ||
94 | if ( (argc < 3) || (argc > 4) ) | 60 | if (argc < 3 || argc > 4) { |
95 | { | 61 | fprintf(stderr, "usage: %s [-pbp] [-asm] <boot-file> <image>\n", |
96 | fprintf(stderr, "usage: %s [-pbp] [-asm] <boot-file> <image>\n",argv[0]); | 62 | argv[0]); |
97 | exit(-1); | 63 | exit(-1); |
98 | } | 64 | } |
99 | 65 | ||
100 | /* needs to handle args more elegantly -- but this is a small/simple program */ | 66 | /* needs to handle args more elegantly -- but this is a small/simple program */ |
101 | 67 | ||
102 | /* check for -pbp */ | 68 | /* check for -pbp */ |
103 | if ( !strcmp( argv[argptr], "-pbp" ) ) | 69 | if (!strcmp(argv[argptr], "-pbp")) { |
104 | { | 70 | prep = 1; |
105 | prep = 1; | 71 | argptr++; |
106 | argptr++; | 72 | } |
107 | } | 73 | |
108 | 74 | /* check for -asm */ | |
109 | /* check for -asm */ | 75 | if (!strcmp(argv[argptr], "-asm")) { |
110 | if ( !strcmp( argv[argptr], "-asm" ) ) | 76 | asmoutput = 1; |
111 | { | 77 | argptr++; |
112 | asmoutput = 1; | 78 | } |
113 | argptr++; | 79 | |
114 | } | 80 | /* input file */ |
115 | 81 | if (!strcmp(argv[argptr], "-")) | |
116 | /* input file */ | 82 | in = stdin; |
117 | if ( !strcmp( argv[argptr], "-" ) ) | 83 | else if (!(in = fopen(argv[argptr], "r"))) |
118 | in_fd = 0; /* stdin */ | 84 | exit(-1); |
119 | else | 85 | argptr++; |
120 | if ((in_fd = open( argv[argptr] , 0)) < 0) | 86 | |
121 | exit(-1); | 87 | /* output file */ |
122 | argptr++; | 88 | if (!strcmp(argv[argptr], "-")) |
123 | 89 | out = stdout; | |
124 | /* output file */ | 90 | else if (!(out = fopen(argv[argptr], "w"))) |
125 | if ( !strcmp( argv[argptr], "-" ) ) | 91 | exit(-1); |
126 | out_fd = 1; /* stdout */ | 92 | argptr++; |
127 | else | 93 | |
128 | if ((out_fd = creat( argv[argptr] , 0755)) < 0) | 94 | /* skip elf header in input file */ |
129 | exit(-1); | 95 | /*if ( !prep )*/ |
130 | argptr++; | 96 | fseek(in, elfhdr_size, SEEK_SET); |
131 | 97 | ||
132 | /* skip elf header in input file */ | 98 | /* write prep partition if necessary */ |
133 | /*if ( !prep )*/ | 99 | if (prep) |
134 | lseek(in_fd, elfhdr_size, SEEK_SET); | 100 | write_prep_partition(in, out); |
135 | 101 | ||
136 | /* write prep partition if necessary */ | 102 | /* write input image to bootimage */ |
137 | if ( prep ) | 103 | if (asmoutput) |
138 | write_prep_partition( in_fd, out_fd ); | 104 | write_asm_data(in, out); |
139 | 105 | else | |
140 | /* write input image to bootimage */ | 106 | copy_image(in, out); |
141 | if ( asmoutput ) | 107 | |
142 | write_asm_data( in_fd, out_fd ); | 108 | return 0; |
143 | else | ||
144 | copy_image(in_fd, out_fd); | ||
145 | |||
146 | return 0; | ||
147 | } | 109 | } |
148 | 110 | ||
149 | void write_prep_partition(int in, int out) | 111 | void store_le32(unsigned int v, unsigned char *p) |
150 | { | 112 | { |
151 | unsigned char block[512]; | 113 | p[0] = v; |
152 | partition_entry_t pe; | 114 | p[1] = v >>= 8; |
153 | dword_t *entry = (dword_t *)&block[0]; | 115 | p[2] = v >>= 8; |
154 | dword_t *length = (dword_t *)&block[sizeof(long)]; | 116 | p[3] = v >> 8; |
155 | struct stat info; | 117 | } |
156 | 118 | ||
157 | if (fstat(in, &info) < 0) | 119 | void write_prep_partition(FILE *in, FILE *out) |
158 | { | 120 | { |
159 | fprintf(stderr,"info failed\n"); | 121 | unsigned char block[512]; |
160 | exit(-1); | 122 | partition_entry_t pe; |
161 | } | 123 | unsigned char *entry = block; |
162 | 124 | unsigned char *length = block + 4; | |
163 | bzero( block, sizeof block ); | 125 | long pos = ftell(in), size; |
164 | 126 | ||
165 | /* set entry point and boot image size skipping over elf header */ | 127 | if (fseek(in, 0, SEEK_END) < 0) { |
166 | #ifdef __i386__ | 128 | fprintf(stderr,"info failed\n"); |
167 | *entry = 0x400/*+65536*/; | 129 | exit(-1); |
168 | *length = info.st_size-elfhdr_size+0x400; | 130 | } |
169 | #else | 131 | size = ftell(in); |
170 | *entry = cpu_to_le32(0x400/*+65536*/); | 132 | if (fseek(in, pos, SEEK_SET) < 0) { |
171 | *length = cpu_to_le32(info.st_size-elfhdr_size+0x400); | 133 | fprintf(stderr,"info failed\n"); |
172 | #endif /* __i386__ */ | 134 | exit(-1); |
173 | 135 | } | |
174 | /* sets magic number for msdos partition (used by linux) */ | 136 | |
175 | block[510] = 0x55; | 137 | memset(block, '\0', sizeof(block)); |
176 | block[511] = 0xAA; | 138 | |
177 | 139 | /* set entry point and boot image size skipping over elf header */ | |
178 | /* | 140 | store_le32(0x400/*+65536*/, entry); |
179 | * Build a "PReP" partition table entry in the boot record | 141 | store_le32(size-elfhdr_size+0x400, length); |
180 | * - "PReP" may only look at the system_indicator | 142 | |
181 | */ | 143 | /* sets magic number for msdos partition (used by linux) */ |
182 | pe.boot_indicator = BootActive; | 144 | block[510] = 0x55; |
183 | pe.system_indicator = SystemPrep; | 145 | block[511] = 0xAA; |
184 | /* | 146 | |
185 | * The first block of the diskette is used by this "boot record" which | 147 | /* |
186 | * actually contains the partition table. (The first block of the | 148 | * Build a "PReP" partition table entry in the boot record |
187 | * partition contains the boot image, but I digress...) We'll set up | 149 | * - "PReP" may only look at the system_indicator |
188 | * one partition on the diskette and it shall contain the rest of the | 150 | */ |
189 | * diskette. | 151 | pe.boot_indicator = BootActive; |
190 | */ | 152 | pe.system_indicator = SystemPrep; |
191 | pe.starting_head = 0; /* zero-based */ | 153 | /* |
192 | pe.starting_sector = 2; /* one-based */ | 154 | * The first block of the diskette is used by this "boot record" which |
193 | pe.starting_cylinder = 0; /* zero-based */ | 155 | * actually contains the partition table. (The first block of the |
194 | pe.ending_head = 1; /* assumes two heads */ | 156 | * partition contains the boot image, but I digress...) We'll set up |
195 | pe.ending_sector = 18; /* assumes 18 sectors/track */ | 157 | * one partition on the diskette and it shall contain the rest of the |
196 | pe.ending_cylinder = 79; /* assumes 80 cylinders/diskette */ | 158 | * diskette. |
197 | 159 | */ | |
198 | /* | 160 | pe.starting_head = 0; /* zero-based */ |
199 | * The "PReP" software ignores the above fields and just looks at | 161 | pe.starting_sector = 2; /* one-based */ |
200 | * the next two. | 162 | pe.starting_cylinder = 0; /* zero-based */ |
201 | * - size of the diskette is (assumed to be) | 163 | pe.ending_head = 1; /* assumes two heads */ |
202 | * (2 tracks/cylinder)(18 sectors/tracks)(80 cylinders/diskette) | 164 | pe.ending_sector = 18; /* assumes 18 sectors/track */ |
203 | * - unlike the above sector numbers, the beginning sector is zero-based! | 165 | pe.ending_cylinder = 79; /* assumes 80 cylinders/diskette */ |
204 | */ | 166 | |
167 | /* | ||
168 | * The "PReP" software ignores the above fields and just looks at | ||
169 | * the next two. | ||
170 | * - size of the diskette is (assumed to be) | ||
171 | * (2 tracks/cylinder)(18 sectors/tracks)(80 cylinders/diskette) | ||
172 | * - unlike the above sector numbers, the beginning sector is zero-based! | ||
173 | */ | ||
205 | #if 0 | 174 | #if 0 |
206 | pe.beginning_sector = cpu_to_le32(1); | 175 | store_le32(1, pe.beginning_sector); |
207 | #else | ||
208 | /* This has to be 0 on the PowerStack? */ | ||
209 | #ifdef __i386__ | ||
210 | pe.beginning_sector = 0; | ||
211 | #else | 176 | #else |
212 | pe.beginning_sector = cpu_to_le32(0); | 177 | /* This has to be 0 on the PowerStack? */ |
213 | #endif /* __i386__ */ | 178 | store_le32(0, pe.beginning_sector); |
214 | #endif | 179 | #endif |
215 | 180 | ||
216 | #ifdef __i386__ | 181 | store_le32(2*18*80-1, pe.number_of_sectors); |
217 | pe.number_of_sectors = 2*18*80-1; | ||
218 | #else | ||
219 | pe.number_of_sectors = cpu_to_le32(2*18*80-1); | ||
220 | #endif /* __i386__ */ | ||
221 | 182 | ||
222 | memcpy(&block[0x1BE], &pe, sizeof(pe)); | 183 | memcpy(&block[0x1BE], &pe, sizeof(pe)); |
223 | 184 | ||
224 | write( out, block, sizeof(block) ); | 185 | fwrite(block, sizeof(block), 1, out); |
225 | write( out, entry, sizeof(*entry) ); | 186 | fwrite(entry, 4, 1, out); |
226 | write( out, length, sizeof(*length) ); | 187 | fwrite(length, 4, 1, out); |
227 | /* set file position to 2nd sector where image will be written */ | 188 | /* set file position to 2nd sector where image will be written */ |
228 | lseek( out, 0x400, SEEK_SET ); | 189 | fseek( out, 0x400, SEEK_SET ); |
229 | } | 190 | } |
230 | 191 | ||
231 | 192 | ||
232 | 193 | ||
233 | void | 194 | void copy_image(FILE *in, FILE *out) |
234 | copy_image(int in, int out) | ||
235 | { | 195 | { |
236 | char buf[SIZE]; | 196 | char buf[SIZE]; |
237 | int n; | 197 | int n; |
238 | 198 | ||
239 | while ( (n = read(in, buf, SIZE)) > 0 ) | 199 | while ( (n = fread(buf, 1, SIZE, in)) > 0 ) |
240 | write(out, buf, n); | 200 | fwrite(buf, 1, n, out); |
241 | } | 201 | } |
242 | 202 | ||
243 | 203 | ||
244 | void | 204 | void |
245 | write_asm_data( int in, int out ) | 205 | write_asm_data(FILE *in, FILE *out) |
246 | { | 206 | { |
247 | int i, cnt, pos, len; | 207 | int i, cnt, pos = 0; |
248 | unsigned int cksum, val; | 208 | unsigned int cksum = 0, val; |
249 | unsigned char *lp; | 209 | unsigned char *lp; |
250 | unsigned char buf[SIZE]; | 210 | unsigned char buf[SIZE]; |
251 | unsigned char str[256]; | 211 | size_t len; |
252 | 212 | ||
253 | write( out, "\t.data\n\t.globl input_data\ninput_data:\n", | 213 | fputs("\t.data\n\t.globl input_data\ninput_data:\n", out); |
254 | strlen( "\t.data\n\t.globl input_data\ninput_data:\n" ) ); | 214 | while ((len = fread(buf, 1, sizeof(buf), in)) > 0) { |
255 | pos = 0; | 215 | cnt = 0; |
256 | cksum = 0; | 216 | lp = buf; |
257 | while ((len = read(in, buf, sizeof(buf))) > 0) | 217 | /* Round up to longwords */ |
258 | { | 218 | while (len & 3) |
259 | cnt = 0; | 219 | buf[len++] = '\0'; |
260 | lp = (unsigned char *)buf; | 220 | for (i = 0; i < len; i += 4) { |
261 | len = (len + 3) & ~3; /* Round up to longwords */ | 221 | if (cnt == 0) |
262 | for (i = 0; i < len; i += 4) | 222 | fputs("\t.long\t", out); |
263 | { | 223 | fprintf(out, "0x%02X%02X%02X%02X", |
264 | if (cnt == 0) | 224 | lp[0], lp[1], lp[2], lp[3]); |
265 | { | 225 | val = *(unsigned long *)lp; |
266 | write( out, "\t.long\t", strlen( "\t.long\t" ) ); | 226 | cksum ^= val; |
267 | } | 227 | lp += 4; |
268 | sprintf( str, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]); | 228 | if (++cnt == 4) { |
269 | write( out, str, strlen(str) ); | 229 | cnt = 0; |
270 | val = *(unsigned long *)lp; | 230 | fprintf(out, " # %x \n", pos+i-12); |
271 | cksum ^= val; | 231 | } else { |
272 | lp += 4; | 232 | fputs(",", out); |
273 | if (++cnt == 4) | 233 | } |
274 | { | 234 | } |
275 | cnt = 0; | 235 | if (cnt) |
276 | sprintf( str, " # %x \n", pos+i-12); | 236 | fputs("0\n", out); |
277 | write( out, str, strlen(str) ); | 237 | pos += len; |
278 | } else | 238 | } |
279 | { | 239 | fprintf(out, "\t.globl input_len\ninput_len:\t.long\t0x%x\n", pos); |
280 | write( out, ",", 1 ); | 240 | fprintf(stderr, "cksum = %x\n", cksum); |
281 | } | ||
282 | } | ||
283 | if (cnt) | ||
284 | { | ||
285 | write( out, "0\n", 2 ); | ||
286 | } | ||
287 | pos += len; | ||
288 | } | ||
289 | sprintf(str, "\t.globl input_len\ninput_len:\t.long\t0x%x\n", pos); | ||
290 | write( out, str, strlen(str) ); | ||
291 | |||
292 | fprintf(stderr, "cksum = %x\n", cksum); | ||
293 | } | 241 | } |
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c index 2a35fe2b9b96..d5d36c372c8e 100644 --- a/arch/ppc/platforms/mpc8272ads_setup.c +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -103,7 +103,7 @@ static struct fs_platform_info mpc82xx_enet_pdata[] = { | |||
103 | }, | 103 | }, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static void init_fcc1_ioports(void) | 106 | static void init_fcc1_ioports(struct fs_platform_info*) |
107 | { | 107 | { |
108 | struct io_port *io; | 108 | struct io_port *io; |
109 | u32 tempval; | 109 | u32 tempval; |
@@ -144,7 +144,7 @@ static void init_fcc1_ioports(void) | |||
144 | iounmap(immap); | 144 | iounmap(immap); |
145 | } | 145 | } |
146 | 146 | ||
147 | static void init_fcc2_ioports(void) | 147 | static void init_fcc2_ioports(struct fs_platform_info*) |
148 | { | 148 | { |
149 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | 149 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); |
150 | u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32)); | 150 | u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32)); |
@@ -229,7 +229,7 @@ static void mpc8272ads_fixup_uart_pdata(struct platform_device *pdev, | |||
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | static void init_scc1_uart_ioports(void) | 232 | static void init_scc1_uart_ioports(struct fs_uart_platform_info*) |
233 | { | 233 | { |
234 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | 234 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); |
235 | 235 | ||
@@ -246,7 +246,7 @@ static void init_scc1_uart_ioports(void) | |||
246 | iounmap(immap); | 246 | iounmap(immap); |
247 | } | 247 | } |
248 | 248 | ||
249 | static void init_scc4_uart_ioports(void) | 249 | static void init_scc4_uart_ioports(struct fs_uart_platform_info*) |
250 | { | 250 | { |
251 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | 251 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); |
252 | 252 | ||
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c index e12cece4c9fd..5f130dca3770 100644 --- a/arch/ppc/platforms/mpc866ads_setup.c +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -137,7 +137,7 @@ void __init board_init(void) | |||
137 | iounmap(bcsr_io); | 137 | iounmap(bcsr_io); |
138 | } | 138 | } |
139 | 139 | ||
140 | static void setup_fec1_ioports(void) | 140 | static void setup_fec1_ioports(struct fs_platform_info*) |
141 | { | 141 | { |
142 | immap_t *immap = (immap_t *) IMAP_ADDR; | 142 | immap_t *immap = (immap_t *) IMAP_ADDR; |
143 | 143 | ||
@@ -145,7 +145,7 @@ static void setup_fec1_ioports(void) | |||
145 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); | 145 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); |
146 | } | 146 | } |
147 | 147 | ||
148 | static void setup_scc1_ioports(void) | 148 | static void setup_scc1_ioports(struct fs_platform_info*) |
149 | { | 149 | { |
150 | immap_t *immap = (immap_t *) IMAP_ADDR; | 150 | immap_t *immap = (immap_t *) IMAP_ADDR; |
151 | unsigned *bcsr_io; | 151 | unsigned *bcsr_io; |
@@ -194,7 +194,7 @@ static void setup_scc1_ioports(void) | |||
194 | 194 | ||
195 | } | 195 | } |
196 | 196 | ||
197 | static void setup_smc1_ioports(void) | 197 | static void setup_smc1_ioports(struct fs_uart_platform_info*) |
198 | { | 198 | { |
199 | immap_t *immap = (immap_t *) IMAP_ADDR; | 199 | immap_t *immap = (immap_t *) IMAP_ADDR; |
200 | unsigned *bcsr_io; | 200 | unsigned *bcsr_io; |
@@ -216,7 +216,7 @@ static void setup_smc1_ioports(void) | |||
216 | 216 | ||
217 | } | 217 | } |
218 | 218 | ||
219 | static void setup_smc2_ioports(void) | 219 | static void setup_smc2_ioports(struct fs_uart_platform_info*) |
220 | { | 220 | { |
221 | immap_t *immap = (immap_t *) IMAP_ADDR; | 221 | immap_t *immap = (immap_t *) IMAP_ADDR; |
222 | unsigned *bcsr_io; | 222 | unsigned *bcsr_io; |
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c index 5dfa4e6c2af0..bf388ed04d46 100644 --- a/arch/ppc/platforms/mpc885ads_setup.c +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -161,7 +161,7 @@ void __init board_init(void) | |||
161 | #endif | 161 | #endif |
162 | } | 162 | } |
163 | 163 | ||
164 | static void setup_fec1_ioports(void) | 164 | static void setup_fec1_ioports(struct fs_platform_info*) |
165 | { | 165 | { |
166 | immap_t *immap = (immap_t *) IMAP_ADDR; | 166 | immap_t *immap = (immap_t *) IMAP_ADDR; |
167 | 167 | ||
@@ -181,7 +181,7 @@ static void setup_fec1_ioports(void) | |||
181 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000100); | 181 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000100); |
182 | } | 182 | } |
183 | 183 | ||
184 | static void setup_fec2_ioports(void) | 184 | static void setup_fec2_ioports(struct fs_platform_info*) |
185 | { | 185 | { |
186 | immap_t *immap = (immap_t *) IMAP_ADDR; | 186 | immap_t *immap = (immap_t *) IMAP_ADDR; |
187 | 187 | ||
@@ -193,7 +193,7 @@ static void setup_fec2_ioports(void) | |||
193 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); | 193 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); |
194 | } | 194 | } |
195 | 195 | ||
196 | static void setup_scc3_ioports(void) | 196 | static void setup_scc3_ioports(struct fs_platform_info*) |
197 | { | 197 | { |
198 | immap_t *immap = (immap_t *) IMAP_ADDR; | 198 | immap_t *immap = (immap_t *) IMAP_ADDR; |
199 | unsigned *bcsr_io; | 199 | unsigned *bcsr_io; |
@@ -315,7 +315,7 @@ static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev, | |||
315 | mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | 315 | mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); |
316 | } | 316 | } |
317 | 317 | ||
318 | static void setup_smc1_ioports(void) | 318 | static void setup_smc1_ioports(struct fs_uart_platform_info*) |
319 | { | 319 | { |
320 | immap_t *immap = (immap_t *) IMAP_ADDR; | 320 | immap_t *immap = (immap_t *) IMAP_ADDR; |
321 | unsigned *bcsr_io; | 321 | unsigned *bcsr_io; |
@@ -335,7 +335,7 @@ static void setup_smc1_ioports(void) | |||
335 | clrbits16(&immap->im_cpm.cp_pbodr, iobits); | 335 | clrbits16(&immap->im_cpm.cp_pbodr, iobits); |
336 | } | 336 | } |
337 | 337 | ||
338 | static void setup_smc2_ioports(void) | 338 | static void setup_smc2_ioports(struct fs_uart_platform_info*) |
339 | { | 339 | { |
340 | immap_t *immap = (immap_t *) IMAP_ADDR; | 340 | immap_t *immap = (immap_t *) IMAP_ADDR; |
341 | unsigned *bcsr_io; | 341 | unsigned *bcsr_io; |
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index 4747729459c7..8b6f197e5f8c 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c | |||
@@ -153,9 +153,7 @@ static int put_chars(uint32_t vtermno, const char *buf, int count) | |||
153 | spin_lock_irqsave(&consolelock, flags); | 153 | spin_lock_irqsave(&consolelock, flags); |
154 | 154 | ||
155 | if (viochar_is_console(pi) && !viopath_isactive(pi->lp)) { | 155 | if (viochar_is_console(pi) && !viopath_isactive(pi->lp)) { |
156 | spin_lock_irqsave(&consoleloglock, flags); | ||
157 | HvCall_writeLogBuffer(buf, count); | 156 | HvCall_writeLogBuffer(buf, count); |
158 | spin_unlock_irqrestore(&consoleloglock, flags); | ||
159 | sent = count; | 157 | sent = count; |
160 | goto done; | 158 | goto done; |
161 | } | 159 | } |
@@ -171,11 +169,8 @@ static int put_chars(uint32_t vtermno, const char *buf, int count) | |||
171 | 169 | ||
172 | len = (count > VIOCHAR_MAX_DATA) ? VIOCHAR_MAX_DATA : count; | 170 | len = (count > VIOCHAR_MAX_DATA) ? VIOCHAR_MAX_DATA : count; |
173 | 171 | ||
174 | if (viochar_is_console(pi)) { | 172 | if (viochar_is_console(pi)) |
175 | spin_lock_irqsave(&consoleloglock, flags); | ||
176 | HvCall_writeLogBuffer(buf, len); | 173 | HvCall_writeLogBuffer(buf, len); |
177 | spin_unlock_irqrestore(&consoleloglock, flags); | ||
178 | } | ||
179 | 174 | ||
180 | init_data_event(viochar, pi->lp); | 175 | init_data_event(viochar, pi->lp); |
181 | 176 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 80b89649e676..4f04fd0956a0 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -336,8 +336,10 @@ int __init find_via_pmu(void) | |||
336 | if (gaddr != OF_BAD_ADDR) | 336 | if (gaddr != OF_BAD_ADDR) |
337 | gpio_reg = ioremap(gaddr, 0x10); | 337 | gpio_reg = ioremap(gaddr, 0x10); |
338 | } | 338 | } |
339 | if (gpio_reg == NULL) | 339 | if (gpio_reg == NULL) { |
340 | printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n"); | 340 | printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n"); |
341 | goto fail_gpio; | ||
342 | } | ||
341 | } else | 343 | } else |
342 | pmu_kind = PMU_UNKNOWN; | 344 | pmu_kind = PMU_UNKNOWN; |
343 | 345 | ||
@@ -365,6 +367,9 @@ int __init find_via_pmu(void) | |||
365 | return 1; | 367 | return 1; |
366 | fail: | 368 | fail: |
367 | of_node_put(vias); | 369 | of_node_put(vias); |
370 | iounmap(gpio_reg); | ||
371 | gpio_reg = NULL; | ||
372 | fail_gpio: | ||
368 | vias = NULL; | 373 | vias = NULL; |
369 | return 0; | 374 | return 0; |
370 | } | 375 | } |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 34412bc7c4b6..d01870619a4a 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -944,12 +944,13 @@ extern int fs_mii_connect(struct net_device *dev); | |||
944 | extern void fs_mii_disconnect(struct net_device *dev); | 944 | extern void fs_mii_disconnect(struct net_device *dev); |
945 | 945 | ||
946 | static struct net_device *fs_init_instance(struct device *dev, | 946 | static struct net_device *fs_init_instance(struct device *dev, |
947 | const struct fs_platform_info *fpi) | 947 | struct fs_platform_info *fpi) |
948 | { | 948 | { |
949 | struct net_device *ndev = NULL; | 949 | struct net_device *ndev = NULL; |
950 | struct fs_enet_private *fep = NULL; | 950 | struct fs_enet_private *fep = NULL; |
951 | int privsize, i, r, err = 0, registered = 0; | 951 | int privsize, i, r, err = 0, registered = 0; |
952 | 952 | ||
953 | fpi->fs_no = fs_get_id(fpi); | ||
953 | /* guard */ | 954 | /* guard */ |
954 | if ((unsigned int)fpi->fs_no >= FS_MAX_INDEX) | 955 | if ((unsigned int)fpi->fs_no >= FS_MAX_INDEX) |
955 | return ERR_PTR(-EINVAL); | 956 | return ERR_PTR(-EINVAL); |
@@ -971,7 +972,7 @@ static struct net_device *fs_init_instance(struct device *dev, | |||
971 | dev_set_drvdata(dev, ndev); | 972 | dev_set_drvdata(dev, ndev); |
972 | fep->fpi = fpi; | 973 | fep->fpi = fpi; |
973 | if (fpi->init_ioports) | 974 | if (fpi->init_ioports) |
974 | fpi->init_ioports(); | 975 | fpi->init_ioports((struct fs_platform_info *)fpi); |
975 | 976 | ||
976 | #ifdef CONFIG_FS_ENET_HAS_FEC | 977 | #ifdef CONFIG_FS_ENET_HAS_FEC |
977 | if (fs_get_fec_index(fpi->fs_no) >= 0) | 978 | if (fs_get_fec_index(fpi->fs_no) >= 0) |
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index f2e0179962e2..3ac5b123215a 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c | |||
@@ -1049,6 +1049,10 @@ static int __init isapnp_init(void) | |||
1049 | printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n"); | 1049 | printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n"); |
1050 | return 0; | 1050 | return 0; |
1051 | } | 1051 | } |
1052 | #ifdef CONFIG_PPC_MERGE | ||
1053 | if (check_legacy_ioport(_PIDXR) || check_legacy_ioport(_PNPWRP)) | ||
1054 | return -EINVAL; | ||
1055 | #endif | ||
1052 | #ifdef ISAPNP_REGION_OK | 1056 | #ifdef ISAPNP_REGION_OK |
1053 | if (!request_region(_PIDXR, 1, "isapnp index")) { | 1057 | if (!request_region(_PIDXR, 1, "isapnp index")) { |
1054 | printk(KERN_ERR "isapnp: Index Register 0x%x already used\n", _PIDXR); | 1058 | printk(KERN_ERR "isapnp: Index Register 0x%x already used\n", _PIDXR); |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 0ae9ced00ed4..10c2daab99ac 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -320,8 +320,8 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset) | |||
320 | 320 | ||
321 | case UPIO_TSI: | 321 | case UPIO_TSI: |
322 | if (offset == UART_IIR) { | 322 | if (offset == UART_IIR) { |
323 | tmp = readl((u32 *)(up->port.membase + UART_RX)); | 323 | tmp = readl(up->port.membase + (UART_IIR & ~3)); |
324 | return (cpu_to_le32(tmp) >> 8) & 0xff; | 324 | return (tmp >> 16) & 0xff; /* UART_IIR % 4 == 2 */ |
325 | } else | 325 | } else |
326 | return readb(up->port.membase + offset); | 326 | return readb(up->port.membase + offset); |
327 | 327 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 90ff96e3339b..a0d6136deb9b 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/io.h> | 46 | #include <asm/io.h> |
47 | #include <asm/irq.h> | 47 | #include <asm/irq.h> |
48 | #include <asm/delay.h> | 48 | #include <asm/delay.h> |
49 | #include <asm/fs_pd.h> | ||
49 | 50 | ||
50 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 51 | #if defined(CONFIG_SERIAL_CPM_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
51 | #define SUPPORT_SYSRQ | 52 | #define SUPPORT_SYSRQ |
@@ -1022,15 +1023,17 @@ int cpm_uart_drv_get_platform_data(struct platform_device *pdev, int is_con) | |||
1022 | { | 1023 | { |
1023 | struct resource *r; | 1024 | struct resource *r; |
1024 | struct fs_uart_platform_info *pdata = pdev->dev.platform_data; | 1025 | struct fs_uart_platform_info *pdata = pdev->dev.platform_data; |
1025 | int idx = pdata->fs_no; /* It is UART_SMCx or UART_SCCx index */ | 1026 | int idx; /* It is UART_SMCx or UART_SCCx index */ |
1026 | struct uart_cpm_port *pinfo; | 1027 | struct uart_cpm_port *pinfo; |
1027 | int line; | 1028 | int line; |
1028 | u32 mem, pram; | 1029 | u32 mem, pram; |
1029 | 1030 | ||
1031 | idx = pdata->fs_no = fs_uart_get_id(pdata); | ||
1032 | |||
1030 | line = cpm_uart_id2nr(idx); | 1033 | line = cpm_uart_id2nr(idx); |
1031 | if(line < 0) { | 1034 | if(line < 0) { |
1032 | printk(KERN_ERR"%s(): port %d is not registered", __FUNCTION__, idx); | 1035 | printk(KERN_ERR"%s(): port %d is not registered", __FUNCTION__, idx); |
1033 | return -1; | 1036 | return -EINVAL; |
1034 | } | 1037 | } |
1035 | 1038 | ||
1036 | pinfo = (struct uart_cpm_port *) &cpm_uart_ports[idx]; | 1039 | pinfo = (struct uart_cpm_port *) &cpm_uart_ports[idx]; |
@@ -1044,11 +1047,11 @@ int cpm_uart_drv_get_platform_data(struct platform_device *pdev, int is_con) | |||
1044 | 1047 | ||
1045 | if (!(r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"))) | 1048 | if (!(r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"))) |
1046 | return -EINVAL; | 1049 | return -EINVAL; |
1047 | mem = r->start; | 1050 | mem = (u32)ioremap(r->start, r->end - r->start + 1); |
1048 | 1051 | ||
1049 | if (!(r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"))) | 1052 | if (!(r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"))) |
1050 | return -EINVAL; | 1053 | return -EINVAL; |
1051 | pram = r->start; | 1054 | pram = (u32)ioremap(r->start, r->end - r->start + 1); |
1052 | 1055 | ||
1053 | if(idx > fsid_smc2_uart) { | 1056 | if(idx > fsid_smc2_uart) { |
1054 | pinfo->sccp = (scc_t *)mem; | 1057 | pinfo->sccp = (scc_t *)mem; |
@@ -1179,7 +1182,7 @@ static int __init cpm_uart_console_setup(struct console *co, char *options) | |||
1179 | pdata = pdev->dev.platform_data; | 1182 | pdata = pdev->dev.platform_data; |
1180 | if (pdata) | 1183 | if (pdata) |
1181 | if (pdata->init_ioports) | 1184 | if (pdata->init_ioports) |
1182 | pdata->init_ioports(); | 1185 | pdata->init_ioports(pdata); |
1183 | 1186 | ||
1184 | cpm_uart_drv_get_platform_data(pdev, 1); | 1187 | cpm_uart_drv_get_platform_data(pdev, 1); |
1185 | } | 1188 | } |
@@ -1189,11 +1192,7 @@ static int __init cpm_uart_console_setup(struct console *co, char *options) | |||
1189 | if (options) { | 1192 | if (options) { |
1190 | uart_parse_options(options, &baud, &parity, &bits, &flow); | 1193 | uart_parse_options(options, &baud, &parity, &bits, &flow); |
1191 | } else { | 1194 | } else { |
1192 | bd_t *bd = (bd_t *) __res; | 1195 | if ((baud = uart_baudrate()) == -1) |
1193 | |||
1194 | if (bd->bi_baudrate) | ||
1195 | baud = bd->bi_baudrate; | ||
1196 | else | ||
1197 | baud = 9600; | 1196 | baud = 9600; |
1198 | } | 1197 | } |
1199 | 1198 | ||
@@ -1266,13 +1265,14 @@ static int cpm_uart_drv_probe(struct device *dev) | |||
1266 | } | 1265 | } |
1267 | 1266 | ||
1268 | pdata = pdev->dev.platform_data; | 1267 | pdata = pdev->dev.platform_data; |
1269 | pr_debug("cpm_uart_drv_probe: Adding CPM UART %d\n", cpm_uart_id2nr(pdata->fs_no)); | ||
1270 | 1268 | ||
1271 | if ((ret = cpm_uart_drv_get_platform_data(pdev, 0))) | 1269 | if ((ret = cpm_uart_drv_get_platform_data(pdev, 0))) |
1272 | return ret; | 1270 | return ret; |
1273 | 1271 | ||
1272 | pr_debug("cpm_uart_drv_probe: Adding CPM UART %d\n", cpm_uart_id2nr(pdata->fs_no)); | ||
1273 | |||
1274 | if (pdata->init_ioports) | 1274 | if (pdata->init_ioports) |
1275 | pdata->init_ioports(); | 1275 | pdata->init_ioports(pdata); |
1276 | 1276 | ||
1277 | ret = uart_add_one_port(&cpm_reg, &cpm_uart_ports[pdata->fs_no].port); | 1277 | ret = uart_add_one_port(&cpm_reg, &cpm_uart_ports[pdata->fs_no].port); |
1278 | 1278 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index ef3bb476c432..b691d3e14754 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include <asm/io.h> | 41 | #include <asm/io.h> |
42 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
43 | #include <asm/fs_pd.h> | ||
43 | 44 | ||
44 | #include <linux/serial_core.h> | 45 | #include <linux/serial_core.h> |
45 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
@@ -50,8 +51,9 @@ | |||
50 | 51 | ||
51 | void cpm_line_cr_cmd(int line, int cmd) | 52 | void cpm_line_cr_cmd(int line, int cmd) |
52 | { | 53 | { |
53 | volatile cpm_cpm2_t *cp = cpmp; | ||
54 | ulong val; | 54 | ulong val; |
55 | volatile cpm_cpm2_t *cp = cpm2_map(im_cpm); | ||
56 | |||
55 | 57 | ||
56 | switch (line) { | 58 | switch (line) { |
57 | case UART_SMC1: | 59 | case UART_SMC1: |
@@ -84,11 +86,14 @@ void cpm_line_cr_cmd(int line, int cmd) | |||
84 | } | 86 | } |
85 | cp->cp_cpcr = val; | 87 | cp->cp_cpcr = val; |
86 | while (cp->cp_cpcr & CPM_CR_FLG) ; | 88 | while (cp->cp_cpcr & CPM_CR_FLG) ; |
89 | |||
90 | cpm2_unmap(cp); | ||
87 | } | 91 | } |
88 | 92 | ||
89 | void smc1_lineif(struct uart_cpm_port *pinfo) | 93 | void smc1_lineif(struct uart_cpm_port *pinfo) |
90 | { | 94 | { |
91 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 95 | volatile iop_cpm2_t *io = cpm2_map(im_ioport); |
96 | volatile cpmux_t *cpmux = cpm2_map(im_cpmux); | ||
92 | 97 | ||
93 | /* SMC1 is only on port D */ | 98 | /* SMC1 is only on port D */ |
94 | io->iop_ppard |= 0x00c00000; | 99 | io->iop_ppard |= 0x00c00000; |
@@ -97,13 +102,17 @@ void smc1_lineif(struct uart_cpm_port *pinfo) | |||
97 | io->iop_psord &= ~0x00c00000; | 102 | io->iop_psord &= ~0x00c00000; |
98 | 103 | ||
99 | /* Wire BRG1 to SMC1 */ | 104 | /* Wire BRG1 to SMC1 */ |
100 | cpm2_immr->im_cpmux.cmx_smr &= 0x0f; | 105 | cpmux->cmx_smr &= 0x0f; |
101 | pinfo->brg = 1; | 106 | pinfo->brg = 1; |
107 | |||
108 | cpm2_unmap(cpmux); | ||
109 | cpm2_unmap(io); | ||
102 | } | 110 | } |
103 | 111 | ||
104 | void smc2_lineif(struct uart_cpm_port *pinfo) | 112 | void smc2_lineif(struct uart_cpm_port *pinfo) |
105 | { | 113 | { |
106 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 114 | volatile iop_cpm2_t *io = cpm2_map(im_ioport); |
115 | volatile cpmux_t *cpmux = cpm2_map(im_cpmux); | ||
107 | 116 | ||
108 | /* SMC2 is only on port A */ | 117 | /* SMC2 is only on port A */ |
109 | io->iop_ppara |= 0x00c00000; | 118 | io->iop_ppara |= 0x00c00000; |
@@ -112,13 +121,17 @@ void smc2_lineif(struct uart_cpm_port *pinfo) | |||
112 | io->iop_psora &= ~0x00c00000; | 121 | io->iop_psora &= ~0x00c00000; |
113 | 122 | ||
114 | /* Wire BRG2 to SMC2 */ | 123 | /* Wire BRG2 to SMC2 */ |
115 | cpm2_immr->im_cpmux.cmx_smr &= 0xf0; | 124 | cpmux->cmx_smr &= 0xf0; |
116 | pinfo->brg = 2; | 125 | pinfo->brg = 2; |
126 | |||
127 | cpm2_unmap(cpmux); | ||
128 | cpm2_unmap(io); | ||
117 | } | 129 | } |
118 | 130 | ||
119 | void scc1_lineif(struct uart_cpm_port *pinfo) | 131 | void scc1_lineif(struct uart_cpm_port *pinfo) |
120 | { | 132 | { |
121 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 133 | volatile iop_cpm2_t *io = cpm2_map(im_ioport); |
134 | volatile cpmux_t *cpmux = cpm2_map(im_cpmux); | ||
122 | 135 | ||
123 | /* Use Port D for SCC1 instead of other functions. */ | 136 | /* Use Port D for SCC1 instead of other functions. */ |
124 | io->iop_ppard |= 0x00000003; | 137 | io->iop_ppard |= 0x00000003; |
@@ -128,9 +141,12 @@ void scc1_lineif(struct uart_cpm_port *pinfo) | |||
128 | io->iop_pdird |= 0x00000002; /* Tx */ | 141 | io->iop_pdird |= 0x00000002; /* Tx */ |
129 | 142 | ||
130 | /* Wire BRG1 to SCC1 */ | 143 | /* Wire BRG1 to SCC1 */ |
131 | cpm2_immr->im_cpmux.cmx_scr &= 0x00ffffff; | 144 | cpmux->cmx_scr &= 0x00ffffff; |
132 | cpm2_immr->im_cpmux.cmx_scr |= 0x00000000; | 145 | cpmux->cmx_scr |= 0x00000000; |
133 | pinfo->brg = 1; | 146 | pinfo->brg = 1; |
147 | |||
148 | cpm2_unmap(cpmux); | ||
149 | cpm2_unmap(io); | ||
134 | } | 150 | } |
135 | 151 | ||
136 | void scc2_lineif(struct uart_cpm_port *pinfo) | 152 | void scc2_lineif(struct uart_cpm_port *pinfo) |
@@ -143,43 +159,57 @@ void scc2_lineif(struct uart_cpm_port *pinfo) | |||
143 | * be supported in a sane fashion. | 159 | * be supported in a sane fashion. |
144 | */ | 160 | */ |
145 | #ifndef CONFIG_STX_GP3 | 161 | #ifndef CONFIG_STX_GP3 |
146 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 162 | volatile iop_cpm2_t *io = cpm2_map(im_ioport); |
163 | volatile cpmux_t *cpmux = cpm2_map(im_cpmux); | ||
164 | |||
147 | io->iop_pparb |= 0x008b0000; | 165 | io->iop_pparb |= 0x008b0000; |
148 | io->iop_pdirb |= 0x00880000; | 166 | io->iop_pdirb |= 0x00880000; |
149 | io->iop_psorb |= 0x00880000; | 167 | io->iop_psorb |= 0x00880000; |
150 | io->iop_pdirb &= ~0x00030000; | 168 | io->iop_pdirb &= ~0x00030000; |
151 | io->iop_psorb &= ~0x00030000; | 169 | io->iop_psorb &= ~0x00030000; |
152 | #endif | 170 | #endif |
153 | cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff; | 171 | cpmux->cmx_scr &= 0xff00ffff; |
154 | cpm2_immr->im_cpmux.cmx_scr |= 0x00090000; | 172 | cpmux->cmx_scr |= 0x00090000; |
155 | pinfo->brg = 2; | 173 | pinfo->brg = 2; |
174 | |||
175 | cpm2_unmap(cpmux); | ||
176 | cpm2_unmap(io); | ||
156 | } | 177 | } |
157 | 178 | ||
158 | void scc3_lineif(struct uart_cpm_port *pinfo) | 179 | void scc3_lineif(struct uart_cpm_port *pinfo) |
159 | { | 180 | { |
160 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 181 | volatile iop_cpm2_t *io = cpm2_map(im_ioport); |
182 | volatile cpmux_t *cpmux = cpm2_map(im_cpmux); | ||
183 | |||
161 | io->iop_pparb |= 0x008b0000; | 184 | io->iop_pparb |= 0x008b0000; |
162 | io->iop_pdirb |= 0x00880000; | 185 | io->iop_pdirb |= 0x00880000; |
163 | io->iop_psorb |= 0x00880000; | 186 | io->iop_psorb |= 0x00880000; |
164 | io->iop_pdirb &= ~0x00030000; | 187 | io->iop_pdirb &= ~0x00030000; |
165 | io->iop_psorb &= ~0x00030000; | 188 | io->iop_psorb &= ~0x00030000; |
166 | cpm2_immr->im_cpmux.cmx_scr &= 0xffff00ff; | 189 | cpmux->cmx_scr &= 0xffff00ff; |
167 | cpm2_immr->im_cpmux.cmx_scr |= 0x00001200; | 190 | cpmux->cmx_scr |= 0x00001200; |
168 | pinfo->brg = 3; | 191 | pinfo->brg = 3; |
192 | |||
193 | cpm2_unmap(cpmux); | ||
194 | cpm2_unmap(io); | ||
169 | } | 195 | } |
170 | 196 | ||
171 | void scc4_lineif(struct uart_cpm_port *pinfo) | 197 | void scc4_lineif(struct uart_cpm_port *pinfo) |
172 | { | 198 | { |
173 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 199 | volatile iop_cpm2_t *io = cpm2_map(im_ioport); |
200 | volatile cpmux_t *cpmux = cpm2_map(im_cpmux); | ||
174 | 201 | ||
175 | io->iop_ppard |= 0x00000600; | 202 | io->iop_ppard |= 0x00000600; |
176 | io->iop_psord &= ~0x00000600; /* Tx/Rx */ | 203 | io->iop_psord &= ~0x00000600; /* Tx/Rx */ |
177 | io->iop_pdird &= ~0x00000200; /* Rx */ | 204 | io->iop_pdird &= ~0x00000200; /* Rx */ |
178 | io->iop_pdird |= 0x00000400; /* Tx */ | 205 | io->iop_pdird |= 0x00000400; /* Tx */ |
179 | 206 | ||
180 | cpm2_immr->im_cpmux.cmx_scr &= 0xffffff00; | 207 | cpmux->cmx_scr &= 0xffffff00; |
181 | cpm2_immr->im_cpmux.cmx_scr |= 0x0000001b; | 208 | cpmux->cmx_scr |= 0x0000001b; |
182 | pinfo->brg = 4; | 209 | pinfo->brg = 4; |
210 | |||
211 | cpm2_unmap(cpmux); | ||
212 | cpm2_unmap(io); | ||
183 | } | 213 | } |
184 | 214 | ||
185 | /* | 215 | /* |
@@ -254,88 +284,103 @@ void cpm_uart_freebuf(struct uart_cpm_port *pinfo) | |||
254 | /* Setup any dynamic params in the uart desc */ | 284 | /* Setup any dynamic params in the uart desc */ |
255 | int cpm_uart_init_portdesc(void) | 285 | int cpm_uart_init_portdesc(void) |
256 | { | 286 | { |
287 | #if defined(CONFIG_SERIAL_CPM_SMC1) || defined(CONFIG_SERIAL_CPM_SMC2) | ||
288 | u32 addr; | ||
289 | #endif | ||
257 | pr_debug("CPM uart[-]:init portdesc\n"); | 290 | pr_debug("CPM uart[-]:init portdesc\n"); |
258 | 291 | ||
259 | cpm_uart_nr = 0; | 292 | cpm_uart_nr = 0; |
260 | #ifdef CONFIG_SERIAL_CPM_SMC1 | 293 | #ifdef CONFIG_SERIAL_CPM_SMC1 |
261 | cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0]; | 294 | cpm_uart_ports[UART_SMC1].smcp = (smc_t *) cpm2_map(im_smc[0]); |
262 | cpm_uart_ports[UART_SMC1].smcup = | ||
263 | (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1]; | ||
264 | *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC1_BASE]) = PROFF_SMC1; | ||
265 | cpm_uart_ports[UART_SMC1].port.mapbase = | 295 | cpm_uart_ports[UART_SMC1].port.mapbase = |
266 | (unsigned long)&cpm2_immr->im_smc[0]; | 296 | (unsigned long)cpm_uart_ports[UART_SMC1].smcp; |
297 | |||
298 | cpm_uart_ports[UART_SMC1].smcup = | ||
299 | (smc_uart_t *) cpm2_map_size(im_dprambase[PROFF_SMC1], PROFF_SMC_SIZE); | ||
300 | addr = (u16 *)cpm2_map_size(im_dprambase[PROFF_SMC1_BASE], 2); | ||
301 | *addr = PROFF_SMC1; | ||
302 | cpm2_unmap(addr); | ||
303 | |||
267 | cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); | 304 | cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); |
268 | cpm_uart_ports[UART_SMC1].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); | 305 | cpm_uart_ports[UART_SMC1].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); |
269 | cpm_uart_ports[UART_SMC1].port.uartclk = (((bd_t *) __res)->bi_intfreq); | 306 | cpm_uart_ports[UART_SMC1].port.uartclk = uart_clock(); |
270 | cpm_uart_port_map[cpm_uart_nr++] = UART_SMC1; | 307 | cpm_uart_port_map[cpm_uart_nr++] = UART_SMC1; |
271 | #endif | 308 | #endif |
272 | 309 | ||
273 | #ifdef CONFIG_SERIAL_CPM_SMC2 | 310 | #ifdef CONFIG_SERIAL_CPM_SMC2 |
274 | cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1]; | 311 | cpm_uart_ports[UART_SMC2].smcp = (smc_t *) cpm2_map(im_smc[1]); |
275 | cpm_uart_ports[UART_SMC2].smcup = | ||
276 | (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2]; | ||
277 | *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC2_BASE]) = PROFF_SMC2; | ||
278 | cpm_uart_ports[UART_SMC2].port.mapbase = | 312 | cpm_uart_ports[UART_SMC2].port.mapbase = |
279 | (unsigned long)&cpm2_immr->im_smc[1]; | 313 | (unsigned long)cpm_uart_ports[UART_SMC2].smcp; |
314 | |||
315 | cpm_uart_ports[UART_SMC2].smcup = | ||
316 | (smc_uart_t *) cpm2_map_size(im_dprambase[PROFF_SMC2], PROFF_SMC_SIZE); | ||
317 | addr = (u16 *)cpm2_map_size(im_dprambase[PROFF_SMC2_BASE], 2); | ||
318 | *addr = PROFF_SMC2; | ||
319 | cpm2_unmap(addr); | ||
320 | |||
280 | cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); | 321 | cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); |
281 | cpm_uart_ports[UART_SMC2].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); | 322 | cpm_uart_ports[UART_SMC2].smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); |
282 | cpm_uart_ports[UART_SMC2].port.uartclk = (((bd_t *) __res)->bi_intfreq); | 323 | cpm_uart_ports[UART_SMC2].port.uartclk = uart_clock(); |
283 | cpm_uart_port_map[cpm_uart_nr++] = UART_SMC2; | 324 | cpm_uart_port_map[cpm_uart_nr++] = UART_SMC2; |
284 | #endif | 325 | #endif |
285 | 326 | ||
286 | #ifdef CONFIG_SERIAL_CPM_SCC1 | 327 | #ifdef CONFIG_SERIAL_CPM_SCC1 |
287 | cpm_uart_ports[UART_SCC1].sccp = (scc_t *) & cpm2_immr->im_scc[0]; | 328 | cpm_uart_ports[UART_SCC1].sccp = (scc_t *) cpm2_map(im_scc[0]); |
288 | cpm_uart_ports[UART_SCC1].sccup = | ||
289 | (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC1]; | ||
290 | cpm_uart_ports[UART_SCC1].port.mapbase = | 329 | cpm_uart_ports[UART_SCC1].port.mapbase = |
291 | (unsigned long)&cpm2_immr->im_scc[0]; | 330 | (unsigned long)cpm_uart_ports[UART_SCC1].sccp; |
331 | cpm_uart_ports[UART_SCC1].sccup = | ||
332 | (scc_uart_t *) cpm2_map_size(im_dprambase[PROFF_SCC1], PROFF_SCC_SIZE); | ||
333 | |||
292 | cpm_uart_ports[UART_SCC1].sccp->scc_sccm &= | 334 | cpm_uart_ports[UART_SCC1].sccp->scc_sccm &= |
293 | ~(UART_SCCM_TX | UART_SCCM_RX); | 335 | ~(UART_SCCM_TX | UART_SCCM_RX); |
294 | cpm_uart_ports[UART_SCC1].sccp->scc_gsmrl &= | 336 | cpm_uart_ports[UART_SCC1].sccp->scc_gsmrl &= |
295 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); | 337 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
296 | cpm_uart_ports[UART_SCC1].port.uartclk = (((bd_t *) __res)->bi_intfreq); | 338 | cpm_uart_ports[UART_SCC1].port.uartclk = uart_clock(); |
297 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC1; | 339 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC1; |
298 | #endif | 340 | #endif |
299 | 341 | ||
300 | #ifdef CONFIG_SERIAL_CPM_SCC2 | 342 | #ifdef CONFIG_SERIAL_CPM_SCC2 |
301 | cpm_uart_ports[UART_SCC2].sccp = (scc_t *) & cpm2_immr->im_scc[1]; | 343 | cpm_uart_ports[UART_SCC2].sccp = (scc_t *) cpm2_map(im_scc[1]); |
302 | cpm_uart_ports[UART_SCC2].sccup = | ||
303 | (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC2]; | ||
304 | cpm_uart_ports[UART_SCC2].port.mapbase = | 344 | cpm_uart_ports[UART_SCC2].port.mapbase = |
305 | (unsigned long)&cpm2_immr->im_scc[1]; | 345 | (unsigned long)cpm_uart_ports[UART_SCC2].sccp; |
346 | cpm_uart_ports[UART_SCC2].sccup = | ||
347 | (scc_uart_t *) cpm2_map_size(im_dprambase[PROFF_SCC2], PROFF_SCC_SIZE); | ||
348 | |||
306 | cpm_uart_ports[UART_SCC2].sccp->scc_sccm &= | 349 | cpm_uart_ports[UART_SCC2].sccp->scc_sccm &= |
307 | ~(UART_SCCM_TX | UART_SCCM_RX); | 350 | ~(UART_SCCM_TX | UART_SCCM_RX); |
308 | cpm_uart_ports[UART_SCC2].sccp->scc_gsmrl &= | 351 | cpm_uart_ports[UART_SCC2].sccp->scc_gsmrl &= |
309 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); | 352 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
310 | cpm_uart_ports[UART_SCC2].port.uartclk = (((bd_t *) __res)->bi_intfreq); | 353 | cpm_uart_ports[UART_SCC2].port.uartclk = uart_clock(); |
311 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC2; | 354 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC2; |
312 | #endif | 355 | #endif |
313 | 356 | ||
314 | #ifdef CONFIG_SERIAL_CPM_SCC3 | 357 | #ifdef CONFIG_SERIAL_CPM_SCC3 |
315 | cpm_uart_ports[UART_SCC3].sccp = (scc_t *) & cpm2_immr->im_scc[2]; | 358 | cpm_uart_ports[UART_SCC3].sccp = (scc_t *) cpm2_map(im_scc[2]); |
316 | cpm_uart_ports[UART_SCC3].sccup = | ||
317 | (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC3]; | ||
318 | cpm_uart_ports[UART_SCC3].port.mapbase = | 359 | cpm_uart_ports[UART_SCC3].port.mapbase = |
319 | (unsigned long)&cpm2_immr->im_scc[2]; | 360 | (unsigned long)cpm_uart_ports[UART_SCC3].sccp; |
361 | cpm_uart_ports[UART_SCC3].sccup = | ||
362 | (scc_uart_t *) cpm2_map_size(im_dprambase[PROFF_SCC3], PROFF_SCC_SIZE); | ||
363 | |||
320 | cpm_uart_ports[UART_SCC3].sccp->scc_sccm &= | 364 | cpm_uart_ports[UART_SCC3].sccp->scc_sccm &= |
321 | ~(UART_SCCM_TX | UART_SCCM_RX); | 365 | ~(UART_SCCM_TX | UART_SCCM_RX); |
322 | cpm_uart_ports[UART_SCC3].sccp->scc_gsmrl &= | 366 | cpm_uart_ports[UART_SCC3].sccp->scc_gsmrl &= |
323 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); | 367 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
324 | cpm_uart_ports[UART_SCC3].port.uartclk = (((bd_t *) __res)->bi_intfreq); | 368 | cpm_uart_ports[UART_SCC3].port.uartclk = uart_clock(); |
325 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC3; | 369 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC3; |
326 | #endif | 370 | #endif |
327 | 371 | ||
328 | #ifdef CONFIG_SERIAL_CPM_SCC4 | 372 | #ifdef CONFIG_SERIAL_CPM_SCC4 |
329 | cpm_uart_ports[UART_SCC4].sccp = (scc_t *) & cpm2_immr->im_scc[3]; | 373 | cpm_uart_ports[UART_SCC4].sccp = (scc_t *) cpm2_map(im_scc[3]); |
330 | cpm_uart_ports[UART_SCC4].sccup = | ||
331 | (scc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SCC4]; | ||
332 | cpm_uart_ports[UART_SCC4].port.mapbase = | 374 | cpm_uart_ports[UART_SCC4].port.mapbase = |
333 | (unsigned long)&cpm2_immr->im_scc[3]; | 375 | (unsigned long)cpm_uart_ports[UART_SCC4].sccp; |
376 | cpm_uart_ports[UART_SCC4].sccup = | ||
377 | (scc_uart_t *) cpm2_map_size(im_dprambase[PROFF_SCC4], PROFF_SCC_SIZE); | ||
378 | |||
334 | cpm_uart_ports[UART_SCC4].sccp->scc_sccm &= | 379 | cpm_uart_ports[UART_SCC4].sccp->scc_sccm &= |
335 | ~(UART_SCCM_TX | UART_SCCM_RX); | 380 | ~(UART_SCCM_TX | UART_SCCM_RX); |
336 | cpm_uart_ports[UART_SCC4].sccp->scc_gsmrl &= | 381 | cpm_uart_ports[UART_SCC4].sccp->scc_gsmrl &= |
337 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); | 382 | ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
338 | cpm_uart_ports[UART_SCC4].port.uartclk = (((bd_t *) __res)->bi_intfreq); | 383 | cpm_uart_ports[UART_SCC4].port.uartclk = uart_clock(); |
339 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC4; | 384 | cpm_uart_port_map[cpm_uart_nr++] = UART_SCC4; |
340 | #endif | 385 | #endif |
341 | 386 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.h b/drivers/serial/cpm_uart/cpm_uart_cpm2.h index 4793fecf8ece..a663300d3476 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.h +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.h | |||
@@ -40,6 +40,6 @@ static inline void cpm_set_smc_fcr(volatile smc_uart_t * up) | |||
40 | up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB; | 40 | up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB; |
41 | } | 41 | } |
42 | 42 | ||
43 | #define DPRAM_BASE ((unsigned char *)&cpm2_immr->im_dprambase[0]) | 43 | #define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0)) |
44 | 44 | ||
45 | #endif | 45 | #endif |
diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h new file mode 100644 index 000000000000..3d0e819d37f1 --- /dev/null +++ b/include/asm-powerpc/fs_pd.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Platform information definitions. | ||
3 | * | ||
4 | * 2006 (c) MontaVista Software, Inc. | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef FS_PD_H | ||
13 | #define FS_PD_H | ||
14 | #include <asm/cpm2.h> | ||
15 | #include <sysdev/fsl_soc.h> | ||
16 | #include <asm/time.h> | ||
17 | |||
18 | static inline int uart_baudrate(void) | ||
19 | { | ||
20 | return get_baudrate(); | ||
21 | } | ||
22 | |||
23 | static inline int uart_clock(void) | ||
24 | { | ||
25 | return ppc_proc_freq; | ||
26 | } | ||
27 | |||
28 | #define cpm2_map(member) \ | ||
29 | ({ \ | ||
30 | u32 offset = offsetof(cpm2_map_t, member); \ | ||
31 | void *addr = ioremap (CPM_MAP_ADDR + offset, \ | ||
32 | sizeof( ((cpm2_map_t*)0)->member)); \ | ||
33 | addr; \ | ||
34 | }) | ||
35 | |||
36 | #define cpm2_map_size(member, size) \ | ||
37 | ({ \ | ||
38 | u32 offset = offsetof(cpm2_map_t, member); \ | ||
39 | void *addr = ioremap (CPM_MAP_ADDR + offset, size); \ | ||
40 | addr; \ | ||
41 | }) | ||
42 | |||
43 | #define cpm2_unmap(addr) iounmap(addr) | ||
44 | |||
45 | #endif | ||
diff --git a/include/asm-powerpc/mpc85xx.h b/include/asm-powerpc/mpc85xx.h new file mode 100644 index 000000000000..ccdb8a21138f --- /dev/null +++ b/include/asm-powerpc/mpc85xx.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * include/asm-powerpc/mpc85xx.h | ||
3 | * | ||
4 | * MPC85xx definitions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
7 | * | ||
8 | * Copyright 2004 Freescale Semiconductor, Inc | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | #ifndef __ASM_MPC85xx_H__ | ||
18 | #define __ASM_MPC85xx_H__ | ||
19 | |||
20 | #include <asm/mmu.h> | ||
21 | |||
22 | #ifdef CONFIG_85xx | ||
23 | |||
24 | #if defined(CONFIG_MPC8540_ADS) || defined(CONFIG_MPC8560_ADS) | ||
25 | #include <platforms/85xx/mpc85xx_ads.h> | ||
26 | #endif | ||
27 | #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) | ||
28 | #include <platforms/85xx/mpc8555_cds.h> | ||
29 | #endif | ||
30 | #ifdef CONFIG_MPC85xx_CDS | ||
31 | #include <platforms/85xx/mpc85xx_cds.h> | ||
32 | #endif | ||
33 | |||
34 | #define _IO_BASE isa_io_base | ||
35 | #define _ISA_MEM_BASE isa_mem_base | ||
36 | #ifdef CONFIG_PCI | ||
37 | #define PCI_DRAM_OFFSET pci_dram_offset | ||
38 | #else | ||
39 | #define PCI_DRAM_OFFSET 0 | ||
40 | #endif | ||
41 | |||
42 | /* Let modules/drivers get at CCSRBAR */ | ||
43 | extern phys_addr_t get_ccsrbar(void); | ||
44 | |||
45 | #ifdef MODULE | ||
46 | #define CCSRBAR get_ccsrbar() | ||
47 | #else | ||
48 | #define CCSRBAR BOARD_CCSRBAR | ||
49 | #endif | ||
50 | |||
51 | #endif /* CONFIG_85xx */ | ||
52 | #endif /* __ASM_MPC85xx_H__ */ | ||
53 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index 5785ac4737b5..b051d4c88c3b 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -39,6 +39,10 @@ extern void generic_calibrate_decr(void); | |||
39 | extern void wakeup_decrementer(void); | 39 | extern void wakeup_decrementer(void); |
40 | extern void snapshot_timebase(void); | 40 | extern void snapshot_timebase(void); |
41 | 41 | ||
42 | #ifdef CONFIG_RTC_CLASS | ||
43 | extern int __init rtc_class_hookup(void); | ||
44 | #endif | ||
45 | |||
42 | /* Some sane defaults: 125 MHz timebase, 1GHz processor */ | 46 | /* Some sane defaults: 125 MHz timebase, 1GHz processor */ |
43 | extern unsigned long ppc_proc_freq; | 47 | extern unsigned long ppc_proc_freq; |
44 | #define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) | 48 | #define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) |
@@ -234,4 +238,4 @@ extern void snapshot_timebases(void); | |||
234 | #endif | 238 | #endif |
235 | 239 | ||
236 | #endif /* __KERNEL__ */ | 240 | #endif /* __KERNEL__ */ |
237 | #endif /* __PPC64_TIME_H */ | 241 | #endif /* __POWERPC_TIME_H */ |
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index f6a7ff04ffe5..220cc2debe08 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -42,6 +42,8 @@ | |||
42 | #define CPM_CR_IDMA4_SBLOCK (0x17) | 42 | #define CPM_CR_IDMA4_SBLOCK (0x17) |
43 | #define CPM_CR_MCC1_SBLOCK (0x1c) | 43 | #define CPM_CR_MCC1_SBLOCK (0x1c) |
44 | 44 | ||
45 | #define CPM_CR_FCC_SBLOCK(x) (x + 0x10) | ||
46 | |||
45 | #define CPM_CR_SCC1_PAGE (0x00) | 47 | #define CPM_CR_SCC1_PAGE (0x00) |
46 | #define CPM_CR_SCC2_PAGE (0x01) | 48 | #define CPM_CR_SCC2_PAGE (0x01) |
47 | #define CPM_CR_SCC3_PAGE (0x02) | 49 | #define CPM_CR_SCC3_PAGE (0x02) |
@@ -62,6 +64,8 @@ | |||
62 | #define CPM_CR_MCC1_PAGE (0x07) | 64 | #define CPM_CR_MCC1_PAGE (0x07) |
63 | #define CPM_CR_MCC2_PAGE (0x08) | 65 | #define CPM_CR_MCC2_PAGE (0x08) |
64 | 66 | ||
67 | #define CPM_CR_FCC_PAGE(x) (x + 0x04) | ||
68 | |||
65 | /* Some opcodes (there are more...later) | 69 | /* Some opcodes (there are more...later) |
66 | */ | 70 | */ |
67 | #define CPM_CR_INIT_TRX ((ushort)0x0000) | 71 | #define CPM_CR_INIT_TRX ((ushort)0x0000) |
@@ -173,6 +177,10 @@ typedef struct cpm_buf_desc { | |||
173 | #define PROFF_I2C_BASE ((uint)0x8afc) | 177 | #define PROFF_I2C_BASE ((uint)0x8afc) |
174 | #define PROFF_IDMA4_BASE ((uint)0x8afe) | 178 | #define PROFF_IDMA4_BASE ((uint)0x8afe) |
175 | 179 | ||
180 | #define PROFF_SCC_SIZE ((uint)0x100) | ||
181 | #define PROFF_FCC_SIZE ((uint)0x100) | ||
182 | #define PROFF_SMC_SIZE ((uint)64) | ||
183 | |||
176 | /* The SMCs are relocated to any of the first eight DPRAM pages. | 184 | /* The SMCs are relocated to any of the first eight DPRAM pages. |
177 | * We will fix these at the first locations of DPRAM, until we | 185 | * We will fix these at the first locations of DPRAM, until we |
178 | * get some microcode patches :-). | 186 | * get some microcode patches :-). |
@@ -1186,7 +1194,60 @@ typedef struct im_idma { | |||
1186 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | 1194 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) |
1187 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | 1195 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) |
1188 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | 1196 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) |
1189 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(2) | 1197 | #define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2) |
1198 | |||
1199 | /* Clocks and GRG's */ | ||
1200 | |||
1201 | enum cpm_clk_dir { | ||
1202 | CPM_CLK_RX, | ||
1203 | CPM_CLK_TX, | ||
1204 | CPM_CLK_RTX | ||
1205 | }; | ||
1206 | |||
1207 | enum cpm_clk_target { | ||
1208 | CPM_CLK_SCC1, | ||
1209 | CPM_CLK_SCC2, | ||
1210 | CPM_CLK_SCC3, | ||
1211 | CPM_CLK_SCC4, | ||
1212 | CPM_CLK_FCC1, | ||
1213 | CPM_CLK_FCC2, | ||
1214 | CPM_CLK_FCC3 | ||
1215 | }; | ||
1216 | |||
1217 | enum cpm_clk { | ||
1218 | CPM_CLK_NONE = 0, | ||
1219 | CPM_BRG1, /* Baud Rate Generator 1 */ | ||
1220 | CPM_BRG2, /* Baud Rate Generator 2 */ | ||
1221 | CPM_BRG3, /* Baud Rate Generator 3 */ | ||
1222 | CPM_BRG4, /* Baud Rate Generator 4 */ | ||
1223 | CPM_BRG5, /* Baud Rate Generator 5 */ | ||
1224 | CPM_BRG6, /* Baud Rate Generator 6 */ | ||
1225 | CPM_BRG7, /* Baud Rate Generator 7 */ | ||
1226 | CPM_BRG8, /* Baud Rate Generator 8 */ | ||
1227 | CPM_CLK1, /* Clock 1 */ | ||
1228 | CPM_CLK2, /* Clock 2 */ | ||
1229 | CPM_CLK3, /* Clock 3 */ | ||
1230 | CPM_CLK4, /* Clock 4 */ | ||
1231 | CPM_CLK5, /* Clock 5 */ | ||
1232 | CPM_CLK6, /* Clock 6 */ | ||
1233 | CPM_CLK7, /* Clock 7 */ | ||
1234 | CPM_CLK8, /* Clock 8 */ | ||
1235 | CPM_CLK9, /* Clock 9 */ | ||
1236 | CPM_CLK10, /* Clock 10 */ | ||
1237 | CPM_CLK11, /* Clock 11 */ | ||
1238 | CPM_CLK12, /* Clock 12 */ | ||
1239 | CPM_CLK13, /* Clock 13 */ | ||
1240 | CPM_CLK14, /* Clock 14 */ | ||
1241 | CPM_CLK15, /* Clock 15 */ | ||
1242 | CPM_CLK16, /* Clock 16 */ | ||
1243 | CPM_CLK17, /* Clock 17 */ | ||
1244 | CPM_CLK18, /* Clock 18 */ | ||
1245 | CPM_CLK19, /* Clock 19 */ | ||
1246 | CPM_CLK20, /* Clock 20 */ | ||
1247 | CPM_CLK_DUMMY | ||
1248 | }; | ||
1249 | |||
1250 | extern int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode); | ||
1190 | 1251 | ||
1191 | #endif /* __CPM2__ */ | 1252 | #endif /* __CPM2__ */ |
1192 | #endif /* __KERNEL__ */ | 1253 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/fs_pd.h b/include/asm-ppc/fs_pd.h new file mode 100644 index 000000000000..8691327653af --- /dev/null +++ b/include/asm-ppc/fs_pd.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Platform information definitions. | ||
3 | * | ||
4 | * 2006 (c) MontaVista Software, Inc. | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef FS_PD_H | ||
13 | #define FS_PD_H | ||
14 | |||
15 | static inline int uart_baudrate(void) | ||
16 | { | ||
17 | int baud; | ||
18 | bd_t *bd = (bd_t *) __res; | ||
19 | |||
20 | if (bd->bi_baudrate) | ||
21 | baud = bd->bi_baudrate; | ||
22 | else | ||
23 | baud = -1; | ||
24 | return baud; | ||
25 | } | ||
26 | |||
27 | static inline int uart_clock(void) | ||
28 | { | ||
29 | return (((bd_t *) __res)->bi_intfreq); | ||
30 | } | ||
31 | |||
32 | #define cpm2_map(member) (&cpm2_immr->member) | ||
33 | #define cpm2_map_size(member, size) (&cpm2_immr->member) | ||
34 | #define cpm2_unmap(addr) do {} while(0) | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-ppc/rheap.h b/include/asm-ppc/rheap.h index e6ca1f67cedc..65b93225a778 100644 --- a/include/asm-ppc/rheap.h +++ b/include/asm-ppc/rheap.h | |||
@@ -62,6 +62,10 @@ extern int rh_attach_region(rh_info_t * info, void *start, int size); | |||
62 | /* Detach a free region */ | 62 | /* Detach a free region */ |
63 | extern void *rh_detach_region(rh_info_t * info, void *start, int size); | 63 | extern void *rh_detach_region(rh_info_t * info, void *start, int size); |
64 | 64 | ||
65 | /* Allocate the given size from the remote heap (with alignment) */ | ||
66 | extern void *rh_alloc_align(rh_info_t * info, int size, int alignment, | ||
67 | const char *owner); | ||
68 | |||
65 | /* Allocate the given size from the remote heap */ | 69 | /* Allocate the given size from the remote heap */ |
66 | extern void *rh_alloc(rh_info_t * info, int size, const char *owner); | 70 | extern void *rh_alloc(rh_info_t * info, int size, const char *owner); |
67 | 71 | ||
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index 74ed35a00a94..543cd3cd9e77 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h | |||
@@ -55,6 +55,30 @@ static inline int fs_get_scc_index(enum fs_id id) | |||
55 | return -1; | 55 | return -1; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int fs_fec_index2id(int index) | ||
59 | { | ||
60 | int id = fsid_fec1 + index - 1; | ||
61 | if (id >= fsid_fec1 && id <= fsid_fec2) | ||
62 | return id; | ||
63 | return FS_MAX_INDEX; | ||
64 | } | ||
65 | |||
66 | static inline int fs_fcc_index2id(int index) | ||
67 | { | ||
68 | int id = fsid_fcc1 + index - 1; | ||
69 | if (id >= fsid_fcc1 && id <= fsid_fcc3) | ||
70 | return id; | ||
71 | return FS_MAX_INDEX; | ||
72 | } | ||
73 | |||
74 | static inline int fs_scc_index2id(int index) | ||
75 | { | ||
76 | int id = fsid_scc1 + index - 1; | ||
77 | if (id >= fsid_scc1 && id <= fsid_scc4) | ||
78 | return id; | ||
79 | return FS_MAX_INDEX; | ||
80 | } | ||
81 | |||
58 | enum fs_mii_method { | 82 | enum fs_mii_method { |
59 | fsmii_fixed, | 83 | fsmii_fixed, |
60 | fsmii_fec, | 84 | fsmii_fec, |
@@ -87,18 +111,21 @@ struct fs_mii_bb_platform_info { | |||
87 | }; | 111 | }; |
88 | 112 | ||
89 | struct fs_platform_info { | 113 | struct fs_platform_info { |
90 | 114 | ||
91 | void(*init_ioports)(void); | 115 | void(*init_ioports)(struct fs_platform_info *); |
92 | /* device specific information */ | 116 | /* device specific information */ |
93 | int fs_no; /* controller index */ | 117 | int fs_no; /* controller index */ |
118 | char fs_type[4]; /* controller type */ | ||
94 | 119 | ||
95 | u32 cp_page; /* CPM page */ | 120 | u32 cp_page; /* CPM page */ |
96 | u32 cp_block; /* CPM sblock */ | 121 | u32 cp_block; /* CPM sblock */ |
97 | 122 | ||
98 | u32 clk_trx; /* some stuff for pins & mux configuration*/ | 123 | u32 clk_trx; /* some stuff for pins & mux configuration*/ |
124 | u32 clk_rx; | ||
125 | u32 clk_tx; | ||
99 | u32 clk_route; | 126 | u32 clk_route; |
100 | u32 clk_mask; | 127 | u32 clk_mask; |
101 | 128 | ||
102 | u32 mem_offset; | 129 | u32 mem_offset; |
103 | u32 dpram_offset; | 130 | u32 dpram_offset; |
104 | u32 fcc_regs_c; | 131 | u32 fcc_regs_c; |
@@ -124,4 +151,16 @@ struct fs_mii_fec_platform_info { | |||
124 | u32 irq[32]; | 151 | u32 irq[32]; |
125 | u32 mii_speed; | 152 | u32 mii_speed; |
126 | }; | 153 | }; |
154 | |||
155 | static inline int fs_get_id(struct fs_platform_info *fpi) | ||
156 | { | ||
157 | if(strstr(fpi->fs_type, "SCC")) | ||
158 | return fs_scc_index2id(fpi->fs_no); | ||
159 | if(strstr(fpi->fs_type, "FCC")) | ||
160 | return fs_fcc_index2id(fpi->fs_no); | ||
161 | if(strstr(fpi->fs_type, "FEC")) | ||
162 | return fs_fec_index2id(fpi->fs_no); | ||
163 | return fpi->fs_no; | ||
164 | } | ||
165 | |||
127 | #endif | 166 | #endif |
diff --git a/include/linux/fs_uart_pd.h b/include/linux/fs_uart_pd.h index f5975126b712..809bb9ffc788 100644 --- a/include/linux/fs_uart_pd.h +++ b/include/linux/fs_uart_pd.h | |||
@@ -46,15 +46,27 @@ static inline int fs_uart_id_fsid2smc(int id) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | struct fs_uart_platform_info { | 48 | struct fs_uart_platform_info { |
49 | void(*init_ioports)(void); | 49 | void(*init_ioports)(struct fs_uart_platform_info *); |
50 | /* device specific information */ | 50 | /* device specific information */ |
51 | int fs_no; /* controller index */ | 51 | int fs_no; /* controller index */ |
52 | char fs_type[4]; /* controller type */ | ||
52 | u32 uart_clk; | 53 | u32 uart_clk; |
53 | u8 tx_num_fifo; | 54 | u8 tx_num_fifo; |
54 | u8 tx_buf_size; | 55 | u8 tx_buf_size; |
55 | u8 rx_num_fifo; | 56 | u8 rx_num_fifo; |
56 | u8 rx_buf_size; | 57 | u8 rx_buf_size; |
57 | u8 brg; | 58 | u8 brg; |
59 | u8 clk_rx; | ||
60 | u8 clk_tx; | ||
58 | }; | 61 | }; |
59 | 62 | ||
63 | static inline int fs_uart_get_id(struct fs_uart_platform_info *fpi) | ||
64 | { | ||
65 | if(strstr(fpi->fs_type, "SMC")) | ||
66 | return fs_uart_id_smc2fsid(fpi->fs_no); | ||
67 | if(strstr(fpi->fs_type, "SCC")) | ||
68 | return fs_uart_id_scc2fsid(fpi->fs_no); | ||
69 | return fpi->fs_no; | ||
70 | } | ||
71 | |||
60 | #endif | 72 | #endif |