diff options
233 files changed, 6757 insertions, 864 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index dafd001bf833..4f82c856667f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -930,6 +930,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
930 | 930 | ||
931 | l2cr= [PPC] | 931 | l2cr= [PPC] |
932 | 932 | ||
933 | l3cr= [PPC] | ||
934 | |||
933 | lapic [X86-32,APIC] Enable the local APIC even if BIOS | 935 | lapic [X86-32,APIC] Enable the local APIC even if BIOS |
934 | disabled it. | 936 | disabled it. |
935 | 937 | ||
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 7b4e8a70882c..1df9d4cfc0e6 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -1269,10 +1269,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1269 | 1269 | ||
1270 | Recommended properties: | 1270 | Recommended properties: |
1271 | 1271 | ||
1272 | - linux,network-index : This is the intended "index" of this | ||
1273 | network device. This is used by the bootwrapper to interpret | ||
1274 | MAC addresses passed by the firmware when no information other | ||
1275 | than indices is available to associate an address with a device. | ||
1276 | - phy-connection-type : a string naming the controller/PHY interface type, | 1272 | - phy-connection-type : a string naming the controller/PHY interface type, |
1277 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", | 1273 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", |
1278 | "tbi", or "rtbi". This property is only really needed if the connection | 1274 | "tbi", or "rtbi". This property is only really needed if the connection |
@@ -1667,10 +1663,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1667 | - phy-handle : The phandle for the PHY connected to this controller. | 1663 | - phy-handle : The phandle for the PHY connected to this controller. |
1668 | 1664 | ||
1669 | Recommended properties: | 1665 | Recommended properties: |
1670 | - linux,network-index : This is the intended "index" of this | ||
1671 | network device. This is used by the bootwrapper to interpret | ||
1672 | MAC addresses passed by the firmware when no information other | ||
1673 | than indices is available to associate an address with a device. | ||
1674 | - phy-connection-type : a string naming the controller/PHY interface type, | 1666 | - phy-connection-type : a string naming the controller/PHY interface type, |
1675 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal | 1667 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal |
1676 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), | 1668 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), |
@@ -1995,7 +1987,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1995 | interrupts = <20 8>; | 1987 | interrupts = <20 8>; |
1996 | interrupt-parent = <&PIC>; | 1988 | interrupt-parent = <&PIC>; |
1997 | phy-handle = <&PHY0>; | 1989 | phy-handle = <&PHY0>; |
1998 | linux,network-index = <0>; | ||
1999 | fsl,cpm-command = <12000300>; | 1990 | fsl,cpm-command = <12000300>; |
2000 | }; | 1991 | }; |
2001 | 1992 | ||
@@ -2217,12 +2208,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2217 | EMAC, that is the content of the current (bogus) "phy-port" | 2208 | EMAC, that is the content of the current (bogus) "phy-port" |
2218 | property. | 2209 | property. |
2219 | 2210 | ||
2220 | Recommended properties: | ||
2221 | - linux,network-index : This is the intended "index" of this | ||
2222 | network device. This is used by the bootwrapper to interpret | ||
2223 | MAC addresses passed by the firmware when no information other | ||
2224 | than indices is available to associate an address with a device. | ||
2225 | |||
2226 | Optional properties: | 2211 | Optional properties: |
2227 | - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, | 2212 | - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, |
2228 | a search is performed. | 2213 | a search is performed. |
@@ -2246,7 +2231,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2246 | Example: | 2231 | Example: |
2247 | 2232 | ||
2248 | EMAC0: ethernet@40000800 { | 2233 | EMAC0: ethernet@40000800 { |
2249 | linux,network-index = <0>; | ||
2250 | device_type = "network"; | 2234 | device_type = "network"; |
2251 | compatible = "ibm,emac-440gp", "ibm,emac"; | 2235 | compatible = "ibm,emac-440gp", "ibm,emac"; |
2252 | interrupt-parent = <&UIC1>; | 2236 | interrupt-parent = <&UIC1>; |
diff --git a/Documentation/powerpc/phyp-assisted-dump.txt b/Documentation/powerpc/phyp-assisted-dump.txt new file mode 100644 index 000000000000..c4682b982a2e --- /dev/null +++ b/Documentation/powerpc/phyp-assisted-dump.txt | |||
@@ -0,0 +1,127 @@ | |||
1 | |||
2 | Hypervisor-Assisted Dump | ||
3 | ------------------------ | ||
4 | November 2007 | ||
5 | |||
6 | The goal of hypervisor-assisted dump is to enable the dump of | ||
7 | a crashed system, and to do so from a fully-reset system, and | ||
8 | to minimize the total elapsed time until the system is back | ||
9 | in production use. | ||
10 | |||
11 | As compared to kdump or other strategies, hypervisor-assisted | ||
12 | dump offers several strong, practical advantages: | ||
13 | |||
14 | -- Unlike kdump, the system has been reset, and loaded | ||
15 | with a fresh copy of the kernel. In particular, | ||
16 | PCI and I/O devices have been reinitialized and are | ||
17 | in a clean, consistent state. | ||
18 | -- As the dump is performed, the dumped memory becomes | ||
19 | immediately available to the system for normal use. | ||
20 | -- After the dump is completed, no further reboots are | ||
21 | required; the system will be fully usable, and running | ||
22 | in it's normal, production mode on it normal kernel. | ||
23 | |||
24 | The above can only be accomplished by coordination with, | ||
25 | and assistance from the hypervisor. The procedure is | ||
26 | as follows: | ||
27 | |||
28 | -- When a system crashes, the hypervisor will save | ||
29 | the low 256MB of RAM to a previously registered | ||
30 | save region. It will also save system state, system | ||
31 | registers, and hardware PTE's. | ||
32 | |||
33 | -- After the low 256MB area has been saved, the | ||
34 | hypervisor will reset PCI and other hardware state. | ||
35 | It will *not* clear RAM. It will then launch the | ||
36 | bootloader, as normal. | ||
37 | |||
38 | -- The freshly booted kernel will notice that there | ||
39 | is a new node (ibm,dump-kernel) in the device tree, | ||
40 | indicating that there is crash data available from | ||
41 | a previous boot. It will boot into only 256MB of RAM, | ||
42 | reserving the rest of system memory. | ||
43 | |||
44 | -- Userspace tools will parse /sys/kernel/release_region | ||
45 | and read /proc/vmcore to obtain the contents of memory, | ||
46 | which holds the previous crashed kernel. The userspace | ||
47 | tools may copy this info to disk, or network, nas, san, | ||
48 | iscsi, etc. as desired. | ||
49 | |||
50 | For Example: the values in /sys/kernel/release-region | ||
51 | would look something like this (address-range pairs). | ||
52 | CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: / | ||
53 | DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A | ||
54 | |||
55 | -- As the userspace tools complete saving a portion of | ||
56 | dump, they echo an offset and size to | ||
57 | /sys/kernel/release_region to release the reserved | ||
58 | memory back to general use. | ||
59 | |||
60 | An example of this is: | ||
61 | "echo 0x40000000 0x10000000 > /sys/kernel/release_region" | ||
62 | which will release 256MB at the 1GB boundary. | ||
63 | |||
64 | Please note that the hypervisor-assisted dump feature | ||
65 | is only available on Power6-based systems with recent | ||
66 | firmware versions. | ||
67 | |||
68 | Implementation details: | ||
69 | ---------------------- | ||
70 | |||
71 | During boot, a check is made to see if firmware supports | ||
72 | this feature on this particular machine. If it does, then | ||
73 | we check to see if a active dump is waiting for us. If yes | ||
74 | then everything but 256 MB of RAM is reserved during early | ||
75 | boot. This area is released once we collect a dump from user | ||
76 | land scripts that are run. If there is dump data, then | ||
77 | the /sys/kernel/release_region file is created, and | ||
78 | the reserved memory is held. | ||
79 | |||
80 | If there is no waiting dump data, then only the highest | ||
81 | 256MB of the ram is reserved as a scratch area. This area | ||
82 | is *not* released: this region will be kept permanently | ||
83 | reserved, so that it can act as a receptacle for a copy | ||
84 | of the low 256MB in the case a crash does occur. See, | ||
85 | however, "open issues" below, as to whether | ||
86 | such a reserved region is really needed. | ||
87 | |||
88 | Currently the dump will be copied from /proc/vmcore to a | ||
89 | a new file upon user intervention. The starting address | ||
90 | to be read and the range for each data point in provided | ||
91 | in /sys/kernel/release_region. | ||
92 | |||
93 | The tools to examine the dump will be same as the ones | ||
94 | used for kdump. | ||
95 | |||
96 | General notes: | ||
97 | -------------- | ||
98 | Security: please note that there are potential security issues | ||
99 | with any sort of dump mechanism. In particular, plaintext | ||
100 | (unencrypted) data, and possibly passwords, may be present in | ||
101 | the dump data. Userspace tools must take adequate precautions to | ||
102 | preserve security. | ||
103 | |||
104 | Open issues/ToDo: | ||
105 | ------------ | ||
106 | o The various code paths that tell the hypervisor that a crash | ||
107 | occurred, vs. it simply being a normal reboot, should be | ||
108 | reviewed, and possibly clarified/fixed. | ||
109 | |||
110 | o Instead of using /sys/kernel, should there be a /sys/dump | ||
111 | instead? There is a dump_subsys being created by the s390 code, | ||
112 | perhaps the pseries code should use a similar layout as well. | ||
113 | |||
114 | o Is reserving a 256MB region really required? The goal of | ||
115 | reserving a 256MB scratch area is to make sure that no | ||
116 | important crash data is clobbered when the hypervisor | ||
117 | save low mem to the scratch area. But, if one could assure | ||
118 | that nothing important is located in some 256MB area, then | ||
119 | it would not need to be reserved. Something that can be | ||
120 | improved in subsequent versions. | ||
121 | |||
122 | o Still working the kdump team to integrate this with kdump, | ||
123 | some work remains but this would not affect the current | ||
124 | patches. | ||
125 | |||
126 | o Still need to write a shell script, to copy the dump away. | ||
127 | Currently I am parsing it manually. | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 1189d8d6170d..625342e1a733 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -91,6 +91,7 @@ config PPC | |||
91 | select HAVE_OPROFILE | 91 | select HAVE_OPROFILE |
92 | select HAVE_KPROBES | 92 | select HAVE_KPROBES |
93 | select HAVE_KRETPROBES | 93 | select HAVE_KRETPROBES |
94 | select HAVE_LMB | ||
94 | 95 | ||
95 | config EARLY_PRINTK | 96 | config EARLY_PRINTK |
96 | bool | 97 | bool |
@@ -210,14 +211,25 @@ source kernel/Kconfig.hz | |||
210 | source kernel/Kconfig.preempt | 211 | source kernel/Kconfig.preempt |
211 | source "fs/Kconfig.binfmt" | 212 | source "fs/Kconfig.binfmt" |
212 | 213 | ||
213 | # We optimistically allocate largepages from the VM, so make the limit | ||
214 | # large enough (16MB). This badly named config option is actually | ||
215 | # max order + 1 | ||
216 | config FORCE_MAX_ZONEORDER | 214 | config FORCE_MAX_ZONEORDER |
217 | int | 215 | int "Maximum zone order" |
218 | depends on PPC64 | ||
219 | default "9" if PPC_64K_PAGES | 216 | default "9" if PPC_64K_PAGES |
220 | default "13" | 217 | default "13" if PPC64 |
218 | default "11" | ||
219 | help | ||
220 | The kernel memory allocator divides physically contiguous memory | ||
221 | blocks into "zones", where each zone is a power of two number of | ||
222 | pages. This option selects the largest power of two that the kernel | ||
223 | keeps in the memory allocator. If you need to allocate very large | ||
224 | blocks of physically contiguous memory, then you may need to | ||
225 | increase this value. | ||
226 | |||
227 | This config option is actually maximum order plus one. For example, | ||
228 | a value of 11 means that the largest free memory block is 2^10 pages. | ||
229 | |||
230 | The page size is not necessarily 4KB. For example, on 64-bit | ||
231 | systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep | ||
232 | this in mind when choosing a value for this option. | ||
221 | 233 | ||
222 | config HUGETLB_PAGE_SIZE_VARIABLE | 234 | config HUGETLB_PAGE_SIZE_VARIABLE |
223 | bool | 235 | bool |
@@ -307,6 +319,16 @@ config CRASH_DUMP | |||
307 | 319 | ||
308 | Don't change this unless you know what you are doing. | 320 | Don't change this unless you know what you are doing. |
309 | 321 | ||
322 | config PHYP_DUMP | ||
323 | bool "Hypervisor-assisted dump (EXPERIMENTAL)" | ||
324 | depends on PPC_PSERIES && EXPERIMENTAL | ||
325 | help | ||
326 | Hypervisor-assisted dump is meant to be a kdump replacement | ||
327 | offering robustness and speed not possible without system | ||
328 | hypervisor assistence. | ||
329 | |||
330 | If unsure, say "N" | ||
331 | |||
310 | config PPCBUG_NVRAM | 332 | config PPCBUG_NVRAM |
311 | bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC | 333 | bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC |
312 | default y if PPC_PREP | 334 | default y if PPC_PREP |
@@ -490,6 +512,9 @@ config FSL_PCI | |||
490 | bool | 512 | bool |
491 | select PPC_INDIRECT_PCI | 513 | select PPC_INDIRECT_PCI |
492 | 514 | ||
515 | config 4xx_SOC | ||
516 | bool | ||
517 | |||
493 | # Yes MCA RS/6000s exist but Linux-PPC does not currently support any | 518 | # Yes MCA RS/6000s exist but Linux-PPC does not currently support any |
494 | config MCA | 519 | config MCA |
495 | bool | 520 | bool |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index ab5cfe8ef988..dd8082522da3 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -164,7 +164,7 @@ boot := arch/$(ARCH)/boot | |||
164 | $(BOOT_TARGETS): vmlinux | 164 | $(BOOT_TARGETS): vmlinux |
165 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) | 165 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
166 | 166 | ||
167 | bootwrapper_install: | 167 | bootwrapper_install %.dtb: |
168 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) | 168 | $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) |
169 | 169 | ||
170 | define archhelp | 170 | define archhelp |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 1aded8f759d0..7dcd9e953a98 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -40,6 +40,7 @@ $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405 | |||
40 | $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 | 40 | $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 |
41 | $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 | 41 | $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 |
42 | $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 | 42 | $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 |
43 | $(obj)/virtex405-head.o: BOOTCFLAGS += -mcpu=405 | ||
43 | 44 | ||
44 | 45 | ||
45 | zlib := inffast.c inflate.c inftrees.c | 46 | zlib := inffast.c inflate.c inftrees.c |
@@ -64,7 +65,8 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c | |||
64 | cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ | 65 | cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ |
65 | fixed-head.S ep88xc.c ep405.c \ | 66 | fixed-head.S ep88xc.c ep405.c \ |
66 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ | 67 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ |
67 | cuboot-warp.c cuboot-85xx-cpm2.c | 68 | cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ |
69 | virtex405-head.S | ||
68 | src-boot := $(src-wlib) $(src-plat) empty.c | 70 | src-boot := $(src-wlib) $(src-plat) empty.c |
69 | 71 | ||
70 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 72 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
@@ -216,6 +218,7 @@ image-$(CONFIG_RAINIER) += cuImage.rainier | |||
216 | image-$(CONFIG_TAISHAN) += cuImage.taishan | 218 | image-$(CONFIG_TAISHAN) += cuImage.taishan |
217 | image-$(CONFIG_KATMAI) += cuImage.katmai | 219 | image-$(CONFIG_KATMAI) += cuImage.katmai |
218 | image-$(CONFIG_WARP) += cuImage.warp | 220 | image-$(CONFIG_WARP) += cuImage.warp |
221 | image-$(CONFIG_YOSEMITE) += cuImage.yosemite | ||
219 | 222 | ||
220 | # Board ports in arch/powerpc/platform/8xx/Kconfig | 223 | # Board ports in arch/powerpc/platform/8xx/Kconfig |
221 | image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads | 224 | image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads |
@@ -255,6 +258,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm8555 | |||
255 | image-$(CONFIG_TQM8560) += cuImage.tqm8560 | 258 | image-$(CONFIG_TQM8560) += cuImage.tqm8560 |
256 | image-$(CONFIG_SBC8548) += cuImage.sbc8548 | 259 | image-$(CONFIG_SBC8548) += cuImage.sbc8548 |
257 | image-$(CONFIG_SBC8560) += cuImage.sbc8560 | 260 | image-$(CONFIG_SBC8560) += cuImage.sbc8560 |
261 | image-$(CONFIG_KSI8560) += cuImage.ksi8560 | ||
258 | 262 | ||
259 | # Board ports in arch/powerpc/platform/embedded6xx/Kconfig | 263 | # Board ports in arch/powerpc/platform/embedded6xx/Kconfig |
260 | image-$(CONFIG_STORCENTER) += cuImage.storcenter | 264 | image-$(CONFIG_STORCENTER) += cuImage.storcenter |
@@ -285,11 +289,11 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) | |||
285 | $(call if_changed,wrap,$*) | 289 | $(call if_changed,wrap,$*) |
286 | 290 | ||
287 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob | 291 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob |
288 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | 292 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb |
289 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) | 293 | $(call if_changed,wrap,$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) |
290 | 294 | ||
291 | $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | 295 | $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb |
292 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts) | 296 | $(call if_changed,wrap,$*,,$(obj)/$*.dtb) |
293 | 297 | ||
294 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) | 298 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) |
295 | # prefix | 299 | # prefix |
@@ -302,14 +306,24 @@ $(obj)/zImage.iseries: vmlinux | |||
302 | $(obj)/uImage: vmlinux $(wrapperbits) | 306 | $(obj)/uImage: vmlinux $(wrapperbits) |
303 | $(call if_changed,wrap,uboot) | 307 | $(call if_changed,wrap,uboot) |
304 | 308 | ||
305 | $(obj)/cuImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) | 309 | $(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) |
306 | $(call if_changed,wrap,cuboot-$*,$(dtstree)/$*.dts) | 310 | $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb) |
307 | 311 | ||
308 | $(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts $(wrapperbits) | 312 | $(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) |
309 | $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) | 313 | $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) |
310 | 314 | ||
311 | $(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) | 315 | $(obj)/simpleImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) |
312 | $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts) | 316 | $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb) |
317 | |||
318 | $(obj)/treeImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) | ||
319 | $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) | ||
320 | |||
321 | $(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) | ||
322 | $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb) | ||
323 | |||
324 | # Rule to build device tree blobs | ||
325 | $(obj)/%.dtb: $(dtstree)/%.dts $(obj)/dtc | ||
326 | $(obj)/dtc -O dtb -o $(obj)/$*.dtb -b 0 $(DTS_FLAGS) $(dtstree)/$*.dts | ||
313 | 327 | ||
314 | # If there isn't a platform selected then just strip the vmlinux. | 328 | # If there isn't a platform selected then just strip the vmlinux. |
315 | ifeq (,$(image-y)) | 329 | ifeq (,$(image-y)) |
@@ -326,7 +340,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) | |||
326 | 340 | ||
327 | # anything not in $(targets) | 341 | # anything not in $(targets) |
328 | clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ | 342 | clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ |
329 | otheros.bld | 343 | otheros.bld *.dtb |
330 | 344 | ||
331 | # clean up files cached by wrapper | 345 | # clean up files cached by wrapper |
332 | clean-kernel := vmlinux.strip vmlinux.bin | 346 | clean-kernel := vmlinux.strip vmlinux.bin |
diff --git a/arch/powerpc/boot/bamboo.c b/arch/powerpc/boot/bamboo.c index 54b33f1500e2..b82cacbc60db 100644 --- a/arch/powerpc/boot/bamboo.c +++ b/arch/powerpc/boot/bamboo.c | |||
@@ -33,7 +33,8 @@ static void bamboo_fixups(void) | |||
33 | ibm440ep_fixup_clocks(sysclk, 11059200, 25000000); | 33 | ibm440ep_fixup_clocks(sysclk, 11059200, 25000000); |
34 | ibm4xx_sdram_fixup_memsize(); | 34 | ibm4xx_sdram_fixup_memsize(); |
35 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); | 35 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); |
36 | dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1); | 36 | dt_fixup_mac_address_by_alias("ethernet0", bamboo_mac0); |
37 | dt_fixup_mac_address_by_alias("ethernet1", bamboo_mac1); | ||
37 | } | 38 | } |
38 | 39 | ||
39 | void bamboo_init(void *mac0, void *mac1) | 40 | void bamboo_init(void *mac0, void *mac1) |
diff --git a/arch/powerpc/boot/cuboot-rainier.c b/arch/powerpc/boot/cuboot-rainier.c index cf452b66dce8..0a3fddee54df 100644 --- a/arch/powerpc/boot/cuboot-rainier.c +++ b/arch/powerpc/boot/cuboot-rainier.c | |||
@@ -42,7 +42,8 @@ static void rainier_fixups(void) | |||
42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); |
43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
44 | ibm4xx_denali_fixup_memsize(); | 44 | ibm4xx_denali_fixup_memsize(); |
45 | dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); | 45 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
46 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
46 | } | 47 | } |
47 | 48 | ||
48 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 49 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
diff --git a/arch/powerpc/boot/cuboot-sequoia.c b/arch/powerpc/boot/cuboot-sequoia.c index f555575a44de..caf8f2e842ea 100644 --- a/arch/powerpc/boot/cuboot-sequoia.c +++ b/arch/powerpc/boot/cuboot-sequoia.c | |||
@@ -42,7 +42,8 @@ static void sequoia_fixups(void) | |||
42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); |
43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
44 | ibm4xx_denali_fixup_memsize(); | 44 | ibm4xx_denali_fixup_memsize(); |
45 | dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); | 45 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
46 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
46 | } | 47 | } |
47 | 48 | ||
48 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 49 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
diff --git a/arch/powerpc/boot/cuboot-taishan.c b/arch/powerpc/boot/cuboot-taishan.c index b55b80467eed..9bc906a754dd 100644 --- a/arch/powerpc/boot/cuboot-taishan.c +++ b/arch/powerpc/boot/cuboot-taishan.c | |||
@@ -40,7 +40,8 @@ static void taishan_fixups(void) | |||
40 | 40 | ||
41 | ibm4xx_sdram_fixup_memsize(); | 41 | ibm4xx_sdram_fixup_memsize(); |
42 | 42 | ||
43 | dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); | 43 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
44 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
44 | 45 | ||
45 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 46 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
46 | } | 47 | } |
diff --git a/arch/powerpc/boot/cuboot-warp.c b/arch/powerpc/boot/cuboot-warp.c index 3db93e85e9ea..eb108a877492 100644 --- a/arch/powerpc/boot/cuboot-warp.c +++ b/arch/powerpc/boot/cuboot-warp.c | |||
@@ -24,7 +24,7 @@ static void warp_fixups(void) | |||
24 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 24 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); |
25 | ibm4xx_sdram_fixup_memsize(); | 25 | ibm4xx_sdram_fixup_memsize(); |
26 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 26 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
27 | dt_fixup_mac_addresses(&bd.bi_enetaddr); | 27 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
28 | } | 28 | } |
29 | 29 | ||
30 | 30 | ||
diff --git a/arch/powerpc/boot/cuboot-yosemite.c b/arch/powerpc/boot/cuboot-yosemite.c new file mode 100644 index 000000000000..cc6e338c5d0d --- /dev/null +++ b/arch/powerpc/boot/cuboot-yosemite.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for Yosemite | ||
3 | * | ||
4 | * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
5 | * | ||
6 | * Copyright 2008 IBM Corporation | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include "ops.h" | ||
14 | #include "stdio.h" | ||
15 | #include "4xx.h" | ||
16 | #include "44x.h" | ||
17 | #include "cuboot.h" | ||
18 | |||
19 | #define TARGET_4xx | ||
20 | #define TARGET_44x | ||
21 | #include "ppcboot.h" | ||
22 | |||
23 | static bd_t bd; | ||
24 | |||
25 | static void yosemite_fixups(void) | ||
26 | { | ||
27 | unsigned long sysclk = 66666666; | ||
28 | |||
29 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | ||
30 | ibm4xx_sdram_fixup_memsize(); | ||
31 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); | ||
32 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); | ||
33 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
34 | } | ||
35 | |||
36 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
37 | unsigned long r6, unsigned long r7) | ||
38 | { | ||
39 | CUBOOT_INIT(); | ||
40 | platform_ops.fixups = yosemite_fixups; | ||
41 | platform_ops.exit = ibm44x_dbcr_reset; | ||
42 | fdt_init(_dtb_start); | ||
43 | serial_console_init(); | ||
44 | } | ||
diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts index 7dc37c9a7446..ba2521bdaab1 100644 --- a/arch/powerpc/boot/dts/bamboo.dts +++ b/arch/powerpc/boot/dts/bamboo.dts | |||
@@ -204,7 +204,6 @@ | |||
204 | }; | 204 | }; |
205 | 205 | ||
206 | EMAC0: ethernet@ef600e00 { | 206 | EMAC0: ethernet@ef600e00 { |
207 | linux,network-index = <0>; | ||
208 | device_type = "network"; | 207 | device_type = "network"; |
209 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | 208 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; |
210 | interrupt-parent = <&UIC1>; | 209 | interrupt-parent = <&UIC1>; |
@@ -225,7 +224,6 @@ | |||
225 | }; | 224 | }; |
226 | 225 | ||
227 | EMAC1: ethernet@ef600f00 { | 226 | EMAC1: ethernet@ef600f00 { |
228 | linux,network-index = <1>; | ||
229 | device_type = "network"; | 227 | device_type = "network"; |
230 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | 228 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; |
231 | interrupt-parent = <&UIC1>; | 229 | interrupt-parent = <&UIC1>; |
diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts new file mode 100644 index 000000000000..6f3d38a1554f --- /dev/null +++ b/arch/powerpc/boot/dts/canyonlands.dts | |||
@@ -0,0 +1,402 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC Canyonlands (460EX) | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without | ||
8 | * any warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | / { | ||
12 | #address-cells = <2>; | ||
13 | #size-cells = <1>; | ||
14 | model = "amcc,canyonlands"; | ||
15 | compatible = "amcc,canyonlands"; | ||
16 | dcr-parent = <&/cpus/cpu@0>; | ||
17 | |||
18 | aliases { | ||
19 | ethernet0 = &EMAC0; | ||
20 | ethernet1 = &EMAC1; | ||
21 | serial0 = &UART0; | ||
22 | serial1 = &UART1; | ||
23 | }; | ||
24 | |||
25 | cpus { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | cpu@0 { | ||
30 | device_type = "cpu"; | ||
31 | model = "PowerPC,460EX"; | ||
32 | reg = <0>; | ||
33 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
34 | timebase-frequency = <0>; /* Filled in by U-Boot */ | ||
35 | i-cache-line-size = <20>; | ||
36 | d-cache-line-size = <20>; | ||
37 | i-cache-size = <8000>; | ||
38 | d-cache-size = <8000>; | ||
39 | dcr-controller; | ||
40 | dcr-access-method = "native"; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | memory { | ||
45 | device_type = "memory"; | ||
46 | reg = <0 0 0>; /* Filled in by U-Boot */ | ||
47 | }; | ||
48 | |||
49 | UIC0: interrupt-controller0 { | ||
50 | compatible = "ibm,uic-460ex","ibm,uic"; | ||
51 | interrupt-controller; | ||
52 | cell-index = <0>; | ||
53 | dcr-reg = <0c0 009>; | ||
54 | #address-cells = <0>; | ||
55 | #size-cells = <0>; | ||
56 | #interrupt-cells = <2>; | ||
57 | }; | ||
58 | |||
59 | UIC1: interrupt-controller1 { | ||
60 | compatible = "ibm,uic-460ex","ibm,uic"; | ||
61 | interrupt-controller; | ||
62 | cell-index = <1>; | ||
63 | dcr-reg = <0d0 009>; | ||
64 | #address-cells = <0>; | ||
65 | #size-cells = <0>; | ||
66 | #interrupt-cells = <2>; | ||
67 | interrupts = <1e 4 1f 4>; /* cascade */ | ||
68 | interrupt-parent = <&UIC0>; | ||
69 | }; | ||
70 | |||
71 | UIC2: interrupt-controller2 { | ||
72 | compatible = "ibm,uic-460ex","ibm,uic"; | ||
73 | interrupt-controller; | ||
74 | cell-index = <2>; | ||
75 | dcr-reg = <0e0 009>; | ||
76 | #address-cells = <0>; | ||
77 | #size-cells = <0>; | ||
78 | #interrupt-cells = <2>; | ||
79 | interrupts = <a 4 b 4>; /* cascade */ | ||
80 | interrupt-parent = <&UIC0>; | ||
81 | }; | ||
82 | |||
83 | UIC3: interrupt-controller3 { | ||
84 | compatible = "ibm,uic-460ex","ibm,uic"; | ||
85 | interrupt-controller; | ||
86 | cell-index = <3>; | ||
87 | dcr-reg = <0f0 009>; | ||
88 | #address-cells = <0>; | ||
89 | #size-cells = <0>; | ||
90 | #interrupt-cells = <2>; | ||
91 | interrupts = <10 4 11 4>; /* cascade */ | ||
92 | interrupt-parent = <&UIC0>; | ||
93 | }; | ||
94 | |||
95 | SDR0: sdr { | ||
96 | compatible = "ibm,sdr-460ex"; | ||
97 | dcr-reg = <00e 002>; | ||
98 | }; | ||
99 | |||
100 | CPR0: cpr { | ||
101 | compatible = "ibm,cpr-460ex"; | ||
102 | dcr-reg = <00c 002>; | ||
103 | }; | ||
104 | |||
105 | plb { | ||
106 | compatible = "ibm,plb-460ex", "ibm,plb4"; | ||
107 | #address-cells = <2>; | ||
108 | #size-cells = <1>; | ||
109 | ranges; | ||
110 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
111 | |||
112 | SDRAM0: sdram { | ||
113 | compatible = "ibm,sdram-460ex", "ibm,sdram-405gp"; | ||
114 | dcr-reg = <010 2>; | ||
115 | }; | ||
116 | |||
117 | MAL0: mcmal { | ||
118 | compatible = "ibm,mcmal-460ex", "ibm,mcmal2"; | ||
119 | dcr-reg = <180 62>; | ||
120 | num-tx-chans = <2>; | ||
121 | num-rx-chans = <10>; | ||
122 | #address-cells = <0>; | ||
123 | #size-cells = <0>; | ||
124 | interrupt-parent = <&UIC2>; | ||
125 | interrupts = < /*TXEOB*/ 6 4 | ||
126 | /*RXEOB*/ 7 4 | ||
127 | /*SERR*/ 3 4 | ||
128 | /*TXDE*/ 4 4 | ||
129 | /*RXDE*/ 5 4>; | ||
130 | }; | ||
131 | |||
132 | POB0: opb { | ||
133 | compatible = "ibm,opb-460ex", "ibm,opb"; | ||
134 | #address-cells = <1>; | ||
135 | #size-cells = <1>; | ||
136 | ranges = <b0000000 4 b0000000 50000000>; | ||
137 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
138 | |||
139 | EBC0: ebc { | ||
140 | compatible = "ibm,ebc-460ex", "ibm,ebc"; | ||
141 | dcr-reg = <012 2>; | ||
142 | #address-cells = <2>; | ||
143 | #size-cells = <1>; | ||
144 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
145 | interrupts = <6 4>; | ||
146 | interrupt-parent = <&UIC1>; | ||
147 | }; | ||
148 | |||
149 | UART0: serial@ef600300 { | ||
150 | device_type = "serial"; | ||
151 | compatible = "ns16550"; | ||
152 | reg = <ef600300 8>; | ||
153 | virtual-reg = <ef600300>; | ||
154 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
155 | current-speed = <0>; /* Filled in by U-Boot */ | ||
156 | interrupt-parent = <&UIC1>; | ||
157 | interrupts = <1 4>; | ||
158 | }; | ||
159 | |||
160 | UART1: serial@ef600400 { | ||
161 | device_type = "serial"; | ||
162 | compatible = "ns16550"; | ||
163 | reg = <ef600400 8>; | ||
164 | virtual-reg = <ef600400>; | ||
165 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
166 | current-speed = <0>; /* Filled in by U-Boot */ | ||
167 | interrupt-parent = <&UIC0>; | ||
168 | interrupts = <1 4>; | ||
169 | }; | ||
170 | |||
171 | UART2: serial@ef600500 { | ||
172 | device_type = "serial"; | ||
173 | compatible = "ns16550"; | ||
174 | reg = <ef600500 8>; | ||
175 | virtual-reg = <ef600500>; | ||
176 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
177 | current-speed = <0>; /* Filled in by U-Boot */ | ||
178 | interrupt-parent = <&UIC1>; | ||
179 | interrupts = <1d 4>; | ||
180 | }; | ||
181 | |||
182 | UART3: serial@ef600600 { | ||
183 | device_type = "serial"; | ||
184 | compatible = "ns16550"; | ||
185 | reg = <ef600600 8>; | ||
186 | virtual-reg = <ef600600>; | ||
187 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
188 | current-speed = <0>; /* Filled in by U-Boot */ | ||
189 | interrupt-parent = <&UIC1>; | ||
190 | interrupts = <1e 4>; | ||
191 | }; | ||
192 | |||
193 | IIC0: i2c@ef600700 { | ||
194 | compatible = "ibm,iic-460ex", "ibm,iic"; | ||
195 | reg = <ef600700 14>; | ||
196 | interrupt-parent = <&UIC0>; | ||
197 | interrupts = <2 4>; | ||
198 | }; | ||
199 | |||
200 | IIC1: i2c@ef600800 { | ||
201 | compatible = "ibm,iic-460ex", "ibm,iic"; | ||
202 | reg = <ef600800 14>; | ||
203 | interrupt-parent = <&UIC0>; | ||
204 | interrupts = <3 4>; | ||
205 | }; | ||
206 | |||
207 | ZMII0: emac-zmii@ef600d00 { | ||
208 | compatible = "ibm,zmii-460ex", "ibm,zmii"; | ||
209 | reg = <ef600d00 c>; | ||
210 | }; | ||
211 | |||
212 | RGMII0: emac-rgmii@ef601500 { | ||
213 | compatible = "ibm,rgmii-460ex", "ibm,rgmii"; | ||
214 | reg = <ef601500 8>; | ||
215 | has-mdio; | ||
216 | }; | ||
217 | |||
218 | TAH0: emac-tah@ef601350 { | ||
219 | compatible = "ibm,tah-460ex", "ibm,tah"; | ||
220 | reg = <ef601350 30>; | ||
221 | }; | ||
222 | |||
223 | TAH1: emac-tah@ef601450 { | ||
224 | compatible = "ibm,tah-460ex", "ibm,tah"; | ||
225 | reg = <ef601450 30>; | ||
226 | }; | ||
227 | |||
228 | EMAC0: ethernet@ef600e00 { | ||
229 | device_type = "network"; | ||
230 | compatible = "ibm,emac-460ex", "ibm,emac4"; | ||
231 | interrupt-parent = <&EMAC0>; | ||
232 | interrupts = <0 1>; | ||
233 | #interrupt-cells = <1>; | ||
234 | #address-cells = <0>; | ||
235 | #size-cells = <0>; | ||
236 | interrupt-map = </*Status*/ 0 &UIC2 10 4 | ||
237 | /*Wake*/ 1 &UIC2 14 4>; | ||
238 | reg = <ef600e00 70>; | ||
239 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
240 | mal-device = <&MAL0>; | ||
241 | mal-tx-channel = <0>; | ||
242 | mal-rx-channel = <0>; | ||
243 | cell-index = <0>; | ||
244 | max-frame-size = <2328>; | ||
245 | rx-fifo-size = <1000>; | ||
246 | tx-fifo-size = <800>; | ||
247 | phy-mode = "rgmii"; | ||
248 | phy-map = <00000000>; | ||
249 | rgmii-device = <&RGMII0>; | ||
250 | rgmii-channel = <0>; | ||
251 | tah-device = <&TAH0>; | ||
252 | tah-channel = <0>; | ||
253 | has-inverted-stacr-oc; | ||
254 | has-new-stacr-staopc; | ||
255 | }; | ||
256 | |||
257 | EMAC1: ethernet@ef600f00 { | ||
258 | device_type = "network"; | ||
259 | compatible = "ibm,emac-460ex", "ibm,emac4"; | ||
260 | interrupt-parent = <&EMAC1>; | ||
261 | interrupts = <0 1>; | ||
262 | #interrupt-cells = <1>; | ||
263 | #address-cells = <0>; | ||
264 | #size-cells = <0>; | ||
265 | interrupt-map = </*Status*/ 0 &UIC2 11 4 | ||
266 | /*Wake*/ 1 &UIC2 15 4>; | ||
267 | reg = <ef600f00 70>; | ||
268 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
269 | mal-device = <&MAL0>; | ||
270 | mal-tx-channel = <1>; | ||
271 | mal-rx-channel = <8>; | ||
272 | cell-index = <1>; | ||
273 | max-frame-size = <2328>; | ||
274 | rx-fifo-size = <1000>; | ||
275 | tx-fifo-size = <800>; | ||
276 | phy-mode = "rgmii"; | ||
277 | phy-map = <00000000>; | ||
278 | rgmii-device = <&RGMII0>; | ||
279 | rgmii-channel = <1>; | ||
280 | tah-device = <&TAH1>; | ||
281 | tah-channel = <1>; | ||
282 | has-inverted-stacr-oc; | ||
283 | has-new-stacr-staopc; | ||
284 | mdio-device = <&EMAC0>; | ||
285 | }; | ||
286 | }; | ||
287 | |||
288 | PCIX0: pci@c0ec00000 { | ||
289 | device_type = "pci"; | ||
290 | #interrupt-cells = <1>; | ||
291 | #size-cells = <2>; | ||
292 | #address-cells = <3>; | ||
293 | compatible = "ibm,plb-pcix-460ex", "ibm,plb-pcix"; | ||
294 | primary; | ||
295 | large-inbound-windows; | ||
296 | enable-msi-hole; | ||
297 | reg = <c 0ec00000 8 /* Config space access */ | ||
298 | 0 0 0 /* no IACK cycles */ | ||
299 | c 0ed00000 4 /* Special cycles */ | ||
300 | c 0ec80000 100 /* Internal registers */ | ||
301 | c 0ec80100 fc>; /* Internal messaging registers */ | ||
302 | |||
303 | /* Outbound ranges, one memory and one IO, | ||
304 | * later cannot be changed | ||
305 | */ | ||
306 | ranges = <02000000 0 80000000 0000000d 80000000 0 80000000 | ||
307 | 01000000 0 00000000 0000000c 08000000 0 00010000>; | ||
308 | |||
309 | /* Inbound 2GB range starting at 0 */ | ||
310 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
311 | |||
312 | /* This drives busses 0 to 0x3f */ | ||
313 | bus-range = <0 3f>; | ||
314 | |||
315 | /* All PCI interrupts are routed to ext IRQ 2 -> UIC1-0 */ | ||
316 | interrupt-map-mask = <0000 0 0 0>; | ||
317 | interrupt-map = < 0000 0 0 0 &UIC1 0 8 >; | ||
318 | }; | ||
319 | |||
320 | PCIE0: pciex@d00000000 { | ||
321 | device_type = "pci"; | ||
322 | #interrupt-cells = <1>; | ||
323 | #size-cells = <2>; | ||
324 | #address-cells = <3>; | ||
325 | compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; | ||
326 | primary; | ||
327 | port = <0>; /* port number */ | ||
328 | reg = <d 00000000 20000000 /* Config space access */ | ||
329 | c 08010000 00001000>; /* Registers */ | ||
330 | dcr-reg = <100 020>; | ||
331 | sdr-base = <300>; | ||
332 | |||
333 | /* Outbound ranges, one memory and one IO, | ||
334 | * later cannot be changed | ||
335 | */ | ||
336 | ranges = <02000000 0 80000000 0000000e 00000000 0 80000000 | ||
337 | 01000000 0 00000000 0000000f 80000000 0 00010000>; | ||
338 | |||
339 | /* Inbound 2GB range starting at 0 */ | ||
340 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
341 | |||
342 | /* This drives busses 40 to 0x7f */ | ||
343 | bus-range = <40 7f>; | ||
344 | |||
345 | /* Legacy interrupts (note the weird polarity, the bridge seems | ||
346 | * to invert PCIe legacy interrupts). | ||
347 | * We are de-swizzling here because the numbers are actually for | ||
348 | * port of the root complex virtual P2P bridge. But I want | ||
349 | * to avoid putting a node for it in the tree, so the numbers | ||
350 | * below are basically de-swizzled numbers. | ||
351 | * The real slot is on idsel 0, so the swizzling is 1:1 | ||
352 | */ | ||
353 | interrupt-map-mask = <0000 0 0 7>; | ||
354 | interrupt-map = < | ||
355 | 0000 0 0 1 &UIC3 c 4 /* swizzled int A */ | ||
356 | 0000 0 0 2 &UIC3 d 4 /* swizzled int B */ | ||
357 | 0000 0 0 3 &UIC3 e 4 /* swizzled int C */ | ||
358 | 0000 0 0 4 &UIC3 f 4 /* swizzled int D */>; | ||
359 | }; | ||
360 | |||
361 | PCIE1: pciex@d20000000 { | ||
362 | device_type = "pci"; | ||
363 | #interrupt-cells = <1>; | ||
364 | #size-cells = <2>; | ||
365 | #address-cells = <3>; | ||
366 | compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; | ||
367 | primary; | ||
368 | port = <1>; /* port number */ | ||
369 | reg = <d 20000000 20000000 /* Config space access */ | ||
370 | c 08011000 00001000>; /* Registers */ | ||
371 | dcr-reg = <120 020>; | ||
372 | sdr-base = <340>; | ||
373 | |||
374 | /* Outbound ranges, one memory and one IO, | ||
375 | * later cannot be changed | ||
376 | */ | ||
377 | ranges = <02000000 0 80000000 0000000e 80000000 0 80000000 | ||
378 | 01000000 0 00000000 0000000f 80010000 0 00010000>; | ||
379 | |||
380 | /* Inbound 2GB range starting at 0 */ | ||
381 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
382 | |||
383 | /* This drives busses 80 to 0xbf */ | ||
384 | bus-range = <80 bf>; | ||
385 | |||
386 | /* Legacy interrupts (note the weird polarity, the bridge seems | ||
387 | * to invert PCIe legacy interrupts). | ||
388 | * We are de-swizzling here because the numbers are actually for | ||
389 | * port of the root complex virtual P2P bridge. But I want | ||
390 | * to avoid putting a node for it in the tree, so the numbers | ||
391 | * below are basically de-swizzled numbers. | ||
392 | * The real slot is on idsel 0, so the swizzling is 1:1 | ||
393 | */ | ||
394 | interrupt-map-mask = <0000 0 0 7>; | ||
395 | interrupt-map = < | ||
396 | 0000 0 0 1 &UIC3 10 4 /* swizzled int A */ | ||
397 | 0000 0 0 2 &UIC3 11 4 /* swizzled int B */ | ||
398 | 0000 0 0 3 &UIC3 12 4 /* swizzled int C */ | ||
399 | 0000 0 0 4 &UIC3 13 4 /* swizzled int D */>; | ||
400 | }; | ||
401 | }; | ||
402 | }; | ||
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts index 0b000cb7ed8b..5079dc890e0e 100644 --- a/arch/powerpc/boot/dts/ebony.dts +++ b/arch/powerpc/boot/dts/ebony.dts | |||
@@ -241,7 +241,6 @@ | |||
241 | }; | 241 | }; |
242 | 242 | ||
243 | EMAC0: ethernet@40000800 { | 243 | EMAC0: ethernet@40000800 { |
244 | linux,network-index = <0>; | ||
245 | device_type = "network"; | 244 | device_type = "network"; |
246 | compatible = "ibm,emac-440gp", "ibm,emac"; | 245 | compatible = "ibm,emac-440gp", "ibm,emac"; |
247 | interrupt-parent = <&UIC1>; | 246 | interrupt-parent = <&UIC1>; |
@@ -261,7 +260,6 @@ | |||
261 | zmii-channel = <0>; | 260 | zmii-channel = <0>; |
262 | }; | 261 | }; |
263 | EMAC1: ethernet@40000900 { | 262 | EMAC1: ethernet@40000900 { |
264 | linux,network-index = <1>; | ||
265 | device_type = "network"; | 263 | device_type = "network"; |
266 | compatible = "ibm,emac-440gp", "ibm,emac"; | 264 | compatible = "ibm,emac-440gp", "ibm,emac"; |
267 | interrupt-parent = <&UIC1>; | 265 | interrupt-parent = <&UIC1>; |
diff --git a/arch/powerpc/boot/dts/glacier.dts b/arch/powerpc/boot/dts/glacier.dts new file mode 100644 index 000000000000..958a5ca53d35 --- /dev/null +++ b/arch/powerpc/boot/dts/glacier.dts | |||
@@ -0,0 +1,467 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC Glacier (460GT) | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without | ||
8 | * any warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | / { | ||
12 | #address-cells = <2>; | ||
13 | #size-cells = <1>; | ||
14 | model = "amcc,glacier"; | ||
15 | compatible = "amcc,glacier", "amcc,canyonlands"; | ||
16 | dcr-parent = <&/cpus/cpu@0>; | ||
17 | |||
18 | aliases { | ||
19 | ethernet0 = &EMAC0; | ||
20 | ethernet1 = &EMAC1; | ||
21 | ethernet2 = &EMAC2; | ||
22 | ethernet3 = &EMAC3; | ||
23 | serial0 = &UART0; | ||
24 | serial1 = &UART1; | ||
25 | }; | ||
26 | |||
27 | cpus { | ||
28 | #address-cells = <1>; | ||
29 | #size-cells = <0>; | ||
30 | |||
31 | cpu@0 { | ||
32 | device_type = "cpu"; | ||
33 | model = "PowerPC,460GT"; | ||
34 | reg = <0>; | ||
35 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
36 | timebase-frequency = <0>; /* Filled in by U-Boot */ | ||
37 | i-cache-line-size = <20>; | ||
38 | d-cache-line-size = <20>; | ||
39 | i-cache-size = <8000>; | ||
40 | d-cache-size = <8000>; | ||
41 | dcr-controller; | ||
42 | dcr-access-method = "native"; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | memory { | ||
47 | device_type = "memory"; | ||
48 | reg = <0 0 0>; /* Filled in by U-Boot */ | ||
49 | }; | ||
50 | |||
51 | UIC0: interrupt-controller0 { | ||
52 | compatible = "ibm,uic-460gt","ibm,uic"; | ||
53 | interrupt-controller; | ||
54 | cell-index = <0>; | ||
55 | dcr-reg = <0c0 009>; | ||
56 | #address-cells = <0>; | ||
57 | #size-cells = <0>; | ||
58 | #interrupt-cells = <2>; | ||
59 | }; | ||
60 | |||
61 | UIC1: interrupt-controller1 { | ||
62 | compatible = "ibm,uic-460gt","ibm,uic"; | ||
63 | interrupt-controller; | ||
64 | cell-index = <1>; | ||
65 | dcr-reg = <0d0 009>; | ||
66 | #address-cells = <0>; | ||
67 | #size-cells = <0>; | ||
68 | #interrupt-cells = <2>; | ||
69 | interrupts = <1e 4 1f 4>; /* cascade */ | ||
70 | interrupt-parent = <&UIC0>; | ||
71 | }; | ||
72 | |||
73 | UIC2: interrupt-controller2 { | ||
74 | compatible = "ibm,uic-460gt","ibm,uic"; | ||
75 | interrupt-controller; | ||
76 | cell-index = <2>; | ||
77 | dcr-reg = <0e0 009>; | ||
78 | #address-cells = <0>; | ||
79 | #size-cells = <0>; | ||
80 | #interrupt-cells = <2>; | ||
81 | interrupts = <a 4 b 4>; /* cascade */ | ||
82 | interrupt-parent = <&UIC0>; | ||
83 | }; | ||
84 | |||
85 | UIC3: interrupt-controller3 { | ||
86 | compatible = "ibm,uic-460gt","ibm,uic"; | ||
87 | interrupt-controller; | ||
88 | cell-index = <3>; | ||
89 | dcr-reg = <0f0 009>; | ||
90 | #address-cells = <0>; | ||
91 | #size-cells = <0>; | ||
92 | #interrupt-cells = <2>; | ||
93 | interrupts = <10 4 11 4>; /* cascade */ | ||
94 | interrupt-parent = <&UIC0>; | ||
95 | }; | ||
96 | |||
97 | SDR0: sdr { | ||
98 | compatible = "ibm,sdr-460gt"; | ||
99 | dcr-reg = <00e 002>; | ||
100 | }; | ||
101 | |||
102 | CPR0: cpr { | ||
103 | compatible = "ibm,cpr-460gt"; | ||
104 | dcr-reg = <00c 002>; | ||
105 | }; | ||
106 | |||
107 | plb { | ||
108 | compatible = "ibm,plb-460gt", "ibm,plb4"; | ||
109 | #address-cells = <2>; | ||
110 | #size-cells = <1>; | ||
111 | ranges; | ||
112 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
113 | |||
114 | SDRAM0: sdram { | ||
115 | compatible = "ibm,sdram-460gt", "ibm,sdram-405gp"; | ||
116 | dcr-reg = <010 2>; | ||
117 | }; | ||
118 | |||
119 | MAL0: mcmal { | ||
120 | compatible = "ibm,mcmal-460gt", "ibm,mcmal2"; | ||
121 | dcr-reg = <180 62>; | ||
122 | num-tx-chans = <4>; | ||
123 | num-rx-chans = <20>; | ||
124 | #address-cells = <0>; | ||
125 | #size-cells = <0>; | ||
126 | interrupt-parent = <&UIC2>; | ||
127 | interrupts = < /*TXEOB*/ 6 4 | ||
128 | /*RXEOB*/ 7 4 | ||
129 | /*SERR*/ 3 4 | ||
130 | /*TXDE*/ 4 4 | ||
131 | /*RXDE*/ 5 4>; | ||
132 | desc-base-addr-high = <8>; | ||
133 | }; | ||
134 | |||
135 | POB0: opb { | ||
136 | compatible = "ibm,opb-460gt", "ibm,opb"; | ||
137 | #address-cells = <1>; | ||
138 | #size-cells = <1>; | ||
139 | ranges = <b0000000 4 b0000000 50000000>; | ||
140 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
141 | |||
142 | EBC0: ebc { | ||
143 | compatible = "ibm,ebc-460gt", "ibm,ebc"; | ||
144 | dcr-reg = <012 2>; | ||
145 | #address-cells = <2>; | ||
146 | #size-cells = <1>; | ||
147 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
148 | interrupts = <6 4>; | ||
149 | interrupt-parent = <&UIC1>; | ||
150 | }; | ||
151 | |||
152 | UART0: serial@ef600300 { | ||
153 | device_type = "serial"; | ||
154 | compatible = "ns16550"; | ||
155 | reg = <ef600300 8>; | ||
156 | virtual-reg = <ef600300>; | ||
157 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
158 | current-speed = <0>; /* Filled in by U-Boot */ | ||
159 | interrupt-parent = <&UIC1>; | ||
160 | interrupts = <1 4>; | ||
161 | }; | ||
162 | |||
163 | UART1: serial@ef600400 { | ||
164 | device_type = "serial"; | ||
165 | compatible = "ns16550"; | ||
166 | reg = <ef600400 8>; | ||
167 | virtual-reg = <ef600400>; | ||
168 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
169 | current-speed = <0>; /* Filled in by U-Boot */ | ||
170 | interrupt-parent = <&UIC0>; | ||
171 | interrupts = <1 4>; | ||
172 | }; | ||
173 | |||
174 | UART2: serial@ef600500 { | ||
175 | device_type = "serial"; | ||
176 | compatible = "ns16550"; | ||
177 | reg = <ef600500 8>; | ||
178 | virtual-reg = <ef600500>; | ||
179 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
180 | current-speed = <0>; /* Filled in by U-Boot */ | ||
181 | interrupt-parent = <&UIC1>; | ||
182 | interrupts = <1d 4>; | ||
183 | }; | ||
184 | |||
185 | UART3: serial@ef600600 { | ||
186 | device_type = "serial"; | ||
187 | compatible = "ns16550"; | ||
188 | reg = <ef600600 8>; | ||
189 | virtual-reg = <ef600600>; | ||
190 | clock-frequency = <0>; /* Filled in by U-Boot */ | ||
191 | current-speed = <0>; /* Filled in by U-Boot */ | ||
192 | interrupt-parent = <&UIC1>; | ||
193 | interrupts = <1e 4>; | ||
194 | }; | ||
195 | |||
196 | IIC0: i2c@ef600700 { | ||
197 | compatible = "ibm,iic-460gt", "ibm,iic"; | ||
198 | reg = <ef600700 14>; | ||
199 | interrupt-parent = <&UIC0>; | ||
200 | interrupts = <2 4>; | ||
201 | }; | ||
202 | |||
203 | IIC1: i2c@ef600800 { | ||
204 | compatible = "ibm,iic-460gt", "ibm,iic"; | ||
205 | reg = <ef600800 14>; | ||
206 | interrupt-parent = <&UIC0>; | ||
207 | interrupts = <3 4>; | ||
208 | }; | ||
209 | |||
210 | ZMII0: emac-zmii@ef600d00 { | ||
211 | compatible = "ibm,zmii-460gt", "ibm,zmii"; | ||
212 | reg = <ef600d00 c>; | ||
213 | }; | ||
214 | |||
215 | RGMII0: emac-rgmii@ef601500 { | ||
216 | compatible = "ibm,rgmii-460gt", "ibm,rgmii"; | ||
217 | reg = <ef601500 8>; | ||
218 | has-mdio; | ||
219 | }; | ||
220 | |||
221 | RGMII1: emac-rgmii@ef601600 { | ||
222 | compatible = "ibm,rgmii-460gt", "ibm,rgmii"; | ||
223 | reg = <ef601600 8>; | ||
224 | has-mdio; | ||
225 | }; | ||
226 | |||
227 | TAH0: emac-tah@ef601350 { | ||
228 | compatible = "ibm,tah-460gt", "ibm,tah"; | ||
229 | reg = <ef601350 30>; | ||
230 | }; | ||
231 | |||
232 | TAH1: emac-tah@ef601450 { | ||
233 | compatible = "ibm,tah-460gt", "ibm,tah"; | ||
234 | reg = <ef601450 30>; | ||
235 | }; | ||
236 | |||
237 | EMAC0: ethernet@ef600e00 { | ||
238 | device_type = "network"; | ||
239 | compatible = "ibm,emac-460gt", "ibm,emac4"; | ||
240 | interrupt-parent = <&EMAC0>; | ||
241 | interrupts = <0 1>; | ||
242 | #interrupt-cells = <1>; | ||
243 | #address-cells = <0>; | ||
244 | #size-cells = <0>; | ||
245 | interrupt-map = </*Status*/ 0 &UIC2 10 4 | ||
246 | /*Wake*/ 1 &UIC2 14 4>; | ||
247 | reg = <ef600e00 70>; | ||
248 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
249 | mal-device = <&MAL0>; | ||
250 | mal-tx-channel = <0>; | ||
251 | mal-rx-channel = <0>; | ||
252 | cell-index = <0>; | ||
253 | max-frame-size = <2328>; | ||
254 | rx-fifo-size = <1000>; | ||
255 | tx-fifo-size = <800>; | ||
256 | phy-mode = "rgmii"; | ||
257 | phy-map = <00000000>; | ||
258 | rgmii-device = <&RGMII0>; | ||
259 | rgmii-channel = <0>; | ||
260 | tah-device = <&TAH0>; | ||
261 | tah-channel = <0>; | ||
262 | has-inverted-stacr-oc; | ||
263 | has-new-stacr-staopc; | ||
264 | }; | ||
265 | |||
266 | EMAC1: ethernet@ef600f00 { | ||
267 | device_type = "network"; | ||
268 | compatible = "ibm,emac-460gt", "ibm,emac4"; | ||
269 | interrupt-parent = <&EMAC1>; | ||
270 | interrupts = <0 1>; | ||
271 | #interrupt-cells = <1>; | ||
272 | #address-cells = <0>; | ||
273 | #size-cells = <0>; | ||
274 | interrupt-map = </*Status*/ 0 &UIC2 11 4 | ||
275 | /*Wake*/ 1 &UIC2 15 4>; | ||
276 | reg = <ef600f00 70>; | ||
277 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
278 | mal-device = <&MAL0>; | ||
279 | mal-tx-channel = <1>; | ||
280 | mal-rx-channel = <8>; | ||
281 | cell-index = <1>; | ||
282 | max-frame-size = <2328>; | ||
283 | rx-fifo-size = <1000>; | ||
284 | tx-fifo-size = <800>; | ||
285 | phy-mode = "rgmii"; | ||
286 | phy-map = <00000000>; | ||
287 | rgmii-device = <&RGMII0>; | ||
288 | rgmii-channel = <1>; | ||
289 | tah-device = <&TAH1>; | ||
290 | tah-channel = <1>; | ||
291 | has-inverted-stacr-oc; | ||
292 | has-new-stacr-staopc; | ||
293 | mdio-device = <&EMAC0>; | ||
294 | }; | ||
295 | |||
296 | EMAC2: ethernet@ef601100 { | ||
297 | device_type = "network"; | ||
298 | compatible = "ibm,emac-460gt", "ibm,emac4"; | ||
299 | interrupt-parent = <&EMAC2>; | ||
300 | interrupts = <0 1>; | ||
301 | #interrupt-cells = <1>; | ||
302 | #address-cells = <0>; | ||
303 | #size-cells = <0>; | ||
304 | interrupt-map = </*Status*/ 0 &UIC2 12 4 | ||
305 | /*Wake*/ 1 &UIC2 16 4>; | ||
306 | reg = <ef601100 70>; | ||
307 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
308 | mal-device = <&MAL0>; | ||
309 | mal-tx-channel = <2>; | ||
310 | mal-rx-channel = <10>; | ||
311 | cell-index = <2>; | ||
312 | max-frame-size = <2328>; | ||
313 | rx-fifo-size = <1000>; | ||
314 | tx-fifo-size = <800>; | ||
315 | phy-mode = "rgmii"; | ||
316 | phy-map = <00000000>; | ||
317 | rgmii-device = <&RGMII1>; | ||
318 | rgmii-channel = <0>; | ||
319 | has-inverted-stacr-oc; | ||
320 | has-new-stacr-staopc; | ||
321 | mdio-device = <&EMAC0>; | ||
322 | }; | ||
323 | |||
324 | EMAC3: ethernet@ef601200 { | ||
325 | device_type = "network"; | ||
326 | compatible = "ibm,emac-460gt", "ibm,emac4"; | ||
327 | interrupt-parent = <&EMAC3>; | ||
328 | interrupts = <0 1>; | ||
329 | #interrupt-cells = <1>; | ||
330 | #address-cells = <0>; | ||
331 | #size-cells = <0>; | ||
332 | interrupt-map = </*Status*/ 0 &UIC2 13 4 | ||
333 | /*Wake*/ 1 &UIC2 17 4>; | ||
334 | reg = <ef601200 70>; | ||
335 | local-mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
336 | mal-device = <&MAL0>; | ||
337 | mal-tx-channel = <3>; | ||
338 | mal-rx-channel = <18>; | ||
339 | cell-index = <3>; | ||
340 | max-frame-size = <2328>; | ||
341 | rx-fifo-size = <1000>; | ||
342 | tx-fifo-size = <800>; | ||
343 | phy-mode = "rgmii"; | ||
344 | phy-map = <00000000>; | ||
345 | rgmii-device = <&RGMII1>; | ||
346 | rgmii-channel = <1>; | ||
347 | has-inverted-stacr-oc; | ||
348 | has-new-stacr-staopc; | ||
349 | mdio-device = <&EMAC0>; | ||
350 | }; | ||
351 | }; | ||
352 | |||
353 | PCIX0: pci@c0ec00000 { | ||
354 | device_type = "pci"; | ||
355 | #interrupt-cells = <1>; | ||
356 | #size-cells = <2>; | ||
357 | #address-cells = <3>; | ||
358 | compatible = "ibm,plb-pcix-460gt", "ibm,plb-pcix"; | ||
359 | primary; | ||
360 | large-inbound-windows; | ||
361 | enable-msi-hole; | ||
362 | reg = <c 0ec00000 8 /* Config space access */ | ||
363 | 0 0 0 /* no IACK cycles */ | ||
364 | c 0ed00000 4 /* Special cycles */ | ||
365 | c 0ec80000 100 /* Internal registers */ | ||
366 | c 0ec80100 fc>; /* Internal messaging registers */ | ||
367 | |||
368 | /* Outbound ranges, one memory and one IO, | ||
369 | * later cannot be changed | ||
370 | */ | ||
371 | ranges = <02000000 0 80000000 0000000d 80000000 0 80000000 | ||
372 | 01000000 0 00000000 0000000c 08000000 0 00010000>; | ||
373 | |||
374 | /* Inbound 2GB range starting at 0 */ | ||
375 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
376 | |||
377 | /* This drives busses 0 to 0x3f */ | ||
378 | bus-range = <0 3f>; | ||
379 | |||
380 | /* All PCI interrupts are routed to ext IRQ 2 -> UIC1-0 */ | ||
381 | interrupt-map-mask = <0000 0 0 0>; | ||
382 | interrupt-map = < 0000 0 0 0 &UIC1 0 8 >; | ||
383 | }; | ||
384 | |||
385 | PCIE0: pciex@d00000000 { | ||
386 | device_type = "pci"; | ||
387 | #interrupt-cells = <1>; | ||
388 | #size-cells = <2>; | ||
389 | #address-cells = <3>; | ||
390 | compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; | ||
391 | primary; | ||
392 | port = <0>; /* port number */ | ||
393 | reg = <d 00000000 20000000 /* Config space access */ | ||
394 | c 08010000 00001000>; /* Registers */ | ||
395 | dcr-reg = <100 020>; | ||
396 | sdr-base = <300>; | ||
397 | |||
398 | /* Outbound ranges, one memory and one IO, | ||
399 | * later cannot be changed | ||
400 | */ | ||
401 | ranges = <02000000 0 80000000 0000000e 00000000 0 80000000 | ||
402 | 01000000 0 00000000 0000000f 80000000 0 00010000>; | ||
403 | |||
404 | /* Inbound 2GB range starting at 0 */ | ||
405 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
406 | |||
407 | /* This drives busses 40 to 0x7f */ | ||
408 | bus-range = <40 7f>; | ||
409 | |||
410 | /* Legacy interrupts (note the weird polarity, the bridge seems | ||
411 | * to invert PCIe legacy interrupts). | ||
412 | * We are de-swizzling here because the numbers are actually for | ||
413 | * port of the root complex virtual P2P bridge. But I want | ||
414 | * to avoid putting a node for it in the tree, so the numbers | ||
415 | * below are basically de-swizzled numbers. | ||
416 | * The real slot is on idsel 0, so the swizzling is 1:1 | ||
417 | */ | ||
418 | interrupt-map-mask = <0000 0 0 7>; | ||
419 | interrupt-map = < | ||
420 | 0000 0 0 1 &UIC3 c 4 /* swizzled int A */ | ||
421 | 0000 0 0 2 &UIC3 d 4 /* swizzled int B */ | ||
422 | 0000 0 0 3 &UIC3 e 4 /* swizzled int C */ | ||
423 | 0000 0 0 4 &UIC3 f 4 /* swizzled int D */>; | ||
424 | }; | ||
425 | |||
426 | PCIE1: pciex@d20000000 { | ||
427 | device_type = "pci"; | ||
428 | #interrupt-cells = <1>; | ||
429 | #size-cells = <2>; | ||
430 | #address-cells = <3>; | ||
431 | compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; | ||
432 | primary; | ||
433 | port = <1>; /* port number */ | ||
434 | reg = <d 20000000 20000000 /* Config space access */ | ||
435 | c 08011000 00001000>; /* Registers */ | ||
436 | dcr-reg = <120 020>; | ||
437 | sdr-base = <340>; | ||
438 | |||
439 | /* Outbound ranges, one memory and one IO, | ||
440 | * later cannot be changed | ||
441 | */ | ||
442 | ranges = <02000000 0 80000000 0000000e 80000000 0 80000000 | ||
443 | 01000000 0 00000000 0000000f 80010000 0 00010000>; | ||
444 | |||
445 | /* Inbound 2GB range starting at 0 */ | ||
446 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
447 | |||
448 | /* This drives busses 80 to 0xbf */ | ||
449 | bus-range = <80 bf>; | ||
450 | |||
451 | /* Legacy interrupts (note the weird polarity, the bridge seems | ||
452 | * to invert PCIe legacy interrupts). | ||
453 | * We are de-swizzling here because the numbers are actually for | ||
454 | * port of the root complex virtual P2P bridge. But I want | ||
455 | * to avoid putting a node for it in the tree, so the numbers | ||
456 | * below are basically de-swizzled numbers. | ||
457 | * The real slot is on idsel 0, so the swizzling is 1:1 | ||
458 | */ | ||
459 | interrupt-map-mask = <0000 0 0 7>; | ||
460 | interrupt-map = < | ||
461 | 0000 0 0 1 &UIC3 10 4 /* swizzled int A */ | ||
462 | 0000 0 0 2 &UIC3 11 4 /* swizzled int B */ | ||
463 | 0000 0 0 3 &UIC3 12 4 /* swizzled int C */ | ||
464 | 0000 0 0 4 &UIC3 13 4 /* swizzled int D */>; | ||
465 | }; | ||
466 | }; | ||
467 | }; | ||
diff --git a/arch/powerpc/boot/dts/haleakala.dts b/arch/powerpc/boot/dts/haleakala.dts index ae68fefc01b6..b5d95ac24dbf 100644 --- a/arch/powerpc/boot/dts/haleakala.dts +++ b/arch/powerpc/boot/dts/haleakala.dts | |||
@@ -12,7 +12,7 @@ | |||
12 | #address-cells = <1>; | 12 | #address-cells = <1>; |
13 | #size-cells = <1>; | 13 | #size-cells = <1>; |
14 | model = "amcc,haleakala"; | 14 | model = "amcc,haleakala"; |
15 | compatible = "amcc,kilauea"; | 15 | compatible = "amcc,haleakala", "amcc,kilauea"; |
16 | dcr-parent = <&/cpus/cpu@0>; | 16 | dcr-parent = <&/cpus/cpu@0>; |
17 | 17 | ||
18 | aliases { | 18 | aliases { |
@@ -218,7 +218,7 @@ | |||
218 | mal-tx-channel = <0>; | 218 | mal-tx-channel = <0>; |
219 | mal-rx-channel = <0>; | 219 | mal-rx-channel = <0>; |
220 | cell-index = <0>; | 220 | cell-index = <0>; |
221 | max-frame-size = <5dc>; | 221 | max-frame-size = <2328>; |
222 | rx-fifo-size = <1000>; | 222 | rx-fifo-size = <1000>; |
223 | tx-fifo-size = <800>; | 223 | tx-fifo-size = <800>; |
224 | phy-mode = "rgmii"; | 224 | phy-mode = "rgmii"; |
diff --git a/arch/powerpc/boot/dts/katmai.dts b/arch/powerpc/boot/dts/katmai.dts index fc86e5a3afc4..cc2873a531d2 100644 --- a/arch/powerpc/boot/dts/katmai.dts +++ b/arch/powerpc/boot/dts/katmai.dts | |||
@@ -212,7 +212,7 @@ | |||
212 | mal-tx-channel = <0>; | 212 | mal-tx-channel = <0>; |
213 | mal-rx-channel = <0>; | 213 | mal-rx-channel = <0>; |
214 | cell-index = <0>; | 214 | cell-index = <0>; |
215 | max-frame-size = <5dc>; | 215 | max-frame-size = <2328>; |
216 | rx-fifo-size = <1000>; | 216 | rx-fifo-size = <1000>; |
217 | tx-fifo-size = <800>; | 217 | tx-fifo-size = <800>; |
218 | phy-mode = "gmii"; | 218 | phy-mode = "gmii"; |
diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts index 8baef61f31cd..48c9a6e71f1a 100644 --- a/arch/powerpc/boot/dts/kilauea.dts +++ b/arch/powerpc/boot/dts/kilauea.dts | |||
@@ -219,7 +219,7 @@ | |||
219 | mal-tx-channel = <0>; | 219 | mal-tx-channel = <0>; |
220 | mal-rx-channel = <0>; | 220 | mal-rx-channel = <0>; |
221 | cell-index = <0>; | 221 | cell-index = <0>; |
222 | max-frame-size = <5dc>; | 222 | max-frame-size = <2328>; |
223 | rx-fifo-size = <1000>; | 223 | rx-fifo-size = <1000>; |
224 | tx-fifo-size = <800>; | 224 | tx-fifo-size = <800>; |
225 | phy-mode = "rgmii"; | 225 | phy-mode = "rgmii"; |
@@ -247,7 +247,7 @@ | |||
247 | mal-tx-channel = <1>; | 247 | mal-tx-channel = <1>; |
248 | mal-rx-channel = <1>; | 248 | mal-rx-channel = <1>; |
249 | cell-index = <1>; | 249 | cell-index = <1>; |
250 | max-frame-size = <5dc>; | 250 | max-frame-size = <2328>; |
251 | rx-fifo-size = <1000>; | 251 | rx-fifo-size = <1000>; |
252 | tx-fifo-size = <800>; | 252 | tx-fifo-size = <800>; |
253 | phy-mode = "rgmii"; | 253 | phy-mode = "rgmii"; |
diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts new file mode 100644 index 000000000000..f869ce3ca0b7 --- /dev/null +++ b/arch/powerpc/boot/dts/ksi8560.dts | |||
@@ -0,0 +1,267 @@ | |||
1 | /* | ||
2 | * Device Tree Source for Emerson KSI8560 | ||
3 | * | ||
4 | * Author: Alexandr Smirnov <asmirnov@ru.mvista.com> | ||
5 | * | ||
6 | * Based on mpc8560ads.dts | ||
7 | * | ||
8 | * 2008 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | /dts-v1/; | ||
16 | |||
17 | / { | ||
18 | model = "KSI8560"; | ||
19 | compatible = "emerson,KSI8560"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | |||
23 | aliases { | ||
24 | ethernet0 = &enet0; | ||
25 | ethernet1 = &enet1; | ||
26 | ethernet2 = &enet2; | ||
27 | }; | ||
28 | |||
29 | cpus { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | PowerPC,8560@0 { | ||
34 | device_type = "cpu"; | ||
35 | reg = <0>; | ||
36 | d-cache-line-size = <32>; | ||
37 | i-cache-line-size = <32>; | ||
38 | d-cache-size = <0x8000>; /* L1, 32K */ | ||
39 | i-cache-size = <0x8000>; /* L1, 32K */ | ||
40 | timebase-frequency = <0>; /* From U-boot */ | ||
41 | bus-frequency = <0>; /* From U-boot */ | ||
42 | clock-frequency = <0>; /* From U-boot */ | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | memory { | ||
47 | device_type = "memory"; | ||
48 | reg = <0x00000000 0x10000000>; /* Fixed by bootwrapper */ | ||
49 | }; | ||
50 | |||
51 | soc@fdf00000 { | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <1>; | ||
54 | device_type = "soc"; | ||
55 | ranges = <0x00000000 0xfdf00000 0x00100000>; | ||
56 | bus-frequency = <0>; /* Fixed by bootwrapper */ | ||
57 | |||
58 | memory-controller@2000 { | ||
59 | compatible = "fsl,8540-memory-controller"; | ||
60 | reg = <0x2000 0x1000>; | ||
61 | interrupt-parent = <&MPIC>; | ||
62 | interrupts = <0x12 0x2>; | ||
63 | }; | ||
64 | |||
65 | l2-cache-controller@20000 { | ||
66 | compatible = "fsl,8540-l2-cache-controller"; | ||
67 | reg = <0x20000 0x1000>; | ||
68 | cache-line-size = <0x20>; /* 32 bytes */ | ||
69 | cache-size = <0x40000>; /* L2, 256K */ | ||
70 | interrupt-parent = <&MPIC>; | ||
71 | interrupts = <0x10 0x2>; | ||
72 | }; | ||
73 | |||
74 | i2c@3000 { | ||
75 | #address-cells = <1>; | ||
76 | #size-cells = <0>; | ||
77 | cell-index = <0>; | ||
78 | compatible = "fsl-i2c"; | ||
79 | reg = <0x3000 0x100>; | ||
80 | interrupts = <0x2b 0x2>; | ||
81 | interrupt-parent = <&MPIC>; | ||
82 | dfsrr; | ||
83 | }; | ||
84 | |||
85 | mdio@24520 { /* For TSECs */ | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <0>; | ||
88 | compatible = "fsl,gianfar-mdio"; | ||
89 | reg = <0x24520 0x20>; | ||
90 | |||
91 | PHY1: ethernet-phy@1 { | ||
92 | interrupt-parent = <&MPIC>; | ||
93 | reg = <0x1>; | ||
94 | device_type = "ethernet-phy"; | ||
95 | }; | ||
96 | |||
97 | PHY2: ethernet-phy@2 { | ||
98 | interrupt-parent = <&MPIC>; | ||
99 | reg = <0x2>; | ||
100 | device_type = "ethernet-phy"; | ||
101 | }; | ||
102 | }; | ||
103 | |||
104 | enet0: ethernet@24000 { | ||
105 | device_type = "network"; | ||
106 | model = "TSEC"; | ||
107 | compatible = "gianfar"; | ||
108 | reg = <0x24000 0x1000>; | ||
109 | /* Mac address filled in by bootwrapper */ | ||
110 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
111 | interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>; | ||
112 | interrupt-parent = <&MPIC>; | ||
113 | phy-handle = <&PHY1>; | ||
114 | }; | ||
115 | |||
116 | enet1: ethernet@25000 { | ||
117 | device_type = "network"; | ||
118 | model = "TSEC"; | ||
119 | compatible = "gianfar"; | ||
120 | reg = <0x25000 0x1000>; | ||
121 | /* Mac address filled in by bootwrapper */ | ||
122 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
123 | interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>; | ||
124 | interrupt-parent = <&MPIC>; | ||
125 | phy-handle = <&PHY2>; | ||
126 | }; | ||
127 | |||
128 | MPIC: pic@40000 { | ||
129 | #address-cells = <0>; | ||
130 | #interrupt-cells = <2>; | ||
131 | interrupt-controller; | ||
132 | reg = <0x40000 0x40000>; | ||
133 | device_type = "open-pic"; | ||
134 | }; | ||
135 | |||
136 | cpm@919c0 { | ||
137 | #address-cells = <1>; | ||
138 | #size-cells = <1>; | ||
139 | compatible = "fsl,mpc8560-cpm", "fsl,cpm2"; | ||
140 | reg = <0x919c0 0x30>; | ||
141 | ranges; | ||
142 | |||
143 | muram@80000 { | ||
144 | #address-cells = <1>; | ||
145 | #size-cells = <1>; | ||
146 | ranges = <0x0 0x80000 0x10000>; | ||
147 | |||
148 | data@0 { | ||
149 | compatible = "fsl,cpm-muram-data"; | ||
150 | reg = <0x0 0x4000 0x9000 0x2000>; | ||
151 | }; | ||
152 | }; | ||
153 | |||
154 | brg@919f0 { | ||
155 | compatible = "fsl,mpc8560-brg", | ||
156 | "fsl,cpm2-brg", | ||
157 | "fsl,cpm-brg"; | ||
158 | reg = <0x919f0 0x10 0x915f0 0x10>; | ||
159 | clock-frequency = <165000000>; /* 166MHz */ | ||
160 | }; | ||
161 | |||
162 | CPMPIC: pic@90c00 { | ||
163 | #address-cells = <0>; | ||
164 | #interrupt-cells = <2>; | ||
165 | interrupt-controller; | ||
166 | interrupts = <0x2e 0x2>; | ||
167 | interrupt-parent = <&MPIC>; | ||
168 | reg = <0x90c00 0x80>; | ||
169 | compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic"; | ||
170 | }; | ||
171 | |||
172 | serial@91a00 { | ||
173 | device_type = "serial"; | ||
174 | compatible = "fsl,mpc8560-scc-uart", | ||
175 | "fsl,cpm2-scc-uart"; | ||
176 | reg = <0x91a00 0x20 0x88000 0x100>; | ||
177 | fsl,cpm-brg = <1>; | ||
178 | fsl,cpm-command = <0x800000>; | ||
179 | current-speed = <0x1c200>; | ||
180 | interrupts = <0x28 0x8>; | ||
181 | interrupt-parent = <&CPMPIC>; | ||
182 | }; | ||
183 | |||
184 | serial@91a20 { | ||
185 | device_type = "serial"; | ||
186 | compatible = "fsl,mpc8560-scc-uart", | ||
187 | "fsl,cpm2-scc-uart"; | ||
188 | reg = <0x91a20 0x20 0x88100 0x100>; | ||
189 | fsl,cpm-brg = <2>; | ||
190 | fsl,cpm-command = <0x4a00000>; | ||
191 | current-speed = <0x1c200>; | ||
192 | interrupts = <0x29 0x8>; | ||
193 | interrupt-parent = <&CPMPIC>; | ||
194 | }; | ||
195 | |||
196 | mdio@90d00 { /* For FCCs */ | ||
197 | #address-cells = <1>; | ||
198 | #size-cells = <0>; | ||
199 | compatible = "fsl,cpm2-mdio-bitbang"; | ||
200 | reg = <0x90d00 0x14>; | ||
201 | fsl,mdio-pin = <24>; | ||
202 | fsl,mdc-pin = <25>; | ||
203 | |||
204 | PHY0: ethernet-phy@0 { | ||
205 | interrupt-parent = <&MPIC>; | ||
206 | reg = <0x0>; | ||
207 | device_type = "ethernet-phy"; | ||
208 | }; | ||
209 | }; | ||
210 | |||
211 | enet2: ethernet@91300 { | ||
212 | device_type = "network"; | ||
213 | compatible = "fsl,mpc8560-fcc-enet", | ||
214 | "fsl,cpm2-fcc-enet"; | ||
215 | reg = <0x91300 0x20 0x88400 0x100 0x91390 0x1>; | ||
216 | /* Mac address filled in by bootwrapper */ | ||
217 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
218 | fsl,cpm-command = <0x12000300>; | ||
219 | interrupts = <0x20 0x8>; | ||
220 | interrupt-parent = <&CPMPIC>; | ||
221 | phy-handle = <&PHY0>; | ||
222 | }; | ||
223 | }; | ||
224 | }; | ||
225 | |||
226 | localbus@fdf05000 { | ||
227 | #address-cells = <2>; | ||
228 | #size-cells = <1>; | ||
229 | compatible = "fsl,mpc8560-localbus"; | ||
230 | reg = <0xfdf05000 0x68>; | ||
231 | |||
232 | ranges = <0x0 0x0 0xe0000000 0x00800000 | ||
233 | 0x4 0x0 0xe8080000 0x00080000>; | ||
234 | |||
235 | flash@0,0 { | ||
236 | #address-cells = <1>; | ||
237 | #size-cells = <1>; | ||
238 | compatible = "jedec-flash"; | ||
239 | reg = <0x0 0x0 0x800000>; | ||
240 | bank-width = <0x2>; | ||
241 | |||
242 | partition@0 { | ||
243 | label = "Primary Kernel"; | ||
244 | reg = <0x0 0x180000>; | ||
245 | }; | ||
246 | partition@180000 { | ||
247 | label = "Primary Filesystem"; | ||
248 | reg = <0x180000 0x580000>; | ||
249 | }; | ||
250 | partition@700000 { | ||
251 | label = "Monitor"; | ||
252 | reg = <0x300000 0x100000>; | ||
253 | read-only; | ||
254 | }; | ||
255 | }; | ||
256 | |||
257 | cpld@4,0 { | ||
258 | compatible = "emerson,KSI8560-cpld"; | ||
259 | reg = <0x4 0x0 0x80000>; | ||
260 | }; | ||
261 | }; | ||
262 | |||
263 | |||
264 | chosen { | ||
265 | linux,stdout-path = "/soc/cpm/serial@91a00"; | ||
266 | }; | ||
267 | }; | ||
diff --git a/arch/powerpc/boot/dts/makalu.dts b/arch/powerpc/boot/dts/makalu.dts index 710c01168179..84cc5e72ddd8 100644 --- a/arch/powerpc/boot/dts/makalu.dts +++ b/arch/powerpc/boot/dts/makalu.dts | |||
@@ -219,7 +219,7 @@ | |||
219 | mal-tx-channel = <0>; | 219 | mal-tx-channel = <0>; |
220 | mal-rx-channel = <0>; | 220 | mal-rx-channel = <0>; |
221 | cell-index = <0>; | 221 | cell-index = <0>; |
222 | max-frame-size = <5dc>; | 222 | max-frame-size = <2328>; |
223 | rx-fifo-size = <1000>; | 223 | rx-fifo-size = <1000>; |
224 | tx-fifo-size = <800>; | 224 | tx-fifo-size = <800>; |
225 | phy-mode = "rgmii"; | 225 | phy-mode = "rgmii"; |
@@ -247,7 +247,7 @@ | |||
247 | mal-tx-channel = <1>; | 247 | mal-tx-channel = <1>; |
248 | mal-rx-channel = <1>; | 248 | mal-rx-channel = <1>; |
249 | cell-index = <1>; | 249 | cell-index = <1>; |
250 | max-frame-size = <5dc>; | 250 | max-frame-size = <2328>; |
251 | rx-fifo-size = <1000>; | 251 | rx-fifo-size = <1000>; |
252 | tx-fifo-size = <800>; | 252 | tx-fifo-size = <800>; |
253 | phy-mode = "rgmii"; | 253 | phy-mode = "rgmii"; |
diff --git a/arch/powerpc/boot/dts/rainier.dts b/arch/powerpc/boot/dts/rainier.dts index f947c75a2e94..6a8fa7089ea2 100644 --- a/arch/powerpc/boot/dts/rainier.dts +++ b/arch/powerpc/boot/dts/rainier.dts | |||
@@ -254,7 +254,6 @@ | |||
254 | }; | 254 | }; |
255 | 255 | ||
256 | EMAC0: ethernet@ef600e00 { | 256 | EMAC0: ethernet@ef600e00 { |
257 | linux,network-index = <0>; | ||
258 | device_type = "network"; | 257 | device_type = "network"; |
259 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; | 258 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; |
260 | interrupt-parent = <&EMAC0>; | 259 | interrupt-parent = <&EMAC0>; |
@@ -270,7 +269,7 @@ | |||
270 | mal-tx-channel = <0>; | 269 | mal-tx-channel = <0>; |
271 | mal-rx-channel = <0>; | 270 | mal-rx-channel = <0>; |
272 | cell-index = <0>; | 271 | cell-index = <0>; |
273 | max-frame-size = <5dc>; | 272 | max-frame-size = <2328>; |
274 | rx-fifo-size = <1000>; | 273 | rx-fifo-size = <1000>; |
275 | tx-fifo-size = <800>; | 274 | tx-fifo-size = <800>; |
276 | phy-mode = "rgmii"; | 275 | phy-mode = "rgmii"; |
@@ -284,7 +283,6 @@ | |||
284 | }; | 283 | }; |
285 | 284 | ||
286 | EMAC1: ethernet@ef600f00 { | 285 | EMAC1: ethernet@ef600f00 { |
287 | linux,network-index = <1>; | ||
288 | device_type = "network"; | 286 | device_type = "network"; |
289 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; | 287 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; |
290 | interrupt-parent = <&EMAC1>; | 288 | interrupt-parent = <&EMAC1>; |
@@ -300,7 +298,7 @@ | |||
300 | mal-tx-channel = <1>; | 298 | mal-tx-channel = <1>; |
301 | mal-rx-channel = <1>; | 299 | mal-rx-channel = <1>; |
302 | cell-index = <1>; | 300 | cell-index = <1>; |
303 | max-frame-size = <5dc>; | 301 | max-frame-size = <2328>; |
304 | rx-fifo-size = <1000>; | 302 | rx-fifo-size = <1000>; |
305 | tx-fifo-size = <800>; | 303 | tx-fifo-size = <800>; |
306 | phy-mode = "rgmii"; | 304 | phy-mode = "rgmii"; |
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts index 8db9515d7dc3..a1ae4d6ec990 100644 --- a/arch/powerpc/boot/dts/sequoia.dts +++ b/arch/powerpc/boot/dts/sequoia.dts | |||
@@ -269,7 +269,6 @@ | |||
269 | }; | 269 | }; |
270 | 270 | ||
271 | EMAC0: ethernet@ef600e00 { | 271 | EMAC0: ethernet@ef600e00 { |
272 | linux,network-index = <0>; | ||
273 | device_type = "network"; | 272 | device_type = "network"; |
274 | compatible = "ibm,emac-440epx", "ibm,emac4"; | 273 | compatible = "ibm,emac-440epx", "ibm,emac4"; |
275 | interrupt-parent = <&EMAC0>; | 274 | interrupt-parent = <&EMAC0>; |
@@ -285,7 +284,7 @@ | |||
285 | mal-tx-channel = <0>; | 284 | mal-tx-channel = <0>; |
286 | mal-rx-channel = <0>; | 285 | mal-rx-channel = <0>; |
287 | cell-index = <0>; | 286 | cell-index = <0>; |
288 | max-frame-size = <5dc>; | 287 | max-frame-size = <2328>; |
289 | rx-fifo-size = <1000>; | 288 | rx-fifo-size = <1000>; |
290 | tx-fifo-size = <800>; | 289 | tx-fifo-size = <800>; |
291 | phy-mode = "rgmii"; | 290 | phy-mode = "rgmii"; |
@@ -299,7 +298,6 @@ | |||
299 | }; | 298 | }; |
300 | 299 | ||
301 | EMAC1: ethernet@ef600f00 { | 300 | EMAC1: ethernet@ef600f00 { |
302 | linux,network-index = <1>; | ||
303 | device_type = "network"; | 301 | device_type = "network"; |
304 | compatible = "ibm,emac-440epx", "ibm,emac4"; | 302 | compatible = "ibm,emac-440epx", "ibm,emac4"; |
305 | interrupt-parent = <&EMAC1>; | 303 | interrupt-parent = <&EMAC1>; |
@@ -315,7 +313,7 @@ | |||
315 | mal-tx-channel = <1>; | 313 | mal-tx-channel = <1>; |
316 | mal-rx-channel = <1>; | 314 | mal-rx-channel = <1>; |
317 | cell-index = <1>; | 315 | cell-index = <1>; |
318 | max-frame-size = <5dc>; | 316 | max-frame-size = <2328>; |
319 | rx-fifo-size = <1000>; | 317 | rx-fifo-size = <1000>; |
320 | tx-fifo-size = <800>; | 318 | tx-fifo-size = <800>; |
321 | phy-mode = "rgmii"; | 319 | phy-mode = "rgmii"; |
diff --git a/arch/powerpc/boot/dts/taishan.dts b/arch/powerpc/boot/dts/taishan.dts index 8278068c802c..e808e1c5593a 100644 --- a/arch/powerpc/boot/dts/taishan.dts +++ b/arch/powerpc/boot/dts/taishan.dts | |||
@@ -104,6 +104,16 @@ | |||
104 | // FIXME: anything else? | 104 | // FIXME: anything else? |
105 | }; | 105 | }; |
106 | 106 | ||
107 | L2C0: l2c { | ||
108 | compatible = "ibm,l2-cache-440gx", "ibm,l2-cache"; | ||
109 | dcr-reg = <20 8 /* Internal SRAM DCR's */ | ||
110 | 30 8>; /* L2 cache DCR's */ | ||
111 | cache-line-size = <20>; /* 32 bytes */ | ||
112 | cache-size = <40000>; /* L2, 256K */ | ||
113 | interrupt-parent = <&UIC2>; | ||
114 | interrupts = <17 1>; | ||
115 | }; | ||
116 | |||
107 | plb { | 117 | plb { |
108 | compatible = "ibm,plb-440gx", "ibm,plb4"; | 118 | compatible = "ibm,plb-440gx", "ibm,plb4"; |
109 | #address-cells = <2>; | 119 | #address-cells = <2>; |
@@ -232,10 +242,18 @@ | |||
232 | reg = <40000790 8>; | 242 | reg = <40000790 8>; |
233 | }; | 243 | }; |
234 | 244 | ||
245 | TAH0: emac-tah@40000b50 { | ||
246 | compatible = "ibm,tah-440gx", "ibm,tah"; | ||
247 | reg = <40000b50 30>; | ||
248 | }; | ||
249 | |||
250 | TAH1: emac-tah@40000d50 { | ||
251 | compatible = "ibm,tah-440gx", "ibm,tah"; | ||
252 | reg = <40000d50 30>; | ||
253 | }; | ||
235 | 254 | ||
236 | EMAC0: ethernet@40000800 { | 255 | EMAC0: ethernet@40000800 { |
237 | unused = <1>; | 256 | unused = <1>; |
238 | linux,network-index = <2>; | ||
239 | device_type = "network"; | 257 | device_type = "network"; |
240 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 258 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
241 | interrupt-parent = <&UIC1>; | 259 | interrupt-parent = <&UIC1>; |
@@ -256,7 +274,6 @@ | |||
256 | }; | 274 | }; |
257 | EMAC1: ethernet@40000900 { | 275 | EMAC1: ethernet@40000900 { |
258 | unused = <1>; | 276 | unused = <1>; |
259 | linux,network-index = <3>; | ||
260 | device_type = "network"; | 277 | device_type = "network"; |
261 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 278 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
262 | interrupt-parent = <&UIC1>; | 279 | interrupt-parent = <&UIC1>; |
@@ -277,7 +294,6 @@ | |||
277 | }; | 294 | }; |
278 | 295 | ||
279 | EMAC2: ethernet@40000c00 { | 296 | EMAC2: ethernet@40000c00 { |
280 | linux,network-index = <0>; | ||
281 | device_type = "network"; | 297 | device_type = "network"; |
282 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 298 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
283 | interrupt-parent = <&UIC2>; | 299 | interrupt-parent = <&UIC2>; |
@@ -288,7 +304,7 @@ | |||
288 | mal-tx-channel = <2>; | 304 | mal-tx-channel = <2>; |
289 | mal-rx-channel = <2>; | 305 | mal-rx-channel = <2>; |
290 | cell-index = <2>; | 306 | cell-index = <2>; |
291 | max-frame-size = <5dc>; | 307 | max-frame-size = <2328>; |
292 | rx-fifo-size = <1000>; | 308 | rx-fifo-size = <1000>; |
293 | tx-fifo-size = <800>; | 309 | tx-fifo-size = <800>; |
294 | phy-mode = "rgmii"; | 310 | phy-mode = "rgmii"; |
@@ -297,10 +313,11 @@ | |||
297 | rgmii-channel = <0>; | 313 | rgmii-channel = <0>; |
298 | zmii-device = <&ZMII0>; | 314 | zmii-device = <&ZMII0>; |
299 | zmii-channel = <2>; | 315 | zmii-channel = <2>; |
316 | tah-device = <&TAH0>; | ||
317 | tah-channel = <0>; | ||
300 | }; | 318 | }; |
301 | 319 | ||
302 | EMAC3: ethernet@40000e00 { | 320 | EMAC3: ethernet@40000e00 { |
303 | linux,network-index = <1>; | ||
304 | device_type = "network"; | 321 | device_type = "network"; |
305 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 322 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
306 | interrupt-parent = <&UIC2>; | 323 | interrupt-parent = <&UIC2>; |
@@ -311,7 +328,7 @@ | |||
311 | mal-tx-channel = <3>; | 328 | mal-tx-channel = <3>; |
312 | mal-rx-channel = <3>; | 329 | mal-rx-channel = <3>; |
313 | cell-index = <3>; | 330 | cell-index = <3>; |
314 | max-frame-size = <5dc>; | 331 | max-frame-size = <2328>; |
315 | rx-fifo-size = <1000>; | 332 | rx-fifo-size = <1000>; |
316 | tx-fifo-size = <800>; | 333 | tx-fifo-size = <800>; |
317 | phy-mode = "rgmii"; | 334 | phy-mode = "rgmii"; |
@@ -320,6 +337,8 @@ | |||
320 | rgmii-channel = <1>; | 337 | rgmii-channel = <1>; |
321 | zmii-device = <&ZMII0>; | 338 | zmii-device = <&ZMII0>; |
322 | zmii-channel = <3>; | 339 | zmii-channel = <3>; |
340 | tah-device = <&TAH1>; | ||
341 | tah-channel = <0>; | ||
323 | }; | 342 | }; |
324 | 343 | ||
325 | 344 | ||
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts index dcc21b0438e5..a328607c8f84 100644 --- a/arch/powerpc/boot/dts/walnut.dts +++ b/arch/powerpc/boot/dts/walnut.dts | |||
@@ -125,7 +125,6 @@ | |||
125 | }; | 125 | }; |
126 | 126 | ||
127 | EMAC: ethernet@ef600800 { | 127 | EMAC: ethernet@ef600800 { |
128 | linux,network-index = <0>; | ||
129 | device_type = "network"; | 128 | device_type = "network"; |
130 | compatible = "ibm,emac-405gp", "ibm,emac"; | 129 | compatible = "ibm,emac-405gp", "ibm,emac"; |
131 | interrupt-parent = <&UIC0>; | 130 | interrupt-parent = <&UIC0>; |
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts index dc1499d30f43..b04a52e22bf5 100644 --- a/arch/powerpc/boot/dts/warp.dts +++ b/arch/powerpc/boot/dts/warp.dts | |||
@@ -204,7 +204,6 @@ | |||
204 | }; | 204 | }; |
205 | 205 | ||
206 | EMAC0: ethernet@ef600e00 { | 206 | EMAC0: ethernet@ef600e00 { |
207 | linux,network-index = <0>; | ||
208 | device_type = "network"; | 207 | device_type = "network"; |
209 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | 208 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; |
210 | interrupt-parent = <&UIC1>; | 209 | interrupt-parent = <&UIC1>; |
diff --git a/arch/powerpc/boot/dts/yosemite.dts b/arch/powerpc/boot/dts/yosemite.dts new file mode 100644 index 000000000000..0d6d332814e0 --- /dev/null +++ b/arch/powerpc/boot/dts/yosemite.dts | |||
@@ -0,0 +1,304 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC Yosemite | ||
3 | * | ||
4 | * Copyright 2008 IBM Corp. | ||
5 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without | ||
9 | * any warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | / { | ||
13 | #address-cells = <2>; | ||
14 | #size-cells = <1>; | ||
15 | model = "amcc,yosemite"; | ||
16 | compatible = "amcc,yosemite","amcc,bamboo"; | ||
17 | dcr-parent = <&/cpus/cpu@0>; | ||
18 | |||
19 | aliases { | ||
20 | ethernet0 = &EMAC0; | ||
21 | ethernet1 = &EMAC1; | ||
22 | serial0 = &UART0; | ||
23 | serial1 = &UART1; | ||
24 | serial2 = &UART2; | ||
25 | serial3 = &UART3; | ||
26 | }; | ||
27 | |||
28 | cpus { | ||
29 | #address-cells = <1>; | ||
30 | #size-cells = <0>; | ||
31 | |||
32 | cpu@0 { | ||
33 | device_type = "cpu"; | ||
34 | model = "PowerPC,440EP"; | ||
35 | reg = <0>; | ||
36 | clock-frequency = <0>; /* Filled in by zImage */ | ||
37 | timebase-frequency = <0>; /* Filled in by zImage */ | ||
38 | i-cache-line-size = <20>; | ||
39 | d-cache-line-size = <20>; | ||
40 | i-cache-size = <8000>; | ||
41 | d-cache-size = <8000>; | ||
42 | dcr-controller; | ||
43 | dcr-access-method = "native"; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | memory { | ||
48 | device_type = "memory"; | ||
49 | reg = <0 0 0>; /* Filled in by zImage */ | ||
50 | }; | ||
51 | |||
52 | UIC0: interrupt-controller0 { | ||
53 | compatible = "ibm,uic-440ep","ibm,uic"; | ||
54 | interrupt-controller; | ||
55 | cell-index = <0>; | ||
56 | dcr-reg = <0c0 009>; | ||
57 | #address-cells = <0>; | ||
58 | #size-cells = <0>; | ||
59 | #interrupt-cells = <2>; | ||
60 | }; | ||
61 | |||
62 | UIC1: interrupt-controller1 { | ||
63 | compatible = "ibm,uic-440ep","ibm,uic"; | ||
64 | interrupt-controller; | ||
65 | cell-index = <1>; | ||
66 | dcr-reg = <0d0 009>; | ||
67 | #address-cells = <0>; | ||
68 | #size-cells = <0>; | ||
69 | #interrupt-cells = <2>; | ||
70 | interrupts = <1e 4 1f 4>; /* cascade */ | ||
71 | interrupt-parent = <&UIC0>; | ||
72 | }; | ||
73 | |||
74 | SDR0: sdr { | ||
75 | compatible = "ibm,sdr-440ep"; | ||
76 | dcr-reg = <00e 002>; | ||
77 | }; | ||
78 | |||
79 | CPR0: cpr { | ||
80 | compatible = "ibm,cpr-440ep"; | ||
81 | dcr-reg = <00c 002>; | ||
82 | }; | ||
83 | |||
84 | plb { | ||
85 | compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4"; | ||
86 | #address-cells = <2>; | ||
87 | #size-cells = <1>; | ||
88 | ranges; | ||
89 | clock-frequency = <0>; /* Filled in by zImage */ | ||
90 | |||
91 | SDRAM0: sdram { | ||
92 | compatible = "ibm,sdram-440ep", "ibm,sdram-405gp"; | ||
93 | dcr-reg = <010 2>; | ||
94 | }; | ||
95 | |||
96 | DMA0: dma { | ||
97 | compatible = "ibm,dma-440ep", "ibm,dma-440gp"; | ||
98 | dcr-reg = <100 027>; | ||
99 | }; | ||
100 | |||
101 | MAL0: mcmal { | ||
102 | compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal"; | ||
103 | dcr-reg = <180 62>; | ||
104 | num-tx-chans = <4>; | ||
105 | num-rx-chans = <2>; | ||
106 | interrupt-parent = <&MAL0>; | ||
107 | interrupts = <0 1 2 3 4>; | ||
108 | #interrupt-cells = <1>; | ||
109 | #address-cells = <0>; | ||
110 | #size-cells = <0>; | ||
111 | interrupt-map = </*TXEOB*/ 0 &UIC0 a 4 | ||
112 | /*RXEOB*/ 1 &UIC0 b 4 | ||
113 | /*SERR*/ 2 &UIC1 0 4 | ||
114 | /*TXDE*/ 3 &UIC1 1 4 | ||
115 | /*RXDE*/ 4 &UIC1 2 4>; | ||
116 | }; | ||
117 | |||
118 | POB0: opb { | ||
119 | compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb"; | ||
120 | #address-cells = <1>; | ||
121 | #size-cells = <1>; | ||
122 | /* Bamboo is oddball in the 44x world and doesn't use the ERPN | ||
123 | * bits. | ||
124 | */ | ||
125 | ranges = <00000000 0 00000000 80000000 | ||
126 | 80000000 0 80000000 80000000>; | ||
127 | interrupt-parent = <&UIC1>; | ||
128 | interrupts = <7 4>; | ||
129 | clock-frequency = <0>; /* Filled in by zImage */ | ||
130 | |||
131 | EBC0: ebc { | ||
132 | compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc"; | ||
133 | dcr-reg = <012 2>; | ||
134 | #address-cells = <2>; | ||
135 | #size-cells = <1>; | ||
136 | clock-frequency = <0>; /* Filled in by zImage */ | ||
137 | interrupts = <5 1>; | ||
138 | interrupt-parent = <&UIC1>; | ||
139 | }; | ||
140 | |||
141 | UART0: serial@ef600300 { | ||
142 | device_type = "serial"; | ||
143 | compatible = "ns16550"; | ||
144 | reg = <ef600300 8>; | ||
145 | virtual-reg = <ef600300>; | ||
146 | clock-frequency = <0>; /* Filled in by zImage */ | ||
147 | current-speed = <1c200>; | ||
148 | interrupt-parent = <&UIC0>; | ||
149 | interrupts = <0 4>; | ||
150 | }; | ||
151 | |||
152 | UART1: serial@ef600400 { | ||
153 | device_type = "serial"; | ||
154 | compatible = "ns16550"; | ||
155 | reg = <ef600400 8>; | ||
156 | virtual-reg = <ef600400>; | ||
157 | clock-frequency = <0>; | ||
158 | current-speed = <0>; | ||
159 | interrupt-parent = <&UIC0>; | ||
160 | interrupts = <1 4>; | ||
161 | }; | ||
162 | |||
163 | UART2: serial@ef600500 { | ||
164 | device_type = "serial"; | ||
165 | compatible = "ns16550"; | ||
166 | reg = <ef600500 8>; | ||
167 | virtual-reg = <ef600500>; | ||
168 | clock-frequency = <0>; | ||
169 | current-speed = <0>; | ||
170 | interrupt-parent = <&UIC0>; | ||
171 | interrupts = <3 4>; | ||
172 | status = "disabled"; | ||
173 | }; | ||
174 | |||
175 | UART3: serial@ef600600 { | ||
176 | device_type = "serial"; | ||
177 | compatible = "ns16550"; | ||
178 | reg = <ef600600 8>; | ||
179 | virtual-reg = <ef600600>; | ||
180 | clock-frequency = <0>; | ||
181 | current-speed = <0>; | ||
182 | interrupt-parent = <&UIC0>; | ||
183 | interrupts = <4 4>; | ||
184 | status = "disabled"; | ||
185 | }; | ||
186 | |||
187 | IIC0: i2c@ef600700 { | ||
188 | compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; | ||
189 | reg = <ef600700 14>; | ||
190 | interrupt-parent = <&UIC0>; | ||
191 | interrupts = <2 4>; | ||
192 | }; | ||
193 | |||
194 | IIC1: i2c@ef600800 { | ||
195 | compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; | ||
196 | reg = <ef600800 14>; | ||
197 | interrupt-parent = <&UIC0>; | ||
198 | interrupts = <7 4>; | ||
199 | }; | ||
200 | |||
201 | spi@ef600900 { | ||
202 | compatible = "amcc,spi-440ep"; | ||
203 | reg = <ef600900 6>; | ||
204 | interrupts = <8 4>; | ||
205 | interrupt-parent = <&UIC0>; | ||
206 | }; | ||
207 | |||
208 | ZMII0: emac-zmii@ef600d00 { | ||
209 | compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii"; | ||
210 | reg = <ef600d00 c>; | ||
211 | }; | ||
212 | |||
213 | EMAC0: ethernet@ef600e00 { | ||
214 | device_type = "network"; | ||
215 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | ||
216 | interrupt-parent = <&UIC1>; | ||
217 | interrupts = <1c 4 1d 4>; | ||
218 | reg = <ef600e00 70>; | ||
219 | local-mac-address = [000000000000]; | ||
220 | mal-device = <&MAL0>; | ||
221 | mal-tx-channel = <0 1>; | ||
222 | mal-rx-channel = <0>; | ||
223 | cell-index = <0>; | ||
224 | max-frame-size = <5dc>; | ||
225 | rx-fifo-size = <1000>; | ||
226 | tx-fifo-size = <800>; | ||
227 | phy-mode = "rmii"; | ||
228 | phy-map = <00000000>; | ||
229 | zmii-device = <&ZMII0>; | ||
230 | zmii-channel = <0>; | ||
231 | }; | ||
232 | |||
233 | EMAC1: ethernet@ef600f00 { | ||
234 | device_type = "network"; | ||
235 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | ||
236 | interrupt-parent = <&UIC1>; | ||
237 | interrupts = <1e 4 1f 4>; | ||
238 | reg = <ef600f00 70>; | ||
239 | local-mac-address = [000000000000]; | ||
240 | mal-device = <&MAL0>; | ||
241 | mal-tx-channel = <2 3>; | ||
242 | mal-rx-channel = <1>; | ||
243 | cell-index = <1>; | ||
244 | max-frame-size = <5dc>; | ||
245 | rx-fifo-size = <1000>; | ||
246 | tx-fifo-size = <800>; | ||
247 | phy-mode = "rmii"; | ||
248 | phy-map = <00000000>; | ||
249 | zmii-device = <&ZMII0>; | ||
250 | zmii-channel = <1>; | ||
251 | }; | ||
252 | |||
253 | usb@ef601000 { | ||
254 | compatible = "ohci-be"; | ||
255 | reg = <ef601000 80>; | ||
256 | interrupts = <8 4 9 4>; | ||
257 | interrupt-parent = < &UIC1 >; | ||
258 | }; | ||
259 | }; | ||
260 | |||
261 | PCI0: pci@ec000000 { | ||
262 | device_type = "pci"; | ||
263 | #interrupt-cells = <1>; | ||
264 | #size-cells = <2>; | ||
265 | #address-cells = <3>; | ||
266 | compatible = "ibm,plb440ep-pci", "ibm,plb-pci"; | ||
267 | primary; | ||
268 | reg = <0 eec00000 8 /* Config space access */ | ||
269 | 0 eed00000 4 /* IACK */ | ||
270 | 0 eed00000 4 /* Special cycle */ | ||
271 | 0 ef400000 40>; /* Internal registers */ | ||
272 | |||
273 | /* Outbound ranges, one memory and one IO, | ||
274 | * later cannot be changed. Chip supports a second | ||
275 | * IO range but we don't use it for now | ||
276 | */ | ||
277 | ranges = <02000000 0 a0000000 0 a0000000 0 20000000 | ||
278 | 01000000 0 00000000 0 e8000000 0 00010000>; | ||
279 | |||
280 | /* Inbound 2GB range starting at 0 */ | ||
281 | dma-ranges = <42000000 0 0 0 0 0 80000000>; | ||
282 | |||
283 | /* Bamboo has all 4 IRQ pins tied together per slot */ | ||
284 | interrupt-map-mask = <f800 0 0 0>; | ||
285 | interrupt-map = < | ||
286 | /* IDSEL 1 */ | ||
287 | 0800 0 0 0 &UIC0 1c 8 | ||
288 | |||
289 | /* IDSEL 2 */ | ||
290 | 1000 0 0 0 &UIC0 1b 8 | ||
291 | |||
292 | /* IDSEL 3 */ | ||
293 | 1800 0 0 0 &UIC0 1a 8 | ||
294 | |||
295 | /* IDSEL 4 */ | ||
296 | 2000 0 0 0 &UIC0 19 8 | ||
297 | >; | ||
298 | }; | ||
299 | }; | ||
300 | |||
301 | chosen { | ||
302 | linux,stdout-path = "/plb/opb/serial@ef600300"; | ||
303 | }; | ||
304 | }; | ||
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c index f61364c47a76..5532ab3221dd 100644 --- a/arch/powerpc/boot/ebony.c +++ b/arch/powerpc/boot/ebony.c | |||
@@ -75,7 +75,8 @@ static void ebony_fixups(void) | |||
75 | 75 | ||
76 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); | 76 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); |
77 | ibm4xx_sdram_fixup_memsize(); | 77 | ibm4xx_sdram_fixup_memsize(); |
78 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); | 78 | dt_fixup_mac_address_by_alias("ethernet0", ebony_mac0); |
79 | dt_fixup_mac_address_by_alias("ethernet1", ebony_mac1); | ||
79 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 80 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
80 | ebony_flashsel_fixup(); | 81 | ebony_flashsel_fixup(); |
81 | } | 82 | } |
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c index 59016bef1391..c541fd8a95d4 100644 --- a/arch/powerpc/boot/libfdt-wrapper.c +++ b/arch/powerpc/boot/libfdt-wrapper.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #define check_err(err) \ | 35 | #define check_err(err) \ |
36 | ({ \ | 36 | ({ \ |
37 | if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \ | 37 | if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \ |
38 | printf("%s():%d %s\n\r", __FUNCTION__, __LINE__, \ | 38 | printf("%s():%d %s\n\r", __func__, __LINE__, \ |
39 | fdt_strerror(err)); \ | 39 | fdt_strerror(err)); \ |
40 | if (BAD_ERROR(err)) \ | 40 | if (BAD_ERROR(err)) \ |
41 | exit(); \ | 41 | exit(); \ |
diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S index a55c2735f759..b6fcbaf5027b 100644 --- a/arch/powerpc/boot/ps3-head.S +++ b/arch/powerpc/boot/ps3-head.S | |||
@@ -27,8 +27,9 @@ | |||
27 | /* | 27 | /* |
28 | * __system_reset_overlay - The PS3 first stage entry. | 28 | * __system_reset_overlay - The PS3 first stage entry. |
29 | * | 29 | * |
30 | * The bootwraper build script copies the 0x100 bytes at symbol | 30 | * The bootwraper build script copies the 512 bytes at symbol |
31 | * __system_reset_overlay to offset 0x100 of the rom image. | 31 | * __system_reset_overlay to offset 0x100 of the rom image. This symbol |
32 | * must occupy 512 or less bytes. | ||
32 | * | 33 | * |
33 | * The PS3 has a single processor with two threads. | 34 | * The PS3 has a single processor with two threads. |
34 | */ | 35 | */ |
@@ -47,8 +48,6 @@ __system_reset_overlay: | |||
47 | 48 | ||
48 | mfspr r3, 0x88 | 49 | mfspr r3, 0x88 |
49 | cntlzw. r3, r3 | 50 | cntlzw. r3, r3 |
50 | li r4, 0 | ||
51 | li r5, 0 | ||
52 | beq 1f | 51 | beq 1f |
53 | 52 | ||
54 | /* Secondary goes to __secondary_hold in kernel. */ | 53 | /* Secondary goes to __secondary_hold in kernel. */ |
@@ -57,8 +56,14 @@ __system_reset_overlay: | |||
57 | mtctr r4 | 56 | mtctr r4 |
58 | bctr | 57 | bctr |
59 | 58 | ||
60 | /* Primary delays then goes to _zimage_start in wrapper. */ | ||
61 | 1: | 59 | 1: |
60 | /* Save the value at addr zero for a null pointer write check later. */ | ||
61 | |||
62 | li r4, 0 | ||
63 | lwz r3, 0(r4) | ||
64 | |||
65 | /* Primary delays then goes to _zimage_start in wrapper. */ | ||
66 | |||
62 | or 31, 31, 31 /* db16cyc */ | 67 | or 31, 31, 31 /* db16cyc */ |
63 | or 31, 31, 31 /* db16cyc */ | 68 | or 31, 31, 31 /* db16cyc */ |
64 | 69 | ||
@@ -67,16 +72,18 @@ __system_reset_overlay: | |||
67 | mtctr r4 | 72 | mtctr r4 |
68 | bctr | 73 | bctr |
69 | 74 | ||
75 | . = __system_reset_overlay + 512 | ||
76 | |||
70 | /* | 77 | /* |
71 | * __system_reset_kernel - Place holder for the kernel reset vector. | 78 | * __system_reset_kernel - Place holder for the kernel reset vector. |
72 | * | 79 | * |
73 | * The bootwrapper build script copies 0x100 bytes from offset 0x100 | 80 | * The bootwrapper build script copies 512 bytes from offset 0x100 |
74 | * of the rom image to the symbol __system_reset_kernel. At runtime | 81 | * of the rom image to the symbol __system_reset_kernel. At runtime |
75 | * the bootwrapper program copies the 0x100 bytes at __system_reset_kernel | 82 | * the bootwrapper program copies the 512 bytes at __system_reset_kernel |
76 | * to ram address 0x100. This symbol must occupy 0x100 bytes. | 83 | * to ram address 0x100. This symbol must occupy 512 bytes. |
77 | */ | 84 | */ |
78 | 85 | ||
79 | .globl __system_reset_kernel | 86 | .globl __system_reset_kernel |
80 | __system_reset_kernel: | 87 | __system_reset_kernel: |
81 | 88 | ||
82 | . = __system_reset_kernel + 0x100 | 89 | . = __system_reset_kernel + 512 |
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index 3b0ac4d006ec..9954d98871d0 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c | |||
@@ -27,10 +27,10 @@ | |||
27 | #include "page.h" | 27 | #include "page.h" |
28 | #include "ops.h" | 28 | #include "ops.h" |
29 | 29 | ||
30 | extern s64 lv1_panic(u64 in_1); | 30 | extern int lv1_panic(u64 in_1); |
31 | extern s64 lv1_get_logical_partition_id(u64 *out_1); | 31 | extern int lv1_get_logical_partition_id(u64 *out_1); |
32 | extern s64 lv1_get_logical_ppe_id(u64 *out_1); | 32 | extern int lv1_get_logical_ppe_id(u64 *out_1); |
33 | extern s64 lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3, | 33 | extern int lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3, |
34 | u64 in_4, u64 in_5, u64 *out_1, u64 *out_2); | 34 | u64 in_4, u64 in_5, u64 *out_1, u64 *out_2); |
35 | 35 | ||
36 | #ifdef DEBUG | 36 | #ifdef DEBUG |
@@ -46,6 +46,7 @@ BSS_STACK(4096); | |||
46 | * edit the command line passed to vmlinux (by setting /chosen/bootargs). | 46 | * edit the command line passed to vmlinux (by setting /chosen/bootargs). |
47 | * The buffer is put in it's own section so that tools may locate it easier. | 47 | * The buffer is put in it's own section so that tools may locate it easier. |
48 | */ | 48 | */ |
49 | |||
49 | static char cmdline[COMMAND_LINE_SIZE] | 50 | static char cmdline[COMMAND_LINE_SIZE] |
50 | __attribute__((__section__("__builtin_cmdline"))); | 51 | __attribute__((__section__("__builtin_cmdline"))); |
51 | 52 | ||
@@ -75,7 +76,7 @@ static void ps3_exit(void) | |||
75 | 76 | ||
76 | static int ps3_repository_read_rm_size(u64 *rm_size) | 77 | static int ps3_repository_read_rm_size(u64 *rm_size) |
77 | { | 78 | { |
78 | s64 result; | 79 | int result; |
79 | u64 lpar_id; | 80 | u64 lpar_id; |
80 | u64 ppe_id; | 81 | u64 ppe_id; |
81 | u64 v2; | 82 | u64 v2; |
@@ -114,16 +115,17 @@ void ps3_copy_vectors(void) | |||
114 | { | 115 | { |
115 | extern char __system_reset_kernel[]; | 116 | extern char __system_reset_kernel[]; |
116 | 117 | ||
117 | memcpy((void *)0x100, __system_reset_kernel, 0x100); | 118 | memcpy((void *)0x100, __system_reset_kernel, 512); |
118 | flush_cache((void *)0x100, 0x100); | 119 | flush_cache((void *)0x100, 512); |
119 | } | 120 | } |
120 | 121 | ||
121 | void platform_init(void) | 122 | void platform_init(unsigned long null_check) |
122 | { | 123 | { |
123 | const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ | 124 | const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ |
124 | void *chosen; | 125 | void *chosen; |
125 | unsigned long ft_addr; | 126 | unsigned long ft_addr; |
126 | u64 rm_size; | 127 | u64 rm_size; |
128 | unsigned long val; | ||
127 | 129 | ||
128 | console_ops.write = ps3_console_write; | 130 | console_ops.write = ps3_console_write; |
129 | platform_ops.exit = ps3_exit; | 131 | platform_ops.exit = ps3_exit; |
@@ -151,6 +153,11 @@ void platform_init(void) | |||
151 | 153 | ||
152 | printf(" flat tree at 0x%lx\n\r", ft_addr); | 154 | printf(" flat tree at 0x%lx\n\r", ft_addr); |
153 | 155 | ||
156 | val = *(unsigned long *)0; | ||
157 | |||
158 | if (val != null_check) | ||
159 | printf("null check failed: %lx != %lx\n\r", val, null_check); | ||
160 | |||
154 | ((kernel_entry_t)0)(ft_addr, 0, NULL); | 161 | ((kernel_entry_t)0)(ft_addr, 0, NULL); |
155 | 162 | ||
156 | ps3_exit(); | 163 | ps3_exit(); |
diff --git a/arch/powerpc/boot/simpleboot.c b/arch/powerpc/boot/simpleboot.c new file mode 100644 index 000000000000..86cd285bccc6 --- /dev/null +++ b/arch/powerpc/boot/simpleboot.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * The simple platform -- for booting when firmware doesn't supply a device | ||
3 | * tree or any platform configuration information. | ||
4 | * All data is extracted from an embedded device tree | ||
5 | * blob. | ||
6 | * | ||
7 | * Authors: Scott Wood <scottwood@freescale.com> | ||
8 | * Grant Likely <grant.likely@secretlab.ca> | ||
9 | * | ||
10 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
11 | * Copyright (c) 2008 Secret Lab Technologies Ltd. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License version 2 as published | ||
15 | * by the Free Software Foundation. | ||
16 | */ | ||
17 | |||
18 | #include "ops.h" | ||
19 | #include "types.h" | ||
20 | #include "io.h" | ||
21 | #include "stdio.h" | ||
22 | #include "libfdt/libfdt.h" | ||
23 | |||
24 | BSS_STACK(4*1024); | ||
25 | |||
26 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
27 | unsigned long r6, unsigned long r7) | ||
28 | { | ||
29 | const u32 *na, *ns, *reg, *timebase; | ||
30 | u64 memsize64; | ||
31 | int node, size, i; | ||
32 | |||
33 | /* Make sure FDT blob is sane */ | ||
34 | if (fdt_check_header(_dtb_start) != 0) | ||
35 | fatal("Invalid device tree blob\n"); | ||
36 | |||
37 | /* Find the #address-cells and #size-cells properties */ | ||
38 | node = fdt_path_offset(_dtb_start, "/"); | ||
39 | if (node < 0) | ||
40 | fatal("Cannot find root node\n"); | ||
41 | na = fdt_getprop(_dtb_start, node, "#address-cells", &size); | ||
42 | if (!na || (size != 4)) | ||
43 | fatal("Cannot find #address-cells property"); | ||
44 | ns = fdt_getprop(_dtb_start, node, "#size-cells", &size); | ||
45 | if (!ns || (size != 4)) | ||
46 | fatal("Cannot find #size-cells property"); | ||
47 | |||
48 | /* Find the memory range */ | ||
49 | node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", | ||
50 | "memory", sizeof("memory")); | ||
51 | if (node < 0) | ||
52 | fatal("Cannot find memory node\n"); | ||
53 | reg = fdt_getprop(_dtb_start, node, "reg", &size); | ||
54 | if (size < (*na+*ns) * sizeof(u32)) | ||
55 | fatal("cannot get memory range\n"); | ||
56 | |||
57 | /* Only interested in memory based at 0 */ | ||
58 | for (i = 0; i < *na; i++) | ||
59 | if (*reg++ != 0) | ||
60 | fatal("Memory range is not based at address 0\n"); | ||
61 | |||
62 | /* get the memsize and trucate it to under 4G on 32 bit machines */ | ||
63 | memsize64 = 0; | ||
64 | for (i = 0; i < *ns; i++) | ||
65 | memsize64 = (memsize64 << 32) | *reg++; | ||
66 | if (sizeof(void *) == 4 && memsize64 >= 0x100000000ULL) | ||
67 | memsize64 = 0xffffffff; | ||
68 | |||
69 | /* finally, setup the timebase */ | ||
70 | node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", | ||
71 | "cpu", sizeof("cpu")); | ||
72 | if (!node) | ||
73 | fatal("Cannot find cpu node\n"); | ||
74 | timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size); | ||
75 | if (timebase && (size == 4)) | ||
76 | timebase_period_ns = 1000000000 / *timebase; | ||
77 | |||
78 | /* Now we have the memory size; initialize the heap */ | ||
79 | simple_alloc_init(_end, memsize64 - (unsigned long)_end, 32, 64); | ||
80 | |||
81 | /* prepare the device tree and find the console */ | ||
82 | fdt_init(_dtb_start); | ||
83 | serial_console_init(); | ||
84 | } | ||
diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c index 472e36605a52..097974e59fac 100644 --- a/arch/powerpc/boot/treeboot-walnut.c +++ b/arch/powerpc/boot/treeboot-walnut.c | |||
@@ -68,7 +68,7 @@ static void walnut_fixups(void) | |||
68 | ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); | 68 | ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); |
69 | ibm4xx_fixup_ebc_ranges("/plb/ebc"); | 69 | ibm4xx_fixup_ebc_ranges("/plb/ebc"); |
70 | walnut_flashsel_fixup(); | 70 | walnut_flashsel_fixup(); |
71 | dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF); | 71 | dt_fixup_mac_address_by_alias("ethernet0", (u8 *) WALNUT_OPENBIOS_MAC_OFF); |
72 | } | 72 | } |
73 | 73 | ||
74 | void platform_init(void) | 74 | void platform_init(void) |
diff --git a/arch/powerpc/boot/virtex405-head.S b/arch/powerpc/boot/virtex405-head.S new file mode 100644 index 000000000000..3edb13f94669 --- /dev/null +++ b/arch/powerpc/boot/virtex405-head.S | |||
@@ -0,0 +1,30 @@ | |||
1 | #include "ppc_asm.h" | ||
2 | |||
3 | .text | ||
4 | .global _zimage_start | ||
5 | _zimage_start: | ||
6 | |||
7 | /* PPC errata 213: needed by Virtex-4 FX */ | ||
8 | mfccr0 0 | ||
9 | oris 0,0,0x50000000@h | ||
10 | mtccr0 0 | ||
11 | |||
12 | /* | ||
13 | * Invalidate the data cache if the data cache is turned off. | ||
14 | * - The 405 core does not invalidate the data cache on power-up | ||
15 | * or reset but does turn off the data cache. We cannot assume | ||
16 | * that the cache contents are valid. | ||
17 | * - If the data cache is turned on this must have been done by | ||
18 | * a bootloader and we assume that the cache contents are | ||
19 | * valid. | ||
20 | */ | ||
21 | mfdccr r9 | ||
22 | cmplwi r9,0 | ||
23 | bne 2f | ||
24 | lis r9,0 | ||
25 | li r8,256 | ||
26 | mtctr r8 | ||
27 | 1: dccci r0,r9 | ||
28 | addi r9,r9,0x20 | ||
29 | bdnz 1b | ||
30 | 2: b _zimage_start_lib | ||
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 8f8b8494d62f..14a01823ba53 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -174,7 +174,7 @@ cuboot*) | |||
174 | *-mpc83*) | 174 | *-mpc83*) |
175 | platformo=$object/cuboot-83xx.o | 175 | platformo=$object/cuboot-83xx.o |
176 | ;; | 176 | ;; |
177 | *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555) | 177 | *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) |
178 | platformo=$object/cuboot-85xx-cpm2.o | 178 | platformo=$object/cuboot-85xx-cpm2.o |
179 | ;; | 179 | ;; |
180 | *-mpc85*|*-tqm8540|*-sbc85*) | 180 | *-mpc85*|*-tqm8540|*-sbc85*) |
@@ -199,6 +199,10 @@ adder875-redboot) | |||
199 | platformo="$object/fixed-head.o $object/redboot-8xx.o" | 199 | platformo="$object/fixed-head.o $object/redboot-8xx.o" |
200 | binary=y | 200 | binary=y |
201 | ;; | 201 | ;; |
202 | simpleboot-virtex405-*) | ||
203 | platformo="$object/virtex405-head.o $object/simpleboot.o" | ||
204 | binary=y | ||
205 | ;; | ||
202 | esac | 206 | esac |
203 | 207 | ||
204 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | 208 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" |
@@ -298,15 +302,16 @@ treeboot*) | |||
298 | exit 0 | 302 | exit 0 |
299 | ;; | 303 | ;; |
300 | ps3) | 304 | ps3) |
301 | # The ps3's loader supports loading gzipped binary images from flash | 305 | # The ps3's loader supports loading a gzipped binary image from flash |
302 | # rom to addr zero. The loader enters the image at addr 0x100. A | 306 | # rom to ram addr zero. The loader then enters the system reset |
303 | # bootwrapper overlay is use to arrange for the kernel to be loaded | 307 | # vector at addr 0x100. A bootwrapper overlay is used to arrange for |
304 | # to addr zero and to have a suitable bootwrapper entry at 0x100. | 308 | # a binary image of the kernel to be at addr zero, and yet have a |
305 | # To construct the rom image, 0x100 bytes from offset 0x100 in the | 309 | # suitable bootwrapper entry at 0x100. To construct the final rom |
306 | # kernel is copied to the bootwrapper symbol __system_reset_kernel. | 310 | # image 512 bytes from offset 0x100 is copied to the bootwrapper |
307 | # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is | 311 | # place holder at symbol __system_reset_kernel. The 512 bytes of the |
308 | # then copied to offset 0x100. At runtime the bootwrapper program | 312 | # bootwrapper entry code at symbol __system_reset_overlay is then |
309 | # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. | 313 | # copied to offset 0x100. At runtime the bootwrapper program copies |
314 | # the data at __system_reset_kernel back to addr 0x100. | ||
310 | 315 | ||
311 | system_reset_overlay=0x`${CROSS}nm "$ofile" \ | 316 | system_reset_overlay=0x`${CROSS}nm "$ofile" \ |
312 | | grep ' __system_reset_overlay$' \ | 317 | | grep ' __system_reset_overlay$' \ |
@@ -317,7 +322,7 @@ ps3) | |||
317 | | cut -d' ' -f1` | 322 | | cut -d' ' -f1` |
318 | system_reset_kernel=`printf "%d" $system_reset_kernel` | 323 | system_reset_kernel=`printf "%d" $system_reset_kernel` |
319 | overlay_dest="256" | 324 | overlay_dest="256" |
320 | overlay_size="256" | 325 | overlay_size="512" |
321 | 326 | ||
322 | ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" | 327 | ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" |
323 | 328 | ||
diff --git a/arch/powerpc/configs/canyonlands_defconfig b/arch/powerpc/configs/canyonlands_defconfig new file mode 100644 index 000000000000..a3b763c45ec6 --- /dev/null +++ b/arch/powerpc/configs/canyonlands_defconfig | |||
@@ -0,0 +1,721 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25-rc1 | ||
4 | # Thu Feb 21 14:29:28 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | CONFIG_44x=y | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | CONFIG_4xx=y | ||
19 | CONFIG_BOOKE=y | ||
20 | CONFIG_PTE_64BIT=y | ||
21 | CONFIG_PHYS_64BIT=y | ||
22 | # CONFIG_PPC_MM_SLICES is not set | ||
23 | CONFIG_NOT_COHERENT_CACHE=y | ||
24 | CONFIG_PPC32=y | ||
25 | CONFIG_WORD_SIZE=32 | ||
26 | CONFIG_PPC_MERGE=y | ||
27 | CONFIG_MMU=y | ||
28 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
29 | CONFIG_GENERIC_TIME=y | ||
30 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
31 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
32 | CONFIG_GENERIC_HARDIRQS=y | ||
33 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
34 | CONFIG_IRQ_PER_CPU=y | ||
35 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
36 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
37 | CONFIG_GENERIC_HWEIGHT=y | ||
38 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
39 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
40 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
41 | CONFIG_PPC=y | ||
42 | CONFIG_EARLY_PRINTK=y | ||
43 | CONFIG_GENERIC_NVRAM=y | ||
44 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
45 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
46 | CONFIG_PPC_OF=y | ||
47 | CONFIG_OF=y | ||
48 | CONFIG_PPC_UDBG_16550=y | ||
49 | # CONFIG_GENERIC_TBSYNC is not set | ||
50 | CONFIG_AUDIT_ARCH=y | ||
51 | CONFIG_GENERIC_BUG=y | ||
52 | # CONFIG_DEFAULT_UIMAGE is not set | ||
53 | CONFIG_PPC_DCR_NATIVE=y | ||
54 | # CONFIG_PPC_DCR_MMIO is not set | ||
55 | CONFIG_PPC_DCR=y | ||
56 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_EXPERIMENTAL=y | ||
62 | CONFIG_BROKEN_ON_SMP=y | ||
63 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
64 | CONFIG_LOCALVERSION="" | ||
65 | CONFIG_LOCALVERSION_AUTO=y | ||
66 | CONFIG_SWAP=y | ||
67 | CONFIG_SYSVIPC=y | ||
68 | CONFIG_SYSVIPC_SYSCTL=y | ||
69 | CONFIG_POSIX_MQUEUE=y | ||
70 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
71 | # CONFIG_TASKSTATS is not set | ||
72 | # CONFIG_AUDIT is not set | ||
73 | # CONFIG_IKCONFIG is not set | ||
74 | CONFIG_LOG_BUF_SHIFT=14 | ||
75 | # CONFIG_CGROUPS is not set | ||
76 | # CONFIG_FAIR_GROUP_SCHED is not set | ||
77 | CONFIG_SYSFS_DEPRECATED=y | ||
78 | # CONFIG_RELAY is not set | ||
79 | # CONFIG_NAMESPACES is not set | ||
80 | CONFIG_BLK_DEV_INITRD=y | ||
81 | CONFIG_INITRAMFS_SOURCE="" | ||
82 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
83 | CONFIG_SYSCTL=y | ||
84 | CONFIG_EMBEDDED=y | ||
85 | CONFIG_SYSCTL_SYSCALL=y | ||
86 | CONFIG_KALLSYMS=y | ||
87 | # CONFIG_KALLSYMS_ALL is not set | ||
88 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
89 | CONFIG_HOTPLUG=y | ||
90 | CONFIG_PRINTK=y | ||
91 | # CONFIG_LOGBUFFER is not set | ||
92 | CONFIG_BUG=y | ||
93 | CONFIG_ELF_CORE=y | ||
94 | CONFIG_COMPAT_BRK=y | ||
95 | CONFIG_BASE_FULL=y | ||
96 | CONFIG_FUTEX=y | ||
97 | CONFIG_ANON_INODES=y | ||
98 | CONFIG_EPOLL=y | ||
99 | CONFIG_SIGNALFD=y | ||
100 | CONFIG_TIMERFD=y | ||
101 | CONFIG_EVENTFD=y | ||
102 | CONFIG_SHMEM=y | ||
103 | CONFIG_VM_EVENT_COUNTERS=y | ||
104 | CONFIG_SLUB_DEBUG=y | ||
105 | # CONFIG_SLAB is not set | ||
106 | CONFIG_SLUB=y | ||
107 | # CONFIG_SLOB is not set | ||
108 | # CONFIG_PROFILING is not set | ||
109 | # CONFIG_MARKERS is not set | ||
110 | CONFIG_HAVE_OPROFILE=y | ||
111 | # CONFIG_KPROBES is not set | ||
112 | CONFIG_HAVE_KPROBES=y | ||
113 | CONFIG_PROC_PAGE_MONITOR=y | ||
114 | CONFIG_SLABINFO=y | ||
115 | CONFIG_RT_MUTEXES=y | ||
116 | # CONFIG_TINY_SHMEM is not set | ||
117 | CONFIG_BASE_SMALL=0 | ||
118 | CONFIG_MODULES=y | ||
119 | CONFIG_MODULE_UNLOAD=y | ||
120 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
121 | # CONFIG_MODVERSIONS is not set | ||
122 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
123 | CONFIG_KMOD=y | ||
124 | CONFIG_BLOCK=y | ||
125 | CONFIG_LBD=y | ||
126 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
127 | # CONFIG_LSF is not set | ||
128 | # CONFIG_BLK_DEV_BSG is not set | ||
129 | |||
130 | # | ||
131 | # IO Schedulers | ||
132 | # | ||
133 | CONFIG_IOSCHED_NOOP=y | ||
134 | CONFIG_IOSCHED_AS=y | ||
135 | CONFIG_IOSCHED_DEADLINE=y | ||
136 | CONFIG_IOSCHED_CFQ=y | ||
137 | CONFIG_DEFAULT_AS=y | ||
138 | # CONFIG_DEFAULT_DEADLINE is not set | ||
139 | # CONFIG_DEFAULT_CFQ is not set | ||
140 | # CONFIG_DEFAULT_NOOP is not set | ||
141 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
142 | CONFIG_CLASSIC_RCU=y | ||
143 | # CONFIG_PREEMPT_RCU is not set | ||
144 | CONFIG_PPC4xx_PCI_EXPRESS=y | ||
145 | |||
146 | # | ||
147 | # Platform support | ||
148 | # | ||
149 | # CONFIG_PPC_MPC512x is not set | ||
150 | # CONFIG_PPC_MPC5121 is not set | ||
151 | # CONFIG_PPC_CELL is not set | ||
152 | # CONFIG_PPC_CELL_NATIVE is not set | ||
153 | # CONFIG_PQ2ADS is not set | ||
154 | # CONFIG_BAMBOO is not set | ||
155 | # CONFIG_EBONY is not set | ||
156 | # CONFIG_SEQUOIA is not set | ||
157 | # CONFIG_TAISHAN is not set | ||
158 | # CONFIG_KATMAI is not set | ||
159 | # CONFIG_RAINIER is not set | ||
160 | # CONFIG_WARP is not set | ||
161 | CONFIG_CANYONLANDS=y | ||
162 | CONFIG_460EX=y | ||
163 | # CONFIG_IPIC is not set | ||
164 | # CONFIG_MPIC is not set | ||
165 | # CONFIG_MPIC_WEIRD is not set | ||
166 | # CONFIG_PPC_I8259 is not set | ||
167 | # CONFIG_PPC_RTAS is not set | ||
168 | # CONFIG_MMIO_NVRAM is not set | ||
169 | # CONFIG_PPC_MPC106 is not set | ||
170 | # CONFIG_PPC_970_NAP is not set | ||
171 | # CONFIG_PPC_INDIRECT_IO is not set | ||
172 | # CONFIG_GENERIC_IOMAP is not set | ||
173 | # CONFIG_CPU_FREQ is not set | ||
174 | # CONFIG_FSL_ULI1575 is not set | ||
175 | |||
176 | # | ||
177 | # Kernel options | ||
178 | # | ||
179 | # CONFIG_HIGHMEM is not set | ||
180 | CONFIG_TICK_ONESHOT=y | ||
181 | CONFIG_NO_HZ=y | ||
182 | CONFIG_HIGH_RES_TIMERS=y | ||
183 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
184 | # CONFIG_HZ_100 is not set | ||
185 | CONFIG_HZ_250=y | ||
186 | # CONFIG_HZ_300 is not set | ||
187 | # CONFIG_HZ_1000 is not set | ||
188 | CONFIG_HZ=250 | ||
189 | # CONFIG_SCHED_HRTICK is not set | ||
190 | CONFIG_PREEMPT_NONE=y | ||
191 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
192 | # CONFIG_PREEMPT is not set | ||
193 | CONFIG_RCU_TRACE=y | ||
194 | CONFIG_BINFMT_ELF=y | ||
195 | # CONFIG_BINFMT_MISC is not set | ||
196 | # CONFIG_MATH_EMULATION is not set | ||
197 | # CONFIG_IOMMU_HELPER is not set | ||
198 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
199 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
200 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
201 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
202 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
203 | CONFIG_SELECT_MEMORY_MODEL=y | ||
204 | CONFIG_FLATMEM_MANUAL=y | ||
205 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
206 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
207 | CONFIG_FLATMEM=y | ||
208 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
209 | # CONFIG_SPARSEMEM_STATIC is not set | ||
210 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
211 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
212 | CONFIG_RESOURCES_64BIT=y | ||
213 | CONFIG_ZONE_DMA_FLAG=1 | ||
214 | CONFIG_BOUNCE=y | ||
215 | CONFIG_VIRT_TO_BUS=y | ||
216 | CONFIG_PROC_DEVICETREE=y | ||
217 | CONFIG_CMDLINE_BOOL=y | ||
218 | CONFIG_CMDLINE="" | ||
219 | CONFIG_SECCOMP=y | ||
220 | CONFIG_WANT_DEVICE_TREE=y | ||
221 | CONFIG_ISA_DMA_API=y | ||
222 | |||
223 | # | ||
224 | # Bus options | ||
225 | # | ||
226 | CONFIG_ZONE_DMA=y | ||
227 | CONFIG_PPC_INDIRECT_PCI=y | ||
228 | CONFIG_PCI=y | ||
229 | CONFIG_PCI_DOMAINS=y | ||
230 | CONFIG_PCI_SYSCALL=y | ||
231 | # CONFIG_PCIEPORTBUS is not set | ||
232 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
233 | # CONFIG_PCI_MSI is not set | ||
234 | CONFIG_PCI_LEGACY=y | ||
235 | # CONFIG_PCI_DEBUG is not set | ||
236 | # CONFIG_PCCARD is not set | ||
237 | # CONFIG_HOTPLUG_PCI is not set | ||
238 | |||
239 | # | ||
240 | # Advanced setup | ||
241 | # | ||
242 | # CONFIG_ADVANCED_OPTIONS is not set | ||
243 | |||
244 | # | ||
245 | # Default settings for advanced configuration options are used | ||
246 | # | ||
247 | CONFIG_HIGHMEM_START=0xfe000000 | ||
248 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
249 | CONFIG_KERNEL_START=0xc0000000 | ||
250 | CONFIG_TASK_SIZE=0xc0000000 | ||
251 | CONFIG_CONSISTENT_START=0xff100000 | ||
252 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
253 | CONFIG_BOOT_LOAD=0x01000000 | ||
254 | |||
255 | # | ||
256 | # Networking | ||
257 | # | ||
258 | CONFIG_NET=y | ||
259 | |||
260 | # | ||
261 | # Networking options | ||
262 | # | ||
263 | CONFIG_PACKET=y | ||
264 | # CONFIG_PACKET_MMAP is not set | ||
265 | CONFIG_UNIX=y | ||
266 | # CONFIG_NET_KEY is not set | ||
267 | CONFIG_INET=y | ||
268 | # CONFIG_IP_MULTICAST is not set | ||
269 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
270 | CONFIG_IP_FIB_HASH=y | ||
271 | CONFIG_IP_PNP=y | ||
272 | CONFIG_IP_PNP_DHCP=y | ||
273 | CONFIG_IP_PNP_BOOTP=y | ||
274 | # CONFIG_IP_PNP_RARP is not set | ||
275 | # CONFIG_NET_IPIP is not set | ||
276 | # CONFIG_NET_IPGRE is not set | ||
277 | # CONFIG_ARPD is not set | ||
278 | # CONFIG_SYN_COOKIES is not set | ||
279 | # CONFIG_INET_AH is not set | ||
280 | # CONFIG_INET_ESP is not set | ||
281 | # CONFIG_INET_IPCOMP is not set | ||
282 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
283 | # CONFIG_INET_TUNNEL is not set | ||
284 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
285 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
286 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
287 | # CONFIG_INET_LRO is not set | ||
288 | CONFIG_INET_DIAG=y | ||
289 | CONFIG_INET_TCP_DIAG=y | ||
290 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
291 | CONFIG_TCP_CONG_CUBIC=y | ||
292 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
293 | # CONFIG_TCP_MD5SIG is not set | ||
294 | # CONFIG_IPV6 is not set | ||
295 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
296 | # CONFIG_INET6_TUNNEL is not set | ||
297 | # CONFIG_NETWORK_SECMARK is not set | ||
298 | # CONFIG_NETFILTER is not set | ||
299 | # CONFIG_IP_DCCP is not set | ||
300 | # CONFIG_IP_SCTP is not set | ||
301 | # CONFIG_TIPC is not set | ||
302 | # CONFIG_ATM is not set | ||
303 | # CONFIG_BRIDGE is not set | ||
304 | # CONFIG_VLAN_8021Q is not set | ||
305 | # CONFIG_DECNET is not set | ||
306 | # CONFIG_LLC2 is not set | ||
307 | # CONFIG_IPX is not set | ||
308 | # CONFIG_ATALK is not set | ||
309 | # CONFIG_X25 is not set | ||
310 | # CONFIG_LAPB is not set | ||
311 | # CONFIG_ECONET is not set | ||
312 | # CONFIG_WAN_ROUTER is not set | ||
313 | # CONFIG_NET_SCHED is not set | ||
314 | |||
315 | # | ||
316 | # Network testing | ||
317 | # | ||
318 | # CONFIG_NET_PKTGEN is not set | ||
319 | # CONFIG_HAMRADIO is not set | ||
320 | # CONFIG_CAN is not set | ||
321 | # CONFIG_IRDA is not set | ||
322 | # CONFIG_BT is not set | ||
323 | # CONFIG_AF_RXRPC is not set | ||
324 | |||
325 | # | ||
326 | # Wireless | ||
327 | # | ||
328 | # CONFIG_CFG80211 is not set | ||
329 | # CONFIG_WIRELESS_EXT is not set | ||
330 | # CONFIG_MAC80211 is not set | ||
331 | # CONFIG_IEEE80211 is not set | ||
332 | # CONFIG_RFKILL is not set | ||
333 | # CONFIG_NET_9P is not set | ||
334 | |||
335 | # | ||
336 | # Device Drivers | ||
337 | # | ||
338 | |||
339 | # | ||
340 | # Generic Driver Options | ||
341 | # | ||
342 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
343 | CONFIG_STANDALONE=y | ||
344 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
345 | CONFIG_FW_LOADER=y | ||
346 | # CONFIG_DEBUG_DRIVER is not set | ||
347 | # CONFIG_DEBUG_DEVRES is not set | ||
348 | # CONFIG_SYS_HYPERVISOR is not set | ||
349 | CONFIG_CONNECTOR=y | ||
350 | CONFIG_PROC_EVENTS=y | ||
351 | # CONFIG_MTD is not set | ||
352 | CONFIG_OF_DEVICE=y | ||
353 | # CONFIG_PARPORT is not set | ||
354 | CONFIG_BLK_DEV=y | ||
355 | # CONFIG_BLK_DEV_FD is not set | ||
356 | # CONFIG_BLK_CPQ_DA is not set | ||
357 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
358 | # CONFIG_BLK_DEV_DAC960 is not set | ||
359 | # CONFIG_BLK_DEV_UMEM is not set | ||
360 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
361 | # CONFIG_BLK_DEV_LOOP is not set | ||
362 | # CONFIG_BLK_DEV_NBD is not set | ||
363 | # CONFIG_BLK_DEV_SX8 is not set | ||
364 | CONFIG_BLK_DEV_RAM=y | ||
365 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
366 | CONFIG_BLK_DEV_RAM_SIZE=35000 | ||
367 | # CONFIG_BLK_DEV_XIP is not set | ||
368 | # CONFIG_CDROM_PKTCDVD is not set | ||
369 | # CONFIG_ATA_OVER_ETH is not set | ||
370 | # CONFIG_XILINX_SYSACE is not set | ||
371 | # CONFIG_MISC_DEVICES is not set | ||
372 | CONFIG_HAVE_IDE=y | ||
373 | # CONFIG_IDE is not set | ||
374 | |||
375 | # | ||
376 | # SCSI device support | ||
377 | # | ||
378 | # CONFIG_RAID_ATTRS is not set | ||
379 | # CONFIG_SCSI is not set | ||
380 | # CONFIG_SCSI_DMA is not set | ||
381 | # CONFIG_SCSI_NETLINK is not set | ||
382 | # CONFIG_ATA is not set | ||
383 | # CONFIG_MD is not set | ||
384 | # CONFIG_FUSION is not set | ||
385 | |||
386 | # | ||
387 | # IEEE 1394 (FireWire) support | ||
388 | # | ||
389 | # CONFIG_FIREWIRE is not set | ||
390 | # CONFIG_IEEE1394 is not set | ||
391 | # CONFIG_I2O is not set | ||
392 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
393 | CONFIG_NETDEVICES=y | ||
394 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
395 | # CONFIG_DUMMY is not set | ||
396 | # CONFIG_BONDING is not set | ||
397 | # CONFIG_MACVLAN is not set | ||
398 | # CONFIG_EQUALIZER is not set | ||
399 | # CONFIG_TUN is not set | ||
400 | # CONFIG_VETH is not set | ||
401 | # CONFIG_ARCNET is not set | ||
402 | # CONFIG_PHYLIB is not set | ||
403 | CONFIG_NET_ETHERNET=y | ||
404 | # CONFIG_MII is not set | ||
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 | # CONFIG_NET_TULIP is not set | ||
410 | # CONFIG_HP100 is not set | ||
411 | CONFIG_IBM_NEW_EMAC=y | ||
412 | CONFIG_IBM_NEW_EMAC_RXB=256 | ||
413 | CONFIG_IBM_NEW_EMAC_TXB=256 | ||
414 | CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32 | ||
415 | CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256 | ||
416 | CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0 | ||
417 | # CONFIG_IBM_NEW_EMAC_DEBUG is not set | ||
418 | CONFIG_IBM_NEW_EMAC_ZMII=y | ||
419 | CONFIG_IBM_NEW_EMAC_RGMII=y | ||
420 | CONFIG_IBM_NEW_EMAC_TAH=y | ||
421 | CONFIG_IBM_NEW_EMAC_EMAC4=y | ||
422 | # CONFIG_NET_PCI is not set | ||
423 | # CONFIG_B44 is not set | ||
424 | # CONFIG_NETDEV_1000 is not set | ||
425 | # CONFIG_NETDEV_10000 is not set | ||
426 | # CONFIG_TR is not set | ||
427 | |||
428 | # | ||
429 | # Wireless LAN | ||
430 | # | ||
431 | # CONFIG_WLAN_PRE80211 is not set | ||
432 | # CONFIG_WLAN_80211 is not set | ||
433 | # CONFIG_WAN is not set | ||
434 | # CONFIG_FDDI is not set | ||
435 | # CONFIG_HIPPI is not set | ||
436 | # CONFIG_PPP is not set | ||
437 | # CONFIG_SLIP is not set | ||
438 | # CONFIG_NETCONSOLE is not set | ||
439 | # CONFIG_NETPOLL is not set | ||
440 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
441 | # CONFIG_ISDN is not set | ||
442 | # CONFIG_PHONE is not set | ||
443 | |||
444 | # | ||
445 | # Input device support | ||
446 | # | ||
447 | # CONFIG_INPUT is not set | ||
448 | |||
449 | # | ||
450 | # Hardware I/O ports | ||
451 | # | ||
452 | # CONFIG_SERIO is not set | ||
453 | # CONFIG_GAMEPORT is not set | ||
454 | |||
455 | # | ||
456 | # Character devices | ||
457 | # | ||
458 | # CONFIG_VT is not set | ||
459 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
460 | # CONFIG_NOZOMI is not set | ||
461 | |||
462 | # | ||
463 | # Serial drivers | ||
464 | # | ||
465 | CONFIG_SERIAL_8250=y | ||
466 | CONFIG_SERIAL_8250_CONSOLE=y | ||
467 | # CONFIG_SERIAL_8250_PCI is not set | ||
468 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
469 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
470 | CONFIG_SERIAL_8250_EXTENDED=y | ||
471 | # CONFIG_SERIAL_8250_MANY_PORTS is not set | ||
472 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
473 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
474 | # CONFIG_SERIAL_8250_RSA is not set | ||
475 | |||
476 | # | ||
477 | # Non-8250 serial port support | ||
478 | # | ||
479 | # CONFIG_SERIAL_UARTLITE is not set | ||
480 | CONFIG_SERIAL_CORE=y | ||
481 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
482 | # CONFIG_SERIAL_JSM is not set | ||
483 | CONFIG_SERIAL_OF_PLATFORM=y | ||
484 | CONFIG_UNIX98_PTYS=y | ||
485 | CONFIG_LEGACY_PTYS=y | ||
486 | CONFIG_LEGACY_PTY_COUNT=256 | ||
487 | # CONFIG_IPMI_HANDLER is not set | ||
488 | # CONFIG_HW_RANDOM is not set | ||
489 | # CONFIG_NVRAM is not set | ||
490 | # CONFIG_GEN_RTC is not set | ||
491 | # CONFIG_R3964 is not set | ||
492 | # CONFIG_APPLICOM is not set | ||
493 | # CONFIG_RAW_DRIVER is not set | ||
494 | # CONFIG_TCG_TPM is not set | ||
495 | CONFIG_DEVPORT=y | ||
496 | # CONFIG_I2C is not set | ||
497 | |||
498 | # | ||
499 | # SPI support | ||
500 | # | ||
501 | # CONFIG_SPI is not set | ||
502 | # CONFIG_SPI_MASTER is not set | ||
503 | # CONFIG_W1 is not set | ||
504 | # CONFIG_POWER_SUPPLY is not set | ||
505 | # CONFIG_HWMON is not set | ||
506 | # CONFIG_THERMAL is not set | ||
507 | # CONFIG_WATCHDOG is not set | ||
508 | |||
509 | # | ||
510 | # Sonics Silicon Backplane | ||
511 | # | ||
512 | CONFIG_SSB_POSSIBLE=y | ||
513 | # CONFIG_SSB is not set | ||
514 | |||
515 | # | ||
516 | # Multifunction device drivers | ||
517 | # | ||
518 | # CONFIG_MFD_SM501 is not set | ||
519 | |||
520 | # | ||
521 | # Multimedia devices | ||
522 | # | ||
523 | # CONFIG_VIDEO_DEV is not set | ||
524 | # CONFIG_DVB_CORE is not set | ||
525 | CONFIG_DAB=y | ||
526 | |||
527 | # | ||
528 | # Graphics support | ||
529 | # | ||
530 | # CONFIG_AGP is not set | ||
531 | # CONFIG_DRM is not set | ||
532 | # CONFIG_VGASTATE is not set | ||
533 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
534 | # CONFIG_FB is not set | ||
535 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
536 | |||
537 | # | ||
538 | # Display device support | ||
539 | # | ||
540 | # CONFIG_DISPLAY_SUPPORT is not set | ||
541 | |||
542 | # | ||
543 | # Sound | ||
544 | # | ||
545 | # CONFIG_SOUND is not set | ||
546 | # CONFIG_USB_SUPPORT is not set | ||
547 | # CONFIG_MMC is not set | ||
548 | # CONFIG_MEMSTICK is not set | ||
549 | # CONFIG_NEW_LEDS is not set | ||
550 | # CONFIG_INFINIBAND is not set | ||
551 | # CONFIG_EDAC is not set | ||
552 | # CONFIG_RTC_CLASS is not set | ||
553 | |||
554 | # | ||
555 | # Userspace I/O | ||
556 | # | ||
557 | # CONFIG_UIO is not set | ||
558 | |||
559 | # | ||
560 | # File systems | ||
561 | # | ||
562 | CONFIG_EXT2_FS=y | ||
563 | # CONFIG_EXT2_FS_XATTR is not set | ||
564 | # CONFIG_EXT2_FS_XIP is not set | ||
565 | # CONFIG_EXT3_FS is not set | ||
566 | # CONFIG_EXT4DEV_FS is not set | ||
567 | # CONFIG_REISERFS_FS is not set | ||
568 | # CONFIG_JFS_FS is not set | ||
569 | # CONFIG_FS_POSIX_ACL is not set | ||
570 | # CONFIG_XFS_FS is not set | ||
571 | # CONFIG_GFS2_FS is not set | ||
572 | # CONFIG_OCFS2_FS is not set | ||
573 | CONFIG_DNOTIFY=y | ||
574 | CONFIG_INOTIFY=y | ||
575 | CONFIG_INOTIFY_USER=y | ||
576 | # CONFIG_QUOTA is not set | ||
577 | # CONFIG_AUTOFS_FS is not set | ||
578 | # CONFIG_AUTOFS4_FS is not set | ||
579 | # CONFIG_FUSE_FS is not set | ||
580 | |||
581 | # | ||
582 | # CD-ROM/DVD Filesystems | ||
583 | # | ||
584 | # CONFIG_ISO9660_FS is not set | ||
585 | # CONFIG_UDF_FS is not set | ||
586 | |||
587 | # | ||
588 | # DOS/FAT/NT Filesystems | ||
589 | # | ||
590 | # CONFIG_MSDOS_FS is not set | ||
591 | # CONFIG_VFAT_FS is not set | ||
592 | # CONFIG_NTFS_FS is not set | ||
593 | |||
594 | # | ||
595 | # Pseudo filesystems | ||
596 | # | ||
597 | CONFIG_PROC_FS=y | ||
598 | CONFIG_PROC_KCORE=y | ||
599 | CONFIG_PROC_SYSCTL=y | ||
600 | CONFIG_SYSFS=y | ||
601 | CONFIG_TMPFS=y | ||
602 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
603 | # CONFIG_HUGETLB_PAGE is not set | ||
604 | # CONFIG_CONFIGFS_FS is not set | ||
605 | |||
606 | # | ||
607 | # Miscellaneous filesystems | ||
608 | # | ||
609 | # CONFIG_ADFS_FS is not set | ||
610 | # CONFIG_AFFS_FS is not set | ||
611 | # CONFIG_HFS_FS is not set | ||
612 | # CONFIG_HFSPLUS_FS is not set | ||
613 | # CONFIG_BEFS_FS is not set | ||
614 | # CONFIG_BFS_FS is not set | ||
615 | # CONFIG_EFS_FS is not set | ||
616 | CONFIG_CRAMFS=y | ||
617 | # CONFIG_VXFS_FS is not set | ||
618 | # CONFIG_MINIX_FS is not set | ||
619 | # CONFIG_HPFS_FS is not set | ||
620 | # CONFIG_QNX4FS_FS is not set | ||
621 | # CONFIG_ROMFS_FS is not set | ||
622 | # CONFIG_SYSV_FS is not set | ||
623 | # CONFIG_UFS_FS is not set | ||
624 | CONFIG_NETWORK_FILESYSTEMS=y | ||
625 | CONFIG_NFS_FS=y | ||
626 | CONFIG_NFS_V3=y | ||
627 | # CONFIG_NFS_V3_ACL is not set | ||
628 | # CONFIG_NFS_V4 is not set | ||
629 | # CONFIG_NFS_DIRECTIO is not set | ||
630 | # CONFIG_NFSD is not set | ||
631 | CONFIG_ROOT_NFS=y | ||
632 | CONFIG_LOCKD=y | ||
633 | CONFIG_LOCKD_V4=y | ||
634 | CONFIG_NFS_COMMON=y | ||
635 | CONFIG_SUNRPC=y | ||
636 | # CONFIG_SUNRPC_BIND34 is not set | ||
637 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
638 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
639 | # CONFIG_SMB_FS is not set | ||
640 | # CONFIG_CIFS is not set | ||
641 | # CONFIG_NCP_FS is not set | ||
642 | # CONFIG_CODA_FS is not set | ||
643 | # CONFIG_AFS_FS is not set | ||
644 | |||
645 | # | ||
646 | # Partition Types | ||
647 | # | ||
648 | # CONFIG_PARTITION_ADVANCED is not set | ||
649 | CONFIG_MSDOS_PARTITION=y | ||
650 | # CONFIG_NLS is not set | ||
651 | # CONFIG_DLM is not set | ||
652 | |||
653 | # | ||
654 | # Library routines | ||
655 | # | ||
656 | CONFIG_BITREVERSE=y | ||
657 | # CONFIG_CRC_CCITT is not set | ||
658 | # CONFIG_CRC16 is not set | ||
659 | # CONFIG_CRC_ITU_T is not set | ||
660 | CONFIG_CRC32=y | ||
661 | # CONFIG_CRC7 is not set | ||
662 | # CONFIG_LIBCRC32C is not set | ||
663 | CONFIG_ZLIB_INFLATE=y | ||
664 | CONFIG_PLIST=y | ||
665 | CONFIG_HAS_IOMEM=y | ||
666 | CONFIG_HAS_IOPORT=y | ||
667 | CONFIG_HAS_DMA=y | ||
668 | |||
669 | # | ||
670 | # Kernel hacking | ||
671 | # | ||
672 | # CONFIG_PRINTK_TIME is not set | ||
673 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
674 | CONFIG_ENABLE_MUST_CHECK=y | ||
675 | CONFIG_MAGIC_SYSRQ=y | ||
676 | # CONFIG_UNUSED_SYMBOLS is not set | ||
677 | CONFIG_DEBUG_FS=y | ||
678 | # CONFIG_HEADERS_CHECK is not set | ||
679 | CONFIG_DEBUG_KERNEL=y | ||
680 | # CONFIG_DEBUG_SHIRQ is not set | ||
681 | CONFIG_DETECT_SOFTLOCKUP=y | ||
682 | CONFIG_SCHED_DEBUG=y | ||
683 | # CONFIG_SCHEDSTATS is not set | ||
684 | # CONFIG_TIMER_STATS is not set | ||
685 | # CONFIG_SLUB_DEBUG_ON is not set | ||
686 | # CONFIG_SLUB_STATS is not set | ||
687 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
688 | # CONFIG_RT_MUTEX_TESTER is not set | ||
689 | # CONFIG_DEBUG_SPINLOCK is not set | ||
690 | # CONFIG_DEBUG_MUTEXES is not set | ||
691 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
692 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
693 | # CONFIG_DEBUG_KOBJECT is not set | ||
694 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
695 | # CONFIG_DEBUG_INFO is not set | ||
696 | # CONFIG_DEBUG_VM is not set | ||
697 | # CONFIG_DEBUG_LIST is not set | ||
698 | # CONFIG_DEBUG_SG is not set | ||
699 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
700 | # CONFIG_RCU_TORTURE_TEST is not set | ||
701 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
702 | # CONFIG_FAULT_INJECTION is not set | ||
703 | # CONFIG_SAMPLES is not set | ||
704 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
705 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
706 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
707 | CONFIG_DEBUGGER=y | ||
708 | # CONFIG_KGDB is not set | ||
709 | # CONFIG_XMON is not set | ||
710 | # CONFIG_VIRQ_DEBUG is not set | ||
711 | # CONFIG_BDI_SWITCH is not set | ||
712 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
713 | |||
714 | # | ||
715 | # Security options | ||
716 | # | ||
717 | # CONFIG_KEYS is not set | ||
718 | # CONFIG_SECURITY is not set | ||
719 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
720 | # CONFIG_CRYPTO is not set | ||
721 | # CONFIG_PPC_CLOCK is not set | ||
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig index 38b85b211c38..d7fd298bd234 100644 --- a/arch/powerpc/configs/chrp32_defconfig +++ b/arch/powerpc/configs/chrp32_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.25-rc6 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Thu Mar 20 10:33:36 2008 | 4 | # Thu Mar 27 13:55:37 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -74,8 +74,6 @@ CONFIG_IKCONFIG_PROC=y | |||
74 | CONFIG_LOG_BUF_SHIFT=15 | 74 | CONFIG_LOG_BUF_SHIFT=15 |
75 | # CONFIG_CGROUPS is not set | 75 | # CONFIG_CGROUPS is not set |
76 | # CONFIG_GROUP_SCHED is not set | 76 | # CONFIG_GROUP_SCHED is not set |
77 | # CONFIG_USER_SCHED is not set | ||
78 | # CONFIG_CGROUP_SCHED is not set | ||
79 | CONFIG_SYSFS_DEPRECATED=y | 77 | CONFIG_SYSFS_DEPRECATED=y |
80 | CONFIG_SYSFS_DEPRECATED_V2=y | 78 | CONFIG_SYSFS_DEPRECATED_V2=y |
81 | # CONFIG_RELAY is not set | 79 | # CONFIG_RELAY is not set |
@@ -243,7 +241,7 @@ CONFIG_PCI_SYSCALL=y | |||
243 | # CONFIG_PCIEPORTBUS is not set | 241 | # CONFIG_PCIEPORTBUS is not set |
244 | CONFIG_ARCH_SUPPORTS_MSI=y | 242 | CONFIG_ARCH_SUPPORTS_MSI=y |
245 | # CONFIG_PCI_MSI is not set | 243 | # CONFIG_PCI_MSI is not set |
246 | CONFIG_PCI_LEGACY=y | 244 | # CONFIG_PCI_LEGACY is not set |
247 | # CONFIG_PCI_DEBUG is not set | 245 | # CONFIG_PCI_DEBUG is not set |
248 | # CONFIG_PCCARD is not set | 246 | # CONFIG_PCCARD is not set |
249 | # CONFIG_HOTPLUG_PCI is not set | 247 | # CONFIG_HOTPLUG_PCI is not set |
@@ -1328,6 +1326,7 @@ CONFIG_PLIST=y | |||
1328 | CONFIG_HAS_IOMEM=y | 1326 | CONFIG_HAS_IOMEM=y |
1329 | CONFIG_HAS_IOPORT=y | 1327 | CONFIG_HAS_IOPORT=y |
1330 | CONFIG_HAS_DMA=y | 1328 | CONFIG_HAS_DMA=y |
1329 | CONFIG_HAVE_LMB=y | ||
1331 | 1330 | ||
1332 | # | 1331 | # |
1333 | # Kernel hacking | 1332 | # Kernel hacking |
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index 0f82f66a60f8..a20501f89474 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_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.25-rc6 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Thu Mar 20 10:36:41 2008 | 4 | # Thu Mar 27 13:55:43 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -77,8 +77,6 @@ CONFIG_IKCONFIG_PROC=y | |||
77 | CONFIG_LOG_BUF_SHIFT=17 | 77 | CONFIG_LOG_BUF_SHIFT=17 |
78 | # CONFIG_CGROUPS is not set | 78 | # CONFIG_CGROUPS is not set |
79 | # CONFIG_GROUP_SCHED is not set | 79 | # CONFIG_GROUP_SCHED is not set |
80 | # CONFIG_USER_SCHED is not set | ||
81 | # CONFIG_CGROUP_SCHED is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 80 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 81 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 82 | # CONFIG_RELAY is not set |
@@ -276,7 +274,7 @@ CONFIG_PCI_SYSCALL=y | |||
276 | # CONFIG_PCIEPORTBUS is not set | 274 | # CONFIG_PCIEPORTBUS is not set |
277 | CONFIG_ARCH_SUPPORTS_MSI=y | 275 | CONFIG_ARCH_SUPPORTS_MSI=y |
278 | CONFIG_PCI_MSI=y | 276 | CONFIG_PCI_MSI=y |
279 | CONFIG_PCI_LEGACY=y | 277 | # CONFIG_PCI_LEGACY is not set |
280 | # CONFIG_PCI_DEBUG is not set | 278 | # CONFIG_PCI_DEBUG is not set |
281 | # CONFIG_PCCARD is not set | 279 | # CONFIG_PCCARD is not set |
282 | # CONFIG_HOTPLUG_PCI is not set | 280 | # CONFIG_HOTPLUG_PCI is not set |
@@ -1596,6 +1594,7 @@ CONFIG_PLIST=y | |||
1596 | CONFIG_HAS_IOMEM=y | 1594 | CONFIG_HAS_IOMEM=y |
1597 | CONFIG_HAS_IOPORT=y | 1595 | CONFIG_HAS_IOPORT=y |
1598 | CONFIG_HAS_DMA=y | 1596 | CONFIG_HAS_DMA=y |
1597 | CONFIG_HAVE_LMB=y | ||
1599 | 1598 | ||
1600 | # | 1599 | # |
1601 | # Kernel hacking | 1600 | # Kernel hacking |
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig index 8d9a84f50157..b3128fb7ce7e 100644 --- a/arch/powerpc/configs/iseries_defconfig +++ b/arch/powerpc/configs/iseries_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.25-rc6 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Thu Mar 20 10:43:46 2008 | 4 | # Thu Mar 27 13:55:45 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -77,8 +77,6 @@ CONFIG_IKCONFIG_PROC=y | |||
77 | CONFIG_LOG_BUF_SHIFT=17 | 77 | CONFIG_LOG_BUF_SHIFT=17 |
78 | # CONFIG_CGROUPS is not set | 78 | # CONFIG_CGROUPS is not set |
79 | # CONFIG_GROUP_SCHED is not set | 79 | # CONFIG_GROUP_SCHED is not set |
80 | # CONFIG_USER_SCHED is not set | ||
81 | # CONFIG_CGROUP_SCHED is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 80 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 81 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 82 | # CONFIG_RELAY is not set |
@@ -261,7 +259,7 @@ CONFIG_PCI_SYSCALL=y | |||
261 | # CONFIG_PCIEPORTBUS is not set | 259 | # CONFIG_PCIEPORTBUS is not set |
262 | CONFIG_ARCH_SUPPORTS_MSI=y | 260 | CONFIG_ARCH_SUPPORTS_MSI=y |
263 | # CONFIG_PCI_MSI is not set | 261 | # CONFIG_PCI_MSI is not set |
264 | CONFIG_PCI_LEGACY=y | 262 | # CONFIG_PCI_LEGACY is not set |
265 | # CONFIG_PCI_DEBUG is not set | 263 | # CONFIG_PCI_DEBUG is not set |
266 | # CONFIG_PCCARD is not set | 264 | # CONFIG_PCCARD is not set |
267 | # CONFIG_HOTPLUG_PCI is not set | 265 | # CONFIG_HOTPLUG_PCI is not set |
@@ -1065,6 +1063,7 @@ CONFIG_PLIST=y | |||
1065 | CONFIG_HAS_IOMEM=y | 1063 | CONFIG_HAS_IOMEM=y |
1066 | CONFIG_HAS_IOPORT=y | 1064 | CONFIG_HAS_IOPORT=y |
1067 | CONFIG_HAS_DMA=y | 1065 | CONFIG_HAS_DMA=y |
1066 | CONFIG_HAVE_LMB=y | ||
1068 | 1067 | ||
1069 | # | 1068 | # |
1070 | # Kernel hacking | 1069 | # Kernel hacking |
diff --git a/arch/powerpc/configs/ksi8560_defconfig b/arch/powerpc/configs/ksi8560_defconfig new file mode 100644 index 000000000000..2d0debcefdbf --- /dev/null +++ b/arch/powerpc/configs/ksi8560_defconfig | |||
@@ -0,0 +1,899 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.24 | ||
4 | # Mon Feb 11 16:25:19 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | CONFIG_PPC_85xx=y | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_E500=y | ||
18 | CONFIG_BOOKE=y | ||
19 | CONFIG_FSL_BOOKE=y | ||
20 | CONFIG_FSL_EMB_PERFMON=y | ||
21 | # CONFIG_PHYS_64BIT is not set | ||
22 | CONFIG_SPE=y | ||
23 | # CONFIG_PPC_MM_SLICES is not set | ||
24 | CONFIG_PPC32=y | ||
25 | CONFIG_WORD_SIZE=32 | ||
26 | CONFIG_PPC_MERGE=y | ||
27 | CONFIG_MMU=y | ||
28 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
29 | CONFIG_GENERIC_TIME=y | ||
30 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
31 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
32 | CONFIG_GENERIC_HARDIRQS=y | ||
33 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
34 | CONFIG_IRQ_PER_CPU=y | ||
35 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
36 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
37 | CONFIG_GENERIC_HWEIGHT=y | ||
38 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
39 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
40 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
41 | CONFIG_PPC=y | ||
42 | CONFIG_EARLY_PRINTK=y | ||
43 | CONFIG_GENERIC_NVRAM=y | ||
44 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
45 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
46 | CONFIG_PPC_OF=y | ||
47 | CONFIG_OF=y | ||
48 | CONFIG_PPC_UDBG_16550=y | ||
49 | # CONFIG_GENERIC_TBSYNC is not set | ||
50 | CONFIG_AUDIT_ARCH=y | ||
51 | CONFIG_GENERIC_BUG=y | ||
52 | CONFIG_DEFAULT_UIMAGE=y | ||
53 | # CONFIG_PPC_DCR_NATIVE is not set | ||
54 | # CONFIG_PPC_DCR_MMIO is not set | ||
55 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
56 | |||
57 | # | ||
58 | # General setup | ||
59 | # | ||
60 | CONFIG_EXPERIMENTAL=y | ||
61 | CONFIG_BROKEN_ON_SMP=y | ||
62 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
63 | CONFIG_LOCALVERSION="" | ||
64 | CONFIG_LOCALVERSION_AUTO=y | ||
65 | CONFIG_SWAP=y | ||
66 | CONFIG_SYSVIPC=y | ||
67 | CONFIG_SYSVIPC_SYSCTL=y | ||
68 | # CONFIG_POSIX_MQUEUE is not set | ||
69 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
70 | # CONFIG_TASKSTATS is not set | ||
71 | # CONFIG_USER_NS is not set | ||
72 | # CONFIG_PID_NS is not set | ||
73 | # CONFIG_AUDIT is not set | ||
74 | # CONFIG_IKCONFIG is not set | ||
75 | CONFIG_LOG_BUF_SHIFT=14 | ||
76 | # CONFIG_CGROUPS is not set | ||
77 | CONFIG_FAIR_GROUP_SCHED=y | ||
78 | CONFIG_FAIR_USER_SCHED=y | ||
79 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
80 | CONFIG_SYSFS_DEPRECATED=y | ||
81 | # CONFIG_RELAY is not set | ||
82 | CONFIG_BLK_DEV_INITRD=y | ||
83 | CONFIG_INITRAMFS_SOURCE="" | ||
84 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
85 | CONFIG_SYSCTL=y | ||
86 | CONFIG_EMBEDDED=y | ||
87 | CONFIG_SYSCTL_SYSCALL=y | ||
88 | CONFIG_KALLSYMS=y | ||
89 | # CONFIG_KALLSYMS_ALL is not set | ||
90 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
91 | CONFIG_HOTPLUG=y | ||
92 | CONFIG_PRINTK=y | ||
93 | CONFIG_BUG=y | ||
94 | CONFIG_ELF_CORE=y | ||
95 | CONFIG_BASE_FULL=y | ||
96 | CONFIG_FUTEX=y | ||
97 | CONFIG_ANON_INODES=y | ||
98 | CONFIG_EPOLL=y | ||
99 | CONFIG_SIGNALFD=y | ||
100 | CONFIG_TIMERFD=y | ||
101 | CONFIG_EVENTFD=y | ||
102 | CONFIG_SHMEM=y | ||
103 | CONFIG_VM_EVENT_COUNTERS=y | ||
104 | CONFIG_SLUB_DEBUG=y | ||
105 | # CONFIG_SLAB is not set | ||
106 | CONFIG_SLUB=y | ||
107 | # CONFIG_SLOB is not set | ||
108 | # CONFIG_PROFILING is not set | ||
109 | # CONFIG_MARKERS is not set | ||
110 | CONFIG_HAVE_OPROFILE=y | ||
111 | CONFIG_HAVE_KPROBES=y | ||
112 | CONFIG_PROC_PAGE_MONITOR=y | ||
113 | CONFIG_SLABINFO=y | ||
114 | CONFIG_RT_MUTEXES=y | ||
115 | # CONFIG_TINY_SHMEM is not set | ||
116 | CONFIG_BASE_SMALL=0 | ||
117 | # CONFIG_MODULES is not set | ||
118 | CONFIG_BLOCK=y | ||
119 | # CONFIG_LBD is not set | ||
120 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
121 | # CONFIG_LSF is not set | ||
122 | # CONFIG_BLK_DEV_BSG is not set | ||
123 | |||
124 | # | ||
125 | # IO Schedulers | ||
126 | # | ||
127 | CONFIG_IOSCHED_NOOP=y | ||
128 | CONFIG_IOSCHED_AS=y | ||
129 | CONFIG_IOSCHED_DEADLINE=y | ||
130 | CONFIG_IOSCHED_CFQ=y | ||
131 | CONFIG_DEFAULT_AS=y | ||
132 | # CONFIG_DEFAULT_DEADLINE is not set | ||
133 | # CONFIG_DEFAULT_CFQ is not set | ||
134 | # CONFIG_DEFAULT_NOOP is not set | ||
135 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
136 | CONFIG_CLASSIC_RCU=y | ||
137 | # CONFIG_PREEMPT_RCU is not set | ||
138 | |||
139 | # | ||
140 | # Platform support | ||
141 | # | ||
142 | # CONFIG_PPC_MPC512x is not set | ||
143 | # CONFIG_PPC_MPC5121 is not set | ||
144 | # CONFIG_PPC_CELL is not set | ||
145 | # CONFIG_PPC_CELL_NATIVE is not set | ||
146 | # CONFIG_PQ2ADS is not set | ||
147 | CONFIG_MPC85xx=y | ||
148 | # CONFIG_MPC8540_ADS is not set | ||
149 | # CONFIG_MPC8560_ADS is not set | ||
150 | # CONFIG_MPC85xx_CDS is not set | ||
151 | # CONFIG_MPC85xx_MDS is not set | ||
152 | # CONFIG_MPC85xx_DS is not set | ||
153 | CONFIG_KSI8560=y | ||
154 | # CONFIG_STX_GP3 is not set | ||
155 | # CONFIG_TQM8540 is not set | ||
156 | # CONFIG_TQM8541 is not set | ||
157 | # CONFIG_TQM8555 is not set | ||
158 | # CONFIG_TQM8560 is not set | ||
159 | # CONFIG_SBC8548 is not set | ||
160 | # CONFIG_SBC8560 is not set | ||
161 | # CONFIG_IPIC is not set | ||
162 | CONFIG_MPIC=y | ||
163 | # CONFIG_MPIC_WEIRD is not set | ||
164 | # CONFIG_PPC_I8259 is not set | ||
165 | # CONFIG_PPC_RTAS is not set | ||
166 | # CONFIG_MMIO_NVRAM is not set | ||
167 | # CONFIG_PPC_MPC106 is not set | ||
168 | # CONFIG_PPC_970_NAP is not set | ||
169 | # CONFIG_PPC_INDIRECT_IO is not set | ||
170 | # CONFIG_GENERIC_IOMAP is not set | ||
171 | # CONFIG_CPU_FREQ is not set | ||
172 | CONFIG_CPM2=y | ||
173 | CONFIG_PPC_CPM_NEW_BINDING=y | ||
174 | # CONFIG_FSL_ULI1575 is not set | ||
175 | CONFIG_CPM=y | ||
176 | |||
177 | # | ||
178 | # Kernel options | ||
179 | # | ||
180 | CONFIG_HIGHMEM=y | ||
181 | # CONFIG_TICK_ONESHOT is not set | ||
182 | # CONFIG_NO_HZ is not set | ||
183 | # CONFIG_HIGH_RES_TIMERS is not set | ||
184 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
185 | # CONFIG_HZ_100 is not set | ||
186 | CONFIG_HZ_250=y | ||
187 | # CONFIG_HZ_300 is not set | ||
188 | # CONFIG_HZ_1000 is not set | ||
189 | CONFIG_HZ=250 | ||
190 | # CONFIG_SCHED_HRTICK is not set | ||
191 | CONFIG_PREEMPT_NONE=y | ||
192 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
193 | # CONFIG_PREEMPT is not set | ||
194 | CONFIG_RCU_TRACE=y | ||
195 | CONFIG_BINFMT_ELF=y | ||
196 | CONFIG_BINFMT_MISC=y | ||
197 | CONFIG_MATH_EMULATION=y | ||
198 | # CONFIG_IOMMU_HELPER is not set | ||
199 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
200 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
201 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
202 | CONFIG_SELECT_MEMORY_MODEL=y | ||
203 | CONFIG_FLATMEM_MANUAL=y | ||
204 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
205 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
206 | CONFIG_FLATMEM=y | ||
207 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
208 | # CONFIG_SPARSEMEM_STATIC is not set | ||
209 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
210 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
211 | # CONFIG_RESOURCES_64BIT is not set | ||
212 | CONFIG_ZONE_DMA_FLAG=1 | ||
213 | CONFIG_BOUNCE=y | ||
214 | CONFIG_VIRT_TO_BUS=y | ||
215 | # CONFIG_PROC_DEVICETREE is not set | ||
216 | # CONFIG_CMDLINE_BOOL is not set | ||
217 | # CONFIG_PM is not set | ||
218 | # CONFIG_SECCOMP is not set | ||
219 | CONFIG_WANT_DEVICE_TREE=y | ||
220 | CONFIG_ISA_DMA_API=y | ||
221 | |||
222 | # | ||
223 | # Bus options | ||
224 | # | ||
225 | CONFIG_ZONE_DMA=y | ||
226 | CONFIG_FSL_SOC=y | ||
227 | # CONFIG_PCI is not set | ||
228 | # CONFIG_PCI_DOMAINS is not set | ||
229 | # CONFIG_PCI_SYSCALL is not set | ||
230 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
231 | # CONFIG_PCCARD is not set | ||
232 | |||
233 | # | ||
234 | # Advanced setup | ||
235 | # | ||
236 | # CONFIG_ADVANCED_OPTIONS is not set | ||
237 | |||
238 | # | ||
239 | # Default settings for advanced configuration options are used | ||
240 | # | ||
241 | CONFIG_HIGHMEM_START=0xfe000000 | ||
242 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
243 | CONFIG_KERNEL_START=0xc0000000 | ||
244 | CONFIG_TASK_SIZE=0xc0000000 | ||
245 | CONFIG_BOOT_LOAD=0x00800000 | ||
246 | |||
247 | # | ||
248 | # Networking | ||
249 | # | ||
250 | CONFIG_NET=y | ||
251 | |||
252 | # | ||
253 | # Networking options | ||
254 | # | ||
255 | CONFIG_PACKET=y | ||
256 | # CONFIG_PACKET_MMAP is not set | ||
257 | CONFIG_UNIX=y | ||
258 | CONFIG_XFRM=y | ||
259 | # CONFIG_XFRM_USER is not set | ||
260 | # CONFIG_XFRM_SUB_POLICY is not set | ||
261 | # CONFIG_XFRM_MIGRATE is not set | ||
262 | # CONFIG_XFRM_STATISTICS is not set | ||
263 | # CONFIG_NET_KEY is not set | ||
264 | CONFIG_INET=y | ||
265 | CONFIG_IP_MULTICAST=y | ||
266 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
267 | CONFIG_IP_FIB_HASH=y | ||
268 | CONFIG_IP_PNP=y | ||
269 | CONFIG_IP_PNP_DHCP=y | ||
270 | CONFIG_IP_PNP_BOOTP=y | ||
271 | # CONFIG_IP_PNP_RARP is not set | ||
272 | # CONFIG_NET_IPIP is not set | ||
273 | # CONFIG_NET_IPGRE is not set | ||
274 | # CONFIG_IP_MROUTE is not set | ||
275 | # CONFIG_ARPD is not set | ||
276 | CONFIG_SYN_COOKIES=y | ||
277 | # CONFIG_INET_AH is not set | ||
278 | # CONFIG_INET_ESP is not set | ||
279 | # CONFIG_INET_IPCOMP is not set | ||
280 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
281 | # CONFIG_INET_TUNNEL is not set | ||
282 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
283 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
284 | CONFIG_INET_XFRM_MODE_BEET=y | ||
285 | # CONFIG_INET_LRO is not set | ||
286 | CONFIG_INET_DIAG=y | ||
287 | CONFIG_INET_TCP_DIAG=y | ||
288 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
289 | CONFIG_TCP_CONG_CUBIC=y | ||
290 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
291 | # CONFIG_TCP_MD5SIG is not set | ||
292 | # CONFIG_IPV6 is not set | ||
293 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
294 | # CONFIG_INET6_TUNNEL is not set | ||
295 | # CONFIG_NETWORK_SECMARK is not set | ||
296 | # CONFIG_NETFILTER is not set | ||
297 | # CONFIG_IP_DCCP is not set | ||
298 | # CONFIG_IP_SCTP is not set | ||
299 | # CONFIG_TIPC is not set | ||
300 | # CONFIG_ATM is not set | ||
301 | # CONFIG_BRIDGE is not set | ||
302 | # CONFIG_VLAN_8021Q is not set | ||
303 | # CONFIG_DECNET is not set | ||
304 | # CONFIG_LLC2 is not set | ||
305 | # CONFIG_IPX is not set | ||
306 | # CONFIG_ATALK is not set | ||
307 | # CONFIG_X25 is not set | ||
308 | # CONFIG_LAPB is not set | ||
309 | # CONFIG_ECONET is not set | ||
310 | # CONFIG_WAN_ROUTER is not set | ||
311 | # CONFIG_NET_SCHED is not set | ||
312 | |||
313 | # | ||
314 | # Network testing | ||
315 | # | ||
316 | # CONFIG_NET_PKTGEN is not set | ||
317 | # CONFIG_HAMRADIO is not set | ||
318 | # CONFIG_CAN is not set | ||
319 | # CONFIG_IRDA is not set | ||
320 | # CONFIG_BT is not set | ||
321 | # CONFIG_AF_RXRPC is not set | ||
322 | |||
323 | # | ||
324 | # Wireless | ||
325 | # | ||
326 | # CONFIG_CFG80211 is not set | ||
327 | # CONFIG_WIRELESS_EXT is not set | ||
328 | # CONFIG_MAC80211 is not set | ||
329 | # CONFIG_IEEE80211 is not set | ||
330 | # CONFIG_RFKILL is not set | ||
331 | # CONFIG_NET_9P is not set | ||
332 | |||
333 | # | ||
334 | # Device Drivers | ||
335 | # | ||
336 | |||
337 | # | ||
338 | # Generic Driver Options | ||
339 | # | ||
340 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
341 | CONFIG_STANDALONE=y | ||
342 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
343 | # CONFIG_FW_LOADER is not set | ||
344 | # CONFIG_DEBUG_DRIVER is not set | ||
345 | # CONFIG_DEBUG_DEVRES is not set | ||
346 | # CONFIG_SYS_HYPERVISOR is not set | ||
347 | # CONFIG_CONNECTOR is not set | ||
348 | CONFIG_MTD=y | ||
349 | # CONFIG_MTD_DEBUG is not set | ||
350 | CONFIG_MTD_CONCAT=y | ||
351 | CONFIG_MTD_PARTITIONS=y | ||
352 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
353 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
354 | |||
355 | # | ||
356 | # User Modules And Translation Layers | ||
357 | # | ||
358 | CONFIG_MTD_CHAR=y | ||
359 | CONFIG_MTD_BLKDEVS=y | ||
360 | CONFIG_MTD_BLOCK=y | ||
361 | # CONFIG_FTL is not set | ||
362 | # CONFIG_NFTL is not set | ||
363 | # CONFIG_INFTL is not set | ||
364 | # CONFIG_RFD_FTL is not set | ||
365 | # CONFIG_SSFDC is not set | ||
366 | # CONFIG_MTD_OOPS is not set | ||
367 | |||
368 | # | ||
369 | # RAM/ROM/Flash chip drivers | ||
370 | # | ||
371 | CONFIG_MTD_CFI=y | ||
372 | CONFIG_MTD_JEDECPROBE=y | ||
373 | CONFIG_MTD_GEN_PROBE=y | ||
374 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
375 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
376 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
377 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
378 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
379 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
380 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
381 | CONFIG_MTD_CFI_I1=y | ||
382 | CONFIG_MTD_CFI_I2=y | ||
383 | # CONFIG_MTD_CFI_I4 is not set | ||
384 | # CONFIG_MTD_CFI_I8 is not set | ||
385 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
386 | CONFIG_MTD_CFI_AMDSTD=y | ||
387 | # CONFIG_MTD_CFI_STAA is not set | ||
388 | CONFIG_MTD_CFI_UTIL=y | ||
389 | # CONFIG_MTD_RAM is not set | ||
390 | # CONFIG_MTD_ROM is not set | ||
391 | # CONFIG_MTD_ABSENT is not set | ||
392 | |||
393 | # | ||
394 | # Mapping drivers for chip access | ||
395 | # | ||
396 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
397 | # CONFIG_MTD_PHYSMAP is not set | ||
398 | CONFIG_MTD_PHYSMAP_OF=y | ||
399 | # CONFIG_MTD_PLATRAM is not set | ||
400 | |||
401 | # | ||
402 | # Self-contained MTD device drivers | ||
403 | # | ||
404 | # CONFIG_MTD_SLRAM is not set | ||
405 | # CONFIG_MTD_PHRAM is not set | ||
406 | # CONFIG_MTD_MTDRAM is not set | ||
407 | # CONFIG_MTD_BLOCK2MTD is not set | ||
408 | |||
409 | # | ||
410 | # Disk-On-Chip Device Drivers | ||
411 | # | ||
412 | # CONFIG_MTD_DOC2000 is not set | ||
413 | # CONFIG_MTD_DOC2001 is not set | ||
414 | # CONFIG_MTD_DOC2001PLUS is not set | ||
415 | # CONFIG_MTD_NAND is not set | ||
416 | # CONFIG_MTD_ONENAND is not set | ||
417 | |||
418 | # | ||
419 | # UBI - Unsorted block images | ||
420 | # | ||
421 | # CONFIG_MTD_UBI is not set | ||
422 | CONFIG_OF_DEVICE=y | ||
423 | # CONFIG_PARPORT is not set | ||
424 | CONFIG_BLK_DEV=y | ||
425 | # CONFIG_BLK_DEV_FD is not set | ||
426 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
427 | CONFIG_BLK_DEV_LOOP=y | ||
428 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
429 | # CONFIG_BLK_DEV_NBD is not set | ||
430 | CONFIG_BLK_DEV_RAM=y | ||
431 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
432 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
433 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
434 | # CONFIG_CDROM_PKTCDVD is not set | ||
435 | # CONFIG_ATA_OVER_ETH is not set | ||
436 | CONFIG_MISC_DEVICES=y | ||
437 | # CONFIG_EEPROM_93CX6 is not set | ||
438 | CONFIG_IDE=y | ||
439 | CONFIG_IDE_MAX_HWIFS=4 | ||
440 | CONFIG_BLK_DEV_IDE=y | ||
441 | |||
442 | # | ||
443 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
444 | # | ||
445 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
446 | # CONFIG_BLK_DEV_IDEDISK is not set | ||
447 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
448 | # CONFIG_BLK_DEV_IDECD is not set | ||
449 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
450 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
451 | # CONFIG_IDE_TASK_IOCTL is not set | ||
452 | CONFIG_IDE_PROC_FS=y | ||
453 | |||
454 | # | ||
455 | # IDE chipset support/bugfixes | ||
456 | # | ||
457 | CONFIG_IDE_GENERIC=y | ||
458 | # CONFIG_BLK_DEV_PLATFORM is not set | ||
459 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
460 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | ||
461 | # CONFIG_BLK_DEV_HD is not set | ||
462 | |||
463 | # | ||
464 | # SCSI device support | ||
465 | # | ||
466 | # CONFIG_RAID_ATTRS is not set | ||
467 | # CONFIG_SCSI is not set | ||
468 | # CONFIG_SCSI_DMA is not set | ||
469 | # CONFIG_SCSI_NETLINK is not set | ||
470 | # CONFIG_ATA is not set | ||
471 | # CONFIG_MD is not set | ||
472 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
473 | CONFIG_NETDEVICES=y | ||
474 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
475 | # CONFIG_DUMMY is not set | ||
476 | # CONFIG_BONDING is not set | ||
477 | # CONFIG_MACVLAN is not set | ||
478 | # CONFIG_EQUALIZER is not set | ||
479 | # CONFIG_TUN is not set | ||
480 | # CONFIG_VETH is not set | ||
481 | CONFIG_PHYLIB=y | ||
482 | |||
483 | # | ||
484 | # MII PHY device drivers | ||
485 | # | ||
486 | CONFIG_MARVELL_PHY=y | ||
487 | # CONFIG_DAVICOM_PHY is not set | ||
488 | # CONFIG_QSEMI_PHY is not set | ||
489 | # CONFIG_LXT_PHY is not set | ||
490 | # CONFIG_CICADA_PHY is not set | ||
491 | # CONFIG_VITESSE_PHY is not set | ||
492 | # CONFIG_SMSC_PHY is not set | ||
493 | # CONFIG_BROADCOM_PHY is not set | ||
494 | # CONFIG_ICPLUS_PHY is not set | ||
495 | # CONFIG_REALTEK_PHY is not set | ||
496 | # CONFIG_FIXED_PHY is not set | ||
497 | CONFIG_MDIO_BITBANG=y | ||
498 | CONFIG_NET_ETHERNET=y | ||
499 | CONFIG_MII=y | ||
500 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
501 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
502 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
503 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
504 | # CONFIG_B44 is not set | ||
505 | CONFIG_FS_ENET=y | ||
506 | # CONFIG_FS_ENET_HAS_SCC is not set | ||
507 | CONFIG_FS_ENET_HAS_FCC=y | ||
508 | CONFIG_FS_ENET_MDIO_FCC=y | ||
509 | CONFIG_NETDEV_1000=y | ||
510 | # CONFIG_E1000E_ENABLED is not set | ||
511 | CONFIG_GIANFAR=y | ||
512 | CONFIG_GFAR_NAPI=y | ||
513 | CONFIG_NETDEV_10000=y | ||
514 | |||
515 | # | ||
516 | # Wireless LAN | ||
517 | # | ||
518 | # CONFIG_WLAN_PRE80211 is not set | ||
519 | # CONFIG_WLAN_80211 is not set | ||
520 | # CONFIG_WAN is not set | ||
521 | # CONFIG_PPP is not set | ||
522 | # CONFIG_SLIP is not set | ||
523 | # CONFIG_NETCONSOLE is not set | ||
524 | # CONFIG_NETPOLL is not set | ||
525 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
526 | # CONFIG_ISDN is not set | ||
527 | # CONFIG_PHONE is not set | ||
528 | |||
529 | # | ||
530 | # Input device support | ||
531 | # | ||
532 | CONFIG_INPUT=y | ||
533 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
534 | # CONFIG_INPUT_POLLDEV is not set | ||
535 | |||
536 | # | ||
537 | # Userland interfaces | ||
538 | # | ||
539 | # CONFIG_INPUT_MOUSEDEV is not set | ||
540 | # CONFIG_INPUT_JOYDEV is not set | ||
541 | # CONFIG_INPUT_EVDEV is not set | ||
542 | # CONFIG_INPUT_EVBUG is not set | ||
543 | |||
544 | # | ||
545 | # Input Device Drivers | ||
546 | # | ||
547 | # CONFIG_INPUT_KEYBOARD is not set | ||
548 | # CONFIG_INPUT_MOUSE is not set | ||
549 | # CONFIG_INPUT_JOYSTICK is not set | ||
550 | # CONFIG_INPUT_TABLET is not set | ||
551 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
552 | # CONFIG_INPUT_MISC is not set | ||
553 | |||
554 | # | ||
555 | # Hardware I/O ports | ||
556 | # | ||
557 | # CONFIG_SERIO is not set | ||
558 | # CONFIG_GAMEPORT is not set | ||
559 | |||
560 | # | ||
561 | # Character devices | ||
562 | # | ||
563 | # CONFIG_VT is not set | ||
564 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
565 | |||
566 | # | ||
567 | # Serial drivers | ||
568 | # | ||
569 | # CONFIG_SERIAL_8250 is not set | ||
570 | |||
571 | # | ||
572 | # Non-8250 serial port support | ||
573 | # | ||
574 | # CONFIG_SERIAL_UARTLITE is not set | ||
575 | CONFIG_SERIAL_CORE=y | ||
576 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
577 | CONFIG_SERIAL_CPM=y | ||
578 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
579 | CONFIG_SERIAL_CPM_SCC1=y | ||
580 | # CONFIG_SERIAL_CPM_SCC2 is not set | ||
581 | # CONFIG_SERIAL_CPM_SCC3 is not set | ||
582 | # CONFIG_SERIAL_CPM_SCC4 is not set | ||
583 | # CONFIG_SERIAL_CPM_SMC1 is not set | ||
584 | # CONFIG_SERIAL_CPM_SMC2 is not set | ||
585 | CONFIG_UNIX98_PTYS=y | ||
586 | CONFIG_LEGACY_PTYS=y | ||
587 | CONFIG_LEGACY_PTY_COUNT=256 | ||
588 | # CONFIG_IPMI_HANDLER is not set | ||
589 | CONFIG_HW_RANDOM=y | ||
590 | # CONFIG_NVRAM is not set | ||
591 | CONFIG_GEN_RTC=y | ||
592 | # CONFIG_GEN_RTC_X is not set | ||
593 | # CONFIG_R3964 is not set | ||
594 | # CONFIG_RAW_DRIVER is not set | ||
595 | # CONFIG_TCG_TPM is not set | ||
596 | # CONFIG_I2C is not set | ||
597 | |||
598 | # | ||
599 | # SPI support | ||
600 | # | ||
601 | # CONFIG_SPI is not set | ||
602 | # CONFIG_SPI_MASTER is not set | ||
603 | # CONFIG_W1 is not set | ||
604 | # CONFIG_POWER_SUPPLY is not set | ||
605 | CONFIG_HWMON=y | ||
606 | # CONFIG_HWMON_VID is not set | ||
607 | # CONFIG_SENSORS_F71805F is not set | ||
608 | # CONFIG_SENSORS_F71882FG is not set | ||
609 | # CONFIG_SENSORS_IT87 is not set | ||
610 | # CONFIG_SENSORS_PC87360 is not set | ||
611 | # CONFIG_SENSORS_PC87427 is not set | ||
612 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
613 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
614 | # CONFIG_SENSORS_VT1211 is not set | ||
615 | # CONFIG_SENSORS_W83627HF is not set | ||
616 | # CONFIG_SENSORS_W83627EHF is not set | ||
617 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
618 | # CONFIG_WATCHDOG is not set | ||
619 | |||
620 | # | ||
621 | # Sonics Silicon Backplane | ||
622 | # | ||
623 | CONFIG_SSB_POSSIBLE=y | ||
624 | # CONFIG_SSB is not set | ||
625 | |||
626 | # | ||
627 | # Multifunction device drivers | ||
628 | # | ||
629 | # CONFIG_MFD_SM501 is not set | ||
630 | |||
631 | # | ||
632 | # Multimedia devices | ||
633 | # | ||
634 | # CONFIG_VIDEO_DEV is not set | ||
635 | # CONFIG_DVB_CORE is not set | ||
636 | CONFIG_DAB=y | ||
637 | |||
638 | # | ||
639 | # Graphics support | ||
640 | # | ||
641 | # CONFIG_VGASTATE is not set | ||
642 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
643 | # CONFIG_FB is not set | ||
644 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
645 | |||
646 | # | ||
647 | # Display device support | ||
648 | # | ||
649 | # CONFIG_DISPLAY_SUPPORT is not set | ||
650 | |||
651 | # | ||
652 | # Sound | ||
653 | # | ||
654 | # CONFIG_SOUND is not set | ||
655 | CONFIG_HID_SUPPORT=y | ||
656 | CONFIG_HID=y | ||
657 | # CONFIG_HID_DEBUG is not set | ||
658 | # CONFIG_HIDRAW is not set | ||
659 | CONFIG_USB_SUPPORT=y | ||
660 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
661 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
662 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
663 | |||
664 | # | ||
665 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
666 | # | ||
667 | # CONFIG_USB_GADGET is not set | ||
668 | # CONFIG_MMC is not set | ||
669 | # CONFIG_NEW_LEDS is not set | ||
670 | # CONFIG_EDAC is not set | ||
671 | # CONFIG_RTC_CLASS is not set | ||
672 | |||
673 | # | ||
674 | # Userspace I/O | ||
675 | # | ||
676 | # CONFIG_UIO is not set | ||
677 | |||
678 | # | ||
679 | # File systems | ||
680 | # | ||
681 | CONFIG_EXT2_FS=y | ||
682 | # CONFIG_EXT2_FS_XATTR is not set | ||
683 | # CONFIG_EXT2_FS_XIP is not set | ||
684 | CONFIG_EXT3_FS=y | ||
685 | CONFIG_EXT3_FS_XATTR=y | ||
686 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
687 | # CONFIG_EXT3_FS_SECURITY is not set | ||
688 | # CONFIG_EXT4DEV_FS is not set | ||
689 | CONFIG_JBD=y | ||
690 | # CONFIG_JBD_DEBUG is not set | ||
691 | CONFIG_FS_MBCACHE=y | ||
692 | # CONFIG_REISERFS_FS is not set | ||
693 | # CONFIG_JFS_FS is not set | ||
694 | # CONFIG_FS_POSIX_ACL is not set | ||
695 | # CONFIG_XFS_FS is not set | ||
696 | # CONFIG_GFS2_FS is not set | ||
697 | # CONFIG_OCFS2_FS is not set | ||
698 | # CONFIG_MINIX_FS is not set | ||
699 | # CONFIG_ROMFS_FS is not set | ||
700 | CONFIG_INOTIFY=y | ||
701 | CONFIG_INOTIFY_USER=y | ||
702 | # CONFIG_QUOTA is not set | ||
703 | CONFIG_DNOTIFY=y | ||
704 | # CONFIG_AUTOFS_FS is not set | ||
705 | # CONFIG_AUTOFS4_FS is not set | ||
706 | # CONFIG_FUSE_FS is not set | ||
707 | |||
708 | # | ||
709 | # CD-ROM/DVD Filesystems | ||
710 | # | ||
711 | # CONFIG_ISO9660_FS is not set | ||
712 | # CONFIG_UDF_FS is not set | ||
713 | |||
714 | # | ||
715 | # DOS/FAT/NT Filesystems | ||
716 | # | ||
717 | # CONFIG_MSDOS_FS is not set | ||
718 | # CONFIG_VFAT_FS is not set | ||
719 | # CONFIG_NTFS_FS is not set | ||
720 | |||
721 | # | ||
722 | # Pseudo filesystems | ||
723 | # | ||
724 | CONFIG_PROC_FS=y | ||
725 | CONFIG_PROC_KCORE=y | ||
726 | CONFIG_PROC_SYSCTL=y | ||
727 | CONFIG_SYSFS=y | ||
728 | CONFIG_TMPFS=y | ||
729 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
730 | # CONFIG_HUGETLB_PAGE is not set | ||
731 | # CONFIG_CONFIGFS_FS is not set | ||
732 | |||
733 | # | ||
734 | # Miscellaneous filesystems | ||
735 | # | ||
736 | # CONFIG_ADFS_FS is not set | ||
737 | # CONFIG_AFFS_FS is not set | ||
738 | # CONFIG_HFS_FS is not set | ||
739 | # CONFIG_HFSPLUS_FS is not set | ||
740 | # CONFIG_BEFS_FS is not set | ||
741 | # CONFIG_BFS_FS is not set | ||
742 | # CONFIG_EFS_FS is not set | ||
743 | # CONFIG_JFFS2_FS is not set | ||
744 | # CONFIG_CRAMFS is not set | ||
745 | # CONFIG_VXFS_FS is not set | ||
746 | # CONFIG_HPFS_FS is not set | ||
747 | # CONFIG_QNX4FS_FS is not set | ||
748 | # CONFIG_SYSV_FS is not set | ||
749 | # CONFIG_UFS_FS is not set | ||
750 | CONFIG_NETWORK_FILESYSTEMS=y | ||
751 | CONFIG_NFS_FS=y | ||
752 | # CONFIG_NFS_V3 is not set | ||
753 | # CONFIG_NFS_V4 is not set | ||
754 | # CONFIG_NFS_DIRECTIO is not set | ||
755 | # CONFIG_NFSD is not set | ||
756 | CONFIG_ROOT_NFS=y | ||
757 | CONFIG_LOCKD=y | ||
758 | CONFIG_NFS_COMMON=y | ||
759 | CONFIG_SUNRPC=y | ||
760 | # CONFIG_SUNRPC_BIND34 is not set | ||
761 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
762 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
763 | # CONFIG_SMB_FS is not set | ||
764 | # CONFIG_CIFS is not set | ||
765 | # CONFIG_NCP_FS is not set | ||
766 | # CONFIG_CODA_FS is not set | ||
767 | # CONFIG_AFS_FS is not set | ||
768 | |||
769 | # | ||
770 | # Partition Types | ||
771 | # | ||
772 | CONFIG_PARTITION_ADVANCED=y | ||
773 | # CONFIG_ACORN_PARTITION is not set | ||
774 | # CONFIG_OSF_PARTITION is not set | ||
775 | # CONFIG_AMIGA_PARTITION is not set | ||
776 | # CONFIG_ATARI_PARTITION is not set | ||
777 | # CONFIG_MAC_PARTITION is not set | ||
778 | # CONFIG_MSDOS_PARTITION is not set | ||
779 | # CONFIG_LDM_PARTITION is not set | ||
780 | # CONFIG_SGI_PARTITION is not set | ||
781 | # CONFIG_ULTRIX_PARTITION is not set | ||
782 | # CONFIG_SUN_PARTITION is not set | ||
783 | # CONFIG_KARMA_PARTITION is not set | ||
784 | # CONFIG_EFI_PARTITION is not set | ||
785 | # CONFIG_SYSV68_PARTITION is not set | ||
786 | # CONFIG_NLS is not set | ||
787 | # CONFIG_DLM is not set | ||
788 | |||
789 | # | ||
790 | # Library routines | ||
791 | # | ||
792 | CONFIG_BITREVERSE=y | ||
793 | # CONFIG_CRC_CCITT is not set | ||
794 | # CONFIG_CRC16 is not set | ||
795 | # CONFIG_CRC_ITU_T is not set | ||
796 | CONFIG_CRC32=y | ||
797 | # CONFIG_CRC7 is not set | ||
798 | # CONFIG_LIBCRC32C is not set | ||
799 | CONFIG_PLIST=y | ||
800 | CONFIG_HAS_IOMEM=y | ||
801 | CONFIG_HAS_IOPORT=y | ||
802 | CONFIG_HAS_DMA=y | ||
803 | |||
804 | # | ||
805 | # Kernel hacking | ||
806 | # | ||
807 | # CONFIG_PRINTK_TIME is not set | ||
808 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
809 | CONFIG_ENABLE_MUST_CHECK=y | ||
810 | # CONFIG_MAGIC_SYSRQ is not set | ||
811 | # CONFIG_UNUSED_SYMBOLS is not set | ||
812 | CONFIG_DEBUG_FS=y | ||
813 | # CONFIG_HEADERS_CHECK is not set | ||
814 | CONFIG_DEBUG_KERNEL=y | ||
815 | # CONFIG_DEBUG_SHIRQ is not set | ||
816 | CONFIG_DETECT_SOFTLOCKUP=y | ||
817 | CONFIG_SCHED_DEBUG=y | ||
818 | # CONFIG_SCHEDSTATS is not set | ||
819 | # CONFIG_TIMER_STATS is not set | ||
820 | # CONFIG_SLUB_DEBUG_ON 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_SPINLOCK_SLEEP is not set | ||
826 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
827 | # CONFIG_DEBUG_KOBJECT is not set | ||
828 | # CONFIG_DEBUG_HIGHMEM is not set | ||
829 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
830 | # CONFIG_DEBUG_INFO is not set | ||
831 | # CONFIG_DEBUG_VM is not set | ||
832 | # CONFIG_DEBUG_LIST is not set | ||
833 | # CONFIG_DEBUG_SG is not set | ||
834 | CONFIG_FORCED_INLINING=y | ||
835 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
836 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
837 | # CONFIG_FAULT_INJECTION is not set | ||
838 | # CONFIG_SAMPLES is not set | ||
839 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
840 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
841 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
842 | # CONFIG_DEBUGGER is not set | ||
843 | # CONFIG_KGDB_CONSOLE is not set | ||
844 | # CONFIG_VIRQ_DEBUG is not set | ||
845 | # CONFIG_BDI_SWITCH is not set | ||
846 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
847 | |||
848 | # | ||
849 | # Security options | ||
850 | # | ||
851 | # CONFIG_KEYS is not set | ||
852 | # CONFIG_SECURITY is not set | ||
853 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
854 | CONFIG_CRYPTO=y | ||
855 | # CONFIG_CRYPTO_SEQIV is not set | ||
856 | # CONFIG_CRYPTO_MANAGER is not set | ||
857 | # CONFIG_CRYPTO_HMAC is not set | ||
858 | # CONFIG_CRYPTO_XCBC is not set | ||
859 | # CONFIG_CRYPTO_NULL is not set | ||
860 | # CONFIG_CRYPTO_MD4 is not set | ||
861 | # CONFIG_CRYPTO_MD5 is not set | ||
862 | # CONFIG_CRYPTO_SHA1 is not set | ||
863 | # CONFIG_CRYPTO_SHA256 is not set | ||
864 | # CONFIG_CRYPTO_SHA512 is not set | ||
865 | # CONFIG_CRYPTO_WP512 is not set | ||
866 | # CONFIG_CRYPTO_TGR192 is not set | ||
867 | # CONFIG_CRYPTO_GF128MUL is not set | ||
868 | # CONFIG_CRYPTO_ECB is not set | ||
869 | # CONFIG_CRYPTO_CBC is not set | ||
870 | # CONFIG_CRYPTO_PCBC is not set | ||
871 | # CONFIG_CRYPTO_LRW is not set | ||
872 | # CONFIG_CRYPTO_XTS is not set | ||
873 | # CONFIG_CRYPTO_CTR is not set | ||
874 | # CONFIG_CRYPTO_GCM is not set | ||
875 | # CONFIG_CRYPTO_CCM is not set | ||
876 | # CONFIG_CRYPTO_CRYPTD is not set | ||
877 | # CONFIG_CRYPTO_DES is not set | ||
878 | # CONFIG_CRYPTO_FCRYPT is not set | ||
879 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
880 | # CONFIG_CRYPTO_TWOFISH is not set | ||
881 | # CONFIG_CRYPTO_SERPENT is not set | ||
882 | # CONFIG_CRYPTO_AES is not set | ||
883 | # CONFIG_CRYPTO_CAST5 is not set | ||
884 | # CONFIG_CRYPTO_CAST6 is not set | ||
885 | # CONFIG_CRYPTO_TEA is not set | ||
886 | # CONFIG_CRYPTO_ARC4 is not set | ||
887 | # CONFIG_CRYPTO_KHAZAD is not set | ||
888 | # CONFIG_CRYPTO_ANUBIS is not set | ||
889 | # CONFIG_CRYPTO_SEED is not set | ||
890 | # CONFIG_CRYPTO_SALSA20 is not set | ||
891 | # CONFIG_CRYPTO_DEFLATE is not set | ||
892 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
893 | # CONFIG_CRYPTO_CRC32C is not set | ||
894 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
895 | # CONFIG_CRYPTO_AUTHENC is not set | ||
896 | # CONFIG_CRYPTO_LZO is not set | ||
897 | CONFIG_CRYPTO_HW=y | ||
898 | # CONFIG_PPC_CLOCK is not set | ||
899 | CONFIG_PPC_LIB_RHEAP=y | ||
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig index 8b810d056440..7a166a39d92d 100644 --- a/arch/powerpc/configs/maple_defconfig +++ b/arch/powerpc/configs/maple_defconfig | |||
@@ -333,7 +333,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
333 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 333 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
334 | CONFIG_STANDALONE=y | 334 | CONFIG_STANDALONE=y |
335 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 335 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
336 | # CONFIG_FW_LOADER is not set | 336 | CONFIG_FW_LOADER=y |
337 | # CONFIG_DEBUG_DRIVER is not set | 337 | # CONFIG_DEBUG_DRIVER is not set |
338 | # CONFIG_DEBUG_DEVRES is not set | 338 | # CONFIG_DEBUG_DEVRES is not set |
339 | # CONFIG_SYS_HYPERVISOR is not set | 339 | # CONFIG_SYS_HYPERVISOR is not set |
@@ -374,6 +374,7 @@ CONFIG_BLK_DEV_IDEDISK=y | |||
374 | CONFIG_BLK_DEV_IDECD=y | 374 | CONFIG_BLK_DEV_IDECD=y |
375 | # CONFIG_BLK_DEV_IDETAPE is not set | 375 | # CONFIG_BLK_DEV_IDETAPE is not set |
376 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | 376 | # CONFIG_BLK_DEV_IDEFLOPPY is not set |
377 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
377 | CONFIG_IDE_TASK_IOCTL=y | 378 | CONFIG_IDE_TASK_IOCTL=y |
378 | CONFIG_IDE_PROC_FS=y | 379 | CONFIG_IDE_PROC_FS=y |
379 | 380 | ||
@@ -427,10 +428,129 @@ CONFIG_IDE_ARCH_OBSOLETE_INIT=y | |||
427 | # SCSI device support | 428 | # SCSI device support |
428 | # | 429 | # |
429 | # CONFIG_RAID_ATTRS is not set | 430 | # CONFIG_RAID_ATTRS is not set |
430 | # CONFIG_SCSI is not set | 431 | CONFIG_SCSI=y |
431 | # CONFIG_SCSI_DMA is not set | 432 | CONFIG_SCSI_DMA=y |
433 | # CONFIG_SCSI_TGT is not set | ||
432 | # CONFIG_SCSI_NETLINK is not set | 434 | # CONFIG_SCSI_NETLINK is not set |
433 | # CONFIG_ATA is not set | 435 | # CONFIG_SCSI_PROC_FS is not set |
436 | |||
437 | # | ||
438 | # SCSI support type (disk, tape, CD-ROM) | ||
439 | # | ||
440 | CONFIG_BLK_DEV_SD=y | ||
441 | # CONFIG_CHR_DEV_ST is not set | ||
442 | # CONFIG_CHR_DEV_OSST is not set | ||
443 | # CONFIG_BLK_DEV_SR is not set | ||
444 | CONFIG_CHR_DEV_SG=y | ||
445 | # CONFIG_CHR_DEV_SCH is not set | ||
446 | |||
447 | # | ||
448 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
449 | # | ||
450 | # CONFIG_SCSI_MULTI_LUN is not set | ||
451 | # CONFIG_SCSI_CONSTANTS is not set | ||
452 | # CONFIG_SCSI_LOGGING is not set | ||
453 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
454 | CONFIG_SCSI_WAIT_SCAN=m | ||
455 | |||
456 | # | ||
457 | # SCSI Transports | ||
458 | # | ||
459 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
460 | # CONFIG_SCSI_FC_ATTRS is not set | ||
461 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
462 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
463 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
464 | CONFIG_SCSI_LOWLEVEL=y | ||
465 | # CONFIG_ISCSI_TCP is not set | ||
466 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
467 | # CONFIG_SCSI_3W_9XXX is not set | ||
468 | # CONFIG_SCSI_ACARD is not set | ||
469 | # CONFIG_SCSI_AACRAID is not set | ||
470 | # CONFIG_SCSI_AIC7XXX is not set | ||
471 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
472 | # CONFIG_SCSI_AIC79XX is not set | ||
473 | # CONFIG_SCSI_AIC94XX is not set | ||
474 | # CONFIG_SCSI_ARCMSR is not set | ||
475 | # CONFIG_MEGARAID_NEWGEN is not set | ||
476 | # CONFIG_MEGARAID_LEGACY is not set | ||
477 | # CONFIG_MEGARAID_SAS is not set | ||
478 | # CONFIG_SCSI_HPTIOP is not set | ||
479 | # CONFIG_SCSI_DMX3191D is not set | ||
480 | # CONFIG_SCSI_EATA is not set | ||
481 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
482 | # CONFIG_SCSI_GDTH is not set | ||
483 | # CONFIG_SCSI_IPS is not set | ||
484 | # CONFIG_SCSI_INITIO is not set | ||
485 | # CONFIG_SCSI_INIA100 is not set | ||
486 | # CONFIG_SCSI_STEX is not set | ||
487 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
488 | CONFIG_SCSI_IPR=y | ||
489 | CONFIG_SCSI_IPR_TRACE=y | ||
490 | CONFIG_SCSI_IPR_DUMP=y | ||
491 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
492 | # CONFIG_SCSI_QLA_FC is not set | ||
493 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
494 | # CONFIG_SCSI_LPFC is not set | ||
495 | # CONFIG_SCSI_DC395x is not set | ||
496 | # CONFIG_SCSI_DC390T is not set | ||
497 | # CONFIG_SCSI_DEBUG is not set | ||
498 | # CONFIG_SCSI_SRP is not set | ||
499 | CONFIG_ATA=y | ||
500 | CONFIG_ATA_NONSTANDARD=y | ||
501 | # CONFIG_SATA_AHCI is not set | ||
502 | # CONFIG_SATA_SVW is not set | ||
503 | # CONFIG_ATA_PIIX is not set | ||
504 | # CONFIG_SATA_MV is not set | ||
505 | # CONFIG_SATA_NV is not set | ||
506 | # CONFIG_PDC_ADMA is not set | ||
507 | # CONFIG_SATA_QSTOR is not set | ||
508 | # CONFIG_SATA_PROMISE is not set | ||
509 | # CONFIG_SATA_SX4 is not set | ||
510 | # CONFIG_SATA_SIL is not set | ||
511 | # CONFIG_SATA_SIL24 is not set | ||
512 | # CONFIG_SATA_SIS is not set | ||
513 | # CONFIG_SATA_ULI is not set | ||
514 | # CONFIG_SATA_VIA is not set | ||
515 | # CONFIG_SATA_VITESSE is not set | ||
516 | # CONFIG_SATA_INIC162X is not set | ||
517 | # CONFIG_PATA_ALI is not set | ||
518 | # CONFIG_PATA_AMD is not set | ||
519 | # CONFIG_PATA_ARTOP is not set | ||
520 | # CONFIG_PATA_ATIIXP is not set | ||
521 | # CONFIG_PATA_CMD640_PCI is not set | ||
522 | # CONFIG_PATA_CMD64X is not set | ||
523 | # CONFIG_PATA_CS5520 is not set | ||
524 | # CONFIG_PATA_CS5530 is not set | ||
525 | # CONFIG_PATA_CYPRESS is not set | ||
526 | # CONFIG_PATA_EFAR is not set | ||
527 | # CONFIG_ATA_GENERIC is not set | ||
528 | # CONFIG_PATA_HPT366 is not set | ||
529 | # CONFIG_PATA_HPT37X is not set | ||
530 | # CONFIG_PATA_HPT3X2N is not set | ||
531 | # CONFIG_PATA_HPT3X3 is not set | ||
532 | # CONFIG_PATA_IT821X is not set | ||
533 | # CONFIG_PATA_IT8213 is not set | ||
534 | # CONFIG_PATA_JMICRON is not set | ||
535 | # CONFIG_PATA_TRIFLEX is not set | ||
536 | # CONFIG_PATA_MARVELL is not set | ||
537 | # CONFIG_PATA_MPIIX is not set | ||
538 | # CONFIG_PATA_OLDPIIX is not set | ||
539 | # CONFIG_PATA_NETCELL is not set | ||
540 | # CONFIG_PATA_NS87410 is not set | ||
541 | # CONFIG_PATA_NS87415 is not set | ||
542 | # CONFIG_PATA_OPTI is not set | ||
543 | # CONFIG_PATA_OPTIDMA is not set | ||
544 | # CONFIG_PATA_PDC_OLD is not set | ||
545 | # CONFIG_PATA_RADISYS is not set | ||
546 | # CONFIG_PATA_RZ1000 is not set | ||
547 | # CONFIG_PATA_SC1200 is not set | ||
548 | # CONFIG_PATA_SERVERWORKS is not set | ||
549 | # CONFIG_PATA_PDC2027X is not set | ||
550 | # CONFIG_PATA_SIL680 is not set | ||
551 | # CONFIG_PATA_SIS is not set | ||
552 | # CONFIG_PATA_VIA is not set | ||
553 | # CONFIG_PATA_WINBOND is not set | ||
434 | # CONFIG_MD is not set | 554 | # CONFIG_MD is not set |
435 | # CONFIG_FUSION is not set | 555 | # CONFIG_FUSION is not set |
436 | 556 | ||
@@ -536,6 +656,7 @@ CONFIG_USB_PEGASUS=y | |||
536 | # CONFIG_HIPPI is not set | 656 | # CONFIG_HIPPI is not set |
537 | # CONFIG_PPP is not set | 657 | # CONFIG_PPP is not set |
538 | # CONFIG_SLIP is not set | 658 | # CONFIG_SLIP is not set |
659 | # CONFIG_NET_FC is not set | ||
539 | # CONFIG_SHAPER is not set | 660 | # CONFIG_SHAPER is not set |
540 | # CONFIG_NETCONSOLE is not set | 661 | # CONFIG_NETCONSOLE is not set |
541 | # CONFIG_NETPOLL is not set | 662 | # CONFIG_NETPOLL is not set |
@@ -783,12 +904,14 @@ CONFIG_USB_UHCI_HCD=y | |||
783 | # | 904 | # |
784 | # may also be needed; see USB_STORAGE Help for more information | 905 | # may also be needed; see USB_STORAGE Help for more information |
785 | # | 906 | # |
907 | # CONFIG_USB_STORAGE is not set | ||
786 | # CONFIG_USB_LIBUSUAL is not set | 908 | # CONFIG_USB_LIBUSUAL is not set |
787 | 909 | ||
788 | # | 910 | # |
789 | # USB Imaging devices | 911 | # USB Imaging devices |
790 | # | 912 | # |
791 | # CONFIG_USB_MDC800 is not set | 913 | # CONFIG_USB_MDC800 is not set |
914 | # CONFIG_USB_MICROTEK is not set | ||
792 | CONFIG_USB_MON=y | 915 | CONFIG_USB_MON=y |
793 | 916 | ||
794 | # | 917 | # |
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index 558b0d348d4f..fca114252ac7 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_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.25-rc6 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Thu Mar 20 11:05:14 2008 | 4 | # Thu Mar 27 13:56:21 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -77,8 +77,6 @@ CONFIG_IKCONFIG_PROC=y | |||
77 | CONFIG_LOG_BUF_SHIFT=14 | 77 | CONFIG_LOG_BUF_SHIFT=14 |
78 | # CONFIG_CGROUPS is not set | 78 | # CONFIG_CGROUPS is not set |
79 | # CONFIG_GROUP_SCHED is not set | 79 | # CONFIG_GROUP_SCHED is not set |
80 | # CONFIG_USER_SCHED is not set | ||
81 | # CONFIG_CGROUP_SCHED is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 80 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 81 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 82 | # CONFIG_RELAY is not set |
@@ -272,7 +270,7 @@ CONFIG_PCI_SYSCALL=y | |||
272 | # CONFIG_PCIEPORTBUS is not set | 270 | # CONFIG_PCIEPORTBUS is not set |
273 | CONFIG_ARCH_SUPPORTS_MSI=y | 271 | CONFIG_ARCH_SUPPORTS_MSI=y |
274 | # CONFIG_PCI_MSI is not set | 272 | # CONFIG_PCI_MSI is not set |
275 | CONFIG_PCI_LEGACY=y | 273 | # CONFIG_PCI_LEGACY is not set |
276 | # CONFIG_PCI_DEBUG is not set | 274 | # CONFIG_PCI_DEBUG is not set |
277 | CONFIG_PCCARD=m | 275 | CONFIG_PCCARD=m |
278 | # CONFIG_PCMCIA_DEBUG is not set | 276 | # CONFIG_PCMCIA_DEBUG is not set |
@@ -1895,6 +1893,7 @@ CONFIG_PLIST=y | |||
1895 | CONFIG_HAS_IOMEM=y | 1893 | CONFIG_HAS_IOMEM=y |
1896 | CONFIG_HAS_IOPORT=y | 1894 | CONFIG_HAS_IOPORT=y |
1897 | CONFIG_HAS_DMA=y | 1895 | CONFIG_HAS_DMA=y |
1896 | CONFIG_HAVE_LMB=y | ||
1898 | 1897 | ||
1899 | # | 1898 | # |
1900 | # Kernel hacking | 1899 | # Kernel hacking |
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 57bd775ef777..12f9b5a80220 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_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.25-rc2 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Fri Feb 15 21:57:35 2008 | 4 | # Sat Apr 5 09:35:48 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -79,6 +79,7 @@ CONFIG_FAIR_GROUP_SCHED=y | |||
79 | CONFIG_USER_SCHED=y | 79 | CONFIG_USER_SCHED=y |
80 | # CONFIG_CGROUP_SCHED is not set | 80 | # CONFIG_CGROUP_SCHED is not set |
81 | CONFIG_SYSFS_DEPRECATED=y | 81 | CONFIG_SYSFS_DEPRECATED=y |
82 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
82 | # CONFIG_RELAY is not set | 83 | # CONFIG_RELAY is not set |
83 | # CONFIG_NAMESPACES is not set | 84 | # CONFIG_NAMESPACES is not set |
84 | CONFIG_BLK_DEV_INITRD=y | 85 | CONFIG_BLK_DEV_INITRD=y |
@@ -113,6 +114,7 @@ CONFIG_SLUB=y | |||
113 | CONFIG_HAVE_OPROFILE=y | 114 | CONFIG_HAVE_OPROFILE=y |
114 | # CONFIG_KPROBES is not set | 115 | # CONFIG_KPROBES is not set |
115 | CONFIG_HAVE_KPROBES=y | 116 | CONFIG_HAVE_KPROBES=y |
117 | CONFIG_HAVE_KRETPROBES=y | ||
116 | CONFIG_PROC_PAGE_MONITOR=y | 118 | CONFIG_PROC_PAGE_MONITOR=y |
117 | CONFIG_SLABINFO=y | 119 | CONFIG_SLABINFO=y |
118 | CONFIG_RT_MUTEXES=y | 120 | CONFIG_RT_MUTEXES=y |
@@ -143,7 +145,6 @@ CONFIG_DEFAULT_AS=y | |||
143 | # CONFIG_DEFAULT_NOOP is not set | 145 | # CONFIG_DEFAULT_NOOP is not set |
144 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 146 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
145 | CONFIG_CLASSIC_RCU=y | 147 | CONFIG_CLASSIC_RCU=y |
146 | # CONFIG_PREEMPT_RCU is not set | ||
147 | CONFIG_PPC4xx_PCI_EXPRESS=y | 148 | CONFIG_PPC4xx_PCI_EXPRESS=y |
148 | 149 | ||
149 | # | 150 | # |
@@ -161,12 +162,15 @@ CONFIG_TAISHAN=y | |||
161 | CONFIG_KATMAI=y | 162 | CONFIG_KATMAI=y |
162 | CONFIG_RAINIER=y | 163 | CONFIG_RAINIER=y |
163 | CONFIG_WARP=y | 164 | CONFIG_WARP=y |
165 | CONFIG_CANYONLANDS=y | ||
166 | CONFIG_YOSEMITE=y | ||
164 | CONFIG_440EP=y | 167 | CONFIG_440EP=y |
165 | CONFIG_440EPX=y | 168 | CONFIG_440EPX=y |
166 | CONFIG_440GRX=y | 169 | CONFIG_440GRX=y |
167 | CONFIG_440GP=y | 170 | CONFIG_440GP=y |
168 | CONFIG_440GX=y | 171 | CONFIG_440GX=y |
169 | CONFIG_440SPe=y | 172 | CONFIG_440SPe=y |
173 | CONFIG_460EX=y | ||
170 | CONFIG_IBM440EP_ERR42=y | 174 | CONFIG_IBM440EP_ERR42=y |
171 | # CONFIG_IPIC is not set | 175 | # CONFIG_IPIC is not set |
172 | # CONFIG_MPIC is not set | 176 | # CONFIG_MPIC is not set |
@@ -199,7 +203,6 @@ CONFIG_HZ=250 | |||
199 | CONFIG_PREEMPT_NONE=y | 203 | CONFIG_PREEMPT_NONE=y |
200 | # CONFIG_PREEMPT_VOLUNTARY is not set | 204 | # CONFIG_PREEMPT_VOLUNTARY is not set |
201 | # CONFIG_PREEMPT is not set | 205 | # CONFIG_PREEMPT is not set |
202 | # CONFIG_RCU_TRACE is not set | ||
203 | CONFIG_BINFMT_ELF=y | 206 | CONFIG_BINFMT_ELF=y |
204 | # CONFIG_BINFMT_MISC is not set | 207 | # CONFIG_BINFMT_MISC is not set |
205 | CONFIG_MATH_EMULATION=y | 208 | CONFIG_MATH_EMULATION=y |
@@ -232,6 +235,7 @@ CONFIG_ISA_DMA_API=y | |||
232 | # | 235 | # |
233 | CONFIG_ZONE_DMA=y | 236 | CONFIG_ZONE_DMA=y |
234 | CONFIG_PPC_INDIRECT_PCI=y | 237 | CONFIG_PPC_INDIRECT_PCI=y |
238 | CONFIG_4xx_SOC=y | ||
235 | CONFIG_PCI=y | 239 | CONFIG_PCI=y |
236 | CONFIG_PCI_DOMAINS=y | 240 | CONFIG_PCI_DOMAINS=y |
237 | CONFIG_PCI_SYSCALL=y | 241 | CONFIG_PCI_SYSCALL=y |
@@ -678,6 +682,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
678 | # CONFIG_INFINIBAND is not set | 682 | # CONFIG_INFINIBAND is not set |
679 | # CONFIG_EDAC is not set | 683 | # CONFIG_EDAC is not set |
680 | # CONFIG_RTC_CLASS is not set | 684 | # CONFIG_RTC_CLASS is not set |
685 | # CONFIG_DMADEVICES is not set | ||
681 | 686 | ||
682 | # | 687 | # |
683 | # Userspace I/O | 688 | # Userspace I/O |
@@ -805,6 +810,7 @@ CONFIG_PLIST=y | |||
805 | CONFIG_HAS_IOMEM=y | 810 | CONFIG_HAS_IOMEM=y |
806 | CONFIG_HAS_IOPORT=y | 811 | CONFIG_HAS_IOPORT=y |
807 | CONFIG_HAS_DMA=y | 812 | CONFIG_HAS_DMA=y |
813 | CONFIG_HAVE_LMB=y | ||
808 | 814 | ||
809 | # | 815 | # |
810 | # Kernel hacking | 816 | # Kernel hacking |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 880ab7ad10c1..970282b1a004 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_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.25-rc6 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Thu Mar 20 11:06:28 2008 | 4 | # Thu Mar 27 13:56:24 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -84,8 +84,6 @@ CONFIG_CGROUPS=y | |||
84 | # CONFIG_CGROUP_NS is not set | 84 | # CONFIG_CGROUP_NS is not set |
85 | CONFIG_CPUSETS=y | 85 | CONFIG_CPUSETS=y |
86 | # CONFIG_GROUP_SCHED is not set | 86 | # CONFIG_GROUP_SCHED is not set |
87 | # CONFIG_USER_SCHED is not set | ||
88 | # CONFIG_CGROUP_SCHED is not set | ||
89 | # CONFIG_CGROUP_CPUACCT is not set | 87 | # CONFIG_CGROUP_CPUACCT is not set |
90 | # CONFIG_RESOURCE_COUNTERS is not set | 88 | # CONFIG_RESOURCE_COUNTERS is not set |
91 | CONFIG_SYSFS_DEPRECATED=y | 89 | CONFIG_SYSFS_DEPRECATED=y |
@@ -289,6 +287,7 @@ CONFIG_ARCH_HAS_WALK_MEMORY=y | |||
289 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 287 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
290 | CONFIG_KEXEC=y | 288 | CONFIG_KEXEC=y |
291 | # CONFIG_CRASH_DUMP is not set | 289 | # CONFIG_CRASH_DUMP is not set |
290 | # CONFIG_PHYP_DUMP is not set | ||
292 | CONFIG_IRQ_ALL_CPUS=y | 291 | CONFIG_IRQ_ALL_CPUS=y |
293 | # CONFIG_NUMA is not set | 292 | # CONFIG_NUMA is not set |
294 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 293 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
@@ -335,7 +334,7 @@ CONFIG_PCI_SYSCALL=y | |||
335 | # CONFIG_PCIEPORTBUS is not set | 334 | # CONFIG_PCIEPORTBUS is not set |
336 | CONFIG_ARCH_SUPPORTS_MSI=y | 335 | CONFIG_ARCH_SUPPORTS_MSI=y |
337 | CONFIG_PCI_MSI=y | 336 | CONFIG_PCI_MSI=y |
338 | CONFIG_PCI_LEGACY=y | 337 | # CONFIG_PCI_LEGACY is not set |
339 | # CONFIG_PCI_DEBUG is not set | 338 | # CONFIG_PCI_DEBUG is not set |
340 | CONFIG_PCCARD=y | 339 | CONFIG_PCCARD=y |
341 | # CONFIG_PCMCIA_DEBUG is not set | 340 | # CONFIG_PCMCIA_DEBUG is not set |
@@ -1881,6 +1880,7 @@ CONFIG_PLIST=y | |||
1881 | CONFIG_HAS_IOMEM=y | 1880 | CONFIG_HAS_IOMEM=y |
1882 | CONFIG_HAS_IOPORT=y | 1881 | CONFIG_HAS_IOPORT=y |
1883 | CONFIG_HAS_DMA=y | 1882 | CONFIG_HAS_DMA=y |
1883 | CONFIG_HAVE_LMB=y | ||
1884 | 1884 | ||
1885 | # | 1885 | # |
1886 | # Kernel hacking | 1886 | # Kernel hacking |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 755aca72b522..3e2593c60b12 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_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.25-rc6 | 3 | # Linux kernel version: 2.6.25-rc6 |
4 | # Thu Mar 20 11:08:01 2008 | 4 | # Thu Mar 27 13:56:28 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -83,8 +83,6 @@ CONFIG_CGROUPS=y | |||
83 | CONFIG_CGROUP_NS=y | 83 | CONFIG_CGROUP_NS=y |
84 | CONFIG_CPUSETS=y | 84 | CONFIG_CPUSETS=y |
85 | # CONFIG_GROUP_SCHED is not set | 85 | # CONFIG_GROUP_SCHED is not set |
86 | # CONFIG_USER_SCHED is not set | ||
87 | # CONFIG_CGROUP_SCHED is not set | ||
88 | CONFIG_CGROUP_CPUACCT=y | 86 | CONFIG_CGROUP_CPUACCT=y |
89 | # CONFIG_RESOURCE_COUNTERS is not set | 87 | # CONFIG_RESOURCE_COUNTERS is not set |
90 | CONFIG_SYSFS_DEPRECATED=y | 88 | CONFIG_SYSFS_DEPRECATED=y |
@@ -237,6 +235,7 @@ CONFIG_ARCH_HAS_WALK_MEMORY=y | |||
237 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 235 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
238 | CONFIG_KEXEC=y | 236 | CONFIG_KEXEC=y |
239 | # CONFIG_CRASH_DUMP is not set | 237 | # CONFIG_CRASH_DUMP is not set |
238 | # CONFIG_PHYP_DUMP is not set | ||
240 | CONFIG_IRQ_ALL_CPUS=y | 239 | CONFIG_IRQ_ALL_CPUS=y |
241 | CONFIG_NUMA=y | 240 | CONFIG_NUMA=y |
242 | CONFIG_NODES_SHIFT=4 | 241 | CONFIG_NODES_SHIFT=4 |
@@ -283,7 +282,7 @@ CONFIG_PCI_SYSCALL=y | |||
283 | # CONFIG_PCIEPORTBUS is not set | 282 | # CONFIG_PCIEPORTBUS is not set |
284 | CONFIG_ARCH_SUPPORTS_MSI=y | 283 | CONFIG_ARCH_SUPPORTS_MSI=y |
285 | CONFIG_PCI_MSI=y | 284 | CONFIG_PCI_MSI=y |
286 | CONFIG_PCI_LEGACY=y | 285 | # CONFIG_PCI_LEGACY is not set |
287 | # CONFIG_PCI_DEBUG is not set | 286 | # CONFIG_PCI_DEBUG is not set |
288 | # CONFIG_PCCARD is not set | 287 | # CONFIG_PCCARD is not set |
289 | CONFIG_HOTPLUG_PCI=m | 288 | CONFIG_HOTPLUG_PCI=m |
@@ -1519,6 +1518,7 @@ CONFIG_PLIST=y | |||
1519 | CONFIG_HAS_IOMEM=y | 1518 | CONFIG_HAS_IOMEM=y |
1520 | CONFIG_HAS_IOPORT=y | 1519 | CONFIG_HAS_IOPORT=y |
1521 | CONFIG_HAS_DMA=y | 1520 | CONFIG_HAS_DMA=y |
1521 | CONFIG_HAVE_LMB=y | ||
1522 | 1522 | ||
1523 | # | 1523 | # |
1524 | # Kernel hacking | 1524 | # Kernel hacking |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 4b749c416464..e932b43bd82f 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #ifdef CONFIG_PPC64 | 26 | #ifdef CONFIG_PPC64 |
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
29 | #else | ||
30 | #include <linux/ptrace.h> | ||
31 | #endif | 29 | #endif |
32 | 30 | ||
33 | #include <asm/io.h> | 31 | #include <asm/io.h> |
@@ -60,7 +58,6 @@ int main(void) | |||
60 | DEFINE(AUDITCONTEXT, offsetof(struct task_struct, audit_context)); | 58 | DEFINE(AUDITCONTEXT, offsetof(struct task_struct, audit_context)); |
61 | #else | 59 | #else |
62 | DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); | 60 | DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); |
63 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); | ||
64 | #endif /* CONFIG_PPC64 */ | 61 | #endif /* CONFIG_PPC64 */ |
65 | 62 | ||
66 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); | 63 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); |
@@ -80,7 +77,6 @@ int main(void) | |||
80 | DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); | 77 | DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); |
81 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | 78 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) |
82 | DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); | 79 | DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); |
83 | DEFINE(PT_PTRACED, PT_PTRACED); | ||
84 | #endif | 80 | #endif |
85 | #ifdef CONFIG_SPE | 81 | #ifdef CONFIG_SPE |
86 | DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0])); | 82 | DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0])); |
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 80e2eef05b2e..9f9377745490 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/lmb.h> | ||
10 | 11 | ||
11 | #include <asm/sections.h> | 12 | #include <asm/sections.h> |
12 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
@@ -15,7 +16,7 @@ | |||
15 | #include <asm/mmu.h> | 16 | #include <asm/mmu.h> |
16 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <asm/lmb.h> | 19 | #include <asm/prom.h> |
19 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
20 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
21 | 22 | ||
diff --git a/arch/powerpc/kernel/cpu_setup_44x.S b/arch/powerpc/kernel/cpu_setup_44x.S index 6250443ab9c9..5465e8de0e61 100644 --- a/arch/powerpc/kernel/cpu_setup_44x.S +++ b/arch/powerpc/kernel/cpu_setup_44x.S | |||
@@ -3,7 +3,7 @@ | |||
3 | * Valentine Barshak <vbarshak@ru.mvista.com> | 3 | * Valentine Barshak <vbarshak@ru.mvista.com> |
4 | * MontaVista Software, Inc (c) 2007 | 4 | * MontaVista Software, Inc (c) 2007 |
5 | * | 5 | * |
6 | * Based on cpu_setup_6xx code by | 6 | * Based on cpu_setup_6xx code by |
7 | * Benjamin Herrenschmidt <benh@kernel.crashing.org> | 7 | * Benjamin Herrenschmidt <benh@kernel.crashing.org> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
@@ -32,6 +32,9 @@ _GLOBAL(__setup_cpu_440grx) | |||
32 | bl __fixup_440A_mcheck | 32 | bl __fixup_440A_mcheck |
33 | mtlr r4 | 33 | mtlr r4 |
34 | blr | 34 | blr |
35 | _GLOBAL(__setup_cpu_460ex) | ||
36 | _GLOBAL(__setup_cpu_460gt) | ||
37 | b __init_fpu_44x | ||
35 | _GLOBAL(__setup_cpu_440gx) | 38 | _GLOBAL(__setup_cpu_440gx) |
36 | _GLOBAL(__setup_cpu_440spe) | 39 | _GLOBAL(__setup_cpu_440spe) |
37 | b __fixup_440A_mcheck | 40 | b __fixup_440A_mcheck |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 2a8f5cc5184f..26ffb44e2701 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -36,6 +36,8 @@ extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); | |||
36 | extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); | 36 | extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); |
37 | extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); | 37 | extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); |
38 | extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec); | 38 | extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec); |
39 | extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec); | ||
40 | extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec); | ||
39 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); | 41 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); |
40 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); | 42 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); |
41 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); | 43 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); |
@@ -1397,6 +1399,30 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
1397 | .machine_check = machine_check_440A, | 1399 | .machine_check = machine_check_440A, |
1398 | .platform = "ppc440", | 1400 | .platform = "ppc440", |
1399 | }, | 1401 | }, |
1402 | { /* 460EX */ | ||
1403 | .pvr_mask = 0xffff0002, | ||
1404 | .pvr_value = 0x13020002, | ||
1405 | .cpu_name = "460EX", | ||
1406 | .cpu_features = CPU_FTRS_44X, | ||
1407 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | ||
1408 | .icache_bsize = 32, | ||
1409 | .dcache_bsize = 32, | ||
1410 | .cpu_setup = __setup_cpu_460ex, | ||
1411 | .machine_check = machine_check_440A, | ||
1412 | .platform = "ppc440", | ||
1413 | }, | ||
1414 | { /* 460GT */ | ||
1415 | .pvr_mask = 0xffff0002, | ||
1416 | .pvr_value = 0x13020000, | ||
1417 | .cpu_name = "460GT", | ||
1418 | .cpu_features = CPU_FTRS_44X, | ||
1419 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | ||
1420 | .icache_bsize = 32, | ||
1421 | .dcache_bsize = 32, | ||
1422 | .cpu_setup = __setup_cpu_460gt, | ||
1423 | .machine_check = machine_check_440A, | ||
1424 | .platform = "ppc440", | ||
1425 | }, | ||
1400 | #endif /* CONFIG_44x */ | 1426 | #endif /* CONFIG_44x */ |
1401 | #ifdef CONFIG_FSL_BOOKE | 1427 | #ifdef CONFIG_FSL_BOOKE |
1402 | #ifdef CONFIG_E200 | 1428 | #ifdef CONFIG_E200 |
@@ -1512,7 +1538,7 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | |||
1512 | *t = *s; | 1538 | *t = *s; |
1513 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; | 1539 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; |
1514 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) | 1540 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) |
1515 | /* ppc64 and booke expect identify_cpu to also call | 1541 | /* ppc64 and booke expect identify_cpu to also call |
1516 | * setup_cpu for that processor. I will consolidate | 1542 | * setup_cpu for that processor. I will consolidate |
1517 | * that at a later time, for now, just use #ifdef. | 1543 | * that at a later time, for now, just use #ifdef. |
1518 | * we also don't need to PTRRELOC the function pointer | 1544 | * we also don't need to PTRRELOC the function pointer |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 571132ed12c1..eae401de3f76 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -24,12 +24,13 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/lmb.h> | ||
27 | 28 | ||
28 | #include <asm/processor.h> | 29 | #include <asm/processor.h> |
29 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
30 | #include <asm/kexec.h> | 31 | #include <asm/kexec.h> |
31 | #include <asm/kdump.h> | 32 | #include <asm/kdump.h> |
32 | #include <asm/lmb.h> | 33 | #include <asm/prom.h> |
33 | #include <asm/firmware.h> | 34 | #include <asm/firmware.h> |
34 | #include <asm/smp.h> | 35 | #include <asm/smp.h> |
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 29ff77c468ac..9ee3c5278db0 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -13,8 +13,9 @@ | |||
13 | 13 | ||
14 | #include <linux/crash_dump.h> | 14 | #include <linux/crash_dump.h> |
15 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
16 | #include <linux/lmb.h> | ||
16 | #include <asm/kdump.h> | 17 | #include <asm/kdump.h> |
17 | #include <asm/lmb.h> | 18 | #include <asm/prom.h> |
18 | #include <asm/firmware.h> | 19 | #include <asm/firmware.h> |
19 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
20 | 21 | ||
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 0f4fac512020..c16d1354b19d 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -763,23 +763,6 @@ load_up_altivec: | |||
763 | b fast_exception_return | 763 | b fast_exception_return |
764 | 764 | ||
765 | /* | 765 | /* |
766 | * AltiVec unavailable trap from kernel - print a message, but let | ||
767 | * the task use AltiVec in the kernel until it returns to user mode. | ||
768 | */ | ||
769 | KernelAltiVec: | ||
770 | lwz r3,_MSR(r1) | ||
771 | oris r3,r3,MSR_VEC@h | ||
772 | stw r3,_MSR(r1) /* enable use of AltiVec after return */ | ||
773 | lis r3,87f@h | ||
774 | ori r3,r3,87f@l | ||
775 | mr r4,r2 /* current */ | ||
776 | lwz r5,_NIP(r1) | ||
777 | bl printk | ||
778 | b ret_from_except | ||
779 | 87: .string "AltiVec used in kernel (task=%p, pc=%x) \n" | ||
780 | .align 4,0 | ||
781 | |||
782 | /* | ||
783 | * giveup_altivec(tsk) | 766 | * giveup_altivec(tsk) |
784 | * Disable AltiVec for the task given as the argument, | 767 | * Disable AltiVec for the task given as the argument, |
785 | * and save the AltiVec registers in its thread_struct. | 768 | * and save the AltiVec registers in its thread_struct. |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 2f50bb5d00f9..9971159c8040 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -183,7 +183,7 @@ static int ibmebus_create_devices(const struct of_device_id *matches) | |||
183 | ret = ibmebus_create_device(child); | 183 | ret = ibmebus_create_device(child); |
184 | if (ret) { | 184 | if (ret) { |
185 | printk(KERN_ERR "%s: failed to create device (%i)", | 185 | printk(KERN_ERR "%s: failed to create device (%i)", |
186 | __FUNCTION__, ret); | 186 | __func__, ret); |
187 | of_node_put(child); | 187 | of_node_put(child); |
188 | break; | 188 | break; |
189 | } | 189 | } |
@@ -269,7 +269,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
269 | if (bus_find_device(&ibmebus_bus_type, NULL, path, | 269 | if (bus_find_device(&ibmebus_bus_type, NULL, path, |
270 | ibmebus_match_path)) { | 270 | ibmebus_match_path)) { |
271 | printk(KERN_WARNING "%s: %s has already been probed\n", | 271 | printk(KERN_WARNING "%s: %s has already been probed\n", |
272 | __FUNCTION__, path); | 272 | __func__, path); |
273 | rc = -EEXIST; | 273 | rc = -EEXIST; |
274 | goto out; | 274 | goto out; |
275 | } | 275 | } |
@@ -279,7 +279,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
279 | of_node_put(dn); | 279 | of_node_put(dn); |
280 | } else { | 280 | } else { |
281 | printk(KERN_WARNING "%s: no such device node: %s\n", | 281 | printk(KERN_WARNING "%s: no such device node: %s\n", |
282 | __FUNCTION__, path); | 282 | __func__, path); |
283 | rc = -ENODEV; | 283 | rc = -ENODEV; |
284 | } | 284 | } |
285 | 285 | ||
@@ -308,7 +308,7 @@ static ssize_t ibmebus_store_remove(struct bus_type *bus, | |||
308 | return count; | 308 | return count; |
309 | } else { | 309 | } else { |
310 | printk(KERN_WARNING "%s: %s not on the bus\n", | 310 | printk(KERN_WARNING "%s: %s not on the bus\n", |
311 | __FUNCTION__, path); | 311 | __func__, path); |
312 | 312 | ||
313 | kfree(path); | 313 | kfree(path); |
314 | return -ENODEV; | 314 | return -ENODEV; |
@@ -337,14 +337,14 @@ static int __init ibmebus_bus_init(void) | |||
337 | err = of_bus_type_init(&ibmebus_bus_type, "ibmebus"); | 337 | err = of_bus_type_init(&ibmebus_bus_type, "ibmebus"); |
338 | if (err) { | 338 | if (err) { |
339 | printk(KERN_ERR "%s: failed to register IBM eBus.\n", | 339 | printk(KERN_ERR "%s: failed to register IBM eBus.\n", |
340 | __FUNCTION__); | 340 | __func__); |
341 | return err; | 341 | return err; |
342 | } | 342 | } |
343 | 343 | ||
344 | err = device_register(&ibmebus_bus_device); | 344 | err = device_register(&ibmebus_bus_device); |
345 | if (err) { | 345 | if (err) { |
346 | printk(KERN_WARNING "%s: device_register returned %i\n", | 346 | printk(KERN_WARNING "%s: device_register returned %i\n", |
347 | __FUNCTION__, err); | 347 | __func__, err); |
348 | bus_unregister(&ibmebus_bus_type); | 348 | bus_unregister(&ibmebus_bus_type); |
349 | 349 | ||
350 | return err; | 350 | return err; |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 8f1f4e539c4b..0c663669bc32 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -520,7 +520,7 @@ void iommu_free_table(struct iommu_table *tbl, const char *node_name) | |||
520 | unsigned int order; | 520 | unsigned int order; |
521 | 521 | ||
522 | if (!tbl || !tbl->it_map) { | 522 | if (!tbl || !tbl->it_map) { |
523 | printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__, | 523 | printk(KERN_ERR "%s: expected TCE map for %s\n", __func__, |
524 | node_name); | 524 | node_name); |
525 | return; | 525 | return; |
526 | } | 526 | } |
@@ -530,7 +530,7 @@ void iommu_free_table(struct iommu_table *tbl, const char *node_name) | |||
530 | for (i = 0; i < (tbl->it_size/64); i++) { | 530 | for (i = 0; i < (tbl->it_size/64); i++) { |
531 | if (tbl->it_map[i] != 0) { | 531 | if (tbl->it_map[i] != 0) { |
532 | printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", | 532 | printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", |
533 | __FUNCTION__, node_name); | 533 | __func__, node_name); |
534 | break; | 534 | break; |
535 | } | 535 | } |
536 | } | 536 | } |
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c index ee172aa42aa7..289af348978d 100644 --- a/arch/powerpc/kernel/isa-bridge.c +++ b/arch/powerpc/kernel/isa-bridge.c | |||
@@ -80,13 +80,13 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, | |||
80 | * (size depending on dev->n_addr_cells) | 80 | * (size depending on dev->n_addr_cells) |
81 | * cell 5: the size of the range | 81 | * cell 5: the size of the range |
82 | */ | 82 | */ |
83 | if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) { | 83 | if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) { |
84 | range++; | 84 | range++; |
85 | rlen -= sizeof(struct isa_range); | 85 | rlen -= sizeof(struct isa_range); |
86 | if (rlen < sizeof(struct isa_range)) | 86 | if (rlen < sizeof(struct isa_range)) |
87 | goto inval_range; | 87 | goto inval_range; |
88 | } | 88 | } |
89 | if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) | 89 | if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) |
90 | goto inval_range; | 90 | goto inval_range; |
91 | 91 | ||
92 | isa_addr = range->isa_addr.a_lo; | 92 | isa_addr = range->isa_addr.a_lo; |
@@ -99,7 +99,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, | |||
99 | */ | 99 | */ |
100 | if ((pci_addr != 0) || (isa_addr != 0)) { | 100 | if ((pci_addr != 0) || (isa_addr != 0)) { |
101 | printk(KERN_ERR "unexpected isa to pci mapping: %s\n", | 101 | printk(KERN_ERR "unexpected isa to pci mapping: %s\n", |
102 | __FUNCTION__); | 102 | __func__); |
103 | return; | 103 | return; |
104 | } | 104 | } |
105 | 105 | ||
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index dcb89a88df46..1ffacc698ffb 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -226,7 +226,7 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
226 | unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); | 226 | unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); |
227 | if (!local_buffer) { | 227 | if (!local_buffer) { |
228 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", | 228 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", |
229 | __FILE__, __FUNCTION__, __LINE__); | 229 | __FILE__, __func__, __LINE__); |
230 | return; | 230 | return; |
231 | } | 231 | } |
232 | 232 | ||
@@ -243,14 +243,14 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
243 | if (call_status != 0) { | 243 | if (call_status != 0) { |
244 | printk(KERN_INFO | 244 | printk(KERN_INFO |
245 | "%s %s Error calling get-system-parameter (0x%x)\n", | 245 | "%s %s Error calling get-system-parameter (0x%x)\n", |
246 | __FILE__, __FUNCTION__, call_status); | 246 | __FILE__, __func__, call_status); |
247 | } else { | 247 | } else { |
248 | int splpar_strlen; | 248 | int splpar_strlen; |
249 | int idx, w_idx; | 249 | int idx, w_idx; |
250 | char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); | 250 | char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); |
251 | if (!workbuffer) { | 251 | if (!workbuffer) { |
252 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", | 252 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", |
253 | __FILE__, __FUNCTION__, __LINE__); | 253 | __FILE__, __func__, __LINE__); |
254 | kfree(local_buffer); | 254 | kfree(local_buffer); |
255 | return; | 255 | return; |
256 | } | 256 | } |
@@ -484,10 +484,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
484 | current_weight = (resource >> 5 * 8) & 0xFF; | 484 | current_weight = (resource >> 5 * 8) & 0xFF; |
485 | 485 | ||
486 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", | 486 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", |
487 | __FUNCTION__, current_entitled, current_weight); | 487 | __func__, current_entitled, current_weight); |
488 | 488 | ||
489 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", | 489 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", |
490 | __FUNCTION__, *new_entitled_ptr, *new_weight_ptr); | 490 | __func__, *new_entitled_ptr, *new_weight_ptr); |
491 | 491 | ||
492 | retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, | 492 | retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, |
493 | *new_weight_ptr); | 493 | *new_weight_ptr); |
@@ -502,7 +502,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
502 | retval = -EINVAL; | 502 | retval = -EINVAL; |
503 | } else { | 503 | } else { |
504 | printk(KERN_WARNING "%s: received unknown hv return code %ld", | 504 | printk(KERN_WARNING "%s: received unknown hv return code %ld", |
505 | __FUNCTION__, retval); | 505 | __func__, retval); |
506 | retval = -EIO; | 506 | retval = -EIO; |
507 | } | 507 | } |
508 | 508 | ||
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index c0c8e8c3ced9..2d202f274e73 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -12,8 +12,9 @@ | |||
12 | #include <linux/kexec.h> | 12 | #include <linux/kexec.h> |
13 | #include <linux/reboot.h> | 13 | #include <linux/reboot.h> |
14 | #include <linux/threads.h> | 14 | #include <linux/threads.h> |
15 | #include <linux/lmb.h> | ||
15 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
16 | #include <asm/lmb.h> | 17 | #include <asm/prom.h> |
17 | 18 | ||
18 | void machine_crash_shutdown(struct pt_regs *regs) | 19 | void machine_crash_shutdown(struct pt_regs *regs) |
19 | { | 20 | { |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 9c98424277a8..5a4c76eada48 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -58,7 +58,6 @@ extern void program_check_exception(struct pt_regs *regs); | |||
58 | extern void single_step_exception(struct pt_regs *regs); | 58 | extern void single_step_exception(struct pt_regs *regs); |
59 | extern int sys_sigreturn(struct pt_regs *regs); | 59 | extern int sys_sigreturn(struct pt_regs *regs); |
60 | 60 | ||
61 | EXPORT_SYMBOL(empty_zero_page); | ||
62 | EXPORT_SYMBOL(clear_pages); | 61 | EXPORT_SYMBOL(clear_pages); |
63 | EXPORT_SYMBOL(copy_page); | 62 | EXPORT_SYMBOL(copy_page); |
64 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); | 63 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); |
@@ -79,6 +78,7 @@ EXPORT_SYMBOL(strncpy); | |||
79 | EXPORT_SYMBOL(strcat); | 78 | EXPORT_SYMBOL(strcat); |
80 | EXPORT_SYMBOL(strlen); | 79 | EXPORT_SYMBOL(strlen); |
81 | EXPORT_SYMBOL(strcmp); | 80 | EXPORT_SYMBOL(strcmp); |
81 | EXPORT_SYMBOL(strncmp); | ||
82 | 82 | ||
83 | EXPORT_SYMBOL(csum_partial); | 83 | EXPORT_SYMBOL(csum_partial); |
84 | EXPORT_SYMBOL(csum_partial_copy_generic); | 84 | EXPORT_SYMBOL(csum_partial_copy_generic); |
@@ -192,3 +192,4 @@ EXPORT_SYMBOL(intercept_table); | |||
192 | EXPORT_SYMBOL(__mtdcr); | 192 | EXPORT_SYMBOL(__mtdcr); |
193 | EXPORT_SYMBOL(__mfdcr); | 193 | EXPORT_SYMBOL(__mfdcr); |
194 | #endif | 194 | #endif |
195 | EXPORT_SYMBOL(empty_zero_page); | ||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 4ec605521504..a27910207c7e 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -868,11 +868,6 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, | |||
868 | flush_spe_to_thread(current); | 868 | flush_spe_to_thread(current); |
869 | error = do_execve(filename, (char __user * __user *) a1, | 869 | error = do_execve(filename, (char __user * __user *) a1, |
870 | (char __user * __user *) a2, regs); | 870 | (char __user * __user *) a2, regs); |
871 | if (error == 0) { | ||
872 | task_lock(current); | ||
873 | current->ptrace &= ~PT_DTRACE; | ||
874 | task_unlock(current); | ||
875 | } | ||
876 | putname(filename); | 871 | putname(filename); |
877 | out: | 872 | out: |
878 | return error; | 873 | return error; |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index eac97f48b9b8..31d5b22c59a2 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -31,10 +31,10 @@ | |||
31 | #include <linux/kexec.h> | 31 | #include <linux/kexec.h> |
32 | #include <linux/debugfs.h> | 32 | #include <linux/debugfs.h> |
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/lmb.h> | ||
34 | 35 | ||
35 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
36 | #include <asm/rtas.h> | 37 | #include <asm/rtas.h> |
37 | #include <asm/lmb.h> | ||
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/processor.h> | 39 | #include <asm/processor.h> |
40 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/machdep.h> | 51 | #include <asm/machdep.h> |
52 | #include <asm/pSeries_reconfig.h> | 52 | #include <asm/pSeries_reconfig.h> |
53 | #include <asm/pci-bridge.h> | 53 | #include <asm/pci-bridge.h> |
54 | #include <asm/phyp_dump.h> | ||
54 | #include <asm/kexec.h> | 55 | #include <asm/kexec.h> |
55 | 56 | ||
56 | #ifdef DEBUG | 57 | #ifdef DEBUG |
@@ -436,7 +437,7 @@ early_param("mem", early_parse_mem); | |||
436 | * The device tree may be allocated beyond our memory limit, or inside the | 437 | * The device tree may be allocated beyond our memory limit, or inside the |
437 | * crash kernel region for kdump. If so, move it out of the way. | 438 | * crash kernel region for kdump. If so, move it out of the way. |
438 | */ | 439 | */ |
439 | static void move_device_tree(void) | 440 | static void __init move_device_tree(void) |
440 | { | 441 | { |
441 | unsigned long start, size; | 442 | unsigned long start, size; |
442 | void *p; | 443 | void *p; |
@@ -1040,6 +1041,56 @@ static void __init early_reserve_mem(void) | |||
1040 | #endif | 1041 | #endif |
1041 | } | 1042 | } |
1042 | 1043 | ||
1044 | #ifdef CONFIG_PHYP_DUMP | ||
1045 | /** | ||
1046 | * phyp_dump_reserve_mem() - reserve all not-yet-dumped mmemory | ||
1047 | * | ||
1048 | * This routine may reserve memory regions in the kernel only | ||
1049 | * if the system is supported and a dump was taken in last | ||
1050 | * boot instance or if the hardware is supported and the | ||
1051 | * scratch area needs to be setup. In other instances it returns | ||
1052 | * without reserving anything. The memory in case of dump being | ||
1053 | * active is freed when the dump is collected (by userland tools). | ||
1054 | */ | ||
1055 | static void __init phyp_dump_reserve_mem(void) | ||
1056 | { | ||
1057 | unsigned long base, size; | ||
1058 | if (!phyp_dump_info->phyp_dump_configured) { | ||
1059 | printk(KERN_ERR "Phyp-dump not supported on this hardware\n"); | ||
1060 | return; | ||
1061 | } | ||
1062 | |||
1063 | if (!phyp_dump_info->phyp_dump_at_boot) { | ||
1064 | printk(KERN_INFO "Phyp-dump disabled at boot time\n"); | ||
1065 | return; | ||
1066 | } | ||
1067 | |||
1068 | if (phyp_dump_info->phyp_dump_is_active) { | ||
1069 | /* Reserve *everything* above RMR.Area freed by userland tools*/ | ||
1070 | base = PHYP_DUMP_RMR_END; | ||
1071 | size = lmb_end_of_DRAM() - base; | ||
1072 | |||
1073 | /* XXX crashed_ram_end is wrong, since it may be beyond | ||
1074 | * the memory_limit, it will need to be adjusted. */ | ||
1075 | lmb_reserve(base, size); | ||
1076 | |||
1077 | phyp_dump_info->init_reserve_start = base; | ||
1078 | phyp_dump_info->init_reserve_size = size; | ||
1079 | } else { | ||
1080 | size = phyp_dump_info->cpu_state_size + | ||
1081 | phyp_dump_info->hpte_region_size + | ||
1082 | PHYP_DUMP_RMR_END; | ||
1083 | base = lmb_end_of_DRAM() - size; | ||
1084 | lmb_reserve(base, size); | ||
1085 | phyp_dump_info->init_reserve_start = base; | ||
1086 | phyp_dump_info->init_reserve_size = size; | ||
1087 | } | ||
1088 | } | ||
1089 | #else | ||
1090 | static inline void __init phyp_dump_reserve_mem(void) {} | ||
1091 | #endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */ | ||
1092 | |||
1093 | |||
1043 | void __init early_init_devtree(void *params) | 1094 | void __init early_init_devtree(void *params) |
1044 | { | 1095 | { |
1045 | DBG(" -> early_init_devtree(%p)\n", params); | 1096 | DBG(" -> early_init_devtree(%p)\n", params); |
@@ -1052,6 +1103,11 @@ void __init early_init_devtree(void *params) | |||
1052 | of_scan_flat_dt(early_init_dt_scan_rtas, NULL); | 1103 | of_scan_flat_dt(early_init_dt_scan_rtas, NULL); |
1053 | #endif | 1104 | #endif |
1054 | 1105 | ||
1106 | #ifdef CONFIG_PHYP_DUMP | ||
1107 | /* scan tree to see if dump occured during last boot */ | ||
1108 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); | ||
1109 | #endif | ||
1110 | |||
1055 | /* Retrieve various informations from the /chosen node of the | 1111 | /* Retrieve various informations from the /chosen node of the |
1056 | * device-tree, including the platform type, initrd location and | 1112 | * device-tree, including the platform type, initrd location and |
1057 | * size, TCE reserve, and more ... | 1113 | * size, TCE reserve, and more ... |
@@ -1072,6 +1128,7 @@ void __init early_init_devtree(void *params) | |||
1072 | reserve_kdump_trampoline(); | 1128 | reserve_kdump_trampoline(); |
1073 | reserve_crashkernel(); | 1129 | reserve_crashkernel(); |
1074 | early_reserve_mem(); | 1130 | early_reserve_mem(); |
1131 | phyp_dump_reserve_mem(); | ||
1075 | 1132 | ||
1076 | lmb_enforce_memory_limit(memory_limit); | 1133 | lmb_enforce_memory_limit(memory_limit); |
1077 | lmb_analyze(); | 1134 | lmb_analyze(); |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 52e95c2158c0..eb3beea4536e 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/completion.h> | 23 | #include <linux/completion.h> |
24 | #include <linux/cpumask.h> | 24 | #include <linux/cpumask.h> |
25 | #include <linux/lmb.h> | ||
25 | 26 | ||
26 | #include <asm/prom.h> | 27 | #include <asm/prom.h> |
27 | #include <asm/rtas.h> | 28 | #include <asm/rtas.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
35 | #include <asm/delay.h> | 36 | #include <asm/delay.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
37 | #include <asm/lmb.h> | ||
38 | #include <asm/udbg.h> | 38 | #include <asm/udbg.h> |
39 | #include <asm/syscalls.h> | 39 | #include <asm/syscalls.h> |
40 | #include <asm/smp.h> | 40 | #include <asm/smp.h> |
@@ -507,7 +507,7 @@ int rtas_error_rc(int rtas_rc) | |||
507 | break; | 507 | break; |
508 | default: | 508 | default: |
509 | printk(KERN_ERR "%s: unexpected RTAS error %d\n", | 509 | printk(KERN_ERR "%s: unexpected RTAS error %d\n", |
510 | __FUNCTION__, rtas_rc); | 510 | __func__, rtas_rc); |
511 | rc = -ERANGE; | 511 | rc = -ERANGE; |
512 | break; | 512 | break; |
513 | } | 513 | } |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 538baf46f15f..627f126d1848 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -807,7 +807,7 @@ int __init rtas_flash_init(void) | |||
807 | rtas_block_ctor); | 807 | rtas_block_ctor); |
808 | if (!flash_block_cache) { | 808 | if (!flash_block_cache) { |
809 | printk(KERN_ERR "%s: failed to create block cache\n", | 809 | printk(KERN_ERR "%s: failed to create block cache\n", |
810 | __FUNCTION__); | 810 | __func__); |
811 | rc = -ENOMEM; | 811 | rc = -ENOMEM; |
812 | goto cleanup; | 812 | goto cleanup; |
813 | } | 813 | } |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 433a0a0949fb..3ab88a9dc70d 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -56,21 +56,6 @@ static inline int config_access_valid(struct pci_dn *dn, int where) | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int of_device_available(struct device_node * dn) | ||
60 | { | ||
61 | const char *status; | ||
62 | |||
63 | status = of_get_property(dn, "status", NULL); | ||
64 | |||
65 | if (!status) | ||
66 | return 1; | ||
67 | |||
68 | if (!strcmp(status, "okay")) | ||
69 | return 1; | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) | 59 | int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) |
75 | { | 60 | { |
76 | int returnval = -1; | 61 | int returnval = -1; |
@@ -117,7 +102,7 @@ static int rtas_pci_read_config(struct pci_bus *bus, | |||
117 | for (dn = busdn->child; dn; dn = dn->sibling) { | 102 | for (dn = busdn->child; dn; dn = dn->sibling) { |
118 | struct pci_dn *pdn = PCI_DN(dn); | 103 | struct pci_dn *pdn = PCI_DN(dn); |
119 | if (pdn && pdn->devfn == devfn | 104 | if (pdn && pdn->devfn == devfn |
120 | && of_device_available(dn)) | 105 | && of_device_is_available(dn)) |
121 | return rtas_read_config(pdn, where, size, val); | 106 | return rtas_read_config(pdn, where, size, val); |
122 | } | 107 | } |
123 | 108 | ||
@@ -164,7 +149,7 @@ static int rtas_pci_write_config(struct pci_bus *bus, | |||
164 | for (dn = busdn->child; dn; dn = dn->sibling) { | 149 | for (dn = busdn->child; dn; dn = dn->sibling) { |
165 | struct pci_dn *pdn = PCI_DN(dn); | 150 | struct pci_dn *pdn = PCI_DN(dn); |
166 | if (pdn && pdn->devfn == devfn | 151 | if (pdn && pdn->devfn == devfn |
167 | && of_device_available(dn)) | 152 | && of_device_is_available(dn)) |
168 | return rtas_write_config(pdn, where, size, val); | 153 | return rtas_write_config(pdn, where, size, val); |
169 | } | 154 | } |
170 | return PCIBIOS_DEVICE_NOT_FOUND; | 155 | return PCIBIOS_DEVICE_NOT_FOUND; |
@@ -326,7 +311,7 @@ int pcibios_remove_root_bus(struct pci_controller *phb) | |||
326 | 311 | ||
327 | res = b->resource[0]; | 312 | res = b->resource[0]; |
328 | if (!res->flags) { | 313 | if (!res->flags) { |
329 | printk(KERN_ERR "%s: no IO resource for PHB %s\n", __FUNCTION__, | 314 | printk(KERN_ERR "%s: no IO resource for PHB %s\n", __func__, |
330 | b->name); | 315 | b->name); |
331 | return 1; | 316 | return 1; |
332 | } | 317 | } |
@@ -334,13 +319,13 @@ int pcibios_remove_root_bus(struct pci_controller *phb) | |||
334 | rc = pcibios_unmap_io_space(b); | 319 | rc = pcibios_unmap_io_space(b); |
335 | if (rc) { | 320 | if (rc) { |
336 | printk(KERN_ERR "%s: failed to unmap IO on bus %s\n", | 321 | printk(KERN_ERR "%s: failed to unmap IO on bus %s\n", |
337 | __FUNCTION__, b->name); | 322 | __func__, b->name); |
338 | return 1; | 323 | return 1; |
339 | } | 324 | } |
340 | 325 | ||
341 | if (release_resource(res)) { | 326 | if (release_resource(res)) { |
342 | printk(KERN_ERR "%s: failed to release IO on bus %s\n", | 327 | printk(KERN_ERR "%s: failed to release IO on bus %s\n", |
343 | __FUNCTION__, b->name); | 328 | __func__, b->name); |
344 | return 1; | 329 | return 1; |
345 | } | 330 | } |
346 | 331 | ||
@@ -348,13 +333,13 @@ int pcibios_remove_root_bus(struct pci_controller *phb) | |||
348 | res = b->resource[i]; | 333 | res = b->resource[i]; |
349 | if (!res->flags && i == 0) { | 334 | if (!res->flags && i == 0) { |
350 | printk(KERN_ERR "%s: no MEM resource for PHB %s\n", | 335 | printk(KERN_ERR "%s: no MEM resource for PHB %s\n", |
351 | __FUNCTION__, b->name); | 336 | __func__, b->name); |
352 | return 1; | 337 | return 1; |
353 | } | 338 | } |
354 | if (res->flags && release_resource(res)) { | 339 | if (res->flags && release_resource(res)) { |
355 | printk(KERN_ERR | 340 | printk(KERN_ERR |
356 | "%s: failed to release IO %d on bus %s\n", | 341 | "%s: failed to release IO %d on bus %s\n", |
357 | __FUNCTION__, i, b->name); | 342 | __func__, i, b->name); |
358 | return 1; | 343 | return 1; |
359 | } | 344 | } |
360 | } | 345 | } |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 6adb5a1e98bb..db540eab09f4 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/serial_8250.h> | 34 | #include <linux/serial_8250.h> |
35 | #include <linux/debugfs.h> | 35 | #include <linux/debugfs.h> |
36 | #include <linux/percpu.h> | 36 | #include <linux/percpu.h> |
37 | #include <linux/lmb.h> | ||
37 | #include <asm/io.h> | 38 | #include <asm/io.h> |
38 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
39 | #include <asm/processor.h> | 40 | #include <asm/processor.h> |
@@ -56,7 +57,6 @@ | |||
56 | #include <asm/cache.h> | 57 | #include <asm/cache.h> |
57 | #include <asm/page.h> | 58 | #include <asm/page.h> |
58 | #include <asm/mmu.h> | 59 | #include <asm/mmu.h> |
59 | #include <asm/lmb.h> | ||
60 | #include <asm/xmon.h> | 60 | #include <asm/xmon.h> |
61 | #include <asm/cputhreads.h> | 61 | #include <asm/cputhreads.h> |
62 | 62 | ||
@@ -167,6 +167,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
167 | unsigned short min; | 167 | unsigned short min; |
168 | 168 | ||
169 | if (cpu_id == NR_CPUS) { | 169 | if (cpu_id == NR_CPUS) { |
170 | struct device_node *root; | ||
171 | const char *model = NULL; | ||
170 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) | 172 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) |
171 | unsigned long bogosum = 0; | 173 | unsigned long bogosum = 0; |
172 | int i; | 174 | int i; |
@@ -178,6 +180,13 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
178 | seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); | 180 | seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); |
179 | if (ppc_md.name) | 181 | if (ppc_md.name) |
180 | seq_printf(m, "platform\t: %s\n", ppc_md.name); | 182 | seq_printf(m, "platform\t: %s\n", ppc_md.name); |
183 | root = of_find_node_by_path("/"); | ||
184 | if (root) | ||
185 | model = of_get_property(root, "model", NULL); | ||
186 | if (model) | ||
187 | seq_printf(m, "model\t\t: %s\n", model); | ||
188 | of_node_put(root); | ||
189 | |||
181 | if (ppc_md.show_cpuinfo != NULL) | 190 | if (ppc_md.show_cpuinfo != NULL) |
182 | ppc_md.show_cpuinfo(m); | 191 | ppc_md.show_cpuinfo(m); |
183 | 192 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index cd870a823d18..eac936eb3190 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -172,6 +172,18 @@ int __init ppc_setup_l2cr(char *str) | |||
172 | } | 172 | } |
173 | __setup("l2cr=", ppc_setup_l2cr); | 173 | __setup("l2cr=", ppc_setup_l2cr); |
174 | 174 | ||
175 | /* Checks "l3cr=xxxx" command-line option */ | ||
176 | int __init ppc_setup_l3cr(char *str) | ||
177 | { | ||
178 | if (cpu_has_feature(CPU_FTR_L3CR)) { | ||
179 | unsigned long val = simple_strtoul(str, NULL, 0); | ||
180 | printk(KERN_INFO "l3cr set to %lx\n", val); | ||
181 | _set_L3CR(val); /* and enable it */ | ||
182 | } | ||
183 | return 1; | ||
184 | } | ||
185 | __setup("l3cr=", ppc_setup_l3cr); | ||
186 | |||
175 | #ifdef CONFIG_GENERIC_NVRAM | 187 | #ifdef CONFIG_GENERIC_NVRAM |
176 | 188 | ||
177 | /* Generic nvram hooks used by drivers/char/gen_nvram.c */ | 189 | /* Generic nvram hooks used by drivers/char/gen_nvram.c */ |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 3b1529c103ef..2c2d8315193c 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/serial_8250.h> | 33 | #include <linux/serial_8250.h> |
34 | #include <linux/bootmem.h> | 34 | #include <linux/bootmem.h> |
35 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
36 | #include <linux/lmb.h> | ||
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
37 | #include <asm/kdump.h> | 38 | #include <asm/kdump.h> |
38 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
@@ -55,7 +56,6 @@ | |||
55 | #include <asm/cache.h> | 56 | #include <asm/cache.h> |
56 | #include <asm/page.h> | 57 | #include <asm/page.h> |
57 | #include <asm/mmu.h> | 58 | #include <asm/mmu.h> |
58 | #include <asm/lmb.h> | ||
59 | #include <asm/firmware.h> | 59 | #include <asm/firmware.h> |
60 | #include <asm/xmon.h> | 60 | #include <asm/xmon.h> |
61 | #include <asm/udbg.h> | 61 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 4a4f5c6b560b..9c3371e6958e 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -368,11 +368,6 @@ long compat_sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, | |||
368 | 368 | ||
369 | error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs); | 369 | error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs); |
370 | 370 | ||
371 | if (error == 0) { | ||
372 | task_lock(current); | ||
373 | current->ptrace &= ~PT_DTRACE; | ||
374 | task_unlock(current); | ||
375 | } | ||
376 | putname(filename); | 371 | putname(filename); |
377 | 372 | ||
378 | out: | 373 | out: |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index d3437c4c4a6f..c21a626af676 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -21,13 +21,14 @@ | |||
21 | #include <linux/elf.h> | 21 | #include <linux/elf.h> |
22 | #include <linux/security.h> | 22 | #include <linux/security.h> |
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/lmb.h> | ||
24 | 25 | ||
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
28 | #include <asm/mmu.h> | 29 | #include <asm/mmu.h> |
29 | #include <asm/mmu_context.h> | 30 | #include <asm/mmu_context.h> |
30 | #include <asm/lmb.h> | 31 | #include <asm/prom.h> |
31 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
32 | #include <asm/cputable.h> | 33 | #include <asm/cputable.h> |
33 | #include <asm/sections.h> | 34 | #include <asm/sections.h> |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index f98867252ee2..b77f8af7ddde 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -139,7 +139,7 @@ static int vio_bus_remove(struct device *dev) | |||
139 | */ | 139 | */ |
140 | int vio_register_driver(struct vio_driver *viodrv) | 140 | int vio_register_driver(struct vio_driver *viodrv) |
141 | { | 141 | { |
142 | printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__, | 142 | printk(KERN_DEBUG "%s: driver %s registering\n", __func__, |
143 | viodrv->driver.name); | 143 | viodrv->driver.name); |
144 | 144 | ||
145 | /* fill in 'struct driver' fields */ | 145 | /* fill in 'struct driver' fields */ |
@@ -184,7 +184,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
184 | /* we need the 'device_type' property, in order to match with drivers */ | 184 | /* we need the 'device_type' property, in order to match with drivers */ |
185 | if (of_node->type == NULL) { | 185 | if (of_node->type == NULL) { |
186 | printk(KERN_WARNING "%s: node %s missing 'device_type'\n", | 186 | printk(KERN_WARNING "%s: node %s missing 'device_type'\n", |
187 | __FUNCTION__, | 187 | __func__, |
188 | of_node->name ? of_node->name : "<unknown>"); | 188 | of_node->name ? of_node->name : "<unknown>"); |
189 | return NULL; | 189 | return NULL; |
190 | } | 190 | } |
@@ -192,7 +192,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
192 | unit_address = of_get_property(of_node, "reg", NULL); | 192 | unit_address = of_get_property(of_node, "reg", NULL); |
193 | if (unit_address == NULL) { | 193 | if (unit_address == NULL) { |
194 | printk(KERN_WARNING "%s: node %s missing 'reg'\n", | 194 | printk(KERN_WARNING "%s: node %s missing 'reg'\n", |
195 | __FUNCTION__, | 195 | __func__, |
196 | of_node->name ? of_node->name : "<unknown>"); | 196 | of_node->name ? of_node->name : "<unknown>"); |
197 | return NULL; | 197 | return NULL; |
198 | } | 198 | } |
@@ -227,7 +227,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
227 | /* register with generic device framework */ | 227 | /* register with generic device framework */ |
228 | if (device_register(&viodev->dev)) { | 228 | if (device_register(&viodev->dev)) { |
229 | printk(KERN_ERR "%s: failed to register device %s\n", | 229 | printk(KERN_ERR "%s: failed to register device %s\n", |
230 | __FUNCTION__, viodev->dev.bus_id); | 230 | __func__, viodev->dev.bus_id); |
231 | /* XXX free TCE table */ | 231 | /* XXX free TCE table */ |
232 | kfree(viodev); | 232 | kfree(viodev); |
233 | return NULL; | 233 | return NULL; |
@@ -258,7 +258,7 @@ static int __init vio_bus_init(void) | |||
258 | err = device_register(&vio_bus_device.dev); | 258 | err = device_register(&vio_bus_device.dev); |
259 | if (err) { | 259 | if (err) { |
260 | printk(KERN_WARNING "%s: device_register returned %i\n", | 260 | printk(KERN_WARNING "%s: device_register returned %i\n", |
261 | __FUNCTION__, err); | 261 | __func__, err); |
262 | return err; | 262 | return err; |
263 | } | 263 | } |
264 | 264 | ||
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index c4c622d8e6ac..49eb1f1a2bb4 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S | |||
@@ -75,6 +75,20 @@ _GLOBAL(strcmp) | |||
75 | beq 1b | 75 | beq 1b |
76 | blr | 76 | blr |
77 | 77 | ||
78 | _GLOBAL(strncmp) | ||
79 | PPC_LCMPI r5,0 | ||
80 | beqlr | ||
81 | mtctr r5 | ||
82 | addi r5,r3,-1 | ||
83 | addi r4,r4,-1 | ||
84 | 1: lbzu r3,1(r5) | ||
85 | cmpwi 1,r3,0 | ||
86 | lbzu r0,1(r4) | ||
87 | subf. r3,r0,r3 | ||
88 | beqlr 1 | ||
89 | bdnzt eq,1b | ||
90 | blr | ||
91 | |||
78 | _GLOBAL(strlen) | 92 | _GLOBAL(strlen) |
79 | addi r4,r3,-1 | 93 | addi r4,r3,-1 |
80 | 1: lbzu r0,1(r4) | 94 | 1: lbzu r0,1(r4) |
diff --git a/arch/powerpc/math-emu/fabs.c b/arch/powerpc/math-emu/fabs.c index 41f0617f3d3a..549baba5948f 100644 --- a/arch/powerpc/math-emu/fabs.c +++ b/arch/powerpc/math-emu/fabs.c | |||
@@ -9,7 +9,7 @@ fabs(u32 *frD, u32 *frB) | |||
9 | frD[1] = frB[1]; | 9 | frD[1] = frB[1]; |
10 | 10 | ||
11 | #ifdef DEBUG | 11 | #ifdef DEBUG |
12 | printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); | 12 | printk("%s: D %p, B %p: ", __func__, frD, frB); |
13 | dump_double(frD); | 13 | dump_double(frD); |
14 | printk("\n"); | 14 | printk("\n"); |
15 | #endif | 15 | #endif |
diff --git a/arch/powerpc/math-emu/fadd.c b/arch/powerpc/math-emu/fadd.c index fc8836488b64..7befbbf2c332 100644 --- a/arch/powerpc/math-emu/fadd.c +++ b/arch/powerpc/math-emu/fadd.c | |||
@@ -14,7 +14,7 @@ fadd(void *frD, void *frA, void *frB) | |||
14 | int ret = 0; | 14 | int ret = 0; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 17 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | __FP_UNPACK_D(A, frA); | 20 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fadds.c b/arch/powerpc/math-emu/fadds.c index 93025b6c8f3c..2b346b38b480 100644 --- a/arch/powerpc/math-emu/fadds.c +++ b/arch/powerpc/math-emu/fadds.c | |||
@@ -15,7 +15,7 @@ fadds(void *frD, void *frA, void *frB) | |||
15 | int ret = 0; | 15 | int ret = 0; |
16 | 16 | ||
17 | #ifdef DEBUG | 17 | #ifdef DEBUG |
18 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | __FP_UNPACK_D(A, frA); | 21 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fcmpo.c b/arch/powerpc/math-emu/fcmpo.c index 4efac394b4cb..36d689044c63 100644 --- a/arch/powerpc/math-emu/fcmpo.c +++ b/arch/powerpc/math-emu/fcmpo.c | |||
@@ -15,7 +15,7 @@ fcmpo(u32 *ccr, int crfD, void *frA, void *frB) | |||
15 | int ret = 0; | 15 | int ret = 0; |
16 | 16 | ||
17 | #ifdef DEBUG | 17 | #ifdef DEBUG |
18 | printk("%s: %p (%08x) %d %p %p\n", __FUNCTION__, ccr, *ccr, crfD, frA, frB); | 18 | printk("%s: %p (%08x) %d %p %p\n", __func__, ccr, *ccr, crfD, frA, frB); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | __FP_UNPACK_D(A, frA); | 21 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fcmpu.c b/arch/powerpc/math-emu/fcmpu.c index b7e33176e618..53d93894f2a6 100644 --- a/arch/powerpc/math-emu/fcmpu.c +++ b/arch/powerpc/math-emu/fcmpu.c | |||
@@ -14,7 +14,7 @@ fcmpu(u32 *ccr, int crfD, void *frA, void *frB) | |||
14 | long cmp; | 14 | long cmp; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: %p (%08x) %d %p %p\n", __FUNCTION__, ccr, *ccr, crfD, frA, frB); | 17 | printk("%s: %p (%08x) %d %p %p\n", __func__, ccr, *ccr, crfD, frA, frB); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | __FP_UNPACK_D(A, frA); | 20 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fctiw.c b/arch/powerpc/math-emu/fctiw.c index 3b3c98b840cf..fcd7a95e021d 100644 --- a/arch/powerpc/math-emu/fctiw.c +++ b/arch/powerpc/math-emu/fctiw.c | |||
@@ -16,7 +16,7 @@ fctiw(u32 *frD, void *frB) | |||
16 | frD[1] = r; | 16 | frD[1] = r; |
17 | 17 | ||
18 | #ifdef DEBUG | 18 | #ifdef DEBUG |
19 | printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); | 19 | printk("%s: D %p, B %p: ", __func__, frD, frB); |
20 | dump_double(frD); | 20 | dump_double(frD); |
21 | printk("\n"); | 21 | printk("\n"); |
22 | #endif | 22 | #endif |
diff --git a/arch/powerpc/math-emu/fctiwz.c b/arch/powerpc/math-emu/fctiwz.c index 7717eb6fcfb6..1514d59e146e 100644 --- a/arch/powerpc/math-emu/fctiwz.c +++ b/arch/powerpc/math-emu/fctiwz.c | |||
@@ -23,7 +23,7 @@ fctiwz(u32 *frD, void *frB) | |||
23 | __FPU_FPSCR = fpscr; | 23 | __FPU_FPSCR = fpscr; |
24 | 24 | ||
25 | #ifdef DEBUG | 25 | #ifdef DEBUG |
26 | printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); | 26 | printk("%s: D %p, B %p: ", __func__, frD, frB); |
27 | dump_double(frD); | 27 | dump_double(frD); |
28 | printk("\n"); | 28 | printk("\n"); |
29 | #endif | 29 | #endif |
diff --git a/arch/powerpc/math-emu/fdiv.c b/arch/powerpc/math-emu/fdiv.c index f2fba825b2d0..18a20fe396b0 100644 --- a/arch/powerpc/math-emu/fdiv.c +++ b/arch/powerpc/math-emu/fdiv.c | |||
@@ -14,7 +14,7 @@ fdiv(void *frD, void *frA, void *frB) | |||
14 | int ret = 0; | 14 | int ret = 0; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 17 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | __FP_UNPACK_D(A, frA); | 20 | __FP_UNPACK_D(A, frA); |
@@ -28,13 +28,13 @@ fdiv(void *frD, void *frA, void *frB) | |||
28 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { | 28 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { |
29 | ret |= EFLAG_VXZDZ; | 29 | ret |= EFLAG_VXZDZ; |
30 | #ifdef DEBUG | 30 | #ifdef DEBUG |
31 | printk("%s: FPSCR_VXZDZ raised\n", __FUNCTION__); | 31 | printk("%s: FPSCR_VXZDZ raised\n", __func__); |
32 | #endif | 32 | #endif |
33 | } | 33 | } |
34 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { | 34 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { |
35 | ret |= EFLAG_VXIDI; | 35 | ret |= EFLAG_VXIDI; |
36 | #ifdef DEBUG | 36 | #ifdef DEBUG |
37 | printk("%s: FPSCR_VXIDI raised\n", __FUNCTION__); | 37 | printk("%s: FPSCR_VXIDI raised\n", __func__); |
38 | #endif | 38 | #endif |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/arch/powerpc/math-emu/fdivs.c b/arch/powerpc/math-emu/fdivs.c index b971196e3175..24feed689c35 100644 --- a/arch/powerpc/math-emu/fdivs.c +++ b/arch/powerpc/math-emu/fdivs.c | |||
@@ -15,7 +15,7 @@ fdivs(void *frD, void *frA, void *frB) | |||
15 | int ret = 0; | 15 | int ret = 0; |
16 | 16 | ||
17 | #ifdef DEBUG | 17 | #ifdef DEBUG |
18 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | __FP_UNPACK_D(A, frA); | 21 | __FP_UNPACK_D(A, frA); |
@@ -29,13 +29,13 @@ fdivs(void *frD, void *frA, void *frB) | |||
29 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { | 29 | if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { |
30 | ret |= EFLAG_VXZDZ; | 30 | ret |= EFLAG_VXZDZ; |
31 | #ifdef DEBUG | 31 | #ifdef DEBUG |
32 | printk("%s: FPSCR_VXZDZ raised\n", __FUNCTION__); | 32 | printk("%s: FPSCR_VXZDZ raised\n", __func__); |
33 | #endif | 33 | #endif |
34 | } | 34 | } |
35 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { | 35 | if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { |
36 | ret |= EFLAG_VXIDI; | 36 | ret |= EFLAG_VXIDI; |
37 | #ifdef DEBUG | 37 | #ifdef DEBUG |
38 | printk("%s: FPSCR_VXIDI raised\n", __FUNCTION__); | 38 | printk("%s: FPSCR_VXIDI raised\n", __func__); |
39 | #endif | 39 | #endif |
40 | } | 40 | } |
41 | 41 | ||
diff --git a/arch/powerpc/math-emu/fmadd.c b/arch/powerpc/math-emu/fmadd.c index 0a1dbce793e9..dedb465fdc68 100644 --- a/arch/powerpc/math-emu/fmadd.c +++ b/arch/powerpc/math-emu/fmadd.c | |||
@@ -16,7 +16,7 @@ fmadd(void *frD, void *frA, void *frB, void *frC) | |||
16 | int ret = 0; | 16 | int ret = 0; |
17 | 17 | ||
18 | #ifdef DEBUG | 18 | #ifdef DEBUG |
19 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 19 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | __FP_UNPACK_D(A, frA); | 22 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fmadds.c b/arch/powerpc/math-emu/fmadds.c index 0f70bba9445e..6bbb56d5502c 100644 --- a/arch/powerpc/math-emu/fmadds.c +++ b/arch/powerpc/math-emu/fmadds.c | |||
@@ -17,7 +17,7 @@ fmadds(void *frD, void *frA, void *frB, void *frC) | |||
17 | int ret = 0; | 17 | int ret = 0; |
18 | 18 | ||
19 | #ifdef DEBUG | 19 | #ifdef DEBUG |
20 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | __FP_UNPACK_D(A, frA); | 23 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fmr.c b/arch/powerpc/math-emu/fmr.c index 28df700c0c7e..bd55384b8196 100644 --- a/arch/powerpc/math-emu/fmr.c +++ b/arch/powerpc/math-emu/fmr.c | |||
@@ -9,7 +9,7 @@ fmr(u32 *frD, u32 *frB) | |||
9 | frD[1] = frB[1]; | 9 | frD[1] = frB[1]; |
10 | 10 | ||
11 | #ifdef DEBUG | 11 | #ifdef DEBUG |
12 | printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); | 12 | printk("%s: D %p, B %p: ", __func__, frD, frB); |
13 | dump_double(frD); | 13 | dump_double(frD); |
14 | printk("\n"); | 14 | printk("\n"); |
15 | #endif | 15 | #endif |
diff --git a/arch/powerpc/math-emu/fmsub.c b/arch/powerpc/math-emu/fmsub.c index 203fd48a6fec..f311e2c7e67e 100644 --- a/arch/powerpc/math-emu/fmsub.c +++ b/arch/powerpc/math-emu/fmsub.c | |||
@@ -16,7 +16,7 @@ fmsub(void *frD, void *frA, void *frB, void *frC) | |||
16 | int ret = 0; | 16 | int ret = 0; |
17 | 17 | ||
18 | #ifdef DEBUG | 18 | #ifdef DEBUG |
19 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 19 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | __FP_UNPACK_D(A, frA); | 22 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fmsubs.c b/arch/powerpc/math-emu/fmsubs.c index 8ce68624c189..81a716d3ee2e 100644 --- a/arch/powerpc/math-emu/fmsubs.c +++ b/arch/powerpc/math-emu/fmsubs.c | |||
@@ -17,7 +17,7 @@ fmsubs(void *frD, void *frA, void *frB, void *frC) | |||
17 | int ret = 0; | 17 | int ret = 0; |
18 | 18 | ||
19 | #ifdef DEBUG | 19 | #ifdef DEBUG |
20 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | __FP_UNPACK_D(A, frA); | 23 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fmul.c b/arch/powerpc/math-emu/fmul.c index 66c7e79aae2e..2f3d32784a04 100644 --- a/arch/powerpc/math-emu/fmul.c +++ b/arch/powerpc/math-emu/fmul.c | |||
@@ -14,7 +14,7 @@ fmul(void *frD, void *frA, void *frB) | |||
14 | int ret = 0; | 14 | int ret = 0; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 17 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | __FP_UNPACK_D(A, frA); | 20 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fmuls.c b/arch/powerpc/math-emu/fmuls.c index 26bc4278271c..962b5883f784 100644 --- a/arch/powerpc/math-emu/fmuls.c +++ b/arch/powerpc/math-emu/fmuls.c | |||
@@ -15,7 +15,7 @@ fmuls(void *frD, void *frA, void *frB) | |||
15 | int ret = 0; | 15 | int ret = 0; |
16 | 16 | ||
17 | #ifdef DEBUG | 17 | #ifdef DEBUG |
18 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | __FP_UNPACK_D(A, frA); | 21 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fnabs.c b/arch/powerpc/math-emu/fnabs.c index c6b913d179e0..a7d34f3d9499 100644 --- a/arch/powerpc/math-emu/fnabs.c +++ b/arch/powerpc/math-emu/fnabs.c | |||
@@ -9,7 +9,7 @@ fnabs(u32 *frD, u32 *frB) | |||
9 | frD[1] = frB[1]; | 9 | frD[1] = frB[1]; |
10 | 10 | ||
11 | #ifdef DEBUG | 11 | #ifdef DEBUG |
12 | printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); | 12 | printk("%s: D %p, B %p: ", __func__, frD, frB); |
13 | dump_double(frD); | 13 | dump_double(frD); |
14 | printk("\n"); | 14 | printk("\n"); |
15 | #endif | 15 | #endif |
diff --git a/arch/powerpc/math-emu/fneg.c b/arch/powerpc/math-emu/fneg.c index fe9a98deff69..1e988cd9c6cc 100644 --- a/arch/powerpc/math-emu/fneg.c +++ b/arch/powerpc/math-emu/fneg.c | |||
@@ -9,7 +9,7 @@ fneg(u32 *frD, u32 *frB) | |||
9 | frD[1] = frB[1]; | 9 | frD[1] = frB[1]; |
10 | 10 | ||
11 | #ifdef DEBUG | 11 | #ifdef DEBUG |
12 | printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); | 12 | printk("%s: D %p, B %p: ", __func__, frD, frB); |
13 | dump_double(frD); | 13 | dump_double(frD); |
14 | printk("\n"); | 14 | printk("\n"); |
15 | #endif | 15 | #endif |
diff --git a/arch/powerpc/math-emu/fnmadd.c b/arch/powerpc/math-emu/fnmadd.c index 7f312276d920..8cf7827c4fb5 100644 --- a/arch/powerpc/math-emu/fnmadd.c +++ b/arch/powerpc/math-emu/fnmadd.c | |||
@@ -16,7 +16,7 @@ fnmadd(void *frD, void *frA, void *frB, void *frC) | |||
16 | int ret = 0; | 16 | int ret = 0; |
17 | 17 | ||
18 | #ifdef DEBUG | 18 | #ifdef DEBUG |
19 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 19 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | __FP_UNPACK_D(A, frA); | 22 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fnmadds.c b/arch/powerpc/math-emu/fnmadds.c index 65454c9c70bc..f1c4f0f0d807 100644 --- a/arch/powerpc/math-emu/fnmadds.c +++ b/arch/powerpc/math-emu/fnmadds.c | |||
@@ -17,7 +17,7 @@ fnmadds(void *frD, void *frA, void *frB, void *frC) | |||
17 | int ret = 0; | 17 | int ret = 0; |
18 | 18 | ||
19 | #ifdef DEBUG | 19 | #ifdef DEBUG |
20 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | __FP_UNPACK_D(A, frA); | 23 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fnmsub.c b/arch/powerpc/math-emu/fnmsub.c index f1ca7482b5f0..98944e6e2601 100644 --- a/arch/powerpc/math-emu/fnmsub.c +++ b/arch/powerpc/math-emu/fnmsub.c | |||
@@ -16,7 +16,7 @@ fnmsub(void *frD, void *frA, void *frB, void *frC) | |||
16 | int ret = 0; | 16 | int ret = 0; |
17 | 17 | ||
18 | #ifdef DEBUG | 18 | #ifdef DEBUG |
19 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 19 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | __FP_UNPACK_D(A, frA); | 22 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fnmsubs.c b/arch/powerpc/math-emu/fnmsubs.c index 5c9a09a87dc7..b20f4eb63fb9 100644 --- a/arch/powerpc/math-emu/fnmsubs.c +++ b/arch/powerpc/math-emu/fnmsubs.c | |||
@@ -17,7 +17,7 @@ fnmsubs(void *frD, void *frA, void *frB, void *frC) | |||
17 | int ret = 0; | 17 | int ret = 0; |
18 | 18 | ||
19 | #ifdef DEBUG | 19 | #ifdef DEBUG |
20 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 20 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | __FP_UNPACK_D(A, frA); | 23 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fres.c b/arch/powerpc/math-emu/fres.c index ec11e46d20af..10ecbd08b79e 100644 --- a/arch/powerpc/math-emu/fres.c +++ b/arch/powerpc/math-emu/fres.c | |||
@@ -6,7 +6,7 @@ int | |||
6 | fres(void *frD, void *frB) | 6 | fres(void *frD, void *frB) |
7 | { | 7 | { |
8 | #ifdef DEBUG | 8 | #ifdef DEBUG |
9 | printk("%s: %p %p\n", __FUNCTION__, frD, frB); | 9 | printk("%s: %p %p\n", __func__, frD, frB); |
10 | #endif | 10 | #endif |
11 | return -ENOSYS; | 11 | return -ENOSYS; |
12 | } | 12 | } |
diff --git a/arch/powerpc/math-emu/frsp.c b/arch/powerpc/math-emu/frsp.c index d879b2a3d0c9..724ccbc0468e 100644 --- a/arch/powerpc/math-emu/frsp.c +++ b/arch/powerpc/math-emu/frsp.c | |||
@@ -12,7 +12,7 @@ frsp(void *frD, void *frB) | |||
12 | FP_DECL_D(B); | 12 | FP_DECL_D(B); |
13 | 13 | ||
14 | #ifdef DEBUG | 14 | #ifdef DEBUG |
15 | printk("%s: D %p, B %p\n", __FUNCTION__, frD, frB); | 15 | printk("%s: D %p, B %p\n", __func__, frD, frB); |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | __FP_UNPACK_D(B, frB); | 18 | __FP_UNPACK_D(B, frB); |
diff --git a/arch/powerpc/math-emu/frsqrte.c b/arch/powerpc/math-emu/frsqrte.c index a11ae1829850..1d0a3a0fd0e6 100644 --- a/arch/powerpc/math-emu/frsqrte.c +++ b/arch/powerpc/math-emu/frsqrte.c | |||
@@ -6,7 +6,7 @@ int | |||
6 | frsqrte(void *frD, void *frB) | 6 | frsqrte(void *frD, void *frB) |
7 | { | 7 | { |
8 | #ifdef DEBUG | 8 | #ifdef DEBUG |
9 | printk("%s: %p %p\n", __FUNCTION__, frD, frB); | 9 | printk("%s: %p %p\n", __func__, frD, frB); |
10 | #endif | 10 | #endif |
11 | return 0; | 11 | return 0; |
12 | } | 12 | } |
diff --git a/arch/powerpc/math-emu/fsel.c b/arch/powerpc/math-emu/fsel.c index e36e6e72819a..ecb5f28eb1f3 100644 --- a/arch/powerpc/math-emu/fsel.c +++ b/arch/powerpc/math-emu/fsel.c | |||
@@ -11,7 +11,7 @@ fsel(u32 *frD, void *frA, u32 *frB, u32 *frC) | |||
11 | FP_DECL_D(A); | 11 | FP_DECL_D(A); |
12 | 12 | ||
13 | #ifdef DEBUG | 13 | #ifdef DEBUG |
14 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); | 14 | printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC); |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | __FP_UNPACK_D(A, frA); | 17 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fsqrt.c b/arch/powerpc/math-emu/fsqrt.c index 6f8319f64a8a..38ec2b752e9d 100644 --- a/arch/powerpc/math-emu/fsqrt.c +++ b/arch/powerpc/math-emu/fsqrt.c | |||
@@ -13,7 +13,7 @@ fsqrt(void *frD, void *frB) | |||
13 | int ret = 0; | 13 | int ret = 0; |
14 | 14 | ||
15 | #ifdef DEBUG | 15 | #ifdef DEBUG |
16 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frB); | 16 | printk("%s: %p %p %p %p\n", __func__, frD, frB); |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | __FP_UNPACK_D(B, frB); | 19 | __FP_UNPACK_D(B, frB); |
diff --git a/arch/powerpc/math-emu/fsqrts.c b/arch/powerpc/math-emu/fsqrts.c index 3b2b1cf55c12..335263e06ee5 100644 --- a/arch/powerpc/math-emu/fsqrts.c +++ b/arch/powerpc/math-emu/fsqrts.c | |||
@@ -14,7 +14,7 @@ fsqrts(void *frD, void *frB) | |||
14 | int ret = 0; | 14 | int ret = 0; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frB); | 17 | printk("%s: %p %p %p %p\n", __func__, frD, frB); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | __FP_UNPACK_D(B, frB); | 20 | __FP_UNPACK_D(B, frB); |
diff --git a/arch/powerpc/math-emu/fsub.c b/arch/powerpc/math-emu/fsub.c index 956679042bb2..208d20fc52a5 100644 --- a/arch/powerpc/math-emu/fsub.c +++ b/arch/powerpc/math-emu/fsub.c | |||
@@ -14,7 +14,7 @@ fsub(void *frD, void *frA, void *frB) | |||
14 | int ret = 0; | 14 | int ret = 0; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 17 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | __FP_UNPACK_D(A, frA); | 20 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/fsubs.c b/arch/powerpc/math-emu/fsubs.c index 3428117dfe8c..0e61b808c44b 100644 --- a/arch/powerpc/math-emu/fsubs.c +++ b/arch/powerpc/math-emu/fsubs.c | |||
@@ -15,7 +15,7 @@ fsubs(void *frD, void *frA, void *frB) | |||
15 | int ret = 0; | 15 | int ret = 0; |
16 | 16 | ||
17 | #ifdef DEBUG | 17 | #ifdef DEBUG |
18 | printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); | 18 | printk("%s: %p %p %p\n", __func__, frD, frA, frB); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | __FP_UNPACK_D(A, frA); | 21 | __FP_UNPACK_D(A, frA); |
diff --git a/arch/powerpc/math-emu/lfd.c b/arch/powerpc/math-emu/lfd.c index 7d38101c329b..6ec90b57c61a 100644 --- a/arch/powerpc/math-emu/lfd.c +++ b/arch/powerpc/math-emu/lfd.c | |||
@@ -11,7 +11,7 @@ lfd(void *frD, void *ea) | |||
11 | if (copy_from_user(frD, ea, sizeof(double))) | 11 | if (copy_from_user(frD, ea, sizeof(double))) |
12 | return -EFAULT; | 12 | return -EFAULT; |
13 | #ifdef DEBUG | 13 | #ifdef DEBUG |
14 | printk("%s: D %p, ea %p: ", __FUNCTION__, frD, ea); | 14 | printk("%s: D %p, ea %p: ", __func__, frD, ea); |
15 | dump_double(frD); | 15 | dump_double(frD); |
16 | printk("\n"); | 16 | printk("\n"); |
17 | #endif | 17 | #endif |
diff --git a/arch/powerpc/math-emu/lfs.c b/arch/powerpc/math-emu/lfs.c index c86dee3d7655..6f18ebe3a7ff 100644 --- a/arch/powerpc/math-emu/lfs.c +++ b/arch/powerpc/math-emu/lfs.c | |||
@@ -14,7 +14,7 @@ lfs(void *frD, void *ea) | |||
14 | float f; | 14 | float f; |
15 | 15 | ||
16 | #ifdef DEBUG | 16 | #ifdef DEBUG |
17 | printk("%s: D %p, ea %p\n", __FUNCTION__, frD, ea); | 17 | printk("%s: D %p, ea %p\n", __func__, frD, ea); |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | if (copy_from_user(&f, ea, sizeof(float))) | 20 | if (copy_from_user(&f, ea, sizeof(float))) |
diff --git a/arch/powerpc/math-emu/mcrfs.c b/arch/powerpc/math-emu/mcrfs.c index 106dd912914b..41ba247faf89 100644 --- a/arch/powerpc/math-emu/mcrfs.c +++ b/arch/powerpc/math-emu/mcrfs.c | |||
@@ -10,7 +10,7 @@ mcrfs(u32 *ccr, u32 crfD, u32 crfS) | |||
10 | u32 value, clear; | 10 | u32 value, clear; |
11 | 11 | ||
12 | #ifdef DEBUG | 12 | #ifdef DEBUG |
13 | printk("%s: %p (%08x) %d %d\n", __FUNCTION__, ccr, *ccr, crfD, crfS); | 13 | printk("%s: %p (%08x) %d %d\n", __func__, ccr, *ccr, crfD, crfS); |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | clear = 15 << ((7 - crfS) << 2); | 16 | clear = 15 << ((7 - crfS) << 2); |
@@ -24,7 +24,7 @@ mcrfs(u32 *ccr, u32 crfD, u32 crfS) | |||
24 | *ccr |= (value << ((7 - crfD) << 2)); | 24 | *ccr |= (value << ((7 - crfD) << 2)); |
25 | 25 | ||
26 | #ifdef DEBUG | 26 | #ifdef DEBUG |
27 | printk("CR: %08x\n", __FUNCTION__, *ccr); | 27 | printk("CR: %08x\n", __func__, *ccr); |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | return 0; | 30 | return 0; |
diff --git a/arch/powerpc/math-emu/mffs.c b/arch/powerpc/math-emu/mffs.c index f477c9170e75..b0e2106e6eb6 100644 --- a/arch/powerpc/math-emu/mffs.c +++ b/arch/powerpc/math-emu/mffs.c | |||
@@ -10,7 +10,7 @@ mffs(u32 *frD) | |||
10 | frD[1] = __FPU_FPSCR; | 10 | frD[1] = __FPU_FPSCR; |
11 | 11 | ||
12 | #ifdef DEBUG | 12 | #ifdef DEBUG |
13 | printk("%s: frD %p: %08x.%08x\n", __FUNCTION__, frD, frD[0], frD[1]); | 13 | printk("%s: frD %p: %08x.%08x\n", __func__, frD, frD[0], frD[1]); |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | return 0; | 16 | return 0; |
diff --git a/arch/powerpc/math-emu/mtfsb0.c b/arch/powerpc/math-emu/mtfsb0.c index 99bfd80f4af3..d3062350ea21 100644 --- a/arch/powerpc/math-emu/mtfsb0.c +++ b/arch/powerpc/math-emu/mtfsb0.c | |||
@@ -11,7 +11,7 @@ mtfsb0(int crbD) | |||
11 | __FPU_FPSCR &= ~(1 << (31 - crbD)); | 11 | __FPU_FPSCR &= ~(1 << (31 - crbD)); |
12 | 12 | ||
13 | #ifdef DEBUG | 13 | #ifdef DEBUG |
14 | printk("%s: %d %08lx\n", __FUNCTION__, crbD, __FPU_FPSCR); | 14 | printk("%s: %d %08lx\n", __func__, crbD, __FPU_FPSCR); |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | return 0; | 17 | return 0; |
diff --git a/arch/powerpc/math-emu/mtfsb1.c b/arch/powerpc/math-emu/mtfsb1.c index 3d9e7ed92d2b..2e948704b56e 100644 --- a/arch/powerpc/math-emu/mtfsb1.c +++ b/arch/powerpc/math-emu/mtfsb1.c | |||
@@ -11,7 +11,7 @@ mtfsb1(int crbD) | |||
11 | __FPU_FPSCR |= (1 << (31 - crbD)); | 11 | __FPU_FPSCR |= (1 << (31 - crbD)); |
12 | 12 | ||
13 | #ifdef DEBUG | 13 | #ifdef DEBUG |
14 | printk("%s: %d %08lx\n", __FUNCTION__, crbD, __FPU_FPSCR); | 14 | printk("%s: %d %08lx\n", __func__, crbD, __FPU_FPSCR); |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | return 0; | 17 | return 0; |
diff --git a/arch/powerpc/math-emu/mtfsf.c b/arch/powerpc/math-emu/mtfsf.c index d70cf714994c..48014d8e3af1 100644 --- a/arch/powerpc/math-emu/mtfsf.c +++ b/arch/powerpc/math-emu/mtfsf.c | |||
@@ -38,7 +38,7 @@ mtfsf(unsigned int FM, u32 *frB) | |||
38 | __FPU_FPSCR |= (frB[1] & mask); | 38 | __FPU_FPSCR |= (frB[1] & mask); |
39 | 39 | ||
40 | #ifdef DEBUG | 40 | #ifdef DEBUG |
41 | printk("%s: %02x %p: %08lx\n", __FUNCTION__, FM, frB, __FPU_FPSCR); | 41 | printk("%s: %02x %p: %08lx\n", __func__, FM, frB, __FPU_FPSCR); |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | return 0; | 44 | return 0; |
diff --git a/arch/powerpc/math-emu/mtfsfi.c b/arch/powerpc/math-emu/mtfsfi.c index 71df854baa7e..031e20093549 100644 --- a/arch/powerpc/math-emu/mtfsfi.c +++ b/arch/powerpc/math-emu/mtfsfi.c | |||
@@ -16,7 +16,7 @@ mtfsfi(unsigned int crfD, unsigned int IMM) | |||
16 | __FPU_FPSCR |= (IMM & 0xf) << ((7 - crfD) << 2); | 16 | __FPU_FPSCR |= (IMM & 0xf) << ((7 - crfD) << 2); |
17 | 17 | ||
18 | #ifdef DEBUG | 18 | #ifdef DEBUG |
19 | printk("%s: %d %x: %08lx\n", __FUNCTION__, crfD, IMM, __FPU_FPSCR); | 19 | printk("%s: %d %x: %08lx\n", __func__, crfD, IMM, __FPU_FPSCR); |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | return 0; | 22 | return 0; |
diff --git a/arch/powerpc/math-emu/stfd.c b/arch/powerpc/math-emu/stfd.c index 3f8c2558a9e8..33a165c8df0f 100644 --- a/arch/powerpc/math-emu/stfd.c +++ b/arch/powerpc/math-emu/stfd.c | |||
@@ -7,7 +7,7 @@ stfd(void *frS, void *ea) | |||
7 | { | 7 | { |
8 | #if 0 | 8 | #if 0 |
9 | #ifdef DEBUG | 9 | #ifdef DEBUG |
10 | printk("%s: S %p, ea %p: ", __FUNCTION__, frS, ea); | 10 | printk("%s: S %p, ea %p: ", __func__, frS, ea); |
11 | dump_double(frS); | 11 | dump_double(frS); |
12 | printk("\n"); | 12 | printk("\n"); |
13 | #endif | 13 | #endif |
diff --git a/arch/powerpc/math-emu/stfiwx.c b/arch/powerpc/math-emu/stfiwx.c index 95caaeec6a08..f15a35f67e2c 100644 --- a/arch/powerpc/math-emu/stfiwx.c +++ b/arch/powerpc/math-emu/stfiwx.c | |||
@@ -6,7 +6,7 @@ int | |||
6 | stfiwx(u32 *frS, void *ea) | 6 | stfiwx(u32 *frS, void *ea) |
7 | { | 7 | { |
8 | #ifdef DEBUG | 8 | #ifdef DEBUG |
9 | printk("%s: %p %p\n", __FUNCTION__, frS, ea); | 9 | printk("%s: %p %p\n", __func__, frS, ea); |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | if (copy_to_user(ea, &frS[1], sizeof(frS[1]))) | 12 | if (copy_to_user(ea, &frS[1], sizeof(frS[1]))) |
diff --git a/arch/powerpc/math-emu/stfs.c b/arch/powerpc/math-emu/stfs.c index e87ca23c6dc3..8689aa48ef69 100644 --- a/arch/powerpc/math-emu/stfs.c +++ b/arch/powerpc/math-emu/stfs.c | |||
@@ -15,7 +15,7 @@ stfs(void *frS, void *ea) | |||
15 | int err; | 15 | int err; |
16 | 16 | ||
17 | #ifdef DEBUG | 17 | #ifdef DEBUG |
18 | printk("%s: S %p, ea %p\n", __FUNCTION__, frS, ea); | 18 | printk("%s: S %p, ea %p\n", __func__, frS, ea); |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | __FP_UNPACK_D(A, frS); | 21 | __FP_UNPACK_D(A, frS); |
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index 41649a5d3602..1c00e0196f6c 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile | |||
@@ -6,7 +6,7 @@ ifeq ($(CONFIG_PPC64),y) | |||
6 | EXTRA_CFLAGS += -mno-minimal-toc | 6 | EXTRA_CFLAGS += -mno-minimal-toc |
7 | endif | 7 | endif |
8 | 8 | ||
9 | obj-y := fault.o mem.o lmb.o \ | 9 | obj-y := fault.o mem.o \ |
10 | init_$(CONFIG_WORD_SIZE).o \ | 10 | init_$(CONFIG_WORD_SIZE).o \ |
11 | pgtable_$(CONFIG_WORD_SIZE).o \ | 11 | pgtable_$(CONFIG_WORD_SIZE).o \ |
12 | mmu_context_$(CONFIG_WORD_SIZE).o | 12 | mmu_context_$(CONFIG_WORD_SIZE).o |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index a83dfa3cf40c..2b5a399f6fa6 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/cache.h> | 31 | #include <linux/cache.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/signal.h> | 33 | #include <linux/signal.h> |
34 | #include <linux/lmb.h> | ||
34 | 35 | ||
35 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
36 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
@@ -41,7 +42,7 @@ | |||
41 | #include <asm/system.h> | 42 | #include <asm/system.h> |
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
44 | #include <asm/lmb.h> | 45 | #include <asm/prom.h> |
45 | #include <asm/abs_addr.h> | 46 | #include <asm/abs_addr.h> |
46 | #include <asm/tlbflush.h> | 47 | #include <asm/tlbflush.h> |
47 | #include <asm/io.h> | 48 | #include <asm/io.h> |
@@ -191,6 +192,29 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
191 | return ret < 0 ? ret : 0; | 192 | return ret < 0 ? ret : 0; |
192 | } | 193 | } |
193 | 194 | ||
195 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
196 | static int htab_remove_mapping(unsigned long vstart, unsigned long vend, | ||
197 | int psize, int ssize) | ||
198 | { | ||
199 | unsigned long vaddr; | ||
200 | unsigned int step, shift; | ||
201 | |||
202 | shift = mmu_psize_defs[psize].shift; | ||
203 | step = 1 << shift; | ||
204 | |||
205 | if (!ppc_md.hpte_removebolted) { | ||
206 | printk(KERN_WARNING "Platform doesn't implement " | ||
207 | "hpte_removebolted\n"); | ||
208 | return -EINVAL; | ||
209 | } | ||
210 | |||
211 | for (vaddr = vstart; vaddr < vend; vaddr += step) | ||
212 | ppc_md.hpte_removebolted(vaddr, psize, ssize); | ||
213 | |||
214 | return 0; | ||
215 | } | ||
216 | #endif /* CONFIG_MEMORY_HOTPLUG */ | ||
217 | |||
194 | static int __init htab_dt_scan_seg_sizes(unsigned long node, | 218 | static int __init htab_dt_scan_seg_sizes(unsigned long node, |
195 | const char *uname, int depth, | 219 | const char *uname, int depth, |
196 | void *data) | 220 | void *data) |
@@ -434,6 +458,12 @@ void create_section_mapping(unsigned long start, unsigned long end) | |||
434 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, | 458 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, |
435 | mmu_linear_psize, mmu_kernel_ssize)); | 459 | mmu_linear_psize, mmu_kernel_ssize)); |
436 | } | 460 | } |
461 | |||
462 | int remove_section_mapping(unsigned long start, unsigned long end) | ||
463 | { | ||
464 | return htab_remove_mapping(start, end, mmu_linear_psize, | ||
465 | mmu_kernel_ssize); | ||
466 | } | ||
437 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 467 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
438 | 468 | ||
439 | static inline void make_bl(unsigned int *insn_addr, void *func) | 469 | static inline void make_bl(unsigned int *insn_addr, void *func) |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 977cb1ee5e72..0c66a9fe63f5 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | #include <linux/pagemap.h> | 32 | #include <linux/pagemap.h> |
33 | #include <linux/lmb.h> | ||
33 | 34 | ||
34 | #include <asm/pgalloc.h> | 35 | #include <asm/pgalloc.h> |
35 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
@@ -41,7 +42,6 @@ | |||
41 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
42 | #include <asm/btext.h> | 43 | #include <asm/btext.h> |
43 | #include <asm/tlb.h> | 44 | #include <asm/tlb.h> |
44 | #include <asm/lmb.h> | ||
45 | #include <asm/sections.h> | 45 | #include <asm/sections.h> |
46 | 46 | ||
47 | #include "mmu_decl.h" | 47 | #include "mmu_decl.h" |
@@ -276,7 +276,7 @@ static int __init setup_kcore(void) | |||
276 | 276 | ||
277 | kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); | 277 | kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); |
278 | if (!kcore_mem) | 278 | if (!kcore_mem) |
279 | panic("%s: kmalloc failed\n", __FUNCTION__); | 279 | panic("%s: kmalloc failed\n", __func__); |
280 | 280 | ||
281 | /* must stay under 32 bits */ | 281 | /* must stay under 32 bits */ |
282 | if ( 0xfffffffful - (unsigned long)__va(base) < size) { | 282 | if ( 0xfffffffful - (unsigned long)__va(base) < size) { |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index c0f5cff77035..5f553991698b 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -38,11 +38,11 @@ | |||
38 | #include <linux/nodemask.h> | 38 | #include <linux/nodemask.h> |
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/poison.h> | 40 | #include <linux/poison.h> |
41 | #include <linux/lmb.h> | ||
41 | 42 | ||
42 | #include <asm/pgalloc.h> | 43 | #include <asm/pgalloc.h> |
43 | #include <asm/page.h> | 44 | #include <asm/page.h> |
44 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
45 | #include <asm/lmb.h> | ||
46 | #include <asm/rtas.h> | 46 | #include <asm/rtas.h> |
47 | #include <asm/io.h> | 47 | #include <asm/io.h> |
48 | #include <asm/mmu_context.h> | 48 | #include <asm/mmu_context.h> |
@@ -122,7 +122,7 @@ static int __init setup_kcore(void) | |||
122 | /* GFP_ATOMIC to avoid might_sleep warnings during boot */ | 122 | /* GFP_ATOMIC to avoid might_sleep warnings during boot */ |
123 | kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); | 123 | kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); |
124 | if (!kcore_mem) | 124 | if (!kcore_mem) |
125 | panic("%s: kmalloc failed\n", __FUNCTION__); | 125 | panic("%s: kmalloc failed\n", __func__); |
126 | 126 | ||
127 | kclist_add(kcore_mem, __va(base), size); | 127 | kclist_add(kcore_mem, __va(base), size); |
128 | } | 128 | } |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index be5c506779a7..e3349ead3959 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | #include <linux/pagemap.h> | 32 | #include <linux/pagemap.h> |
33 | #include <linux/suspend.h> | 33 | #include <linux/suspend.h> |
34 | #include <linux/lmb.h> | ||
34 | 35 | ||
35 | #include <asm/pgalloc.h> | 36 | #include <asm/pgalloc.h> |
36 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
@@ -42,7 +43,6 @@ | |||
42 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
43 | #include <asm/btext.h> | 44 | #include <asm/btext.h> |
44 | #include <asm/tlb.h> | 45 | #include <asm/tlb.h> |
45 | #include <asm/lmb.h> | ||
46 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
47 | #include <asm/vdso.h> | 47 | #include <asm/vdso.h> |
48 | 48 | ||
@@ -111,7 +111,7 @@ int memory_add_physaddr_to_nid(u64 start) | |||
111 | } | 111 | } |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | int __devinit arch_add_memory(int nid, u64 start, u64 size) | 114 | int arch_add_memory(int nid, u64 start, u64 size) |
115 | { | 115 | { |
116 | struct pglist_data *pgdata; | 116 | struct pglist_data *pgdata; |
117 | struct zone *zone; | 117 | struct zone *zone; |
@@ -175,7 +175,6 @@ void show_mem(void) | |||
175 | 175 | ||
176 | printk("Mem-info:\n"); | 176 | printk("Mem-info:\n"); |
177 | show_free_areas(); | 177 | show_free_areas(); |
178 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
179 | for_each_online_pgdat(pgdat) { | 178 | for_each_online_pgdat(pgdat) { |
180 | unsigned long flags; | 179 | unsigned long flags; |
181 | pgdat_resize_lock(pgdat, &flags); | 180 | pgdat_resize_lock(pgdat, &flags); |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index a300d254aac6..1efd631211ef 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -17,8 +17,9 @@ | |||
17 | #include <linux/nodemask.h> | 17 | #include <linux/nodemask.h> |
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/lmb.h> | ||
20 | #include <asm/sparsemem.h> | 21 | #include <asm/sparsemem.h> |
21 | #include <asm/lmb.h> | 22 | #include <asm/prom.h> |
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/smp.h> | 24 | #include <asm/smp.h> |
24 | 25 | ||
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index 5c45d474cfcc..72de3c79210a 100644 --- a/arch/powerpc/mm/ppc_mmu_32.c +++ b/arch/powerpc/mm/ppc_mmu_32.c | |||
@@ -26,11 +26,11 @@ | |||
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/lmb.h> | ||
29 | 30 | ||
30 | #include <asm/prom.h> | 31 | #include <asm/prom.h> |
31 | #include <asm/mmu.h> | 32 | #include <asm/mmu.h> |
32 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
33 | #include <asm/lmb.h> | ||
34 | 34 | ||
35 | #include "mmu_decl.h" | 35 | #include "mmu_decl.h" |
36 | 36 | ||
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 50448d5de9d2..efbbd13d93e5 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -12,12 +12,14 @@ | |||
12 | * 2 of the License, or (at your option) any later version. | 12 | * 2 of the License, or (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/lmb.h> | ||
16 | |||
15 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
16 | #include <asm/mmu.h> | 18 | #include <asm/mmu.h> |
17 | #include <asm/mmu_context.h> | 19 | #include <asm/mmu_context.h> |
18 | #include <asm/paca.h> | 20 | #include <asm/paca.h> |
19 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
20 | #include <asm/lmb.h> | 22 | #include <asm/prom.h> |
21 | #include <asm/abs_addr.h> | 23 | #include <asm/abs_addr.h> |
22 | #include <asm/firmware.h> | 24 | #include <asm/firmware.h> |
23 | #include <asm/iseries/hv_call.h> | 25 | #include <asm/iseries/hv_call.h> |
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c index 257b13cb18af..2a9b4a049329 100644 --- a/arch/powerpc/oprofile/cell/spu_task_sync.c +++ b/arch/powerpc/oprofile/cell/spu_task_sync.c | |||
@@ -68,7 +68,7 @@ static struct cached_info *get_cached_info(struct spu *the_spu, int spu_num) | |||
68 | if (spu_num >= num_spu_nodes) { | 68 | if (spu_num >= num_spu_nodes) { |
69 | printk(KERN_ERR "SPU_PROF: " | 69 | printk(KERN_ERR "SPU_PROF: " |
70 | "%s, line %d: Invalid index %d into spu info cache\n", | 70 | "%s, line %d: Invalid index %d into spu info cache\n", |
71 | __FUNCTION__, __LINE__, spu_num); | 71 | __func__, __LINE__, spu_num); |
72 | ret_info = NULL; | 72 | ret_info = NULL; |
73 | goto out; | 73 | goto out; |
74 | } | 74 | } |
@@ -115,7 +115,7 @@ prepare_cached_spu_info(struct spu *spu, unsigned long objectId) | |||
115 | if (!info) { | 115 | if (!info) { |
116 | printk(KERN_ERR "SPU_PROF: " | 116 | printk(KERN_ERR "SPU_PROF: " |
117 | "%s, line %d: create vma_map failed\n", | 117 | "%s, line %d: create vma_map failed\n", |
118 | __FUNCTION__, __LINE__); | 118 | __func__, __LINE__); |
119 | retval = -ENOMEM; | 119 | retval = -ENOMEM; |
120 | goto err_alloc; | 120 | goto err_alloc; |
121 | } | 121 | } |
@@ -123,7 +123,7 @@ prepare_cached_spu_info(struct spu *spu, unsigned long objectId) | |||
123 | if (!new_map) { | 123 | if (!new_map) { |
124 | printk(KERN_ERR "SPU_PROF: " | 124 | printk(KERN_ERR "SPU_PROF: " |
125 | "%s, line %d: create vma_map failed\n", | 125 | "%s, line %d: create vma_map failed\n", |
126 | __FUNCTION__, __LINE__); | 126 | __func__, __LINE__); |
127 | retval = -ENOMEM; | 127 | retval = -ENOMEM; |
128 | goto err_alloc; | 128 | goto err_alloc; |
129 | } | 129 | } |
@@ -171,7 +171,7 @@ static int release_cached_info(int spu_index) | |||
171 | printk(KERN_ERR "SPU_PROF: " | 171 | printk(KERN_ERR "SPU_PROF: " |
172 | "%s, line %d: " | 172 | "%s, line %d: " |
173 | "Invalid index %d into spu info cache\n", | 173 | "Invalid index %d into spu info cache\n", |
174 | __FUNCTION__, __LINE__, spu_index); | 174 | __func__, __LINE__, spu_index); |
175 | goto out; | 175 | goto out; |
176 | } | 176 | } |
177 | end = spu_index + 1; | 177 | end = spu_index + 1; |
@@ -273,7 +273,7 @@ fail_no_image_cookie: | |||
273 | 273 | ||
274 | printk(KERN_ERR "SPU_PROF: " | 274 | printk(KERN_ERR "SPU_PROF: " |
275 | "%s, line %d: Cannot find dcookie for SPU binary\n", | 275 | "%s, line %d: Cannot find dcookie for SPU binary\n", |
276 | __FUNCTION__, __LINE__); | 276 | __func__, __LINE__); |
277 | goto out; | 277 | goto out; |
278 | } | 278 | } |
279 | 279 | ||
@@ -467,7 +467,7 @@ int spu_sync_stop(void) | |||
467 | if (ret) { | 467 | if (ret) { |
468 | printk(KERN_ERR "SPU_PROF: " | 468 | printk(KERN_ERR "SPU_PROF: " |
469 | "%s, line %d: spu_switch_event_unregister returned %d\n", | 469 | "%s, line %d: spu_switch_event_unregister returned %d\n", |
470 | __FUNCTION__, __LINE__, ret); | 470 | __func__, __LINE__, ret); |
471 | goto out; | 471 | goto out; |
472 | } | 472 | } |
473 | 473 | ||
diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c index 9a932177e70e..fff66662d021 100644 --- a/arch/powerpc/oprofile/cell/vma_map.c +++ b/arch/powerpc/oprofile/cell/vma_map.c | |||
@@ -72,7 +72,7 @@ vma_map_add(struct vma_to_fileoffset_map *map, unsigned int vma, | |||
72 | kzalloc(sizeof(struct vma_to_fileoffset_map), GFP_KERNEL); | 72 | kzalloc(sizeof(struct vma_to_fileoffset_map), GFP_KERNEL); |
73 | if (!new) { | 73 | if (!new) { |
74 | printk(KERN_ERR "SPU_PROF: %s, line %d: malloc failed\n", | 74 | printk(KERN_ERR "SPU_PROF: %s, line %d: malloc failed\n", |
75 | __FUNCTION__, __LINE__); | 75 | __func__, __LINE__); |
76 | vma_map_free(map); | 76 | vma_map_free(map); |
77 | return NULL; | 77 | return NULL; |
78 | } | 78 | } |
@@ -134,19 +134,19 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu, | |||
134 | if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) { | 134 | if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) { |
135 | printk(KERN_ERR "SPU_PROF: " | 135 | printk(KERN_ERR "SPU_PROF: " |
136 | "%s, line %d: Unexpected e_ident parsing SPU ELF\n", | 136 | "%s, line %d: Unexpected e_ident parsing SPU ELF\n", |
137 | __FUNCTION__, __LINE__); | 137 | __func__, __LINE__); |
138 | goto fail; | 138 | goto fail; |
139 | } | 139 | } |
140 | if (ehdr.e_machine != EM_SPU) { | 140 | if (ehdr.e_machine != EM_SPU) { |
141 | printk(KERN_ERR "SPU_PROF: " | 141 | printk(KERN_ERR "SPU_PROF: " |
142 | "%s, line %d: Unexpected e_machine parsing SPU ELF\n", | 142 | "%s, line %d: Unexpected e_machine parsing SPU ELF\n", |
143 | __FUNCTION__, __LINE__); | 143 | __func__, __LINE__); |
144 | goto fail; | 144 | goto fail; |
145 | } | 145 | } |
146 | if (ehdr.e_type != ET_EXEC) { | 146 | if (ehdr.e_type != ET_EXEC) { |
147 | printk(KERN_ERR "SPU_PROF: " | 147 | printk(KERN_ERR "SPU_PROF: " |
148 | "%s, line %d: Unexpected e_type parsing SPU ELF\n", | 148 | "%s, line %d: Unexpected e_type parsing SPU ELF\n", |
149 | __FUNCTION__, __LINE__); | 149 | __func__, __LINE__); |
150 | goto fail; | 150 | goto fail; |
151 | } | 151 | } |
152 | phdr_start = spu_elf_start + ehdr.e_phoff; | 152 | phdr_start = spu_elf_start + ehdr.e_phoff; |
@@ -232,7 +232,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu, | |||
232 | if (overlay_tbl_offset < 0) { | 232 | if (overlay_tbl_offset < 0) { |
233 | printk(KERN_ERR "SPU_PROF: " | 233 | printk(KERN_ERR "SPU_PROF: " |
234 | "%s, line %d: Error finding SPU overlay table\n", | 234 | "%s, line %d: Error finding SPU overlay table\n", |
235 | __FUNCTION__, __LINE__); | 235 | __func__, __LINE__); |
236 | goto fail; | 236 | goto fail; |
237 | } | 237 | } |
238 | ovly_table = spu_elf_start + overlay_tbl_offset; | 238 | ovly_table = spu_elf_start + overlay_tbl_offset; |
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index 9eed1f68fcab..5ff4de3eb3be 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c | |||
@@ -216,7 +216,7 @@ static void pm_rtas_reset_signals(u32 node) | |||
216 | * failure to stop OProfile. | 216 | * failure to stop OProfile. |
217 | */ | 217 | */ |
218 | printk(KERN_WARNING "%s: rtas returned: %d\n", | 218 | printk(KERN_WARNING "%s: rtas returned: %d\n", |
219 | __FUNCTION__, ret); | 219 | __func__, ret); |
220 | } | 220 | } |
221 | 221 | ||
222 | static int pm_rtas_activate_signals(u32 node, u32 count) | 222 | static int pm_rtas_activate_signals(u32 node, u32 count) |
@@ -255,7 +255,7 @@ static int pm_rtas_activate_signals(u32 node, u32 count) | |||
255 | 255 | ||
256 | if (unlikely(ret)) { | 256 | if (unlikely(ret)) { |
257 | printk(KERN_WARNING "%s: rtas returned: %d\n", | 257 | printk(KERN_WARNING "%s: rtas returned: %d\n", |
258 | __FUNCTION__, ret); | 258 | __func__, ret); |
259 | return -EIO; | 259 | return -EIO; |
260 | } | 260 | } |
261 | } | 261 | } |
@@ -560,7 +560,7 @@ static int cell_reg_setup(struct op_counter_config *ctr, | |||
560 | if (unlikely(spu_rtas_token == RTAS_UNKNOWN_SERVICE)) { | 560 | if (unlikely(spu_rtas_token == RTAS_UNKNOWN_SERVICE)) { |
561 | printk(KERN_ERR | 561 | printk(KERN_ERR |
562 | "%s: rtas token ibm,cbe-spu-perftools unknown\n", | 562 | "%s: rtas token ibm,cbe-spu-perftools unknown\n", |
563 | __FUNCTION__); | 563 | __func__); |
564 | return -EIO; | 564 | return -EIO; |
565 | } | 565 | } |
566 | } | 566 | } |
@@ -576,7 +576,7 @@ static int cell_reg_setup(struct op_counter_config *ctr, | |||
576 | if (unlikely(pm_rtas_token == RTAS_UNKNOWN_SERVICE)) { | 576 | if (unlikely(pm_rtas_token == RTAS_UNKNOWN_SERVICE)) { |
577 | printk(KERN_ERR | 577 | printk(KERN_ERR |
578 | "%s: rtas token ibm,cbe-perftools unknown\n", | 578 | "%s: rtas token ibm,cbe-perftools unknown\n", |
579 | __FUNCTION__); | 579 | __func__); |
580 | return -EIO; | 580 | return -EIO; |
581 | } | 581 | } |
582 | 582 | ||
@@ -853,7 +853,7 @@ static int pm_rtas_activate_spu_profiling(u32 node) | |||
853 | 853 | ||
854 | if (unlikely(ret)) { | 854 | if (unlikely(ret)) { |
855 | printk(KERN_WARNING "%s: rtas returned: %d\n", | 855 | printk(KERN_WARNING "%s: rtas returned: %d\n", |
856 | __FUNCTION__, ret); | 856 | __func__, ret); |
857 | return -EIO; | 857 | return -EIO; |
858 | } | 858 | } |
859 | 859 | ||
@@ -949,7 +949,7 @@ static int cell_global_start_spu(struct op_counter_config *ctr) | |||
949 | if (unlikely(ret != 0)) { | 949 | if (unlikely(ret != 0)) { |
950 | printk(KERN_ERR | 950 | printk(KERN_ERR |
951 | "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n", | 951 | "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n", |
952 | __FUNCTION__, ret); | 952 | __func__, ret); |
953 | rtas_error = -EIO; | 953 | rtas_error = -EIO; |
954 | goto out; | 954 | goto out; |
955 | } | 955 | } |
@@ -1061,7 +1061,7 @@ static void cell_global_stop_spu(void) | |||
1061 | if (unlikely(rtn_value != 0)) { | 1061 | if (unlikely(rtn_value != 0)) { |
1062 | printk(KERN_ERR | 1062 | printk(KERN_ERR |
1063 | "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n", | 1063 | "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n", |
1064 | __FUNCTION__, rtn_value); | 1064 | __func__, rtn_value); |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | /* Deactivate the signals */ | 1067 | /* Deactivate the signals */ |
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c index 13d1345026da..ae2e7f67c18e 100644 --- a/arch/powerpc/platforms/40x/ep405.c +++ b/arch/powerpc/platforms/40x/ep405.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/time.h> | 29 | #include <asm/time.h> |
30 | #include <asm/uic.h> | 30 | #include <asm/uic.h> |
31 | #include <asm/pci-bridge.h> | 31 | #include <asm/pci-bridge.h> |
32 | #include <asm/ppc4xx.h> | ||
32 | 33 | ||
33 | static struct device_node *bcsr_node; | 34 | static struct device_node *bcsr_node; |
34 | static void __iomem *bcsr_regs; | 35 | static void __iomem *bcsr_regs; |
@@ -119,5 +120,6 @@ define_machine(ep405) { | |||
119 | .progress = udbg_progress, | 120 | .progress = udbg_progress, |
120 | .init_IRQ = uic_init_tree, | 121 | .init_IRQ = uic_init_tree, |
121 | .get_irq = uic_get_irq, | 122 | .get_irq = uic_get_irq, |
123 | .restart = ppc4xx_reset_system, | ||
122 | .calibrate_decr = generic_calibrate_decr, | 124 | .calibrate_decr = generic_calibrate_decr, |
123 | }; | 125 | }; |
diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c index f9206a7fede0..1dd24ffc0dc1 100644 --- a/arch/powerpc/platforms/40x/kilauea.c +++ b/arch/powerpc/platforms/40x/kilauea.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Kilauea board specific routines | 2 | * Kilauea board specific routines |
3 | * | 3 | * |
4 | * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de> | 4 | * Copyright 2007-2008 DENX Software Engineering, Stefan Roese <sr@denx.de> |
5 | * | 5 | * |
6 | * Based on the Walnut code by | 6 | * Based on the Walnut code by |
7 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | 7 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> |
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/time.h> | 20 | #include <asm/time.h> |
21 | #include <asm/uic.h> | 21 | #include <asm/uic.h> |
22 | #include <asm/pci-bridge.h> | 22 | #include <asm/pci-bridge.h> |
23 | #include <asm/ppc4xx.h> | ||
23 | 24 | ||
24 | static __initdata struct of_device_id kilauea_of_bus[] = { | 25 | static __initdata struct of_device_id kilauea_of_bus[] = { |
25 | { .compatible = "ibm,plb4", }, | 26 | { .compatible = "ibm,plb4", }, |
@@ -54,5 +55,6 @@ define_machine(kilauea) { | |||
54 | .progress = udbg_progress, | 55 | .progress = udbg_progress, |
55 | .init_IRQ = uic_init_tree, | 56 | .init_IRQ = uic_init_tree, |
56 | .get_irq = uic_get_irq, | 57 | .get_irq = uic_get_irq, |
58 | .restart = ppc4xx_reset_system, | ||
57 | .calibrate_decr = generic_calibrate_decr, | 59 | .calibrate_decr = generic_calibrate_decr, |
58 | }; | 60 | }; |
diff --git a/arch/powerpc/platforms/40x/makalu.c b/arch/powerpc/platforms/40x/makalu.c index 4e4df72fc9cd..a6a1d6017b71 100644 --- a/arch/powerpc/platforms/40x/makalu.c +++ b/arch/powerpc/platforms/40x/makalu.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/time.h> | 20 | #include <asm/time.h> |
21 | #include <asm/uic.h> | 21 | #include <asm/uic.h> |
22 | #include <asm/pci-bridge.h> | 22 | #include <asm/pci-bridge.h> |
23 | #include <asm/ppc4xx.h> | ||
23 | 24 | ||
24 | static __initdata struct of_device_id makalu_of_bus[] = { | 25 | static __initdata struct of_device_id makalu_of_bus[] = { |
25 | { .compatible = "ibm,plb4", }, | 26 | { .compatible = "ibm,plb4", }, |
@@ -54,5 +55,6 @@ define_machine(makalu) { | |||
54 | .progress = udbg_progress, | 55 | .progress = udbg_progress, |
55 | .init_IRQ = uic_init_tree, | 56 | .init_IRQ = uic_init_tree, |
56 | .get_irq = uic_get_irq, | 57 | .get_irq = uic_get_irq, |
58 | .restart = ppc4xx_reset_system, | ||
57 | .calibrate_decr = generic_calibrate_decr, | 59 | .calibrate_decr = generic_calibrate_decr, |
58 | }; | 60 | }; |
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c index 0422590040db..fc7fb001276c 100644 --- a/arch/powerpc/platforms/40x/virtex.c +++ b/arch/powerpc/platforms/40x/virtex.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/prom.h> | 14 | #include <asm/prom.h> |
15 | #include <asm/time.h> | 15 | #include <asm/time.h> |
16 | #include <asm/xilinx_intc.h> | 16 | #include <asm/xilinx_intc.h> |
17 | #include <asm/ppc4xx.h> | ||
17 | 18 | ||
18 | static struct of_device_id xilinx_of_bus_ids[] __initdata = { | 19 | static struct of_device_id xilinx_of_bus_ids[] __initdata = { |
19 | { .compatible = "xlnx,plb-v46-1.00.a", }, | 20 | { .compatible = "xlnx,plb-v46-1.00.a", }, |
@@ -48,5 +49,6 @@ define_machine(virtex) { | |||
48 | .probe = virtex_probe, | 49 | .probe = virtex_probe, |
49 | .init_IRQ = xilinx_intc_init_tree, | 50 | .init_IRQ = xilinx_intc_init_tree, |
50 | .get_irq = xilinx_intc_get_irq, | 51 | .get_irq = xilinx_intc_get_irq, |
52 | .restart = ppc4xx_reset_system, | ||
51 | .calibrate_decr = generic_calibrate_decr, | 53 | .calibrate_decr = generic_calibrate_decr, |
52 | }; | 54 | }; |
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c index b8b257efeb77..335df91fbee5 100644 --- a/arch/powerpc/platforms/40x/walnut.c +++ b/arch/powerpc/platforms/40x/walnut.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/time.h> | 26 | #include <asm/time.h> |
27 | #include <asm/uic.h> | 27 | #include <asm/uic.h> |
28 | #include <asm/pci-bridge.h> | 28 | #include <asm/pci-bridge.h> |
29 | #include <asm/ppc4xx.h> | ||
29 | 30 | ||
30 | static __initdata struct of_device_id walnut_of_bus[] = { | 31 | static __initdata struct of_device_id walnut_of_bus[] = { |
31 | { .compatible = "ibm,plb3", }, | 32 | { .compatible = "ibm,plb3", }, |
@@ -61,5 +62,6 @@ define_machine(walnut) { | |||
61 | .progress = udbg_progress, | 62 | .progress = udbg_progress, |
62 | .init_IRQ = uic_init_tree, | 63 | .init_IRQ = uic_init_tree, |
63 | .get_irq = uic_get_irq, | 64 | .get_irq = uic_get_irq, |
64 | .calibrate_decr = generic_calibrate_decr, | 65 | .restart = ppc4xx_reset_system, |
66 | .calibrate_decr = generic_calibrate_decr, | ||
65 | }; | 67 | }; |
diff --git a/arch/powerpc/platforms/44x/44x.h b/arch/powerpc/platforms/44x/44x.h index 42eabf87fea3..dbc4d2b4301a 100644 --- a/arch/powerpc/platforms/44x/44x.h +++ b/arch/powerpc/platforms/44x/44x.h | |||
@@ -3,6 +3,5 @@ | |||
3 | 3 | ||
4 | extern u8 as1_readb(volatile u8 __iomem *addr); | 4 | extern u8 as1_readb(volatile u8 __iomem *addr); |
5 | extern void as1_writeb(u8 data, volatile u8 __iomem *addr); | 5 | extern void as1_writeb(u8 data, volatile u8 __iomem *addr); |
6 | extern void ppc44x_reset_system(char *cmd); | ||
7 | 6 | ||
8 | #endif /* __POWERPC_PLATFORMS_44X_44X_H */ | 7 | #endif /* __POWERPC_PLATFORMS_44X_44X_H */ |
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 1bfb2191010a..6abe91357eee 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig | |||
@@ -67,6 +67,25 @@ config WARP | |||
67 | See http://www.pikatechnologies.com/ and follow the "PIKA for Computer | 67 | See http://www.pikatechnologies.com/ and follow the "PIKA for Computer |
68 | Telephony Developers" link for more information. | 68 | Telephony Developers" link for more information. |
69 | 69 | ||
70 | config CANYONLANDS | ||
71 | bool "Canyonlands" | ||
72 | depends on 44x | ||
73 | default n | ||
74 | select 460EX | ||
75 | select PCI | ||
76 | select PPC4xx_PCI_EXPRESS | ||
77 | help | ||
78 | This option enables support for the AMCC PPC460EX evaluation board. | ||
79 | |||
80 | config YOSEMITE | ||
81 | bool "Yosemite" | ||
82 | depends on 44x | ||
83 | default n | ||
84 | select 440EP | ||
85 | select PCI | ||
86 | help | ||
87 | This option enables support for the AMCC PPC440EP evaluation board. | ||
88 | |||
70 | #config LUAN | 89 | #config LUAN |
71 | # bool "Luan" | 90 | # bool "Luan" |
72 | # depends on 44x | 91 | # depends on 44x |
@@ -122,6 +141,14 @@ config 440SPe | |||
122 | bool | 141 | bool |
123 | select IBM_NEW_EMAC_EMAC4 | 142 | select IBM_NEW_EMAC_EMAC4 |
124 | 143 | ||
144 | config 460EX | ||
145 | bool | ||
146 | select PPC_FPU | ||
147 | select IBM_NEW_EMAC_EMAC4 | ||
148 | select IBM_NEW_EMAC_RGMII | ||
149 | select IBM_NEW_EMAC_ZMII | ||
150 | select IBM_NEW_EMAC_TAH | ||
151 | |||
125 | # 44x errata/workaround config symbols, selected by the CPU models above | 152 | # 44x errata/workaround config symbols, selected by the CPU models above |
126 | config IBM440EP_ERR42 | 153 | config IBM440EP_ERR42 |
127 | bool | 154 | bool |
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile index 0864d4f1cbc2..2320ae5dc8a7 100644 --- a/arch/powerpc/platforms/44x/Makefile +++ b/arch/powerpc/platforms/44x/Makefile | |||
@@ -2,8 +2,10 @@ obj-$(CONFIG_44x) := misc_44x.o | |||
2 | obj-$(CONFIG_EBONY) += ebony.o | 2 | obj-$(CONFIG_EBONY) += ebony.o |
3 | obj-$(CONFIG_TAISHAN) += taishan.o | 3 | obj-$(CONFIG_TAISHAN) += taishan.o |
4 | obj-$(CONFIG_BAMBOO) += bamboo.o | 4 | obj-$(CONFIG_BAMBOO) += bamboo.o |
5 | obj-$(CONFIG_YOSEMITE) += bamboo.o | ||
5 | obj-$(CONFIG_SEQUOIA) += sequoia.o | 6 | obj-$(CONFIG_SEQUOIA) += sequoia.o |
6 | obj-$(CONFIG_KATMAI) += katmai.o | 7 | obj-$(CONFIG_KATMAI) += katmai.o |
7 | obj-$(CONFIG_RAINIER) += rainier.o | 8 | obj-$(CONFIG_RAINIER) += rainier.o |
8 | obj-$(CONFIG_WARP) += warp.o | 9 | obj-$(CONFIG_WARP) += warp.o |
9 | obj-$(CONFIG_WARP) += warp-nand.o | 10 | obj-$(CONFIG_WARP) += warp-nand.o |
11 | obj-$(CONFIG_CANYONLANDS) += canyonlands.o | ||
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c index fb9a22a7e8d0..cef169e95156 100644 --- a/arch/powerpc/platforms/44x/bamboo.c +++ b/arch/powerpc/platforms/44x/bamboo.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | 25 | #include <asm/ppc4xx.h> | |
26 | #include "44x.h" | ||
27 | 26 | ||
28 | static __initdata struct of_device_id bamboo_of_bus[] = { | 27 | static __initdata struct of_device_id bamboo_of_bus[] = { |
29 | { .compatible = "ibm,plb4", }, | 28 | { .compatible = "ibm,plb4", }, |
@@ -53,11 +52,11 @@ static int __init bamboo_probe(void) | |||
53 | } | 52 | } |
54 | 53 | ||
55 | define_machine(bamboo) { | 54 | define_machine(bamboo) { |
56 | .name = "Bamboo", | 55 | .name = "Bamboo", |
57 | .probe = bamboo_probe, | 56 | .probe = bamboo_probe, |
58 | .progress = udbg_progress, | 57 | .progress = udbg_progress, |
59 | .init_IRQ = uic_init_tree, | 58 | .init_IRQ = uic_init_tree, |
60 | .get_irq = uic_get_irq, | 59 | .get_irq = uic_get_irq, |
61 | .restart = ppc44x_reset_system, | 60 | .restart = ppc4xx_reset_system, |
62 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
63 | }; | 62 | }; |
diff --git a/arch/powerpc/platforms/44x/canyonlands.c b/arch/powerpc/platforms/44x/canyonlands.c new file mode 100644 index 000000000000..3949289f51df --- /dev/null +++ b/arch/powerpc/platforms/44x/canyonlands.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Canyonlands board specific routines | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * Based on the Katmai code by | ||
7 | * Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
8 | * Copyright 2007 IBM Corp. | ||
9 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
10 | * Copyright 2007 IBM Corporation | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | |||
20 | #include <asm/machdep.h> | ||
21 | #include <asm/prom.h> | ||
22 | #include <asm/udbg.h> | ||
23 | #include <asm/time.h> | ||
24 | #include <asm/uic.h> | ||
25 | #include <asm/pci-bridge.h> | ||
26 | #include <asm/ppc4xx.h> | ||
27 | |||
28 | static __initdata struct of_device_id canyonlands_of_bus[] = { | ||
29 | { .compatible = "ibm,plb4", }, | ||
30 | { .compatible = "ibm,opb", }, | ||
31 | { .compatible = "ibm,ebc", }, | ||
32 | {}, | ||
33 | }; | ||
34 | |||
35 | static int __init canyonlands_device_probe(void) | ||
36 | { | ||
37 | of_platform_bus_probe(NULL, canyonlands_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | machine_device_initcall(canyonlands, canyonlands_device_probe); | ||
42 | |||
43 | static int __init canyonlands_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "amcc,canyonlands")) | ||
48 | return 0; | ||
49 | |||
50 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | ||
51 | |||
52 | return 1; | ||
53 | } | ||
54 | |||
55 | define_machine(canyonlands) { | ||
56 | .name = "Canyonlands", | ||
57 | .probe = canyonlands_probe, | ||
58 | .progress = udbg_progress, | ||
59 | .init_IRQ = uic_init_tree, | ||
60 | .get_irq = uic_get_irq, | ||
61 | .restart = ppc4xx_reset_system, | ||
62 | .calibrate_decr = generic_calibrate_decr, | ||
63 | }; | ||
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index 1a8d467bff85..a0e8fe4662f6 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include <asm/time.h> | 26 | #include <asm/time.h> |
27 | #include <asm/uic.h> | 27 | #include <asm/uic.h> |
28 | #include <asm/pci-bridge.h> | 28 | #include <asm/pci-bridge.h> |
29 | 29 | #include <asm/ppc4xx.h> | |
30 | #include "44x.h" | ||
31 | 30 | ||
32 | static __initdata struct of_device_id ebony_of_bus[] = { | 31 | static __initdata struct of_device_id ebony_of_bus[] = { |
33 | { .compatible = "ibm,plb4", }, | 32 | { .compatible = "ibm,plb4", }, |
@@ -66,6 +65,6 @@ define_machine(ebony) { | |||
66 | .progress = udbg_progress, | 65 | .progress = udbg_progress, |
67 | .init_IRQ = uic_init_tree, | 66 | .init_IRQ = uic_init_tree, |
68 | .get_irq = uic_get_irq, | 67 | .get_irq = uic_get_irq, |
69 | .restart = ppc44x_reset_system, | 68 | .restart = ppc4xx_reset_system, |
70 | .calibrate_decr = generic_calibrate_decr, | 69 | .calibrate_decr = generic_calibrate_decr, |
71 | }; | 70 | }; |
diff --git a/arch/powerpc/platforms/44x/katmai.c b/arch/powerpc/platforms/44x/katmai.c index 11134121f272..44f4b3a00ced 100644 --- a/arch/powerpc/platforms/44x/katmai.c +++ b/arch/powerpc/platforms/44x/katmai.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | 25 | #include <asm/ppc4xx.h> | |
26 | #include "44x.h" | ||
27 | 26 | ||
28 | static __initdata struct of_device_id katmai_of_bus[] = { | 27 | static __initdata struct of_device_id katmai_of_bus[] = { |
29 | { .compatible = "ibm,plb4", }, | 28 | { .compatible = "ibm,plb4", }, |
@@ -58,6 +57,6 @@ define_machine(katmai) { | |||
58 | .progress = udbg_progress, | 57 | .progress = udbg_progress, |
59 | .init_IRQ = uic_init_tree, | 58 | .init_IRQ = uic_init_tree, |
60 | .get_irq = uic_get_irq, | 59 | .get_irq = uic_get_irq, |
61 | .restart = ppc44x_reset_system, | 60 | .restart = ppc4xx_reset_system, |
62 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
63 | }; | 62 | }; |
diff --git a/arch/powerpc/platforms/44x/misc_44x.S b/arch/powerpc/platforms/44x/misc_44x.S index 3bce71d5d756..dc12b8009e48 100644 --- a/arch/powerpc/platforms/44x/misc_44x.S +++ b/arch/powerpc/platforms/44x/misc_44x.S | |||
@@ -44,14 +44,3 @@ _GLOBAL(as1_writeb) | |||
44 | sync | 44 | sync |
45 | isync | 45 | isync |
46 | blr | 46 | blr |
47 | |||
48 | /* | ||
49 | * void ppc44x_reset_system(char *cmd) | ||
50 | * | ||
51 | * At present, this routine just applies a system reset. | ||
52 | */ | ||
53 | _GLOBAL(ppc44x_reset_system) | ||
54 | mfspr r13,SPRN_DBCR0 | ||
55 | oris r13,r13,DBCR0_RST_SYSTEM@h | ||
56 | mtspr SPRN_DBCR0,r13 | ||
57 | b . /* Just in case the reset doesn't work */ | ||
diff --git a/arch/powerpc/platforms/44x/rainier.c b/arch/powerpc/platforms/44x/rainier.c index a7fae1cf69c1..4f1ff84c4b63 100644 --- a/arch/powerpc/platforms/44x/rainier.c +++ b/arch/powerpc/platforms/44x/rainier.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/time.h> | 22 | #include <asm/time.h> |
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | #include "44x.h" | 25 | #include <asm/ppc4xx.h> |
26 | 26 | ||
27 | static __initdata struct of_device_id rainier_of_bus[] = { | 27 | static __initdata struct of_device_id rainier_of_bus[] = { |
28 | { .compatible = "ibm,plb4", }, | 28 | { .compatible = "ibm,plb4", }, |
@@ -57,6 +57,6 @@ define_machine(rainier) { | |||
57 | .progress = udbg_progress, | 57 | .progress = udbg_progress, |
58 | .init_IRQ = uic_init_tree, | 58 | .init_IRQ = uic_init_tree, |
59 | .get_irq = uic_get_irq, | 59 | .get_irq = uic_get_irq, |
60 | .restart = ppc44x_reset_system, | 60 | .restart = ppc4xx_reset_system, |
61 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
62 | }; | 62 | }; |
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c index d279db42c896..49eb73daacdf 100644 --- a/arch/powerpc/platforms/44x/sequoia.c +++ b/arch/powerpc/platforms/44x/sequoia.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | 25 | ||
26 | #include "44x.h" | 26 | #include <asm/ppc4xx.h> |
27 | 27 | ||
28 | static __initdata struct of_device_id sequoia_of_bus[] = { | 28 | static __initdata struct of_device_id sequoia_of_bus[] = { |
29 | { .compatible = "ibm,plb4", }, | 29 | { .compatible = "ibm,plb4", }, |
@@ -58,6 +58,6 @@ define_machine(sequoia) { | |||
58 | .progress = udbg_progress, | 58 | .progress = udbg_progress, |
59 | .init_IRQ = uic_init_tree, | 59 | .init_IRQ = uic_init_tree, |
60 | .get_irq = uic_get_irq, | 60 | .get_irq = uic_get_irq, |
61 | .restart = ppc44x_reset_system, | 61 | .restart = ppc4xx_reset_system, |
62 | .calibrate_decr = generic_calibrate_decr, | 62 | .calibrate_decr = generic_calibrate_decr, |
63 | }; | 63 | }; |
diff --git a/arch/powerpc/platforms/44x/taishan.c b/arch/powerpc/platforms/44x/taishan.c index 28ab7e2e02c3..49c78b2098b4 100644 --- a/arch/powerpc/platforms/44x/taishan.c +++ b/arch/powerpc/platforms/44x/taishan.c | |||
@@ -29,8 +29,7 @@ | |||
29 | #include <asm/time.h> | 29 | #include <asm/time.h> |
30 | #include <asm/uic.h> | 30 | #include <asm/uic.h> |
31 | #include <asm/pci-bridge.h> | 31 | #include <asm/pci-bridge.h> |
32 | 32 | #include <asm/ppc4xx.h> | |
33 | #include "44x.h" | ||
34 | 33 | ||
35 | static __initdata struct of_device_id taishan_of_bus[] = { | 34 | static __initdata struct of_device_id taishan_of_bus[] = { |
36 | { .compatible = "ibm,plb4", }, | 35 | { .compatible = "ibm,plb4", }, |
@@ -68,6 +67,6 @@ define_machine(taishan) { | |||
68 | .progress = udbg_progress, | 67 | .progress = udbg_progress, |
69 | .init_IRQ = uic_init_tree, | 68 | .init_IRQ = uic_init_tree, |
70 | .get_irq = uic_get_irq, | 69 | .get_irq = uic_get_irq, |
71 | .restart = ppc44x_reset_system, | 70 | .restart = ppc4xx_reset_system, |
72 | .calibrate_decr = generic_calibrate_decr, | 71 | .calibrate_decr = generic_calibrate_decr, |
73 | }; | 72 | }; |
diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c index 84ab78ff8c03..9150318cfc56 100644 --- a/arch/powerpc/platforms/44x/warp-nand.c +++ b/arch/powerpc/platforms/44x/warp-nand.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mtd/partitions.h> | 11 | #include <linux/mtd/partitions.h> |
12 | #include <linux/mtd/nand.h> | 12 | #include <linux/mtd/nand.h> |
13 | #include <linux/mtd/ndfc.h> | 13 | #include <linux/mtd/ndfc.h> |
14 | #include <asm/machdep.h> | ||
14 | 15 | ||
15 | #ifdef CONFIG_MTD_NAND_NDFC | 16 | #ifdef CONFIG_MTD_NAND_NDFC |
16 | 17 | ||
@@ -100,6 +101,6 @@ static int warp_setup_nand_flash(void) | |||
100 | 101 | ||
101 | return 0; | 102 | return 0; |
102 | } | 103 | } |
103 | device_initcall(warp_setup_nand_flash); | 104 | machine_device_initcall(warp, warp_setup_nand_flash); |
104 | 105 | ||
105 | #endif | 106 | #endif |
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index da5b7b7599db..39cf6150a72b 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c | |||
@@ -18,9 +18,7 @@ | |||
18 | #include <asm/udbg.h> | 18 | #include <asm/udbg.h> |
19 | #include <asm/time.h> | 19 | #include <asm/time.h> |
20 | #include <asm/uic.h> | 20 | #include <asm/uic.h> |
21 | 21 | #include <asm/ppc4xx.h> | |
22 | #include "44x.h" | ||
23 | |||
24 | 22 | ||
25 | static __initdata struct of_device_id warp_of_bus[] = { | 23 | static __initdata struct of_device_id warp_of_bus[] = { |
26 | { .compatible = "ibm,plb4", }, | 24 | { .compatible = "ibm,plb4", }, |
@@ -49,7 +47,7 @@ define_machine(warp) { | |||
49 | .progress = udbg_progress, | 47 | .progress = udbg_progress, |
50 | .init_IRQ = uic_init_tree, | 48 | .init_IRQ = uic_init_tree, |
51 | .get_irq = uic_get_irq, | 49 | .get_irq = uic_get_irq, |
52 | .restart = ppc44x_reset_system, | 50 | .restart = ppc4xx_reset_system, |
53 | .calibrate_decr = generic_calibrate_decr, | 51 | .calibrate_decr = generic_calibrate_decr, |
54 | }; | 52 | }; |
55 | 53 | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 956f459e175c..6d584f4e3c9a 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -63,7 +63,7 @@ lite5200_fix_clock_config(void) | |||
63 | of_node_put(np); | 63 | of_node_put(np); |
64 | if (!cdm) { | 64 | if (!cdm) { |
65 | printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", | 65 | printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", |
66 | __FUNCTION__); | 66 | __func__); |
67 | return; | 67 | return; |
68 | } | 68 | } |
69 | 69 | ||
@@ -98,7 +98,7 @@ lite5200_fix_port_config(void) | |||
98 | of_node_put(np); | 98 | of_node_put(np); |
99 | if (!gpio) { | 99 | if (!gpio) { |
100 | printk(KERN_ERR "%s() failed. expect abnormal behavior\n", | 100 | printk(KERN_ERR "%s() failed. expect abnormal behavior\n", |
101 | __FUNCTION__); | 101 | __func__); |
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | 104 | ||
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 7e76ddbd5821..28bc6e58a970 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -46,6 +46,13 @@ config MPC85xx_DS | |||
46 | help | 46 | help |
47 | This option enables support for the MPC85xx DS (MPC8544 DS) board | 47 | This option enables support for the MPC85xx DS (MPC8544 DS) board |
48 | 48 | ||
49 | config KSI8560 | ||
50 | bool "Emerson KSI8560" | ||
51 | select PPC_CPM_NEW_BINDING | ||
52 | select DEFAULT_UIMAGE | ||
53 | help | ||
54 | This option enables support for the Emerson KSI8560 board | ||
55 | |||
49 | config STX_GP3 | 56 | config STX_GP3 |
50 | bool "Silicon Turnkey Express GP3" | 57 | bool "Silicon Turnkey Express GP3" |
51 | help | 58 | help |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index cb7af4ebd75f..6cea185f62b2 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -10,3 +10,4 @@ obj-$(CONFIG_STX_GP3) += stx_gp3.o | |||
10 | obj-$(CONFIG_TQM85xx) += tqm85xx.o | 10 | obj-$(CONFIG_TQM85xx) += tqm85xx.o |
11 | obj-$(CONFIG_SBC8560) += sbc8560.o | 11 | obj-$(CONFIG_SBC8560) += sbc8560.o |
12 | obj-$(CONFIG_SBC8548) += sbc8548.o | 12 | obj-$(CONFIG_SBC8548) += sbc8548.o |
13 | obj-$(CONFIG_KSI8560) += ksi8560.o | ||
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c new file mode 100644 index 000000000000..2145adeb220c --- /dev/null +++ b/arch/powerpc/platforms/85xx/ksi8560.c | |||
@@ -0,0 +1,257 @@ | |||
1 | /* | ||
2 | * Board setup routines for the Emerson KSI8560 | ||
3 | * | ||
4 | * Author: Alexandr Smirnov <asmirnov@ru.mvista.com> | ||
5 | * | ||
6 | * Based on mpc85xx_ads.c maintained by Kumar Gala | ||
7 | * | ||
8 | * 2008 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #include <linux/stddef.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/pci.h> | ||
18 | #include <linux/kdev_t.h> | ||
19 | #include <linux/delay.h> | ||
20 | #include <linux/seq_file.h> | ||
21 | #include <linux/of_platform.h> | ||
22 | |||
23 | #include <asm/system.h> | ||
24 | #include <asm/time.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/pci-bridge.h> | ||
27 | #include <asm/mpic.h> | ||
28 | #include <mm/mmu_decl.h> | ||
29 | #include <asm/udbg.h> | ||
30 | #include <asm/prom.h> | ||
31 | |||
32 | #include <sysdev/fsl_soc.h> | ||
33 | #include <sysdev/fsl_pci.h> | ||
34 | |||
35 | #include <asm/cpm2.h> | ||
36 | #include <sysdev/cpm2_pic.h> | ||
37 | |||
38 | |||
39 | #define KSI8560_CPLD_HVR 0x04 /* Hardware Version Register */ | ||
40 | #define KSI8560_CPLD_PVR 0x08 /* PLD Version Register */ | ||
41 | #define KSI8560_CPLD_RCR1 0x30 /* Reset Command Register 1 */ | ||
42 | |||
43 | #define KSI8560_CPLD_RCR1_CPUHR 0x80 /* CPU Hard Reset */ | ||
44 | |||
45 | static void __iomem *cpld_base = NULL; | ||
46 | |||
47 | static void machine_restart(char *cmd) | ||
48 | { | ||
49 | if (cpld_base) | ||
50 | out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR); | ||
51 | else | ||
52 | printk(KERN_ERR "Can't find CPLD base, hang forever\n"); | ||
53 | |||
54 | for (;;); | ||
55 | } | ||
56 | |||
57 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | ||
58 | { | ||
59 | int cascade_irq; | ||
60 | |||
61 | while ((cascade_irq = cpm2_get_irq()) >= 0) | ||
62 | generic_handle_irq(cascade_irq); | ||
63 | |||
64 | desc->chip->eoi(irq); | ||
65 | } | ||
66 | |||
67 | static void __init ksi8560_pic_init(void) | ||
68 | { | ||
69 | struct mpic *mpic; | ||
70 | struct resource r; | ||
71 | struct device_node *np; | ||
72 | #ifdef CONFIG_CPM2 | ||
73 | int irq; | ||
74 | #endif | ||
75 | |||
76 | np = of_find_node_by_type(NULL, "open-pic"); | ||
77 | |||
78 | if (np == NULL) { | ||
79 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
80 | return; | ||
81 | } | ||
82 | |||
83 | if (of_address_to_resource(np, 0, &r)) { | ||
84 | printk(KERN_ERR "Could not map mpic register space\n"); | ||
85 | of_node_put(np); | ||
86 | return; | ||
87 | } | ||
88 | |||
89 | mpic = mpic_alloc(np, r.start, | ||
90 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, | ||
91 | 0, 256, " OpenPIC "); | ||
92 | BUG_ON(mpic == NULL); | ||
93 | of_node_put(np); | ||
94 | |||
95 | mpic_init(mpic); | ||
96 | |||
97 | #ifdef CONFIG_CPM2 | ||
98 | /* Setup CPM2 PIC */ | ||
99 | np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic"); | ||
100 | if (np == NULL) { | ||
101 | printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n"); | ||
102 | return; | ||
103 | } | ||
104 | irq = irq_of_parse_and_map(np, 0); | ||
105 | |||
106 | cpm2_pic_init(np); | ||
107 | of_node_put(np); | ||
108 | set_irq_chained_handler(irq, cpm2_cascade); | ||
109 | |||
110 | setup_irq(0, NULL); | ||
111 | #endif | ||
112 | } | ||
113 | |||
114 | #ifdef CONFIG_CPM2 | ||
115 | /* | ||
116 | * Setup I/O ports | ||
117 | */ | ||
118 | struct cpm_pin { | ||
119 | int port, pin, flags; | ||
120 | }; | ||
121 | |||
122 | static struct cpm_pin __initdata ksi8560_pins[] = { | ||
123 | /* SCC1 */ | ||
124 | {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
125 | {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
126 | {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
127 | |||
128 | /* SCC2 */ | ||
129 | {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
130 | {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
131 | {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
132 | |||
133 | /* FCC1 */ | ||
134 | {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
135 | {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
136 | {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
137 | {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
138 | {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
139 | {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
140 | {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
141 | {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
142 | {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
143 | {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
144 | {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
145 | {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, | ||
146 | {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
147 | {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, | ||
148 | {2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK9 */ | ||
149 | {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK10 */ | ||
150 | |||
151 | }; | ||
152 | |||
153 | static void __init init_ioports(void) | ||
154 | { | ||
155 | int i; | ||
156 | |||
157 | for (i = 0; i < ARRAY_SIZE(ksi8560_pins); i++) { | ||
158 | struct cpm_pin *pin = &ksi8560_pins[i]; | ||
159 | cpm2_set_pin(pin->port, pin->pin, pin->flags); | ||
160 | } | ||
161 | |||
162 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); | ||
163 | cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); | ||
164 | cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX); | ||
165 | cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX); | ||
166 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_RX); | ||
167 | cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX); | ||
168 | } | ||
169 | #endif | ||
170 | |||
171 | /* | ||
172 | * Setup the architecture | ||
173 | */ | ||
174 | static void __init ksi8560_setup_arch(void) | ||
175 | { | ||
176 | struct device_node *cpld; | ||
177 | |||
178 | cpld = of_find_compatible_node(NULL, NULL, "emerson,KSI8560-cpld"); | ||
179 | if (cpld) | ||
180 | cpld_base = of_iomap(cpld, 0); | ||
181 | else | ||
182 | printk(KERN_ERR "Can't find CPLD in device tree\n"); | ||
183 | |||
184 | if (ppc_md.progress) | ||
185 | ppc_md.progress("ksi8560_setup_arch()", 0); | ||
186 | |||
187 | #ifdef CONFIG_CPM2 | ||
188 | cpm2_reset(); | ||
189 | init_ioports(); | ||
190 | #endif | ||
191 | } | ||
192 | |||
193 | static void ksi8560_show_cpuinfo(struct seq_file *m) | ||
194 | { | ||
195 | uint pvid, svid, phid1; | ||
196 | uint memsize = total_memory; | ||
197 | |||
198 | pvid = mfspr(SPRN_PVR); | ||
199 | svid = mfspr(SPRN_SVR); | ||
200 | |||
201 | seq_printf(m, "Vendor\t\t: Emerson Network Power\n"); | ||
202 | seq_printf(m, "Board\t\t: KSI8560\n"); | ||
203 | |||
204 | if (cpld_base) { | ||
205 | seq_printf(m, "Hardware rev\t: %d\n", | ||
206 | in_8(cpld_base + KSI8560_CPLD_HVR)); | ||
207 | seq_printf(m, "CPLD rev\t: %d\n", | ||
208 | in_8(cpld_base + KSI8560_CPLD_PVR)); | ||
209 | } else | ||
210 | seq_printf(m, "Unknown Hardware and CPLD revs\n"); | ||
211 | |||
212 | seq_printf(m, "PVR\t\t: 0x%x\n", pvid); | ||
213 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | ||
214 | |||
215 | /* Display cpu Pll setting */ | ||
216 | phid1 = mfspr(SPRN_HID1); | ||
217 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | ||
218 | |||
219 | /* Display the amount of memory */ | ||
220 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
221 | } | ||
222 | |||
223 | static struct of_device_id __initdata of_bus_ids[] = { | ||
224 | { .type = "soc", }, | ||
225 | { .name = "cpm", }, | ||
226 | { .name = "localbus", }, | ||
227 | {}, | ||
228 | }; | ||
229 | |||
230 | static int __init declare_of_platform_devices(void) | ||
231 | { | ||
232 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
233 | |||
234 | return 0; | ||
235 | } | ||
236 | machine_device_initcall(ksi8560, declare_of_platform_devices); | ||
237 | |||
238 | /* | ||
239 | * Called very early, device-tree isn't unflattened | ||
240 | */ | ||
241 | static int __init ksi8560_probe(void) | ||
242 | { | ||
243 | unsigned long root = of_get_flat_dt_root(); | ||
244 | |||
245 | return of_flat_dt_is_compatible(root, "emerson,KSI8560"); | ||
246 | } | ||
247 | |||
248 | define_machine(ksi8560) { | ||
249 | .name = "KSI8560", | ||
250 | .probe = ksi8560_probe, | ||
251 | .setup_arch = ksi8560_setup_arch, | ||
252 | .init_IRQ = ksi8560_pic_init, | ||
253 | .show_cpuinfo = ksi8560_show_cpuinfo, | ||
254 | .get_irq = mpic_get_irq, | ||
255 | .restart = machine_restart, | ||
256 | .calibrate_decr = generic_calibrate_decr, | ||
257 | }; | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index bdb3d0b38cd2..2865d019afc3 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #undef DEBUG | 36 | #undef DEBUG |
37 | 37 | ||
38 | #ifdef DEBUG | 38 | #ifdef DEBUG |
39 | #define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) | 39 | #define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) |
40 | #else | 40 | #else |
41 | #define DBG(fmt, args...) | 41 | #define DBG(fmt, args...) |
42 | #endif | 42 | #endif |
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index 184f998d1be2..0d9f75c74f8c 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c | |||
@@ -111,17 +111,12 @@ void __init mpc8xx_calibrate_decr(void) | |||
111 | 111 | ||
112 | /* Processor frequency is MHz. | 112 | /* Processor frequency is MHz. |
113 | */ | 113 | */ |
114 | ppc_tb_freq = 50000000; | ||
115 | if (!get_freq("bus-frequency", &ppc_tb_freq)) { | ||
116 | printk(KERN_ERR "WARNING: Estimating decrementer frequency " | ||
117 | "(not found)\n"); | ||
118 | } | ||
119 | ppc_tb_freq /= 16; | ||
120 | ppc_proc_freq = 50000000; | 114 | ppc_proc_freq = 50000000; |
121 | if (!get_freq("clock-frequency", &ppc_proc_freq)) | 115 | if (!get_freq("clock-frequency", &ppc_proc_freq)) |
122 | printk(KERN_ERR "WARNING: Estimating processor frequency " | 116 | printk(KERN_ERR "WARNING: Estimating processor frequency " |
123 | "(not found)\n"); | 117 | "(not found)\n"); |
124 | 118 | ||
119 | ppc_tb_freq = ppc_proc_freq / 16; | ||
125 | printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); | 120 | printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); |
126 | 121 | ||
127 | /* Perform some more timer/timebase initialization. This used | 122 | /* Perform some more timer/timebase initialization. This used |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 0c3face0ddbb..5fc7fac10e93 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -41,11 +41,13 @@ config 40x | |||
41 | bool "AMCC 40x" | 41 | bool "AMCC 40x" |
42 | select PPC_DCR_NATIVE | 42 | select PPC_DCR_NATIVE |
43 | select PPC_UDBG_16550 | 43 | select PPC_UDBG_16550 |
44 | select 4xx_SOC | ||
44 | 45 | ||
45 | config 44x | 46 | config 44x |
46 | bool "AMCC 44x" | 47 | bool "AMCC 44x" |
47 | select PPC_DCR_NATIVE | 48 | select PPC_DCR_NATIVE |
48 | select PPC_UDBG_16550 | 49 | select PPC_UDBG_16550 |
50 | select 4xx_SOC | ||
49 | 51 | ||
50 | config E200 | 52 | config E200 |
51 | bool "Freescale e200" | 53 | bool "Freescale e200" |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index d75ccded7f10..45646b2b4af4 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -28,13 +28,13 @@ | |||
28 | #include <linux/notifier.h> | 28 | #include <linux/notifier.h> |
29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <linux/lmb.h> | ||
31 | 32 | ||
32 | #include <asm/prom.h> | 33 | #include <asm/prom.h> |
33 | #include <asm/iommu.h> | 34 | #include <asm/iommu.h> |
34 | #include <asm/machdep.h> | 35 | #include <asm/machdep.h> |
35 | #include <asm/pci-bridge.h> | 36 | #include <asm/pci-bridge.h> |
36 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
37 | #include <asm/lmb.h> | ||
38 | #include <asm/firmware.h> | 38 | #include <asm/firmware.h> |
39 | #include <asm/cell-regs.h> | 39 | #include <asm/cell-regs.h> |
40 | 40 | ||
@@ -316,7 +316,7 @@ static void cell_iommu_setup_stab(struct cbe_iommu *iommu, | |||
316 | segments = max(dbase + dsize, fbase + fsize) >> IO_SEGMENT_SHIFT; | 316 | segments = max(dbase + dsize, fbase + fsize) >> IO_SEGMENT_SHIFT; |
317 | 317 | ||
318 | pr_debug("%s: iommu[%d]: segments: %lu\n", | 318 | pr_debug("%s: iommu[%d]: segments: %lu\n", |
319 | __FUNCTION__, iommu->nid, segments); | 319 | __func__, iommu->nid, segments); |
320 | 320 | ||
321 | /* set up the segment table */ | 321 | /* set up the segment table */ |
322 | stab_size = segments * sizeof(unsigned long); | 322 | stab_size = segments * sizeof(unsigned long); |
@@ -343,7 +343,7 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu, | |||
343 | (1 << 12) / sizeof(unsigned long)); | 343 | (1 << 12) / sizeof(unsigned long)); |
344 | 344 | ||
345 | ptab_size = segments * pages_per_segment * sizeof(unsigned long); | 345 | ptab_size = segments * pages_per_segment * sizeof(unsigned long); |
346 | pr_debug("%s: iommu[%d]: ptab_size: %lu, order: %d\n", __FUNCTION__, | 346 | pr_debug("%s: iommu[%d]: ptab_size: %lu, order: %d\n", __func__, |
347 | iommu->nid, ptab_size, get_order(ptab_size)); | 347 | iommu->nid, ptab_size, get_order(ptab_size)); |
348 | page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(ptab_size)); | 348 | page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(ptab_size)); |
349 | BUG_ON(!page); | 349 | BUG_ON(!page); |
@@ -355,7 +355,7 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu, | |||
355 | n_pte_pages = (pages_per_segment * sizeof(unsigned long)) >> 12; | 355 | n_pte_pages = (pages_per_segment * sizeof(unsigned long)) >> 12; |
356 | 356 | ||
357 | pr_debug("%s: iommu[%d]: stab at %p, ptab at %p, n_pte_pages: %lu\n", | 357 | pr_debug("%s: iommu[%d]: stab at %p, ptab at %p, n_pte_pages: %lu\n", |
358 | __FUNCTION__, iommu->nid, iommu->stab, ptab, | 358 | __func__, iommu->nid, iommu->stab, ptab, |
359 | n_pte_pages); | 359 | n_pte_pages); |
360 | 360 | ||
361 | /* initialise the STEs */ | 361 | /* initialise the STEs */ |
@@ -394,7 +394,7 @@ static void cell_iommu_enable_hardware(struct cbe_iommu *iommu) | |||
394 | 394 | ||
395 | if (cell_iommu_find_ioc(iommu->nid, &xlate_base)) | 395 | if (cell_iommu_find_ioc(iommu->nid, &xlate_base)) |
396 | panic("%s: missing IOC register mappings for node %d\n", | 396 | panic("%s: missing IOC register mappings for node %d\n", |
397 | __FUNCTION__, iommu->nid); | 397 | __func__, iommu->nid); |
398 | 398 | ||
399 | iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size); | 399 | iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size); |
400 | iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset; | 400 | iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset; |
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c index 0304589c0a80..8a3631ce912b 100644 --- a/arch/powerpc/platforms/cell/pervasive.c +++ b/arch/powerpc/platforms/cell/pervasive.c | |||
@@ -65,7 +65,7 @@ static void cbe_power_save(void) | |||
65 | break; | 65 | break; |
66 | default: | 66 | default: |
67 | printk(KERN_WARNING "%s: unknown configuration\n", | 67 | printk(KERN_WARNING "%s: unknown configuration\n", |
68 | __FUNCTION__); | 68 | __func__); |
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | mtspr(SPRN_TSC_CELL, thread_switch_control); | 71 | mtspr(SPRN_TSC_CELL, thread_switch_control); |
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index e43024c0392e..655704ad03cf 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -132,7 +132,7 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order) | |||
132 | (unsigned int)(addr >> 32), | 132 | (unsigned int)(addr >> 32), |
133 | (unsigned int)(addr & 0xffffffff))) { | 133 | (unsigned int)(addr & 0xffffffff))) { |
134 | printk(KERN_ERR "%s: error enabling PTCAL on node %d!\n", | 134 | printk(KERN_ERR "%s: error enabling PTCAL on node %d!\n", |
135 | __FUNCTION__, nid); | 135 | __func__, nid); |
136 | goto out_free_pages; | 136 | goto out_free_pages; |
137 | } | 137 | } |
138 | 138 | ||
@@ -162,7 +162,7 @@ static int __init cbe_ptcal_enable(void) | |||
162 | if (!size) | 162 | if (!size) |
163 | return -ENODEV; | 163 | return -ENODEV; |
164 | 164 | ||
165 | pr_debug("%s: enabling PTCAL, size = 0x%x\n", __FUNCTION__, *size); | 165 | pr_debug("%s: enabling PTCAL, size = 0x%x\n", __func__, *size); |
166 | order = get_order(*size); | 166 | order = get_order(*size); |
167 | of_node_put(np); | 167 | of_node_put(np); |
168 | 168 | ||
@@ -180,7 +180,7 @@ static int __init cbe_ptcal_enable(void) | |||
180 | const u32 *nid = of_get_property(np, "node-id", NULL); | 180 | const u32 *nid = of_get_property(np, "node-id", NULL); |
181 | if (!nid) { | 181 | if (!nid) { |
182 | printk(KERN_ERR "%s: node %s is missing node-id?\n", | 182 | printk(KERN_ERR "%s: node %s is missing node-id?\n", |
183 | __FUNCTION__, np->full_name); | 183 | __func__, np->full_name); |
184 | continue; | 184 | continue; |
185 | } | 185 | } |
186 | cbe_ptcal_enable_on_node(*nid, order); | 186 | cbe_ptcal_enable_on_node(*nid, order); |
@@ -195,13 +195,13 @@ static int cbe_ptcal_disable(void) | |||
195 | struct ptcal_area *area, *tmp; | 195 | struct ptcal_area *area, *tmp; |
196 | int ret = 0; | 196 | int ret = 0; |
197 | 197 | ||
198 | pr_debug("%s: disabling PTCAL\n", __FUNCTION__); | 198 | pr_debug("%s: disabling PTCAL\n", __func__); |
199 | 199 | ||
200 | list_for_each_entry_safe(area, tmp, &ptcal_list, list) { | 200 | list_for_each_entry_safe(area, tmp, &ptcal_list, list) { |
201 | /* disable ptcal on this node */ | 201 | /* disable ptcal on this node */ |
202 | if (rtas_call(ptcal_stop_tok, 1, 1, NULL, area->nid)) { | 202 | if (rtas_call(ptcal_stop_tok, 1, 1, NULL, area->nid)) { |
203 | printk(KERN_ERR "%s: error disabling PTCAL " | 203 | printk(KERN_ERR "%s: error disabling PTCAL " |
204 | "on node %d!\n", __FUNCTION__, | 204 | "on node %d!\n", __func__, |
205 | area->nid); | 205 | area->nid); |
206 | ret = -EIO; | 206 | ret = -EIO; |
207 | continue; | 207 | continue; |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 712001f6b7da..6bab44b7716b 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -165,7 +165,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea) | |||
165 | struct spu_slb slb; | 165 | struct spu_slb slb; |
166 | int psize; | 166 | int psize; |
167 | 167 | ||
168 | pr_debug("%s\n", __FUNCTION__); | 168 | pr_debug("%s\n", __func__); |
169 | 169 | ||
170 | slb.esid = (ea & ESID_MASK) | SLB_ESID_V; | 170 | slb.esid = (ea & ESID_MASK) | SLB_ESID_V; |
171 | 171 | ||
@@ -215,7 +215,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea) | |||
215 | extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); //XXX | 215 | extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); //XXX |
216 | static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) | 216 | static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) |
217 | { | 217 | { |
218 | pr_debug("%s, %lx, %lx\n", __FUNCTION__, dsisr, ea); | 218 | pr_debug("%s, %lx, %lx\n", __func__, dsisr, ea); |
219 | 219 | ||
220 | /* Handle kernel space hash faults immediately. | 220 | /* Handle kernel space hash faults immediately. |
221 | User hash faults need to be deferred to process context. */ | 221 | User hash faults need to be deferred to process context. */ |
@@ -351,7 +351,7 @@ spu_irq_class_1(int irq, void *data) | |||
351 | __spu_trap_data_seg(spu, dar); | 351 | __spu_trap_data_seg(spu, dar); |
352 | 352 | ||
353 | spin_unlock(&spu->register_lock); | 353 | spin_unlock(&spu->register_lock); |
354 | pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat, | 354 | pr_debug("%s: %lx %lx %lx %lx\n", __func__, mask, stat, |
355 | dar, dsisr); | 355 | dar, dsisr); |
356 | 356 | ||
357 | if (stat & CLASS1_STORAGE_FAULT_INTR) | 357 | if (stat & CLASS1_STORAGE_FAULT_INTR) |
@@ -726,7 +726,7 @@ static int __init init_spu_base(void) | |||
726 | 726 | ||
727 | if (ret < 0) { | 727 | if (ret < 0) { |
728 | printk(KERN_WARNING "%s: Error initializing spus\n", | 728 | printk(KERN_WARNING "%s: Error initializing spus\n", |
729 | __FUNCTION__); | 729 | __func__); |
730 | goto out_unregister_sysdev_class; | 730 | goto out_unregister_sysdev_class; |
731 | } | 731 | } |
732 | 732 | ||
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index dceb8b6a9382..19f6bfdbb933 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c | |||
@@ -54,7 +54,7 @@ long spu_sys_callback(struct spu_syscall_block *s) | |||
54 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); | 54 | long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); |
55 | 55 | ||
56 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { | 56 | if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { |
57 | pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); | 57 | pr_debug("%s: invalid syscall #%ld", __func__, s->nr_ret); |
58 | return -ENOSYS; | 58 | return -ENOSYS; |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index d351bdebf5f1..4c506c1463cd 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -92,7 +92,7 @@ static int __init spu_map_interrupts_old(struct spu *spu, | |||
92 | 92 | ||
93 | tmp = of_get_property(np->parent->parent, "node-id", NULL); | 93 | tmp = of_get_property(np->parent->parent, "node-id", NULL); |
94 | if (!tmp) { | 94 | if (!tmp) { |
95 | printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__); | 95 | printk(KERN_WARNING "%s: can't find node-id\n", __func__); |
96 | nid = spu->node; | 96 | nid = spu->node; |
97 | } else | 97 | } else |
98 | nid = tmp[0]; | 98 | nid = tmp[0]; |
@@ -296,7 +296,7 @@ static int __init of_enumerate_spus(int (*fn)(void *data)) | |||
296 | ret = fn(node); | 296 | ret = fn(node); |
297 | if (ret) { | 297 | if (ret) { |
298 | printk(KERN_WARNING "%s: Error initializing %s\n", | 298 | printk(KERN_WARNING "%s: Error initializing %s\n", |
299 | __FUNCTION__, node->name); | 299 | __func__, node->name); |
300 | break; | 300 | break; |
301 | } | 301 | } |
302 | n++; | 302 | n++; |
@@ -327,7 +327,7 @@ static int __init of_create_spu(struct spu *spu, void *data) | |||
327 | if (!legacy_map) { | 327 | if (!legacy_map) { |
328 | legacy_map = 1; | 328 | legacy_map = 1; |
329 | printk(KERN_WARNING "%s: Legacy device tree found, " | 329 | printk(KERN_WARNING "%s: Legacy device tree found, " |
330 | "trying to map old style\n", __FUNCTION__); | 330 | "trying to map old style\n", __func__); |
331 | } | 331 | } |
332 | ret = spu_map_device_old(spu); | 332 | ret = spu_map_device_old(spu); |
333 | if (ret) { | 333 | if (ret) { |
@@ -342,7 +342,7 @@ static int __init of_create_spu(struct spu *spu, void *data) | |||
342 | if (!legacy_irq) { | 342 | if (!legacy_irq) { |
343 | legacy_irq = 1; | 343 | legacy_irq = 1; |
344 | printk(KERN_WARNING "%s: Legacy device tree found, " | 344 | printk(KERN_WARNING "%s: Legacy device tree found, " |
345 | "trying old style irq\n", __FUNCTION__); | 345 | "trying old style irq\n", __func__); |
346 | } | 346 | } |
347 | ret = spu_map_interrupts_old(spu, spe); | 347 | ret = spu_map_interrupts_old(spu, spe); |
348 | if (ret) { | 348 | if (ret) { |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index f7a7e8635fb6..f14d3a0a8615 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -1556,7 +1556,7 @@ void spufs_mfc_callback(struct spu *spu) | |||
1556 | 1556 | ||
1557 | wake_up_all(&ctx->mfc_wq); | 1557 | wake_up_all(&ctx->mfc_wq); |
1558 | 1558 | ||
1559 | pr_debug("%s %s\n", __FUNCTION__, spu->name); | 1559 | pr_debug("%s %s\n", __func__, spu->name); |
1560 | if (ctx->mfc_fasync) { | 1560 | if (ctx->mfc_fasync) { |
1561 | u32 free_elements, tagstatus; | 1561 | u32 free_elements, tagstatus; |
1562 | unsigned int mask; | 1562 | unsigned int mask; |
@@ -1790,7 +1790,7 @@ static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait) | |||
1790 | if (tagstatus & ctx->tagwait) | 1790 | if (tagstatus & ctx->tagwait) |
1791 | mask |= POLLIN | POLLRDNORM; | 1791 | mask |= POLLIN | POLLRDNORM; |
1792 | 1792 | ||
1793 | pr_debug("%s: free %d tagstatus %d tagwait %d\n", __FUNCTION__, | 1793 | pr_debug("%s: free %d tagstatus %d tagwait %d\n", __func__, |
1794 | free_elements, tagstatus, ctx->tagwait); | 1794 | free_elements, tagstatus, ctx->tagwait); |
1795 | 1795 | ||
1796 | return mask; | 1796 | return mask; |
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index cac69e116776..5986d08115af 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -98,7 +98,7 @@ static int spu_setup_isolated(struct spu_context *ctx) | |||
98 | != MFC_CNTL_PURGE_DMA_COMPLETE) { | 98 | != MFC_CNTL_PURGE_DMA_COMPLETE) { |
99 | if (time_after(jiffies, timeout)) { | 99 | if (time_after(jiffies, timeout)) { |
100 | printk(KERN_ERR "%s: timeout flushing MFC DMA queue\n", | 100 | printk(KERN_ERR "%s: timeout flushing MFC DMA queue\n", |
101 | __FUNCTION__); | 101 | __func__); |
102 | ret = -EIO; | 102 | ret = -EIO; |
103 | goto out; | 103 | goto out; |
104 | } | 104 | } |
@@ -124,7 +124,7 @@ static int spu_setup_isolated(struct spu_context *ctx) | |||
124 | status_loading) { | 124 | status_loading) { |
125 | if (time_after(jiffies, timeout)) { | 125 | if (time_after(jiffies, timeout)) { |
126 | printk(KERN_ERR "%s: timeout waiting for loader\n", | 126 | printk(KERN_ERR "%s: timeout waiting for loader\n", |
127 | __FUNCTION__); | 127 | __func__); |
128 | ret = -EIO; | 128 | ret = -EIO; |
129 | goto out_drop_priv; | 129 | goto out_drop_priv; |
130 | } | 130 | } |
@@ -134,7 +134,7 @@ static int spu_setup_isolated(struct spu_context *ctx) | |||
134 | if (!(status & SPU_STATUS_RUNNING)) { | 134 | if (!(status & SPU_STATUS_RUNNING)) { |
135 | /* If isolated LOAD has failed: run SPU, we will get a stop-and | 135 | /* If isolated LOAD has failed: run SPU, we will get a stop-and |
136 | * signal later. */ | 136 | * signal later. */ |
137 | pr_debug("%s: isolated LOAD failed\n", __FUNCTION__); | 137 | pr_debug("%s: isolated LOAD failed\n", __func__); |
138 | ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE); | 138 | ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE); |
139 | ret = -EACCES; | 139 | ret = -EACCES; |
140 | goto out_drop_priv; | 140 | goto out_drop_priv; |
@@ -142,7 +142,7 @@ static int spu_setup_isolated(struct spu_context *ctx) | |||
142 | 142 | ||
143 | if (!(status & SPU_STATUS_ISOLATED_STATE)) { | 143 | if (!(status & SPU_STATUS_ISOLATED_STATE)) { |
144 | /* This isn't allowed by the CBEA, but check anyway */ | 144 | /* This isn't allowed by the CBEA, but check anyway */ |
145 | pr_debug("%s: SPU fell out of isolated mode?\n", __FUNCTION__); | 145 | pr_debug("%s: SPU fell out of isolated mode?\n", __func__); |
146 | ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_STOP); | 146 | ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_STOP); |
147 | ret = -EINVAL; | 147 | ret = -EINVAL; |
148 | goto out_drop_priv; | 148 | goto out_drop_priv; |
@@ -282,7 +282,7 @@ static int spu_handle_restartsys(struct spu_context *ctx, long *spu_ret, | |||
282 | break; | 282 | break; |
283 | default: | 283 | default: |
284 | printk(KERN_WARNING "%s: unexpected return code %ld\n", | 284 | printk(KERN_WARNING "%s: unexpected return code %ld\n", |
285 | __FUNCTION__, *spu_ret); | 285 | __func__, *spu_ret); |
286 | ret = 0; | 286 | ret = 0; |
287 | } | 287 | } |
288 | return ret; | 288 | return ret; |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index d4f8bf581e3a..84e2d78b9a62 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -117,11 +117,11 @@ static void __init mpc7448_hpc2_init_IRQ(void) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | if (mpic_paddr == 0) { | 119 | if (mpic_paddr == 0) { |
120 | printk("%s: No tsi108 PIC found !\n", __FUNCTION__); | 120 | printk("%s: No tsi108 PIC found !\n", __func__); |
121 | return; | 121 | return; |
122 | } | 122 | } |
123 | 123 | ||
124 | DBG("%s: tsi108 pic phys_addr = 0x%x\n", __FUNCTION__, | 124 | DBG("%s: tsi108 pic phys_addr = 0x%x\n", __func__, |
125 | (u32) mpic_paddr); | 125 | (u32) mpic_paddr); |
126 | 126 | ||
127 | mpic = mpic_alloc(tsi_pic, mpic_paddr, | 127 | mpic = mpic_alloc(tsi_pic, mpic_paddr, |
@@ -140,17 +140,17 @@ static void __init mpc7448_hpc2_init_IRQ(void) | |||
140 | #ifdef CONFIG_PCI | 140 | #ifdef CONFIG_PCI |
141 | tsi_pci = of_find_node_by_type(NULL, "pci"); | 141 | tsi_pci = of_find_node_by_type(NULL, "pci"); |
142 | if (tsi_pci == NULL) { | 142 | if (tsi_pci == NULL) { |
143 | printk("%s: No tsi108 pci node found !\n", __FUNCTION__); | 143 | printk("%s: No tsi108 pci node found !\n", __func__); |
144 | return; | 144 | return; |
145 | } | 145 | } |
146 | cascade_node = of_find_node_by_type(NULL, "pic-router"); | 146 | cascade_node = of_find_node_by_type(NULL, "pic-router"); |
147 | if (cascade_node == NULL) { | 147 | if (cascade_node == NULL) { |
148 | printk("%s: No tsi108 pci cascade node found !\n", __FUNCTION__); | 148 | printk("%s: No tsi108 pci cascade node found !\n", __func__); |
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | 151 | ||
152 | cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0); | 152 | cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0); |
153 | DBG("%s: tsi108 cascade_pci_irq = 0x%x\n", __FUNCTION__, | 153 | DBG("%s: tsi108 cascade_pci_irq = 0x%x\n", __func__, |
154 | (u32) cascade_pci_irq); | 154 | (u32) cascade_pci_irq); |
155 | tsi108_pci_int_init(cascade_node); | 155 | tsi108_pci_int_init(cascade_node); |
156 | set_irq_data(cascade_pci_irq, mpic); | 156 | set_irq_data(cascade_pci_irq, mpic); |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index cc562e4c2f32..02a634faedbe 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #undef DEBUG | 24 | #undef DEBUG |
25 | 25 | ||
26 | #include <linux/jiffies.h> | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/list.h> | 28 | #include <linux/list.h> |
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
@@ -586,7 +587,7 @@ static inline struct device_node *xlate_iomm_address( | |||
586 | static unsigned long last_jiffies; | 587 | static unsigned long last_jiffies; |
587 | static int num_printed; | 588 | static int num_printed; |
588 | 589 | ||
589 | if ((jiffies - last_jiffies) > 60 * HZ) { | 590 | if (time_after(jiffies, last_jiffies + 60 * HZ)) { |
590 | last_jiffies = jiffies; | 591 | last_jiffies = jiffies; |
591 | num_printed = 0; | 592 | num_printed = 0; |
592 | } | 593 | } |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 3ffa0ac170ee..301855263b81 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -592,50 +592,3 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) | |||
592 | } | 592 | } |
593 | return irq; | 593 | return irq; |
594 | } | 594 | } |
595 | |||
596 | /* XXX: To remove once all firmwares are ok */ | ||
597 | static void fixup_maple_ide(struct pci_dev* dev) | ||
598 | { | ||
599 | if (!machine_is(maple)) | ||
600 | return; | ||
601 | |||
602 | #if 0 /* Enable this to enable IDE port 0 */ | ||
603 | { | ||
604 | u8 v; | ||
605 | |||
606 | pci_read_config_byte(dev, 0x40, &v); | ||
607 | v |= 2; | ||
608 | pci_write_config_byte(dev, 0x40, v); | ||
609 | } | ||
610 | #endif | ||
611 | #if 0 /* fix bus master base */ | ||
612 | pci_write_config_dword(dev, 0x20, 0xcc01); | ||
613 | printk("old ide resource: %lx -> %lx \n", | ||
614 | dev->resource[4].start, dev->resource[4].end); | ||
615 | dev->resource[4].start = 0xcc00; | ||
616 | dev->resource[4].end = 0xcc10; | ||
617 | #endif | ||
618 | #if 0 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */ | ||
619 | { | ||
620 | struct pci_dev *apicdev; | ||
621 | u32 v; | ||
622 | |||
623 | apicdev = pci_get_slot (dev->bus, PCI_DEVFN(5,0)); | ||
624 | if (apicdev == NULL) | ||
625 | printk("IDE Fixup IRQ: Can't find IO-APIC !\n"); | ||
626 | else { | ||
627 | pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*14); | ||
628 | pci_read_config_dword(apicdev, 0xf4, &v); | ||
629 | v &= ~0x00000022; | ||
630 | pci_write_config_dword(apicdev, 0xf4, v); | ||
631 | pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*15); | ||
632 | pci_read_config_dword(apicdev, 0xf4, &v); | ||
633 | v &= ~0x00000022; | ||
634 | pci_write_config_dword(apicdev, 0xf4, v); | ||
635 | pci_dev_put(apicdev); | ||
636 | } | ||
637 | } | ||
638 | #endif | ||
639 | } | ||
640 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, | ||
641 | fixup_maple_ide); | ||
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 3ce2d73b4177..364714757cf1 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/smp.h> | 43 | #include <linux/smp.h> |
44 | #include <linux/bitops.h> | 44 | #include <linux/bitops.h> |
45 | #include <linux/of_device.h> | 45 | #include <linux/of_device.h> |
46 | #include <linux/lmb.h> | ||
46 | 47 | ||
47 | #include <asm/processor.h> | 48 | #include <asm/processor.h> |
48 | #include <asm/sections.h> | 49 | #include <asm/sections.h> |
@@ -57,7 +58,6 @@ | |||
57 | #include <asm/dma.h> | 58 | #include <asm/dma.h> |
58 | #include <asm/cputable.h> | 59 | #include <asm/cputable.h> |
59 | #include <asm/time.h> | 60 | #include <asm/time.h> |
60 | #include <asm/lmb.h> | ||
61 | #include <asm/mpic.h> | 61 | #include <asm/mpic.h> |
62 | #include <asm/rtas.h> | 62 | #include <asm/rtas.h> |
63 | #include <asm/udbg.h> | 63 | #include <asm/udbg.h> |
@@ -319,7 +319,7 @@ static int __init maple_probe(void) | |||
319 | return 1; | 319 | return 1; |
320 | } | 320 | } |
321 | 321 | ||
322 | define_machine(maple_md) { | 322 | define_machine(maple) { |
323 | .name = "Maple", | 323 | .name = "Maple", |
324 | .probe = maple_probe, | 324 | .probe = maple_probe, |
325 | .setup_arch = maple_setup_arch, | 325 | .setup_arch = maple_setup_arch, |
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c index c529d8dff395..217af321b0ca 100644 --- a/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/arch/powerpc/platforms/pasemi/dma_lib.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
@@ -26,6 +27,8 @@ | |||
26 | 27 | ||
27 | #define MAX_TXCH 64 | 28 | #define MAX_TXCH 64 |
28 | #define MAX_RXCH 64 | 29 | #define MAX_RXCH 64 |
30 | #define MAX_FLAGS 64 | ||
31 | #define MAX_FUN 8 | ||
29 | 32 | ||
30 | static struct pasdma_status *dma_status; | 33 | static struct pasdma_status *dma_status; |
31 | 34 | ||
@@ -43,6 +46,8 @@ static struct pci_dev *dma_pdev; | |||
43 | 46 | ||
44 | static DECLARE_BITMAP(txch_free, MAX_TXCH); | 47 | static DECLARE_BITMAP(txch_free, MAX_TXCH); |
45 | static DECLARE_BITMAP(rxch_free, MAX_RXCH); | 48 | static DECLARE_BITMAP(rxch_free, MAX_RXCH); |
49 | static DECLARE_BITMAP(flags_free, MAX_FLAGS); | ||
50 | static DECLARE_BITMAP(fun_free, MAX_FUN); | ||
46 | 51 | ||
47 | /* pasemi_read_iob_reg - read IOB register | 52 | /* pasemi_read_iob_reg - read IOB register |
48 | * @reg: Register to read (offset into PCI CFG space) | 53 | * @reg: Register to read (offset into PCI CFG space) |
@@ -373,6 +378,106 @@ void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, | |||
373 | } | 378 | } |
374 | EXPORT_SYMBOL(pasemi_dma_free_buf); | 379 | EXPORT_SYMBOL(pasemi_dma_free_buf); |
375 | 380 | ||
381 | /* pasemi_dma_alloc_flag - Allocate a flag (event) for channel syncronization | ||
382 | * | ||
383 | * Allocates a flag for use with channel syncronization (event descriptors). | ||
384 | * Returns allocated flag (0-63), < 0 on error. | ||
385 | */ | ||
386 | int pasemi_dma_alloc_flag(void) | ||
387 | { | ||
388 | int bit; | ||
389 | |||
390 | retry: | ||
391 | bit = find_next_bit(flags_free, MAX_FLAGS, 0); | ||
392 | if (bit >= MAX_FLAGS) | ||
393 | return -ENOSPC; | ||
394 | if (!test_and_clear_bit(bit, flags_free)) | ||
395 | goto retry; | ||
396 | |||
397 | return bit; | ||
398 | } | ||
399 | EXPORT_SYMBOL(pasemi_dma_alloc_flag); | ||
400 | |||
401 | |||
402 | /* pasemi_dma_free_flag - Deallocates a flag (event) | ||
403 | * @flag: Flag number to deallocate | ||
404 | * | ||
405 | * Frees up a flag so it can be reused for other purposes. | ||
406 | */ | ||
407 | void pasemi_dma_free_flag(int flag) | ||
408 | { | ||
409 | BUG_ON(test_bit(flag, flags_free)); | ||
410 | BUG_ON(flag >= MAX_FLAGS); | ||
411 | set_bit(flag, flags_free); | ||
412 | } | ||
413 | EXPORT_SYMBOL(pasemi_dma_free_flag); | ||
414 | |||
415 | |||
416 | /* pasemi_dma_set_flag - Sets a flag (event) to 1 | ||
417 | * @flag: Flag number to set active | ||
418 | * | ||
419 | * Sets the flag provided to 1. | ||
420 | */ | ||
421 | void pasemi_dma_set_flag(int flag) | ||
422 | { | ||
423 | BUG_ON(flag >= MAX_FLAGS); | ||
424 | if (flag < 32) | ||
425 | pasemi_write_dma_reg(PAS_DMA_TXF_SFLG0, 1 << flag); | ||
426 | else | ||
427 | pasemi_write_dma_reg(PAS_DMA_TXF_SFLG1, 1 << flag); | ||
428 | } | ||
429 | EXPORT_SYMBOL(pasemi_dma_set_flag); | ||
430 | |||
431 | /* pasemi_dma_clear_flag - Sets a flag (event) to 0 | ||
432 | * @flag: Flag number to set inactive | ||
433 | * | ||
434 | * Sets the flag provided to 0. | ||
435 | */ | ||
436 | void pasemi_dma_clear_flag(int flag) | ||
437 | { | ||
438 | BUG_ON(flag >= MAX_FLAGS); | ||
439 | if (flag < 32) | ||
440 | pasemi_write_dma_reg(PAS_DMA_TXF_CFLG0, 1 << flag); | ||
441 | else | ||
442 | pasemi_write_dma_reg(PAS_DMA_TXF_CFLG1, 1 << flag); | ||
443 | } | ||
444 | EXPORT_SYMBOL(pasemi_dma_clear_flag); | ||
445 | |||
446 | /* pasemi_dma_alloc_fun - Allocate a function engine | ||
447 | * | ||
448 | * Allocates a function engine to use for crypto/checksum offload | ||
449 | * Returns allocated engine (0-8), < 0 on error. | ||
450 | */ | ||
451 | int pasemi_dma_alloc_fun(void) | ||
452 | { | ||
453 | int bit; | ||
454 | |||
455 | retry: | ||
456 | bit = find_next_bit(fun_free, MAX_FLAGS, 0); | ||
457 | if (bit >= MAX_FLAGS) | ||
458 | return -ENOSPC; | ||
459 | if (!test_and_clear_bit(bit, fun_free)) | ||
460 | goto retry; | ||
461 | |||
462 | return bit; | ||
463 | } | ||
464 | EXPORT_SYMBOL(pasemi_dma_alloc_fun); | ||
465 | |||
466 | |||
467 | /* pasemi_dma_free_fun - Deallocates a function engine | ||
468 | * @flag: Engine number to deallocate | ||
469 | * | ||
470 | * Frees up a function engine so it can be used for other purposes. | ||
471 | */ | ||
472 | void pasemi_dma_free_fun(int fun) | ||
473 | { | ||
474 | BUG_ON(test_bit(fun, fun_free)); | ||
475 | BUG_ON(fun >= MAX_FLAGS); | ||
476 | set_bit(fun, fun_free); | ||
477 | } | ||
478 | EXPORT_SYMBOL(pasemi_dma_free_fun); | ||
479 | |||
480 | |||
376 | static void *map_onedev(struct pci_dev *p, int index) | 481 | static void *map_onedev(struct pci_dev *p, int index) |
377 | { | 482 | { |
378 | struct device_node *dn; | 483 | struct device_node *dn; |
@@ -410,6 +515,7 @@ int pasemi_dma_init(void) | |||
410 | struct resource res; | 515 | struct resource res; |
411 | struct device_node *dn; | 516 | struct device_node *dn; |
412 | int i, intf, err = 0; | 517 | int i, intf, err = 0; |
518 | unsigned long timeout; | ||
413 | u32 tmp; | 519 | u32 tmp; |
414 | 520 | ||
415 | if (!machine_is(pasemi)) | 521 | if (!machine_is(pasemi)) |
@@ -478,6 +584,44 @@ int pasemi_dma_init(void) | |||
478 | for (i = 0; i < MAX_RXCH; i++) | 584 | for (i = 0; i < MAX_RXCH; i++) |
479 | __set_bit(i, rxch_free); | 585 | __set_bit(i, rxch_free); |
480 | 586 | ||
587 | timeout = jiffies + HZ; | ||
588 | pasemi_write_dma_reg(PAS_DMA_COM_RXCMD, 0); | ||
589 | while (pasemi_read_dma_reg(PAS_DMA_COM_RXSTA) & 1) { | ||
590 | if (time_after(jiffies, timeout)) { | ||
591 | pr_warning("Warning: Could not disable RX section\n"); | ||
592 | break; | ||
593 | } | ||
594 | } | ||
595 | |||
596 | timeout = jiffies + HZ; | ||
597 | pasemi_write_dma_reg(PAS_DMA_COM_TXCMD, 0); | ||
598 | while (pasemi_read_dma_reg(PAS_DMA_COM_TXSTA) & 1) { | ||
599 | if (time_after(jiffies, timeout)) { | ||
600 | pr_warning("Warning: Could not disable TX section\n"); | ||
601 | break; | ||
602 | } | ||
603 | } | ||
604 | |||
605 | /* setup resource allocations for the different DMA sections */ | ||
606 | tmp = pasemi_read_dma_reg(PAS_DMA_COM_CFG); | ||
607 | pasemi_write_dma_reg(PAS_DMA_COM_CFG, tmp | 0x18000000); | ||
608 | |||
609 | /* enable tx section */ | ||
610 | pasemi_write_dma_reg(PAS_DMA_COM_TXCMD, PAS_DMA_COM_TXCMD_EN); | ||
611 | |||
612 | /* enable rx section */ | ||
613 | pasemi_write_dma_reg(PAS_DMA_COM_RXCMD, PAS_DMA_COM_RXCMD_EN); | ||
614 | |||
615 | for (i = 0; i < MAX_FLAGS; i++) | ||
616 | __set_bit(i, flags_free); | ||
617 | |||
618 | for (i = 0; i < MAX_FUN; i++) | ||
619 | __set_bit(i, fun_free); | ||
620 | |||
621 | /* clear all status flags */ | ||
622 | pasemi_write_dma_reg(PAS_DMA_TXF_CFLG0, 0xffffffff); | ||
623 | pasemi_write_dma_reg(PAS_DMA_TXF_CFLG1, 0xffffffff); | ||
624 | |||
481 | printk(KERN_INFO "PA Semi PWRficient DMA library initialized " | 625 | printk(KERN_INFO "PA Semi PWRficient DMA library initialized " |
482 | "(%d tx, %d rx channels)\n", num_txch, num_rxch); | 626 | "(%d tx, %d rx channels)\n", num_txch, num_rxch); |
483 | 627 | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 36ff1b6b7fac..59404baf911f 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/suspend.h> | 53 | #include <linux/suspend.h> |
54 | #include <linux/of_device.h> | 54 | #include <linux/of_device.h> |
55 | #include <linux/of_platform.h> | 55 | #include <linux/of_platform.h> |
56 | #include <linux/lmb.h> | ||
56 | 57 | ||
57 | #include <asm/reg.h> | 58 | #include <asm/reg.h> |
58 | #include <asm/sections.h> | 59 | #include <asm/sections.h> |
@@ -74,7 +75,6 @@ | |||
74 | #include <asm/iommu.h> | 75 | #include <asm/iommu.h> |
75 | #include <asm/smu.h> | 76 | #include <asm/smu.h> |
76 | #include <asm/pmc.h> | 77 | #include <asm/pmc.h> |
77 | #include <asm/lmb.h> | ||
78 | #include <asm/udbg.h> | 78 | #include <asm/udbg.h> |
79 | 79 | ||
80 | #include "pmac.h" | 80 | #include "pmac.h" |
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index 9d251d0ca8c6..3866debfa3c4 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -499,41 +499,14 @@ static int __init ps3_register_graphics_devices(void) | |||
499 | } | 499 | } |
500 | 500 | ||
501 | /** | 501 | /** |
502 | * ps3_register_repository_device - Register a device from the repositiory info. | 502 | * ps3_setup_dynamic_device - Setup a dynamic device from the repository |
503 | * | ||
504 | */ | 503 | */ |
505 | 504 | ||
506 | static int ps3_register_repository_device( | 505 | static int ps3_setup_dynamic_device(const struct ps3_repository_device *repo) |
507 | const struct ps3_repository_device *repo) | ||
508 | { | 506 | { |
509 | int result; | 507 | int result; |
510 | 508 | ||
511 | switch (repo->dev_type) { | 509 | switch (repo->dev_type) { |
512 | case PS3_DEV_TYPE_SB_GELIC: | ||
513 | result = ps3_setup_gelic_device(repo); | ||
514 | if (result) { | ||
515 | pr_debug("%s:%d ps3_setup_gelic_device failed\n", | ||
516 | __func__, __LINE__); | ||
517 | } | ||
518 | break; | ||
519 | case PS3_DEV_TYPE_SB_USB: | ||
520 | |||
521 | /* Each USB device has both an EHCI and an OHCI HC */ | ||
522 | |||
523 | result = ps3_setup_ehci_device(repo); | ||
524 | |||
525 | if (result) { | ||
526 | pr_debug("%s:%d ps3_setup_ehci_device failed\n", | ||
527 | __func__, __LINE__); | ||
528 | } | ||
529 | |||
530 | result = ps3_setup_ohci_device(repo); | ||
531 | |||
532 | if (result) { | ||
533 | pr_debug("%s:%d ps3_setup_ohci_device failed\n", | ||
534 | __func__, __LINE__); | ||
535 | } | ||
536 | break; | ||
537 | case PS3_DEV_TYPE_STOR_DISK: | 510 | case PS3_DEV_TYPE_STOR_DISK: |
538 | result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK); | 511 | result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK); |
539 | 512 | ||
@@ -572,6 +545,48 @@ static int ps3_register_repository_device( | |||
572 | return result; | 545 | return result; |
573 | } | 546 | } |
574 | 547 | ||
548 | /** | ||
549 | * ps3_setup_static_device - Setup a static device from the repository | ||
550 | */ | ||
551 | |||
552 | static int __init ps3_setup_static_device(const struct ps3_repository_device *repo) | ||
553 | { | ||
554 | int result; | ||
555 | |||
556 | switch (repo->dev_type) { | ||
557 | case PS3_DEV_TYPE_SB_GELIC: | ||
558 | result = ps3_setup_gelic_device(repo); | ||
559 | if (result) { | ||
560 | pr_debug("%s:%d ps3_setup_gelic_device failed\n", | ||
561 | __func__, __LINE__); | ||
562 | } | ||
563 | break; | ||
564 | case PS3_DEV_TYPE_SB_USB: | ||
565 | |||
566 | /* Each USB device has both an EHCI and an OHCI HC */ | ||
567 | |||
568 | result = ps3_setup_ehci_device(repo); | ||
569 | |||
570 | if (result) { | ||
571 | pr_debug("%s:%d ps3_setup_ehci_device failed\n", | ||
572 | __func__, __LINE__); | ||
573 | } | ||
574 | |||
575 | result = ps3_setup_ohci_device(repo); | ||
576 | |||
577 | if (result) { | ||
578 | pr_debug("%s:%d ps3_setup_ohci_device failed\n", | ||
579 | __func__, __LINE__); | ||
580 | } | ||
581 | break; | ||
582 | |||
583 | default: | ||
584 | return ps3_setup_dynamic_device(repo); | ||
585 | } | ||
586 | |||
587 | return result; | ||
588 | } | ||
589 | |||
575 | static void ps3_find_and_add_device(u64 bus_id, u64 dev_id) | 590 | static void ps3_find_and_add_device(u64 bus_id, u64 dev_id) |
576 | { | 591 | { |
577 | struct ps3_repository_device repo; | 592 | struct ps3_repository_device repo; |
@@ -601,7 +616,7 @@ found: | |||
601 | pr_debug("%s:%u: device %lu:%lu found after %u retries\n", | 616 | pr_debug("%s:%u: device %lu:%lu found after %u retries\n", |
602 | __func__, __LINE__, bus_id, dev_id, retries); | 617 | __func__, __LINE__, bus_id, dev_id, retries); |
603 | 618 | ||
604 | ps3_register_repository_device(&repo); | 619 | ps3_setup_dynamic_device(&repo); |
605 | return; | 620 | return; |
606 | } | 621 | } |
607 | 622 | ||
@@ -905,8 +920,7 @@ static int __init ps3_register_devices(void) | |||
905 | 920 | ||
906 | ps3_register_graphics_devices(); | 921 | ps3_register_graphics_devices(); |
907 | 922 | ||
908 | ps3_repository_find_devices(PS3_BUS_TYPE_SB, | 923 | ps3_repository_find_devices(PS3_BUS_TYPE_SB, ps3_setup_static_device); |
909 | ps3_register_repository_device); | ||
910 | 924 | ||
911 | ps3_register_sound_devices(); | 925 | ps3_register_sound_devices(); |
912 | 926 | ||
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c index 7382f195c4f8..1cf901fa9031 100644 --- a/arch/powerpc/platforms/ps3/htab.c +++ b/arch/powerpc/platforms/ps3/htab.c | |||
@@ -19,9 +19,10 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/lmb.h> | ||
22 | 23 | ||
23 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
24 | #include <asm/lmb.h> | 25 | #include <asm/prom.h> |
25 | #include <asm/udbg.h> | 26 | #include <asm/udbg.h> |
26 | #include <asm/lv1call.h> | 27 | #include <asm/lv1call.h> |
27 | #include <asm/ps3fb.h> | 28 | #include <asm/ps3fb.h> |
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 3a6db04aa940..a14e5cdc2fed 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -709,7 +709,7 @@ static unsigned int ps3_get_irq(void) | |||
709 | asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x)); | 709 | asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x)); |
710 | plug &= 0x3f; | 710 | plug &= 0x3f; |
711 | 711 | ||
712 | if (unlikely(plug) == NO_IRQ) { | 712 | if (unlikely(plug == NO_IRQ)) { |
713 | pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__, | 713 | pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__, |
714 | __LINE__, pd->thread_id); | 714 | __LINE__, pd->thread_id); |
715 | dump_bmp(&per_cpu(ps3_private, 0)); | 715 | dump_bmp(&per_cpu(ps3_private, 0)); |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 68900476c842..5b3fb2b321ab 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -21,9 +21,10 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/memory_hotplug.h> | 23 | #include <linux/memory_hotplug.h> |
24 | #include <linux/lmb.h> | ||
24 | 25 | ||
25 | #include <asm/firmware.h> | 26 | #include <asm/firmware.h> |
26 | #include <asm/lmb.h> | 27 | #include <asm/prom.h> |
27 | #include <asm/udbg.h> | 28 | #include <asm/udbg.h> |
28 | #include <asm/lv1call.h> | 29 | #include <asm/lv1call.h> |
29 | 30 | ||
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index b9ea09d9d2fb..c73379ec9141 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
@@ -24,8 +24,9 @@ | |||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/lmb.h> | ||
27 | 28 | ||
28 | #include <asm/lmb.h> | 29 | #include <asm/prom.h> |
29 | 30 | ||
30 | #include "platform.h" | 31 | #include "platform.h" |
31 | 32 | ||
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 5c2cbb08eb52..a413abbd4123 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c | |||
@@ -95,6 +95,14 @@ static void ps3_power_off(void) | |||
95 | ps3_sys_manager_power_off(); /* never returns */ | 95 | ps3_sys_manager_power_off(); /* never returns */ |
96 | } | 96 | } |
97 | 97 | ||
98 | static void ps3_halt(void) | ||
99 | { | ||
100 | DBG("%s:%d\n", __func__, __LINE__); | ||
101 | |||
102 | smp_send_stop(); | ||
103 | ps3_sys_manager_halt(); /* never returns */ | ||
104 | } | ||
105 | |||
98 | static void ps3_panic(char *str) | 106 | static void ps3_panic(char *str) |
99 | { | 107 | { |
100 | DBG("%s:%d %s\n", __func__, __LINE__, str); | 108 | DBG("%s:%d %s\n", __func__, __LINE__, str); |
@@ -105,7 +113,8 @@ static void ps3_panic(char *str) | |||
105 | printk(" Please press POWER button.\n"); | 113 | printk(" Please press POWER button.\n"); |
106 | printk("\n"); | 114 | printk("\n"); |
107 | 115 | ||
108 | while(1); | 116 | while(1) |
117 | lv1_pause(1); | ||
109 | } | 118 | } |
110 | 119 | ||
111 | #if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ | 120 | #if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ |
@@ -117,7 +126,7 @@ static void __init prealloc(struct ps3_prealloc *p) | |||
117 | 126 | ||
118 | p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS)); | 127 | p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS)); |
119 | if (!p->address) { | 128 | if (!p->address) { |
120 | printk(KERN_ERR "%s: Cannot allocate %s\n", __FUNCTION__, | 129 | printk(KERN_ERR "%s: Cannot allocate %s\n", __func__, |
121 | p->name); | 130 | p->name); |
122 | return; | 131 | return; |
123 | } | 132 | } |
@@ -266,6 +275,7 @@ define_machine(ps3) { | |||
266 | .progress = ps3_progress, | 275 | .progress = ps3_progress, |
267 | .restart = ps3_restart, | 276 | .restart = ps3_restart, |
268 | .power_off = ps3_power_off, | 277 | .power_off = ps3_power_off, |
278 | .halt = ps3_halt, | ||
269 | #if defined(CONFIG_KEXEC) | 279 | #if defined(CONFIG_KEXEC) |
270 | .kexec_cpu_down = ps3_kexec_cpu_down, | 280 | .kexec_cpu_down = ps3_kexec_cpu_down, |
271 | .machine_kexec = default_machine_kexec, | 281 | .machine_kexec = default_machine_kexec, |
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index 5ad41189b494..d135cef9ed6a 100644 --- a/arch/powerpc/platforms/ps3/spu.c +++ b/arch/powerpc/platforms/ps3/spu.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/spu.h> | 27 | #include <asm/spu.h> |
28 | #include <asm/spu_priv1.h> | 28 | #include <asm/spu_priv1.h> |
29 | #include <asm/lv1call.h> | 29 | #include <asm/lv1call.h> |
30 | #include <asm/ps3.h> | ||
30 | 31 | ||
31 | #include "../cell/spufs/spufs.h" | 32 | #include "../cell/spufs/spufs.h" |
32 | #include "platform.h" | 33 | #include "platform.h" |
@@ -140,6 +141,12 @@ static void _dump_areas(unsigned int spe_id, unsigned long priv2, | |||
140 | pr_debug("%s:%d: shadow: %lxh\n", func, line, shadow); | 141 | pr_debug("%s:%d: shadow: %lxh\n", func, line, shadow); |
141 | } | 142 | } |
142 | 143 | ||
144 | inline u64 ps3_get_spe_id(void *arg) | ||
145 | { | ||
146 | return spu_pdata(arg)->spe_id; | ||
147 | } | ||
148 | EXPORT_SYMBOL_GPL(ps3_get_spe_id); | ||
149 | |||
143 | static unsigned long get_vas_id(void) | 150 | static unsigned long get_vas_id(void) |
144 | { | 151 | { |
145 | unsigned long id; | 152 | unsigned long id; |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 992ba6753cf2..bdae04bb7a01 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -18,3 +18,4 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o | |||
18 | obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o | 18 | obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o |
19 | obj-$(CONFIG_HVCS) += hvcserver.o | 19 | obj-$(CONFIG_HVCS) += hvcserver.o |
20 | obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o | 20 | obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o |
21 | obj-$(CONFIG_PHYP_DUMP) += phyp_dump.o | ||
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 9eb539ee5f9a..550b2f7d2cc1 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -945,7 +945,6 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
945 | unsigned int rets[3]; | 945 | unsigned int rets[3]; |
946 | struct eeh_early_enable_info *info = data; | 946 | struct eeh_early_enable_info *info = data; |
947 | int ret; | 947 | int ret; |
948 | const char *status = of_get_property(dn, "status", NULL); | ||
949 | const u32 *class_code = of_get_property(dn, "class-code", NULL); | 948 | const u32 *class_code = of_get_property(dn, "class-code", NULL); |
950 | const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL); | 949 | const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL); |
951 | const u32 *device_id = of_get_property(dn, "device-id", NULL); | 950 | const u32 *device_id = of_get_property(dn, "device-id", NULL); |
@@ -959,8 +958,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
959 | pdn->eeh_freeze_count = 0; | 958 | pdn->eeh_freeze_count = 0; |
960 | pdn->eeh_false_positives = 0; | 959 | pdn->eeh_false_positives = 0; |
961 | 960 | ||
962 | if (status && strncmp(status, "ok", 2) != 0) | 961 | if (!of_device_is_available(dn)) |
963 | return NULL; /* ignore devices with bad status */ | 962 | return NULL; |
964 | 963 | ||
965 | /* Ignore bad nodes. */ | 964 | /* Ignore bad nodes. */ |
966 | if (!class_code || !vendor_id || !device_id) | 965 | if (!class_code || !vendor_id || !device_id) |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 9a455d46379d..233d9be25f49 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -520,6 +520,20 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, | |||
520 | BUG_ON(lpar_rc != H_SUCCESS); | 520 | BUG_ON(lpar_rc != H_SUCCESS); |
521 | } | 521 | } |
522 | 522 | ||
523 | static void pSeries_lpar_hpte_removebolted(unsigned long ea, | ||
524 | int psize, int ssize) | ||
525 | { | ||
526 | unsigned long slot, vsid, va; | ||
527 | |||
528 | vsid = get_kernel_vsid(ea, ssize); | ||
529 | va = hpt_va(ea, vsid, ssize); | ||
530 | |||
531 | slot = pSeries_lpar_hpte_find(va, psize, ssize); | ||
532 | BUG_ON(slot == -1); | ||
533 | |||
534 | pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0); | ||
535 | } | ||
536 | |||
523 | /* Flag bits for H_BULK_REMOVE */ | 537 | /* Flag bits for H_BULK_REMOVE */ |
524 | #define HBR_REQUEST 0x4000000000000000UL | 538 | #define HBR_REQUEST 0x4000000000000000UL |
525 | #define HBR_RESPONSE 0x8000000000000000UL | 539 | #define HBR_RESPONSE 0x8000000000000000UL |
@@ -597,6 +611,7 @@ void __init hpte_init_lpar(void) | |||
597 | ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; | 611 | ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; |
598 | ppc_md.hpte_insert = pSeries_lpar_hpte_insert; | 612 | ppc_md.hpte_insert = pSeries_lpar_hpte_insert; |
599 | ppc_md.hpte_remove = pSeries_lpar_hpte_remove; | 613 | ppc_md.hpte_remove = pSeries_lpar_hpte_remove; |
614 | ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted; | ||
600 | ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; | 615 | ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; |
601 | ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; | 616 | ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; |
602 | } | 617 | } |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 5a5a19e40bb4..0d7229cde0e9 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -123,7 +123,7 @@ pcibios_pci_config_bridge(struct pci_dev *dev) | |||
123 | /* Add to children of PCI bridge dev->bus */ | 123 | /* Add to children of PCI bridge dev->bus */ |
124 | child_bus = pci_add_new_bus(dev->bus, dev, sec_busno); | 124 | child_bus = pci_add_new_bus(dev->bus, dev, sec_busno); |
125 | if (!child_bus) { | 125 | if (!child_bus) { |
126 | printk (KERN_ERR "%s: could not add second bus\n", __FUNCTION__); | 126 | printk (KERN_ERR "%s: could not add second bus\n", __func__); |
127 | return -EIO; | 127 | return -EIO; |
128 | } | 128 | } |
129 | sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number); | 129 | sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number); |
diff --git a/arch/powerpc/platforms/pseries/phyp_dump.c b/arch/powerpc/platforms/pseries/phyp_dump.c new file mode 100644 index 000000000000..7ddd10526cea --- /dev/null +++ b/arch/powerpc/platforms/pseries/phyp_dump.c | |||
@@ -0,0 +1,498 @@ | |||
1 | /* | ||
2 | * Hypervisor-assisted dump | ||
3 | * | ||
4 | * Linas Vepstas, Manish Ahuja 2008 | ||
5 | * Copyright 2008 IBM Corp. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/kobject.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/of.h> | ||
18 | #include <linux/pfn.h> | ||
19 | #include <linux/swap.h> | ||
20 | #include <linux/sysfs.h> | ||
21 | |||
22 | #include <asm/page.h> | ||
23 | #include <asm/phyp_dump.h> | ||
24 | #include <asm/machdep.h> | ||
25 | #include <asm/prom.h> | ||
26 | #include <asm/rtas.h> | ||
27 | |||
28 | /* Variables, used to communicate data between early boot and late boot */ | ||
29 | static struct phyp_dump phyp_dump_vars; | ||
30 | struct phyp_dump *phyp_dump_info = &phyp_dump_vars; | ||
31 | |||
32 | static int ibm_configure_kernel_dump; | ||
33 | /* ------------------------------------------------- */ | ||
34 | /* RTAS interfaces to declare the dump regions */ | ||
35 | |||
36 | struct dump_section { | ||
37 | u32 dump_flags; | ||
38 | u16 source_type; | ||
39 | u16 error_flags; | ||
40 | u64 source_address; | ||
41 | u64 source_length; | ||
42 | u64 length_copied; | ||
43 | u64 destination_address; | ||
44 | }; | ||
45 | |||
46 | struct phyp_dump_header { | ||
47 | u32 version; | ||
48 | u16 num_of_sections; | ||
49 | u16 status; | ||
50 | |||
51 | u32 first_offset_section; | ||
52 | u32 dump_disk_section; | ||
53 | u64 block_num_dd; | ||
54 | u64 num_of_blocks_dd; | ||
55 | u32 offset_dd; | ||
56 | u32 maxtime_to_auto; | ||
57 | /* No dump disk path string used */ | ||
58 | |||
59 | struct dump_section cpu_data; | ||
60 | struct dump_section hpte_data; | ||
61 | struct dump_section kernel_data; | ||
62 | }; | ||
63 | |||
64 | /* The dump header *must be* in low memory, so .bss it */ | ||
65 | static struct phyp_dump_header phdr; | ||
66 | |||
67 | #define NUM_DUMP_SECTIONS 3 | ||
68 | #define DUMP_HEADER_VERSION 0x1 | ||
69 | #define DUMP_REQUEST_FLAG 0x1 | ||
70 | #define DUMP_SOURCE_CPU 0x0001 | ||
71 | #define DUMP_SOURCE_HPTE 0x0002 | ||
72 | #define DUMP_SOURCE_RMO 0x0011 | ||
73 | #define DUMP_ERROR_FLAG 0x2000 | ||
74 | #define DUMP_TRIGGERED 0x4000 | ||
75 | #define DUMP_PERFORMED 0x8000 | ||
76 | |||
77 | |||
78 | /** | ||
79 | * init_dump_header() - initialize the header declaring a dump | ||
80 | * Returns: length of dump save area. | ||
81 | * | ||
82 | * When the hypervisor saves crashed state, it needs to put | ||
83 | * it somewhere. The dump header tells the hypervisor where | ||
84 | * the data can be saved. | ||
85 | */ | ||
86 | static unsigned long init_dump_header(struct phyp_dump_header *ph) | ||
87 | { | ||
88 | unsigned long addr_offset = 0; | ||
89 | |||
90 | /* Set up the dump header */ | ||
91 | ph->version = DUMP_HEADER_VERSION; | ||
92 | ph->num_of_sections = NUM_DUMP_SECTIONS; | ||
93 | ph->status = 0; | ||
94 | |||
95 | ph->first_offset_section = | ||
96 | (u32)offsetof(struct phyp_dump_header, cpu_data); | ||
97 | ph->dump_disk_section = 0; | ||
98 | ph->block_num_dd = 0; | ||
99 | ph->num_of_blocks_dd = 0; | ||
100 | ph->offset_dd = 0; | ||
101 | |||
102 | ph->maxtime_to_auto = 0; /* disabled */ | ||
103 | |||
104 | /* The first two sections are mandatory */ | ||
105 | ph->cpu_data.dump_flags = DUMP_REQUEST_FLAG; | ||
106 | ph->cpu_data.source_type = DUMP_SOURCE_CPU; | ||
107 | ph->cpu_data.source_address = 0; | ||
108 | ph->cpu_data.source_length = phyp_dump_info->cpu_state_size; | ||
109 | ph->cpu_data.destination_address = addr_offset; | ||
110 | addr_offset += phyp_dump_info->cpu_state_size; | ||
111 | |||
112 | ph->hpte_data.dump_flags = DUMP_REQUEST_FLAG; | ||
113 | ph->hpte_data.source_type = DUMP_SOURCE_HPTE; | ||
114 | ph->hpte_data.source_address = 0; | ||
115 | ph->hpte_data.source_length = phyp_dump_info->hpte_region_size; | ||
116 | ph->hpte_data.destination_address = addr_offset; | ||
117 | addr_offset += phyp_dump_info->hpte_region_size; | ||
118 | |||
119 | /* This section describes the low kernel region */ | ||
120 | ph->kernel_data.dump_flags = DUMP_REQUEST_FLAG; | ||
121 | ph->kernel_data.source_type = DUMP_SOURCE_RMO; | ||
122 | ph->kernel_data.source_address = PHYP_DUMP_RMR_START; | ||
123 | ph->kernel_data.source_length = PHYP_DUMP_RMR_END; | ||
124 | ph->kernel_data.destination_address = addr_offset; | ||
125 | addr_offset += ph->kernel_data.source_length; | ||
126 | |||
127 | return addr_offset; | ||
128 | } | ||
129 | |||
130 | static void print_dump_header(const struct phyp_dump_header *ph) | ||
131 | { | ||
132 | #ifdef DEBUG | ||
133 | printk(KERN_INFO "dump header:\n"); | ||
134 | /* setup some ph->sections required */ | ||
135 | printk(KERN_INFO "version = %d\n", ph->version); | ||
136 | printk(KERN_INFO "Sections = %d\n", ph->num_of_sections); | ||
137 | printk(KERN_INFO "Status = 0x%x\n", ph->status); | ||
138 | |||
139 | /* No ph->disk, so all should be set to 0 */ | ||
140 | printk(KERN_INFO "Offset to first section 0x%x\n", | ||
141 | ph->first_offset_section); | ||
142 | printk(KERN_INFO "dump disk sections should be zero\n"); | ||
143 | printk(KERN_INFO "dump disk section = %d\n", ph->dump_disk_section); | ||
144 | printk(KERN_INFO "block num = %ld\n", ph->block_num_dd); | ||
145 | printk(KERN_INFO "number of blocks = %ld\n", ph->num_of_blocks_dd); | ||
146 | printk(KERN_INFO "dump disk offset = %d\n", ph->offset_dd); | ||
147 | printk(KERN_INFO "Max auto time= %d\n", ph->maxtime_to_auto); | ||
148 | |||
149 | /*set cpu state and hpte states as well scratch pad area */ | ||
150 | printk(KERN_INFO " CPU AREA \n"); | ||
151 | printk(KERN_INFO "cpu dump_flags =%d\n", ph->cpu_data.dump_flags); | ||
152 | printk(KERN_INFO "cpu source_type =%d\n", ph->cpu_data.source_type); | ||
153 | printk(KERN_INFO "cpu error_flags =%d\n", ph->cpu_data.error_flags); | ||
154 | printk(KERN_INFO "cpu source_address =%lx\n", | ||
155 | ph->cpu_data.source_address); | ||
156 | printk(KERN_INFO "cpu source_length =%lx\n", | ||
157 | ph->cpu_data.source_length); | ||
158 | printk(KERN_INFO "cpu length_copied =%lx\n", | ||
159 | ph->cpu_data.length_copied); | ||
160 | |||
161 | printk(KERN_INFO " HPTE AREA \n"); | ||
162 | printk(KERN_INFO "HPTE dump_flags =%d\n", ph->hpte_data.dump_flags); | ||
163 | printk(KERN_INFO "HPTE source_type =%d\n", ph->hpte_data.source_type); | ||
164 | printk(KERN_INFO "HPTE error_flags =%d\n", ph->hpte_data.error_flags); | ||
165 | printk(KERN_INFO "HPTE source_address =%lx\n", | ||
166 | ph->hpte_data.source_address); | ||
167 | printk(KERN_INFO "HPTE source_length =%lx\n", | ||
168 | ph->hpte_data.source_length); | ||
169 | printk(KERN_INFO "HPTE length_copied =%lx\n", | ||
170 | ph->hpte_data.length_copied); | ||
171 | |||
172 | printk(KERN_INFO " SRSD AREA \n"); | ||
173 | printk(KERN_INFO "SRSD dump_flags =%d\n", ph->kernel_data.dump_flags); | ||
174 | printk(KERN_INFO "SRSD source_type =%d\n", ph->kernel_data.source_type); | ||
175 | printk(KERN_INFO "SRSD error_flags =%d\n", ph->kernel_data.error_flags); | ||
176 | printk(KERN_INFO "SRSD source_address =%lx\n", | ||
177 | ph->kernel_data.source_address); | ||
178 | printk(KERN_INFO "SRSD source_length =%lx\n", | ||
179 | ph->kernel_data.source_length); | ||
180 | printk(KERN_INFO "SRSD length_copied =%lx\n", | ||
181 | ph->kernel_data.length_copied); | ||
182 | #endif | ||
183 | } | ||
184 | |||
185 | static ssize_t show_phyp_dump_active(struct kobject *kobj, | ||
186 | struct kobj_attribute *attr, char *buf) | ||
187 | { | ||
188 | |||
189 | /* create filesystem entry so kdump is phyp-dump aware */ | ||
190 | return sprintf(buf, "%lx\n", phyp_dump_info->phyp_dump_at_boot); | ||
191 | } | ||
192 | |||
193 | static struct kobj_attribute pdl = __ATTR(phyp_dump_active, 0600, | ||
194 | show_phyp_dump_active, | ||
195 | NULL); | ||
196 | |||
197 | static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr) | ||
198 | { | ||
199 | int rc; | ||
200 | |||
201 | /* Add addr value if not initialized before */ | ||
202 | if (ph->cpu_data.destination_address == 0) { | ||
203 | ph->cpu_data.destination_address += addr; | ||
204 | ph->hpte_data.destination_address += addr; | ||
205 | ph->kernel_data.destination_address += addr; | ||
206 | } | ||
207 | |||
208 | /* ToDo Invalidate kdump and free memory range. */ | ||
209 | |||
210 | do { | ||
211 | rc = rtas_call(ibm_configure_kernel_dump, 3, 1, NULL, | ||
212 | 1, ph, sizeof(struct phyp_dump_header)); | ||
213 | } while (rtas_busy_delay(rc)); | ||
214 | |||
215 | if (rc) { | ||
216 | printk(KERN_ERR "phyp-dump: unexpected error (%d) on " | ||
217 | "register\n", rc); | ||
218 | print_dump_header(ph); | ||
219 | return; | ||
220 | } | ||
221 | |||
222 | rc = sysfs_create_file(kernel_kobj, &pdl.attr); | ||
223 | if (rc) | ||
224 | printk(KERN_ERR "phyp-dump: unable to create sysfs" | ||
225 | " file (%d)\n", rc); | ||
226 | } | ||
227 | |||
228 | static | ||
229 | void invalidate_last_dump(struct phyp_dump_header *ph, unsigned long addr) | ||
230 | { | ||
231 | int rc; | ||
232 | |||
233 | /* Add addr value if not initialized before */ | ||
234 | if (ph->cpu_data.destination_address == 0) { | ||
235 | ph->cpu_data.destination_address += addr; | ||
236 | ph->hpte_data.destination_address += addr; | ||
237 | ph->kernel_data.destination_address += addr; | ||
238 | } | ||
239 | |||
240 | do { | ||
241 | rc = rtas_call(ibm_configure_kernel_dump, 3, 1, NULL, | ||
242 | 2, ph, sizeof(struct phyp_dump_header)); | ||
243 | } while (rtas_busy_delay(rc)); | ||
244 | |||
245 | if (rc) { | ||
246 | printk(KERN_ERR "phyp-dump: unexpected error (%d) " | ||
247 | "on invalidate\n", rc); | ||
248 | print_dump_header(ph); | ||
249 | } | ||
250 | } | ||
251 | |||
252 | /* ------------------------------------------------- */ | ||
253 | /** | ||
254 | * release_memory_range -- release memory previously lmb_reserved | ||
255 | * @start_pfn: starting physical frame number | ||
256 | * @nr_pages: number of pages to free. | ||
257 | * | ||
258 | * This routine will release memory that had been previously | ||
259 | * lmb_reserved in early boot. The released memory becomes | ||
260 | * available for genreal use. | ||
261 | */ | ||
262 | static void release_memory_range(unsigned long start_pfn, | ||
263 | unsigned long nr_pages) | ||
264 | { | ||
265 | struct page *rpage; | ||
266 | unsigned long end_pfn; | ||
267 | long i; | ||
268 | |||
269 | end_pfn = start_pfn + nr_pages; | ||
270 | |||
271 | for (i = start_pfn; i <= end_pfn; i++) { | ||
272 | rpage = pfn_to_page(i); | ||
273 | if (PageReserved(rpage)) { | ||
274 | ClearPageReserved(rpage); | ||
275 | init_page_count(rpage); | ||
276 | __free_page(rpage); | ||
277 | totalram_pages++; | ||
278 | } | ||
279 | } | ||
280 | } | ||
281 | |||
282 | /** | ||
283 | * track_freed_range -- Counts the range being freed. | ||
284 | * Once the counter goes to zero, it re-registers dump for | ||
285 | * future use. | ||
286 | */ | ||
287 | static void | ||
288 | track_freed_range(unsigned long addr, unsigned long length) | ||
289 | { | ||
290 | static unsigned long scratch_area_size, reserved_area_size; | ||
291 | |||
292 | if (addr < phyp_dump_info->init_reserve_start) | ||
293 | return; | ||
294 | |||
295 | if ((addr >= phyp_dump_info->init_reserve_start) && | ||
296 | (addr <= phyp_dump_info->init_reserve_start + | ||
297 | phyp_dump_info->init_reserve_size)) | ||
298 | reserved_area_size += length; | ||
299 | |||
300 | if ((addr >= phyp_dump_info->reserved_scratch_addr) && | ||
301 | (addr <= phyp_dump_info->reserved_scratch_addr + | ||
302 | phyp_dump_info->reserved_scratch_size)) | ||
303 | scratch_area_size += length; | ||
304 | |||
305 | if ((reserved_area_size == phyp_dump_info->init_reserve_size) && | ||
306 | (scratch_area_size == phyp_dump_info->reserved_scratch_size)) { | ||
307 | |||
308 | invalidate_last_dump(&phdr, | ||
309 | phyp_dump_info->reserved_scratch_addr); | ||
310 | register_dump_area(&phdr, | ||
311 | phyp_dump_info->reserved_scratch_addr); | ||
312 | } | ||
313 | } | ||
314 | |||
315 | /* ------------------------------------------------- */ | ||
316 | /** | ||
317 | * sysfs_release_region -- sysfs interface to release memory range. | ||
318 | * | ||
319 | * Usage: | ||
320 | * "echo <start addr> <length> > /sys/kernel/release_region" | ||
321 | * | ||
322 | * Example: | ||
323 | * "echo 0x40000000 0x10000000 > /sys/kernel/release_region" | ||
324 | * | ||
325 | * will release 256MB starting at 1GB. | ||
326 | */ | ||
327 | static ssize_t store_release_region(struct kobject *kobj, | ||
328 | struct kobj_attribute *attr, | ||
329 | const char *buf, size_t count) | ||
330 | { | ||
331 | unsigned long start_addr, length, end_addr; | ||
332 | unsigned long start_pfn, nr_pages; | ||
333 | ssize_t ret; | ||
334 | |||
335 | ret = sscanf(buf, "%lx %lx", &start_addr, &length); | ||
336 | if (ret != 2) | ||
337 | return -EINVAL; | ||
338 | |||
339 | track_freed_range(start_addr, length); | ||
340 | |||
341 | /* Range-check - don't free any reserved memory that | ||
342 | * wasn't reserved for phyp-dump */ | ||
343 | if (start_addr < phyp_dump_info->init_reserve_start) | ||
344 | start_addr = phyp_dump_info->init_reserve_start; | ||
345 | |||
346 | end_addr = phyp_dump_info->init_reserve_start + | ||
347 | phyp_dump_info->init_reserve_size; | ||
348 | if (start_addr+length > end_addr) | ||
349 | length = end_addr - start_addr; | ||
350 | |||
351 | /* Release the region of memory assed in by user */ | ||
352 | start_pfn = PFN_DOWN(start_addr); | ||
353 | nr_pages = PFN_DOWN(length); | ||
354 | release_memory_range(start_pfn, nr_pages); | ||
355 | |||
356 | return count; | ||
357 | } | ||
358 | |||
359 | static ssize_t show_release_region(struct kobject *kobj, | ||
360 | struct kobj_attribute *attr, char *buf) | ||
361 | { | ||
362 | u64 second_addr_range; | ||
363 | |||
364 | /* total reserved size - start of scratch area */ | ||
365 | second_addr_range = phyp_dump_info->init_reserve_size - | ||
366 | phyp_dump_info->reserved_scratch_size; | ||
367 | return sprintf(buf, "CPU:0x%lx-0x%lx: HPTE:0x%lx-0x%lx:" | ||
368 | " DUMP:0x%lx-0x%lx, 0x%lx-0x%lx:\n", | ||
369 | phdr.cpu_data.destination_address, | ||
370 | phdr.cpu_data.length_copied, | ||
371 | phdr.hpte_data.destination_address, | ||
372 | phdr.hpte_data.length_copied, | ||
373 | phdr.kernel_data.destination_address, | ||
374 | phdr.kernel_data.length_copied, | ||
375 | phyp_dump_info->init_reserve_start, | ||
376 | second_addr_range); | ||
377 | } | ||
378 | |||
379 | static struct kobj_attribute rr = __ATTR(release_region, 0600, | ||
380 | show_release_region, | ||
381 | store_release_region); | ||
382 | |||
383 | static int __init phyp_dump_setup(void) | ||
384 | { | ||
385 | struct device_node *rtas; | ||
386 | const struct phyp_dump_header *dump_header = NULL; | ||
387 | unsigned long dump_area_start; | ||
388 | unsigned long dump_area_length; | ||
389 | int header_len = 0; | ||
390 | int rc; | ||
391 | |||
392 | /* If no memory was reserved in early boot, there is nothing to do */ | ||
393 | if (phyp_dump_info->init_reserve_size == 0) | ||
394 | return 0; | ||
395 | |||
396 | /* Return if phyp dump not supported */ | ||
397 | if (!phyp_dump_info->phyp_dump_configured) | ||
398 | return -ENOSYS; | ||
399 | |||
400 | /* Is there dump data waiting for us? If there isn't, | ||
401 | * then register a new dump area, and release all of | ||
402 | * the rest of the reserved ram. | ||
403 | * | ||
404 | * The /rtas/ibm,kernel-dump rtas node is present only | ||
405 | * if there is dump data waiting for us. | ||
406 | */ | ||
407 | rtas = of_find_node_by_path("/rtas"); | ||
408 | if (rtas) { | ||
409 | dump_header = of_get_property(rtas, "ibm,kernel-dump", | ||
410 | &header_len); | ||
411 | of_node_put(rtas); | ||
412 | } | ||
413 | |||
414 | print_dump_header(dump_header); | ||
415 | dump_area_length = init_dump_header(&phdr); | ||
416 | /* align down */ | ||
417 | dump_area_start = phyp_dump_info->init_reserve_start & PAGE_MASK; | ||
418 | |||
419 | if (dump_header == NULL) { | ||
420 | register_dump_area(&phdr, dump_area_start); | ||
421 | return 0; | ||
422 | } | ||
423 | |||
424 | /* re-register the dump area, if old dump was invalid */ | ||
425 | if ((dump_header) && (dump_header->status & DUMP_ERROR_FLAG)) { | ||
426 | invalidate_last_dump(&phdr, dump_area_start); | ||
427 | register_dump_area(&phdr, dump_area_start); | ||
428 | return 0; | ||
429 | } | ||
430 | |||
431 | if (dump_header) { | ||
432 | phyp_dump_info->reserved_scratch_addr = | ||
433 | dump_header->cpu_data.destination_address; | ||
434 | phyp_dump_info->reserved_scratch_size = | ||
435 | dump_header->cpu_data.source_length + | ||
436 | dump_header->hpte_data.source_length + | ||
437 | dump_header->kernel_data.source_length; | ||
438 | } | ||
439 | |||
440 | /* Should we create a dump_subsys, analogous to s390/ipl.c ? */ | ||
441 | rc = sysfs_create_file(kernel_kobj, &rr.attr); | ||
442 | if (rc) | ||
443 | printk(KERN_ERR "phyp-dump: unable to create sysfs file (%d)\n", | ||
444 | rc); | ||
445 | |||
446 | /* ToDo: re-register the dump area, for next time. */ | ||
447 | return 0; | ||
448 | } | ||
449 | machine_subsys_initcall(pseries, phyp_dump_setup); | ||
450 | |||
451 | int __init early_init_dt_scan_phyp_dump(unsigned long node, | ||
452 | const char *uname, int depth, void *data) | ||
453 | { | ||
454 | const unsigned int *sizes; | ||
455 | |||
456 | phyp_dump_info->phyp_dump_configured = 0; | ||
457 | phyp_dump_info->phyp_dump_is_active = 0; | ||
458 | |||
459 | if (depth != 1 || strcmp(uname, "rtas") != 0) | ||
460 | return 0; | ||
461 | |||
462 | if (of_get_flat_dt_prop(node, "ibm,configure-kernel-dump", NULL)) | ||
463 | phyp_dump_info->phyp_dump_configured++; | ||
464 | |||
465 | if (of_get_flat_dt_prop(node, "ibm,dump-kernel", NULL)) | ||
466 | phyp_dump_info->phyp_dump_is_active++; | ||
467 | |||
468 | sizes = of_get_flat_dt_prop(node, "ibm,configure-kernel-dump-sizes", | ||
469 | NULL); | ||
470 | if (!sizes) | ||
471 | return 0; | ||
472 | |||
473 | if (sizes[0] == 1) | ||
474 | phyp_dump_info->cpu_state_size = *((unsigned long *)&sizes[1]); | ||
475 | |||
476 | if (sizes[3] == 2) | ||
477 | phyp_dump_info->hpte_region_size = | ||
478 | *((unsigned long *)&sizes[4]); | ||
479 | return 1; | ||
480 | } | ||
481 | |||
482 | /* Look for phyp_dump= cmdline option */ | ||
483 | static int __init early_phyp_dump_enabled(char *p) | ||
484 | { | ||
485 | phyp_dump_info->phyp_dump_at_boot = 1; | ||
486 | |||
487 | if (!p) | ||
488 | return 0; | ||
489 | |||
490 | if (strncmp(p, "1", 1) == 0) | ||
491 | phyp_dump_info->phyp_dump_at_boot = 1; | ||
492 | else if (strncmp(p, "0", 1) == 0) | ||
493 | phyp_dump_info->phyp_dump_at_boot = 0; | ||
494 | |||
495 | return 0; | ||
496 | } | ||
497 | early_param("phyp_dump", early_phyp_dump_enabled); | ||
498 | |||
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 2800fced8c7c..ac75c10de278 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -222,14 +222,14 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length | |||
222 | tmp = strchr(buf, ' '); | 222 | tmp = strchr(buf, ' '); |
223 | if (!tmp) { | 223 | if (!tmp) { |
224 | printk(KERN_ERR "property parse failed in %s at line %d\n", | 224 | printk(KERN_ERR "property parse failed in %s at line %d\n", |
225 | __FUNCTION__, __LINE__); | 225 | __func__, __LINE__); |
226 | return NULL; | 226 | return NULL; |
227 | } | 227 | } |
228 | *tmp = '\0'; | 228 | *tmp = '\0'; |
229 | 229 | ||
230 | if (++tmp >= end) { | 230 | if (++tmp >= end) { |
231 | printk(KERN_ERR "property parse failed in %s at line %d\n", | 231 | printk(KERN_ERR "property parse failed in %s at line %d\n", |
232 | __FUNCTION__, __LINE__); | 232 | __func__, __LINE__); |
233 | return NULL; | 233 | return NULL; |
234 | } | 234 | } |
235 | 235 | ||
@@ -238,12 +238,12 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length | |||
238 | *length = simple_strtoul(tmp, &tmp, 10); | 238 | *length = simple_strtoul(tmp, &tmp, 10); |
239 | if (*length == -1) { | 239 | if (*length == -1) { |
240 | printk(KERN_ERR "property parse failed in %s at line %d\n", | 240 | printk(KERN_ERR "property parse failed in %s at line %d\n", |
241 | __FUNCTION__, __LINE__); | 241 | __func__, __LINE__); |
242 | return NULL; | 242 | return NULL; |
243 | } | 243 | } |
244 | if (*tmp != ' ' || ++tmp >= end) { | 244 | if (*tmp != ' ' || ++tmp >= end) { |
245 | printk(KERN_ERR "property parse failed in %s at line %d\n", | 245 | printk(KERN_ERR "property parse failed in %s at line %d\n", |
246 | __FUNCTION__, __LINE__); | 246 | __func__, __LINE__); |
247 | return NULL; | 247 | return NULL; |
248 | } | 248 | } |
249 | 249 | ||
@@ -252,12 +252,12 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length | |||
252 | tmp += *length; | 252 | tmp += *length; |
253 | if (tmp > end) { | 253 | if (tmp > end) { |
254 | printk(KERN_ERR "property parse failed in %s at line %d\n", | 254 | printk(KERN_ERR "property parse failed in %s at line %d\n", |
255 | __FUNCTION__, __LINE__); | 255 | __func__, __LINE__); |
256 | return NULL; | 256 | return NULL; |
257 | } | 257 | } |
258 | else if (tmp < end && *tmp != ' ' && *tmp != '\0') { | 258 | else if (tmp < end && *tmp != ' ' && *tmp != '\0') { |
259 | printk(KERN_ERR "property parse failed in %s at line %d\n", | 259 | printk(KERN_ERR "property parse failed in %s at line %d\n", |
260 | __FUNCTION__, __LINE__); | 260 | __func__, __LINE__); |
261 | return NULL; | 261 | return NULL; |
262 | } | 262 | } |
263 | tmp++; | 263 | tmp++; |
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index 8e1ef168e2dd..e5b0ea870164 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c | |||
@@ -195,31 +195,30 @@ const struct file_operations scanlog_fops = { | |||
195 | static int __init scanlog_init(void) | 195 | static int __init scanlog_init(void) |
196 | { | 196 | { |
197 | struct proc_dir_entry *ent; | 197 | struct proc_dir_entry *ent; |
198 | void *data; | ||
199 | int err = -ENOMEM; | ||
198 | 200 | ||
199 | ibm_scan_log_dump = rtas_token("ibm,scan-log-dump"); | 201 | ibm_scan_log_dump = rtas_token("ibm,scan-log-dump"); |
200 | if (ibm_scan_log_dump == RTAS_UNKNOWN_SERVICE) { | 202 | if (ibm_scan_log_dump == RTAS_UNKNOWN_SERVICE) |
201 | printk(KERN_ERR "scan-log-dump not implemented on this system\n"); | 203 | return -ENODEV; |
202 | return -EIO; | ||
203 | } | ||
204 | 204 | ||
205 | ent = create_proc_entry("ppc64/rtas/scan-log-dump", S_IRUSR, NULL); | 205 | /* Ideally we could allocate a buffer < 4G */ |
206 | if (ent) { | 206 | data = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL); |
207 | ent->proc_fops = &scanlog_fops; | 207 | if (!data) |
208 | /* Ideally we could allocate a buffer < 4G */ | 208 | goto err; |
209 | ent->data = kmalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL); | 209 | |
210 | if (!ent->data) { | 210 | ent = proc_create("ppc64/rtas/scan-log-dump", S_IRUSR, NULL, |
211 | printk(KERN_ERR "Failed to allocate a buffer\n"); | 211 | &scanlog_fops); |
212 | remove_proc_entry("scan-log-dump", ent->parent); | 212 | if (!ent) |
213 | return -ENOMEM; | 213 | goto err; |
214 | } | 214 | |
215 | ((unsigned int *)ent->data)[0] = 0; | 215 | ent->data = data; |
216 | } else { | ||
217 | printk(KERN_ERR "Failed to create ppc64/scan-log-dump proc entry\n"); | ||
218 | return -EIO; | ||
219 | } | ||
220 | proc_ppc64_scan_log_dump = ent; | 216 | proc_ppc64_scan_log_dump = ent; |
221 | 217 | ||
222 | return 0; | 218 | return 0; |
219 | err: | ||
220 | kfree(data); | ||
221 | return err; | ||
223 | } | 222 | } |
224 | 223 | ||
225 | static void __exit scanlog_cleanup(void) | 224 | static void __exit scanlog_cleanup(void) |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index fdb9b1c8f977..90555a39fe62 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -393,6 +393,7 @@ static void pseries_dedicated_idle_sleep(void) | |||
393 | { | 393 | { |
394 | unsigned int cpu = smp_processor_id(); | 394 | unsigned int cpu = smp_processor_id(); |
395 | unsigned long start_snooze; | 395 | unsigned long start_snooze; |
396 | unsigned long in_purr, out_purr; | ||
396 | 397 | ||
397 | /* | 398 | /* |
398 | * Indicate to the HV that we are idle. Now would be | 399 | * Indicate to the HV that we are idle. Now would be |
@@ -400,6 +401,7 @@ static void pseries_dedicated_idle_sleep(void) | |||
400 | */ | 401 | */ |
401 | get_lppaca()->idle = 1; | 402 | get_lppaca()->idle = 1; |
402 | get_lppaca()->donate_dedicated_cpu = 1; | 403 | get_lppaca()->donate_dedicated_cpu = 1; |
404 | in_purr = mfspr(SPRN_PURR); | ||
403 | 405 | ||
404 | /* | 406 | /* |
405 | * We come in with interrupts disabled, and need_resched() | 407 | * We come in with interrupts disabled, and need_resched() |
@@ -432,6 +434,8 @@ static void pseries_dedicated_idle_sleep(void) | |||
432 | 434 | ||
433 | out: | 435 | out: |
434 | HMT_medium(); | 436 | HMT_medium(); |
437 | out_purr = mfspr(SPRN_PURR); | ||
438 | get_lppaca()->wait_state_cycles += out_purr - in_purr; | ||
435 | get_lppaca()->donate_dedicated_cpu = 0; | 439 | get_lppaca()->donate_dedicated_cpu = 0; |
436 | get_lppaca()->idle = 0; | 440 | get_lppaca()->idle = 0; |
437 | } | 441 | } |
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 15f3e8527d77..851a0be71947 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -27,6 +27,7 @@ obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o | |||
27 | obj-$(CONFIG_PPC_I8259) += i8259.o | 27 | obj-$(CONFIG_PPC_I8259) += i8259.o |
28 | obj-$(CONFIG_IPIC) += ipic.o | 28 | obj-$(CONFIG_IPIC) += ipic.o |
29 | obj-$(CONFIG_4xx) += uic.o | 29 | obj-$(CONFIG_4xx) += uic.o |
30 | obj-$(CONFIG_4xx_SOC) += ppc4xx_soc.o | ||
30 | obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o | 31 | obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o |
31 | obj-$(CONFIG_OF_RTC) += of_rtc.o | 32 | obj-$(CONFIG_OF_RTC) += of_rtc.o |
32 | ifeq ($(CONFIG_PCI),y) | 33 | ifeq ($(CONFIG_PCI),y) |
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index df8bd2b64796..3eceeb5f3ee7 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch/powerpc/sysdev/cpm1.c | |||
@@ -257,7 +257,7 @@ int cpm_command(u32 command, u8 opcode) | |||
257 | if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) | 257 | if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) |
258 | goto out; | 258 | goto out; |
259 | 259 | ||
260 | printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__); | 260 | printk(KERN_ERR "%s(): Not able to issue CPM command\n", __func__); |
261 | ret = -EIO; | 261 | ret = -EIO; |
262 | out: | 262 | out: |
263 | spin_unlock_irqrestore(&cmd_lock, flags); | 263 | spin_unlock_irqrestore(&cmd_lock, flags); |
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c index dd066bb1d562..fa70ee31349e 100644 --- a/arch/powerpc/sysdev/cpm2.c +++ b/arch/powerpc/sysdev/cpm2.c | |||
@@ -99,7 +99,7 @@ int cpm_command(u32 command, u8 opcode) | |||
99 | if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) | 99 | if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) |
100 | goto out; | 100 | goto out; |
101 | 101 | ||
102 | printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__); | 102 | printk(KERN_ERR "%s(): Not able to issue CPM command\n", __func__); |
103 | ret = -EIO; | 103 | ret = -EIO; |
104 | out: | 104 | out: |
105 | spin_unlock_irqrestore(&cmd_lock, flags); | 105 | spin_unlock_irqrestore(&cmd_lock, flags); |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index e0e24b01e3a6..005c2ecf976f 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/vmalloc.h> | 38 | #include <linux/vmalloc.h> |
39 | #include <linux/suspend.h> | 39 | #include <linux/suspend.h> |
40 | #include <linux/lmb.h> | ||
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
41 | #include <asm/prom.h> | 42 | #include <asm/prom.h> |
42 | #include <asm/iommu.h> | 43 | #include <asm/iommu.h> |
@@ -44,7 +45,6 @@ | |||
44 | #include <asm/machdep.h> | 45 | #include <asm/machdep.h> |
45 | #include <asm/abs_addr.h> | 46 | #include <asm/abs_addr.h> |
46 | #include <asm/cacheflush.h> | 47 | #include <asm/cacheflush.h> |
47 | #include <asm/lmb.h> | ||
48 | #include <asm/ppc-pci.h> | 48 | #include <asm/ppc-pci.h> |
49 | 49 | ||
50 | #include "dart.h" | 50 | #include "dart.h" |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 6ffdda244bb1..6131fd2b6619 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -175,13 +175,16 @@ static inline void _mpic_write(enum mpic_reg_type type, | |||
175 | switch(type) { | 175 | switch(type) { |
176 | #ifdef CONFIG_PPC_DCR | 176 | #ifdef CONFIG_PPC_DCR |
177 | case mpic_access_dcr: | 177 | case mpic_access_dcr: |
178 | return dcr_write(rb->dhost, reg, value); | 178 | dcr_write(rb->dhost, reg, value); |
179 | break; | ||
179 | #endif | 180 | #endif |
180 | case mpic_access_mmio_be: | 181 | case mpic_access_mmio_be: |
181 | return out_be32(rb->base + (reg >> 2), value); | 182 | out_be32(rb->base + (reg >> 2), value); |
183 | break; | ||
182 | case mpic_access_mmio_le: | 184 | case mpic_access_mmio_le: |
183 | default: | 185 | default: |
184 | return out_le32(rb->base + (reg >> 2), value); | 186 | out_le32(rb->base + (reg >> 2), value); |
187 | break; | ||
185 | } | 188 | } |
186 | } | 189 | } |
187 | 190 | ||
@@ -1000,7 +1003,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1000 | const char *name) | 1003 | const char *name) |
1001 | { | 1004 | { |
1002 | struct mpic *mpic; | 1005 | struct mpic *mpic; |
1003 | u32 reg; | 1006 | u32 greg_feature; |
1004 | const char *vers; | 1007 | const char *vers; |
1005 | int i; | 1008 | int i; |
1006 | int intvec_top; | 1009 | int intvec_top; |
@@ -1064,7 +1067,8 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1064 | 1067 | ||
1065 | /* Look for protected sources */ | 1068 | /* Look for protected sources */ |
1066 | if (node) { | 1069 | if (node) { |
1067 | unsigned int psize, bits, mapsize; | 1070 | int psize; |
1071 | unsigned int bits, mapsize; | ||
1068 | const u32 *psrc = | 1072 | const u32 *psrc = |
1069 | of_get_property(node, "protected-sources", &psize); | 1073 | of_get_property(node, "protected-sources", &psize); |
1070 | if (psrc) { | 1074 | if (psrc) { |
@@ -1107,8 +1111,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1107 | * in, try to obtain one | 1111 | * in, try to obtain one |
1108 | */ | 1112 | */ |
1109 | if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) { | 1113 | if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) { |
1110 | const u32 *reg; | 1114 | const u32 *reg = of_get_property(node, "reg", NULL); |
1111 | reg = of_get_property(node, "reg", NULL); | ||
1112 | BUG_ON(reg == NULL); | 1115 | BUG_ON(reg == NULL); |
1113 | paddr = of_translate_address(node, reg); | 1116 | paddr = of_translate_address(node, reg); |
1114 | BUG_ON(paddr == OF_BAD_ADDR); | 1117 | BUG_ON(paddr == OF_BAD_ADDR); |
@@ -1137,12 +1140,13 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1137 | * MPICs, num sources as well. On ISU MPICs, sources are counted | 1140 | * MPICs, num sources as well. On ISU MPICs, sources are counted |
1138 | * as ISUs are added | 1141 | * as ISUs are added |
1139 | */ | 1142 | */ |
1140 | reg = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0)); | 1143 | greg_feature = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0)); |
1141 | mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK) | 1144 | mpic->num_cpus = ((greg_feature & MPIC_GREG_FEATURE_LAST_CPU_MASK) |
1142 | >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; | 1145 | >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; |
1143 | if (isu_size == 0) | 1146 | if (isu_size == 0) |
1144 | mpic->num_sources = ((reg & MPIC_GREG_FEATURE_LAST_SRC_MASK) | 1147 | mpic->num_sources = |
1145 | >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1; | 1148 | ((greg_feature & MPIC_GREG_FEATURE_LAST_SRC_MASK) |
1149 | >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1; | ||
1146 | 1150 | ||
1147 | /* Map the per-CPU registers */ | 1151 | /* Map the per-CPU registers */ |
1148 | for (i = 0; i < mpic->num_cpus; i++) { | 1152 | for (i = 0; i < mpic->num_cpus; i++) { |
@@ -1161,7 +1165,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1161 | mpic->isu_mask = (1 << mpic->isu_shift) - 1; | 1165 | mpic->isu_mask = (1 << mpic->isu_shift) - 1; |
1162 | 1166 | ||
1163 | /* Display version */ | 1167 | /* Display version */ |
1164 | switch (reg & MPIC_GREG_FEATURE_VERSION_MASK) { | 1168 | switch (greg_feature & MPIC_GREG_FEATURE_VERSION_MASK) { |
1165 | case 1: | 1169 | case 1: |
1166 | vers = "1.0"; | 1170 | vers = "1.0"; |
1167 | break; | 1171 | break; |
@@ -1321,7 +1325,7 @@ void __init mpic_set_serial_int(struct mpic *mpic, int enable) | |||
1321 | 1325 | ||
1322 | void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | 1326 | void mpic_irq_set_priority(unsigned int irq, unsigned int pri) |
1323 | { | 1327 | { |
1324 | int is_ipi; | 1328 | unsigned int is_ipi; |
1325 | struct mpic *mpic = mpic_find(irq, &is_ipi); | 1329 | struct mpic *mpic = mpic_find(irq, &is_ipi); |
1326 | unsigned int src = mpic_irq_to_hw(irq); | 1330 | unsigned int src = mpic_irq_to_hw(irq); |
1327 | unsigned long flags; | 1331 | unsigned long flags; |
@@ -1344,7 +1348,7 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | |||
1344 | 1348 | ||
1345 | unsigned int mpic_irq_get_priority(unsigned int irq) | 1349 | unsigned int mpic_irq_get_priority(unsigned int irq) |
1346 | { | 1350 | { |
1347 | int is_ipi; | 1351 | unsigned int is_ipi; |
1348 | struct mpic *mpic = mpic_find(irq, &is_ipi); | 1352 | struct mpic *mpic = mpic_find(irq, &is_ipi); |
1349 | unsigned int src = mpic_irq_to_hw(irq); | 1353 | unsigned int src = mpic_irq_to_hw(irq); |
1350 | unsigned long flags; | 1354 | unsigned long flags; |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 5abfcd157483..1814adbd2236 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -527,6 +527,7 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np) | |||
527 | * | 527 | * |
528 | * ibm,plb-pciex-440spe | 528 | * ibm,plb-pciex-440spe |
529 | * ibm,plb-pciex-405ex | 529 | * ibm,plb-pciex-405ex |
530 | * ibm,plb-pciex-460ex | ||
530 | * | 531 | * |
531 | * Anything else will be rejected for now as they are all subtly | 532 | * Anything else will be rejected for now as they are all subtly |
532 | * different unfortunately. | 533 | * different unfortunately. |
@@ -645,7 +646,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np) | |||
645 | int time_out = 20; | 646 | int time_out = 20; |
646 | 647 | ||
647 | /* Set PLL clock receiver to LVPECL */ | 648 | /* Set PLL clock receiver to LVPECL */ |
648 | mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28); | 649 | dcri_clrset(SDR0, PESDR0_PLLLCT1, 0, 1 << 28); |
649 | 650 | ||
650 | /* Shouldn't we do all the calibration stuff etc... here ? */ | 651 | /* Shouldn't we do all the calibration stuff etc... here ? */ |
651 | if (ppc440spe_pciex_check_reset(np)) | 652 | if (ppc440spe_pciex_check_reset(np)) |
@@ -659,8 +660,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np) | |||
659 | } | 660 | } |
660 | 661 | ||
661 | /* De-assert reset of PCIe PLL, wait for lock */ | 662 | /* De-assert reset of PCIe PLL, wait for lock */ |
662 | mtdcri(SDR0, PESDR0_PLLLCT1, | 663 | dcri_clrset(SDR0, PESDR0_PLLLCT1, 1 << 24, 0); |
663 | mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24)); | ||
664 | udelay(3); | 664 | udelay(3); |
665 | 665 | ||
666 | while (time_out) { | 666 | while (time_out) { |
@@ -712,9 +712,8 @@ static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port) | |||
712 | mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1, | 712 | mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1, |
713 | 0x35000000); | 713 | 0x35000000); |
714 | } | 714 | } |
715 | val = mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET); | 715 | dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, |
716 | mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, | 716 | (1 << 24) | (1 << 16), 1 << 12); |
717 | (val & ~(1 << 24 | 1 << 16)) | 1 << 12); | ||
718 | 717 | ||
719 | return 0; | 718 | return 0; |
720 | } | 719 | } |
@@ -775,6 +774,115 @@ static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata = | |||
775 | .setup_utl = ppc440speB_pciex_init_utl, | 774 | .setup_utl = ppc440speB_pciex_init_utl, |
776 | }; | 775 | }; |
777 | 776 | ||
777 | static int __init ppc460ex_pciex_core_init(struct device_node *np) | ||
778 | { | ||
779 | /* Nothing to do, return 2 ports */ | ||
780 | return 2; | ||
781 | } | ||
782 | |||
783 | static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) | ||
784 | { | ||
785 | u32 val; | ||
786 | u32 utlset1; | ||
787 | |||
788 | if (port->endpoint) | ||
789 | val = PTYPE_LEGACY_ENDPOINT << 20; | ||
790 | else | ||
791 | val = PTYPE_ROOT_PORT << 20; | ||
792 | |||
793 | if (port->index == 0) { | ||
794 | val |= LNKW_X1 << 12; | ||
795 | utlset1 = 0x20000000; | ||
796 | } else { | ||
797 | val |= LNKW_X4 << 12; | ||
798 | utlset1 = 0x20101101; | ||
799 | } | ||
800 | |||
801 | mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val); | ||
802 | mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, utlset1); | ||
803 | mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01210000); | ||
804 | |||
805 | switch (port->index) { | ||
806 | case 0: | ||
807 | mtdcri(SDR0, PESDR0_460EX_L0CDRCTL, 0x00003230); | ||
808 | mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000136); | ||
809 | mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006); | ||
810 | |||
811 | mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST,0x10000000); | ||
812 | break; | ||
813 | |||
814 | case 1: | ||
815 | mtdcri(SDR0, PESDR1_460EX_L0CDRCTL, 0x00003230); | ||
816 | mtdcri(SDR0, PESDR1_460EX_L1CDRCTL, 0x00003230); | ||
817 | mtdcri(SDR0, PESDR1_460EX_L2CDRCTL, 0x00003230); | ||
818 | mtdcri(SDR0, PESDR1_460EX_L3CDRCTL, 0x00003230); | ||
819 | mtdcri(SDR0, PESDR1_460EX_L0DRV, 0x00000136); | ||
820 | mtdcri(SDR0, PESDR1_460EX_L1DRV, 0x00000136); | ||
821 | mtdcri(SDR0, PESDR1_460EX_L2DRV, 0x00000136); | ||
822 | mtdcri(SDR0, PESDR1_460EX_L3DRV, 0x00000136); | ||
823 | mtdcri(SDR0, PESDR1_460EX_L0CLK, 0x00000006); | ||
824 | mtdcri(SDR0, PESDR1_460EX_L1CLK, 0x00000006); | ||
825 | mtdcri(SDR0, PESDR1_460EX_L2CLK, 0x00000006); | ||
826 | mtdcri(SDR0, PESDR1_460EX_L3CLK, 0x00000006); | ||
827 | |||
828 | mtdcri(SDR0, PESDR1_460EX_PHY_CTL_RST,0x10000000); | ||
829 | break; | ||
830 | } | ||
831 | |||
832 | mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, | ||
833 | mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | | ||
834 | (PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTPYN)); | ||
835 | |||
836 | /* Poll for PHY reset */ | ||
837 | /* XXX FIXME add timeout */ | ||
838 | switch (port->index) { | ||
839 | case 0: | ||
840 | while (!(mfdcri(SDR0, PESDR0_460EX_RSTSTA) & 0x1)) | ||
841 | udelay(10); | ||
842 | break; | ||
843 | case 1: | ||
844 | while (!(mfdcri(SDR0, PESDR1_460EX_RSTSTA) & 0x1)) | ||
845 | udelay(10); | ||
846 | break; | ||
847 | } | ||
848 | |||
849 | mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, | ||
850 | (mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) & | ||
851 | ~(PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTDL)) | | ||
852 | PESDRx_RCSSET_RSTPYN); | ||
853 | |||
854 | port->has_ibpre = 1; | ||
855 | |||
856 | return 0; | ||
857 | } | ||
858 | |||
859 | static int ppc460ex_pciex_init_utl(struct ppc4xx_pciex_port *port) | ||
860 | { | ||
861 | dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0); | ||
862 | |||
863 | /* | ||
864 | * Set buffer allocations and then assert VRB and TXE. | ||
865 | */ | ||
866 | out_be32(port->utl_base + PEUTL_PBCTL, 0x0800000c); | ||
867 | out_be32(port->utl_base + PEUTL_OUTTR, 0x08000000); | ||
868 | out_be32(port->utl_base + PEUTL_INTR, 0x02000000); | ||
869 | out_be32(port->utl_base + PEUTL_OPDBSZ, 0x04000000); | ||
870 | out_be32(port->utl_base + PEUTL_PBBSZ, 0x00000000); | ||
871 | out_be32(port->utl_base + PEUTL_IPHBSZ, 0x02000000); | ||
872 | out_be32(port->utl_base + PEUTL_IPDBSZ, 0x04000000); | ||
873 | out_be32(port->utl_base + PEUTL_RCIRQEN,0x00f00000); | ||
874 | out_be32(port->utl_base + PEUTL_PCTL, 0x80800066); | ||
875 | |||
876 | return 0; | ||
877 | } | ||
878 | |||
879 | static struct ppc4xx_pciex_hwops ppc460ex_pcie_hwops __initdata = | ||
880 | { | ||
881 | .core_init = ppc460ex_pciex_core_init, | ||
882 | .port_init_hw = ppc460ex_pciex_init_port_hw, | ||
883 | .setup_utl = ppc460ex_pciex_init_utl, | ||
884 | }; | ||
885 | |||
778 | #endif /* CONFIG_44x */ | 886 | #endif /* CONFIG_44x */ |
779 | 887 | ||
780 | #ifdef CONFIG_40x | 888 | #ifdef CONFIG_40x |
@@ -830,17 +938,9 @@ static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) | |||
830 | * PCIe boards don't show this problem. | 938 | * PCIe boards don't show this problem. |
831 | * This has to be re-tested and fixed in a later release! | 939 | * This has to be re-tested and fixed in a later release! |
832 | */ | 940 | */ |
833 | #if 0 /* XXX FIXME: Not resetting the PHY will leave all resources | ||
834 | * configured as done previously by U-Boot. Then Linux will currently | ||
835 | * not reassign them. So the PHY reset is now done always. This will | ||
836 | * lead to problems with the Atheros PCIe board again. | ||
837 | */ | ||
838 | val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP); | 941 | val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP); |
839 | if (!(val & 0x00001000)) | 942 | if (!(val & 0x00001000)) |
840 | ppc405ex_pcie_phy_reset(port); | 943 | ppc405ex_pcie_phy_reset(port); |
841 | #else | ||
842 | ppc405ex_pcie_phy_reset(port); | ||
843 | #endif | ||
844 | 944 | ||
845 | dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */ | 945 | dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */ |
846 | 946 | ||
@@ -896,6 +996,8 @@ static int __init ppc4xx_pciex_check_core_init(struct device_node *np) | |||
896 | else | 996 | else |
897 | ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops; | 997 | ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops; |
898 | } | 998 | } |
999 | if (of_device_is_compatible(np, "ibm,plb-pciex-460ex")) | ||
1000 | ppc4xx_pciex_hwops = &ppc460ex_pcie_hwops; | ||
899 | #endif /* CONFIG_44x */ | 1001 | #endif /* CONFIG_44x */ |
900 | #ifdef CONFIG_40x | 1002 | #ifdef CONFIG_40x |
901 | if (of_device_is_compatible(np, "ibm,plb-pciex-405ex")) | 1003 | if (of_device_is_compatible(np, "ibm,plb-pciex-405ex")) |
@@ -1042,8 +1144,7 @@ static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port) | |||
1042 | port->link = 0; | 1144 | port->link = 0; |
1043 | } | 1145 | } |
1044 | 1146 | ||
1045 | mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, | 1147 | dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, 0, 1 << 20); |
1046 | mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20); | ||
1047 | msleep(100); | 1148 | msleep(100); |
1048 | 1149 | ||
1049 | return 0; | 1150 | return 0; |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.h b/arch/powerpc/sysdev/ppc4xx_pci.h index 1c07908dc6ef..d04e40b306fb 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.h +++ b/arch/powerpc/sysdev/ppc4xx_pci.h | |||
@@ -271,6 +271,59 @@ | |||
271 | #define PESDR1_405EX_PHYSTA 0x044C | 271 | #define PESDR1_405EX_PHYSTA 0x044C |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * 460EX additional DCRs | ||
275 | */ | ||
276 | #define PESDR0_460EX_L0BIST 0x0308 | ||
277 | #define PESDR0_460EX_L0BISTSTS 0x0309 | ||
278 | #define PESDR0_460EX_L0CDRCTL 0x030A | ||
279 | #define PESDR0_460EX_L0DRV 0x030B | ||
280 | #define PESDR0_460EX_L0REC 0x030C | ||
281 | #define PESDR0_460EX_L0LPB 0x030D | ||
282 | #define PESDR0_460EX_L0CLK 0x030E | ||
283 | #define PESDR0_460EX_PHY_CTL_RST 0x030F | ||
284 | #define PESDR0_460EX_RSTSTA 0x0310 | ||
285 | #define PESDR0_460EX_OBS 0x0311 | ||
286 | #define PESDR0_460EX_L0ERRC 0x0320 | ||
287 | |||
288 | #define PESDR1_460EX_L0BIST 0x0348 | ||
289 | #define PESDR1_460EX_L1BIST 0x0349 | ||
290 | #define PESDR1_460EX_L2BIST 0x034A | ||
291 | #define PESDR1_460EX_L3BIST 0x034B | ||
292 | #define PESDR1_460EX_L0BISTSTS 0x034C | ||
293 | #define PESDR1_460EX_L1BISTSTS 0x034D | ||
294 | #define PESDR1_460EX_L2BISTSTS 0x034E | ||
295 | #define PESDR1_460EX_L3BISTSTS 0x034F | ||
296 | #define PESDR1_460EX_L0CDRCTL 0x0350 | ||
297 | #define PESDR1_460EX_L1CDRCTL 0x0351 | ||
298 | #define PESDR1_460EX_L2CDRCTL 0x0352 | ||
299 | #define PESDR1_460EX_L3CDRCTL 0x0353 | ||
300 | #define PESDR1_460EX_L0DRV 0x0354 | ||
301 | #define PESDR1_460EX_L1DRV 0x0355 | ||
302 | #define PESDR1_460EX_L2DRV 0x0356 | ||
303 | #define PESDR1_460EX_L3DRV 0x0357 | ||
304 | #define PESDR1_460EX_L0REC 0x0358 | ||
305 | #define PESDR1_460EX_L1REC 0x0359 | ||
306 | #define PESDR1_460EX_L2REC 0x035A | ||
307 | #define PESDR1_460EX_L3REC 0x035B | ||
308 | #define PESDR1_460EX_L0LPB 0x035C | ||
309 | #define PESDR1_460EX_L1LPB 0x035D | ||
310 | #define PESDR1_460EX_L2LPB 0x035E | ||
311 | #define PESDR1_460EX_L3LPB 0x035F | ||
312 | #define PESDR1_460EX_L0CLK 0x0360 | ||
313 | #define PESDR1_460EX_L1CLK 0x0361 | ||
314 | #define PESDR1_460EX_L2CLK 0x0362 | ||
315 | #define PESDR1_460EX_L3CLK 0x0363 | ||
316 | #define PESDR1_460EX_PHY_CTL_RST 0x0364 | ||
317 | #define PESDR1_460EX_RSTSTA 0x0365 | ||
318 | #define PESDR1_460EX_OBS 0x0366 | ||
319 | #define PESDR1_460EX_L0ERRC 0x0368 | ||
320 | #define PESDR1_460EX_L1ERRC 0x0369 | ||
321 | #define PESDR1_460EX_L2ERRC 0x036A | ||
322 | #define PESDR1_460EX_L3ERRC 0x036B | ||
323 | #define PESDR0_460EX_IHS1 0x036C | ||
324 | #define PESDR0_460EX_IHS2 0x036D | ||
325 | |||
326 | /* | ||
274 | * Of the above, some are common offsets from the base | 327 | * Of the above, some are common offsets from the base |
275 | */ | 328 | */ |
276 | #define PESDRn_UTLSET1 0x00 | 329 | #define PESDRn_UTLSET1 0x00 |
@@ -353,6 +406,12 @@ | |||
353 | #define PECFG_POM2LAL 0x390 | 406 | #define PECFG_POM2LAL 0x390 |
354 | #define PECFG_POM2LAH 0x394 | 407 | #define PECFG_POM2LAH 0x394 |
355 | 408 | ||
409 | /* SDR Bit Mappings */ | ||
410 | #define PESDRx_RCSSET_HLDPLB 0x10000000 | ||
411 | #define PESDRx_RCSSET_RSTGU 0x01000000 | ||
412 | #define PESDRx_RCSSET_RDY 0x00100000 | ||
413 | #define PESDRx_RCSSET_RSTDL 0x00010000 | ||
414 | #define PESDRx_RCSSET_RSTPYN 0x00001000 | ||
356 | 415 | ||
357 | enum | 416 | enum |
358 | { | 417 | { |
diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c new file mode 100644 index 000000000000..5b32adc9a9b2 --- /dev/null +++ b/arch/powerpc/sysdev/ppc4xx_soc.c | |||
@@ -0,0 +1,200 @@ | |||
1 | /* | ||
2 | * IBM/AMCC PPC4xx SoC setup code | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * L2 cache routines cloned from arch/ppc/syslib/ibm440gx_common.c which is: | ||
7 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
8 | * Copyright (c) 2003 - 2006 Zultys Technologies | ||
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 | #include <linux/stddef.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/errno.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/irq.h> | ||
22 | #include <linux/of_platform.h> | ||
23 | |||
24 | #include <asm/dcr.h> | ||
25 | #include <asm/dcr-regs.h> | ||
26 | #include <asm/reg.h> | ||
27 | |||
28 | static u32 dcrbase_l2c; | ||
29 | |||
30 | /* | ||
31 | * L2-cache | ||
32 | */ | ||
33 | |||
34 | /* Issue L2C diagnostic command */ | ||
35 | static inline u32 l2c_diag(u32 addr) | ||
36 | { | ||
37 | mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, addr); | ||
38 | mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_DIAG); | ||
39 | while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC)) | ||
40 | ; | ||
41 | |||
42 | return mfdcr(dcrbase_l2c + DCRN_L2C0_DATA); | ||
43 | } | ||
44 | |||
45 | static irqreturn_t l2c_error_handler(int irq, void *dev) | ||
46 | { | ||
47 | u32 sr = mfdcr(dcrbase_l2c + DCRN_L2C0_SR); | ||
48 | |||
49 | if (sr & L2C_SR_CPE) { | ||
50 | /* Read cache trapped address */ | ||
51 | u32 addr = l2c_diag(0x42000000); | ||
52 | printk(KERN_EMERG "L2C: Cache Parity Error, addr[16:26] = 0x%08x\n", | ||
53 | addr); | ||
54 | } | ||
55 | if (sr & L2C_SR_TPE) { | ||
56 | /* Read tag trapped address */ | ||
57 | u32 addr = l2c_diag(0x82000000) >> 16; | ||
58 | printk(KERN_EMERG "L2C: Tag Parity Error, addr[16:26] = 0x%08x\n", | ||
59 | addr); | ||
60 | } | ||
61 | |||
62 | /* Clear parity errors */ | ||
63 | if (sr & (L2C_SR_CPE | L2C_SR_TPE)){ | ||
64 | mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, 0); | ||
65 | mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE); | ||
66 | } else { | ||
67 | printk(KERN_EMERG "L2C: LRU error\n"); | ||
68 | } | ||
69 | |||
70 | return IRQ_HANDLED; | ||
71 | } | ||
72 | |||
73 | static int __init ppc4xx_l2c_probe(void) | ||
74 | { | ||
75 | struct device_node *np; | ||
76 | u32 r; | ||
77 | unsigned long flags; | ||
78 | int irq; | ||
79 | const u32 *dcrreg; | ||
80 | u32 dcrbase_isram; | ||
81 | int len; | ||
82 | const u32 *prop; | ||
83 | u32 l2_size; | ||
84 | |||
85 | np = of_find_compatible_node(NULL, NULL, "ibm,l2-cache"); | ||
86 | if (!np) | ||
87 | return 0; | ||
88 | |||
89 | /* Get l2 cache size */ | ||
90 | prop = of_get_property(np, "cache-size", NULL); | ||
91 | if (prop == NULL) { | ||
92 | printk(KERN_ERR "%s: Can't get cache-size!\n", np->full_name); | ||
93 | of_node_put(np); | ||
94 | return -ENODEV; | ||
95 | } | ||
96 | l2_size = prop[0]; | ||
97 | |||
98 | /* Map DCRs */ | ||
99 | dcrreg = of_get_property(np, "dcr-reg", &len); | ||
100 | if (!dcrreg || (len != 4 * sizeof(u32))) { | ||
101 | printk(KERN_ERR "%s: Can't get DCR register base !", | ||
102 | np->full_name); | ||
103 | of_node_put(np); | ||
104 | return -ENODEV; | ||
105 | } | ||
106 | dcrbase_isram = dcrreg[0]; | ||
107 | dcrbase_l2c = dcrreg[2]; | ||
108 | |||
109 | /* Get and map irq number from device tree */ | ||
110 | irq = irq_of_parse_and_map(np, 0); | ||
111 | if (irq == NO_IRQ) { | ||
112 | printk(KERN_ERR "irq_of_parse_and_map failed\n"); | ||
113 | of_node_put(np); | ||
114 | return -ENODEV; | ||
115 | } | ||
116 | |||
117 | /* Install error handler */ | ||
118 | if (request_irq(irq, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0) { | ||
119 | printk(KERN_ERR "Cannot install L2C error handler" | ||
120 | ", cache is not enabled\n"); | ||
121 | of_node_put(np); | ||
122 | return -ENODEV; | ||
123 | } | ||
124 | |||
125 | local_irq_save(flags); | ||
126 | asm volatile ("sync" ::: "memory"); | ||
127 | |||
128 | /* Disable SRAM */ | ||
129 | mtdcr(dcrbase_isram + DCRN_SRAM0_DPC, | ||
130 | mfdcr(dcrbase_isram + DCRN_SRAM0_DPC) & ~SRAM_DPC_ENABLE); | ||
131 | mtdcr(dcrbase_isram + DCRN_SRAM0_SB0CR, | ||
132 | mfdcr(dcrbase_isram + DCRN_SRAM0_SB0CR) & ~SRAM_SBCR_BU_MASK); | ||
133 | mtdcr(dcrbase_isram + DCRN_SRAM0_SB1CR, | ||
134 | mfdcr(dcrbase_isram + DCRN_SRAM0_SB1CR) & ~SRAM_SBCR_BU_MASK); | ||
135 | mtdcr(dcrbase_isram + DCRN_SRAM0_SB2CR, | ||
136 | mfdcr(dcrbase_isram + DCRN_SRAM0_SB2CR) & ~SRAM_SBCR_BU_MASK); | ||
137 | mtdcr(dcrbase_isram + DCRN_SRAM0_SB3CR, | ||
138 | mfdcr(dcrbase_isram + DCRN_SRAM0_SB3CR) & ~SRAM_SBCR_BU_MASK); | ||
139 | |||
140 | /* Enable L2_MODE without ICU/DCU */ | ||
141 | r = mfdcr(dcrbase_l2c + DCRN_L2C0_CFG) & | ||
142 | ~(L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_SS_MASK); | ||
143 | r |= L2C_CFG_L2M | L2C_CFG_SS_256; | ||
144 | mtdcr(dcrbase_l2c + DCRN_L2C0_CFG, r); | ||
145 | |||
146 | mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, 0); | ||
147 | |||
148 | /* Hardware Clear Command */ | ||
149 | mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_HCC); | ||
150 | while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC)) | ||
151 | ; | ||
152 | |||
153 | /* Clear Cache Parity and Tag Errors */ | ||
154 | mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE); | ||
155 | |||
156 | /* Enable 64G snoop region starting at 0 */ | ||
157 | r = mfdcr(dcrbase_l2c + DCRN_L2C0_SNP0) & | ||
158 | ~(L2C_SNP_BA_MASK | L2C_SNP_SSR_MASK); | ||
159 | r |= L2C_SNP_SSR_32G | L2C_SNP_ESR; | ||
160 | mtdcr(dcrbase_l2c + DCRN_L2C0_SNP0, r); | ||
161 | |||
162 | r = mfdcr(dcrbase_l2c + DCRN_L2C0_SNP1) & | ||
163 | ~(L2C_SNP_BA_MASK | L2C_SNP_SSR_MASK); | ||
164 | r |= 0x80000000 | L2C_SNP_SSR_32G | L2C_SNP_ESR; | ||
165 | mtdcr(dcrbase_l2c + DCRN_L2C0_SNP1, r); | ||
166 | |||
167 | asm volatile ("sync" ::: "memory"); | ||
168 | |||
169 | /* Enable ICU/DCU ports */ | ||
170 | r = mfdcr(dcrbase_l2c + DCRN_L2C0_CFG); | ||
171 | r &= ~(L2C_CFG_DCW_MASK | L2C_CFG_PMUX_MASK | L2C_CFG_PMIM | ||
172 | | L2C_CFG_TPEI | L2C_CFG_CPEI | L2C_CFG_NAM | L2C_CFG_NBRM); | ||
173 | r |= L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_TPC | L2C_CFG_CPC | L2C_CFG_FRAN | ||
174 | | L2C_CFG_CPIM | L2C_CFG_TPIM | L2C_CFG_LIM | L2C_CFG_SMCM; | ||
175 | |||
176 | /* Check for 460EX/GT special handling */ | ||
177 | if (of_device_is_compatible(np, "ibm,l2-cache-460ex")) | ||
178 | r |= L2C_CFG_RDBW; | ||
179 | |||
180 | mtdcr(dcrbase_l2c + DCRN_L2C0_CFG, r); | ||
181 | |||
182 | asm volatile ("sync; isync" ::: "memory"); | ||
183 | local_irq_restore(flags); | ||
184 | |||
185 | printk(KERN_INFO "%dk L2-cache enabled\n", l2_size >> 10); | ||
186 | |||
187 | of_node_put(np); | ||
188 | return 0; | ||
189 | } | ||
190 | arch_initcall(ppc4xx_l2c_probe); | ||
191 | |||
192 | /* | ||
193 | * At present, this routine just applies a system reset. | ||
194 | */ | ||
195 | void ppc4xx_reset_system(char *cmd) | ||
196 | { | ||
197 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_RST_SYSTEM); | ||
198 | while (1) | ||
199 | ; /* Just in case the reset doesn't work */ | ||
200 | } | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe_io.c b/arch/powerpc/sysdev/qe_lib/qe_io.c index e53ea4d374a0..736c1fcc9503 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_io.c +++ b/arch/powerpc/sysdev/qe_lib/qe_io.c | |||
@@ -200,7 +200,7 @@ static void dump_par_io(void) | |||
200 | { | 200 | { |
201 | unsigned int i; | 201 | unsigned int i; |
202 | 202 | ||
203 | printk(KERN_INFO "%s: par_io=%p\n", __FUNCTION__, par_io); | 203 | printk(KERN_INFO "%s: par_io=%p\n", __func__, par_io); |
204 | for (i = 0; i < num_par_io_ports; i++) { | 204 | for (i = 0; i < num_par_io_ports; i++) { |
205 | printk(KERN_INFO " cpodr[%u]=%08x\n", i, | 205 | printk(KERN_INFO " cpodr[%u]=%08x\n", i, |
206 | in_be32(&par_io[i].cpodr)); | 206 | in_be32(&par_io[i].cpodr)); |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c index 3223acbc39e5..bcf88e6ce962 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c | |||
@@ -148,57 +148,57 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
148 | 148 | ||
149 | /* check if the UCC port number is in range. */ | 149 | /* check if the UCC port number is in range. */ |
150 | if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) { | 150 | if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) { |
151 | printk(KERN_ERR "%s: illegal UCC number\n", __FUNCTION__); | 151 | printk(KERN_ERR "%s: illegal UCC number\n", __func__); |
152 | return -EINVAL; | 152 | return -EINVAL; |
153 | } | 153 | } |
154 | 154 | ||
155 | /* Check that 'max_rx_buf_length' is properly aligned (4). */ | 155 | /* Check that 'max_rx_buf_length' is properly aligned (4). */ |
156 | if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) { | 156 | if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) { |
157 | printk(KERN_ERR "%s: max_rx_buf_length not aligned\n", | 157 | printk(KERN_ERR "%s: max_rx_buf_length not aligned\n", |
158 | __FUNCTION__); | 158 | __func__); |
159 | return -EINVAL; | 159 | return -EINVAL; |
160 | } | 160 | } |
161 | 161 | ||
162 | /* Validate Virtual Fifo register values */ | 162 | /* Validate Virtual Fifo register values */ |
163 | if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) { | 163 | if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) { |
164 | printk(KERN_ERR "%s: urfs is too small\n", __FUNCTION__); | 164 | printk(KERN_ERR "%s: urfs is too small\n", __func__); |
165 | return -EINVAL; | 165 | return -EINVAL; |
166 | } | 166 | } |
167 | 167 | ||
168 | if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { | 168 | if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { |
169 | printk(KERN_ERR "%s: urfs is not aligned\n", __FUNCTION__); | 169 | printk(KERN_ERR "%s: urfs is not aligned\n", __func__); |
170 | return -EINVAL; | 170 | return -EINVAL; |
171 | } | 171 | } |
172 | 172 | ||
173 | if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { | 173 | if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { |
174 | printk(KERN_ERR "%s: urfet is not aligned.\n", __FUNCTION__); | 174 | printk(KERN_ERR "%s: urfet is not aligned.\n", __func__); |
175 | return -EINVAL; | 175 | return -EINVAL; |
176 | } | 176 | } |
177 | 177 | ||
178 | if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { | 178 | if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { |
179 | printk(KERN_ERR "%s: urfset is not aligned\n", __FUNCTION__); | 179 | printk(KERN_ERR "%s: urfset is not aligned\n", __func__); |
180 | return -EINVAL; | 180 | return -EINVAL; |
181 | } | 181 | } |
182 | 182 | ||
183 | if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { | 183 | if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { |
184 | printk(KERN_ERR "%s: utfs is not aligned\n", __FUNCTION__); | 184 | printk(KERN_ERR "%s: utfs is not aligned\n", __func__); |
185 | return -EINVAL; | 185 | return -EINVAL; |
186 | } | 186 | } |
187 | 187 | ||
188 | if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { | 188 | if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { |
189 | printk(KERN_ERR "%s: utfet is not aligned\n", __FUNCTION__); | 189 | printk(KERN_ERR "%s: utfet is not aligned\n", __func__); |
190 | return -EINVAL; | 190 | return -EINVAL; |
191 | } | 191 | } |
192 | 192 | ||
193 | if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { | 193 | if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { |
194 | printk(KERN_ERR "%s: utftt is not aligned\n", __FUNCTION__); | 194 | printk(KERN_ERR "%s: utftt is not aligned\n", __func__); |
195 | return -EINVAL; | 195 | return -EINVAL; |
196 | } | 196 | } |
197 | 197 | ||
198 | uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); | 198 | uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); |
199 | if (!uccf) { | 199 | if (!uccf) { |
200 | printk(KERN_ERR "%s: Cannot allocate private data\n", | 200 | printk(KERN_ERR "%s: Cannot allocate private data\n", |
201 | __FUNCTION__); | 201 | __func__); |
202 | return -ENOMEM; | 202 | return -ENOMEM; |
203 | } | 203 | } |
204 | 204 | ||
@@ -207,7 +207,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
207 | /* Set the PHY base address */ | 207 | /* Set the PHY base address */ |
208 | uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast)); | 208 | uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast)); |
209 | if (uccf->uf_regs == NULL) { | 209 | if (uccf->uf_regs == NULL) { |
210 | printk(KERN_ERR "%s: Cannot map UCC registers\n", __FUNCTION__); | 210 | printk(KERN_ERR "%s: Cannot map UCC registers\n", __func__); |
211 | return -ENOMEM; | 211 | return -ENOMEM; |
212 | } | 212 | } |
213 | 213 | ||
@@ -230,7 +230,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
230 | /* Set UCC to fast type */ | 230 | /* Set UCC to fast type */ |
231 | ret = ucc_set_type(uf_info->ucc_num, UCC_SPEED_TYPE_FAST); | 231 | ret = ucc_set_type(uf_info->ucc_num, UCC_SPEED_TYPE_FAST); |
232 | if (ret) { | 232 | if (ret) { |
233 | printk(KERN_ERR "%s: cannot set UCC type\n", __FUNCTION__); | 233 | printk(KERN_ERR "%s: cannot set UCC type\n", __func__); |
234 | ucc_fast_free(uccf); | 234 | ucc_fast_free(uccf); |
235 | return ret; | 235 | return ret; |
236 | } | 236 | } |
@@ -270,7 +270,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
270 | qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); | 270 | qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); |
271 | if (IS_ERR_VALUE(uccf->ucc_fast_tx_virtual_fifo_base_offset)) { | 271 | if (IS_ERR_VALUE(uccf->ucc_fast_tx_virtual_fifo_base_offset)) { |
272 | printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO\n", | 272 | printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO\n", |
273 | __FUNCTION__); | 273 | __func__); |
274 | uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; | 274 | uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; |
275 | ucc_fast_free(uccf); | 275 | ucc_fast_free(uccf); |
276 | return -ENOMEM; | 276 | return -ENOMEM; |
@@ -283,7 +283,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
283 | UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); | 283 | UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); |
284 | if (IS_ERR_VALUE(uccf->ucc_fast_rx_virtual_fifo_base_offset)) { | 284 | if (IS_ERR_VALUE(uccf->ucc_fast_rx_virtual_fifo_base_offset)) { |
285 | printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO\n", | 285 | printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO\n", |
286 | __FUNCTION__); | 286 | __func__); |
287 | uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; | 287 | uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; |
288 | ucc_fast_free(uccf); | 288 | ucc_fast_free(uccf); |
289 | return -ENOMEM; | 289 | return -ENOMEM; |
@@ -314,7 +314,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
314 | ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock, | 314 | ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock, |
315 | COMM_DIR_RX)) { | 315 | COMM_DIR_RX)) { |
316 | printk(KERN_ERR "%s: illegal value for RX clock\n", | 316 | printk(KERN_ERR "%s: illegal value for RX clock\n", |
317 | __FUNCTION__); | 317 | __func__); |
318 | ucc_fast_free(uccf); | 318 | ucc_fast_free(uccf); |
319 | return -EINVAL; | 319 | return -EINVAL; |
320 | } | 320 | } |
@@ -323,7 +323,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
323 | ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock, | 323 | ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock, |
324 | COMM_DIR_TX)) { | 324 | COMM_DIR_TX)) { |
325 | printk(KERN_ERR "%s: illegal value for TX clock\n", | 325 | printk(KERN_ERR "%s: illegal value for TX clock\n", |
326 | __FUNCTION__); | 326 | __func__); |
327 | ucc_fast_free(uccf); | 327 | ucc_fast_free(uccf); |
328 | return -EINVAL; | 328 | return -EINVAL; |
329 | } | 329 | } |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c index b2870b208ddb..a578bc77b9d5 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c | |||
@@ -142,7 +142,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
142 | 142 | ||
143 | /* check if the UCC port number is in range. */ | 143 | /* check if the UCC port number is in range. */ |
144 | if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) { | 144 | if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) { |
145 | printk(KERN_ERR "%s: illegal UCC number\n", __FUNCTION__); | 145 | printk(KERN_ERR "%s: illegal UCC number\n", __func__); |
146 | return -EINVAL; | 146 | return -EINVAL; |
147 | } | 147 | } |
148 | 148 | ||
@@ -161,7 +161,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
161 | uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); | 161 | uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); |
162 | if (!uccs) { | 162 | if (!uccs) { |
163 | printk(KERN_ERR "%s: Cannot allocate private data\n", | 163 | printk(KERN_ERR "%s: Cannot allocate private data\n", |
164 | __FUNCTION__); | 164 | __func__); |
165 | return -ENOMEM; | 165 | return -ENOMEM; |
166 | } | 166 | } |
167 | 167 | ||
@@ -170,7 +170,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
170 | /* Set the PHY base address */ | 170 | /* Set the PHY base address */ |
171 | uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow)); | 171 | uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow)); |
172 | if (uccs->us_regs == NULL) { | 172 | if (uccs->us_regs == NULL) { |
173 | printk(KERN_ERR "%s: Cannot map UCC registers\n", __FUNCTION__); | 173 | printk(KERN_ERR "%s: Cannot map UCC registers\n", __func__); |
174 | return -ENOMEM; | 174 | return -ENOMEM; |
175 | } | 175 | } |
176 | 176 | ||
@@ -189,7 +189,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
189 | uccs->us_pram_offset = | 189 | uccs->us_pram_offset = |
190 | qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM); | 190 | qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM); |
191 | if (IS_ERR_VALUE(uccs->us_pram_offset)) { | 191 | if (IS_ERR_VALUE(uccs->us_pram_offset)) { |
192 | printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __FUNCTION__); | 192 | printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __func__); |
193 | ucc_slow_free(uccs); | 193 | ucc_slow_free(uccs); |
194 | return -ENOMEM; | 194 | return -ENOMEM; |
195 | } | 195 | } |
@@ -202,7 +202,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
202 | /* Set UCC to slow type */ | 202 | /* Set UCC to slow type */ |
203 | ret = ucc_set_type(us_info->ucc_num, UCC_SPEED_TYPE_SLOW); | 203 | ret = ucc_set_type(us_info->ucc_num, UCC_SPEED_TYPE_SLOW); |
204 | if (ret) { | 204 | if (ret) { |
205 | printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); | 205 | printk(KERN_ERR "%s: cannot set UCC type", __func__); |
206 | ucc_slow_free(uccs); | 206 | ucc_slow_free(uccs); |
207 | return ret; | 207 | return ret; |
208 | } | 208 | } |
@@ -216,7 +216,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
216 | qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd), | 216 | qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd), |
217 | QE_ALIGNMENT_OF_BD); | 217 | QE_ALIGNMENT_OF_BD); |
218 | if (IS_ERR_VALUE(uccs->rx_base_offset)) { | 218 | if (IS_ERR_VALUE(uccs->rx_base_offset)) { |
219 | printk(KERN_ERR "%s: cannot allocate %u RX BDs\n", __FUNCTION__, | 219 | printk(KERN_ERR "%s: cannot allocate %u RX BDs\n", __func__, |
220 | us_info->rx_bd_ring_len); | 220 | us_info->rx_bd_ring_len); |
221 | uccs->rx_base_offset = 0; | 221 | uccs->rx_base_offset = 0; |
222 | ucc_slow_free(uccs); | 222 | ucc_slow_free(uccs); |
@@ -227,7 +227,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
227 | qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd), | 227 | qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd), |
228 | QE_ALIGNMENT_OF_BD); | 228 | QE_ALIGNMENT_OF_BD); |
229 | if (IS_ERR_VALUE(uccs->tx_base_offset)) { | 229 | if (IS_ERR_VALUE(uccs->tx_base_offset)) { |
230 | printk(KERN_ERR "%s: cannot allocate TX BDs", __FUNCTION__); | 230 | printk(KERN_ERR "%s: cannot allocate TX BDs", __func__); |
231 | uccs->tx_base_offset = 0; | 231 | uccs->tx_base_offset = 0; |
232 | ucc_slow_free(uccs); | 232 | ucc_slow_free(uccs); |
233 | return -ENOMEM; | 233 | return -ENOMEM; |
@@ -317,7 +317,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
317 | if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock, | 317 | if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock, |
318 | COMM_DIR_RX)) { | 318 | COMM_DIR_RX)) { |
319 | printk(KERN_ERR "%s: illegal value for RX clock\n", | 319 | printk(KERN_ERR "%s: illegal value for RX clock\n", |
320 | __FUNCTION__); | 320 | __func__); |
321 | ucc_slow_free(uccs); | 321 | ucc_slow_free(uccs); |
322 | return -EINVAL; | 322 | return -EINVAL; |
323 | } | 323 | } |
@@ -325,7 +325,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
325 | if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock, | 325 | if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock, |
326 | COMM_DIR_TX)) { | 326 | COMM_DIR_TX)) { |
327 | printk(KERN_ERR "%s: illegal value for TX clock\n", | 327 | printk(KERN_ERR "%s: illegal value for TX clock\n", |
328 | __FUNCTION__); | 328 | __func__); |
329 | ucc_slow_free(uccs); | 329 | ucc_slow_free(uccs); |
330 | return -EINVAL; | 330 | return -EINVAL; |
331 | } | 331 | } |
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index be2808a292f7..d4d15aaf18fa 100644 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ b/arch/powerpc/sysdev/tsi108_dev.c | |||
@@ -84,7 +84,7 @@ static int __init tsi108_eth_of_init(void) | |||
84 | 84 | ||
85 | ret = of_address_to_resource(np, 0, &r[0]); | 85 | ret = of_address_to_resource(np, 0, &r[0]); |
86 | DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", | 86 | DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", |
87 | __FUNCTION__,r[0].name, r[0].start, r[0].end); | 87 | __func__,r[0].name, r[0].start, r[0].end); |
88 | if (ret) | 88 | if (ret) |
89 | goto err; | 89 | goto err; |
90 | 90 | ||
@@ -93,7 +93,7 @@ static int __init tsi108_eth_of_init(void) | |||
93 | r[1].end = irq_of_parse_and_map(np, 0); | 93 | r[1].end = irq_of_parse_and_map(np, 0); |
94 | r[1].flags = IORESOURCE_IRQ; | 94 | r[1].flags = IORESOURCE_IRQ; |
95 | DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", | 95 | DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", |
96 | __FUNCTION__,r[1].name, r[1].start, r[1].end); | 96 | __func__,r[1].name, r[1].start, r[1].end); |
97 | 97 | ||
98 | tsi_eth_dev = | 98 | tsi_eth_dev = |
99 | platform_device_register_simple("tsi-ethernet", i++, &r[0], | 99 | platform_device_register_simple("tsi-ethernet", i++, &r[0], |
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 31d3d33d91fc..ac1a72dc21e5 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -207,7 +207,7 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) | |||
207 | /* PCI Config mapping */ | 207 | /* PCI Config mapping */ |
208 | tsi108_pci_cfg_base = (u32)ioremap(cfg_phys, TSI108_PCI_CFG_SIZE); | 208 | tsi108_pci_cfg_base = (u32)ioremap(cfg_phys, TSI108_PCI_CFG_SIZE); |
209 | tsi108_pci_cfg_phys = cfg_phys; | 209 | tsi108_pci_cfg_phys = cfg_phys; |
210 | DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __FUNCTION__, | 210 | DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __func__, |
211 | tsi108_pci_cfg_base); | 211 | tsi108_pci_cfg_base); |
212 | 212 | ||
213 | /* Fetch host bridge registers address */ | 213 | /* Fetch host bridge registers address */ |
@@ -395,7 +395,7 @@ static int pci_irq_host_xlate(struct irq_host *h, struct device_node *ct, | |||
395 | static int pci_irq_host_map(struct irq_host *h, unsigned int virq, | 395 | static int pci_irq_host_map(struct irq_host *h, unsigned int virq, |
396 | irq_hw_number_t hw) | 396 | irq_hw_number_t hw) |
397 | { unsigned int irq; | 397 | { unsigned int irq; |
398 | DBG("%s(%d, 0x%lx)\n", __FUNCTION__, virq, hw); | 398 | DBG("%s(%d, 0x%lx)\n", __func__, virq, hw); |
399 | if ((virq >= 1) && (virq <= 4)){ | 399 | if ((virq >= 1) && (virq <= 4)){ |
400 | irq = virq + IRQ_PCI_INTAD_BASE - 1; | 400 | irq = virq + IRQ_PCI_INTAD_BASE - 1; |
401 | get_irq_desc(irq)->status |= IRQ_LEVEL; | 401 | get_irq_desc(irq)->status |= IRQ_LEVEL; |
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 9d656de0f0f1..752443df5ecf 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -43,7 +43,7 @@ | |||
43 | ({ \ | 43 | ({ \ |
44 | u32 offset = offsetof(immap_t, member); \ | 44 | u32 offset = offsetof(immap_t, member); \ |
45 | void *addr = ioremap (IMAP_ADDR + offset, \ | 45 | void *addr = ioremap (IMAP_ADDR + offset, \ |
46 | sizeof( ((immap_t*)0)->member)); \ | 46 | FIELD_SIZEOF(immap_t, member)); \ |
47 | addr; \ | 47 | addr; \ |
48 | }) | 48 | }) |
49 | 49 | ||
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c index 11b0aa6ca97e..1d4b49ad0d7f 100644 --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c | |||
@@ -520,7 +520,7 @@ fec_enet_interrupt(int irq, void * dev_id) | |||
520 | #ifdef CONFIG_USE_MDIO | 520 | #ifdef CONFIG_USE_MDIO |
521 | fec_enet_mii(dev); | 521 | fec_enet_mii(dev); |
522 | #else | 522 | #else |
523 | printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__,__LINE__,__FUNCTION__); | 523 | printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__, __LINE__, __func__); |
524 | #endif /* CONFIG_USE_MDIO */ | 524 | #endif /* CONFIG_USE_MDIO */ |
525 | } | 525 | } |
526 | 526 | ||
@@ -1441,7 +1441,7 @@ irqreturn_t mii_link_interrupt(int irq, void * dev_id) | |||
1441 | fecp->fec_ecntrl = ecntrl; /* restore old settings */ | 1441 | fecp->fec_ecntrl = ecntrl; /* restore old settings */ |
1442 | } | 1442 | } |
1443 | #else | 1443 | #else |
1444 | printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__,__LINE__,__FUNCTION__); | 1444 | printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__, __LINE__, __func__); |
1445 | #endif /* CONFIG_USE_MDIO */ | 1445 | #endif /* CONFIG_USE_MDIO */ |
1446 | 1446 | ||
1447 | #ifndef CONFIG_RPXCLASSIC | 1447 | #ifndef CONFIG_RPXCLASSIC |
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index 1b0ec7202dd5..e7e642b95138 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S | |||
@@ -701,23 +701,6 @@ load_up_altivec: | |||
701 | b fast_exception_return | 701 | b fast_exception_return |
702 | 702 | ||
703 | /* | 703 | /* |
704 | * AltiVec unavailable trap from kernel - print a message, but let | ||
705 | * the task use AltiVec in the kernel until it returns to user mode. | ||
706 | */ | ||
707 | KernelAltiVec: | ||
708 | lwz r3,_MSR(r1) | ||
709 | oris r3,r3,MSR_VEC@h | ||
710 | stw r3,_MSR(r1) /* enable use of AltiVec after return */ | ||
711 | lis r3,87f@h | ||
712 | ori r3,r3,87f@l | ||
713 | mr r4,r2 /* current */ | ||
714 | lwz r5,_NIP(r1) | ||
715 | bl printk | ||
716 | b ret_from_except | ||
717 | 87: .string "AltiVec used in kernel (task=%p, pc=%x) \n" | ||
718 | .align 4,0 | ||
719 | |||
720 | /* | ||
721 | * giveup_altivec(tsk) | 704 | * giveup_altivec(tsk) |
722 | * Disable AltiVec for the task given as the argument, | 705 | * Disable AltiVec for the task given as the argument, |
723 | * and save the AltiVec registers in its thread_struct. | 706 | * and save the AltiVec registers in its thread_struct. |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 7444df3889c5..1a63711081b5 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -109,7 +109,6 @@ void show_mem(void) | |||
109 | 109 | ||
110 | printk("Mem-info:\n"); | 110 | printk("Mem-info:\n"); |
111 | show_free_areas(); | 111 | show_free_areas(); |
112 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
113 | i = max_mapnr; | 112 | i = max_mapnr; |
114 | while (i-- > 0) { | 113 | while (i-- > 0) { |
115 | total++; | 114 | total++; |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 44d4398a36ff..fc928a26609b 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -512,7 +512,7 @@ static void __init ppc7d_init_irq(void) | |||
512 | { | 512 | { |
513 | int irq; | 513 | int irq; |
514 | 514 | ||
515 | pr_debug("%s\n", __FUNCTION__); | 515 | pr_debug("%s\n", __func__); |
516 | i8259_init(0, 0); | 516 | i8259_init(0, 0); |
517 | mv64360_init_irq(); | 517 | mv64360_init_irq(); |
518 | 518 | ||
@@ -569,7 +569,7 @@ static int __init ppc7d_map_irq(struct pci_dev *dev, unsigned char idsel, | |||
569 | }; | 569 | }; |
570 | const long min_idsel = 10, max_idsel = 14, irqs_per_slot = 4; | 570 | const long min_idsel = 10, max_idsel = 14, irqs_per_slot = 4; |
571 | 571 | ||
572 | pr_debug("%s: %04x/%04x/%x: idsel=%hx pin=%hu\n", __FUNCTION__, | 572 | pr_debug("%s: %04x/%04x/%x: idsel=%hx pin=%hu\n", __func__, |
573 | dev->vendor, dev->device, PCI_FUNC(dev->devfn), idsel, pin); | 573 | dev->vendor, dev->device, PCI_FUNC(dev->devfn), idsel, pin); |
574 | 574 | ||
575 | return PCI_IRQ_TABLE_LOOKUP; | 575 | return PCI_IRQ_TABLE_LOOKUP; |
@@ -1300,7 +1300,7 @@ static void ppc7d_init2(void) | |||
1300 | u32 data; | 1300 | u32 data; |
1301 | u8 data8; | 1301 | u8 data8; |
1302 | 1302 | ||
1303 | pr_debug("%s: enter\n", __FUNCTION__); | 1303 | pr_debug("%s: enter\n", __func__); |
1304 | 1304 | ||
1305 | /* Wait for debugger? */ | 1305 | /* Wait for debugger? */ |
1306 | if (ppc7d_wait_debugger) { | 1306 | if (ppc7d_wait_debugger) { |
@@ -1333,7 +1333,7 @@ static void ppc7d_init2(void) | |||
1333 | ppc_md.set_rtc_time = ppc7d_set_rtc_time; | 1333 | ppc_md.set_rtc_time = ppc7d_set_rtc_time; |
1334 | ppc_md.get_rtc_time = ppc7d_get_rtc_time; | 1334 | ppc_md.get_rtc_time = ppc7d_get_rtc_time; |
1335 | 1335 | ||
1336 | pr_debug("%s: exit\n", __FUNCTION__); | 1336 | pr_debug("%s: exit\n", __func__); |
1337 | } | 1337 | } |
1338 | 1338 | ||
1339 | /* Called from machine_init(), early, before any of the __init functions | 1339 | /* Called from machine_init(), early, before any of the __init functions |
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index 9f504fc7693e..ab0cf4ced9e5 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c | |||
@@ -279,7 +279,7 @@ int mpc52xx_match_psc_function(int psc_idx, const char *func) | |||
279 | 279 | ||
280 | int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv) | 280 | int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv) |
281 | { | 281 | { |
282 | static spinlock_t lock = SPIN_LOCK_UNLOCKED; | 282 | static DEFINE_SPINLOCK(lock); |
283 | struct mpc52xx_cdm __iomem *cdm; | 283 | struct mpc52xx_cdm __iomem *cdm; |
284 | unsigned long flags; | 284 | unsigned long flags; |
285 | u16 mclken_div; | 285 | u16 mclken_div; |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 463d1be32c98..2667a9dee11d 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -16,6 +16,7 @@ config SPARC64 | |||
16 | bool | 16 | bool |
17 | default y | 17 | default y |
18 | select HAVE_IDE | 18 | select HAVE_IDE |
19 | select HAVE_LMB | ||
19 | help | 20 | help |
20 | SPARC is a family of RISC microprocessors designed and marketed by | 21 | SPARC is a family of RISC microprocessors designed and marketed by |
21 | Sun Microsystems, incorporated. This port covers the newer 64-bit | 22 | Sun Microsystems, incorporated. This port covers the newer 64-bit |
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 41ca721d2523..ebfe038d859e 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -69,7 +69,7 @@ MODULE_LICENSE("GPL"); | |||
69 | enum { | 69 | enum { |
70 | PARTITION_SHIFT = 3, | 70 | PARTITION_SHIFT = 3, |
71 | MAX_DISKNO = HVMAXARCHITECTEDVIRTUALDISKS, | 71 | MAX_DISKNO = HVMAXARCHITECTEDVIRTUALDISKS, |
72 | MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name) | 72 | MAX_DISK_NAME = FIELD_SIZEOF(struct gendisk, disk_name) |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static DEFINE_SPINLOCK(viodasd_spinlock); | 75 | static DEFINE_SPINLOCK(viodasd_spinlock); |
diff --git a/drivers/char/xilinx_hwicap/buffer_icap.c b/drivers/char/xilinx_hwicap/buffer_icap.c index f577daedb630..aa7f7962a9a0 100644 --- a/drivers/char/xilinx_hwicap/buffer_icap.c +++ b/drivers/char/xilinx_hwicap/buffer_icap.c | |||
@@ -74,7 +74,7 @@ | |||
74 | 74 | ||
75 | /** | 75 | /** |
76 | * buffer_icap_get_status - Get the contents of the status register. | 76 | * buffer_icap_get_status - Get the contents of the status register. |
77 | * @base_address: is the base address of the device | 77 | * @drvdata: a pointer to the drvdata. |
78 | * | 78 | * |
79 | * The status register contains the ICAP status and the done bit. | 79 | * The status register contains the ICAP status and the done bit. |
80 | * | 80 | * |
@@ -88,9 +88,9 @@ | |||
88 | * D1 - Always 1 | 88 | * D1 - Always 1 |
89 | * D0 - Done bit | 89 | * D0 - Done bit |
90 | **/ | 90 | **/ |
91 | static inline u32 buffer_icap_get_status(void __iomem *base_address) | 91 | u32 buffer_icap_get_status(struct hwicap_drvdata *drvdata) |
92 | { | 92 | { |
93 | return in_be32(base_address + XHI_STATUS_REG_OFFSET); | 93 | return in_be32(drvdata->base_address + XHI_STATUS_REG_OFFSET); |
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
@@ -117,20 +117,8 @@ static inline u32 buffer_icap_get_bram(void __iomem *base_address, | |||
117 | **/ | 117 | **/ |
118 | static inline bool buffer_icap_busy(void __iomem *base_address) | 118 | static inline bool buffer_icap_busy(void __iomem *base_address) |
119 | { | 119 | { |
120 | return (buffer_icap_get_status(base_address) & 1) == XHI_NOT_FINISHED; | 120 | u32 status = in_be32(base_address + XHI_STATUS_REG_OFFSET); |
121 | } | 121 | return (status & 1) == XHI_NOT_FINISHED; |
122 | |||
123 | /** | ||
124 | * buffer_icap_busy - Return true if the icap device is not busy | ||
125 | * @base_address: is the base address of the device | ||
126 | * | ||
127 | * The queries the low order bit of the status register, which | ||
128 | * indicates whether the current configuration or readback operation | ||
129 | * has completed. | ||
130 | **/ | ||
131 | static inline bool buffer_icap_done(void __iomem *base_address) | ||
132 | { | ||
133 | return (buffer_icap_get_status(base_address) & 1) == XHI_FINISHED; | ||
134 | } | 122 | } |
135 | 123 | ||
136 | /** | 124 | /** |
diff --git a/drivers/char/xilinx_hwicap/buffer_icap.h b/drivers/char/xilinx_hwicap/buffer_icap.h index 03184959fa00..c5b1840906b2 100644 --- a/drivers/char/xilinx_hwicap/buffer_icap.h +++ b/drivers/char/xilinx_hwicap/buffer_icap.h | |||
@@ -44,8 +44,6 @@ | |||
44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
45 | #include "xilinx_hwicap.h" | 45 | #include "xilinx_hwicap.h" |
46 | 46 | ||
47 | void buffer_icap_reset(struct hwicap_drvdata *drvdata); | ||
48 | |||
49 | /* Loads a partial bitstream from system memory. */ | 47 | /* Loads a partial bitstream from system memory. */ |
50 | int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, | 48 | int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, |
51 | u32 Size); | 49 | u32 Size); |
@@ -54,4 +52,7 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, | |||
54 | int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data, | 52 | int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data, |
55 | u32 Size); | 53 | u32 Size); |
56 | 54 | ||
55 | u32 buffer_icap_get_status(struct hwicap_drvdata *drvdata); | ||
56 | void buffer_icap_reset(struct hwicap_drvdata *drvdata); | ||
57 | |||
57 | #endif | 58 | #endif |
diff --git a/drivers/char/xilinx_hwicap/fifo_icap.c b/drivers/char/xilinx_hwicap/fifo_icap.c index 6f45dbd47125..776b50528478 100644 --- a/drivers/char/xilinx_hwicap/fifo_icap.c +++ b/drivers/char/xilinx_hwicap/fifo_icap.c | |||
@@ -78,13 +78,6 @@ | |||
78 | #define XHI_CR_READ_MASK 0x00000002 /* Read from ICAP to FIFO */ | 78 | #define XHI_CR_READ_MASK 0x00000002 /* Read from ICAP to FIFO */ |
79 | #define XHI_CR_WRITE_MASK 0x00000001 /* Write from FIFO to ICAP */ | 79 | #define XHI_CR_WRITE_MASK 0x00000001 /* Write from FIFO to ICAP */ |
80 | 80 | ||
81 | /* Status Register (SR) */ | ||
82 | #define XHI_SR_CFGERR_N_MASK 0x00000100 /* Config Error Mask */ | ||
83 | #define XHI_SR_DALIGN_MASK 0x00000080 /* Data Alignment Mask */ | ||
84 | #define XHI_SR_RIP_MASK 0x00000040 /* Read back Mask */ | ||
85 | #define XHI_SR_IN_ABORT_N_MASK 0x00000020 /* Select Map Abort Mask */ | ||
86 | #define XHI_SR_DONE_MASK 0x00000001 /* Done bit Mask */ | ||
87 | |||
88 | 81 | ||
89 | #define XHI_WFO_MAX_VACANCY 1024 /* Max Write FIFO Vacancy, in words */ | 82 | #define XHI_WFO_MAX_VACANCY 1024 /* Max Write FIFO Vacancy, in words */ |
90 | #define XHI_RFO_MAX_OCCUPANCY 256 /* Max Read FIFO Occupancy, in words */ | 83 | #define XHI_RFO_MAX_OCCUPANCY 256 /* Max Read FIFO Occupancy, in words */ |
@@ -152,13 +145,35 @@ static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata) | |||
152 | } | 145 | } |
153 | 146 | ||
154 | /** | 147 | /** |
148 | * fifo_icap_get_status - Get the contents of the status register. | ||
149 | * @drvdata: a pointer to the drvdata. | ||
150 | * | ||
151 | * The status register contains the ICAP status and the done bit. | ||
152 | * | ||
153 | * D8 - cfgerr | ||
154 | * D7 - dalign | ||
155 | * D6 - rip | ||
156 | * D5 - in_abort_l | ||
157 | * D4 - Always 1 | ||
158 | * D3 - Always 1 | ||
159 | * D2 - Always 1 | ||
160 | * D1 - Always 1 | ||
161 | * D0 - Done bit | ||
162 | **/ | ||
163 | u32 fifo_icap_get_status(struct hwicap_drvdata *drvdata) | ||
164 | { | ||
165 | u32 status = in_be32(drvdata->base_address + XHI_SR_OFFSET); | ||
166 | dev_dbg(drvdata->dev, "Getting status = %x\n", status); | ||
167 | return status; | ||
168 | } | ||
169 | |||
170 | /** | ||
155 | * fifo_icap_busy - Return true if the ICAP is still processing a transaction. | 171 | * fifo_icap_busy - Return true if the ICAP is still processing a transaction. |
156 | * @drvdata: a pointer to the drvdata. | 172 | * @drvdata: a pointer to the drvdata. |
157 | **/ | 173 | **/ |
158 | static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata) | 174 | static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata) |
159 | { | 175 | { |
160 | u32 status = in_be32(drvdata->base_address + XHI_SR_OFFSET); | 176 | u32 status = in_be32(drvdata->base_address + XHI_SR_OFFSET); |
161 | dev_dbg(drvdata->dev, "Getting status = %x\n", status); | ||
162 | return (status & XHI_SR_DONE_MASK) ? 0 : 1; | 177 | return (status & XHI_SR_DONE_MASK) ? 0 : 1; |
163 | } | 178 | } |
164 | 179 | ||
diff --git a/drivers/char/xilinx_hwicap/fifo_icap.h b/drivers/char/xilinx_hwicap/fifo_icap.h index 4d3068dd0405..ffabd3ba2bd8 100644 --- a/drivers/char/xilinx_hwicap/fifo_icap.h +++ b/drivers/char/xilinx_hwicap/fifo_icap.h | |||
@@ -56,6 +56,7 @@ int fifo_icap_set_configuration( | |||
56 | u32 *FrameBuffer, | 56 | u32 *FrameBuffer, |
57 | u32 NumWords); | 57 | u32 NumWords); |
58 | 58 | ||
59 | u32 fifo_icap_get_status(struct hwicap_drvdata *drvdata); | ||
59 | void fifo_icap_reset(struct hwicap_drvdata *drvdata); | 60 | void fifo_icap_reset(struct hwicap_drvdata *drvdata); |
60 | void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata); | 61 | void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata); |
61 | 62 | ||
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 2284fa2a5a57..016f90567a52 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c | |||
@@ -36,7 +36,7 @@ | |||
36 | *****************************************************************************/ | 36 | *****************************************************************************/ |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * This is the code behind /dev/xilinx_icap -- it allows a user-space | 39 | * This is the code behind /dev/icap* -- it allows a user-space |
40 | * application to use the Xilinx ICAP subsystem. | 40 | * application to use the Xilinx ICAP subsystem. |
41 | * | 41 | * |
42 | * The following operations are possible: | 42 | * The following operations are possible: |
@@ -67,7 +67,7 @@ | |||
67 | * user-space application code that uses this device. The simplest | 67 | * user-space application code that uses this device. The simplest |
68 | * way to use this interface is simply: | 68 | * way to use this interface is simply: |
69 | * | 69 | * |
70 | * cp foo.bit /dev/xilinx_icap | 70 | * cp foo.bit /dev/icap0 |
71 | * | 71 | * |
72 | * Note that unless foo.bit is an appropriately constructed partial | 72 | * Note that unless foo.bit is an appropriately constructed partial |
73 | * bitstream, this has a high likelyhood of overwriting the design | 73 | * bitstream, this has a high likelyhood of overwriting the design |
@@ -105,18 +105,14 @@ | |||
105 | #include "buffer_icap.h" | 105 | #include "buffer_icap.h" |
106 | #include "fifo_icap.h" | 106 | #include "fifo_icap.h" |
107 | 107 | ||
108 | #define DRIVER_NAME "xilinx_icap" | 108 | #define DRIVER_NAME "icap" |
109 | 109 | ||
110 | #define HWICAP_REGS (0x10000) | 110 | #define HWICAP_REGS (0x10000) |
111 | 111 | ||
112 | /* dynamically allocate device number */ | 112 | #define XHWICAP_MAJOR 259 |
113 | static int xhwicap_major; | 113 | #define XHWICAP_MINOR 0 |
114 | static int xhwicap_minor; | ||
115 | #define HWICAP_DEVICES 1 | 114 | #define HWICAP_DEVICES 1 |
116 | 115 | ||
117 | module_param(xhwicap_major, int, S_IRUGO); | ||
118 | module_param(xhwicap_minor, int, S_IRUGO); | ||
119 | |||
120 | /* An array, which is set to true when the device is registered. */ | 116 | /* An array, which is set to true when the device is registered. */ |
121 | static bool probed_devices[HWICAP_DEVICES]; | 117 | static bool probed_devices[HWICAP_DEVICES]; |
122 | static struct mutex icap_sem; | 118 | static struct mutex icap_sem; |
@@ -250,8 +246,26 @@ static int hwicap_get_configuration_register(struct hwicap_drvdata *drvdata, | |||
250 | * Create the data to be written to the ICAP. | 246 | * Create the data to be written to the ICAP. |
251 | */ | 247 | */ |
252 | buffer[index++] = XHI_DUMMY_PACKET; | 248 | buffer[index++] = XHI_DUMMY_PACKET; |
249 | buffer[index++] = XHI_NOOP_PACKET; | ||
253 | buffer[index++] = XHI_SYNC_PACKET; | 250 | buffer[index++] = XHI_SYNC_PACKET; |
254 | buffer[index++] = XHI_NOOP_PACKET; | 251 | buffer[index++] = XHI_NOOP_PACKET; |
252 | buffer[index++] = XHI_NOOP_PACKET; | ||
253 | |||
254 | /* | ||
255 | * Write the data to the FIFO and initiate the transfer of data present | ||
256 | * in the FIFO to the ICAP device. | ||
257 | */ | ||
258 | status = drvdata->config->set_configuration(drvdata, | ||
259 | &buffer[0], index); | ||
260 | if (status) | ||
261 | return status; | ||
262 | |||
263 | /* If the syncword was not found, then we need to start over. */ | ||
264 | status = drvdata->config->get_status(drvdata); | ||
265 | if ((status & XHI_SR_DALIGN_MASK) != XHI_SR_DALIGN_MASK) | ||
266 | return -EIO; | ||
267 | |||
268 | index = 0; | ||
255 | buffer[index++] = hwicap_type_1_read(reg) | 1; | 269 | buffer[index++] = hwicap_type_1_read(reg) | 1; |
256 | buffer[index++] = XHI_NOOP_PACKET; | 270 | buffer[index++] = XHI_NOOP_PACKET; |
257 | buffer[index++] = XHI_NOOP_PACKET; | 271 | buffer[index++] = XHI_NOOP_PACKET; |
@@ -587,7 +601,7 @@ static int __devinit hwicap_setup(struct device *dev, int id, | |||
587 | probed_devices[id] = 1; | 601 | probed_devices[id] = 1; |
588 | mutex_unlock(&icap_sem); | 602 | mutex_unlock(&icap_sem); |
589 | 603 | ||
590 | devt = MKDEV(xhwicap_major, xhwicap_minor + id); | 604 | devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR + id); |
591 | 605 | ||
592 | drvdata = kzalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL); | 606 | drvdata = kzalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL); |
593 | if (!drvdata) { | 607 | if (!drvdata) { |
@@ -664,12 +678,14 @@ static int __devinit hwicap_setup(struct device *dev, int id, | |||
664 | static struct hwicap_driver_config buffer_icap_config = { | 678 | static struct hwicap_driver_config buffer_icap_config = { |
665 | .get_configuration = buffer_icap_get_configuration, | 679 | .get_configuration = buffer_icap_get_configuration, |
666 | .set_configuration = buffer_icap_set_configuration, | 680 | .set_configuration = buffer_icap_set_configuration, |
681 | .get_status = buffer_icap_get_status, | ||
667 | .reset = buffer_icap_reset, | 682 | .reset = buffer_icap_reset, |
668 | }; | 683 | }; |
669 | 684 | ||
670 | static struct hwicap_driver_config fifo_icap_config = { | 685 | static struct hwicap_driver_config fifo_icap_config = { |
671 | .get_configuration = fifo_icap_get_configuration, | 686 | .get_configuration = fifo_icap_get_configuration, |
672 | .set_configuration = fifo_icap_set_configuration, | 687 | .set_configuration = fifo_icap_set_configuration, |
688 | .get_status = fifo_icap_get_status, | ||
673 | .reset = fifo_icap_reset, | 689 | .reset = fifo_icap_reset, |
674 | }; | 690 | }; |
675 | 691 | ||
@@ -690,7 +706,7 @@ static int __devexit hwicap_remove(struct device *dev) | |||
690 | dev_set_drvdata(dev, NULL); | 706 | dev_set_drvdata(dev, NULL); |
691 | 707 | ||
692 | mutex_lock(&icap_sem); | 708 | mutex_lock(&icap_sem); |
693 | probed_devices[MINOR(dev->devt)-xhwicap_minor] = 0; | 709 | probed_devices[MINOR(dev->devt)-XHWICAP_MINOR] = 0; |
694 | mutex_unlock(&icap_sem); | 710 | mutex_unlock(&icap_sem); |
695 | return 0; /* success */ | 711 | return 0; /* success */ |
696 | } | 712 | } |
@@ -830,23 +846,12 @@ static int __init hwicap_module_init(void) | |||
830 | icap_class = class_create(THIS_MODULE, "xilinx_config"); | 846 | icap_class = class_create(THIS_MODULE, "xilinx_config"); |
831 | mutex_init(&icap_sem); | 847 | mutex_init(&icap_sem); |
832 | 848 | ||
833 | if (xhwicap_major) { | 849 | devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR); |
834 | devt = MKDEV(xhwicap_major, xhwicap_minor); | 850 | retval = register_chrdev_region(devt, |
835 | retval = register_chrdev_region( | 851 | HWICAP_DEVICES, |
836 | devt, | 852 | DRIVER_NAME); |
837 | HWICAP_DEVICES, | 853 | if (retval < 0) |
838 | DRIVER_NAME); | 854 | return retval; |
839 | if (retval < 0) | ||
840 | return retval; | ||
841 | } else { | ||
842 | retval = alloc_chrdev_region(&devt, | ||
843 | xhwicap_minor, | ||
844 | HWICAP_DEVICES, | ||
845 | DRIVER_NAME); | ||
846 | if (retval < 0) | ||
847 | return retval; | ||
848 | xhwicap_major = MAJOR(devt); | ||
849 | } | ||
850 | 855 | ||
851 | retval = platform_driver_register(&hwicap_platform_driver); | 856 | retval = platform_driver_register(&hwicap_platform_driver); |
852 | 857 | ||
@@ -871,7 +876,7 @@ static int __init hwicap_module_init(void) | |||
871 | 876 | ||
872 | static void __exit hwicap_module_cleanup(void) | 877 | static void __exit hwicap_module_cleanup(void) |
873 | { | 878 | { |
874 | dev_t devt = MKDEV(xhwicap_major, xhwicap_minor); | 879 | dev_t devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR); |
875 | 880 | ||
876 | class_destroy(icap_class); | 881 | class_destroy(icap_class); |
877 | 882 | ||
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.h b/drivers/char/xilinx_hwicap/xilinx_hwicap.h index 405fee7e189b..1f9c8b082dbe 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.h +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.h | |||
@@ -65,10 +65,27 @@ struct hwicap_drvdata { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct hwicap_driver_config { | 67 | struct hwicap_driver_config { |
68 | /* Read configuration data given by size into the data buffer. | ||
69 | Return 0 if successful. */ | ||
68 | int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data, | 70 | int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data, |
69 | u32 size); | 71 | u32 size); |
72 | /* Write configuration data given by size from the data buffer. | ||
73 | Return 0 if successful. */ | ||
70 | int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data, | 74 | int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data, |
71 | u32 size); | 75 | u32 size); |
76 | /* Get the status register, bit pattern given by: | ||
77 | * D8 - 0 = configuration error | ||
78 | * D7 - 1 = alignment found | ||
79 | * D6 - 1 = readback in progress | ||
80 | * D5 - 0 = abort in progress | ||
81 | * D4 - Always 1 | ||
82 | * D3 - Always 1 | ||
83 | * D2 - Always 1 | ||
84 | * D1 - Always 1 | ||
85 | * D0 - 1 = operation completed | ||
86 | */ | ||
87 | u32 (*get_status)(struct hwicap_drvdata *drvdata); | ||
88 | /* Reset the hw */ | ||
72 | void (*reset)(struct hwicap_drvdata *drvdata); | 89 | void (*reset)(struct hwicap_drvdata *drvdata); |
73 | }; | 90 | }; |
74 | 91 | ||
@@ -163,6 +180,13 @@ struct config_registers { | |||
163 | /* Constant to use for CRC check when CRC has been disabled */ | 180 | /* Constant to use for CRC check when CRC has been disabled */ |
164 | #define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL | 181 | #define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL |
165 | 182 | ||
183 | /* Meanings of the bits returned by get_status */ | ||
184 | #define XHI_SR_CFGERR_N_MASK 0x00000100 /* Config Error Mask */ | ||
185 | #define XHI_SR_DALIGN_MASK 0x00000080 /* Data Alignment Mask */ | ||
186 | #define XHI_SR_RIP_MASK 0x00000040 /* Read back Mask */ | ||
187 | #define XHI_SR_IN_ABORT_N_MASK 0x00000020 /* Select Map Abort Mask */ | ||
188 | #define XHI_SR_DONE_MASK 0x00000001 /* Done bit Mask */ | ||
189 | |||
166 | /** | 190 | /** |
167 | * hwicap_type_1_read - Generates a Type 1 read packet header. | 191 | * hwicap_type_1_read - Generates a Type 1 read packet header. |
168 | * @reg: is the address of the register to be read back. | 192 | * @reg: is the address of the register to be read back. |
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 3b1ea321dc05..4b442739e7bf 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
@@ -218,7 +218,8 @@ obj-$(CONFIG_SMC911X) += smc911x.o | |||
218 | obj-$(CONFIG_BFIN_MAC) += bfin_mac.o | 218 | obj-$(CONFIG_BFIN_MAC) += bfin_mac.o |
219 | obj-$(CONFIG_DM9000) += dm9000.o | 219 | obj-$(CONFIG_DM9000) += dm9000.o |
220 | obj-$(CONFIG_FEC_8XX) += fec_8xx/ | 220 | obj-$(CONFIG_FEC_8XX) += fec_8xx/ |
221 | obj-$(CONFIG_PASEMI_MAC) += pasemi_mac.o | 221 | obj-$(CONFIG_PASEMI_MAC) += pasemi_mac_driver.o |
222 | pasemi_mac_driver-objs := pasemi_mac.o pasemi_mac_ethtool.o | ||
222 | obj-$(CONFIG_MLX4_CORE) += mlx4/ | 223 | obj-$(CONFIG_MLX4_CORE) += mlx4/ |
223 | obj-$(CONFIG_ENC28J60) += enc28j60.o | 224 | obj-$(CONFIG_ENC28J60) += enc28j60.o |
224 | 225 | ||
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 2e39e0285d8f..c50f0f4de6d8 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -55,15 +55,10 @@ | |||
55 | * - Multiqueue RX/TX | 55 | * - Multiqueue RX/TX |
56 | */ | 56 | */ |
57 | 57 | ||
58 | |||
59 | /* Must be a power of two */ | ||
60 | #define RX_RING_SIZE 2048 | ||
61 | #define TX_RING_SIZE 4096 | ||
62 | |||
63 | #define LRO_MAX_AGGR 64 | 58 | #define LRO_MAX_AGGR 64 |
64 | 59 | ||
65 | #define PE_MIN_MTU 64 | 60 | #define PE_MIN_MTU 64 |
66 | #define PE_MAX_MTU 1500 | 61 | #define PE_MAX_MTU 9000 |
67 | #define PE_DEF_MTU ETH_DATA_LEN | 62 | #define PE_DEF_MTU ETH_DATA_LEN |
68 | 63 | ||
69 | #define DEFAULT_MSG_ENABLE \ | 64 | #define DEFAULT_MSG_ENABLE \ |
@@ -76,16 +71,6 @@ | |||
76 | NETIF_MSG_RX_ERR | \ | 71 | NETIF_MSG_RX_ERR | \ |
77 | NETIF_MSG_TX_ERR) | 72 | NETIF_MSG_TX_ERR) |
78 | 73 | ||
79 | #define TX_DESC(tx, num) ((tx)->chan.ring_virt[(num) & (TX_RING_SIZE-1)]) | ||
80 | #define TX_DESC_INFO(tx, num) ((tx)->ring_info[(num) & (TX_RING_SIZE-1)]) | ||
81 | #define RX_DESC(rx, num) ((rx)->chan.ring_virt[(num) & (RX_RING_SIZE-1)]) | ||
82 | #define RX_DESC_INFO(rx, num) ((rx)->ring_info[(num) & (RX_RING_SIZE-1)]) | ||
83 | #define RX_BUFF(rx, num) ((rx)->buffers[(num) & (RX_RING_SIZE-1)]) | ||
84 | |||
85 | #define RING_USED(ring) (((ring)->next_to_fill - (ring)->next_to_clean) \ | ||
86 | & ((ring)->size - 1)) | ||
87 | #define RING_AVAIL(ring) ((ring->size) - RING_USED(ring)) | ||
88 | |||
89 | MODULE_LICENSE("GPL"); | 74 | MODULE_LICENSE("GPL"); |
90 | MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>"); | 75 | MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>"); |
91 | MODULE_DESCRIPTION("PA Semi PWRficient Ethernet driver"); | 76 | MODULE_DESCRIPTION("PA Semi PWRficient Ethernet driver"); |
@@ -94,6 +79,8 @@ static int debug = -1; /* -1 == use DEFAULT_MSG_ENABLE as value */ | |||
94 | module_param(debug, int, 0); | 79 | module_param(debug, int, 0); |
95 | MODULE_PARM_DESC(debug, "PA Semi MAC bitmapped debugging message enable value"); | 80 | MODULE_PARM_DESC(debug, "PA Semi MAC bitmapped debugging message enable value"); |
96 | 81 | ||
82 | extern const struct ethtool_ops pasemi_mac_ethtool_ops; | ||
83 | |||
97 | static int translation_enabled(void) | 84 | static int translation_enabled(void) |
98 | { | 85 | { |
99 | #if defined(CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE) | 86 | #if defined(CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE) |
@@ -322,6 +309,103 @@ static int pasemi_mac_unmap_tx_skb(struct pasemi_mac *mac, | |||
322 | return (nfrags + 3) & ~1; | 309 | return (nfrags + 3) & ~1; |
323 | } | 310 | } |
324 | 311 | ||
312 | static struct pasemi_mac_csring *pasemi_mac_setup_csring(struct pasemi_mac *mac) | ||
313 | { | ||
314 | struct pasemi_mac_csring *ring; | ||
315 | u32 val; | ||
316 | unsigned int cfg; | ||
317 | int chno; | ||
318 | |||
319 | ring = pasemi_dma_alloc_chan(TXCHAN, sizeof(struct pasemi_mac_csring), | ||
320 | offsetof(struct pasemi_mac_csring, chan)); | ||
321 | |||
322 | if (!ring) { | ||
323 | dev_err(&mac->pdev->dev, "Can't allocate checksum channel\n"); | ||
324 | goto out_chan; | ||
325 | } | ||
326 | |||
327 | chno = ring->chan.chno; | ||
328 | |||
329 | ring->size = CS_RING_SIZE; | ||
330 | ring->next_to_fill = 0; | ||
331 | |||
332 | /* Allocate descriptors */ | ||
333 | if (pasemi_dma_alloc_ring(&ring->chan, CS_RING_SIZE)) | ||
334 | goto out_ring_desc; | ||
335 | |||
336 | write_dma_reg(PAS_DMA_TXCHAN_BASEL(chno), | ||
337 | PAS_DMA_TXCHAN_BASEL_BRBL(ring->chan.ring_dma)); | ||
338 | val = PAS_DMA_TXCHAN_BASEU_BRBH(ring->chan.ring_dma >> 32); | ||
339 | val |= PAS_DMA_TXCHAN_BASEU_SIZ(CS_RING_SIZE >> 3); | ||
340 | |||
341 | write_dma_reg(PAS_DMA_TXCHAN_BASEU(chno), val); | ||
342 | |||
343 | ring->events[0] = pasemi_dma_alloc_flag(); | ||
344 | ring->events[1] = pasemi_dma_alloc_flag(); | ||
345 | if (ring->events[0] < 0 || ring->events[1] < 0) | ||
346 | goto out_flags; | ||
347 | |||
348 | pasemi_dma_clear_flag(ring->events[0]); | ||
349 | pasemi_dma_clear_flag(ring->events[1]); | ||
350 | |||
351 | ring->fun = pasemi_dma_alloc_fun(); | ||
352 | if (ring->fun < 0) | ||
353 | goto out_fun; | ||
354 | |||
355 | cfg = PAS_DMA_TXCHAN_CFG_TY_FUNC | PAS_DMA_TXCHAN_CFG_UP | | ||
356 | PAS_DMA_TXCHAN_CFG_TATTR(ring->fun) | | ||
357 | PAS_DMA_TXCHAN_CFG_LPSQ | PAS_DMA_TXCHAN_CFG_LPDQ; | ||
358 | |||
359 | if (translation_enabled()) | ||
360 | cfg |= PAS_DMA_TXCHAN_CFG_TRD | PAS_DMA_TXCHAN_CFG_TRR; | ||
361 | |||
362 | write_dma_reg(PAS_DMA_TXCHAN_CFG(chno), cfg); | ||
363 | |||
364 | /* enable channel */ | ||
365 | pasemi_dma_start_chan(&ring->chan, PAS_DMA_TXCHAN_TCMDSTA_SZ | | ||
366 | PAS_DMA_TXCHAN_TCMDSTA_DB | | ||
367 | PAS_DMA_TXCHAN_TCMDSTA_DE | | ||
368 | PAS_DMA_TXCHAN_TCMDSTA_DA); | ||
369 | |||
370 | return ring; | ||
371 | |||
372 | out_fun: | ||
373 | out_flags: | ||
374 | if (ring->events[0] >= 0) | ||
375 | pasemi_dma_free_flag(ring->events[0]); | ||
376 | if (ring->events[1] >= 0) | ||
377 | pasemi_dma_free_flag(ring->events[1]); | ||
378 | pasemi_dma_free_ring(&ring->chan); | ||
379 | out_ring_desc: | ||
380 | pasemi_dma_free_chan(&ring->chan); | ||
381 | out_chan: | ||
382 | |||
383 | return NULL; | ||
384 | } | ||
385 | |||
386 | static void pasemi_mac_setup_csrings(struct pasemi_mac *mac) | ||
387 | { | ||
388 | int i; | ||
389 | mac->cs[0] = pasemi_mac_setup_csring(mac); | ||
390 | if (mac->type == MAC_TYPE_XAUI) | ||
391 | mac->cs[1] = pasemi_mac_setup_csring(mac); | ||
392 | else | ||
393 | mac->cs[1] = 0; | ||
394 | |||
395 | for (i = 0; i < MAX_CS; i++) | ||
396 | if (mac->cs[i]) | ||
397 | mac->num_cs++; | ||
398 | } | ||
399 | |||
400 | static void pasemi_mac_free_csring(struct pasemi_mac_csring *csring) | ||
401 | { | ||
402 | pasemi_dma_stop_chan(&csring->chan); | ||
403 | pasemi_dma_free_flag(csring->events[0]); | ||
404 | pasemi_dma_free_flag(csring->events[1]); | ||
405 | pasemi_dma_free_ring(&csring->chan); | ||
406 | pasemi_dma_free_chan(&csring->chan); | ||
407 | } | ||
408 | |||
325 | static int pasemi_mac_setup_rx_resources(const struct net_device *dev) | 409 | static int pasemi_mac_setup_rx_resources(const struct net_device *dev) |
326 | { | 410 | { |
327 | struct pasemi_mac_rxring *ring; | 411 | struct pasemi_mac_rxring *ring; |
@@ -445,7 +529,7 @@ pasemi_mac_setup_tx_resources(const struct net_device *dev) | |||
445 | cfg = PAS_DMA_TXCHAN_CFG_TY_IFACE | | 529 | cfg = PAS_DMA_TXCHAN_CFG_TY_IFACE | |
446 | PAS_DMA_TXCHAN_CFG_TATTR(mac->dma_if) | | 530 | PAS_DMA_TXCHAN_CFG_TATTR(mac->dma_if) | |
447 | PAS_DMA_TXCHAN_CFG_UP | | 531 | PAS_DMA_TXCHAN_CFG_UP | |
448 | PAS_DMA_TXCHAN_CFG_WT(2); | 532 | PAS_DMA_TXCHAN_CFG_WT(4); |
449 | 533 | ||
450 | if (translation_enabled()) | 534 | if (translation_enabled()) |
451 | cfg |= PAS_DMA_TXCHAN_CFG_TRD | PAS_DMA_TXCHAN_CFG_TRR; | 535 | cfg |= PAS_DMA_TXCHAN_CFG_TRD | PAS_DMA_TXCHAN_CFG_TRR; |
@@ -810,13 +894,21 @@ restart: | |||
810 | u64 mactx = TX_DESC(txring, i); | 894 | u64 mactx = TX_DESC(txring, i); |
811 | struct sk_buff *skb; | 895 | struct sk_buff *skb; |
812 | 896 | ||
813 | skb = TX_DESC_INFO(txring, i+1).skb; | ||
814 | nr_frags = TX_DESC_INFO(txring, i).dma; | ||
815 | |||
816 | if ((mactx & XCT_MACTX_E) || | 897 | if ((mactx & XCT_MACTX_E) || |
817 | (*chan->status & PAS_STATUS_ERROR)) | 898 | (*chan->status & PAS_STATUS_ERROR)) |
818 | pasemi_mac_tx_error(mac, mactx); | 899 | pasemi_mac_tx_error(mac, mactx); |
819 | 900 | ||
901 | /* Skip over control descriptors */ | ||
902 | if (!(mactx & XCT_MACTX_LLEN_M)) { | ||
903 | TX_DESC(txring, i) = 0; | ||
904 | TX_DESC(txring, i+1) = 0; | ||
905 | buf_count = 2; | ||
906 | continue; | ||
907 | } | ||
908 | |||
909 | skb = TX_DESC_INFO(txring, i+1).skb; | ||
910 | nr_frags = TX_DESC_INFO(txring, i).dma; | ||
911 | |||
820 | if (unlikely(mactx & XCT_MACTX_O)) | 912 | if (unlikely(mactx & XCT_MACTX_O)) |
821 | /* Not yet transmitted */ | 913 | /* Not yet transmitted */ |
822 | break; | 914 | break; |
@@ -1041,13 +1133,7 @@ static int pasemi_mac_open(struct net_device *dev) | |||
1041 | { | 1133 | { |
1042 | struct pasemi_mac *mac = netdev_priv(dev); | 1134 | struct pasemi_mac *mac = netdev_priv(dev); |
1043 | unsigned int flags; | 1135 | unsigned int flags; |
1044 | int ret; | 1136 | int i, ret; |
1045 | |||
1046 | /* enable rx section */ | ||
1047 | write_dma_reg(PAS_DMA_COM_RXCMD, PAS_DMA_COM_RXCMD_EN); | ||
1048 | |||
1049 | /* enable tx section */ | ||
1050 | write_dma_reg(PAS_DMA_COM_TXCMD, PAS_DMA_COM_TXCMD_EN); | ||
1051 | 1137 | ||
1052 | flags = PAS_MAC_CFG_TXP_FCE | PAS_MAC_CFG_TXP_FPC(3) | | 1138 | flags = PAS_MAC_CFG_TXP_FCE | PAS_MAC_CFG_TXP_FPC(3) | |
1053 | PAS_MAC_CFG_TXP_SL(3) | PAS_MAC_CFG_TXP_COB(0xf) | | 1139 | PAS_MAC_CFG_TXP_SL(3) | PAS_MAC_CFG_TXP_COB(0xf) | |
@@ -1064,6 +1150,16 @@ static int pasemi_mac_open(struct net_device *dev) | |||
1064 | if (!mac->tx) | 1150 | if (!mac->tx) |
1065 | goto out_tx_ring; | 1151 | goto out_tx_ring; |
1066 | 1152 | ||
1153 | if (dev->mtu > 1500) { | ||
1154 | pasemi_mac_setup_csrings(mac); | ||
1155 | if (!mac->num_cs) | ||
1156 | goto out_tx_ring; | ||
1157 | } | ||
1158 | |||
1159 | /* Zero out rmon counters */ | ||
1160 | for (i = 0; i < 32; i++) | ||
1161 | write_mac_reg(mac, PAS_MAC_RMON(i), 0); | ||
1162 | |||
1067 | /* 0x3ff with 33MHz clock is about 31us */ | 1163 | /* 0x3ff with 33MHz clock is about 31us */ |
1068 | write_iob_reg(PAS_IOB_DMA_COM_TIMEOUTCFG, | 1164 | write_iob_reg(PAS_IOB_DMA_COM_TIMEOUTCFG, |
1069 | PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0x3ff)); | 1165 | PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0x3ff)); |
@@ -1247,7 +1343,7 @@ static int pasemi_mac_close(struct net_device *dev) | |||
1247 | { | 1343 | { |
1248 | struct pasemi_mac *mac = netdev_priv(dev); | 1344 | struct pasemi_mac *mac = netdev_priv(dev); |
1249 | unsigned int sta; | 1345 | unsigned int sta; |
1250 | int rxch, txch; | 1346 | int rxch, txch, i; |
1251 | 1347 | ||
1252 | rxch = rx_ring(mac)->chan.chno; | 1348 | rxch = rx_ring(mac)->chan.chno; |
1253 | txch = tx_ring(mac)->chan.chno; | 1349 | txch = tx_ring(mac)->chan.chno; |
@@ -1292,6 +1388,9 @@ static int pasemi_mac_close(struct net_device *dev) | |||
1292 | free_irq(mac->tx->chan.irq, mac->tx); | 1388 | free_irq(mac->tx->chan.irq, mac->tx); |
1293 | free_irq(mac->rx->chan.irq, mac->rx); | 1389 | free_irq(mac->rx->chan.irq, mac->rx); |
1294 | 1390 | ||
1391 | for (i = 0; i < mac->num_cs; i++) | ||
1392 | pasemi_mac_free_csring(mac->cs[i]); | ||
1393 | |||
1295 | /* Free resources */ | 1394 | /* Free resources */ |
1296 | pasemi_mac_free_rx_resources(mac); | 1395 | pasemi_mac_free_rx_resources(mac); |
1297 | pasemi_mac_free_tx_resources(mac); | 1396 | pasemi_mac_free_tx_resources(mac); |
@@ -1299,35 +1398,113 @@ static int pasemi_mac_close(struct net_device *dev) | |||
1299 | return 0; | 1398 | return 0; |
1300 | } | 1399 | } |
1301 | 1400 | ||
1401 | static void pasemi_mac_queue_csdesc(const struct sk_buff *skb, | ||
1402 | const dma_addr_t *map, | ||
1403 | const unsigned int *map_size, | ||
1404 | struct pasemi_mac_txring *txring, | ||
1405 | struct pasemi_mac_csring *csring) | ||
1406 | { | ||
1407 | u64 fund; | ||
1408 | dma_addr_t cs_dest; | ||
1409 | const int nh_off = skb_network_offset(skb); | ||
1410 | const int nh_len = skb_network_header_len(skb); | ||
1411 | const int nfrags = skb_shinfo(skb)->nr_frags; | ||
1412 | int cs_size, i, fill, hdr, cpyhdr, evt; | ||
1413 | dma_addr_t csdma; | ||
1414 | |||
1415 | fund = XCT_FUN_ST | XCT_FUN_RR_8BRES | | ||
1416 | XCT_FUN_O | XCT_FUN_FUN(csring->fun) | | ||
1417 | XCT_FUN_CRM_SIG | XCT_FUN_LLEN(skb->len - nh_off) | | ||
1418 | XCT_FUN_SHL(nh_len >> 2) | XCT_FUN_SE; | ||
1419 | |||
1420 | switch (ip_hdr(skb)->protocol) { | ||
1421 | case IPPROTO_TCP: | ||
1422 | fund |= XCT_FUN_SIG_TCP4; | ||
1423 | /* TCP checksum is 16 bytes into the header */ | ||
1424 | cs_dest = map[0] + skb_transport_offset(skb) + 16; | ||
1425 | break; | ||
1426 | case IPPROTO_UDP: | ||
1427 | fund |= XCT_FUN_SIG_UDP4; | ||
1428 | /* UDP checksum is 6 bytes into the header */ | ||
1429 | cs_dest = map[0] + skb_transport_offset(skb) + 6; | ||
1430 | break; | ||
1431 | default: | ||
1432 | BUG(); | ||
1433 | } | ||
1434 | |||
1435 | /* Do the checksum offloaded */ | ||
1436 | fill = csring->next_to_fill; | ||
1437 | hdr = fill; | ||
1438 | |||
1439 | CS_DESC(csring, fill++) = fund; | ||
1440 | /* Room for 8BRES. Checksum result is really 2 bytes into it */ | ||
1441 | csdma = csring->chan.ring_dma + (fill & (CS_RING_SIZE-1)) * 8 + 2; | ||
1442 | CS_DESC(csring, fill++) = 0; | ||
1443 | |||
1444 | CS_DESC(csring, fill) = XCT_PTR_LEN(map_size[0]-nh_off) | XCT_PTR_ADDR(map[0]+nh_off); | ||
1445 | for (i = 1; i <= nfrags; i++) | ||
1446 | CS_DESC(csring, fill+i) = XCT_PTR_LEN(map_size[i]) | XCT_PTR_ADDR(map[i]); | ||
1447 | |||
1448 | fill += i; | ||
1449 | if (fill & 1) | ||
1450 | fill++; | ||
1451 | |||
1452 | /* Copy the result into the TCP packet */ | ||
1453 | cpyhdr = fill; | ||
1454 | CS_DESC(csring, fill++) = XCT_FUN_O | XCT_FUN_FUN(csring->fun) | | ||
1455 | XCT_FUN_LLEN(2) | XCT_FUN_SE; | ||
1456 | CS_DESC(csring, fill++) = XCT_PTR_LEN(2) | XCT_PTR_ADDR(cs_dest) | XCT_PTR_T; | ||
1457 | CS_DESC(csring, fill++) = XCT_PTR_LEN(2) | XCT_PTR_ADDR(csdma); | ||
1458 | fill++; | ||
1459 | |||
1460 | evt = !csring->last_event; | ||
1461 | csring->last_event = evt; | ||
1462 | |||
1463 | /* Event handshaking with MAC TX */ | ||
1464 | CS_DESC(csring, fill++) = CTRL_CMD_T | CTRL_CMD_META_EVT | CTRL_CMD_O | | ||
1465 | CTRL_CMD_ETYPE_SET | CTRL_CMD_REG(csring->events[evt]); | ||
1466 | CS_DESC(csring, fill++) = 0; | ||
1467 | CS_DESC(csring, fill++) = CTRL_CMD_T | CTRL_CMD_META_EVT | CTRL_CMD_O | | ||
1468 | CTRL_CMD_ETYPE_WCLR | CTRL_CMD_REG(csring->events[!evt]); | ||
1469 | CS_DESC(csring, fill++) = 0; | ||
1470 | csring->next_to_fill = fill & (CS_RING_SIZE-1); | ||
1471 | |||
1472 | cs_size = fill - hdr; | ||
1473 | write_dma_reg(PAS_DMA_TXCHAN_INCR(csring->chan.chno), (cs_size) >> 1); | ||
1474 | |||
1475 | /* TX-side event handshaking */ | ||
1476 | fill = txring->next_to_fill; | ||
1477 | TX_DESC(txring, fill++) = CTRL_CMD_T | CTRL_CMD_META_EVT | CTRL_CMD_O | | ||
1478 | CTRL_CMD_ETYPE_WSET | CTRL_CMD_REG(csring->events[evt]); | ||
1479 | TX_DESC(txring, fill++) = 0; | ||
1480 | TX_DESC(txring, fill++) = CTRL_CMD_T | CTRL_CMD_META_EVT | CTRL_CMD_O | | ||
1481 | CTRL_CMD_ETYPE_CLR | CTRL_CMD_REG(csring->events[!evt]); | ||
1482 | TX_DESC(txring, fill++) = 0; | ||
1483 | txring->next_to_fill = fill; | ||
1484 | |||
1485 | write_dma_reg(PAS_DMA_TXCHAN_INCR(txring->chan.chno), 2); | ||
1486 | |||
1487 | return; | ||
1488 | } | ||
1489 | |||
1302 | static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) | 1490 | static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) |
1303 | { | 1491 | { |
1304 | struct pasemi_mac *mac = netdev_priv(dev); | 1492 | struct pasemi_mac * const mac = netdev_priv(dev); |
1305 | struct pasemi_mac_txring *txring; | 1493 | struct pasemi_mac_txring * const txring = tx_ring(mac); |
1306 | u64 dflags, mactx; | 1494 | struct pasemi_mac_csring *csring; |
1495 | u64 dflags = 0; | ||
1496 | u64 mactx; | ||
1307 | dma_addr_t map[MAX_SKB_FRAGS+1]; | 1497 | dma_addr_t map[MAX_SKB_FRAGS+1]; |
1308 | unsigned int map_size[MAX_SKB_FRAGS+1]; | 1498 | unsigned int map_size[MAX_SKB_FRAGS+1]; |
1309 | unsigned long flags; | 1499 | unsigned long flags; |
1310 | int i, nfrags; | 1500 | int i, nfrags; |
1311 | int fill; | 1501 | int fill; |
1502 | const int nh_off = skb_network_offset(skb); | ||
1503 | const int nh_len = skb_network_header_len(skb); | ||
1312 | 1504 | ||
1313 | dflags = XCT_MACTX_O | XCT_MACTX_ST | XCT_MACTX_CRC_PAD; | 1505 | prefetch(&txring->ring_info); |
1314 | |||
1315 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | ||
1316 | const unsigned char *nh = skb_network_header(skb); | ||
1317 | 1506 | ||
1318 | switch (ip_hdr(skb)->protocol) { | 1507 | dflags = XCT_MACTX_O | XCT_MACTX_ST | XCT_MACTX_CRC_PAD; |
1319 | case IPPROTO_TCP: | ||
1320 | dflags |= XCT_MACTX_CSUM_TCP; | ||
1321 | dflags |= XCT_MACTX_IPH(skb_network_header_len(skb) >> 2); | ||
1322 | dflags |= XCT_MACTX_IPO(nh - skb->data); | ||
1323 | break; | ||
1324 | case IPPROTO_UDP: | ||
1325 | dflags |= XCT_MACTX_CSUM_UDP; | ||
1326 | dflags |= XCT_MACTX_IPH(skb_network_header_len(skb) >> 2); | ||
1327 | dflags |= XCT_MACTX_IPO(nh - skb->data); | ||
1328 | break; | ||
1329 | } | ||
1330 | } | ||
1331 | 1508 | ||
1332 | nfrags = skb_shinfo(skb)->nr_frags; | 1509 | nfrags = skb_shinfo(skb)->nr_frags; |
1333 | 1510 | ||
@@ -1350,24 +1527,46 @@ static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1350 | } | 1527 | } |
1351 | } | 1528 | } |
1352 | 1529 | ||
1353 | mactx = dflags | XCT_MACTX_LLEN(skb->len); | 1530 | if (skb->ip_summed == CHECKSUM_PARTIAL && skb->len <= 1540) { |
1531 | switch (ip_hdr(skb)->protocol) { | ||
1532 | case IPPROTO_TCP: | ||
1533 | dflags |= XCT_MACTX_CSUM_TCP; | ||
1534 | dflags |= XCT_MACTX_IPH(nh_len >> 2); | ||
1535 | dflags |= XCT_MACTX_IPO(nh_off); | ||
1536 | break; | ||
1537 | case IPPROTO_UDP: | ||
1538 | dflags |= XCT_MACTX_CSUM_UDP; | ||
1539 | dflags |= XCT_MACTX_IPH(nh_len >> 2); | ||
1540 | dflags |= XCT_MACTX_IPO(nh_off); | ||
1541 | break; | ||
1542 | default: | ||
1543 | WARN_ON(1); | ||
1544 | } | ||
1545 | } | ||
1354 | 1546 | ||
1355 | txring = tx_ring(mac); | 1547 | mactx = dflags | XCT_MACTX_LLEN(skb->len); |
1356 | 1548 | ||
1357 | spin_lock_irqsave(&txring->lock, flags); | 1549 | spin_lock_irqsave(&txring->lock, flags); |
1358 | 1550 | ||
1359 | fill = txring->next_to_fill; | ||
1360 | |||
1361 | /* Avoid stepping on the same cache line that the DMA controller | 1551 | /* Avoid stepping on the same cache line that the DMA controller |
1362 | * is currently about to send, so leave at least 8 words available. | 1552 | * is currently about to send, so leave at least 8 words available. |
1363 | * Total free space needed is mactx + fragments + 8 | 1553 | * Total free space needed is mactx + fragments + 8 |
1364 | */ | 1554 | */ |
1365 | if (RING_AVAIL(txring) < nfrags + 10) { | 1555 | if (RING_AVAIL(txring) < nfrags + 14) { |
1366 | /* no room -- stop the queue and wait for tx intr */ | 1556 | /* no room -- stop the queue and wait for tx intr */ |
1367 | netif_stop_queue(dev); | 1557 | netif_stop_queue(dev); |
1368 | goto out_err; | 1558 | goto out_err; |
1369 | } | 1559 | } |
1370 | 1560 | ||
1561 | /* Queue up checksum + event descriptors, if needed */ | ||
1562 | if (mac->num_cs && skb->ip_summed == CHECKSUM_PARTIAL && skb->len > 1540) { | ||
1563 | csring = mac->cs[mac->last_cs]; | ||
1564 | mac->last_cs = (mac->last_cs + 1) % mac->num_cs; | ||
1565 | |||
1566 | pasemi_mac_queue_csdesc(skb, map, map_size, txring, csring); | ||
1567 | } | ||
1568 | |||
1569 | fill = txring->next_to_fill; | ||
1371 | TX_DESC(txring, fill) = mactx; | 1570 | TX_DESC(txring, fill) = mactx; |
1372 | TX_DESC_INFO(txring, fill).dma = nfrags; | 1571 | TX_DESC_INFO(txring, fill).dma = nfrags; |
1373 | fill++; | 1572 | fill++; |
@@ -1445,8 +1644,9 @@ static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) | |||
1445 | { | 1644 | { |
1446 | struct pasemi_mac *mac = netdev_priv(dev); | 1645 | struct pasemi_mac *mac = netdev_priv(dev); |
1447 | unsigned int reg; | 1646 | unsigned int reg; |
1448 | unsigned int rcmdsta; | 1647 | unsigned int rcmdsta = 0; |
1449 | int running; | 1648 | int running; |
1649 | int ret = 0; | ||
1450 | 1650 | ||
1451 | if (new_mtu < PE_MIN_MTU || new_mtu > PE_MAX_MTU) | 1651 | if (new_mtu < PE_MIN_MTU || new_mtu > PE_MAX_MTU) |
1452 | return -EINVAL; | 1652 | return -EINVAL; |
@@ -1468,6 +1668,16 @@ static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) | |||
1468 | pasemi_mac_pause_rxint(mac); | 1668 | pasemi_mac_pause_rxint(mac); |
1469 | pasemi_mac_clean_rx(rx_ring(mac), RX_RING_SIZE); | 1669 | pasemi_mac_clean_rx(rx_ring(mac), RX_RING_SIZE); |
1470 | pasemi_mac_free_rx_buffers(mac); | 1670 | pasemi_mac_free_rx_buffers(mac); |
1671 | |||
1672 | } | ||
1673 | |||
1674 | /* Setup checksum channels if large MTU and none already allocated */ | ||
1675 | if (new_mtu > 1500 && !mac->num_cs) { | ||
1676 | pasemi_mac_setup_csrings(mac); | ||
1677 | if (!mac->num_cs) { | ||
1678 | ret = -ENOMEM; | ||
1679 | goto out; | ||
1680 | } | ||
1471 | } | 1681 | } |
1472 | 1682 | ||
1473 | /* Change maxf, i.e. what size frames are accepted. | 1683 | /* Change maxf, i.e. what size frames are accepted. |
@@ -1482,6 +1692,7 @@ static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) | |||
1482 | /* MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ | 1692 | /* MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ |
1483 | mac->bufsz = new_mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; | 1693 | mac->bufsz = new_mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; |
1484 | 1694 | ||
1695 | out: | ||
1485 | if (running) { | 1696 | if (running) { |
1486 | write_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if), | 1697 | write_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if), |
1487 | rcmdsta | PAS_DMA_RXINT_RCMDSTA_EN); | 1698 | rcmdsta | PAS_DMA_RXINT_RCMDSTA_EN); |
@@ -1494,7 +1705,7 @@ static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) | |||
1494 | pasemi_mac_intf_enable(mac); | 1705 | pasemi_mac_intf_enable(mac); |
1495 | } | 1706 | } |
1496 | 1707 | ||
1497 | return 0; | 1708 | return ret; |
1498 | } | 1709 | } |
1499 | 1710 | ||
1500 | static int __devinit | 1711 | static int __devinit |
@@ -1528,7 +1739,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1528 | netif_napi_add(dev, &mac->napi, pasemi_mac_poll, 64); | 1739 | netif_napi_add(dev, &mac->napi, pasemi_mac_poll, 64); |
1529 | 1740 | ||
1530 | dev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX | NETIF_F_SG | | 1741 | dev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX | NETIF_F_SG | |
1531 | NETIF_F_HIGHDMA; | 1742 | NETIF_F_HIGHDMA | NETIF_F_GSO; |
1532 | 1743 | ||
1533 | mac->lro_mgr.max_aggr = LRO_MAX_AGGR; | 1744 | mac->lro_mgr.max_aggr = LRO_MAX_AGGR; |
1534 | mac->lro_mgr.max_desc = MAX_LRO_DESCRIPTORS; | 1745 | mac->lro_mgr.max_desc = MAX_LRO_DESCRIPTORS; |
@@ -1590,6 +1801,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1590 | mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; | 1801 | mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; |
1591 | 1802 | ||
1592 | dev->change_mtu = pasemi_mac_change_mtu; | 1803 | dev->change_mtu = pasemi_mac_change_mtu; |
1804 | dev->ethtool_ops = &pasemi_mac_ethtool_ops; | ||
1593 | 1805 | ||
1594 | if (err) | 1806 | if (err) |
1595 | goto out; | 1807 | goto out; |
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h index 99e7b9329a6f..1a115ec60b53 100644 --- a/drivers/net/pasemi_mac.h +++ b/drivers/net/pasemi_mac.h | |||
@@ -26,7 +26,14 @@ | |||
26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
27 | #include <linux/phy.h> | 27 | #include <linux/phy.h> |
28 | 28 | ||
29 | /* Must be a power of two */ | ||
30 | #define RX_RING_SIZE 2048 | ||
31 | #define TX_RING_SIZE 4096 | ||
32 | #define CS_RING_SIZE (TX_RING_SIZE*2) | ||
33 | |||
34 | |||
29 | #define MAX_LRO_DESCRIPTORS 8 | 35 | #define MAX_LRO_DESCRIPTORS 8 |
36 | #define MAX_CS 2 | ||
30 | 37 | ||
31 | struct pasemi_mac_txring { | 38 | struct pasemi_mac_txring { |
32 | struct pasemi_dmachan chan; /* Must be first */ | 39 | struct pasemi_dmachan chan; /* Must be first */ |
@@ -51,6 +58,15 @@ struct pasemi_mac_rxring { | |||
51 | struct pasemi_mac *mac; /* Needed in intr handler */ | 58 | struct pasemi_mac *mac; /* Needed in intr handler */ |
52 | }; | 59 | }; |
53 | 60 | ||
61 | struct pasemi_mac_csring { | ||
62 | struct pasemi_dmachan chan; | ||
63 | unsigned int size; | ||
64 | unsigned int next_to_fill; | ||
65 | int events[2]; | ||
66 | int last_event; | ||
67 | int fun; | ||
68 | }; | ||
69 | |||
54 | struct pasemi_mac { | 70 | struct pasemi_mac { |
55 | struct net_device *netdev; | 71 | struct net_device *netdev; |
56 | struct pci_dev *pdev; | 72 | struct pci_dev *pdev; |
@@ -60,10 +76,12 @@ struct pasemi_mac { | |||
60 | struct napi_struct napi; | 76 | struct napi_struct napi; |
61 | 77 | ||
62 | int bufsz; /* RX ring buffer size */ | 78 | int bufsz; /* RX ring buffer size */ |
79 | int last_cs; | ||
80 | int num_cs; | ||
81 | u32 dma_if; | ||
63 | u8 type; | 82 | u8 type; |
64 | #define MAC_TYPE_GMAC 1 | 83 | #define MAC_TYPE_GMAC 1 |
65 | #define MAC_TYPE_XAUI 2 | 84 | #define MAC_TYPE_XAUI 2 |
66 | u32 dma_if; | ||
67 | 85 | ||
68 | u8 mac_addr[6]; | 86 | u8 mac_addr[6]; |
69 | 87 | ||
@@ -74,6 +92,7 @@ struct pasemi_mac { | |||
74 | 92 | ||
75 | struct pasemi_mac_txring *tx; | 93 | struct pasemi_mac_txring *tx; |
76 | struct pasemi_mac_rxring *rx; | 94 | struct pasemi_mac_rxring *rx; |
95 | struct pasemi_mac_csring *cs[MAX_CS]; | ||
77 | char tx_irq_name[10]; /* "eth%d tx" */ | 96 | char tx_irq_name[10]; /* "eth%d tx" */ |
78 | char rx_irq_name[10]; /* "eth%d rx" */ | 97 | char rx_irq_name[10]; /* "eth%d rx" */ |
79 | int link; | 98 | int link; |
@@ -90,6 +109,16 @@ struct pasemi_mac_buffer { | |||
90 | dma_addr_t dma; | 109 | dma_addr_t dma; |
91 | }; | 110 | }; |
92 | 111 | ||
112 | #define TX_DESC(tx, num) ((tx)->chan.ring_virt[(num) & (TX_RING_SIZE-1)]) | ||
113 | #define TX_DESC_INFO(tx, num) ((tx)->ring_info[(num) & (TX_RING_SIZE-1)]) | ||
114 | #define RX_DESC(rx, num) ((rx)->chan.ring_virt[(num) & (RX_RING_SIZE-1)]) | ||
115 | #define RX_DESC_INFO(rx, num) ((rx)->ring_info[(num) & (RX_RING_SIZE-1)]) | ||
116 | #define RX_BUFF(rx, num) ((rx)->buffers[(num) & (RX_RING_SIZE-1)]) | ||
117 | #define CS_DESC(cs, num) ((cs)->chan.ring_virt[(num) & (CS_RING_SIZE-1)]) | ||
118 | |||
119 | #define RING_USED(ring) (((ring)->next_to_fill - (ring)->next_to_clean) \ | ||
120 | & ((ring)->size - 1)) | ||
121 | #define RING_AVAIL(ring) ((ring->size) - RING_USED(ring)) | ||
93 | 122 | ||
94 | /* PCI register offsets and formats */ | 123 | /* PCI register offsets and formats */ |
95 | 124 | ||
@@ -101,6 +130,7 @@ enum { | |||
101 | PAS_MAC_CFG_ADR0 = 0x8c, | 130 | PAS_MAC_CFG_ADR0 = 0x8c, |
102 | PAS_MAC_CFG_ADR1 = 0x90, | 131 | PAS_MAC_CFG_ADR1 = 0x90, |
103 | PAS_MAC_CFG_TXP = 0x98, | 132 | PAS_MAC_CFG_TXP = 0x98, |
133 | PAS_MAC_CFG_RMON = 0x100, | ||
104 | PAS_MAC_IPC_CHNL = 0x208, | 134 | PAS_MAC_IPC_CHNL = 0x208, |
105 | }; | 135 | }; |
106 | 136 | ||
@@ -172,6 +202,8 @@ enum { | |||
172 | #define PAS_MAC_CFG_TXP_TIFG(x) (((x) << PAS_MAC_CFG_TXP_TIFG_S) & \ | 202 | #define PAS_MAC_CFG_TXP_TIFG(x) (((x) << PAS_MAC_CFG_TXP_TIFG_S) & \ |
173 | PAS_MAC_CFG_TXP_TIFG_M) | 203 | PAS_MAC_CFG_TXP_TIFG_M) |
174 | 204 | ||
205 | #define PAS_MAC_RMON(r) (0x100+(r)*4) | ||
206 | |||
175 | #define PAS_MAC_IPC_CHNL_DCHNO_M 0x003f0000 | 207 | #define PAS_MAC_IPC_CHNL_DCHNO_M 0x003f0000 |
176 | #define PAS_MAC_IPC_CHNL_DCHNO_S 16 | 208 | #define PAS_MAC_IPC_CHNL_DCHNO_S 16 |
177 | #define PAS_MAC_IPC_CHNL_DCHNO(x) (((x) << PAS_MAC_IPC_CHNL_DCHNO_S) & \ | 209 | #define PAS_MAC_IPC_CHNL_DCHNO(x) (((x) << PAS_MAC_IPC_CHNL_DCHNO_S) & \ |
@@ -181,4 +213,5 @@ enum { | |||
181 | #define PAS_MAC_IPC_CHNL_BCH(x) (((x) << PAS_MAC_IPC_CHNL_BCH_S) & \ | 213 | #define PAS_MAC_IPC_CHNL_BCH(x) (((x) << PAS_MAC_IPC_CHNL_BCH_S) & \ |
182 | PAS_MAC_IPC_CHNL_BCH_M) | 214 | PAS_MAC_IPC_CHNL_BCH_M) |
183 | 215 | ||
216 | |||
184 | #endif /* PASEMI_MAC_H */ | 217 | #endif /* PASEMI_MAC_H */ |
diff --git a/drivers/net/pasemi_mac_ethtool.c b/drivers/net/pasemi_mac_ethtool.c new file mode 100644 index 000000000000..5e8df3afea64 --- /dev/null +++ b/drivers/net/pasemi_mac_ethtool.c | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2008 PA Semi, Inc | ||
3 | * | ||
4 | * Ethtool hooks for the PA Semi PWRficient onchip 1G/10G Ethernet MACs | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | |||
21 | #include <linux/netdevice.h> | ||
22 | #include <linux/ethtool.h> | ||
23 | #include <linux/pci.h> | ||
24 | #include <linux/inet_lro.h> | ||
25 | |||
26 | #include <asm/pasemi_dma.h> | ||
27 | #include "pasemi_mac.h" | ||
28 | |||
29 | static struct { | ||
30 | const char str[ETH_GSTRING_LEN]; | ||
31 | } ethtool_stats_keys[] = { | ||
32 | { "rx-drops" }, | ||
33 | { "rx-bytes" }, | ||
34 | { "rx-packets" }, | ||
35 | { "rx-broadcast-packets" }, | ||
36 | { "rx-multicast-packets" }, | ||
37 | { "rx-crc-errors" }, | ||
38 | { "rx-undersize-errors" }, | ||
39 | { "rx-oversize-errors" }, | ||
40 | { "rx-short-fragment-errors" }, | ||
41 | { "rx-jabber-errors" }, | ||
42 | { "rx-64-byte-packets" }, | ||
43 | { "rx-65-127-byte-packets" }, | ||
44 | { "rx-128-255-byte-packets" }, | ||
45 | { "rx-256-511-byte-packets" }, | ||
46 | { "rx-512-1023-byte-packets" }, | ||
47 | { "rx-1024-1518-byte-packets" }, | ||
48 | { "rx-pause-frames" }, | ||
49 | { "tx-bytes" }, | ||
50 | { "tx-packets" }, | ||
51 | { "tx-broadcast-packets" }, | ||
52 | { "tx-multicast-packets" }, | ||
53 | { "tx-collisions" }, | ||
54 | { "tx-late-collisions" }, | ||
55 | { "tx-excessive-collisions" }, | ||
56 | { "tx-crc-errors" }, | ||
57 | { "tx-undersize-errors" }, | ||
58 | { "tx-oversize-errors" }, | ||
59 | { "tx-64-byte-packets" }, | ||
60 | { "tx-65-127-byte-packets" }, | ||
61 | { "tx-128-255-byte-packets" }, | ||
62 | { "tx-256-511-byte-packets" }, | ||
63 | { "tx-512-1023-byte-packets" }, | ||
64 | { "tx-1024-1518-byte-packets" }, | ||
65 | }; | ||
66 | |||
67 | static int | ||
68 | pasemi_mac_ethtool_get_settings(struct net_device *netdev, | ||
69 | struct ethtool_cmd *cmd) | ||
70 | { | ||
71 | struct pasemi_mac *mac = netdev_priv(netdev); | ||
72 | struct phy_device *phydev = mac->phydev; | ||
73 | |||
74 | return phy_ethtool_gset(phydev, cmd); | ||
75 | } | ||
76 | |||
77 | static void | ||
78 | pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev, | ||
79 | struct ethtool_drvinfo *drvinfo) | ||
80 | { | ||
81 | struct pasemi_mac *mac; | ||
82 | mac = netdev_priv(netdev); | ||
83 | |||
84 | /* clear and fill out info */ | ||
85 | memset(drvinfo, 0, sizeof(struct ethtool_drvinfo)); | ||
86 | strncpy(drvinfo->driver, "pasemi_mac", 12); | ||
87 | strcpy(drvinfo->version, "N/A"); | ||
88 | strcpy(drvinfo->fw_version, "N/A"); | ||
89 | strncpy(drvinfo->bus_info, pci_name(mac->pdev), 32); | ||
90 | } | ||
91 | |||
92 | static u32 | ||
93 | pasemi_mac_ethtool_get_msglevel(struct net_device *netdev) | ||
94 | { | ||
95 | struct pasemi_mac *mac = netdev_priv(netdev); | ||
96 | return mac->msg_enable; | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | pasemi_mac_ethtool_set_msglevel(struct net_device *netdev, | ||
101 | u32 level) | ||
102 | { | ||
103 | struct pasemi_mac *mac = netdev_priv(netdev); | ||
104 | mac->msg_enable = level; | ||
105 | } | ||
106 | |||
107 | |||
108 | static void | ||
109 | pasemi_mac_ethtool_get_ringparam(struct net_device *netdev, | ||
110 | struct ethtool_ringparam *ering) | ||
111 | { | ||
112 | struct pasemi_mac *mac = netdev->priv; | ||
113 | |||
114 | ering->tx_max_pending = TX_RING_SIZE/2; | ||
115 | ering->tx_pending = RING_USED(mac->tx)/2; | ||
116 | ering->rx_max_pending = RX_RING_SIZE/4; | ||
117 | ering->rx_pending = RING_USED(mac->rx)/4; | ||
118 | } | ||
119 | |||
120 | static int pasemi_mac_get_sset_count(struct net_device *netdev, int sset) | ||
121 | { | ||
122 | switch (sset) { | ||
123 | case ETH_SS_STATS: | ||
124 | return ARRAY_SIZE(ethtool_stats_keys); | ||
125 | default: | ||
126 | return -EOPNOTSUPP; | ||
127 | } | ||
128 | } | ||
129 | |||
130 | static void pasemi_mac_get_ethtool_stats(struct net_device *netdev, | ||
131 | struct ethtool_stats *stats, u64 *data) | ||
132 | { | ||
133 | struct pasemi_mac *mac = netdev->priv; | ||
134 | int i; | ||
135 | |||
136 | data[0] = pasemi_read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)) | ||
137 | >> PAS_DMA_RXINT_RCMDSTA_DROPS_S; | ||
138 | for (i = 0; i < 32; i++) | ||
139 | data[1+i] = pasemi_read_mac_reg(mac->dma_if, PAS_MAC_RMON(i)); | ||
140 | } | ||
141 | |||
142 | static void pasemi_mac_get_strings(struct net_device *netdev, u32 stringset, | ||
143 | u8 *data) | ||
144 | { | ||
145 | memcpy(data, ethtool_stats_keys, sizeof(ethtool_stats_keys)); | ||
146 | } | ||
147 | |||
148 | const struct ethtool_ops pasemi_mac_ethtool_ops = { | ||
149 | .get_settings = pasemi_mac_ethtool_get_settings, | ||
150 | .get_drvinfo = pasemi_mac_ethtool_get_drvinfo, | ||
151 | .get_msglevel = pasemi_mac_ethtool_get_msglevel, | ||
152 | .set_msglevel = pasemi_mac_ethtool_set_msglevel, | ||
153 | .get_link = ethtool_op_get_link, | ||
154 | .get_ringparam = pasemi_mac_ethtool_get_ringparam, | ||
155 | .get_strings = pasemi_mac_get_strings, | ||
156 | .get_sset_count = pasemi_mac_get_sset_count, | ||
157 | .get_ethtool_stats = pasemi_mac_get_ethtool_stats, | ||
158 | }; | ||
159 | |||
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index 7eb6e7e848f4..e365efb3c627 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -1266,6 +1266,85 @@ int gelic_net_set_rx_csum(struct net_device *netdev, u32 data) | |||
1266 | return 0; | 1266 | return 0; |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | static void gelic_net_get_wol(struct net_device *netdev, | ||
1270 | struct ethtool_wolinfo *wol) | ||
1271 | { | ||
1272 | if (0 <= ps3_compare_firmware_version(2, 2, 0)) | ||
1273 | wol->supported = WAKE_MAGIC; | ||
1274 | else | ||
1275 | wol->supported = 0; | ||
1276 | |||
1277 | wol->wolopts = ps3_sys_manager_get_wol() ? wol->supported : 0; | ||
1278 | memset(&wol->sopass, 0, sizeof(wol->sopass)); | ||
1279 | } | ||
1280 | static int gelic_net_set_wol(struct net_device *netdev, | ||
1281 | struct ethtool_wolinfo *wol) | ||
1282 | { | ||
1283 | int status; | ||
1284 | struct gelic_card *card; | ||
1285 | u64 v1, v2; | ||
1286 | |||
1287 | if (ps3_compare_firmware_version(2, 2, 0) < 0 || | ||
1288 | !capable(CAP_NET_ADMIN)) | ||
1289 | return -EPERM; | ||
1290 | |||
1291 | if (wol->wolopts & ~WAKE_MAGIC) | ||
1292 | return -EINVAL; | ||
1293 | |||
1294 | card = netdev_card(netdev); | ||
1295 | if (wol->wolopts & WAKE_MAGIC) { | ||
1296 | status = lv1_net_control(bus_id(card), dev_id(card), | ||
1297 | GELIC_LV1_SET_WOL, | ||
1298 | GELIC_LV1_WOL_MAGIC_PACKET, | ||
1299 | 0, GELIC_LV1_WOL_MP_ENABLE, | ||
1300 | &v1, &v2); | ||
1301 | if (status) { | ||
1302 | pr_info("%s: enabling WOL failed %d\n", __func__, | ||
1303 | status); | ||
1304 | status = -EIO; | ||
1305 | goto done; | ||
1306 | } | ||
1307 | status = lv1_net_control(bus_id(card), dev_id(card), | ||
1308 | GELIC_LV1_SET_WOL, | ||
1309 | GELIC_LV1_WOL_ADD_MATCH_ADDR, | ||
1310 | 0, GELIC_LV1_WOL_MATCH_ALL, | ||
1311 | &v1, &v2); | ||
1312 | if (!status) | ||
1313 | ps3_sys_manager_set_wol(1); | ||
1314 | else { | ||
1315 | pr_info("%s: enabling WOL filter failed %d\n", | ||
1316 | __func__, status); | ||
1317 | status = -EIO; | ||
1318 | } | ||
1319 | } else { | ||
1320 | status = lv1_net_control(bus_id(card), dev_id(card), | ||
1321 | GELIC_LV1_SET_WOL, | ||
1322 | GELIC_LV1_WOL_MAGIC_PACKET, | ||
1323 | 0, GELIC_LV1_WOL_MP_DISABLE, | ||
1324 | &v1, &v2); | ||
1325 | if (status) { | ||
1326 | pr_info("%s: disabling WOL failed %d\n", __func__, | ||
1327 | status); | ||
1328 | status = -EIO; | ||
1329 | goto done; | ||
1330 | } | ||
1331 | status = lv1_net_control(bus_id(card), dev_id(card), | ||
1332 | GELIC_LV1_SET_WOL, | ||
1333 | GELIC_LV1_WOL_DELETE_MATCH_ADDR, | ||
1334 | 0, GELIC_LV1_WOL_MATCH_ALL, | ||
1335 | &v1, &v2); | ||
1336 | if (!status) | ||
1337 | ps3_sys_manager_set_wol(0); | ||
1338 | else { | ||
1339 | pr_info("%s: removing WOL filter failed %d\n", | ||
1340 | __func__, status); | ||
1341 | status = -EIO; | ||
1342 | } | ||
1343 | } | ||
1344 | done: | ||
1345 | return status; | ||
1346 | } | ||
1347 | |||
1269 | static struct ethtool_ops gelic_ether_ethtool_ops = { | 1348 | static struct ethtool_ops gelic_ether_ethtool_ops = { |
1270 | .get_drvinfo = gelic_net_get_drvinfo, | 1349 | .get_drvinfo = gelic_net_get_drvinfo, |
1271 | .get_settings = gelic_ether_get_settings, | 1350 | .get_settings = gelic_ether_get_settings, |
@@ -1274,6 +1353,8 @@ static struct ethtool_ops gelic_ether_ethtool_ops = { | |||
1274 | .set_tx_csum = ethtool_op_set_tx_csum, | 1353 | .set_tx_csum = ethtool_op_set_tx_csum, |
1275 | .get_rx_csum = gelic_net_get_rx_csum, | 1354 | .get_rx_csum = gelic_net_get_rx_csum, |
1276 | .set_rx_csum = gelic_net_set_rx_csum, | 1355 | .set_rx_csum = gelic_net_set_rx_csum, |
1356 | .get_wol = gelic_net_get_wol, | ||
1357 | .set_wol = gelic_net_set_wol, | ||
1277 | }; | 1358 | }; |
1278 | 1359 | ||
1279 | /** | 1360 | /** |
diff --git a/drivers/net/ps3_gelic_net.h b/drivers/net/ps3_gelic_net.h index 1d39d06797e4..520f143c2c09 100644 --- a/drivers/net/ps3_gelic_net.h +++ b/drivers/net/ps3_gelic_net.h | |||
@@ -182,12 +182,32 @@ enum gelic_lv1_net_control_code { | |||
182 | GELIC_LV1_GET_ETH_PORT_STATUS = 2, | 182 | GELIC_LV1_GET_ETH_PORT_STATUS = 2, |
183 | GELIC_LV1_SET_NEGOTIATION_MODE = 3, | 183 | GELIC_LV1_SET_NEGOTIATION_MODE = 3, |
184 | GELIC_LV1_GET_VLAN_ID = 4, | 184 | GELIC_LV1_GET_VLAN_ID = 4, |
185 | GELIC_LV1_SET_WOL = 5, | ||
185 | GELIC_LV1_GET_CHANNEL = 6, | 186 | GELIC_LV1_GET_CHANNEL = 6, |
186 | GELIC_LV1_POST_WLAN_CMD = 9, | 187 | GELIC_LV1_POST_WLAN_CMD = 9, |
187 | GELIC_LV1_GET_WLAN_CMD_RESULT = 10, | 188 | GELIC_LV1_GET_WLAN_CMD_RESULT = 10, |
188 | GELIC_LV1_GET_WLAN_EVENT = 11 | 189 | GELIC_LV1_GET_WLAN_EVENT = 11 |
189 | }; | 190 | }; |
190 | 191 | ||
192 | /* for GELIC_LV1_SET_WOL */ | ||
193 | enum gelic_lv1_wol_command { | ||
194 | GELIC_LV1_WOL_MAGIC_PACKET = 1, | ||
195 | GELIC_LV1_WOL_ADD_MATCH_ADDR = 6, | ||
196 | GELIC_LV1_WOL_DELETE_MATCH_ADDR = 7, | ||
197 | }; | ||
198 | |||
199 | /* for GELIC_LV1_WOL_MAGIC_PACKET */ | ||
200 | enum gelic_lv1_wol_mp_arg { | ||
201 | GELIC_LV1_WOL_MP_DISABLE = 0, | ||
202 | GELIC_LV1_WOL_MP_ENABLE = 1, | ||
203 | }; | ||
204 | |||
205 | /* for GELIC_LV1_WOL_{ADD,DELETE}_MATCH_ADDR */ | ||
206 | enum gelic_lv1_wol_match_arg { | ||
207 | GELIC_LV1_WOL_MATCH_INDIVIDUAL = 0, | ||
208 | GELIC_LV1_WOL_MATCH_ALL = 1, | ||
209 | }; | ||
210 | |||
191 | /* status returened from GET_ETH_PORT_STATUS */ | 211 | /* status returened from GET_ETH_PORT_STATUS */ |
192 | enum gelic_lv1_ether_port_status { | 212 | enum gelic_lv1_ether_port_status { |
193 | GELIC_LV1_ETHER_LINK_UP = 0x0000000000000001L, | 213 | GELIC_LV1_ETHER_LINK_UP = 0x0000000000000001L, |
diff --git a/drivers/of/base.c b/drivers/of/base.c index 80c9deca5f35..9bd7c4a31253 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -117,6 +117,32 @@ int of_device_is_compatible(const struct device_node *device, | |||
117 | EXPORT_SYMBOL(of_device_is_compatible); | 117 | EXPORT_SYMBOL(of_device_is_compatible); |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * of_device_is_available - check if a device is available for use | ||
121 | * | ||
122 | * @device: Node to check for availability | ||
123 | * | ||
124 | * Returns 1 if the status property is absent or set to "okay" or "ok", | ||
125 | * 0 otherwise | ||
126 | */ | ||
127 | int of_device_is_available(const struct device_node *device) | ||
128 | { | ||
129 | const char *status; | ||
130 | int statlen; | ||
131 | |||
132 | status = of_get_property(device, "status", &statlen); | ||
133 | if (status == NULL) | ||
134 | return 1; | ||
135 | |||
136 | if (statlen > 0) { | ||
137 | if (!strcmp(status, "okay") || !strcmp(status, "ok")) | ||
138 | return 1; | ||
139 | } | ||
140 | |||
141 | return 0; | ||
142 | } | ||
143 | EXPORT_SYMBOL(of_device_is_available); | ||
144 | |||
145 | /** | ||
120 | * of_get_parent - Get a node's parent if any | 146 | * of_get_parent - Get a node's parent if any |
121 | * @node: Node to get parent | 147 | * @node: Node to get parent |
122 | * | 148 | * |
diff --git a/drivers/ps3/ps3-sys-manager.c b/drivers/ps3/ps3-sys-manager.c index d4f6f960dd18..7605453b74fd 100644 --- a/drivers/ps3/ps3-sys-manager.c +++ b/drivers/ps3/ps3-sys-manager.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
25 | 25 | ||
26 | #include <asm/firmware.h> | 26 | #include <asm/firmware.h> |
27 | #include <asm/lv1call.h> | ||
27 | #include <asm/ps3.h> | 28 | #include <asm/ps3.h> |
28 | 29 | ||
29 | #include "vuart.h" | 30 | #include "vuart.h" |
@@ -187,6 +188,7 @@ enum ps3_sys_manager_next_op { | |||
187 | * controller, and bluetooth controller. | 188 | * controller, and bluetooth controller. |
188 | * @PS3_SM_WAKE_RTC: | 189 | * @PS3_SM_WAKE_RTC: |
189 | * @PS3_SM_WAKE_RTC_ERROR: | 190 | * @PS3_SM_WAKE_RTC_ERROR: |
191 | * @PS3_SM_WAKE_W_O_L: Ether or wireless LAN. | ||
190 | * @PS3_SM_WAKE_P_O_R: Power on reset. | 192 | * @PS3_SM_WAKE_P_O_R: Power on reset. |
191 | * | 193 | * |
192 | * Additional wakeup sources when specifying PS3_SM_NEXT_OP_SYS_SHUTDOWN. | 194 | * Additional wakeup sources when specifying PS3_SM_NEXT_OP_SYS_SHUTDOWN. |
@@ -200,10 +202,19 @@ enum ps3_sys_manager_wake_source { | |||
200 | PS3_SM_WAKE_DEFAULT = 0, | 202 | PS3_SM_WAKE_DEFAULT = 0, |
201 | PS3_SM_WAKE_RTC = 0x00000040, | 203 | PS3_SM_WAKE_RTC = 0x00000040, |
202 | PS3_SM_WAKE_RTC_ERROR = 0x00000080, | 204 | PS3_SM_WAKE_RTC_ERROR = 0x00000080, |
205 | PS3_SM_WAKE_W_O_L = 0x00000400, | ||
203 | PS3_SM_WAKE_P_O_R = 0x80000000, | 206 | PS3_SM_WAKE_P_O_R = 0x80000000, |
204 | }; | 207 | }; |
205 | 208 | ||
206 | /** | 209 | /** |
210 | * user_wake_sources - User specified wakeup sources. | ||
211 | * | ||
212 | * Logical OR of enum ps3_sys_manager_wake_source types. | ||
213 | */ | ||
214 | |||
215 | static u32 user_wake_sources = PS3_SM_WAKE_DEFAULT; | ||
216 | |||
217 | /** | ||
207 | * enum ps3_sys_manager_cmd - Command from system manager to guest. | 218 | * enum ps3_sys_manager_cmd - Command from system manager to guest. |
208 | * | 219 | * |
209 | * The guest completes the actions needed, then acks or naks the command via | 220 | * The guest completes the actions needed, then acks or naks the command via |
@@ -581,6 +592,23 @@ fail_id: | |||
581 | return -EIO; | 592 | return -EIO; |
582 | } | 593 | } |
583 | 594 | ||
595 | static void ps3_sys_manager_fin(struct ps3_system_bus_device *dev) | ||
596 | { | ||
597 | ps3_sys_manager_send_request_shutdown(dev); | ||
598 | |||
599 | pr_emerg("System Halted, OK to turn off power\n"); | ||
600 | |||
601 | while (ps3_sys_manager_handle_msg(dev)) { | ||
602 | /* pause until next DEC interrupt */ | ||
603 | lv1_pause(0); | ||
604 | } | ||
605 | |||
606 | while (1) { | ||
607 | /* pause, ignoring DEC interrupt */ | ||
608 | lv1_pause(1); | ||
609 | } | ||
610 | } | ||
611 | |||
584 | /** | 612 | /** |
585 | * ps3_sys_manager_final_power_off - The final platform machine_power_off routine. | 613 | * ps3_sys_manager_final_power_off - The final platform machine_power_off routine. |
586 | * | 614 | * |
@@ -601,13 +629,9 @@ static void ps3_sys_manager_final_power_off(struct ps3_system_bus_device *dev) | |||
601 | ps3_vuart_cancel_async(dev); | 629 | ps3_vuart_cancel_async(dev); |
602 | 630 | ||
603 | ps3_sys_manager_send_next_op(dev, PS3_SM_NEXT_OP_SYS_SHUTDOWN, | 631 | ps3_sys_manager_send_next_op(dev, PS3_SM_NEXT_OP_SYS_SHUTDOWN, |
604 | PS3_SM_WAKE_DEFAULT); | 632 | user_wake_sources); |
605 | ps3_sys_manager_send_request_shutdown(dev); | ||
606 | |||
607 | pr_emerg("System Halted, OK to turn off power\n"); | ||
608 | 633 | ||
609 | while (1) | 634 | ps3_sys_manager_fin(dev); |
610 | ps3_sys_manager_handle_msg(dev); | ||
611 | } | 635 | } |
612 | 636 | ||
613 | /** | 637 | /** |
@@ -638,14 +662,42 @@ static void ps3_sys_manager_final_restart(struct ps3_system_bus_device *dev) | |||
638 | 662 | ||
639 | ps3_sys_manager_send_attr(dev, 0); | 663 | ps3_sys_manager_send_attr(dev, 0); |
640 | ps3_sys_manager_send_next_op(dev, PS3_SM_NEXT_OP_SYS_REBOOT, | 664 | ps3_sys_manager_send_next_op(dev, PS3_SM_NEXT_OP_SYS_REBOOT, |
641 | PS3_SM_WAKE_DEFAULT); | 665 | user_wake_sources); |
642 | ps3_sys_manager_send_request_shutdown(dev); | ||
643 | 666 | ||
644 | pr_emerg("System Halted, OK to turn off power\n"); | 667 | ps3_sys_manager_fin(dev); |
668 | } | ||
669 | |||
670 | /** | ||
671 | * ps3_sys_manager_get_wol - Get wake-on-lan setting. | ||
672 | */ | ||
673 | |||
674 | int ps3_sys_manager_get_wol(void) | ||
675 | { | ||
676 | pr_debug("%s:%d\n", __func__, __LINE__); | ||
677 | |||
678 | return (user_wake_sources & PS3_SM_WAKE_W_O_L) != 0; | ||
679 | } | ||
680 | EXPORT_SYMBOL_GPL(ps3_sys_manager_get_wol); | ||
681 | |||
682 | /** | ||
683 | * ps3_sys_manager_set_wol - Set wake-on-lan setting. | ||
684 | */ | ||
685 | |||
686 | void ps3_sys_manager_set_wol(int state) | ||
687 | { | ||
688 | static DEFINE_MUTEX(mutex); | ||
689 | |||
690 | mutex_lock(&mutex); | ||
691 | |||
692 | pr_debug("%s:%d: %d\n", __func__, __LINE__, state); | ||
645 | 693 | ||
646 | while (1) | 694 | if (state) |
647 | ps3_sys_manager_handle_msg(dev); | 695 | user_wake_sources |= PS3_SM_WAKE_W_O_L; |
696 | else | ||
697 | user_wake_sources &= ~PS3_SM_WAKE_W_O_L; | ||
698 | mutex_unlock(&mutex); | ||
648 | } | 699 | } |
700 | EXPORT_SYMBOL_GPL(ps3_sys_manager_set_wol); | ||
649 | 701 | ||
650 | /** | 702 | /** |
651 | * ps3_sys_manager_work - Asynchronous read handler. | 703 | * ps3_sys_manager_work - Asynchronous read handler. |
diff --git a/drivers/ps3/sys-manager-core.c b/drivers/ps3/sys-manager-core.c index 31648f7d9ae1..474225852b63 100644 --- a/drivers/ps3/sys-manager-core.c +++ b/drivers/ps3/sys-manager-core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <asm/lv1call.h> | ||
22 | #include <asm/ps3.h> | 23 | #include <asm/ps3.h> |
23 | 24 | ||
24 | /** | 25 | /** |
@@ -50,10 +51,7 @@ void ps3_sys_manager_power_off(void) | |||
50 | if (ps3_sys_manager_ops.power_off) | 51 | if (ps3_sys_manager_ops.power_off) |
51 | ps3_sys_manager_ops.power_off(ps3_sys_manager_ops.dev); | 52 | ps3_sys_manager_ops.power_off(ps3_sys_manager_ops.dev); |
52 | 53 | ||
53 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); | 54 | ps3_sys_manager_halt(); |
54 | local_irq_disable(); | ||
55 | while (1) | ||
56 | (void)0; | ||
57 | } | 55 | } |
58 | 56 | ||
59 | void ps3_sys_manager_restart(void) | 57 | void ps3_sys_manager_restart(void) |
@@ -61,8 +59,14 @@ void ps3_sys_manager_restart(void) | |||
61 | if (ps3_sys_manager_ops.restart) | 59 | if (ps3_sys_manager_ops.restart) |
62 | ps3_sys_manager_ops.restart(ps3_sys_manager_ops.dev); | 60 | ps3_sys_manager_ops.restart(ps3_sys_manager_ops.dev); |
63 | 61 | ||
64 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); | 62 | ps3_sys_manager_halt(); |
63 | } | ||
64 | |||
65 | void ps3_sys_manager_halt(void) | ||
66 | { | ||
67 | pr_emerg("System Halted, OK to turn off power\n"); | ||
65 | local_irq_disable(); | 68 | local_irq_disable(); |
66 | while (1) | 69 | while (1) |
67 | (void)0; | 70 | lv1_pause(1); |
68 | } | 71 | } |
72 | |||
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index c0e50a461055..8aacfb78deab 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -56,7 +56,9 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, | |||
56 | port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP | 56 | port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP |
57 | | UPF_FIXED_PORT; | 57 | | UPF_FIXED_PORT; |
58 | port->dev = &ofdev->dev; | 58 | port->dev = &ofdev->dev; |
59 | port->custom_divisor = *clk / (16 * (*spd)); | 59 | /* If current-speed was set, then try not to change it. */ |
60 | if (spd) | ||
61 | port->custom_divisor = *clk / (16 * (*spd)); | ||
60 | 62 | ||
61 | return 0; | 63 | return 0; |
62 | } | 64 | } |
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 5f640e542475..7381916dfcbb 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += a.out.h | ||
3 | header-y += auxvec.h | 4 | header-y += auxvec.h |
4 | header-y += ioctls.h | 5 | header-y += ioctls.h |
5 | header-y += mman.h | 6 | header-y += mman.h |
@@ -23,7 +24,6 @@ header-y += sigcontext.h | |||
23 | header-y += statfs.h | 24 | header-y += statfs.h |
24 | header-y += ps3fb.h | 25 | header-y += ps3fb.h |
25 | 26 | ||
26 | unifdef-y += a.out.h | ||
27 | unifdef-y += asm-compat.h | 27 | unifdef-y += asm-compat.h |
28 | unifdef-y += bootx.h | 28 | unifdef-y += bootx.h |
29 | unifdef-y += byteorder.h | 29 | unifdef-y += byteorder.h |
diff --git a/include/asm-powerpc/abs_addr.h b/include/asm-powerpc/abs_addr.h index 4aa220718b19..98324c5a8286 100644 --- a/include/asm-powerpc/abs_addr.h +++ b/include/asm-powerpc/abs_addr.h | |||
@@ -12,10 +12,11 @@ | |||
12 | * 2 of the License, or (at your option) any later version. | 12 | * 2 of the License, or (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/lmb.h> | ||
16 | |||
15 | #include <asm/types.h> | 17 | #include <asm/types.h> |
16 | #include <asm/page.h> | 18 | #include <asm/page.h> |
17 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
18 | #include <asm/lmb.h> | ||
19 | #include <asm/firmware.h> | 20 | #include <asm/firmware.h> |
20 | 21 | ||
21 | struct mschunks_map { | 22 | struct mschunks_map { |
diff --git a/include/asm-powerpc/cputhreads.h b/include/asm-powerpc/cputhreads.h index 8485c28b5f47..fb11b0c459b8 100644 --- a/include/asm-powerpc/cputhreads.h +++ b/include/asm-powerpc/cputhreads.h | |||
@@ -35,7 +35,7 @@ static inline cpumask_t cpu_thread_mask_to_cores(cpumask_t threads) | |||
35 | 35 | ||
36 | res = CPU_MASK_NONE; | 36 | res = CPU_MASK_NONE; |
37 | for (i = 0; i < NR_CPUS; i += threads_per_core) { | 37 | for (i = 0; i < NR_CPUS; i += threads_per_core) { |
38 | cpus_shift_right(tmp, threads_core_mask, i); | 38 | cpus_shift_left(tmp, threads_core_mask, i); |
39 | if (cpus_intersects(threads, tmp)) | 39 | if (cpus_intersects(threads, tmp)) |
40 | cpu_set(i, res); | 40 | cpu_set(i, res); |
41 | } | 41 | } |
diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h index be6c879e8760..f8398ce80372 100644 --- a/include/asm-powerpc/dcr-native.h +++ b/include/asm-powerpc/dcr-native.h | |||
@@ -82,6 +82,19 @@ static inline void __mtdcri(int base_addr, int base_data, int reg, | |||
82 | spin_unlock_irqrestore(&dcr_ind_lock, flags); | 82 | spin_unlock_irqrestore(&dcr_ind_lock, flags); |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void __dcri_clrset(int base_addr, int base_data, int reg, | ||
86 | unsigned clr, unsigned set) | ||
87 | { | ||
88 | unsigned long flags; | ||
89 | unsigned int val; | ||
90 | |||
91 | spin_lock_irqsave(&dcr_ind_lock, flags); | ||
92 | __mtdcr(base_addr, reg); | ||
93 | val = (__mfdcr(base_data) & ~clr) | set; | ||
94 | __mtdcr(base_data, val); | ||
95 | spin_unlock_irqrestore(&dcr_ind_lock, flags); | ||
96 | } | ||
97 | |||
85 | #define mfdcri(base, reg) __mfdcri(DCRN_ ## base ## _CONFIG_ADDR, \ | 98 | #define mfdcri(base, reg) __mfdcri(DCRN_ ## base ## _CONFIG_ADDR, \ |
86 | DCRN_ ## base ## _CONFIG_DATA, \ | 99 | DCRN_ ## base ## _CONFIG_DATA, \ |
87 | reg) | 100 | reg) |
@@ -90,6 +103,10 @@ static inline void __mtdcri(int base_addr, int base_data, int reg, | |||
90 | DCRN_ ## base ## _CONFIG_DATA, \ | 103 | DCRN_ ## base ## _CONFIG_DATA, \ |
91 | reg, data) | 104 | reg, data) |
92 | 105 | ||
106 | #define dcri_clrset(base, reg, clr, set) __dcri_clrset(DCRN_ ## base ## _CONFIG_ADDR, \ | ||
107 | DCRN_ ## base ## _CONFIG_DATA, \ | ||
108 | reg, clr, set) | ||
109 | |||
93 | #endif /* __ASSEMBLY__ */ | 110 | #endif /* __ASSEMBLY__ */ |
94 | #endif /* __KERNEL__ */ | 111 | #endif /* __KERNEL__ */ |
95 | #endif /* _ASM_POWERPC_DCR_NATIVE_H */ | 112 | #endif /* _ASM_POWERPC_DCR_NATIVE_H */ |
diff --git a/include/asm-powerpc/dcr-regs.h b/include/asm-powerpc/dcr-regs.h index 9f1fb98fcdc6..29b0ecef980a 100644 --- a/include/asm-powerpc/dcr-regs.h +++ b/include/asm-powerpc/dcr-regs.h | |||
@@ -68,4 +68,82 @@ | |||
68 | #define SDR0_UART3 0x0123 | 68 | #define SDR0_UART3 0x0123 |
69 | #define SDR0_CUST0 0x4000 | 69 | #define SDR0_CUST0 0x4000 |
70 | 70 | ||
71 | /* | ||
72 | * All those DCR register addresses are offsets from the base address | ||
73 | * for the SRAM0 controller (e.g. 0x20 on 440GX). The base address is | ||
74 | * excluded here and configured in the device tree. | ||
75 | */ | ||
76 | #define DCRN_SRAM0_SB0CR 0x00 | ||
77 | #define DCRN_SRAM0_SB1CR 0x01 | ||
78 | #define DCRN_SRAM0_SB2CR 0x02 | ||
79 | #define DCRN_SRAM0_SB3CR 0x03 | ||
80 | #define SRAM_SBCR_BU_MASK 0x00000180 | ||
81 | #define SRAM_SBCR_BS_64KB 0x00000800 | ||
82 | #define SRAM_SBCR_BU_RO 0x00000080 | ||
83 | #define SRAM_SBCR_BU_RW 0x00000180 | ||
84 | #define DCRN_SRAM0_BEAR 0x04 | ||
85 | #define DCRN_SRAM0_BESR0 0x05 | ||
86 | #define DCRN_SRAM0_BESR1 0x06 | ||
87 | #define DCRN_SRAM0_PMEG 0x07 | ||
88 | #define DCRN_SRAM0_CID 0x08 | ||
89 | #define DCRN_SRAM0_REVID 0x09 | ||
90 | #define DCRN_SRAM0_DPC 0x0a | ||
91 | #define SRAM_DPC_ENABLE 0x80000000 | ||
92 | |||
93 | /* | ||
94 | * All those DCR register addresses are offsets from the base address | ||
95 | * for the SRAM0 controller (e.g. 0x30 on 440GX). The base address is | ||
96 | * excluded here and configured in the device tree. | ||
97 | */ | ||
98 | #define DCRN_L2C0_CFG 0x00 | ||
99 | #define L2C_CFG_L2M 0x80000000 | ||
100 | #define L2C_CFG_ICU 0x40000000 | ||
101 | #define L2C_CFG_DCU 0x20000000 | ||
102 | #define L2C_CFG_DCW_MASK 0x1e000000 | ||
103 | #define L2C_CFG_TPC 0x01000000 | ||
104 | #define L2C_CFG_CPC 0x00800000 | ||
105 | #define L2C_CFG_FRAN 0x00200000 | ||
106 | #define L2C_CFG_SS_MASK 0x00180000 | ||
107 | #define L2C_CFG_SS_256 0x00000000 | ||
108 | #define L2C_CFG_CPIM 0x00040000 | ||
109 | #define L2C_CFG_TPIM 0x00020000 | ||
110 | #define L2C_CFG_LIM 0x00010000 | ||
111 | #define L2C_CFG_PMUX_MASK 0x00007000 | ||
112 | #define L2C_CFG_PMUX_SNP 0x00000000 | ||
113 | #define L2C_CFG_PMUX_IF 0x00001000 | ||
114 | #define L2C_CFG_PMUX_DF 0x00002000 | ||
115 | #define L2C_CFG_PMUX_DS 0x00003000 | ||
116 | #define L2C_CFG_PMIM 0x00000800 | ||
117 | #define L2C_CFG_TPEI 0x00000400 | ||
118 | #define L2C_CFG_CPEI 0x00000200 | ||
119 | #define L2C_CFG_NAM 0x00000100 | ||
120 | #define L2C_CFG_SMCM 0x00000080 | ||
121 | #define L2C_CFG_NBRM 0x00000040 | ||
122 | #define L2C_CFG_RDBW 0x00000008 /* only 460EX/GT */ | ||
123 | #define DCRN_L2C0_CMD 0x01 | ||
124 | #define L2C_CMD_CLR 0x80000000 | ||
125 | #define L2C_CMD_DIAG 0x40000000 | ||
126 | #define L2C_CMD_INV 0x20000000 | ||
127 | #define L2C_CMD_CCP 0x10000000 | ||
128 | #define L2C_CMD_CTE 0x08000000 | ||
129 | #define L2C_CMD_STRC 0x04000000 | ||
130 | #define L2C_CMD_STPC 0x02000000 | ||
131 | #define L2C_CMD_RPMC 0x01000000 | ||
132 | #define L2C_CMD_HCC 0x00800000 | ||
133 | #define DCRN_L2C0_ADDR 0x02 | ||
134 | #define DCRN_L2C0_DATA 0x03 | ||
135 | #define DCRN_L2C0_SR 0x04 | ||
136 | #define L2C_SR_CC 0x80000000 | ||
137 | #define L2C_SR_CPE 0x40000000 | ||
138 | #define L2C_SR_TPE 0x20000000 | ||
139 | #define L2C_SR_LRU 0x10000000 | ||
140 | #define L2C_SR_PCS 0x08000000 | ||
141 | #define DCRN_L2C0_REVID 0x05 | ||
142 | #define DCRN_L2C0_SNP0 0x06 | ||
143 | #define DCRN_L2C0_SNP1 0x07 | ||
144 | #define L2C_SNP_BA_MASK 0xffff0000 | ||
145 | #define L2C_SNP_SSR_MASK 0x0000f000 | ||
146 | #define L2C_SNP_SSR_32G 0x0000f000 | ||
147 | #define L2C_SNP_ESR 0x00000800 | ||
148 | |||
71 | #endif /* __DCR_REGS_H__ */ | 149 | #endif /* __DCR_REGS_H__ */ |
diff --git a/include/asm-powerpc/lmb.h b/include/asm-powerpc/lmb.h index 5d1dc48a0bb8..028184b6a162 100644 --- a/include/asm-powerpc/lmb.h +++ b/include/asm-powerpc/lmb.h | |||
@@ -1,81 +1,15 @@ | |||
1 | #ifndef _ASM_POWERPC_LMB_H | 1 | #ifndef _ASM_POWERPC_LMB_H |
2 | #define _ASM_POWERPC_LMB_H | 2 | #define _ASM_POWERPC_LMB_H |
3 | #ifdef __KERNEL__ | ||
4 | 3 | ||
5 | /* | 4 | #include <asm/udbg.h> |
6 | * Definitions for talking to the Open Firmware PROM on | ||
7 | * Power Macintosh computers. | ||
8 | * | ||
9 | * Copyright (C) 2001 Peter Bergner, IBM Corp. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | 5 | ||
17 | #include <linux/init.h> | 6 | #define LMB_DBG(fmt...) udbg_printf(fmt) |
18 | #include <asm/prom.h> | ||
19 | 7 | ||
20 | #define MAX_LMB_REGIONS 128 | 8 | #ifdef CONFIG_PPC32 |
9 | extern unsigned long __max_low_memory; | ||
10 | #define LMB_REAL_LIMIT __max_low_memory | ||
11 | #else | ||
12 | #define LMB_REAL_LIMIT 0 | ||
13 | #endif | ||
21 | 14 | ||
22 | struct lmb_property { | ||
23 | unsigned long base; | ||
24 | unsigned long size; | ||
25 | }; | ||
26 | |||
27 | struct lmb_region { | ||
28 | unsigned long cnt; | ||
29 | unsigned long size; | ||
30 | struct lmb_property region[MAX_LMB_REGIONS+1]; | ||
31 | }; | ||
32 | |||
33 | struct lmb { | ||
34 | unsigned long debug; | ||
35 | unsigned long rmo_size; | ||
36 | struct lmb_region memory; | ||
37 | struct lmb_region reserved; | ||
38 | }; | ||
39 | |||
40 | extern struct lmb lmb; | ||
41 | |||
42 | extern void __init lmb_init(void); | ||
43 | extern void __init lmb_analyze(void); | ||
44 | extern long __init lmb_add(unsigned long base, unsigned long size); | ||
45 | extern long __init lmb_reserve(unsigned long base, unsigned long size); | ||
46 | extern unsigned long __init lmb_alloc(unsigned long size, unsigned long align); | ||
47 | extern unsigned long __init lmb_alloc_base(unsigned long size, | ||
48 | unsigned long align, unsigned long max_addr); | ||
49 | extern unsigned long __init __lmb_alloc_base(unsigned long size, | ||
50 | unsigned long align, unsigned long max_addr); | ||
51 | extern unsigned long __init lmb_phys_mem_size(void); | ||
52 | extern unsigned long __init lmb_end_of_DRAM(void); | ||
53 | extern void __init lmb_enforce_memory_limit(unsigned long memory_limit); | ||
54 | extern int __init lmb_is_reserved(unsigned long addr); | ||
55 | |||
56 | extern void lmb_dump_all(void); | ||
57 | |||
58 | static inline unsigned long | ||
59 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
60 | { | ||
61 | return type->region[region_nr].size; | ||
62 | } | ||
63 | static inline unsigned long | ||
64 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
65 | { | ||
66 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
67 | } | ||
68 | static inline unsigned long | ||
69 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
70 | { | ||
71 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
72 | } | ||
73 | static inline unsigned long | ||
74 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
75 | { | ||
76 | return lmb_start_pfn(type, region_nr) + | ||
77 | lmb_size_pages(type, region_nr); | ||
78 | } | ||
79 | |||
80 | #endif /* __KERNEL__ */ | ||
81 | #endif /* _ASM_POWERPC_LMB_H */ | 15 | #endif /* _ASM_POWERPC_LMB_H */ |
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 0872ec228c1e..b95386aed50d 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
@@ -68,6 +68,8 @@ struct machdep_calls { | |||
68 | unsigned long vflags, | 68 | unsigned long vflags, |
69 | int psize, int ssize); | 69 | int psize, int ssize); |
70 | long (*hpte_remove)(unsigned long hpte_group); | 70 | long (*hpte_remove)(unsigned long hpte_group); |
71 | void (*hpte_removebolted)(unsigned long ea, | ||
72 | int psize, int ssize); | ||
71 | void (*flush_hash_range)(unsigned long number, int local); | 73 | void (*flush_hash_range)(unsigned long number, int local); |
72 | 74 | ||
73 | /* special for kexec, to be called in real mode, linar mapping is | 75 | /* special for kexec, to be called in real mode, linar mapping is |
diff --git a/include/asm-powerpc/pasemi_dma.h b/include/asm-powerpc/pasemi_dma.h index b4526ff3a50d..19fd7933e2d9 100644 --- a/include/asm-powerpc/pasemi_dma.h +++ b/include/asm-powerpc/pasemi_dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2006 PA Semi, Inc | 2 | * Copyright (C) 2006-2008 PA Semi, Inc |
3 | * | 3 | * |
4 | * Hardware register layout and descriptor formats for the on-board | 4 | * Hardware register layout and descriptor formats for the on-board |
5 | * DMA engine on PA Semi PWRficient. Used by ethernet, function and security | 5 | * DMA engine on PA Semi PWRficient. Used by ethernet, function and security |
@@ -40,6 +40,11 @@ enum { | |||
40 | PAS_DMA_COM_TXSTA = 0x104, /* Transmit Status Register */ | 40 | PAS_DMA_COM_TXSTA = 0x104, /* Transmit Status Register */ |
41 | PAS_DMA_COM_RXCMD = 0x108, /* Receive Command Register */ | 41 | PAS_DMA_COM_RXCMD = 0x108, /* Receive Command Register */ |
42 | PAS_DMA_COM_RXSTA = 0x10c, /* Receive Status Register */ | 42 | PAS_DMA_COM_RXSTA = 0x10c, /* Receive Status Register */ |
43 | PAS_DMA_COM_CFG = 0x114, /* Common config reg */ | ||
44 | PAS_DMA_TXF_SFLG0 = 0x140, /* Set flags */ | ||
45 | PAS_DMA_TXF_SFLG1 = 0x144, /* Set flags */ | ||
46 | PAS_DMA_TXF_CFLG0 = 0x148, /* Set flags */ | ||
47 | PAS_DMA_TXF_CFLG1 = 0x14c, /* Set flags */ | ||
43 | }; | 48 | }; |
44 | 49 | ||
45 | 50 | ||
@@ -123,11 +128,16 @@ enum { | |||
123 | #define PAS_DMA_TXCHAN_TCMDSTA_DA 0x00000100 | 128 | #define PAS_DMA_TXCHAN_TCMDSTA_DA 0x00000100 |
124 | #define PAS_DMA_TXCHAN_CFG(c) (0x304+(c)*_PAS_DMA_TXCHAN_STRIDE) | 129 | #define PAS_DMA_TXCHAN_CFG(c) (0x304+(c)*_PAS_DMA_TXCHAN_STRIDE) |
125 | #define PAS_DMA_TXCHAN_CFG_TY_IFACE 0x00000000 /* Type = interface */ | 130 | #define PAS_DMA_TXCHAN_CFG_TY_IFACE 0x00000000 /* Type = interface */ |
131 | #define PAS_DMA_TXCHAN_CFG_TY_COPY 0x00000001 /* Type = copy only */ | ||
132 | #define PAS_DMA_TXCHAN_CFG_TY_FUNC 0x00000002 /* Type = function */ | ||
133 | #define PAS_DMA_TXCHAN_CFG_TY_XOR 0x00000003 /* Type = xor only */ | ||
126 | #define PAS_DMA_TXCHAN_CFG_TATTR_M 0x0000003c | 134 | #define PAS_DMA_TXCHAN_CFG_TATTR_M 0x0000003c |
127 | #define PAS_DMA_TXCHAN_CFG_TATTR_S 2 | 135 | #define PAS_DMA_TXCHAN_CFG_TATTR_S 2 |
128 | #define PAS_DMA_TXCHAN_CFG_TATTR(x) (((x) << PAS_DMA_TXCHAN_CFG_TATTR_S) & \ | 136 | #define PAS_DMA_TXCHAN_CFG_TATTR(x) (((x) << PAS_DMA_TXCHAN_CFG_TATTR_S) & \ |
129 | PAS_DMA_TXCHAN_CFG_TATTR_M) | 137 | PAS_DMA_TXCHAN_CFG_TATTR_M) |
130 | #define PAS_DMA_TXCHAN_CFG_WT_M 0x000001c0 | 138 | #define PAS_DMA_TXCHAN_CFG_LPDQ 0x00000800 |
139 | #define PAS_DMA_TXCHAN_CFG_LPSQ 0x00000400 | ||
140 | #define PAS_DMA_TXCHAN_CFG_WT_M 0x000003c0 | ||
131 | #define PAS_DMA_TXCHAN_CFG_WT_S 6 | 141 | #define PAS_DMA_TXCHAN_CFG_WT_S 6 |
132 | #define PAS_DMA_TXCHAN_CFG_WT(x) (((x) << PAS_DMA_TXCHAN_CFG_WT_S) & \ | 142 | #define PAS_DMA_TXCHAN_CFG_WT(x) (((x) << PAS_DMA_TXCHAN_CFG_WT_S) & \ |
133 | PAS_DMA_TXCHAN_CFG_WT_M) | 143 | PAS_DMA_TXCHAN_CFG_WT_M) |
@@ -394,11 +404,62 @@ enum { | |||
394 | XCT_COPY_LLEN_M) | 404 | XCT_COPY_LLEN_M) |
395 | #define XCT_COPY_SE 0x0000000000000001ull | 405 | #define XCT_COPY_SE 0x0000000000000001ull |
396 | 406 | ||
407 | /* Function descriptor fields */ | ||
408 | #define XCT_FUN_T 0x8000000000000000ull | ||
409 | #define XCT_FUN_ST 0x4000000000000000ull | ||
410 | #define XCT_FUN_RR_M 0x3000000000000000ull | ||
411 | #define XCT_FUN_RR_NORES 0x0000000000000000ull | ||
412 | #define XCT_FUN_RR_8BRES 0x1000000000000000ull | ||
413 | #define XCT_FUN_RR_24BRES 0x2000000000000000ull | ||
414 | #define XCT_FUN_RR_40BRES 0x3000000000000000ull | ||
415 | #define XCT_FUN_I 0x0800000000000000ull | ||
416 | #define XCT_FUN_O 0x0400000000000000ull | ||
417 | #define XCT_FUN_E 0x0200000000000000ull | ||
418 | #define XCT_FUN_FUN_M 0x01c0000000000000ull | ||
419 | #define XCT_FUN_FUN_S 54 | ||
420 | #define XCT_FUN_FUN(x) ((((long)(x)) << XCT_FUN_FUN_S) & XCT_FUN_FUN_M) | ||
421 | #define XCT_FUN_CRM_M 0x0038000000000000ull | ||
422 | #define XCT_FUN_CRM_NOP 0x0000000000000000ull | ||
423 | #define XCT_FUN_CRM_SIG 0x0008000000000000ull | ||
424 | #define XCT_FUN_LLEN_M 0x0007ffff00000000ull | ||
425 | #define XCT_FUN_LLEN_S 32 | ||
426 | #define XCT_FUN_LLEN(x) ((((long)(x)) << XCT_FUN_LLEN_S) & XCT_FUN_LLEN_M) | ||
427 | #define XCT_FUN_SHL_M 0x00000000f8000000ull | ||
428 | #define XCT_FUN_SHL_S 27 | ||
429 | #define XCT_FUN_SHL(x) ((((long)(x)) << XCT_FUN_SHL_S) & XCT_FUN_SHL_M) | ||
430 | #define XCT_FUN_CHL_M 0x0000000007c00000ull | ||
431 | #define XCT_FUN_HSZ_M 0x00000000003c0000ull | ||
432 | #define XCT_FUN_ALG_M 0x0000000000038000ull | ||
433 | #define XCT_FUN_HP 0x0000000000004000ull | ||
434 | #define XCT_FUN_BCM_M 0x0000000000003800ull | ||
435 | #define XCT_FUN_BCP_M 0x0000000000000600ull | ||
436 | #define XCT_FUN_SIG_M 0x00000000000001f0ull | ||
437 | #define XCT_FUN_SIG_TCP4 0x0000000000000140ull | ||
438 | #define XCT_FUN_SIG_TCP6 0x0000000000000150ull | ||
439 | #define XCT_FUN_SIG_UDP4 0x0000000000000160ull | ||
440 | #define XCT_FUN_SIG_UDP6 0x0000000000000170ull | ||
441 | #define XCT_FUN_A 0x0000000000000008ull | ||
442 | #define XCT_FUN_C 0x0000000000000004ull | ||
443 | #define XCT_FUN_AL2 0x0000000000000002ull | ||
444 | #define XCT_FUN_SE 0x0000000000000001ull | ||
445 | |||
446 | /* Function descriptor 8byte result fields */ | ||
447 | #define XCT_FUNRES_8B_CS_M 0x0000ffff00000000ull | ||
448 | #define XCT_FUNRES_8B_CS_S 32 | ||
449 | #define XCT_FUNRES_8B_CRC_M 0x00000000ffffffffull | ||
450 | #define XCT_FUNRES_8B_CRC_S 0 | ||
451 | |||
397 | /* Control descriptor fields */ | 452 | /* Control descriptor fields */ |
398 | #define CTRL_CMD_T 0x8000000000000000ull | 453 | #define CTRL_CMD_T 0x8000000000000000ull |
399 | #define CTRL_CMD_META_EVT 0x2000000000000000ull | 454 | #define CTRL_CMD_META_EVT 0x2000000000000000ull |
400 | #define CTRL_CMD_O 0x0400000000000000ull | 455 | #define CTRL_CMD_O 0x0400000000000000ull |
401 | #define CTRL_CMD_REG_M 0x000000000000000full | 456 | #define CTRL_CMD_ETYPE_M 0x0038000000000000ull |
457 | #define CTRL_CMD_ETYPE_EXT 0x0000000000000000ull | ||
458 | #define CTRL_CMD_ETYPE_WSET 0x0020000000000000ull | ||
459 | #define CTRL_CMD_ETYPE_WCLR 0x0028000000000000ull | ||
460 | #define CTRL_CMD_ETYPE_SET 0x0030000000000000ull | ||
461 | #define CTRL_CMD_ETYPE_CLR 0x0038000000000000ull | ||
462 | #define CTRL_CMD_REG_M 0x000000000000007full | ||
402 | #define CTRL_CMD_REG_S 0 | 463 | #define CTRL_CMD_REG_S 0 |
403 | #define CTRL_CMD_REG(x) ((((long)(x)) << CTRL_CMD_REG_S) & \ | 464 | #define CTRL_CMD_REG(x) ((((long)(x)) << CTRL_CMD_REG_S) & \ |
404 | CTRL_CMD_REG_M) | 465 | CTRL_CMD_REG_M) |
@@ -461,6 +522,16 @@ extern void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size, | |||
461 | extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, | 522 | extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, |
462 | dma_addr_t *handle); | 523 | dma_addr_t *handle); |
463 | 524 | ||
525 | /* Routines to allocate flags (events) for channel syncronization */ | ||
526 | extern int pasemi_dma_alloc_flag(void); | ||
527 | extern void pasemi_dma_free_flag(int flag); | ||
528 | extern void pasemi_dma_set_flag(int flag); | ||
529 | extern void pasemi_dma_clear_flag(int flag); | ||
530 | |||
531 | /* Routines to allocate function engines */ | ||
532 | extern int pasemi_dma_alloc_fun(void); | ||
533 | extern void pasemi_dma_free_fun(int fun); | ||
534 | |||
464 | /* Initialize the library, must be called before any other functions */ | 535 | /* Initialize the library, must be called before any other functions */ |
465 | extern int pasemi_dma_init(void); | 536 | extern int pasemi_dma_init(void); |
466 | 537 | ||
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 2c79f550272b..bd5b4011c53b 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -420,7 +420,8 @@ extern int icache_44x_need_flush; | |||
420 | #define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED) | 420 | #define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED) |
421 | #define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC) | 421 | #define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC) |
422 | 422 | ||
423 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) | 423 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ |
424 | defined(CONFIG_KPROBES) | ||
424 | /* We want the debuggers to be able to set breakpoints anywhere, so | 425 | /* We want the debuggers to be able to set breakpoints anywhere, so |
425 | * don't write protect the kernel text */ | 426 | * don't write protect the kernel text */ |
426 | #define _PAGE_RAM_TEXT _PAGE_RAM | 427 | #define _PAGE_RAM_TEXT _PAGE_RAM |
diff --git a/include/asm-powerpc/phyp_dump.h b/include/asm-powerpc/phyp_dump.h new file mode 100644 index 000000000000..209a98913d9d --- /dev/null +++ b/include/asm-powerpc/phyp_dump.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Hypervisor-assisted dump | ||
3 | * | ||
4 | * Linas Vepstas, Manish Ahuja 2008 | ||
5 | * Copyright 2008 IBM Corp. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef _PPC64_PHYP_DUMP_H | ||
14 | #define _PPC64_PHYP_DUMP_H | ||
15 | |||
16 | #ifdef CONFIG_PHYP_DUMP | ||
17 | |||
18 | /* The RMR region will be saved for later dumping | ||
19 | * whenever the kernel crashes. Set this to 256MB. */ | ||
20 | #define PHYP_DUMP_RMR_START 0x0 | ||
21 | #define PHYP_DUMP_RMR_END (1UL<<28) | ||
22 | |||
23 | struct phyp_dump { | ||
24 | /* Memory that is reserved during very early boot. */ | ||
25 | unsigned long init_reserve_start; | ||
26 | unsigned long init_reserve_size; | ||
27 | /* Check status during boot if dump supported, active & present*/ | ||
28 | unsigned long phyp_dump_at_boot; | ||
29 | unsigned long phyp_dump_configured; | ||
30 | unsigned long phyp_dump_is_active; | ||
31 | /* store cpu & hpte size */ | ||
32 | unsigned long cpu_state_size; | ||
33 | unsigned long hpte_region_size; | ||
34 | /* previous scratch area values */ | ||
35 | unsigned long reserved_scratch_addr; | ||
36 | unsigned long reserved_scratch_size; | ||
37 | }; | ||
38 | |||
39 | extern struct phyp_dump *phyp_dump_info; | ||
40 | |||
41 | int early_init_dt_scan_phyp_dump(unsigned long node, | ||
42 | const char *uname, int depth, void *data); | ||
43 | |||
44 | #endif /* CONFIG_PHYP_DUMP */ | ||
45 | #endif /* _PPC64_PHYP_DUMP_H */ | ||
diff --git a/include/asm-powerpc/ppc4xx.h b/include/asm-powerpc/ppc4xx.h new file mode 100644 index 000000000000..033039a80c42 --- /dev/null +++ b/include/asm-powerpc/ppc4xx.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * PPC4xx Prototypes and definitions | ||
3 | * | ||
4 | * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de> | ||
5 | * | ||
6 | * This is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_POWERPC_PPC4xx_H__ | ||
14 | #define __ASM_POWERPC_PPC4xx_H__ | ||
15 | |||
16 | extern void ppc4xx_reset_system(char *cmd); | ||
17 | |||
18 | #endif /* __ASM_POWERPC_PPC4xx_H__ */ | ||
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 2b693673eff4..9e8ed6824e15 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -434,8 +434,11 @@ struct ps3_sys_manager_ops { | |||
434 | }; | 434 | }; |
435 | 435 | ||
436 | void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops); | 436 | void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops); |
437 | void ps3_sys_manager_power_off(void); | 437 | void __noreturn ps3_sys_manager_power_off(void); |
438 | void ps3_sys_manager_restart(void); | 438 | void __noreturn ps3_sys_manager_restart(void); |
439 | void __noreturn ps3_sys_manager_halt(void); | ||
440 | int ps3_sys_manager_get_wol(void); | ||
441 | void ps3_sys_manager_set_wol(int state); | ||
439 | 442 | ||
440 | struct ps3_prealloc { | 443 | struct ps3_prealloc { |
441 | const char *name; | 444 | const char *name; |
diff --git a/include/asm-powerpc/sparsemem.h b/include/asm-powerpc/sparsemem.h index e8b493d52b4f..9aea8e9f0bd1 100644 --- a/include/asm-powerpc/sparsemem.h +++ b/include/asm-powerpc/sparsemem.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifdef CONFIG_MEMORY_HOTPLUG | 16 | #ifdef CONFIG_MEMORY_HOTPLUG |
17 | extern void create_section_mapping(unsigned long start, unsigned long end); | 17 | extern void create_section_mapping(unsigned long start, unsigned long end); |
18 | extern int remove_section_mapping(unsigned long start, unsigned long end); | ||
18 | #ifdef CONFIG_NUMA | 19 | #ifdef CONFIG_NUMA |
19 | extern int hot_add_scn_to_nid(unsigned long scn_addr); | 20 | extern int hot_add_scn_to_nid(unsigned long scn_addr); |
20 | #else | 21 | #else |
diff --git a/include/asm-powerpc/string.h b/include/asm-powerpc/string.h index aa40f92c298d..e40010abcaf1 100644 --- a/include/asm-powerpc/string.h +++ b/include/asm-powerpc/string.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #define __HAVE_ARCH_STRNCPY | 7 | #define __HAVE_ARCH_STRNCPY |
8 | #define __HAVE_ARCH_STRLEN | 8 | #define __HAVE_ARCH_STRLEN |
9 | #define __HAVE_ARCH_STRCMP | 9 | #define __HAVE_ARCH_STRCMP |
10 | #define __HAVE_ARCH_STRNCMP | ||
10 | #define __HAVE_ARCH_STRCAT | 11 | #define __HAVE_ARCH_STRCAT |
11 | #define __HAVE_ARCH_MEMSET | 12 | #define __HAVE_ARCH_MEMSET |
12 | #define __HAVE_ARCH_MEMCPY | 13 | #define __HAVE_ARCH_MEMCPY |
@@ -18,6 +19,7 @@ extern char * strcpy(char *,const char *); | |||
18 | extern char * strncpy(char *,const char *, __kernel_size_t); | 19 | extern char * strncpy(char *,const char *, __kernel_size_t); |
19 | extern __kernel_size_t strlen(const char *); | 20 | extern __kernel_size_t strlen(const char *); |
20 | extern int strcmp(const char *,const char *); | 21 | extern int strcmp(const char *,const char *); |
22 | extern int strncmp(const char *, const char *, __kernel_size_t); | ||
21 | extern char * strcat(char *, const char *); | 23 | extern char * strcat(char *, const char *); |
22 | extern void * memset(void *,int,__kernel_size_t); | 24 | extern void * memset(void *,int,__kernel_size_t); |
23 | extern void * memcpy(void *,const void *,__kernel_size_t); | 25 | extern void * memcpy(void *,const void *,__kernel_size_t); |
diff --git a/include/asm-sparc64/lmb.h b/include/asm-sparc64/lmb.h new file mode 100644 index 000000000000..6a352cbcf520 --- /dev/null +++ b/include/asm-sparc64/lmb.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _SPARC64_LMB_H | ||
2 | #define _SPARC64_LMB_H | ||
3 | |||
4 | #include <asm/oplib.h> | ||
5 | |||
6 | #define LMB_DBG(fmt...) prom_printf(fmt) | ||
7 | |||
8 | #define LMB_REAL_LIMIT 0 | ||
9 | |||
10 | #endif /* !(_SPARC64_LMB_H) */ | ||
diff --git a/include/linux/lmb.h b/include/linux/lmb.h new file mode 100644 index 000000000000..632717c6a2ba --- /dev/null +++ b/include/linux/lmb.h | |||
@@ -0,0 +1,83 @@ | |||
1 | #ifndef _LINUX_LMB_H | ||
2 | #define _LINUX_LMB_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* | ||
6 | * Logical memory blocks. | ||
7 | * | ||
8 | * Copyright (C) 2001 Peter Bergner, IBM Corp. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | |||
19 | #define MAX_LMB_REGIONS 128 | ||
20 | |||
21 | struct lmb_property { | ||
22 | u64 base; | ||
23 | u64 size; | ||
24 | }; | ||
25 | |||
26 | struct lmb_region { | ||
27 | unsigned long cnt; | ||
28 | u64 size; | ||
29 | struct lmb_property region[MAX_LMB_REGIONS+1]; | ||
30 | }; | ||
31 | |||
32 | struct lmb { | ||
33 | unsigned long debug; | ||
34 | u64 rmo_size; | ||
35 | struct lmb_region memory; | ||
36 | struct lmb_region reserved; | ||
37 | }; | ||
38 | |||
39 | extern struct lmb lmb; | ||
40 | |||
41 | extern void __init lmb_init(void); | ||
42 | extern void __init lmb_analyze(void); | ||
43 | extern long __init lmb_add(u64 base, u64 size); | ||
44 | extern long __init lmb_reserve(u64 base, u64 size); | ||
45 | extern u64 __init lmb_alloc(u64 size, u64 align); | ||
46 | extern u64 __init lmb_alloc_base(u64 size, | ||
47 | u64, u64 max_addr); | ||
48 | extern u64 __init __lmb_alloc_base(u64 size, | ||
49 | u64 align, u64 max_addr); | ||
50 | extern u64 __init lmb_phys_mem_size(void); | ||
51 | extern u64 __init lmb_end_of_DRAM(void); | ||
52 | extern void __init lmb_enforce_memory_limit(u64 memory_limit); | ||
53 | extern int __init lmb_is_reserved(u64 addr); | ||
54 | |||
55 | extern void lmb_dump_all(void); | ||
56 | |||
57 | static inline u64 | ||
58 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
59 | { | ||
60 | return type->region[region_nr].size; | ||
61 | } | ||
62 | static inline u64 | ||
63 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
64 | { | ||
65 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
66 | } | ||
67 | static inline u64 | ||
68 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
69 | { | ||
70 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
71 | } | ||
72 | static inline u64 | ||
73 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
74 | { | ||
75 | return lmb_start_pfn(type, region_nr) + | ||
76 | lmb_size_pages(type, region_nr); | ||
77 | } | ||
78 | |||
79 | #include <asm/lmb.h> | ||
80 | |||
81 | #endif /* __KERNEL__ */ | ||
82 | |||
83 | #endif /* _LINUX_LMB_H */ | ||
diff --git a/include/linux/of.h b/include/linux/of.h index 6981016dcc25..59a61bdc98b6 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -62,6 +62,7 @@ extern struct property *of_find_property(const struct device_node *np, | |||
62 | int *lenp); | 62 | int *lenp); |
63 | extern int of_device_is_compatible(const struct device_node *device, | 63 | extern int of_device_is_compatible(const struct device_node *device, |
64 | const char *); | 64 | const char *); |
65 | extern int of_device_is_available(const struct device_node *device); | ||
65 | extern const void *of_get_property(const struct device_node *node, | 66 | extern const void *of_get_property(const struct device_node *node, |
66 | const char *name, | 67 | const char *name, |
67 | int *lenp); | 68 | int *lenp); |
diff --git a/lib/Kconfig b/lib/Kconfig index ba3d104994d9..2d53dc092e8b 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
@@ -141,4 +141,7 @@ config HAS_DMA | |||
141 | config CHECK_SIGNATURE | 141 | config CHECK_SIGNATURE |
142 | bool | 142 | bool |
143 | 143 | ||
144 | config HAVE_LMB | ||
145 | boolean | ||
146 | |||
144 | endmenu | 147 | endmenu |
diff --git a/lib/Makefile b/lib/Makefile index 23de261a4c83..61bba16a0a2f 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -70,6 +70,8 @@ obj-$(CONFIG_FAULT_INJECTION) += fault-inject.o | |||
70 | 70 | ||
71 | lib-$(CONFIG_GENERIC_BUG) += bug.o | 71 | lib-$(CONFIG_GENERIC_BUG) += bug.o |
72 | 72 | ||
73 | obj-$(CONFIG_HAVE_LMB) += lmb.o | ||
74 | |||
73 | hostprogs-y := gen_crc32table | 75 | hostprogs-y := gen_crc32table |
74 | clean-files := crc32table.h | 76 | clean-files := crc32table.h |
75 | 77 | ||
diff --git a/arch/powerpc/mm/lmb.c b/lib/lmb.c index 4ce23bcf8a57..3c43b95fef4a 100644 --- a/arch/powerpc/mm/lmb.c +++ b/lib/lmb.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Peter Bergner, IBM Corp. June 2001. | 4 | * Peter Bergner, IBM Corp. June 2001. |
5 | * Copyright (C) 2001 Peter Bergner. | 5 | * Copyright (C) 2001 Peter Bergner. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
9 | * as published by the Free Software Foundation; either version | 9 | * as published by the Free Software Foundation; either version |
@@ -13,19 +13,12 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <asm/types.h> | 16 | #include <linux/lmb.h> |
17 | #include <asm/page.h> | ||
18 | #include <asm/prom.h> | ||
19 | #include <asm/lmb.h> | ||
20 | #ifdef CONFIG_PPC32 | ||
21 | #include "mmu_decl.h" /* for __max_low_memory */ | ||
22 | #endif | ||
23 | 17 | ||
24 | #undef DEBUG | 18 | #undef DEBUG |
25 | 19 | ||
26 | #ifdef DEBUG | 20 | #ifdef DEBUG |
27 | #include <asm/udbg.h> | 21 | #define DBG(fmt...) LMB_DBG(fmt) |
28 | #define DBG(fmt...) udbg_printf(fmt) | ||
29 | #else | 22 | #else |
30 | #define DBG(fmt...) | 23 | #define DBG(fmt...) |
31 | #endif | 24 | #endif |
@@ -41,33 +34,34 @@ void lmb_dump_all(void) | |||
41 | 34 | ||
42 | DBG("lmb_dump_all:\n"); | 35 | DBG("lmb_dump_all:\n"); |
43 | DBG(" memory.cnt = 0x%lx\n", lmb.memory.cnt); | 36 | DBG(" memory.cnt = 0x%lx\n", lmb.memory.cnt); |
44 | DBG(" memory.size = 0x%lx\n", lmb.memory.size); | 37 | DBG(" memory.size = 0x%llx\n", |
38 | (unsigned long long)lmb.memory.size); | ||
45 | for (i=0; i < lmb.memory.cnt ;i++) { | 39 | for (i=0; i < lmb.memory.cnt ;i++) { |
46 | DBG(" memory.region[0x%x].base = 0x%lx\n", | 40 | DBG(" memory.region[0x%x].base = 0x%llx\n", |
47 | i, lmb.memory.region[i].base); | 41 | i, (unsigned long long)lmb.memory.region[i].base); |
48 | DBG(" .size = 0x%lx\n", | 42 | DBG(" .size = 0x%llx\n", |
49 | lmb.memory.region[i].size); | 43 | (unsigned long long)lmb.memory.region[i].size); |
50 | } | 44 | } |
51 | 45 | ||
52 | DBG("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt); | 46 | DBG("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt); |
53 | DBG(" reserved.size = 0x%lx\n", lmb.reserved.size); | 47 | DBG(" reserved.size = 0x%lx\n", lmb.reserved.size); |
54 | for (i=0; i < lmb.reserved.cnt ;i++) { | 48 | for (i=0; i < lmb.reserved.cnt ;i++) { |
55 | DBG(" reserved.region[0x%x].base = 0x%lx\n", | 49 | DBG(" reserved.region[0x%x].base = 0x%llx\n", |
56 | i, lmb.reserved.region[i].base); | 50 | i, (unsigned long long)lmb.reserved.region[i].base); |
57 | DBG(" .size = 0x%lx\n", | 51 | DBG(" .size = 0x%llx\n", |
58 | lmb.reserved.region[i].size); | 52 | (unsigned long long)lmb.reserved.region[i].size); |
59 | } | 53 | } |
60 | #endif /* DEBUG */ | 54 | #endif /* DEBUG */ |
61 | } | 55 | } |
62 | 56 | ||
63 | static unsigned long __init lmb_addrs_overlap(unsigned long base1, | 57 | static unsigned long __init lmb_addrs_overlap(u64 base1, |
64 | unsigned long size1, unsigned long base2, unsigned long size2) | 58 | u64 size1, u64 base2, u64 size2) |
65 | { | 59 | { |
66 | return ((base1 < (base2+size2)) && (base2 < (base1+size1))); | 60 | return ((base1 < (base2+size2)) && (base2 < (base1+size1))); |
67 | } | 61 | } |
68 | 62 | ||
69 | static long __init lmb_addrs_adjacent(unsigned long base1, unsigned long size1, | 63 | static long __init lmb_addrs_adjacent(u64 base1, u64 size1, |
70 | unsigned long base2, unsigned long size2) | 64 | u64 base2, u64 size2) |
71 | { | 65 | { |
72 | if (base2 == base1 + size1) | 66 | if (base2 == base1 + size1) |
73 | return 1; | 67 | return 1; |
@@ -80,10 +74,10 @@ static long __init lmb_addrs_adjacent(unsigned long base1, unsigned long size1, | |||
80 | static long __init lmb_regions_adjacent(struct lmb_region *rgn, | 74 | static long __init lmb_regions_adjacent(struct lmb_region *rgn, |
81 | unsigned long r1, unsigned long r2) | 75 | unsigned long r1, unsigned long r2) |
82 | { | 76 | { |
83 | unsigned long base1 = rgn->region[r1].base; | 77 | u64 base1 = rgn->region[r1].base; |
84 | unsigned long size1 = rgn->region[r1].size; | 78 | u64 size1 = rgn->region[r1].size; |
85 | unsigned long base2 = rgn->region[r2].base; | 79 | u64 base2 = rgn->region[r2].base; |
86 | unsigned long size2 = rgn->region[r2].size; | 80 | u64 size2 = rgn->region[r2].size; |
87 | 81 | ||
88 | return lmb_addrs_adjacent(base1, size1, base2, size2); | 82 | return lmb_addrs_adjacent(base1, size1, base2, size2); |
89 | } | 83 | } |
@@ -135,16 +129,21 @@ void __init lmb_analyze(void) | |||
135 | } | 129 | } |
136 | 130 | ||
137 | /* This routine called with relocation disabled. */ | 131 | /* This routine called with relocation disabled. */ |
138 | static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base, | 132 | static long __init lmb_add_region(struct lmb_region *rgn, u64 base, u64 size) |
139 | unsigned long size) | ||
140 | { | 133 | { |
141 | unsigned long coalesced = 0; | 134 | unsigned long coalesced = 0; |
142 | long adjacent, i; | 135 | long adjacent, i; |
143 | 136 | ||
137 | if ((rgn->cnt == 1) && (rgn->region[0].size == 0)) { | ||
138 | rgn->region[0].base = base; | ||
139 | rgn->region[0].size = size; | ||
140 | return 0; | ||
141 | } | ||
142 | |||
144 | /* First try and coalesce this LMB with another. */ | 143 | /* First try and coalesce this LMB with another. */ |
145 | for (i=0; i < rgn->cnt; i++) { | 144 | for (i=0; i < rgn->cnt; i++) { |
146 | unsigned long rgnbase = rgn->region[i].base; | 145 | u64 rgnbase = rgn->region[i].base; |
147 | unsigned long rgnsize = rgn->region[i].size; | 146 | u64 rgnsize = rgn->region[i].size; |
148 | 147 | ||
149 | if ((rgnbase == base) && (rgnsize == size)) | 148 | if ((rgnbase == base) && (rgnsize == size)) |
150 | /* Already have this region, so we're done */ | 149 | /* Already have this region, so we're done */ |
@@ -185,13 +184,18 @@ static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base, | |||
185 | break; | 184 | break; |
186 | } | 185 | } |
187 | } | 186 | } |
187 | |||
188 | if (base < rgn->region[0].base) { | ||
189 | rgn->region[0].base = base; | ||
190 | rgn->region[0].size = size; | ||
191 | } | ||
188 | rgn->cnt++; | 192 | rgn->cnt++; |
189 | 193 | ||
190 | return 0; | 194 | return 0; |
191 | } | 195 | } |
192 | 196 | ||
193 | /* This routine may be called with relocation disabled. */ | 197 | /* This routine may be called with relocation disabled. */ |
194 | long __init lmb_add(unsigned long base, unsigned long size) | 198 | long __init lmb_add(u64 base, u64 size) |
195 | { | 199 | { |
196 | struct lmb_region *_rgn = &(lmb.memory); | 200 | struct lmb_region *_rgn = &(lmb.memory); |
197 | 201 | ||
@@ -203,7 +207,7 @@ long __init lmb_add(unsigned long base, unsigned long size) | |||
203 | 207 | ||
204 | } | 208 | } |
205 | 209 | ||
206 | long __init lmb_reserve(unsigned long base, unsigned long size) | 210 | long __init lmb_reserve(u64 base, u64 size) |
207 | { | 211 | { |
208 | struct lmb_region *_rgn = &(lmb.reserved); | 212 | struct lmb_region *_rgn = &(lmb.reserved); |
209 | 213 | ||
@@ -212,14 +216,14 @@ long __init lmb_reserve(unsigned long base, unsigned long size) | |||
212 | return lmb_add_region(_rgn, base, size); | 216 | return lmb_add_region(_rgn, base, size); |
213 | } | 217 | } |
214 | 218 | ||
215 | long __init lmb_overlaps_region(struct lmb_region *rgn, unsigned long base, | 219 | long __init lmb_overlaps_region(struct lmb_region *rgn, u64 base, |
216 | unsigned long size) | 220 | u64 size) |
217 | { | 221 | { |
218 | unsigned long i; | 222 | unsigned long i; |
219 | 223 | ||
220 | for (i=0; i < rgn->cnt; i++) { | 224 | for (i=0; i < rgn->cnt; i++) { |
221 | unsigned long rgnbase = rgn->region[i].base; | 225 | u64 rgnbase = rgn->region[i].base; |
222 | unsigned long rgnsize = rgn->region[i].size; | 226 | u64 rgnsize = rgn->region[i].size; |
223 | if ( lmb_addrs_overlap(base,size,rgnbase,rgnsize) ) { | 227 | if ( lmb_addrs_overlap(base,size,rgnbase,rgnsize) ) { |
224 | break; | 228 | break; |
225 | } | 229 | } |
@@ -228,54 +232,61 @@ long __init lmb_overlaps_region(struct lmb_region *rgn, unsigned long base, | |||
228 | return (i < rgn->cnt) ? i : -1; | 232 | return (i < rgn->cnt) ? i : -1; |
229 | } | 233 | } |
230 | 234 | ||
231 | unsigned long __init lmb_alloc(unsigned long size, unsigned long align) | 235 | u64 __init lmb_alloc(u64 size, u64 align) |
232 | { | 236 | { |
233 | return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE); | 237 | return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE); |
234 | } | 238 | } |
235 | 239 | ||
236 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | 240 | u64 __init lmb_alloc_base(u64 size, u64 align, u64 max_addr) |
237 | unsigned long max_addr) | ||
238 | { | 241 | { |
239 | unsigned long alloc; | 242 | u64 alloc; |
240 | 243 | ||
241 | alloc = __lmb_alloc_base(size, align, max_addr); | 244 | alloc = __lmb_alloc_base(size, align, max_addr); |
242 | 245 | ||
243 | if (alloc == 0) | 246 | if (alloc == 0) |
244 | panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", | 247 | panic("ERROR: Failed to allocate 0x%llx bytes below 0x%llx.\n", |
245 | size, max_addr); | 248 | (unsigned long long) size, (unsigned long long) max_addr); |
246 | 249 | ||
247 | return alloc; | 250 | return alloc; |
248 | } | 251 | } |
249 | 252 | ||
250 | unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align, | 253 | static u64 lmb_align_down(u64 addr, u64 size) |
251 | unsigned long max_addr) | 254 | { |
255 | return addr & ~(size - 1); | ||
256 | } | ||
257 | |||
258 | static u64 lmb_align_up(u64 addr, u64 size) | ||
259 | { | ||
260 | return (addr + (size - 1)) & ~(size - 1); | ||
261 | } | ||
262 | |||
263 | u64 __init __lmb_alloc_base(u64 size, u64 align, u64 max_addr) | ||
252 | { | 264 | { |
253 | long i, j; | 265 | long i, j; |
254 | unsigned long base = 0; | 266 | u64 base = 0; |
255 | 267 | ||
256 | BUG_ON(0 == size); | 268 | BUG_ON(0 == size); |
257 | 269 | ||
258 | #ifdef CONFIG_PPC32 | 270 | /* On some platforms, make sure we allocate lowmem */ |
259 | /* On 32-bit, make sure we allocate lowmem */ | ||
260 | if (max_addr == LMB_ALLOC_ANYWHERE) | 271 | if (max_addr == LMB_ALLOC_ANYWHERE) |
261 | max_addr = __max_low_memory; | 272 | max_addr = LMB_REAL_LIMIT; |
262 | #endif | 273 | |
263 | for (i = lmb.memory.cnt-1; i >= 0; i--) { | 274 | for (i = lmb.memory.cnt-1; i >= 0; i--) { |
264 | unsigned long lmbbase = lmb.memory.region[i].base; | 275 | u64 lmbbase = lmb.memory.region[i].base; |
265 | unsigned long lmbsize = lmb.memory.region[i].size; | 276 | u64 lmbsize = lmb.memory.region[i].size; |
266 | 277 | ||
267 | if (max_addr == LMB_ALLOC_ANYWHERE) | 278 | if (max_addr == LMB_ALLOC_ANYWHERE) |
268 | base = _ALIGN_DOWN(lmbbase + lmbsize - size, align); | 279 | base = lmb_align_down(lmbbase + lmbsize - size, align); |
269 | else if (lmbbase < max_addr) { | 280 | else if (lmbbase < max_addr) { |
270 | base = min(lmbbase + lmbsize, max_addr); | 281 | base = min(lmbbase + lmbsize, max_addr); |
271 | base = _ALIGN_DOWN(base - size, align); | 282 | base = lmb_align_down(base - size, align); |
272 | } else | 283 | } else |
273 | continue; | 284 | continue; |
274 | 285 | ||
275 | while ((lmbbase <= base) && | 286 | while ((lmbbase <= base) && |
276 | ((j = lmb_overlaps_region(&lmb.reserved, base, size)) >= 0) ) | 287 | ((j = lmb_overlaps_region(&lmb.reserved, base, size)) >= 0) ) |
277 | base = _ALIGN_DOWN(lmb.reserved.region[j].base - size, | 288 | base = lmb_align_down(lmb.reserved.region[j].base - size, |
278 | align); | 289 | align); |
279 | 290 | ||
280 | if ((base != 0) && (lmbbase <= base)) | 291 | if ((base != 0) && (lmbbase <= base)) |
281 | break; | 292 | break; |
@@ -284,18 +295,19 @@ unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align, | |||
284 | if (i < 0) | 295 | if (i < 0) |
285 | return 0; | 296 | return 0; |
286 | 297 | ||
287 | lmb_add_region(&lmb.reserved, base, size); | 298 | if (lmb_add_region(&lmb.reserved, base, lmb_align_up(size, align)) < 0) |
299 | return 0; | ||
288 | 300 | ||
289 | return base; | 301 | return base; |
290 | } | 302 | } |
291 | 303 | ||
292 | /* You must call lmb_analyze() before this. */ | 304 | /* You must call lmb_analyze() before this. */ |
293 | unsigned long __init lmb_phys_mem_size(void) | 305 | u64 __init lmb_phys_mem_size(void) |
294 | { | 306 | { |
295 | return lmb.memory.size; | 307 | return lmb.memory.size; |
296 | } | 308 | } |
297 | 309 | ||
298 | unsigned long __init lmb_end_of_DRAM(void) | 310 | u64 __init lmb_end_of_DRAM(void) |
299 | { | 311 | { |
300 | int idx = lmb.memory.cnt - 1; | 312 | int idx = lmb.memory.cnt - 1; |
301 | 313 | ||
@@ -303,9 +315,10 @@ unsigned long __init lmb_end_of_DRAM(void) | |||
303 | } | 315 | } |
304 | 316 | ||
305 | /* You must call lmb_analyze() after this. */ | 317 | /* You must call lmb_analyze() after this. */ |
306 | void __init lmb_enforce_memory_limit(unsigned long memory_limit) | 318 | void __init lmb_enforce_memory_limit(u64 memory_limit) |
307 | { | 319 | { |
308 | unsigned long i, limit; | 320 | unsigned long i; |
321 | u64 limit; | ||
309 | struct lmb_property *p; | 322 | struct lmb_property *p; |
310 | 323 | ||
311 | if (! memory_limit) | 324 | if (! memory_limit) |
@@ -343,13 +356,13 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit) | |||
343 | } | 356 | } |
344 | } | 357 | } |
345 | 358 | ||
346 | int __init lmb_is_reserved(unsigned long addr) | 359 | int __init lmb_is_reserved(u64 addr) |
347 | { | 360 | { |
348 | int i; | 361 | int i; |
349 | 362 | ||
350 | for (i = 0; i < lmb.reserved.cnt; i++) { | 363 | for (i = 0; i < lmb.reserved.cnt; i++) { |
351 | unsigned long upper = lmb.reserved.region[i].base + | 364 | u64 upper = lmb.reserved.region[i].base + |
352 | lmb.reserved.region[i].size - 1; | 365 | lmb.reserved.region[i].size - 1; |
353 | if ((addr >= lmb.reserved.region[i].base) && (addr <= upper)) | 366 | if ((addr >= lmb.reserved.region[i].base) && (addr <= upper)) |
354 | return 1; | 367 | return 1; |
355 | } | 368 | } |