diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 01:20:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 01:20:46 -0500 |
commit | 2e6e33bab6e1996a5dec9108fb467b52b841e7a8 (patch) | |
tree | 6b98b15c2fe7899cdeb2453589cdee00f7853492 | |
parent | b7ad6d75028d021362221d9b2db19fcff995c3f8 (diff) | |
parent | b88a0b1d5560cf1959c1565617e460a45c688a08 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
[PATCH] powerpc: Add FSL SEC node to documentation
[PATCH] macintosh: tidy-up driver_register() return values
[PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
[PATCH] powerpc: via-pmu warning fix
[PATCH] macintosh: cleanup the use of i2c headers
[PATCH] powerpc: dont allow old RTC to be selected
[PATCH] powerpc: make powerbook_sleep_grackle static
[PATCH] powerpc: Fix warning in add_memory
[PATCH] powerpc: update mailing list addresses
[PATCH] powerpc: Remove calculation of io hole
[PATCH] powerpc: iseries: Add bootargs to /chosen
[PATCH] powerpc: iseries: Add /system-id, /model and /compatible
[PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
[PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
[PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
[PATCH] powerpc: iseries: mf related cleanups
[PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
[PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
[PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
[PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
...
366 files changed, 6577 insertions, 1472 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index d02c64953dcd..ee551c6ea235 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -1365,6 +1365,78 @@ platforms are moved over to use the flattened-device-tree model. | |||
1365 | }; | 1365 | }; |
1366 | 1366 | ||
1367 | 1367 | ||
1368 | g) Freescale SOC SEC Security Engines | ||
1369 | |||
1370 | Required properties: | ||
1371 | |||
1372 | - device_type : Should be "crypto" | ||
1373 | - model : Model of the device. Should be "SEC1" or "SEC2" | ||
1374 | - compatible : Should be "talitos" | ||
1375 | - reg : Offset and length of the register set for the device | ||
1376 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1377 | field that represents an encoding of the sense and level | ||
1378 | information for the interrupt. This should be encoded based on | ||
1379 | the information in section 2) depending on the type of interrupt | ||
1380 | controller you have. | ||
1381 | - interrupt-parent : the phandle for the interrupt controller that | ||
1382 | services interrupts for this device. | ||
1383 | - num-channels : An integer representing the number of channels | ||
1384 | available. | ||
1385 | - channel-fifo-len : An integer representing the number of | ||
1386 | descriptor pointers each channel fetch fifo can hold. | ||
1387 | - exec-units-mask : The bitmask representing what execution units | ||
1388 | (EUs) are available. It's a single 32 bit cell. EU information | ||
1389 | should be encoded following the SEC's Descriptor Header Dword | ||
1390 | EU_SEL0 field documentation, i.e. as follows: | ||
1391 | |||
1392 | bit 0 = reserved - should be 0 | ||
1393 | bit 1 = set if SEC has the ARC4 EU (AFEU) | ||
1394 | bit 2 = set if SEC has the DES/3DES EU (DEU) | ||
1395 | bit 3 = set if SEC has the message digest EU (MDEU) | ||
1396 | bit 4 = set if SEC has the random number generator EU (RNG) | ||
1397 | bit 5 = set if SEC has the public key EU (PKEU) | ||
1398 | bit 6 = set if SEC has the AES EU (AESU) | ||
1399 | bit 7 = set if SEC has the Kasumi EU (KEU) | ||
1400 | |||
1401 | bits 8 through 31 are reserved for future SEC EUs. | ||
1402 | |||
1403 | - descriptor-types-mask : The bitmask representing what descriptors | ||
1404 | are available. It's a single 32 bit cell. Descriptor type | ||
1405 | information should be encoded following the SEC's Descriptor | ||
1406 | Header Dword DESC_TYPE field documentation, i.e. as follows: | ||
1407 | |||
1408 | bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type | ||
1409 | bit 1 = set if SEC supports the ipsec_esp descriptor type | ||
1410 | bit 2 = set if SEC supports the common_nonsnoop desc. type | ||
1411 | bit 3 = set if SEC supports the 802.11i AES ccmp desc. type | ||
1412 | bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type | ||
1413 | bit 5 = set if SEC supports the srtp descriptor type | ||
1414 | bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type | ||
1415 | bit 7 = set if SEC supports the pkeu_assemble descriptor type | ||
1416 | bit 8 = set if SEC supports the aesu_key_expand_output desc.type | ||
1417 | bit 9 = set if SEC supports the pkeu_ptmul descriptor type | ||
1418 | bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type | ||
1419 | bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type | ||
1420 | |||
1421 | ..and so on and so forth. | ||
1422 | |||
1423 | Example: | ||
1424 | |||
1425 | /* MPC8548E */ | ||
1426 | crypto@30000 { | ||
1427 | device_type = "crypto"; | ||
1428 | model = "SEC2"; | ||
1429 | compatible = "talitos"; | ||
1430 | reg = <30000 10000>; | ||
1431 | interrupts = <1d 3>; | ||
1432 | interrupt-parent = <40000>; | ||
1433 | num-channels = <4>; | ||
1434 | channel-fifo-len = <24>; | ||
1435 | exec-units-mask = <000000fe>; | ||
1436 | descriptor-types-mask = <073f1127>; | ||
1437 | }; | ||
1438 | |||
1439 | |||
1368 | More devices will be defined as this spec matures. | 1440 | More devices will be defined as this spec matures. |
1369 | 1441 | ||
1370 | 1442 | ||
diff --git a/Documentation/powerpc/eeh-pci-error-recovery.txt b/Documentation/powerpc/eeh-pci-error-recovery.txt index 67a11a36270c..3764dd4b12cb 100644 --- a/Documentation/powerpc/eeh-pci-error-recovery.txt +++ b/Documentation/powerpc/eeh-pci-error-recovery.txt | |||
@@ -121,7 +121,7 @@ accomplished. | |||
121 | 121 | ||
122 | EEH must be enabled in the PHB's very early during the boot process, | 122 | EEH must be enabled in the PHB's very early during the boot process, |
123 | and if a PCI slot is hot-plugged. The former is performed by | 123 | and if a PCI slot is hot-plugged. The former is performed by |
124 | eeh_init() in arch/ppc64/kernel/eeh.c, and the later by | 124 | eeh_init() in arch/powerpc/platforms/pseries/eeh.c, and the later by |
125 | drivers/pci/hotplug/pSeries_pci.c calling in to the eeh.c code. | 125 | drivers/pci/hotplug/pSeries_pci.c calling in to the eeh.c code. |
126 | EEH must be enabled before a PCI scan of the device can proceed. | 126 | EEH must be enabled before a PCI scan of the device can proceed. |
127 | Current Power5 hardware will not work unless EEH is enabled; | 127 | Current Power5 hardware will not work unless EEH is enabled; |
@@ -133,7 +133,7 @@ error. Given an arbitrary address, the routine | |||
133 | pci_get_device_by_addr() will find the pci device associated | 133 | pci_get_device_by_addr() will find the pci device associated |
134 | with that address (if any). | 134 | with that address (if any). |
135 | 135 | ||
136 | The default include/asm-ppc64/io.h macros readb(), inb(), insb(), | 136 | The default include/asm-powerpc/io.h macros readb(), inb(), insb(), |
137 | etc. include a check to see if the i/o read returned all-0xff's. | 137 | etc. include a check to see if the i/o read returned all-0xff's. |
138 | If so, these make a call to eeh_dn_check_failure(), which in turn | 138 | If so, these make a call to eeh_dn_check_failure(), which in turn |
139 | asks the firmware if the all-ff's value is the sign of a true EEH | 139 | asks the firmware if the all-ff's value is the sign of a true EEH |
@@ -143,11 +143,12 @@ seen in /proc/ppc64/eeh (subject to change). Normally, almost | |||
143 | all of these occur during boot, when the PCI bus is scanned, where | 143 | all of these occur during boot, when the PCI bus is scanned, where |
144 | a large number of 0xff reads are part of the bus scan procedure. | 144 | a large number of 0xff reads are part of the bus scan procedure. |
145 | 145 | ||
146 | If a frozen slot is detected, code in arch/ppc64/kernel/eeh.c will | 146 | If a frozen slot is detected, code in |
147 | print a stack trace to syslog (/var/log/messages). This stack trace | 147 | arch/powerpc/platforms/pseries/eeh.c will print a stack trace to |
148 | has proven to be very useful to device-driver authors for finding | 148 | syslog (/var/log/messages). This stack trace has proven to be very |
149 | out at what point the EEH error was detected, as the error itself | 149 | useful to device-driver authors for finding out at what point the EEH |
150 | usually occurs slightly beforehand. | 150 | error was detected, as the error itself usually occurs slightly |
151 | beforehand. | ||
151 | 152 | ||
152 | Next, it uses the Linux kernel notifier chain/work queue mechanism to | 153 | Next, it uses the Linux kernel notifier chain/work queue mechanism to |
153 | allow any interested parties to find out about the failure. Device | 154 | allow any interested parties to find out about the failure. Device |
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt index dca75cbda6f8..1e38166f4e54 100644 --- a/Documentation/powerpc/hvcs.txt +++ b/Documentation/powerpc/hvcs.txt | |||
@@ -558,9 +558,9 @@ partitions. | |||
558 | 558 | ||
559 | The proper channel for reporting bugs is either through the Linux OS | 559 | The proper channel for reporting bugs is either through the Linux OS |
560 | distribution company that provided your OS or by posting issues to the | 560 | distribution company that provided your OS or by posting issues to the |
561 | ppc64 development mailing list at: | 561 | PowerPC development mailing list at: |
562 | 562 | ||
563 | linuxppc64-dev@lists.linuxppc.org | 563 | linuxppc-dev@ozlabs.org |
564 | 564 | ||
565 | This request is to provide a documented and searchable public exchange | 565 | This request is to provide a documented and searchable public exchange |
566 | of the problems and solutions surrounding this driver for the benefit of | 566 | of the problems and solutions surrounding this driver for the benefit of |
diff --git a/MAINTAINERS b/MAINTAINERS index dd1351dc32b8..bfd7fbfe90ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -534,7 +534,7 @@ S: Supported | |||
534 | BROADBAND PROCESSOR ARCHITECTURE | 534 | BROADBAND PROCESSOR ARCHITECTURE |
535 | P: Arnd Bergmann | 535 | P: Arnd Bergmann |
536 | M: arnd@arndb.de | 536 | M: arnd@arndb.de |
537 | L: linuxppc64-dev@ozlabs.org | 537 | L: linuxppc-dev@ozlabs.org |
538 | W: http://linuxppc64.org | 538 | W: http://linuxppc64.org |
539 | S: Supported | 539 | S: Supported |
540 | 540 | ||
@@ -1624,7 +1624,7 @@ P: Anton Blanchard | |||
1624 | M: anton@samba.org | 1624 | M: anton@samba.org |
1625 | M: anton@au.ibm.com | 1625 | M: anton@au.ibm.com |
1626 | W: http://linuxppc64.org | 1626 | W: http://linuxppc64.org |
1627 | L: linuxppc64-dev@ozlabs.org | 1627 | L: linuxppc-dev@ozlabs.org |
1628 | S: Supported | 1628 | S: Supported |
1629 | 1629 | ||
1630 | LINUX SECURITY MODULE (LSM) FRAMEWORK | 1630 | LINUX SECURITY MODULE (LSM) FRAMEWORK |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index dfba81719dec..fae42da7468d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -127,6 +127,12 @@ config PPC_83xx | |||
127 | select 83xx | 127 | select 83xx |
128 | select PPC_FPU | 128 | select PPC_FPU |
129 | 129 | ||
130 | config PPC_85xx | ||
131 | bool "Freescale 85xx" | ||
132 | select E500 | ||
133 | select FSL_SOC | ||
134 | select 85xx | ||
135 | |||
130 | config 40x | 136 | config 40x |
131 | bool "AMCC 40x" | 137 | bool "AMCC 40x" |
132 | 138 | ||
@@ -139,8 +145,6 @@ config 8xx | |||
139 | config E200 | 145 | config E200 |
140 | bool "Freescale e200" | 146 | bool "Freescale e200" |
141 | 147 | ||
142 | config E500 | ||
143 | bool "Freescale e500" | ||
144 | endchoice | 148 | endchoice |
145 | 149 | ||
146 | config POWER4_ONLY | 150 | config POWER4_ONLY |
@@ -168,6 +172,13 @@ config 6xx | |||
168 | config 83xx | 172 | config 83xx |
169 | bool | 173 | bool |
170 | 174 | ||
175 | # this is temp to handle compat with arch=ppc | ||
176 | config 85xx | ||
177 | bool | ||
178 | |||
179 | config E500 | ||
180 | bool | ||
181 | |||
171 | config PPC_FPU | 182 | config PPC_FPU |
172 | bool | 183 | bool |
173 | default y if PPC64 | 184 | default y if PPC64 |
@@ -217,6 +228,7 @@ config ALTIVEC | |||
217 | config SPE | 228 | config SPE |
218 | bool "SPE Support" | 229 | bool "SPE Support" |
219 | depends on E200 || E500 | 230 | depends on E200 || E500 |
231 | default y | ||
220 | ---help--- | 232 | ---help--- |
221 | This option enables kernel support for the Signal Processing | 233 | This option enables kernel support for the Signal Processing |
222 | Extensions (SPE) to the PowerPC processor. The kernel currently | 234 | Extensions (SPE) to the PowerPC processor. The kernel currently |
@@ -238,6 +250,21 @@ config PPC_STD_MMU_32 | |||
238 | def_bool y | 250 | def_bool y |
239 | depends on PPC_STD_MMU && PPC32 | 251 | depends on PPC_STD_MMU && PPC32 |
240 | 252 | ||
253 | config VIRT_CPU_ACCOUNTING | ||
254 | bool "Deterministic task and CPU time accounting" | ||
255 | depends on PPC64 | ||
256 | default y | ||
257 | help | ||
258 | Select this option to enable more accurate task and CPU time | ||
259 | accounting. This is done by reading a CPU counter on each | ||
260 | kernel entry and exit and on transitions within the kernel | ||
261 | between system, softirq and hardirq state, so there is a | ||
262 | small performance impact. This also enables accounting of | ||
263 | stolen time on logically-partitioned systems running on | ||
264 | IBM POWER5-based machines. | ||
265 | |||
266 | If in doubt, say Y here. | ||
267 | |||
241 | config SMP | 268 | config SMP |
242 | depends on PPC_STD_MMU | 269 | depends on PPC_STD_MMU |
243 | bool "Symmetric multi-processing support" | 270 | bool "Symmetric multi-processing support" |
@@ -734,13 +761,12 @@ config GENERIC_ISA_DMA | |||
734 | 761 | ||
735 | config PPC_I8259 | 762 | config PPC_I8259 |
736 | bool | 763 | bool |
737 | default y if 85xx | ||
738 | default n | 764 | default n |
739 | 765 | ||
740 | config PPC_INDIRECT_PCI | 766 | config PPC_INDIRECT_PCI |
741 | bool | 767 | bool |
742 | depends on PCI | 768 | depends on PCI |
743 | default y if 40x || 44x || 85xx | 769 | default y if 40x || 44x |
744 | default n | 770 | default n |
745 | 771 | ||
746 | config EISA | 772 | config EISA |
@@ -757,8 +783,8 @@ config MCA | |||
757 | bool | 783 | bool |
758 | 784 | ||
759 | config PCI | 785 | config PCI |
760 | bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) | 786 | bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) |
761 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx | 787 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx |
762 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS | 788 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS |
763 | default PCI_QSPAN if !4xx && !CPM2 && 8xx | 789 | default PCI_QSPAN if !4xx && !CPM2 && 8xx |
764 | help | 790 | help |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 5500ab55d042..a3fc7a23158f 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE) | |||
148 | 148 | ||
149 | CPPFLAGS_vmlinux.lds := -Upowerpc | 149 | CPPFLAGS_vmlinux.lds := -Upowerpc |
150 | 150 | ||
151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage | 151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin |
152 | 152 | ||
153 | .PHONY: $(BOOT_TARGETS) | 153 | .PHONY: $(BOOT_TARGETS) |
154 | 154 | ||
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index eacce9590816..b002bfd56786 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh | |||
@@ -1,7 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # arch/ppc64/boot/install.sh | ||
4 | # | ||
5 | # This file is subject to the terms and conditions of the GNU General Public | 3 | # This file is subject to the terms and conditions of the GNU General Public |
6 | # License. See the file "COPYING" in the main directory of this archive | 4 | # License. See the file "COPYING" in the main directory of this archive |
7 | # for more details. | 5 | # for more details. |
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 55ec59867250..816446f0e497 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr) | |||
152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + | 152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + |
153 | (unsigned long)elf64->e_phoff); | 153 | (unsigned long)elf64->e_phoff); |
154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) | 154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) |
155 | if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) | 155 | if (elf64ph->p_type == PT_LOAD) |
156 | break; | 156 | break; |
157 | if (i >= (unsigned int)elf64->e_phnum) | 157 | if (i >= (unsigned int)elf64->e_phnum) |
158 | return 0; | 158 | return 0; |
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr) | |||
193 | elf32 = (Elf32_Ehdr *)elfheader; | 193 | elf32 = (Elf32_Ehdr *)elfheader; |
194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); | 194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); |
195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) | 195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) |
196 | if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0) | 196 | if (elf32ph->p_type == PT_LOAD) |
197 | break; | 197 | break; |
198 | if (i >= elf32->e_phnum) | 198 | if (i >= elf32->e_phnum) |
199 | return 0; | 199 | return 0; |
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig new file mode 100644 index 000000000000..2a8290ee15c6 --- /dev/null +++ b/arch/powerpc/configs/mpc8540_ads_defconfig | |||
@@ -0,0 +1,721 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: | ||
4 | # Sat Jan 14 15:57:54 2006 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | CONFIG_PPC32=y | ||
8 | CONFIG_PPC_MERGE=y | ||
9 | CONFIG_MMU=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
13 | CONFIG_PPC=y | ||
14 | CONFIG_EARLY_PRINTK=y | ||
15 | CONFIG_GENERIC_NVRAM=y | ||
16 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
17 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
18 | CONFIG_PPC_OF=y | ||
19 | CONFIG_PPC_UDBG_16550=y | ||
20 | # CONFIG_GENERIC_TBSYNC is not set | ||
21 | |||
22 | # | ||
23 | # Processor support | ||
24 | # | ||
25 | # CONFIG_CLASSIC32 is not set | ||
26 | # CONFIG_PPC_52xx is not set | ||
27 | # CONFIG_PPC_82xx is not set | ||
28 | # CONFIG_PPC_83xx is not set | ||
29 | CONFIG_PPC_85xx=y | ||
30 | # CONFIG_40x is not set | ||
31 | # CONFIG_44x is not set | ||
32 | # CONFIG_8xx is not set | ||
33 | # CONFIG_E200 is not set | ||
34 | CONFIG_85xx=y | ||
35 | CONFIG_E500=y | ||
36 | CONFIG_BOOKE=y | ||
37 | CONFIG_FSL_BOOKE=y | ||
38 | # CONFIG_PHYS_64BIT is not set | ||
39 | CONFIG_SPE=y | ||
40 | |||
41 | # | ||
42 | # Code maturity level options | ||
43 | # | ||
44 | CONFIG_EXPERIMENTAL=y | ||
45 | CONFIG_CLEAN_COMPILE=y | ||
46 | CONFIG_BROKEN_ON_SMP=y | ||
47 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
48 | |||
49 | # | ||
50 | # General setup | ||
51 | # | ||
52 | CONFIG_LOCALVERSION="" | ||
53 | CONFIG_LOCALVERSION_AUTO=y | ||
54 | CONFIG_SWAP=y | ||
55 | CONFIG_SYSVIPC=y | ||
56 | # CONFIG_POSIX_MQUEUE is not set | ||
57 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
58 | CONFIG_SYSCTL=y | ||
59 | # CONFIG_AUDIT is not set | ||
60 | # CONFIG_IKCONFIG is not set | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
63 | CONFIG_EMBEDDED=y | ||
64 | CONFIG_KALLSYMS=y | ||
65 | # CONFIG_KALLSYMS_ALL is not set | ||
66 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
67 | CONFIG_HOTPLUG=y | ||
68 | CONFIG_PRINTK=y | ||
69 | CONFIG_BUG=y | ||
70 | CONFIG_ELF_CORE=y | ||
71 | CONFIG_BASE_FULL=y | ||
72 | CONFIG_FUTEX=y | ||
73 | CONFIG_EPOLL=y | ||
74 | CONFIG_SHMEM=y | ||
75 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
76 | CONFIG_CC_ALIGN_LABELS=0 | ||
77 | CONFIG_CC_ALIGN_LOOPS=0 | ||
78 | CONFIG_CC_ALIGN_JUMPS=0 | ||
79 | CONFIG_SLAB=y | ||
80 | # CONFIG_TINY_SHMEM is not set | ||
81 | CONFIG_BASE_SMALL=0 | ||
82 | # CONFIG_SLOB is not set | ||
83 | |||
84 | # | ||
85 | # Loadable module support | ||
86 | # | ||
87 | # CONFIG_MODULES is not set | ||
88 | |||
89 | # | ||
90 | # Block layer | ||
91 | # | ||
92 | # CONFIG_LBD is not set | ||
93 | |||
94 | # | ||
95 | # IO Schedulers | ||
96 | # | ||
97 | CONFIG_IOSCHED_NOOP=y | ||
98 | CONFIG_IOSCHED_AS=y | ||
99 | CONFIG_IOSCHED_DEADLINE=y | ||
100 | CONFIG_IOSCHED_CFQ=y | ||
101 | CONFIG_DEFAULT_AS=y | ||
102 | # CONFIG_DEFAULT_DEADLINE is not set | ||
103 | # CONFIG_DEFAULT_CFQ is not set | ||
104 | # CONFIG_DEFAULT_NOOP is not set | ||
105 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
106 | CONFIG_MPIC=y | ||
107 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
108 | |||
109 | # | ||
110 | # Platform support | ||
111 | # | ||
112 | CONFIG_MPC8540_ADS=y | ||
113 | CONFIG_MPC8540=y | ||
114 | CONFIG_PPC_INDIRECT_PCI_BE=y | ||
115 | |||
116 | # | ||
117 | # Kernel options | ||
118 | # | ||
119 | # CONFIG_HIGHMEM is not set | ||
120 | # CONFIG_HZ_100 is not set | ||
121 | CONFIG_HZ_250=y | ||
122 | # CONFIG_HZ_1000 is not set | ||
123 | CONFIG_HZ=250 | ||
124 | CONFIG_PREEMPT_NONE=y | ||
125 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
126 | # CONFIG_PREEMPT is not set | ||
127 | CONFIG_BINFMT_ELF=y | ||
128 | CONFIG_BINFMT_MISC=y | ||
129 | CONFIG_MATH_EMULATION=y | ||
130 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
131 | CONFIG_SELECT_MEMORY_MODEL=y | ||
132 | CONFIG_FLATMEM_MANUAL=y | ||
133 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
134 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
135 | CONFIG_FLATMEM=y | ||
136 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
137 | # CONFIG_SPARSEMEM_STATIC is not set | ||
138 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
139 | CONFIG_PROC_DEVICETREE=y | ||
140 | # CONFIG_CMDLINE_BOOL is not set | ||
141 | # CONFIG_PM is not set | ||
142 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
143 | # CONFIG_SECCOMP is not set | ||
144 | CONFIG_ISA_DMA_API=y | ||
145 | |||
146 | # | ||
147 | # Bus options | ||
148 | # | ||
149 | # CONFIG_PPC_I8259 is not set | ||
150 | CONFIG_PPC_INDIRECT_PCI=y | ||
151 | CONFIG_FSL_SOC=y | ||
152 | # CONFIG_PCI is not set | ||
153 | # CONFIG_PCI_DOMAINS is not set | ||
154 | |||
155 | # | ||
156 | # PCCARD (PCMCIA/CardBus) support | ||
157 | # | ||
158 | # CONFIG_PCCARD is not set | ||
159 | |||
160 | # | ||
161 | # PCI Hotplug Support | ||
162 | # | ||
163 | |||
164 | # | ||
165 | # Advanced setup | ||
166 | # | ||
167 | # CONFIG_ADVANCED_OPTIONS is not set | ||
168 | |||
169 | # | ||
170 | # Default settings for advanced configuration options are used | ||
171 | # | ||
172 | CONFIG_HIGHMEM_START=0xfe000000 | ||
173 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
174 | CONFIG_KERNEL_START=0xc0000000 | ||
175 | CONFIG_TASK_SIZE=0x80000000 | ||
176 | CONFIG_BOOT_LOAD=0x00800000 | ||
177 | |||
178 | # | ||
179 | # Networking | ||
180 | # | ||
181 | CONFIG_NET=y | ||
182 | |||
183 | # | ||
184 | # Networking options | ||
185 | # | ||
186 | CONFIG_PACKET=y | ||
187 | # CONFIG_PACKET_MMAP is not set | ||
188 | CONFIG_UNIX=y | ||
189 | # CONFIG_NET_KEY is not set | ||
190 | CONFIG_INET=y | ||
191 | CONFIG_IP_MULTICAST=y | ||
192 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
193 | CONFIG_IP_FIB_HASH=y | ||
194 | CONFIG_IP_PNP=y | ||
195 | CONFIG_IP_PNP_DHCP=y | ||
196 | CONFIG_IP_PNP_BOOTP=y | ||
197 | # CONFIG_IP_PNP_RARP is not set | ||
198 | # CONFIG_NET_IPIP is not set | ||
199 | # CONFIG_NET_IPGRE is not set | ||
200 | # CONFIG_IP_MROUTE is not set | ||
201 | # CONFIG_ARPD is not set | ||
202 | CONFIG_SYN_COOKIES=y | ||
203 | # CONFIG_INET_AH is not set | ||
204 | # CONFIG_INET_ESP is not set | ||
205 | # CONFIG_INET_IPCOMP is not set | ||
206 | # CONFIG_INET_TUNNEL is not set | ||
207 | CONFIG_INET_DIAG=y | ||
208 | CONFIG_INET_TCP_DIAG=y | ||
209 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
210 | CONFIG_TCP_CONG_BIC=y | ||
211 | # CONFIG_IPV6 is not set | ||
212 | # CONFIG_NETFILTER is not set | ||
213 | |||
214 | # | ||
215 | # DCCP Configuration (EXPERIMENTAL) | ||
216 | # | ||
217 | # CONFIG_IP_DCCP is not set | ||
218 | |||
219 | # | ||
220 | # SCTP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_SCTP is not set | ||
223 | # CONFIG_ATM is not set | ||
224 | # CONFIG_BRIDGE is not set | ||
225 | # CONFIG_VLAN_8021Q is not set | ||
226 | # CONFIG_DECNET is not set | ||
227 | # CONFIG_LLC2 is not set | ||
228 | # CONFIG_IPX is not set | ||
229 | # CONFIG_ATALK is not set | ||
230 | # CONFIG_X25 is not set | ||
231 | # CONFIG_LAPB is not set | ||
232 | |||
233 | # | ||
234 | # TIPC Configuration (EXPERIMENTAL) | ||
235 | # | ||
236 | # CONFIG_TIPC is not set | ||
237 | # CONFIG_NET_DIVERT is not set | ||
238 | # CONFIG_ECONET is not set | ||
239 | # CONFIG_WAN_ROUTER is not set | ||
240 | |||
241 | # | ||
242 | # QoS and/or fair queueing | ||
243 | # | ||
244 | # CONFIG_NET_SCHED is not set | ||
245 | |||
246 | # | ||
247 | # Network testing | ||
248 | # | ||
249 | # CONFIG_NET_PKTGEN is not set | ||
250 | # CONFIG_HAMRADIO is not set | ||
251 | # CONFIG_IRDA is not set | ||
252 | # CONFIG_BT is not set | ||
253 | # CONFIG_IEEE80211 is not set | ||
254 | |||
255 | # | ||
256 | # Device Drivers | ||
257 | # | ||
258 | |||
259 | # | ||
260 | # Generic Driver Options | ||
261 | # | ||
262 | CONFIG_STANDALONE=y | ||
263 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
264 | # CONFIG_FW_LOADER is not set | ||
265 | # CONFIG_DEBUG_DRIVER is not set | ||
266 | |||
267 | # | ||
268 | # Connector - unified userspace <-> kernelspace linker | ||
269 | # | ||
270 | # CONFIG_CONNECTOR is not set | ||
271 | |||
272 | # | ||
273 | # Memory Technology Devices (MTD) | ||
274 | # | ||
275 | # CONFIG_MTD is not set | ||
276 | |||
277 | # | ||
278 | # Parallel port support | ||
279 | # | ||
280 | # CONFIG_PARPORT is not set | ||
281 | |||
282 | # | ||
283 | # Plug and Play support | ||
284 | # | ||
285 | |||
286 | # | ||
287 | # Block devices | ||
288 | # | ||
289 | # CONFIG_BLK_DEV_FD is not set | ||
290 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
291 | CONFIG_BLK_DEV_LOOP=y | ||
292 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
293 | # CONFIG_BLK_DEV_NBD is not set | ||
294 | CONFIG_BLK_DEV_RAM=y | ||
295 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
296 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
297 | CONFIG_BLK_DEV_INITRD=y | ||
298 | # CONFIG_CDROM_PKTCDVD is not set | ||
299 | # CONFIG_ATA_OVER_ETH is not set | ||
300 | |||
301 | # | ||
302 | # ATA/ATAPI/MFM/RLL support | ||
303 | # | ||
304 | # CONFIG_IDE is not set | ||
305 | |||
306 | # | ||
307 | # SCSI device support | ||
308 | # | ||
309 | # CONFIG_RAID_ATTRS is not set | ||
310 | # CONFIG_SCSI is not set | ||
311 | |||
312 | # | ||
313 | # Multi-device support (RAID and LVM) | ||
314 | # | ||
315 | # CONFIG_MD is not set | ||
316 | |||
317 | # | ||
318 | # Fusion MPT device support | ||
319 | # | ||
320 | # CONFIG_FUSION is not set | ||
321 | |||
322 | # | ||
323 | # IEEE 1394 (FireWire) support | ||
324 | # | ||
325 | |||
326 | # | ||
327 | # I2O device support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # Macintosh device drivers | ||
332 | # | ||
333 | # CONFIG_WINDFARM is not set | ||
334 | |||
335 | # | ||
336 | # Network device support | ||
337 | # | ||
338 | CONFIG_NETDEVICES=y | ||
339 | # CONFIG_DUMMY is not set | ||
340 | # CONFIG_BONDING is not set | ||
341 | # CONFIG_EQUALIZER is not set | ||
342 | # CONFIG_TUN is not set | ||
343 | |||
344 | # | ||
345 | # PHY device support | ||
346 | # | ||
347 | CONFIG_PHYLIB=y | ||
348 | |||
349 | # | ||
350 | # MII PHY device drivers | ||
351 | # | ||
352 | # CONFIG_MARVELL_PHY is not set | ||
353 | # CONFIG_DAVICOM_PHY is not set | ||
354 | # CONFIG_QSEMI_PHY is not set | ||
355 | # CONFIG_LXT_PHY is not set | ||
356 | # CONFIG_CICADA_PHY is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (10 or 100Mbit) | ||
360 | # | ||
361 | CONFIG_NET_ETHERNET=y | ||
362 | CONFIG_MII=y | ||
363 | |||
364 | # | ||
365 | # Ethernet (1000 Mbit) | ||
366 | # | ||
367 | CONFIG_GIANFAR=y | ||
368 | CONFIG_GFAR_NAPI=y | ||
369 | |||
370 | # | ||
371 | # Ethernet (10000 Mbit) | ||
372 | # | ||
373 | |||
374 | # | ||
375 | # Token Ring devices | ||
376 | # | ||
377 | |||
378 | # | ||
379 | # Wireless LAN (non-hamradio) | ||
380 | # | ||
381 | # CONFIG_NET_RADIO is not set | ||
382 | |||
383 | # | ||
384 | # Wan interfaces | ||
385 | # | ||
386 | # CONFIG_WAN is not set | ||
387 | # CONFIG_PPP is not set | ||
388 | # CONFIG_SLIP is not set | ||
389 | # CONFIG_SHAPER is not set | ||
390 | # CONFIG_NETCONSOLE is not set | ||
391 | # CONFIG_NETPOLL is not set | ||
392 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
393 | |||
394 | # | ||
395 | # ISDN subsystem | ||
396 | # | ||
397 | # CONFIG_ISDN is not set | ||
398 | |||
399 | # | ||
400 | # Telephony Support | ||
401 | # | ||
402 | # CONFIG_PHONE is not set | ||
403 | |||
404 | # | ||
405 | # Input device support | ||
406 | # | ||
407 | CONFIG_INPUT=y | ||
408 | |||
409 | # | ||
410 | # Userland interfaces | ||
411 | # | ||
412 | # CONFIG_INPUT_MOUSEDEV is not set | ||
413 | # CONFIG_INPUT_JOYDEV is not set | ||
414 | # CONFIG_INPUT_TSDEV is not set | ||
415 | # CONFIG_INPUT_EVDEV is not set | ||
416 | # CONFIG_INPUT_EVBUG is not set | ||
417 | |||
418 | # | ||
419 | # Input Device Drivers | ||
420 | # | ||
421 | # CONFIG_INPUT_KEYBOARD is not set | ||
422 | # CONFIG_INPUT_MOUSE is not set | ||
423 | # CONFIG_INPUT_JOYSTICK is not set | ||
424 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
425 | # CONFIG_INPUT_MISC is not set | ||
426 | |||
427 | # | ||
428 | # Hardware I/O ports | ||
429 | # | ||
430 | # CONFIG_SERIO is not set | ||
431 | # CONFIG_GAMEPORT is not set | ||
432 | |||
433 | # | ||
434 | # Character devices | ||
435 | # | ||
436 | # CONFIG_VT is not set | ||
437 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
438 | |||
439 | # | ||
440 | # Serial drivers | ||
441 | # | ||
442 | CONFIG_SERIAL_8250=y | ||
443 | CONFIG_SERIAL_8250_CONSOLE=y | ||
444 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
445 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
446 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
447 | |||
448 | # | ||
449 | # Non-8250 serial port support | ||
450 | # | ||
451 | CONFIG_SERIAL_CORE=y | ||
452 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
453 | CONFIG_UNIX98_PTYS=y | ||
454 | CONFIG_LEGACY_PTYS=y | ||
455 | CONFIG_LEGACY_PTY_COUNT=256 | ||
456 | |||
457 | # | ||
458 | # IPMI | ||
459 | # | ||
460 | # CONFIG_IPMI_HANDLER is not set | ||
461 | |||
462 | # | ||
463 | # Watchdog Cards | ||
464 | # | ||
465 | # CONFIG_WATCHDOG is not set | ||
466 | # CONFIG_NVRAM is not set | ||
467 | CONFIG_GEN_RTC=y | ||
468 | # CONFIG_GEN_RTC_X is not set | ||
469 | # CONFIG_DTLK is not set | ||
470 | # CONFIG_R3964 is not set | ||
471 | |||
472 | # | ||
473 | # Ftape, the floppy tape device driver | ||
474 | # | ||
475 | # CONFIG_AGP is not set | ||
476 | # CONFIG_RAW_DRIVER is not set | ||
477 | |||
478 | # | ||
479 | # TPM devices | ||
480 | # | ||
481 | # CONFIG_TCG_TPM is not set | ||
482 | # CONFIG_TELCLOCK is not set | ||
483 | |||
484 | # | ||
485 | # I2C support | ||
486 | # | ||
487 | # CONFIG_I2C is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | CONFIG_HWMON=y | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Sound | ||
526 | # | ||
527 | # CONFIG_SOUND is not set | ||
528 | |||
529 | # | ||
530 | # USB support | ||
531 | # | ||
532 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
533 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
534 | |||
535 | # | ||
536 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
537 | # | ||
538 | |||
539 | # | ||
540 | # USB Gadget Support | ||
541 | # | ||
542 | # CONFIG_USB_GADGET is not set | ||
543 | |||
544 | # | ||
545 | # MMC/SD Card support | ||
546 | # | ||
547 | # CONFIG_MMC is not set | ||
548 | |||
549 | # | ||
550 | # InfiniBand support | ||
551 | # | ||
552 | |||
553 | # | ||
554 | # SN Devices | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # File systems | ||
559 | # | ||
560 | CONFIG_EXT2_FS=y | ||
561 | # CONFIG_EXT2_FS_XATTR is not set | ||
562 | # CONFIG_EXT2_FS_XIP is not set | ||
563 | CONFIG_EXT3_FS=y | ||
564 | CONFIG_EXT3_FS_XATTR=y | ||
565 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
566 | # CONFIG_EXT3_FS_SECURITY is not set | ||
567 | CONFIG_JBD=y | ||
568 | # CONFIG_JBD_DEBUG is not set | ||
569 | CONFIG_FS_MBCACHE=y | ||
570 | # CONFIG_REISERFS_FS is not set | ||
571 | # CONFIG_JFS_FS is not set | ||
572 | # CONFIG_FS_POSIX_ACL is not set | ||
573 | # CONFIG_XFS_FS is not set | ||
574 | # CONFIG_OCFS2_FS is not set | ||
575 | # CONFIG_MINIX_FS is not set | ||
576 | # CONFIG_ROMFS_FS is not set | ||
577 | CONFIG_INOTIFY=y | ||
578 | # CONFIG_QUOTA is not set | ||
579 | CONFIG_DNOTIFY=y | ||
580 | # CONFIG_AUTOFS_FS is not set | ||
581 | # CONFIG_AUTOFS4_FS is not set | ||
582 | # CONFIG_FUSE_FS is not set | ||
583 | |||
584 | # | ||
585 | # CD-ROM/DVD Filesystems | ||
586 | # | ||
587 | # CONFIG_ISO9660_FS is not set | ||
588 | # CONFIG_UDF_FS is not set | ||
589 | |||
590 | # | ||
591 | # DOS/FAT/NT Filesystems | ||
592 | # | ||
593 | # CONFIG_MSDOS_FS is not set | ||
594 | # CONFIG_VFAT_FS is not set | ||
595 | # CONFIG_NTFS_FS is not set | ||
596 | |||
597 | # | ||
598 | # Pseudo filesystems | ||
599 | # | ||
600 | CONFIG_PROC_FS=y | ||
601 | CONFIG_PROC_KCORE=y | ||
602 | CONFIG_SYSFS=y | ||
603 | CONFIG_TMPFS=y | ||
604 | # CONFIG_HUGETLB_PAGE is not set | ||
605 | CONFIG_RAMFS=y | ||
606 | # CONFIG_RELAYFS_FS is not set | ||
607 | # CONFIG_CONFIGFS_FS is not set | ||
608 | |||
609 | # | ||
610 | # Miscellaneous filesystems | ||
611 | # | ||
612 | # CONFIG_ADFS_FS is not set | ||
613 | # CONFIG_AFFS_FS is not set | ||
614 | # CONFIG_HFS_FS is not set | ||
615 | # CONFIG_HFSPLUS_FS is not set | ||
616 | # CONFIG_BEFS_FS is not set | ||
617 | # CONFIG_BFS_FS is not set | ||
618 | # CONFIG_EFS_FS is not set | ||
619 | # CONFIG_CRAMFS is not set | ||
620 | # CONFIG_VXFS_FS is not set | ||
621 | # CONFIG_HPFS_FS is not set | ||
622 | # CONFIG_QNX4FS_FS is not set | ||
623 | # CONFIG_SYSV_FS is not set | ||
624 | # CONFIG_UFS_FS is not set | ||
625 | |||
626 | # | ||
627 | # Network File Systems | ||
628 | # | ||
629 | CONFIG_NFS_FS=y | ||
630 | # CONFIG_NFS_V3 is not set | ||
631 | # CONFIG_NFS_V4 is not set | ||
632 | # CONFIG_NFS_DIRECTIO is not set | ||
633 | # CONFIG_NFSD is not set | ||
634 | CONFIG_ROOT_NFS=y | ||
635 | CONFIG_LOCKD=y | ||
636 | CONFIG_NFS_COMMON=y | ||
637 | CONFIG_SUNRPC=y | ||
638 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
639 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
640 | # CONFIG_SMB_FS is not set | ||
641 | # CONFIG_CIFS is not set | ||
642 | # CONFIG_NCP_FS is not set | ||
643 | # CONFIG_CODA_FS is not set | ||
644 | # CONFIG_AFS_FS is not set | ||
645 | # CONFIG_9P_FS is not set | ||
646 | |||
647 | # | ||
648 | # Partition Types | ||
649 | # | ||
650 | CONFIG_PARTITION_ADVANCED=y | ||
651 | # CONFIG_ACORN_PARTITION is not set | ||
652 | # CONFIG_OSF_PARTITION is not set | ||
653 | # CONFIG_AMIGA_PARTITION is not set | ||
654 | # CONFIG_ATARI_PARTITION is not set | ||
655 | # CONFIG_MAC_PARTITION is not set | ||
656 | # CONFIG_MSDOS_PARTITION is not set | ||
657 | # CONFIG_LDM_PARTITION is not set | ||
658 | # CONFIG_SGI_PARTITION is not set | ||
659 | # CONFIG_ULTRIX_PARTITION is not set | ||
660 | # CONFIG_SUN_PARTITION is not set | ||
661 | # CONFIG_EFI_PARTITION is not set | ||
662 | |||
663 | # | ||
664 | # Native Language Support | ||
665 | # | ||
666 | # CONFIG_NLS is not set | ||
667 | |||
668 | # | ||
669 | # Library routines | ||
670 | # | ||
671 | # CONFIG_CRC_CCITT is not set | ||
672 | # CONFIG_CRC16 is not set | ||
673 | CONFIG_CRC32=y | ||
674 | # CONFIG_LIBCRC32C is not set | ||
675 | |||
676 | # | ||
677 | # Instrumentation Support | ||
678 | # | ||
679 | # CONFIG_PROFILING is not set | ||
680 | |||
681 | # | ||
682 | # Kernel hacking | ||
683 | # | ||
684 | # CONFIG_PRINTK_TIME is not set | ||
685 | # CONFIG_MAGIC_SYSRQ is not set | ||
686 | CONFIG_DEBUG_KERNEL=y | ||
687 | CONFIG_LOG_BUF_SHIFT=14 | ||
688 | CONFIG_DETECT_SOFTLOCKUP=y | ||
689 | # CONFIG_SCHEDSTATS is not set | ||
690 | # CONFIG_DEBUG_SLAB is not set | ||
691 | CONFIG_DEBUG_MUTEXES=y | ||
692 | # CONFIG_DEBUG_SPINLOCK is not set | ||
693 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
694 | # CONFIG_DEBUG_KOBJECT is not set | ||
695 | # CONFIG_DEBUG_INFO is not set | ||
696 | # CONFIG_DEBUG_FS is not set | ||
697 | # CONFIG_DEBUG_VM is not set | ||
698 | # CONFIG_RCU_TORTURE_TEST is not set | ||
699 | # CONFIG_DEBUGGER is not set | ||
700 | # CONFIG_BDI_SWITCH is not set | ||
701 | # CONFIG_BOOTX_TEXT is not set | ||
702 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | ||
703 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
704 | # CONFIG_PPC_EARLY_DEBUG_RTAS is not set | ||
705 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
706 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
707 | |||
708 | # | ||
709 | # Security options | ||
710 | # | ||
711 | # CONFIG_KEYS is not set | ||
712 | # CONFIG_SECURITY is not set | ||
713 | |||
714 | # | ||
715 | # Cryptographic options | ||
716 | # | ||
717 | # CONFIG_CRYPTO is not set | ||
718 | |||
719 | # | ||
720 | # Hardware crypto devices | ||
721 | # | ||
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index c9a660e4c2db..882889b15926 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -136,6 +136,9 @@ int main(void) | |||
136 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); | 136 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); |
137 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); | 137 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); |
138 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); | 138 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); |
139 | DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr)); | ||
140 | DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); | ||
141 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); | ||
139 | 142 | ||
140 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); | 143 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); |
141 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); | 144 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index e4e81374cb9a..39e348a3ade2 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -894,7 +894,7 @@ struct cpu_spec cpu_specs[] = { | |||
894 | .platform = "ppc405", | 894 | .platform = "ppc405", |
895 | }, | 895 | }, |
896 | { /* Xilinx Virtex-II Pro */ | 896 | { /* Xilinx Virtex-II Pro */ |
897 | .pvr_mask = 0xffff0000, | 897 | .pvr_mask = 0xfffff000, |
898 | .pvr_value = 0x20010000, | 898 | .pvr_value = 0x20010000, |
899 | .cpu_name = "Virtex-II Pro", | 899 | .cpu_name = "Virtex-II Pro", |
900 | .cpu_features = CPU_FTRS_40X, | 900 | .cpu_features = CPU_FTRS_40X, |
@@ -904,6 +904,16 @@ struct cpu_spec cpu_specs[] = { | |||
904 | .dcache_bsize = 32, | 904 | .dcache_bsize = 32, |
905 | .platform = "ppc405", | 905 | .platform = "ppc405", |
906 | }, | 906 | }, |
907 | { /* Xilinx Virtex-4 FX */ | ||
908 | .pvr_mask = 0xfffff000, | ||
909 | .pvr_value = 0x20011000, | ||
910 | .cpu_name = "Virtex-4 FX", | ||
911 | .cpu_features = CPU_FTRS_40X, | ||
912 | .cpu_user_features = PPC_FEATURE_32 | | ||
913 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | ||
914 | .icache_bsize = 32, | ||
915 | .dcache_bsize = 32, | ||
916 | }, | ||
907 | { /* 405EP */ | 917 | { /* 405EP */ |
908 | .pvr_mask = 0xffff0000, | 918 | .pvr_mask = 0xffff0000, |
909 | .pvr_value = 0x51210000, | 919 | .pvr_value = 0x51210000, |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 24be0cf86d7f..1060155d84c3 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/entry.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
@@ -63,6 +61,7 @@ system_call_common: | |||
63 | std r12,_MSR(r1) | 61 | std r12,_MSR(r1) |
64 | std r0,GPR0(r1) | 62 | std r0,GPR0(r1) |
65 | std r10,GPR1(r1) | 63 | std r10,GPR1(r1) |
64 | ACCOUNT_CPU_USER_ENTRY(r10, r11) | ||
66 | std r2,GPR2(r1) | 65 | std r2,GPR2(r1) |
67 | std r3,GPR3(r1) | 66 | std r3,GPR3(r1) |
68 | std r4,GPR4(r1) | 67 | std r4,GPR4(r1) |
@@ -170,8 +169,9 @@ syscall_error_cont: | |||
170 | stdcx. r0,0,r1 /* to clear the reservation */ | 169 | stdcx. r0,0,r1 /* to clear the reservation */ |
171 | andi. r6,r8,MSR_PR | 170 | andi. r6,r8,MSR_PR |
172 | ld r4,_LINK(r1) | 171 | ld r4,_LINK(r1) |
173 | beq- 1f /* only restore r13 if */ | 172 | beq- 1f |
174 | ld r13,GPR13(r1) /* returning to usermode */ | 173 | ACCOUNT_CPU_USER_EXIT(r11, r12) |
174 | ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ | ||
175 | 1: ld r2,GPR2(r1) | 175 | 1: ld r2,GPR2(r1) |
176 | li r12,MSR_RI | 176 | li r12,MSR_RI |
177 | andc r11,r10,r12 | 177 | andc r11,r10,r12 |
@@ -322,7 +322,7 @@ _GLOBAL(ret_from_fork) | |||
322 | * the fork code also. | 322 | * the fork code also. |
323 | * | 323 | * |
324 | * The code which creates the new task context is in 'copy_thread' | 324 | * The code which creates the new task context is in 'copy_thread' |
325 | * in arch/ppc64/kernel/process.c | 325 | * in arch/powerpc/kernel/process.c |
326 | */ | 326 | */ |
327 | .align 7 | 327 | .align 7 |
328 | _GLOBAL(_switch) | 328 | _GLOBAL(_switch) |
@@ -486,6 +486,7 @@ restore: | |||
486 | * userspace | 486 | * userspace |
487 | */ | 487 | */ |
488 | beq 1f | 488 | beq 1f |
489 | ACCOUNT_CPU_USER_EXIT(r3, r4) | ||
489 | REST_GPR(13, r1) | 490 | REST_GPR(13, r1) |
490 | 1: | 491 | 1: |
491 | ld r3,_CTR(r1) | 492 | ld r3,_CTR(r1) |
diff --git a/arch/powerpc/kernel/firmware.c b/arch/powerpc/kernel/firmware.c index 65eae752a527..4d37a3cb80f6 100644 --- a/arch/powerpc/kernel/firmware.c +++ b/arch/powerpc/kernel/firmware.c | |||
@@ -18,28 +18,3 @@ | |||
18 | #include <asm/firmware.h> | 18 | #include <asm/firmware.h> |
19 | 19 | ||
20 | unsigned long ppc64_firmware_features; | 20 | unsigned long ppc64_firmware_features; |
21 | |||
22 | #ifdef CONFIG_PPC_PSERIES | ||
23 | firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = { | ||
24 | {FW_FEATURE_PFT, "hcall-pft"}, | ||
25 | {FW_FEATURE_TCE, "hcall-tce"}, | ||
26 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | ||
27 | {FW_FEATURE_DABR, "hcall-dabr"}, | ||
28 | {FW_FEATURE_COPY, "hcall-copy"}, | ||
29 | {FW_FEATURE_ASR, "hcall-asr"}, | ||
30 | {FW_FEATURE_DEBUG, "hcall-debug"}, | ||
31 | {FW_FEATURE_PERF, "hcall-perf"}, | ||
32 | {FW_FEATURE_DUMP, "hcall-dump"}, | ||
33 | {FW_FEATURE_INTERRUPT, "hcall-interrupt"}, | ||
34 | {FW_FEATURE_MIGRATE, "hcall-migrate"}, | ||
35 | {FW_FEATURE_PERFMON, "hcall-perfmon"}, | ||
36 | {FW_FEATURE_CRQ, "hcall-crq"}, | ||
37 | {FW_FEATURE_VIO, "hcall-vio"}, | ||
38 | {FW_FEATURE_RDMA, "hcall-rdma"}, | ||
39 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | ||
40 | {FW_FEATURE_BULK, "hcall-bulk"}, | ||
41 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | ||
42 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | ||
43 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | ||
44 | }; | ||
45 | #endif | ||
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 8b49679fad54..47c7fa148c9a 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_44x.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 9b65029dd2a3..35084f3a841b 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/head.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
@@ -279,6 +277,7 @@ exception_marker: | |||
279 | std r10,0(r1); /* make stack chain pointer */ \ | 277 | std r10,0(r1); /* make stack chain pointer */ \ |
280 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | 278 | std r0,GPR0(r1); /* save r0 in stackframe */ \ |
281 | std r10,GPR1(r1); /* save r1 in stackframe */ \ | 279 | std r10,GPR1(r1); /* save r1 in stackframe */ \ |
280 | ACCOUNT_CPU_USER_ENTRY(r9, r10); \ | ||
282 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | 281 | std r2,GPR2(r1); /* save r2 in stackframe */ \ |
283 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | 282 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ |
284 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | 283 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ |
@@ -846,6 +845,14 @@ fast_exception_return: | |||
846 | ld r11,_NIP(r1) | 845 | ld r11,_NIP(r1) |
847 | andi. r3,r12,MSR_RI /* check if RI is set */ | 846 | andi. r3,r12,MSR_RI /* check if RI is set */ |
848 | beq- unrecov_fer | 847 | beq- unrecov_fer |
848 | |||
849 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
850 | andi. r3,r12,MSR_PR | ||
851 | beq 2f | ||
852 | ACCOUNT_CPU_USER_EXIT(r3, r4) | ||
853 | 2: | ||
854 | #endif | ||
855 | |||
849 | ld r3,_CCR(r1) | 856 | ld r3,_CCR(r1) |
850 | ld r4,_LINK(r1) | 857 | ld r4,_LINK(r1) |
851 | ld r5,_CTR(r1) | 858 | ld r5,_CTR(r1) |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index bc6d1ac55235..28941f5ce673 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/except_8xx.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h new file mode 100644 index 000000000000..8536e7676160 --- /dev/null +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -0,0 +1,363 @@ | |||
1 | #ifndef __HEAD_BOOKE_H__ | ||
2 | #define __HEAD_BOOKE_H__ | ||
3 | |||
4 | /* | ||
5 | * Macros used for common Book-e exception handling | ||
6 | */ | ||
7 | |||
8 | #define SET_IVOR(vector_number, vector_label) \ | ||
9 | li r26,vector_label@l; \ | ||
10 | mtspr SPRN_IVOR##vector_number,r26; \ | ||
11 | sync | ||
12 | |||
13 | #define NORMAL_EXCEPTION_PROLOG \ | ||
14 | mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ | ||
15 | mtspr SPRN_SPRG1,r11; \ | ||
16 | mtspr SPRN_SPRG4W,r1; \ | ||
17 | mfcr r10; /* save CR in r10 for now */\ | ||
18 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ | ||
19 | andi. r11,r11,MSR_PR; \ | ||
20 | beq 1f; \ | ||
21 | mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ | ||
22 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ | ||
23 | addi r1,r1,THREAD_SIZE; \ | ||
24 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
25 | mr r11,r1; \ | ||
26 | stw r10,_CCR(r11); /* save various registers */\ | ||
27 | stw r12,GPR12(r11); \ | ||
28 | stw r9,GPR9(r11); \ | ||
29 | mfspr r10,SPRN_SPRG0; \ | ||
30 | stw r10,GPR10(r11); \ | ||
31 | mfspr r12,SPRN_SPRG1; \ | ||
32 | stw r12,GPR11(r11); \ | ||
33 | mflr r10; \ | ||
34 | stw r10,_LINK(r11); \ | ||
35 | mfspr r10,SPRN_SPRG4R; \ | ||
36 | mfspr r12,SPRN_SRR0; \ | ||
37 | stw r10,GPR1(r11); \ | ||
38 | mfspr r9,SPRN_SRR1; \ | ||
39 | stw r10,0(r11); \ | ||
40 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
41 | stw r0,GPR0(r11); \ | ||
42 | SAVE_4GPRS(3, r11); \ | ||
43 | SAVE_2GPRS(7, r11) | ||
44 | |||
45 | /* To handle the additional exception priority levels on 40x and Book-E | ||
46 | * processors we allocate a 4k stack per additional priority level. The various | ||
47 | * head_xxx.S files allocate space (exception_stack_top) for each priority's | ||
48 | * stack times the number of CPUs | ||
49 | * | ||
50 | * On 40x critical is the only additional level | ||
51 | * On 44x/e500 we have critical and machine check | ||
52 | * On e200 we have critical and debug (machine check occurs via critical) | ||
53 | * | ||
54 | * Additionally we reserve a SPRG for each priority level so we can free up a | ||
55 | * GPR to use as the base for indirect access to the exception stacks. This | ||
56 | * is necessary since the MMU is always on, for Book-E parts, and the stacks | ||
57 | * are offset from KERNELBASE. | ||
58 | * | ||
59 | */ | ||
60 | #define BOOKE_EXCEPTION_STACK_SIZE (8192) | ||
61 | |||
62 | /* CRIT_SPRG only used in critical exception handling */ | ||
63 | #define CRIT_SPRG SPRN_SPRG2 | ||
64 | /* MCHECK_SPRG only used in machine check exception handling */ | ||
65 | #define MCHECK_SPRG SPRN_SPRG6W | ||
66 | |||
67 | #define MCHECK_STACK_TOP (exception_stack_top - 4096) | ||
68 | #define CRIT_STACK_TOP (exception_stack_top) | ||
69 | |||
70 | /* only on e200 for now */ | ||
71 | #define DEBUG_STACK_TOP (exception_stack_top - 4096) | ||
72 | #define DEBUG_SPRG SPRN_SPRG6W | ||
73 | |||
74 | #ifdef CONFIG_SMP | ||
75 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ | ||
76 | mfspr r8,SPRN_PIR; \ | ||
77 | mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \ | ||
78 | neg r8,r8; \ | ||
79 | addis r8,r8,level##_STACK_TOP@ha; \ | ||
80 | addi r8,r8,level##_STACK_TOP@l | ||
81 | #else | ||
82 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ | ||
83 | lis r8,level##_STACK_TOP@h; \ | ||
84 | ori r8,r8,level##_STACK_TOP@l | ||
85 | #endif | ||
86 | |||
87 | /* | ||
88 | * Exception prolog for critical/machine check exceptions. This is a | ||
89 | * little different from the normal exception prolog above since a | ||
90 | * critical/machine check exception can potentially occur at any point | ||
91 | * during normal exception processing. Thus we cannot use the same SPRG | ||
92 | * registers as the normal prolog above. Instead we use a portion of the | ||
93 | * critical/machine check exception stack at low physical addresses. | ||
94 | */ | ||
95 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ | ||
96 | mtspr exc_level##_SPRG,r8; \ | ||
97 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ | ||
98 | stw r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
99 | stw r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
100 | mfcr r10; /* save CR in r10 for now */\ | ||
101 | mfspr r11,exc_level_srr1; /* check whether user or kernel */\ | ||
102 | andi. r11,r11,MSR_PR; \ | ||
103 | mr r11,r8; \ | ||
104 | mfspr r8,exc_level##_SPRG; \ | ||
105 | beq 1f; \ | ||
106 | /* COMING FROM USER MODE */ \ | ||
107 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | ||
108 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ | ||
109 | addi r11,r11,THREAD_SIZE; \ | ||
110 | 1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
111 | stw r10,_CCR(r11); /* save various registers */\ | ||
112 | stw r12,GPR12(r11); \ | ||
113 | stw r9,GPR9(r11); \ | ||
114 | mflr r10; \ | ||
115 | stw r10,_LINK(r11); \ | ||
116 | mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ | ||
117 | stw r12,_DEAR(r11); /* since they may have had stuff */\ | ||
118 | mfspr r9,SPRN_ESR; /* in them at the point where the */\ | ||
119 | stw r9,_ESR(r11); /* exception was taken */\ | ||
120 | mfspr r12,exc_level_srr0; \ | ||
121 | stw r1,GPR1(r11); \ | ||
122 | mfspr r9,exc_level_srr1; \ | ||
123 | stw r1,0(r11); \ | ||
124 | mr r1,r11; \ | ||
125 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
126 | stw r0,GPR0(r11); \ | ||
127 | SAVE_4GPRS(3, r11); \ | ||
128 | SAVE_2GPRS(7, r11) | ||
129 | |||
130 | #define CRITICAL_EXCEPTION_PROLOG \ | ||
131 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) | ||
132 | #define DEBUG_EXCEPTION_PROLOG \ | ||
133 | EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1) | ||
134 | #define MCHECK_EXCEPTION_PROLOG \ | ||
135 | EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1) | ||
136 | |||
137 | /* | ||
138 | * Exception vectors. | ||
139 | */ | ||
140 | #define START_EXCEPTION(label) \ | ||
141 | .align 5; \ | ||
142 | label: | ||
143 | |||
144 | #define FINISH_EXCEPTION(func) \ | ||
145 | bl transfer_to_handler_full; \ | ||
146 | .long func; \ | ||
147 | .long ret_from_except_full | ||
148 | |||
149 | #define EXCEPTION(n, label, hdlr, xfer) \ | ||
150 | START_EXCEPTION(label); \ | ||
151 | NORMAL_EXCEPTION_PROLOG; \ | ||
152 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
153 | xfer(n, hdlr) | ||
154 | |||
155 | #define CRITICAL_EXCEPTION(n, label, hdlr) \ | ||
156 | START_EXCEPTION(label); \ | ||
157 | CRITICAL_EXCEPTION_PROLOG; \ | ||
158 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
159 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | ||
160 | NOCOPY, crit_transfer_to_handler, \ | ||
161 | ret_from_crit_exc) | ||
162 | |||
163 | #define MCHECK_EXCEPTION(n, label, hdlr) \ | ||
164 | START_EXCEPTION(label); \ | ||
165 | MCHECK_EXCEPTION_PROLOG; \ | ||
166 | mfspr r5,SPRN_ESR; \ | ||
167 | stw r5,_ESR(r11); \ | ||
168 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
169 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | ||
170 | NOCOPY, mcheck_transfer_to_handler, \ | ||
171 | ret_from_mcheck_exc) | ||
172 | |||
173 | #define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ | ||
174 | li r10,trap; \ | ||
175 | stw r10,_TRAP(r11); \ | ||
176 | lis r10,msr@h; \ | ||
177 | ori r10,r10,msr@l; \ | ||
178 | copyee(r10, r9); \ | ||
179 | bl tfer; \ | ||
180 | .long hdlr; \ | ||
181 | .long ret | ||
182 | |||
183 | #define COPY_EE(d, s) rlwimi d,s,0,16,16 | ||
184 | #define NOCOPY(d, s) | ||
185 | |||
186 | #define EXC_XFER_STD(n, hdlr) \ | ||
187 | EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ | ||
188 | ret_from_except_full) | ||
189 | |||
190 | #define EXC_XFER_LITE(n, hdlr) \ | ||
191 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ | ||
192 | ret_from_except) | ||
193 | |||
194 | #define EXC_XFER_EE(n, hdlr) \ | ||
195 | EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ | ||
196 | ret_from_except_full) | ||
197 | |||
198 | #define EXC_XFER_EE_LITE(n, hdlr) \ | ||
199 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ | ||
200 | ret_from_except) | ||
201 | |||
202 | /* Check for a single step debug exception while in an exception | ||
203 | * handler before state has been saved. This is to catch the case | ||
204 | * where an instruction that we are trying to single step causes | ||
205 | * an exception (eg ITLB/DTLB miss) and thus the first instruction of | ||
206 | * the exception handler generates a single step debug exception. | ||
207 | * | ||
208 | * If we get a debug trap on the first instruction of an exception handler, | ||
209 | * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is | ||
210 | * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). | ||
211 | * The exception handler was handling a non-critical interrupt, so it will | ||
212 | * save (and later restore) the MSR via SPRN_CSRR1, which will still have | ||
213 | * the MSR_DE bit set. | ||
214 | */ | ||
215 | #ifdef CONFIG_E200 | ||
216 | #define DEBUG_EXCEPTION \ | ||
217 | START_EXCEPTION(Debug); \ | ||
218 | DEBUG_EXCEPTION_PROLOG; \ | ||
219 | \ | ||
220 | /* \ | ||
221 | * If there is a single step or branch-taken exception in an \ | ||
222 | * exception entry sequence, it was probably meant to apply to \ | ||
223 | * the code where the exception occurred (since exception entry \ | ||
224 | * doesn't turn off DE automatically). We simulate the effect \ | ||
225 | * of turning off DE on entry to an exception handler by turning \ | ||
226 | * off DE in the CSRR1 value and clearing the debug status. \ | ||
227 | */ \ | ||
228 | mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ | ||
229 | andis. r10,r10,DBSR_IC@h; \ | ||
230 | beq+ 2f; \ | ||
231 | \ | ||
232 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | ||
233 | ori r10,r10,KERNELBASE@l; \ | ||
234 | cmplw r12,r10; \ | ||
235 | blt+ 2f; /* addr below exception vectors */ \ | ||
236 | \ | ||
237 | lis r10,Debug@h; \ | ||
238 | ori r10,r10,Debug@l; \ | ||
239 | cmplw r12,r10; \ | ||
240 | bgt+ 2f; /* addr above exception vectors */ \ | ||
241 | \ | ||
242 | /* here it looks like we got an inappropriate debug exception. */ \ | ||
243 | 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \ | ||
244 | lis r10,DBSR_IC@h; /* clear the IC event */ \ | ||
245 | mtspr SPRN_DBSR,r10; \ | ||
246 | /* restore state and get out */ \ | ||
247 | lwz r10,_CCR(r11); \ | ||
248 | lwz r0,GPR0(r11); \ | ||
249 | lwz r1,GPR1(r11); \ | ||
250 | mtcrf 0x80,r10; \ | ||
251 | mtspr SPRN_DSRR0,r12; \ | ||
252 | mtspr SPRN_DSRR1,r9; \ | ||
253 | lwz r9,GPR9(r11); \ | ||
254 | lwz r12,GPR12(r11); \ | ||
255 | mtspr DEBUG_SPRG,r8; \ | ||
256 | BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \ | ||
257 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
258 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
259 | mfspr r8,DEBUG_SPRG; \ | ||
260 | \ | ||
261 | RFDI; \ | ||
262 | b .; \ | ||
263 | \ | ||
264 | /* continue normal handling for a critical exception... */ \ | ||
265 | 2: mfspr r4,SPRN_DBSR; \ | ||
266 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
267 | EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) | ||
268 | #else | ||
269 | #define DEBUG_EXCEPTION \ | ||
270 | START_EXCEPTION(Debug); \ | ||
271 | CRITICAL_EXCEPTION_PROLOG; \ | ||
272 | \ | ||
273 | /* \ | ||
274 | * If there is a single step or branch-taken exception in an \ | ||
275 | * exception entry sequence, it was probably meant to apply to \ | ||
276 | * the code where the exception occurred (since exception entry \ | ||
277 | * doesn't turn off DE automatically). We simulate the effect \ | ||
278 | * of turning off DE on entry to an exception handler by turning \ | ||
279 | * off DE in the CSRR1 value and clearing the debug status. \ | ||
280 | */ \ | ||
281 | mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ | ||
282 | andis. r10,r10,DBSR_IC@h; \ | ||
283 | beq+ 2f; \ | ||
284 | \ | ||
285 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | ||
286 | ori r10,r10,KERNELBASE@l; \ | ||
287 | cmplw r12,r10; \ | ||
288 | blt+ 2f; /* addr below exception vectors */ \ | ||
289 | \ | ||
290 | lis r10,Debug@h; \ | ||
291 | ori r10,r10,Debug@l; \ | ||
292 | cmplw r12,r10; \ | ||
293 | bgt+ 2f; /* addr above exception vectors */ \ | ||
294 | \ | ||
295 | /* here it looks like we got an inappropriate debug exception. */ \ | ||
296 | 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CSRR1 value */ \ | ||
297 | lis r10,DBSR_IC@h; /* clear the IC event */ \ | ||
298 | mtspr SPRN_DBSR,r10; \ | ||
299 | /* restore state and get out */ \ | ||
300 | lwz r10,_CCR(r11); \ | ||
301 | lwz r0,GPR0(r11); \ | ||
302 | lwz r1,GPR1(r11); \ | ||
303 | mtcrf 0x80,r10; \ | ||
304 | mtspr SPRN_CSRR0,r12; \ | ||
305 | mtspr SPRN_CSRR1,r9; \ | ||
306 | lwz r9,GPR9(r11); \ | ||
307 | lwz r12,GPR12(r11); \ | ||
308 | mtspr CRIT_SPRG,r8; \ | ||
309 | BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ | ||
310 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
311 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
312 | mfspr r8,CRIT_SPRG; \ | ||
313 | \ | ||
314 | rfci; \ | ||
315 | b .; \ | ||
316 | \ | ||
317 | /* continue normal handling for a critical exception... */ \ | ||
318 | 2: mfspr r4,SPRN_DBSR; \ | ||
319 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
320 | EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) | ||
321 | #endif | ||
322 | |||
323 | #define INSTRUCTION_STORAGE_EXCEPTION \ | ||
324 | START_EXCEPTION(InstructionStorage) \ | ||
325 | NORMAL_EXCEPTION_PROLOG; \ | ||
326 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ | ||
327 | stw r5,_ESR(r11); \ | ||
328 | mr r4,r12; /* Pass SRR0 as arg2 */ \ | ||
329 | li r5,0; /* Pass zero as arg3 */ \ | ||
330 | EXC_XFER_EE_LITE(0x0400, handle_page_fault) | ||
331 | |||
332 | #define ALIGNMENT_EXCEPTION \ | ||
333 | START_EXCEPTION(Alignment) \ | ||
334 | NORMAL_EXCEPTION_PROLOG; \ | ||
335 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ | ||
336 | stw r4,_DEAR(r11); \ | ||
337 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
338 | EXC_XFER_EE(0x0600, alignment_exception) | ||
339 | |||
340 | #define PROGRAM_EXCEPTION \ | ||
341 | START_EXCEPTION(Program) \ | ||
342 | NORMAL_EXCEPTION_PROLOG; \ | ||
343 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ | ||
344 | stw r4,_ESR(r11); \ | ||
345 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
346 | EXC_XFER_STD(0x0700, program_check_exception) | ||
347 | |||
348 | #define DECREMENTER_EXCEPTION \ | ||
349 | START_EXCEPTION(Decrementer) \ | ||
350 | NORMAL_EXCEPTION_PROLOG; \ | ||
351 | lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \ | ||
352 | mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \ | ||
353 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
354 | EXC_XFER_LITE(0x0900, timer_interrupt) | ||
355 | |||
356 | #define FP_UNAVAILABLE_EXCEPTION \ | ||
357 | START_EXCEPTION(FloatingPointUnavailable) \ | ||
358 | NORMAL_EXCEPTION_PROLOG; \ | ||
359 | bne load_up_fpu; /* if from user, just load it up */ \ | ||
360 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
361 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) | ||
362 | |||
363 | #endif /* __HEAD_BOOKE_H__ */ | ||
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 8d60fa99fc4b..dd86bbed7627 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_fsl_booke.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
316 | */ | 314 | */ |
317 | lis r2,DBCR0_IDM@h | 315 | lis r2,DBCR0_IDM@h |
318 | mtspr SPRN_DBCR0,r2 | 316 | mtspr SPRN_DBCR0,r2 |
317 | isync | ||
319 | /* clear any residual debug events */ | 318 | /* clear any residual debug events */ |
320 | li r2,-1 | 319 | li r2,-1 |
321 | mtspr SPRN_DBSR,r2 | 320 | mtspr SPRN_DBSR,r2 |
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu) | |||
1002 | _GLOBAL(abort) | 1001 | _GLOBAL(abort) |
1003 | li r13,0 | 1002 | li r13,0 |
1004 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ | 1003 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ |
1004 | isync | ||
1005 | mfmsr r13 | 1005 | mfmsr r13 |
1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ | 1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ |
1007 | mtmsr r13 | 1007 | mtmsr r13 |
1008 | isync | ||
1008 | mfspr r13,SPRN_DBCR0 | 1009 | mfspr r13,SPRN_DBCR0 |
1009 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h | 1010 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h |
1010 | mtspr SPRN_DBCR0,r13 | 1011 | mtspr SPRN_DBCR0,r13 |
1012 | isync | ||
1011 | 1013 | ||
1012 | _GLOBAL(set_context) | 1014 | _GLOBAL(set_context) |
1013 | 1015 | ||
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 6160c8dbb7c5..fd8214caedee 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/iomap.c | ||
3 | * | ||
4 | * ppc64 "iomap" interface implementation. | 2 | * ppc64 "iomap" interface implementation. |
5 | * | 3 | * |
6 | * (C) Copyright 2004 Linus Torvalds | 4 | * (C) Copyright 2004 Linus Torvalds |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 946f3219fd29..d9a7fdef59b9 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/iommu.c | ||
3 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
4 | * | 3 | * |
5 | * Rewrite, cleanup, new allocation schemes, virtual merging: | 4 | * Rewrite, cleanup, new allocation schemes, virtual merging: |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index d1fffce86df9..24dc8117b822 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/irq.c | ||
3 | * | ||
4 | * Derived from arch/i386/kernel/irq.c | 2 | * Derived from arch/i386/kernel/irq.c |
5 | * Copyright (C) 1992 Linus Torvalds | 3 | * Copyright (C) 1992 Linus Torvalds |
6 | * Adapted from arch/i386 by Gary Thomas | 4 | * Adapted from arch/i386 by Gary Thomas |
@@ -371,6 +369,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq) | |||
371 | return NO_IRQ; | 369 | return NO_IRQ; |
372 | 370 | ||
373 | } | 371 | } |
372 | #endif /* CONFIG_PPC64 */ | ||
374 | 373 | ||
375 | #ifdef CONFIG_IRQSTACKS | 374 | #ifdef CONFIG_IRQSTACKS |
376 | struct thread_info *softirq_ctx[NR_CPUS]; | 375 | struct thread_info *softirq_ctx[NR_CPUS]; |
@@ -394,10 +393,24 @@ void irq_ctx_init(void) | |||
394 | } | 393 | } |
395 | } | 394 | } |
396 | 395 | ||
396 | static inline void do_softirq_onstack(void) | ||
397 | { | ||
398 | struct thread_info *curtp, *irqtp; | ||
399 | |||
400 | curtp = current_thread_info(); | ||
401 | irqtp = softirq_ctx[smp_processor_id()]; | ||
402 | irqtp->task = curtp->task; | ||
403 | call_do_softirq(irqtp); | ||
404 | irqtp->task = NULL; | ||
405 | } | ||
406 | |||
407 | #else | ||
408 | #define do_softirq_onstack() __do_softirq() | ||
409 | #endif /* CONFIG_IRQSTACKS */ | ||
410 | |||
397 | void do_softirq(void) | 411 | void do_softirq(void) |
398 | { | 412 | { |
399 | unsigned long flags; | 413 | unsigned long flags; |
400 | struct thread_info *curtp, *irqtp; | ||
401 | 414 | ||
402 | if (in_interrupt()) | 415 | if (in_interrupt()) |
403 | return; | 416 | return; |
@@ -405,19 +418,18 @@ void do_softirq(void) | |||
405 | local_irq_save(flags); | 418 | local_irq_save(flags); |
406 | 419 | ||
407 | if (local_softirq_pending()) { | 420 | if (local_softirq_pending()) { |
408 | curtp = current_thread_info(); | 421 | account_system_vtime(current); |
409 | irqtp = softirq_ctx[smp_processor_id()]; | 422 | local_bh_disable(); |
410 | irqtp->task = curtp->task; | 423 | do_softirq_onstack(); |
411 | call_do_softirq(irqtp); | 424 | account_system_vtime(current); |
412 | irqtp->task = NULL; | 425 | __local_bh_enable(); |
413 | } | 426 | } |
414 | 427 | ||
415 | local_irq_restore(flags); | 428 | local_irq_restore(flags); |
416 | } | 429 | } |
417 | EXPORT_SYMBOL(do_softirq); | 430 | EXPORT_SYMBOL(do_softirq); |
418 | 431 | ||
419 | #endif /* CONFIG_IRQSTACKS */ | 432 | #ifdef CONFIG_PPC64 |
420 | |||
421 | static int __init setup_noirqdistrib(char *str) | 433 | static int __init setup_noirqdistrib(char *str) |
422 | { | 434 | { |
423 | distribute_irqs = 0; | 435 | distribute_irqs = 0; |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index cfab48566db1..258039fb3016 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Kernel Probes (KProbes) | 2 | * Kernel Probes (KProbes) |
3 | * arch/ppc64/kernel/kprobes.c | ||
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 22d83d4d1af5..9feeeef5a875 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init); | |||
147 | 147 | ||
148 | int of_register_driver(struct of_platform_driver *drv) | 148 | int of_register_driver(struct of_platform_driver *drv) |
149 | { | 149 | { |
150 | int count = 0; | ||
151 | |||
152 | /* initialize common driver fields */ | 150 | /* initialize common driver fields */ |
153 | drv->driver.name = drv->name; | 151 | drv->driver.name = drv->name; |
154 | drv->driver.bus = &of_platform_bus_type; | 152 | drv->driver.bus = &of_platform_bus_type; |
155 | 153 | ||
156 | /* register with core */ | 154 | /* register with core */ |
157 | count = driver_register(&drv->driver); | 155 | return driver_register(&drv->driver); |
158 | return count ? count : 1; | ||
159 | } | 156 | } |
160 | 157 | ||
161 | void of_unregister_driver(struct of_platform_driver *drv) | 158 | void of_unregister_driver(struct of_platform_driver *drv) |
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c index bdf15dbbf4f0..c336f3e31cff 100644 --- a/arch/powerpc/kernel/pci_iommu.c +++ b/arch/powerpc/kernel/pci_iommu.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pci_iommu.c | ||
3 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
4 | * | 3 | * |
5 | * Rewrite, cleanup, new allocation schemes: | 4 | * Rewrite, cleanup, new allocation schemes: |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 63ecbec05202..dfa5398ab3c8 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); | |||
57 | extern void alignment_exception(struct pt_regs *regs); | 57 | extern void alignment_exception(struct pt_regs *regs); |
58 | extern void program_check_exception(struct pt_regs *regs); | 58 | extern void program_check_exception(struct pt_regs *regs); |
59 | extern void single_step_exception(struct pt_regs *regs); | 59 | extern void single_step_exception(struct pt_regs *regs); |
60 | extern int pmac_newworld; | ||
61 | extern int sys_sigreturn(struct pt_regs *regs); | 60 | extern int sys_sigreturn(struct pt_regs *regs); |
62 | 61 | ||
63 | EXPORT_SYMBOL(clear_pages); | 62 | EXPORT_SYMBOL(clear_pages); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index c225cf154bfe..1770a066c217 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/process.c | ||
3 | * | ||
4 | * Derived from "arch/i386/kernel/process.c" | 2 | * Derived from "arch/i386/kernel/process.c" |
5 | * Copyright (C) 1995 Linus Torvalds | 3 | * Copyright (C) 1995 Linus Torvalds |
6 | * | 4 | * |
@@ -47,9 +45,9 @@ | |||
47 | #include <asm/mmu.h> | 45 | #include <asm/mmu.h> |
48 | #include <asm/prom.h> | 46 | #include <asm/prom.h> |
49 | #include <asm/machdep.h> | 47 | #include <asm/machdep.h> |
48 | #include <asm/time.h> | ||
50 | #ifdef CONFIG_PPC64 | 49 | #ifdef CONFIG_PPC64 |
51 | #include <asm/firmware.h> | 50 | #include <asm/firmware.h> |
52 | #include <asm/time.h> | ||
53 | #endif | 51 | #endif |
54 | 52 | ||
55 | extern unsigned long _get_SP(void); | 53 | extern unsigned long _get_SP(void); |
@@ -330,6 +328,11 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
330 | #endif | 328 | #endif |
331 | 329 | ||
332 | local_irq_save(flags); | 330 | local_irq_save(flags); |
331 | |||
332 | account_system_vtime(current); | ||
333 | account_process_vtime(current); | ||
334 | calculate_steal_time(); | ||
335 | |||
333 | last = _switch(old_thread, new_thread); | 336 | last = _switch(old_thread, new_thread); |
334 | 337 | ||
335 | local_irq_restore(flags); | 338 | local_irq_restore(flags); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 6dbd21726770..d63cd562d9d5 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -829,10 +829,6 @@ void __init unflatten_device_tree(void) | |||
829 | 829 | ||
830 | /* Allocate memory for the expanded device tree */ | 830 | /* Allocate memory for the expanded device tree */ |
831 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); | 831 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); |
832 | if (!mem) { | ||
833 | DBG("Couldn't allocate memory with lmb_alloc()!\n"); | ||
834 | panic("Couldn't allocate memory with lmb_alloc()!\n"); | ||
835 | } | ||
836 | mem = (unsigned long) __va(mem); | 832 | mem = (unsigned long) __va(mem); |
837 | 833 | ||
838 | ((u32 *)mem)[size / 4] = 0xdeadbeef; | 834 | ((u32 *)mem)[size / 4] = 0xdeadbeef; |
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h index 5ccbdbe0d5c9..c42a860c8d25 100644 --- a/arch/powerpc/kernel/ptrace-common.h +++ b/arch/powerpc/kernel/ptrace-common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/ptrace-common.h | ||
3 | * | ||
4 | * Copyright (c) 2002 Stephen Rothwell, IBM Coproration | 2 | * Copyright (c) 2002 Stephen Rothwell, IBM Coproration |
5 | * Extracted from ptrace.c and ptrace32.c | 3 | * Extracted from ptrace.c and ptrace32.c |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index 7a95b8a28354..1f03fb28cc0a 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/rtas-proc.c | ||
3 | * Copyright (C) 2000 Tilmann Bitterberg | 2 | * Copyright (C) 2000 Tilmann Bitterberg |
4 | * (tilmann@bitterberg.de) | 3 | * (tilmann@bitterberg.de) |
5 | * | 4 | * |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 7442775ef2a1..57b539a03fa9 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/rtas_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation |
5 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | 3 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index f96c49b03ba0..2f3fdad35594 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -497,8 +497,6 @@ void __init setup_system(void) | |||
497 | #endif | 497 | #endif |
498 | printk("-----------------------------------------------------\n"); | 498 | printk("-----------------------------------------------------\n"); |
499 | 499 | ||
500 | mm_init_ppc64(); | ||
501 | |||
502 | DBG(" <- setup_system()\n"); | 500 | DBG(" <- setup_system()\n"); |
503 | } | 501 | } |
504 | 502 | ||
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 4324f8a8ba24..47f910380a6a 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/signal.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 13595a64f013..805eaedbc308 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -541,7 +541,7 @@ int __devinit start_secondary(void *unused) | |||
541 | smp_ops->take_timebase(); | 541 | smp_ops->take_timebase(); |
542 | 542 | ||
543 | if (system_state > SYSTEM_BOOTING) | 543 | if (system_state > SYSTEM_BOOTING) |
544 | per_cpu(last_jiffy, cpu) = get_tb(); | 544 | snapshot_timebase(); |
545 | 545 | ||
546 | spin_lock(&call_lock); | 546 | spin_lock(&call_lock); |
547 | cpu_set(cpu, cpu_online_map); | 547 | cpu_set(cpu, cpu_online_map); |
@@ -573,6 +573,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
573 | 573 | ||
574 | set_cpus_allowed(current, old_mask); | 574 | set_cpus_allowed(current, old_mask); |
575 | 575 | ||
576 | snapshot_timebases(); | ||
577 | |||
576 | dump_numa_cpu_topology(); | 578 | dump_numa_cpu_topology(); |
577 | } | 579 | } |
578 | 580 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 86f7e3d154d8..4a27218a086c 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/percpu.h> | 51 | #include <linux/percpu.h> |
52 | #include <linux/rtc.h> | 52 | #include <linux/rtc.h> |
53 | #include <linux/jiffies.h> | 53 | #include <linux/jiffies.h> |
54 | #include <linux/posix-timers.h> | ||
54 | 55 | ||
55 | #include <asm/io.h> | 56 | #include <asm/io.h> |
56 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
@@ -98,6 +99,7 @@ unsigned long tb_ticks_per_jiffy; | |||
98 | unsigned long tb_ticks_per_usec = 100; /* sane default */ | 99 | unsigned long tb_ticks_per_usec = 100; /* sane default */ |
99 | EXPORT_SYMBOL(tb_ticks_per_usec); | 100 | EXPORT_SYMBOL(tb_ticks_per_usec); |
100 | unsigned long tb_ticks_per_sec; | 101 | unsigned long tb_ticks_per_sec; |
102 | EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */ | ||
101 | u64 tb_to_xs; | 103 | u64 tb_to_xs; |
102 | unsigned tb_to_us; | 104 | unsigned tb_to_us; |
103 | 105 | ||
@@ -135,6 +137,224 @@ unsigned long tb_last_stamp; | |||
135 | */ | 137 | */ |
136 | DEFINE_PER_CPU(unsigned long, last_jiffy); | 138 | DEFINE_PER_CPU(unsigned long, last_jiffy); |
137 | 139 | ||
140 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
141 | /* | ||
142 | * Factors for converting from cputime_t (timebase ticks) to | ||
143 | * jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds). | ||
144 | * These are all stored as 0.64 fixed-point binary fractions. | ||
145 | */ | ||
146 | u64 __cputime_jiffies_factor; | ||
147 | EXPORT_SYMBOL(__cputime_jiffies_factor); | ||
148 | u64 __cputime_msec_factor; | ||
149 | EXPORT_SYMBOL(__cputime_msec_factor); | ||
150 | u64 __cputime_sec_factor; | ||
151 | EXPORT_SYMBOL(__cputime_sec_factor); | ||
152 | u64 __cputime_clockt_factor; | ||
153 | EXPORT_SYMBOL(__cputime_clockt_factor); | ||
154 | |||
155 | static void calc_cputime_factors(void) | ||
156 | { | ||
157 | struct div_result res; | ||
158 | |||
159 | div128_by_32(HZ, 0, tb_ticks_per_sec, &res); | ||
160 | __cputime_jiffies_factor = res.result_low; | ||
161 | div128_by_32(1000, 0, tb_ticks_per_sec, &res); | ||
162 | __cputime_msec_factor = res.result_low; | ||
163 | div128_by_32(1, 0, tb_ticks_per_sec, &res); | ||
164 | __cputime_sec_factor = res.result_low; | ||
165 | div128_by_32(USER_HZ, 0, tb_ticks_per_sec, &res); | ||
166 | __cputime_clockt_factor = res.result_low; | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | * Read the PURR on systems that have it, otherwise the timebase. | ||
171 | */ | ||
172 | static u64 read_purr(void) | ||
173 | { | ||
174 | if (cpu_has_feature(CPU_FTR_PURR)) | ||
175 | return mfspr(SPRN_PURR); | ||
176 | return mftb(); | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Account time for a transition between system, hard irq | ||
181 | * or soft irq state. | ||
182 | */ | ||
183 | void account_system_vtime(struct task_struct *tsk) | ||
184 | { | ||
185 | u64 now, delta; | ||
186 | unsigned long flags; | ||
187 | |||
188 | local_irq_save(flags); | ||
189 | now = read_purr(); | ||
190 | delta = now - get_paca()->startpurr; | ||
191 | get_paca()->startpurr = now; | ||
192 | if (!in_interrupt()) { | ||
193 | delta += get_paca()->system_time; | ||
194 | get_paca()->system_time = 0; | ||
195 | } | ||
196 | account_system_time(tsk, 0, delta); | ||
197 | local_irq_restore(flags); | ||
198 | } | ||
199 | |||
200 | /* | ||
201 | * Transfer the user and system times accumulated in the paca | ||
202 | * by the exception entry and exit code to the generic process | ||
203 | * user and system time records. | ||
204 | * Must be called with interrupts disabled. | ||
205 | */ | ||
206 | void account_process_vtime(struct task_struct *tsk) | ||
207 | { | ||
208 | cputime_t utime; | ||
209 | |||
210 | utime = get_paca()->user_time; | ||
211 | get_paca()->user_time = 0; | ||
212 | account_user_time(tsk, utime); | ||
213 | } | ||
214 | |||
215 | static void account_process_time(struct pt_regs *regs) | ||
216 | { | ||
217 | int cpu = smp_processor_id(); | ||
218 | |||
219 | account_process_vtime(current); | ||
220 | run_local_timers(); | ||
221 | if (rcu_pending(cpu)) | ||
222 | rcu_check_callbacks(cpu, user_mode(regs)); | ||
223 | scheduler_tick(); | ||
224 | run_posix_cpu_timers(current); | ||
225 | } | ||
226 | |||
227 | #ifdef CONFIG_PPC_SPLPAR | ||
228 | /* | ||
229 | * Stuff for accounting stolen time. | ||
230 | */ | ||
231 | struct cpu_purr_data { | ||
232 | int initialized; /* thread is running */ | ||
233 | u64 tb0; /* timebase at origin time */ | ||
234 | u64 purr0; /* PURR at origin time */ | ||
235 | u64 tb; /* last TB value read */ | ||
236 | u64 purr; /* last PURR value read */ | ||
237 | u64 stolen; /* stolen time so far */ | ||
238 | spinlock_t lock; | ||
239 | }; | ||
240 | |||
241 | static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data); | ||
242 | |||
243 | static void snapshot_tb_and_purr(void *data) | ||
244 | { | ||
245 | struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data); | ||
246 | |||
247 | p->tb0 = mftb(); | ||
248 | p->purr0 = mfspr(SPRN_PURR); | ||
249 | p->tb = p->tb0; | ||
250 | p->purr = 0; | ||
251 | wmb(); | ||
252 | p->initialized = 1; | ||
253 | } | ||
254 | |||
255 | /* | ||
256 | * Called during boot when all cpus have come up. | ||
257 | */ | ||
258 | void snapshot_timebases(void) | ||
259 | { | ||
260 | int cpu; | ||
261 | |||
262 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
263 | return; | ||
264 | for_each_cpu(cpu) | ||
265 | spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock); | ||
266 | on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1); | ||
267 | } | ||
268 | |||
269 | void calculate_steal_time(void) | ||
270 | { | ||
271 | u64 tb, purr, t0; | ||
272 | s64 stolen; | ||
273 | struct cpu_purr_data *p0, *pme, *phim; | ||
274 | int cpu; | ||
275 | |||
276 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
277 | return; | ||
278 | cpu = smp_processor_id(); | ||
279 | pme = &per_cpu(cpu_purr_data, cpu); | ||
280 | if (!pme->initialized) | ||
281 | return; /* this can happen in early boot */ | ||
282 | p0 = &per_cpu(cpu_purr_data, cpu & ~1); | ||
283 | phim = &per_cpu(cpu_purr_data, cpu ^ 1); | ||
284 | spin_lock(&p0->lock); | ||
285 | tb = mftb(); | ||
286 | purr = mfspr(SPRN_PURR) - pme->purr0; | ||
287 | if (!phim->initialized || !cpu_online(cpu ^ 1)) { | ||
288 | stolen = (tb - pme->tb) - (purr - pme->purr); | ||
289 | } else { | ||
290 | t0 = pme->tb0; | ||
291 | if (phim->tb0 < t0) | ||
292 | t0 = phim->tb0; | ||
293 | stolen = phim->tb - t0 - phim->purr - purr - p0->stolen; | ||
294 | } | ||
295 | if (stolen > 0) { | ||
296 | account_steal_time(current, stolen); | ||
297 | p0->stolen += stolen; | ||
298 | } | ||
299 | pme->tb = tb; | ||
300 | pme->purr = purr; | ||
301 | spin_unlock(&p0->lock); | ||
302 | } | ||
303 | |||
304 | /* | ||
305 | * Must be called before the cpu is added to the online map when | ||
306 | * a cpu is being brought up at runtime. | ||
307 | */ | ||
308 | static void snapshot_purr(void) | ||
309 | { | ||
310 | int cpu; | ||
311 | u64 purr; | ||
312 | struct cpu_purr_data *p0, *pme, *phim; | ||
313 | unsigned long flags; | ||
314 | |||
315 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
316 | return; | ||
317 | cpu = smp_processor_id(); | ||
318 | pme = &per_cpu(cpu_purr_data, cpu); | ||
319 | p0 = &per_cpu(cpu_purr_data, cpu & ~1); | ||
320 | phim = &per_cpu(cpu_purr_data, cpu ^ 1); | ||
321 | spin_lock_irqsave(&p0->lock, flags); | ||
322 | pme->tb = pme->tb0 = mftb(); | ||
323 | purr = mfspr(SPRN_PURR); | ||
324 | if (!phim->initialized) { | ||
325 | pme->purr = 0; | ||
326 | pme->purr0 = purr; | ||
327 | } else { | ||
328 | /* set p->purr and p->purr0 for no change in p0->stolen */ | ||
329 | pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen; | ||
330 | pme->purr0 = purr - pme->purr; | ||
331 | } | ||
332 | pme->initialized = 1; | ||
333 | spin_unlock_irqrestore(&p0->lock, flags); | ||
334 | } | ||
335 | |||
336 | #endif /* CONFIG_PPC_SPLPAR */ | ||
337 | |||
338 | #else /* ! CONFIG_VIRT_CPU_ACCOUNTING */ | ||
339 | #define calc_cputime_factors() | ||
340 | #define account_process_time(regs) update_process_times(user_mode(regs)) | ||
341 | #define calculate_steal_time() do { } while (0) | ||
342 | #endif | ||
343 | |||
344 | #if !(defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR)) | ||
345 | #define snapshot_purr() do { } while (0) | ||
346 | #endif | ||
347 | |||
348 | /* | ||
349 | * Called when a cpu comes up after the system has finished booting, | ||
350 | * i.e. as a result of a hotplug cpu action. | ||
351 | */ | ||
352 | void snapshot_timebase(void) | ||
353 | { | ||
354 | __get_cpu_var(last_jiffy) = get_tb(); | ||
355 | snapshot_purr(); | ||
356 | } | ||
357 | |||
138 | void __delay(unsigned long loops) | 358 | void __delay(unsigned long loops) |
139 | { | 359 | { |
140 | unsigned long start; | 360 | unsigned long start; |
@@ -392,6 +612,7 @@ static void iSeries_tb_recal(void) | |||
392 | new_tb_ticks_per_jiffy, sign, tick_diff ); | 612 | new_tb_ticks_per_jiffy, sign, tick_diff ); |
393 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; | 613 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; |
394 | tb_ticks_per_sec = new_tb_ticks_per_sec; | 614 | tb_ticks_per_sec = new_tb_ticks_per_sec; |
615 | calc_cputime_factors(); | ||
395 | div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); | 616 | div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); |
396 | do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; | 617 | do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; |
397 | tb_to_xs = divres.result_low; | 618 | tb_to_xs = divres.result_low; |
@@ -440,6 +661,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
440 | irq_enter(); | 661 | irq_enter(); |
441 | 662 | ||
442 | profile_tick(CPU_PROFILING, regs); | 663 | profile_tick(CPU_PROFILING, regs); |
664 | calculate_steal_time(); | ||
443 | 665 | ||
444 | #ifdef CONFIG_PPC_ISERIES | 666 | #ifdef CONFIG_PPC_ISERIES |
445 | get_lppaca()->int_dword.fields.decr_int = 0; | 667 | get_lppaca()->int_dword.fields.decr_int = 0; |
@@ -461,7 +683,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
461 | * is the case. | 683 | * is the case. |
462 | */ | 684 | */ |
463 | if (!cpu_is_offline(cpu)) | 685 | if (!cpu_is_offline(cpu)) |
464 | update_process_times(user_mode(regs)); | 686 | account_process_time(regs); |
465 | 687 | ||
466 | /* | 688 | /* |
467 | * No need to check whether cpu is offline here; boot_cpuid | 689 | * No need to check whether cpu is offline here; boot_cpuid |
@@ -518,13 +740,27 @@ void wakeup_decrementer(void) | |||
518 | void __init smp_space_timers(unsigned int max_cpus) | 740 | void __init smp_space_timers(unsigned int max_cpus) |
519 | { | 741 | { |
520 | int i; | 742 | int i; |
743 | unsigned long half = tb_ticks_per_jiffy / 2; | ||
521 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; | 744 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; |
522 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); | 745 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); |
523 | 746 | ||
524 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ | 747 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ |
525 | previous_tb -= tb_ticks_per_jiffy; | 748 | previous_tb -= tb_ticks_per_jiffy; |
749 | /* | ||
750 | * The stolen time calculation for POWER5 shared-processor LPAR | ||
751 | * systems works better if the two threads' timebase interrupts | ||
752 | * are staggered by half a jiffy with respect to each other. | ||
753 | */ | ||
526 | for_each_cpu(i) { | 754 | for_each_cpu(i) { |
527 | if (i != boot_cpuid) { | 755 | if (i == boot_cpuid) |
756 | continue; | ||
757 | if (i == (boot_cpuid ^ 1)) | ||
758 | per_cpu(last_jiffy, i) = | ||
759 | per_cpu(last_jiffy, boot_cpuid) - half; | ||
760 | else if (i & 1) | ||
761 | per_cpu(last_jiffy, i) = | ||
762 | per_cpu(last_jiffy, i ^ 1) + half; | ||
763 | else { | ||
528 | previous_tb += offset; | 764 | previous_tb += offset; |
529 | per_cpu(last_jiffy, i) = previous_tb; | 765 | per_cpu(last_jiffy, i) = previous_tb; |
530 | } | 766 | } |
@@ -720,6 +956,7 @@ void __init time_init(void) | |||
720 | tb_ticks_per_sec = ppc_tb_freq; | 956 | tb_ticks_per_sec = ppc_tb_freq; |
721 | tb_ticks_per_usec = ppc_tb_freq / 1000000; | 957 | tb_ticks_per_usec = ppc_tb_freq / 1000000; |
722 | tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); | 958 | tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); |
959 | calc_cputime_factors(); | ||
723 | 960 | ||
724 | /* | 961 | /* |
725 | * Calculate the length of each tick in ns. It will not be | 962 | * Calculate the length of each tick in ns. It will not be |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 04f7df39ffbb..ec8370368423 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/vdso.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. | 2 | * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. |
5 | * <benh@kernel.crashing.org> | 3 | * <benh@kernel.crashing.org> |
6 | * | 4 | * |
diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S index 40523b140109..f9837f44ac0b 100644 --- a/arch/powerpc/lib/copypage_64.S +++ b/arch/powerpc/lib/copypage_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/copypage.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index 6d69ef39b7df..a6b54cb97c49 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/copyuser.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/e2a.c b/arch/powerpc/lib/e2a.c index d2b834887920..4b72ed8fd50e 100644 --- a/arch/powerpc/lib/e2a.c +++ b/arch/powerpc/lib/e2a.c | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/e2a.c | ||
3 | * | ||
4 | * EBCDIC to ASCII conversion | 2 | * EBCDIC to ASCII conversion |
5 | * | 3 | * |
6 | * This function moved here from arch/ppc64/kernel/viopath.c | 4 | * This function moved here from arch/powerpc/platforms/iseries/viopath.c |
7 | * | 5 | * |
8 | * (C) Copyright 2000-2004 IBM Corporation | 6 | * (C) Copyright 2000-2004 IBM Corporation |
9 | * | 7 | * |
@@ -105,4 +103,14 @@ unsigned char e2a(unsigned char x) | |||
105 | } | 103 | } |
106 | EXPORT_SYMBOL(e2a); | 104 | EXPORT_SYMBOL(e2a); |
107 | 105 | ||
106 | unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n) | ||
107 | { | ||
108 | int i; | ||
109 | |||
110 | n = strnlen(src, n); | ||
108 | 111 | ||
112 | for (i = 0; i < n; i++) | ||
113 | dest[i] = e2a(src[i]); | ||
114 | |||
115 | return dest; | ||
116 | } | ||
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 9ccacdf5bcb9..fd66acfd3e3e 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/memcpy.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c index 42c5de2c898f..31e511856dc5 100644 --- a/arch/powerpc/lib/rheap.c +++ b/arch/powerpc/lib/rheap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/rheap.c | ||
3 | * | ||
4 | * A Remote Heap. Remote means that we don't touch the memory that the | 2 | * A Remote Heap. Remote means that we don't touch the memory that the |
5 | * heap points to. Normal heap implementations use the memory they manage | 3 | * heap points to. Normal heap implementations use the memory they manage |
6 | * to place their list. We cannot do that because the memory we manage may | 4 | * to place their list. We cannot do that because the memory we manage may |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index a4815d316722..ec4adcb4bc28 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/mm/fault.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 12ccd7155bac..ea469eefa146 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/hashtable.S | ||
3 | * | ||
4 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | 2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ |
5 | * | 3 | * |
6 | * PowerPC version | 4 | * PowerPC version |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index e9d589eefc14..89b35c181314 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
169 | #ifdef CONFIG_PPC_ISERIES | 169 | #ifdef CONFIG_PPC_ISERIES |
170 | if (_machine == PLATFORM_ISERIES_LPAR) | 170 | if (_machine == PLATFORM_ISERIES_LPAR) |
171 | ret = iSeries_hpte_insert(hpteg, va, | 171 | ret = iSeries_hpte_insert(hpteg, va, |
172 | __pa(vaddr), | 172 | paddr, |
173 | tmp_mode, | 173 | tmp_mode, |
174 | HPTE_V_BOLTED, | 174 | HPTE_V_BOLTED, |
175 | psize); | 175 | psize); |
@@ -178,7 +178,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
178 | #ifdef CONFIG_PPC_PSERIES | 178 | #ifdef CONFIG_PPC_PSERIES |
179 | if (_machine & PLATFORM_LPAR) | 179 | if (_machine & PLATFORM_LPAR) |
180 | ret = pSeries_lpar_hpte_insert(hpteg, va, | 180 | ret = pSeries_lpar_hpte_insert(hpteg, va, |
181 | virt_to_abs(paddr), | 181 | paddr, |
182 | tmp_mode, | 182 | tmp_mode, |
183 | HPTE_V_BOLTED, | 183 | HPTE_V_BOLTED, |
184 | psize); | 184 | psize); |
@@ -186,7 +186,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
186 | #endif | 186 | #endif |
187 | #ifdef CONFIG_PPC_MULTIPLATFORM | 187 | #ifdef CONFIG_PPC_MULTIPLATFORM |
188 | ret = native_hpte_insert(hpteg, va, | 188 | ret = native_hpte_insert(hpteg, va, |
189 | virt_to_abs(paddr), | 189 | paddr, |
190 | tmp_mode, HPTE_V_BOLTED, | 190 | tmp_mode, HPTE_V_BOLTED, |
191 | psize); | 191 | psize); |
192 | #endif | 192 | #endif |
@@ -392,7 +392,7 @@ static unsigned long __init htab_get_table_size(void) | |||
392 | #ifdef CONFIG_MEMORY_HOTPLUG | 392 | #ifdef CONFIG_MEMORY_HOTPLUG |
393 | void create_section_mapping(unsigned long start, unsigned long end) | 393 | void create_section_mapping(unsigned long start, unsigned long end) |
394 | { | 394 | { |
395 | BUG_ON(htab_bolt_mapping(start, end, start, | 395 | BUG_ON(htab_bolt_mapping(start, end, __pa(start), |
396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, | 396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, |
397 | mmu_linear_psize)); | 397 | mmu_linear_psize)); |
398 | } | 398 | } |
@@ -422,7 +422,7 @@ void __init htab_initialize(void) | |||
422 | 422 | ||
423 | htab_hash_mask = pteg_count - 1; | 423 | htab_hash_mask = pteg_count - 1; |
424 | 424 | ||
425 | if (platform_is_lpar()) { | 425 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
426 | /* Using a hypervisor which owns the htab */ | 426 | /* Using a hypervisor which owns the htab */ |
427 | htab_address = NULL; | 427 | htab_address = NULL; |
428 | _SDR1 = 0; | 428 | _SDR1 = 0; |
@@ -431,7 +431,6 @@ void __init htab_initialize(void) | |||
431 | * the absolute address space. | 431 | * the absolute address space. |
432 | */ | 432 | */ |
433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
434 | BUG_ON(table == 0); | ||
435 | 434 | ||
436 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 435 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
437 | htab_size_bytes); | 436 | htab_size_bytes); |
@@ -474,21 +473,22 @@ void __init htab_initialize(void) | |||
474 | 473 | ||
475 | if (dart_tablebase != 0 && dart_tablebase >= base | 474 | if (dart_tablebase != 0 && dart_tablebase >= base |
476 | && dart_tablebase < (base + size)) { | 475 | && dart_tablebase < (base + size)) { |
476 | unsigned long dart_table_end = dart_tablebase + 16 * MB; | ||
477 | if (base != dart_tablebase) | 477 | if (base != dart_tablebase) |
478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, | 478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
479 | base, mode_rw, | 479 | __pa(base), mode_rw, |
480 | mmu_linear_psize)); | 480 | mmu_linear_psize)); |
481 | if ((base + size) > (dart_tablebase + 16*MB)) | 481 | if ((base + size) > dart_table_end) |
482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, | 482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
483 | base + size, | 483 | base + size, |
484 | dart_tablebase+16*MB, | 484 | __pa(dart_table_end), |
485 | mode_rw, | 485 | mode_rw, |
486 | mmu_linear_psize)); | 486 | mmu_linear_psize)); |
487 | continue; | 487 | continue; |
488 | } | 488 | } |
489 | #endif /* CONFIG_U3_DART */ | 489 | #endif /* CONFIG_U3_DART */ |
490 | BUG_ON(htab_bolt_mapping(base, base + size, base, | 490 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), |
491 | mode_rw, mmu_linear_psize)); | 491 | mode_rw, mmu_linear_psize)); |
492 | } | 492 | } |
493 | 493 | ||
494 | /* | 494 | /* |
@@ -505,8 +505,8 @@ void __init htab_initialize(void) | |||
505 | if (base + size >= tce_alloc_start) | 505 | if (base + size >= tce_alloc_start) |
506 | tce_alloc_start = base + size + 1; | 506 | tce_alloc_start = base + size + 1; |
507 | 507 | ||
508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, | 508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, |
509 | tce_alloc_start, mode_rw, | 509 | __pa(tce_alloc_start), mode_rw, |
510 | mmu_linear_psize)); | 510 | mmu_linear_psize)); |
511 | } | 511 | } |
512 | 512 | ||
@@ -517,7 +517,7 @@ void __init htab_initialize(void) | |||
517 | 517 | ||
518 | void htab_initialize_secondary(void) | 518 | void htab_initialize_secondary(void) |
519 | { | 519 | { |
520 | if (!platform_is_lpar()) | 520 | if (!firmware_has_feature(FW_FEATURE_LPAR)) |
521 | mtspr(SPRN_SDR1, _SDR1); | 521 | mtspr(SPRN_SDR1, _SDR1); |
522 | } | 522 | } |
523 | 523 | ||
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index bacb71c89811..babebd15bdc4 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -84,54 +84,6 @@ | |||
84 | /* max amount of RAM to use */ | 84 | /* max amount of RAM to use */ |
85 | unsigned long __max_memory; | 85 | unsigned long __max_memory; |
86 | 86 | ||
87 | /* info on what we think the IO hole is */ | ||
88 | unsigned long io_hole_start; | ||
89 | unsigned long io_hole_size; | ||
90 | |||
91 | /* | ||
92 | * Do very early mm setup. | ||
93 | */ | ||
94 | void __init mm_init_ppc64(void) | ||
95 | { | ||
96 | #ifndef CONFIG_PPC_ISERIES | ||
97 | unsigned long i; | ||
98 | #endif | ||
99 | |||
100 | ppc64_boot_msg(0x100, "MM Init"); | ||
101 | |||
102 | /* This is the story of the IO hole... please, keep seated, | ||
103 | * unfortunately, we are out of oxygen masks at the moment. | ||
104 | * So we need some rough way to tell where your big IO hole | ||
105 | * is. On pmac, it's between 2G and 4G, on POWER3, it's around | ||
106 | * that area as well, on POWER4 we don't have one, etc... | ||
107 | * We need that as a "hint" when sizing the TCE table on POWER3 | ||
108 | * So far, the simplest way that seem work well enough for us it | ||
109 | * to just assume that the first discontinuity in our physical | ||
110 | * RAM layout is the IO hole. That may not be correct in the future | ||
111 | * (and isn't on iSeries but then we don't care ;) | ||
112 | */ | ||
113 | |||
114 | #ifndef CONFIG_PPC_ISERIES | ||
115 | for (i = 1; i < lmb.memory.cnt; i++) { | ||
116 | unsigned long base, prevbase, prevsize; | ||
117 | |||
118 | prevbase = lmb.memory.region[i-1].base; | ||
119 | prevsize = lmb.memory.region[i-1].size; | ||
120 | base = lmb.memory.region[i].base; | ||
121 | if (base > (prevbase + prevsize)) { | ||
122 | io_hole_start = prevbase + prevsize; | ||
123 | io_hole_size = base - (prevbase + prevsize); | ||
124 | break; | ||
125 | } | ||
126 | } | ||
127 | #endif /* CONFIG_PPC_ISERIES */ | ||
128 | if (io_hole_start) | ||
129 | printk("IO Hole assumed to be %lx -> %lx\n", | ||
130 | io_hole_start, io_hole_start + io_hole_size - 1); | ||
131 | |||
132 | ppc64_boot_msg(0x100, "MM Init Done"); | ||
133 | } | ||
134 | |||
135 | void free_initmem(void) | 87 | void free_initmem(void) |
136 | { | 88 | { |
137 | unsigned long addr; | 89 | unsigned long addr; |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index bbe3eac918e8..417d58518558 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #define DBG(fmt...) | 31 | #define DBG(fmt...) |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #define LMB_ALLOC_ANYWHERE 0 | ||
35 | |||
34 | struct lmb lmb; | 36 | struct lmb lmb; |
35 | 37 | ||
36 | void lmb_dump_all(void) | 38 | void lmb_dump_all(void) |
@@ -226,6 +228,20 @@ unsigned long __init lmb_alloc(unsigned long size, unsigned long align) | |||
226 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | 228 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, |
227 | unsigned long max_addr) | 229 | unsigned long max_addr) |
228 | { | 230 | { |
231 | unsigned long alloc; | ||
232 | |||
233 | alloc = __lmb_alloc_base(size, align, max_addr); | ||
234 | |||
235 | if (alloc == 0) | ||
236 | panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", | ||
237 | size, max_addr); | ||
238 | |||
239 | return alloc; | ||
240 | } | ||
241 | |||
242 | unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align, | ||
243 | unsigned long max_addr) | ||
244 | { | ||
229 | long i, j; | 245 | long i, j; |
230 | unsigned long base = 0; | 246 | unsigned long base = 0; |
231 | 247 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 454cac01d8cc..badac10d700c 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64 size) | |||
125 | nid = hot_add_scn_to_nid(start); | 125 | nid = hot_add_scn_to_nid(start); |
126 | pgdata = NODE_DATA(nid); | 126 | pgdata = NODE_DATA(nid); |
127 | 127 | ||
128 | start = __va(start); | 128 | start = (unsigned long)__va(start); |
129 | create_section_mapping(start, start + size); | 129 | create_section_mapping(start, start + size); |
130 | 130 | ||
131 | /* this should work for most non-highmem platforms */ | 131 | /* this should work for most non-highmem platforms */ |
@@ -249,7 +249,6 @@ void __init do_init_bootmem(void) | |||
249 | bootmap_pages = bootmem_bootmap_pages(total_pages); | 249 | bootmap_pages = bootmem_bootmap_pages(total_pages); |
250 | 250 | ||
251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); | 251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); |
252 | BUG_ON(!start); | ||
253 | 252 | ||
254 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); | 253 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); |
255 | 254 | ||
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c index fe65f522aff3..972a8e884b9a 100644 --- a/arch/powerpc/mm/mmap.c +++ b/arch/powerpc/mm/mmap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/mm/mmap.c | ||
3 | * | ||
4 | * flexible mmap layout support | 2 | * flexible mmap layout support |
5 | * | 3 | * |
6 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. | 4 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 2863a912bcd0..e89b22aa539e 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -129,10 +129,12 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn, | |||
129 | *start_pfn = 0; | 129 | *start_pfn = 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static inline void map_cpu_to_node(int cpu, int node) | 132 | static void __cpuinit map_cpu_to_node(int cpu, int node) |
133 | { | 133 | { |
134 | numa_cpu_lookup_table[cpu] = node; | 134 | numa_cpu_lookup_table[cpu] = node; |
135 | 135 | ||
136 | dbg("adding cpu %d to node %d\n", cpu, node); | ||
137 | |||
136 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) | 138 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) |
137 | cpu_set(cpu, numa_cpumask_lookup_table[node]); | 139 | cpu_set(cpu, numa_cpumask_lookup_table[node]); |
138 | } | 140 | } |
@@ -153,7 +155,7 @@ static void unmap_cpu_from_node(unsigned long cpu) | |||
153 | } | 155 | } |
154 | #endif /* CONFIG_HOTPLUG_CPU */ | 156 | #endif /* CONFIG_HOTPLUG_CPU */ |
155 | 157 | ||
156 | static struct device_node *find_cpu_node(unsigned int cpu) | 158 | static struct device_node * __cpuinit find_cpu_node(unsigned int cpu) |
157 | { | 159 | { |
158 | unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); | 160 | unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); |
159 | struct device_node *cpu_node = NULL; | 161 | struct device_node *cpu_node = NULL; |
@@ -189,23 +191,29 @@ static int *of_get_associativity(struct device_node *dev) | |||
189 | return (unsigned int *)get_property(dev, "ibm,associativity", NULL); | 191 | return (unsigned int *)get_property(dev, "ibm,associativity", NULL); |
190 | } | 192 | } |
191 | 193 | ||
192 | static int of_node_numa_domain(struct device_node *device) | 194 | /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa |
195 | * info is found. | ||
196 | */ | ||
197 | static int of_node_to_nid(struct device_node *device) | ||
193 | { | 198 | { |
194 | int numa_domain; | 199 | int nid = -1; |
195 | unsigned int *tmp; | 200 | unsigned int *tmp; |
196 | 201 | ||
197 | if (min_common_depth == -1) | 202 | if (min_common_depth == -1) |
198 | return 0; | 203 | goto out; |
199 | 204 | ||
200 | tmp = of_get_associativity(device); | 205 | tmp = of_get_associativity(device); |
201 | if (tmp && (tmp[0] >= min_common_depth)) { | 206 | if (!tmp) |
202 | numa_domain = tmp[min_common_depth]; | 207 | goto out; |
203 | } else { | 208 | |
204 | dbg("WARNING: no NUMA information for %s\n", | 209 | if (tmp[0] >= min_common_depth) |
205 | device->full_name); | 210 | nid = tmp[min_common_depth]; |
206 | numa_domain = 0; | 211 | |
207 | } | 212 | /* POWER4 LPAR uses 0xffff as invalid node */ |
208 | return numa_domain; | 213 | if (nid == 0xffff || nid >= MAX_NUMNODES) |
214 | nid = -1; | ||
215 | out: | ||
216 | return nid; | ||
209 | } | 217 | } |
210 | 218 | ||
211 | /* | 219 | /* |
@@ -246,8 +254,7 @@ static int __init find_min_common_depth(void) | |||
246 | if ((len >= 1) && ref_points) { | 254 | if ((len >= 1) && ref_points) { |
247 | depth = ref_points[1]; | 255 | depth = ref_points[1]; |
248 | } else { | 256 | } else { |
249 | dbg("WARNING: could not find NUMA " | 257 | dbg("NUMA: ibm,associativity-reference-points not found.\n"); |
250 | "associativity reference point\n"); | ||
251 | depth = -1; | 258 | depth = -1; |
252 | } | 259 | } |
253 | of_node_put(rtas_root); | 260 | of_node_put(rtas_root); |
@@ -283,9 +290,9 @@ static unsigned long __devinit read_n_cells(int n, unsigned int **buf) | |||
283 | * Figure out to which domain a cpu belongs and stick it there. | 290 | * Figure out to which domain a cpu belongs and stick it there. |
284 | * Return the id of the domain used. | 291 | * Return the id of the domain used. |
285 | */ | 292 | */ |
286 | static int numa_setup_cpu(unsigned long lcpu) | 293 | static int __cpuinit numa_setup_cpu(unsigned long lcpu) |
287 | { | 294 | { |
288 | int numa_domain = 0; | 295 | int nid = 0; |
289 | struct device_node *cpu = find_cpu_node(lcpu); | 296 | struct device_node *cpu = find_cpu_node(lcpu); |
290 | 297 | ||
291 | if (!cpu) { | 298 | if (!cpu) { |
@@ -293,27 +300,16 @@ static int numa_setup_cpu(unsigned long lcpu) | |||
293 | goto out; | 300 | goto out; |
294 | } | 301 | } |
295 | 302 | ||
296 | numa_domain = of_node_numa_domain(cpu); | 303 | nid = of_node_to_nid(cpu); |
297 | 304 | ||
298 | if (numa_domain >= num_online_nodes()) { | 305 | if (nid < 0 || !node_online(nid)) |
299 | /* | 306 | nid = any_online_node(NODE_MASK_ALL); |
300 | * POWER4 LPAR uses 0xffff as invalid node, | ||
301 | * dont warn in this case. | ||
302 | */ | ||
303 | if (numa_domain != 0xffff) | ||
304 | printk(KERN_ERR "WARNING: cpu %ld " | ||
305 | "maps to invalid NUMA node %d\n", | ||
306 | lcpu, numa_domain); | ||
307 | numa_domain = 0; | ||
308 | } | ||
309 | out: | 307 | out: |
310 | node_set_online(numa_domain); | 308 | map_cpu_to_node(lcpu, nid); |
311 | |||
312 | map_cpu_to_node(lcpu, numa_domain); | ||
313 | 309 | ||
314 | of_node_put(cpu); | 310 | of_node_put(cpu); |
315 | 311 | ||
316 | return numa_domain; | 312 | return nid; |
317 | } | 313 | } |
318 | 314 | ||
319 | static int cpu_numa_callback(struct notifier_block *nfb, | 315 | static int cpu_numa_callback(struct notifier_block *nfb, |
@@ -325,10 +321,7 @@ static int cpu_numa_callback(struct notifier_block *nfb, | |||
325 | 321 | ||
326 | switch (action) { | 322 | switch (action) { |
327 | case CPU_UP_PREPARE: | 323 | case CPU_UP_PREPARE: |
328 | if (min_common_depth == -1 || !numa_enabled) | 324 | numa_setup_cpu(lcpu); |
329 | map_cpu_to_node(lcpu, 0); | ||
330 | else | ||
331 | numa_setup_cpu(lcpu); | ||
332 | ret = NOTIFY_OK; | 325 | ret = NOTIFY_OK; |
333 | break; | 326 | break; |
334 | #ifdef CONFIG_HOTPLUG_CPU | 327 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -375,7 +368,7 @@ static int __init parse_numa_properties(void) | |||
375 | { | 368 | { |
376 | struct device_node *cpu = NULL; | 369 | struct device_node *cpu = NULL; |
377 | struct device_node *memory = NULL; | 370 | struct device_node *memory = NULL; |
378 | int max_domain; | 371 | int default_nid = 0; |
379 | unsigned long i; | 372 | unsigned long i; |
380 | 373 | ||
381 | if (numa_enabled == 0) { | 374 | if (numa_enabled == 0) { |
@@ -385,32 +378,32 @@ static int __init parse_numa_properties(void) | |||
385 | 378 | ||
386 | min_common_depth = find_min_common_depth(); | 379 | min_common_depth = find_min_common_depth(); |
387 | 380 | ||
388 | dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); | ||
389 | if (min_common_depth < 0) | 381 | if (min_common_depth < 0) |
390 | return min_common_depth; | 382 | return min_common_depth; |
391 | 383 | ||
392 | max_domain = numa_setup_cpu(boot_cpuid); | 384 | dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); |
393 | 385 | ||
394 | /* | 386 | /* |
395 | * Even though we connect cpus to numa domains later in SMP init, | 387 | * Even though we connect cpus to numa domains later in SMP |
396 | * we need to know the maximum node id now. This is because each | 388 | * init, we need to know the node ids now. This is because |
397 | * node id must have NODE_DATA etc backing it. | 389 | * each node to be onlined must have NODE_DATA etc backing it. |
398 | * As a result of hotplug we could still have cpus appear later on | ||
399 | * with larger node ids. In that case we force the cpu into node 0. | ||
400 | */ | 390 | */ |
401 | for_each_cpu(i) { | 391 | for_each_present_cpu(i) { |
402 | int numa_domain; | 392 | int nid; |
403 | 393 | ||
404 | cpu = find_cpu_node(i); | 394 | cpu = find_cpu_node(i); |
395 | BUG_ON(!cpu); | ||
396 | nid = of_node_to_nid(cpu); | ||
397 | of_node_put(cpu); | ||
405 | 398 | ||
406 | if (cpu) { | 399 | /* |
407 | numa_domain = of_node_numa_domain(cpu); | 400 | * Don't fall back to default_nid yet -- we will plug |
408 | of_node_put(cpu); | 401 | * cpus into nodes once the memory scan has discovered |
409 | 402 | * the topology. | |
410 | if (numa_domain < MAX_NUMNODES && | 403 | */ |
411 | max_domain < numa_domain) | 404 | if (nid < 0) |
412 | max_domain = numa_domain; | 405 | continue; |
413 | } | 406 | node_set_online(nid); |
414 | } | 407 | } |
415 | 408 | ||
416 | get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); | 409 | get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); |
@@ -418,7 +411,7 @@ static int __init parse_numa_properties(void) | |||
418 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | 411 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { |
419 | unsigned long start; | 412 | unsigned long start; |
420 | unsigned long size; | 413 | unsigned long size; |
421 | int numa_domain; | 414 | int nid; |
422 | int ranges; | 415 | int ranges; |
423 | unsigned int *memcell_buf; | 416 | unsigned int *memcell_buf; |
424 | unsigned int len; | 417 | unsigned int len; |
@@ -439,18 +432,15 @@ new_range: | |||
439 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 432 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
440 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 433 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
441 | 434 | ||
442 | numa_domain = of_node_numa_domain(memory); | 435 | /* |
443 | 436 | * Assumption: either all memory nodes or none will | |
444 | if (numa_domain >= MAX_NUMNODES) { | 437 | * have associativity properties. If none, then |
445 | if (numa_domain != 0xffff) | 438 | * everything goes to default_nid. |
446 | printk(KERN_ERR "WARNING: memory at %lx maps " | 439 | */ |
447 | "to invalid NUMA node %d\n", start, | 440 | nid = of_node_to_nid(memory); |
448 | numa_domain); | 441 | if (nid < 0) |
449 | numa_domain = 0; | 442 | nid = default_nid; |
450 | } | 443 | node_set_online(nid); |
451 | |||
452 | if (max_domain < numa_domain) | ||
453 | max_domain = numa_domain; | ||
454 | 444 | ||
455 | if (!(size = numa_enforce_memory_limit(start, size))) { | 445 | if (!(size = numa_enforce_memory_limit(start, size))) { |
456 | if (--ranges) | 446 | if (--ranges) |
@@ -459,16 +449,13 @@ new_range: | |||
459 | continue; | 449 | continue; |
460 | } | 450 | } |
461 | 451 | ||
462 | add_region(numa_domain, start >> PAGE_SHIFT, | 452 | add_region(nid, start >> PAGE_SHIFT, |
463 | size >> PAGE_SHIFT); | 453 | size >> PAGE_SHIFT); |
464 | 454 | ||
465 | if (--ranges) | 455 | if (--ranges) |
466 | goto new_range; | 456 | goto new_range; |
467 | } | 457 | } |
468 | 458 | ||
469 | for (i = 0; i <= max_domain; i++) | ||
470 | node_set_online(i); | ||
471 | |||
472 | return 0; | 459 | return 0; |
473 | } | 460 | } |
474 | 461 | ||
@@ -483,7 +470,6 @@ static void __init setup_nonnuma(void) | |||
483 | printk(KERN_INFO "Memory hole size: %ldMB\n", | 470 | printk(KERN_INFO "Memory hole size: %ldMB\n", |
484 | (top_of_ram - total_ram) >> 20); | 471 | (top_of_ram - total_ram) >> 20); |
485 | 472 | ||
486 | map_cpu_to_node(boot_cpuid, 0); | ||
487 | for (i = 0; i < lmb.memory.cnt; ++i) | 473 | for (i = 0; i < lmb.memory.cnt; ++i) |
488 | add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, | 474 | add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, |
489 | lmb_size_pages(&lmb.memory, i)); | 475 | lmb_size_pages(&lmb.memory, i)); |
@@ -570,11 +556,11 @@ static void __init *careful_allocation(int nid, unsigned long size, | |||
570 | unsigned long end_pfn) | 556 | unsigned long end_pfn) |
571 | { | 557 | { |
572 | int new_nid; | 558 | int new_nid; |
573 | unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); | 559 | unsigned long ret = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); |
574 | 560 | ||
575 | /* retry over all memory */ | 561 | /* retry over all memory */ |
576 | if (!ret) | 562 | if (!ret) |
577 | ret = lmb_alloc_base(size, align, lmb_end_of_DRAM()); | 563 | ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM()); |
578 | 564 | ||
579 | if (!ret) | 565 | if (!ret) |
580 | panic("numa.c: cannot allocate %lu bytes on node %d", | 566 | panic("numa.c: cannot allocate %lu bytes on node %d", |
@@ -620,6 +606,8 @@ void __init do_init_bootmem(void) | |||
620 | dump_numa_memory_topology(); | 606 | dump_numa_memory_topology(); |
621 | 607 | ||
622 | register_cpu_notifier(&ppc64_numa_nb); | 608 | register_cpu_notifier(&ppc64_numa_nb); |
609 | cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE, | ||
610 | (void *)(unsigned long)boot_cpuid); | ||
623 | 611 | ||
624 | for_each_online_node(nid) { | 612 | for_each_online_node(nid) { |
625 | unsigned long start_pfn, end_pfn, pages_present; | 613 | unsigned long start_pfn, end_pfn, pages_present; |
@@ -767,10 +755,10 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
767 | { | 755 | { |
768 | struct device_node *memory = NULL; | 756 | struct device_node *memory = NULL; |
769 | nodemask_t nodes; | 757 | nodemask_t nodes; |
770 | int numa_domain = 0; | 758 | int default_nid = any_online_node(NODE_MASK_ALL); |
771 | 759 | ||
772 | if (!numa_enabled || (min_common_depth < 0)) | 760 | if (!numa_enabled || (min_common_depth < 0)) |
773 | return numa_domain; | 761 | return default_nid; |
774 | 762 | ||
775 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | 763 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { |
776 | unsigned long start, size; | 764 | unsigned long start, size; |
@@ -787,15 +775,15 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
787 | ha_new_range: | 775 | ha_new_range: |
788 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 776 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
789 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 777 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
790 | numa_domain = of_node_numa_domain(memory); | 778 | nid = of_node_to_nid(memory); |
791 | 779 | ||
792 | /* Domains not present at boot default to 0 */ | 780 | /* Domains not present at boot default to 0 */ |
793 | if (!node_online(numa_domain)) | 781 | if (nid < 0 || !node_online(nid)) |
794 | numa_domain = any_online_node(NODE_MASK_ALL); | 782 | nid = default_nid; |
795 | 783 | ||
796 | if ((scn_addr >= start) && (scn_addr < (start + size))) { | 784 | if ((scn_addr >= start) && (scn_addr < (start + size))) { |
797 | of_node_put(memory); | 785 | of_node_put(memory); |
798 | goto got_numa_domain; | 786 | goto got_nid; |
799 | } | 787 | } |
800 | 788 | ||
801 | if (--ranges) /* process all ranges in cell */ | 789 | if (--ranges) /* process all ranges in cell */ |
@@ -804,12 +792,12 @@ ha_new_range: | |||
804 | BUG(); /* section address should be found above */ | 792 | BUG(); /* section address should be found above */ |
805 | 793 | ||
806 | /* Temporary code to ensure that returned node is not empty */ | 794 | /* Temporary code to ensure that returned node is not empty */ |
807 | got_numa_domain: | 795 | got_nid: |
808 | nodes_setall(nodes); | 796 | nodes_setall(nodes); |
809 | while (NODE_DATA(numa_domain)->node_spanned_pages == 0) { | 797 | while (NODE_DATA(nid)->node_spanned_pages == 0) { |
810 | node_clear(numa_domain, nodes); | 798 | node_clear(nid, nodes); |
811 | numa_domain = any_online_node(nodes); | 799 | nid = any_online_node(nodes); |
812 | } | 800 | } |
813 | return numa_domain; | 801 | return nid; |
814 | } | 802 | } |
815 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 803 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index d1acee38f163..abfaabf667bf 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/mm/slb_low.S | ||
3 | * | ||
4 | * Low-level SLB routines | 2 | * Low-level SLB routines |
5 | * | 3 | * |
6 | * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM | 4 | * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 82e4951826bc..91d25fb27f89 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -247,10 +247,6 @@ void stabs_alloc(void) | |||
247 | 247 | ||
248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, | 248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, |
249 | 1<<SID_SHIFT); | 249 | 1<<SID_SHIFT); |
250 | if (! newstab) | ||
251 | panic("Unable to allocate segment table for CPU %d.\n", | ||
252 | cpu); | ||
253 | |||
254 | newstab = (unsigned long)__va(newstab); | 250 | newstab = (unsigned long)__va(newstab); |
255 | 251 | ||
256 | memset((void *)newstab, 0, HW_PAGE_SIZE); | 252 | memset((void *)newstab, 0, HW_PAGE_SIZE); |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index bb3afb6e6317..f734b11566c2 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -36,7 +36,7 @@ | |||
36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
37 | 37 | ||
38 | /* This is declared as we are using the more or less generic | 38 | /* This is declared as we are using the more or less generic |
39 | * include/asm-ppc64/tlb.h file -- tgall | 39 | * include/asm-powerpc/tlb.h file -- tgall |
40 | */ | 40 | */ |
41 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 41 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
42 | DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); | 42 | DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 659a021da0c7..4b06e53eb9b4 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/oprofile.h> | 10 | #include <linux/oprofile.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | #include <asm/firmware.h> | ||
13 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
14 | #include <asm/system.h> | 15 | #include <asm/system.h> |
15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs) | |||
232 | mmcra = mfspr(SPRN_MMCRA); | 233 | mmcra = mfspr(SPRN_MMCRA); |
233 | 234 | ||
234 | /* Were we in the hypervisor? */ | 235 | /* Were we in the hypervisor? */ |
235 | if (platform_is_lpar() && (mmcra & MMCRA_SIHV)) | 236 | if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV)) |
236 | /* function descriptor madness */ | 237 | /* function descriptor madness */ |
237 | return *((unsigned long *)hypervisor_bucket); | 238 | return *((unsigned long *)hypervisor_bucket); |
238 | 239 | ||
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 9d8b28ef3343..5c72367441a8 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the PowerPC 83xx linux kernel. | 2 | # Makefile for the PowerPC 83xx linux kernel. |
3 | # | 3 | # |
4 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o | 4 | obj-y := misc.o |
5 | obj-$(CONFIG_PCI) += pci.o | ||
6 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o | ||
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c new file mode 100644 index 000000000000..1455bcef4892 --- /dev/null +++ b/arch/powerpc/platforms/83xx/misc.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * misc setup functions for MPC83xx | ||
3 | * | ||
4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | #include <asm/hw_irq.h> | ||
18 | #include <sysdev/fsl_soc.h> | ||
19 | |||
20 | #include "mpc83xx.h" | ||
21 | |||
22 | void mpc83xx_restart(char *cmd) | ||
23 | { | ||
24 | #define RST_OFFSET 0x00000900 | ||
25 | #define RST_PROT_REG 0x00000018 | ||
26 | #define RST_CTRL_REG 0x0000001c | ||
27 | __be32 __iomem *reg; | ||
28 | |||
29 | /* map reset register space */ | ||
30 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
31 | |||
32 | local_irq_disable(); | ||
33 | |||
34 | /* enable software reset "RSTE" */ | ||
35 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
36 | |||
37 | /* set software hard reset */ | ||
38 | out_be32(reg + (RST_CTRL_REG >> 2), 0x2); | ||
39 | for (;;) ; | ||
40 | } | ||
41 | |||
42 | long __init mpc83xx_time_init(void) | ||
43 | { | ||
44 | #define SPCR_OFFSET 0x00000110 | ||
45 | #define SPCR_TBEN 0x00400000 | ||
46 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
47 | __be32 tmp; | ||
48 | |||
49 | tmp = in_be32(spcr); | ||
50 | out_be32(spcr, tmp | SPCR_TBEN); | ||
51 | |||
52 | iounmap(spcr); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 2098dd05a773..7c18b4cd5db4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -24,22 +24,15 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <linux/root_dev.h> | 26 | #include <linux/root_dev.h> |
27 | #include <linux/module.h> | ||
28 | #include <linux/fsl_devices.h> | ||
29 | 27 | ||
30 | #include <asm/system.h> | 28 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | ||
32 | #include <asm/page.h> | ||
33 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
34 | #include <asm/time.h> | 30 | #include <asm/time.h> |
35 | #include <asm/io.h> | 31 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 33 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
39 | #include <asm/pci-bridge.h> | ||
40 | #include <asm/mpc83xx.h> | ||
41 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
42 | #include <mm/mmu_decl.h> | ||
43 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
44 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
45 | #include <sysdev/fsl_soc.h> | 38 | #include <sysdev/fsl_soc.h> |
@@ -52,8 +45,6 @@ unsigned long isa_mem_base = 0; | |||
52 | #endif | 45 | #endif |
53 | 46 | ||
54 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
55 | extern int mpc83xx_pci2_busno; | ||
56 | |||
57 | static int | 48 | static int |
58 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | 49 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) |
59 | { | 50 | { |
@@ -78,26 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
78 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; | 69 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; |
79 | return PCI_IRQ_TABLE_LOOKUP; | 70 | return PCI_IRQ_TABLE_LOOKUP; |
80 | } | 71 | } |
81 | 72 | #endif /* CONFIG_PCI */ | |
82 | static int | ||
83 | mpc83xx_exclude_device(u_char bus, u_char devfn) | ||
84 | { | ||
85 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
86 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
87 | if (mpc83xx_pci2_busno) | ||
88 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
89 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
90 | return PCIBIOS_SUCCESSFUL; | ||
91 | } | ||
92 | #endif /* CONFIG_PCI */ | ||
93 | 73 | ||
94 | /* ************************************************************************ | 74 | /* ************************************************************************ |
95 | * | 75 | * |
96 | * Setup the architecture | 76 | * Setup the architecture |
97 | * | 77 | * |
98 | */ | 78 | */ |
99 | static void __init | 79 | static void __init mpc834x_sys_setup_arch(void) |
100 | mpc834x_sys_setup_arch(void) | ||
101 | { | 80 | { |
102 | struct device_node *np; | 81 | struct device_node *np; |
103 | 82 | ||
@@ -106,14 +85,14 @@ mpc834x_sys_setup_arch(void) | |||
106 | 85 | ||
107 | np = of_find_node_by_type(NULL, "cpu"); | 86 | np = of_find_node_by_type(NULL, "cpu"); |
108 | if (np != 0) { | 87 | if (np != 0) { |
109 | unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL); | 88 | unsigned int *fp = |
89 | (int *)get_property(np, "clock-frequency", NULL); | ||
110 | if (fp != 0) | 90 | if (fp != 0) |
111 | loops_per_jiffy = *fp / HZ; | 91 | loops_per_jiffy = *fp / HZ; |
112 | else | 92 | else |
113 | loops_per_jiffy = 50000000 / HZ; | 93 | loops_per_jiffy = 50000000 / HZ; |
114 | of_node_put(np); | 94 | of_node_put(np); |
115 | } | 95 | } |
116 | |||
117 | #ifdef CONFIG_PCI | 96 | #ifdef CONFIG_PCI |
118 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 97 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
119 | add_bridge(np); | 98 | add_bridge(np); |
@@ -124,14 +103,13 @@ mpc834x_sys_setup_arch(void) | |||
124 | #endif | 103 | #endif |
125 | 104 | ||
126 | #ifdef CONFIG_ROOT_NFS | 105 | #ifdef CONFIG_ROOT_NFS |
127 | ROOT_DEV = Root_NFS; | 106 | ROOT_DEV = Root_NFS; |
128 | #else | 107 | #else |
129 | ROOT_DEV = Root_HDA1; | 108 | ROOT_DEV = Root_HDA1; |
130 | #endif | 109 | #endif |
131 | } | 110 | } |
132 | 111 | ||
133 | void __init | 112 | void __init mpc834x_sys_init_IRQ(void) |
134 | mpc834x_sys_init_IRQ(void) | ||
135 | { | 113 | { |
136 | u8 senses[8] = { | 114 | u8 senses[8] = { |
137 | 0, /* EXT 0 */ | 115 | 0, /* EXT 0 */ |
@@ -160,64 +138,27 @@ mpc834x_sys_init_IRQ(void) | |||
160 | } | 138 | } |
161 | 139 | ||
162 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | 140 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) |
163 | extern ulong ds1374_get_rtc_time(void); | 141 | extern ulong ds1374_get_rtc_time(void); |
164 | extern int ds1374_set_rtc_time(ulong); | 142 | extern int ds1374_set_rtc_time(ulong); |
165 | 143 | ||
166 | static int __init | 144 | static int __init mpc834x_rtc_hookup(void) |
167 | mpc834x_rtc_hookup(void) | ||
168 | { | 145 | { |
169 | struct timespec tv; | 146 | struct timespec tv; |
170 | 147 | ||
171 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | 148 | ppc_md.get_rtc_time = ds1374_get_rtc_time; |
172 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | 149 | ppc_md.set_rtc_time = ds1374_set_rtc_time; |
173 | 150 | ||
174 | tv.tv_nsec = 0; | 151 | tv.tv_nsec = 0; |
175 | tv.tv_sec = (ppc_md.get_rtc_time)(); | 152 | tv.tv_sec = (ppc_md.get_rtc_time) (); |
176 | do_settimeofday(&tv); | 153 | do_settimeofday(&tv); |
177 | 154 | ||
178 | return 0; | 155 | return 0; |
179 | } | 156 | } |
157 | |||
180 | late_initcall(mpc834x_rtc_hookup); | 158 | late_initcall(mpc834x_rtc_hookup); |
181 | #endif | 159 | #endif |
182 | 160 | ||
183 | static void | 161 | void __init platform_init(void) |
184 | mpc83xx_restart(char *cmd) | ||
185 | { | ||
186 | #define RST_OFFSET 0x00000900 | ||
187 | #define RST_PROT_REG 0x00000018 | ||
188 | #define RST_CTRL_REG 0x0000001c | ||
189 | __be32 __iomem *reg; | ||
190 | |||
191 | // map reset register space | ||
192 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
193 | |||
194 | local_irq_disable(); | ||
195 | |||
196 | /* enable software reset "RSTE" */ | ||
197 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
198 | |||
199 | /* set software hard reset */ | ||
200 | out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445); | ||
201 | for(;;); | ||
202 | } | ||
203 | |||
204 | static long __init | ||
205 | mpc83xx_time_init(void) | ||
206 | { | ||
207 | #define SPCR_OFFSET 0x00000110 | ||
208 | #define SPCR_TBEN 0x00400000 | ||
209 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
210 | __be32 tmp; | ||
211 | |||
212 | tmp = in_be32(spcr); | ||
213 | out_be32(spcr, tmp|SPCR_TBEN); | ||
214 | |||
215 | iounmap(spcr); | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | void __init | ||
220 | platform_init(void) | ||
221 | { | 162 | { |
222 | /* setup the PowerPC module struct */ | 163 | /* setup the PowerPC module struct */ |
223 | ppc_md.setup_arch = mpc834x_sys_setup_arch; | 164 | ppc_md.setup_arch = mpc834x_sys_setup_arch; |
@@ -239,5 +180,3 @@ platform_init(void) | |||
239 | 180 | ||
240 | return; | 181 | return; |
241 | } | 182 | } |
242 | |||
243 | |||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h index e4ca39f6a862..fedecb73f7ff 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.h +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.h | |||
@@ -20,4 +20,4 @@ | |||
20 | #define PIRQC MPC83xx_IRQ_EXT6 | 20 | #define PIRQC MPC83xx_IRQ_EXT6 |
21 | #define PIRQD MPC83xx_IRQ_EXT7 | 21 | #define PIRQD MPC83xx_IRQ_EXT7 |
22 | 22 | ||
23 | #endif /* __MACH_MPC83XX_SYS_H__ */ | 23 | #endif /* __MACH_MPC83XX_SYS_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index ce9e66abef24..01cae106912b 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -10,5 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | extern int add_bridge(struct device_node *dev); | 12 | extern int add_bridge(struct device_node *dev); |
13 | extern int mpc83xx_exclude_device(u_char bus, u_char devfn); | ||
14 | extern void mpc83xx_restart(char *cmd); | ||
15 | extern long mpc83xx_time_init(void); | ||
13 | 16 | ||
14 | #endif /* __MPC83XX_H__ */ | 17 | #endif /* __MPC83XX_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 469cdacc5bd4..16f7d3b30e1d 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -36,7 +36,16 @@ | |||
36 | 36 | ||
37 | int mpc83xx_pci2_busno; | 37 | int mpc83xx_pci2_busno; |
38 | 38 | ||
39 | #ifdef CONFIG_PCI | 39 | int mpc83xx_exclude_device(u_char bus, u_char devfn) |
40 | { | ||
41 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
42 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
43 | if (mpc83xx_pci2_busno) | ||
44 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
45 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
46 | return PCIBIOS_SUCCESSFUL; | ||
47 | } | ||
48 | |||
40 | int __init add_bridge(struct device_node *dev) | 49 | int __init add_bridge(struct device_node *dev) |
41 | { | 50 | { |
42 | int len; | 51 | int len; |
@@ -52,7 +61,7 @@ int __init add_bridge(struct device_node *dev) | |||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 61 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
53 | 62 | ||
54 | /* Get bus range if any */ | 63 | /* Get bus range if any */ |
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | 64 | bus_range = (int *)get_property(dev, "bus-range", &len); |
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 65 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 66 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
58 | " bus 0\n", dev->full_name); | 67 | " bus 0\n", dev->full_name); |
@@ -74,7 +83,7 @@ int __init add_bridge(struct device_node *dev) | |||
74 | if ((rsrc.start & 0xfffff) == 0x8500) { | 83 | if ((rsrc.start & 0xfffff) == 0x8500) { |
75 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); | 84 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); |
76 | } | 85 | } |
77 | /* PCI 2*/ | 86 | /* PCI 2 */ |
78 | if ((rsrc.start & 0xfffff) == 0x8600) { | 87 | if ((rsrc.start & 0xfffff) == 0x8600) { |
79 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); | 88 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); |
80 | primary = 0; | 89 | primary = 0; |
@@ -84,10 +93,10 @@ int __init add_bridge(struct device_node *dev) | |||
84 | 93 | ||
85 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " | 94 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " |
86 | "Firmware bus number: %d->%d\n", | 95 | "Firmware bus number: %d->%d\n", |
87 | rsrc.start, hose->first_busno, hose->last_busno); | 96 | rsrc.start, hose->first_busno, hose->last_busno); |
88 | 97 | ||
89 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | 98 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", |
90 | hose, hose->cfg_addr, hose->cfg_data); | 99 | hose, hose->cfg_addr, hose->cfg_data); |
91 | 100 | ||
92 | /* Interpret the "ranges" property */ | 101 | /* Interpret the "ranges" property */ |
93 | /* This also maps the I/O region and sets isa_io/mem_base */ | 102 | /* This also maps the I/O region and sets isa_io/mem_base */ |
@@ -95,5 +104,3 @@ int __init add_bridge(struct device_node *dev) | |||
95 | 104 | ||
96 | return 0; | 105 | return 0; |
97 | } | 106 | } |
98 | |||
99 | #endif | ||
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index c5bc2821d991..d3d0ff745e84 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -1,86 +1,30 @@ | |||
1 | config 85xx | 1 | menu "Platform support" |
2 | bool | 2 | depends on PPC_85xx |
3 | depends on E500 | ||
4 | default y | ||
5 | |||
6 | config PPC_INDIRECT_PCI_BE | ||
7 | bool | ||
8 | depends on 85xx | ||
9 | default y | ||
10 | |||
11 | menu "Freescale 85xx options" | ||
12 | depends on E500 | ||
13 | 3 | ||
14 | choice | 4 | choice |
15 | prompt "Machine Type" | 5 | prompt "Machine Type" |
16 | depends on 85xx | ||
17 | default MPC8540_ADS | 6 | default MPC8540_ADS |
18 | 7 | ||
19 | config MPC8540_ADS | 8 | config MPC8540_ADS |
20 | bool "Freescale MPC8540 ADS" | 9 | bool "Freescale MPC8540 ADS" |
21 | help | 10 | help |
22 | This option enables support for the MPC 8540 ADS evaluation board. | 11 | This option enables support for the MPC 8540 ADS board |
23 | |||
24 | config MPC8548_CDS | ||
25 | bool "Freescale MPC8548 CDS" | ||
26 | help | ||
27 | This option enablese support for the MPC8548 CDS evaluation board. | ||
28 | |||
29 | config MPC8555_CDS | ||
30 | bool "Freescale MPC8555 CDS" | ||
31 | help | ||
32 | This option enablese support for the MPC8555 CDS evaluation board. | ||
33 | |||
34 | config MPC8560_ADS | ||
35 | bool "Freescale MPC8560 ADS" | ||
36 | help | ||
37 | This option enables support for the MPC 8560 ADS evaluation board. | ||
38 | |||
39 | config SBC8560 | ||
40 | bool "WindRiver PowerQUICC III SBC8560" | ||
41 | help | ||
42 | This option enables support for the WindRiver PowerQUICC III | ||
43 | SBC8560 board. | ||
44 | |||
45 | config STX_GP3 | ||
46 | bool "Silicon Turnkey Express GP3" | ||
47 | help | ||
48 | This option enables support for the Silicon Turnkey Express GP3 | ||
49 | board. | ||
50 | 12 | ||
51 | endchoice | 13 | endchoice |
52 | 14 | ||
53 | # It's often necessary to know the specific 85xx processor type. | ||
54 | # Fortunately, it is implied (so far) from the board type, so we | ||
55 | # don't need to ask more redundant questions. | ||
56 | config MPC8540 | 15 | config MPC8540 |
57 | bool | 16 | bool |
58 | depends on MPC8540_ADS | 17 | select PPC_UDBG_16550 |
59 | default y | 18 | select PPC_INDIRECT_PCI |
60 | 19 | default y if MPC8540_ADS | |
61 | config MPC8548 | ||
62 | bool | ||
63 | depends on MPC8548_CDS | ||
64 | default y | ||
65 | 20 | ||
66 | config MPC8555 | 21 | config PPC_INDIRECT_PCI_BE |
67 | bool | ||
68 | depends on MPC8555_CDS | ||
69 | default y | ||
70 | |||
71 | config MPC8560 | ||
72 | bool | 22 | bool |
73 | depends on SBC8560 || MPC8560_ADS || STX_GP3 | 23 | depends on PPC_85xx |
74 | default y | ||
75 | |||
76 | config 85xx_PCI2 | ||
77 | bool "Supprt for 2nd PCI host controller" | ||
78 | depends on MPC8555_CDS | ||
79 | default y | 24 | default y |
80 | 25 | ||
81 | config PPC_GEN550 | 26 | config MPIC |
82 | bool | 27 | bool |
83 | depends on MPC8540 || SBC8560 || MPC8555 | ||
84 | default y | 28 | default y |
85 | 29 | ||
86 | endmenu | 30 | endmenu |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 6407197ffd89..ffc4139cb214 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -1 +1,5 @@ | |||
1 | # empty makefile so make clean works | 1 | # |
2 | # Makefile for the PowerPC 85xx linux kernel. | ||
3 | # | ||
4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o | ||
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | ||
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c new file mode 100644 index 000000000000..26c5e822c7c8 --- /dev/null +++ b/arch/powerpc/platforms/85xx/misc.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * MPC85xx generic code. | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * Copyright 2005 Freescale Semiconductor Inc. | ||
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 as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <asm/irq.h> | ||
16 | |||
17 | extern void abort(void); | ||
18 | |||
19 | void mpc85xx_restart(char *cmd) | ||
20 | { | ||
21 | local_irq_disable(); | ||
22 | abort(); | ||
23 | } | ||
24 | |||
25 | /* For now this is a pass through */ | ||
26 | phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size) | ||
27 | { | ||
28 | return addr; | ||
29 | }; | ||
30 | |||
31 | EXPORT_SYMBOL(fixup_bigphys_addr); | ||
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h new file mode 100644 index 000000000000..f770cadb2080 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/85xx/mpc8540_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2004 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_MPC8540ADS_H__ | ||
18 | #define __MACH_MPC8540ADS_H__ | ||
19 | |||
20 | #include <linux/config.h> | ||
21 | #include <linux/initrd.h> | ||
22 | |||
23 | #define BOARD_CCSRBAR ((uint)0xe0000000) | ||
24 | #define BCSR_ADDR ((uint)0xf8000000) | ||
25 | #define BCSR_SIZE ((uint)(32 * 1024)) | ||
26 | |||
27 | /* PCI interrupt controller */ | ||
28 | #define PIRQA MPC85xx_IRQ_EXT1 | ||
29 | #define PIRQB MPC85xx_IRQ_EXT2 | ||
30 | #define PIRQC MPC85xx_IRQ_EXT3 | ||
31 | #define PIRQD MPC85xx_IRQ_EXT4 | ||
32 | |||
33 | /* Offset of CPM register space */ | ||
34 | #define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET) | ||
35 | |||
36 | #endif /* __MACH_MPC8540ADS_H__ */ | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h new file mode 100644 index 000000000000..b44db6268f3d --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/85xx/mpc85xx.h | ||
3 | * | ||
4 | * MPC85xx soc definitions/function decls | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | extern void mpc85xx_restart(char *); | ||
18 | extern int add_bridge(struct device_node *dev); | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c new file mode 100644 index 000000000000..b7821dbae00d --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -0,0 +1,244 @@ | |||
1 | /* | ||
2 | * MPC85xx setup and early boot code plus other random bits. | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * Copyright 2005 Freescale Semiconductor Inc. | ||
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 as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
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/root_dev.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/mpc85xx.h> | ||
28 | #include <asm/prom.h> | ||
29 | #include <asm/mpic.h> | ||
30 | #include <mm/mmu_decl.h> | ||
31 | #include <asm/udbg.h> | ||
32 | |||
33 | #include <sysdev/fsl_soc.h> | ||
34 | #include "mpc85xx.h" | ||
35 | |||
36 | #ifndef CONFIG_PCI | ||
37 | unsigned long isa_io_base = 0; | ||
38 | unsigned long isa_mem_base = 0; | ||
39 | #endif | ||
40 | |||
41 | /* | ||
42 | * Internal interrupts are all Level Sensitive, and Positive Polarity | ||
43 | * | ||
44 | * Note: Likely, this table and the following function should be | ||
45 | * obtained and derived from the OF Device Tree. | ||
46 | */ | ||
47 | static u_char mpc85xx_ads_openpic_initsenses[] __initdata = { | ||
48 | MPC85XX_INTERNAL_IRQ_SENSES, | ||
49 | 0x0, /* External 0: */ | ||
50 | #if defined(CONFIG_PCI) | ||
51 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 1: PCI slot 0 */ | ||
52 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 2: PCI slot 1 */ | ||
53 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 3: PCI slot 2 */ | ||
54 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 4: PCI slot 3 */ | ||
55 | #else | ||
56 | 0x0, /* External 1: */ | ||
57 | 0x0, /* External 2: */ | ||
58 | 0x0, /* External 3: */ | ||
59 | 0x0, /* External 4: */ | ||
60 | #endif | ||
61 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ | ||
62 | 0x0, /* External 6: */ | ||
63 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */ | ||
64 | 0x0, /* External 8: */ | ||
65 | 0x0, /* External 9: */ | ||
66 | 0x0, /* External 10: */ | ||
67 | 0x0, /* External 11: */ | ||
68 | }; | ||
69 | |||
70 | #ifdef CONFIG_PCI | ||
71 | /* | ||
72 | * interrupt routing | ||
73 | */ | ||
74 | |||
75 | int | ||
76 | mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
77 | { | ||
78 | static char pci_irq_table[][4] = | ||
79 | /* | ||
80 | * This is little evil, but works around the fact | ||
81 | * that revA boards have IDSEL starting at 18 | ||
82 | * and others boards (older) start at 12 | ||
83 | * | ||
84 | * PCI IDSEL/INTPIN->INTLINE | ||
85 | * A B C D | ||
86 | */ | ||
87 | { | ||
88 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 2 */ | ||
89 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
90 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
91 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 5 */ | ||
92 | {0, 0, 0, 0}, /* -- */ | ||
93 | {0, 0, 0, 0}, /* -- */ | ||
94 | {0, 0, 0, 0}, /* -- */ | ||
95 | {0, 0, 0, 0}, /* -- */ | ||
96 | {0, 0, 0, 0}, /* -- */ | ||
97 | {0, 0, 0, 0}, /* -- */ | ||
98 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 12 */ | ||
99 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
100 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
101 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 15 */ | ||
102 | {0, 0, 0, 0}, /* -- */ | ||
103 | {0, 0, 0, 0}, /* -- */ | ||
104 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 18 */ | ||
105 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
106 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
107 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 21 */ | ||
108 | }; | ||
109 | |||
110 | const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4; | ||
111 | return PCI_IRQ_TABLE_LOOKUP; | ||
112 | } | ||
113 | |||
114 | int | ||
115 | mpc85xx_exclude_device(u_char bus, u_char devfn) | ||
116 | { | ||
117 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
118 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
119 | else | ||
120 | return PCIBIOS_SUCCESSFUL; | ||
121 | } | ||
122 | |||
123 | #endif /* CONFIG_PCI */ | ||
124 | |||
125 | |||
126 | void __init mpc85xx_ads_pic_init(void) | ||
127 | { | ||
128 | struct mpic *mpic1; | ||
129 | phys_addr_t OpenPIC_PAddr; | ||
130 | |||
131 | /* Determine the Physical Address of the OpenPIC regs */ | ||
132 | OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET; | ||
133 | |||
134 | mpic1 = mpic_alloc(OpenPIC_PAddr, | ||
135 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, | ||
136 | 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250, | ||
137 | mpc85xx_ads_openpic_initsenses, | ||
138 | sizeof(mpc85xx_ads_openpic_initsenses), | ||
139 | " OpenPIC "); | ||
140 | BUG_ON(mpic1 == NULL); | ||
141 | mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200); | ||
142 | mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280); | ||
143 | mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300); | ||
144 | mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380); | ||
145 | mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400); | ||
146 | mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480); | ||
147 | mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500); | ||
148 | mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580); | ||
149 | |||
150 | /* dummy mappings to get to 48 */ | ||
151 | mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600); | ||
152 | mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680); | ||
153 | mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700); | ||
154 | mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780); | ||
155 | |||
156 | /* External ints */ | ||
157 | mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000); | ||
158 | mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080); | ||
159 | mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100); | ||
160 | mpic_init(mpic1); | ||
161 | } | ||
162 | |||
163 | /* | ||
164 | * Setup the architecture | ||
165 | */ | ||
166 | static void __init mpc85xx_ads_setup_arch(void) | ||
167 | { | ||
168 | struct device_node *cpu; | ||
169 | struct device_node *np; | ||
170 | |||
171 | if (ppc_md.progress) | ||
172 | ppc_md.progress("mpc85xx_ads_setup_arch()", 0); | ||
173 | |||
174 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
175 | if (cpu != 0) { | ||
176 | unsigned int *fp; | ||
177 | |||
178 | fp = (int *)get_property(cpu, "clock-frequency", NULL); | ||
179 | if (fp != 0) | ||
180 | loops_per_jiffy = *fp / HZ; | ||
181 | else | ||
182 | loops_per_jiffy = 50000000 / HZ; | ||
183 | of_node_put(cpu); | ||
184 | } | ||
185 | |||
186 | #ifdef CONFIG_PCI | ||
187 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | ||
188 | add_bridge(np); | ||
189 | |||
190 | ppc_md.pci_swizzle = common_swizzle; | ||
191 | ppc_md.pci_map_irq = mpc85xx_map_irq; | ||
192 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | ||
193 | #endif | ||
194 | |||
195 | #ifdef CONFIG_ROOT_NFS | ||
196 | ROOT_DEV = Root_NFS; | ||
197 | #else | ||
198 | ROOT_DEV = Root_HDA1; | ||
199 | #endif | ||
200 | } | ||
201 | |||
202 | void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | ||
203 | { | ||
204 | uint pvid, svid, phid1; | ||
205 | uint memsize = total_memory; | ||
206 | |||
207 | pvid = mfspr(SPRN_PVR); | ||
208 | svid = mfspr(SPRN_SVR); | ||
209 | |||
210 | seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); | ||
211 | seq_printf(m, "Machine\t\t: mpc85xx\n"); | ||
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 | void __init platform_init(void) | ||
224 | { | ||
225 | ppc_md.setup_arch = mpc85xx_ads_setup_arch; | ||
226 | ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; | ||
227 | |||
228 | ppc_md.init_IRQ = mpc85xx_ads_pic_init; | ||
229 | ppc_md.get_irq = mpic_get_irq; | ||
230 | |||
231 | ppc_md.restart = mpc85xx_restart; | ||
232 | ppc_md.power_off = NULL; | ||
233 | ppc_md.halt = NULL; | ||
234 | |||
235 | ppc_md.time_init = NULL; | ||
236 | ppc_md.set_rtc_time = NULL; | ||
237 | ppc_md.get_rtc_time = NULL; | ||
238 | ppc_md.calibrate_decr = generic_calibrate_decr; | ||
239 | |||
240 | ppc_md.progress = udbg_progress; | ||
241 | |||
242 | if (ppc_md.progress) | ||
243 | ppc_md.progress("mpc85xx_ads platform_init(): exit", 0); | ||
244 | } | ||
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c new file mode 100644 index 000000000000..bad290110ed1 --- /dev/null +++ b/arch/powerpc/platforms/85xx/pci.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * FSL SoC setup code | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/pci.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/irq.h> | ||
20 | #include <linux/module.h> | ||
21 | |||
22 | #include <asm/system.h> | ||
23 | #include <asm/atomic.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/pci-bridge.h> | ||
26 | #include <asm/prom.h> | ||
27 | #include <sysdev/fsl_soc.h> | ||
28 | |||
29 | #undef DEBUG | ||
30 | |||
31 | #ifdef DEBUG | ||
32 | #define DBG(x...) printk(x) | ||
33 | #else | ||
34 | #define DBG(x...) | ||
35 | #endif | ||
36 | |||
37 | int mpc85xx_pci2_busno = 0; | ||
38 | |||
39 | #ifdef CONFIG_PCI | ||
40 | int __init add_bridge(struct device_node *dev) | ||
41 | { | ||
42 | int len; | ||
43 | struct pci_controller *hose; | ||
44 | struct resource rsrc; | ||
45 | int *bus_range; | ||
46 | int primary = 1, has_address = 0; | ||
47 | phys_addr_t immr = get_immrbase(); | ||
48 | |||
49 | DBG("Adding PCI host bridge %s\n", dev->full_name); | ||
50 | |||
51 | /* Fetch host bridge registers address */ | ||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | ||
53 | |||
54 | /* Get bus range if any */ | ||
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | ||
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | ||
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | ||
58 | " bus 0\n", dev->full_name); | ||
59 | } | ||
60 | |||
61 | hose = pcibios_alloc_controller(); | ||
62 | if (!hose) | ||
63 | return -ENOMEM; | ||
64 | hose->arch_data = dev; | ||
65 | hose->set_cfg_type = 1; | ||
66 | |||
67 | hose->first_busno = bus_range ? bus_range[0] : 0; | ||
68 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | ||
69 | |||
70 | /* PCI 1 */ | ||
71 | if ((rsrc.start & 0xfffff) == 0x8000) { | ||
72 | setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004); | ||
73 | } | ||
74 | /* PCI 2 */ | ||
75 | if ((rsrc.start & 0xfffff) == 0x9000) { | ||
76 | setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); | ||
77 | primary = 0; | ||
78 | hose->bus_offset = hose->first_busno; | ||
79 | mpc85xx_pci2_busno = hose->first_busno; | ||
80 | } | ||
81 | |||
82 | printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. " | ||
83 | "Firmware bus number: %d->%d\n", | ||
84 | rsrc.start, hose->first_busno, hose->last_busno); | ||
85 | |||
86 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | ||
87 | hose, hose->cfg_addr, hose->cfg_data); | ||
88 | |||
89 | /* Interpret the "ranges" property */ | ||
90 | /* This also maps the I/O region and sets isa_io/mem_base */ | ||
91 | pci_process_bridge_OF_ranges(hose, dev, primary); | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | #endif | ||
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 04073fd987ec..c4f6b0d2d140 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile | |||
@@ -8,7 +8,7 @@ endif | |||
8 | obj-$(CONFIG_PPC_CHRP) += chrp/ | 8 | obj-$(CONFIG_PPC_CHRP) += chrp/ |
9 | obj-$(CONFIG_4xx) += 4xx/ | 9 | obj-$(CONFIG_4xx) += 4xx/ |
10 | obj-$(CONFIG_PPC_83xx) += 83xx/ | 10 | obj-$(CONFIG_PPC_83xx) += 83xx/ |
11 | obj-$(CONFIG_85xx) += 85xx/ | 11 | obj-$(CONFIG_PPC_85xx) += 85xx/ |
12 | obj-$(CONFIG_PPC_PSERIES) += pseries/ | 12 | obj-$(CONFIG_PPC_PSERIES) += pseries/ |
13 | obj-$(CONFIG_PPC_ISERIES) += iseries/ | 13 | obj-$(CONFIG_PPC_ISERIES) += iseries/ |
14 | obj-$(CONFIG_PPC_MAPLE) += maple/ | 14 | obj-$(CONFIG_PPC_MAPLE) += maple/ |
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c index 29c86781c493..6ad4b1a72c96 100644 --- a/arch/powerpc/platforms/chrp/pegasos_eth.c +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_pegasos_eth.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> | 2 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> |
5 | * Thanks to : | 3 | * Thanks to : |
6 | * Dale Farnsworth <dale@farnsworth.org> | 4 | * Dale Farnsworth <dale@farnsworth.org> |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index e1fadbf49150..8bf4307e323d 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 78df2e7ca88a..12c6f689b1aa 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * | 3 | * |
6 | * Adapted for PowerPC (PReP) by Gary Thomas | 4 | * Adapted for PowerPC (PReP) by Gary Thomas |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index a41d8b78c0cd..d771b8ee857d 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "setup.h" | 46 | #include "setup.h" |
47 | 47 | ||
48 | extern int piranha_simulator; | 48 | extern int piranha_simulator; |
49 | static int mf_initialized; | ||
49 | 50 | ||
50 | /* | 51 | /* |
51 | * This is the structure layout for the Machine Facilites LPAR event | 52 | * This is the structure layout for the Machine Facilites LPAR event |
@@ -143,7 +144,8 @@ static spinlock_t pending_event_spinlock; | |||
143 | static struct pending_event *pending_event_head; | 144 | static struct pending_event *pending_event_head; |
144 | static struct pending_event *pending_event_tail; | 145 | static struct pending_event *pending_event_tail; |
145 | static struct pending_event *pending_event_avail; | 146 | static struct pending_event *pending_event_avail; |
146 | static struct pending_event pending_event_prealloc[16]; | 147 | #define PENDING_EVENT_PREALLOC_LEN 16 |
148 | static struct pending_event pending_event_prealloc[PENDING_EVENT_PREALLOC_LEN]; | ||
147 | 149 | ||
148 | /* | 150 | /* |
149 | * Put a pending event onto the available queue, so it can get reused. | 151 | * Put a pending event onto the available queue, so it can get reused. |
@@ -597,7 +599,7 @@ void mf_power_off(void) | |||
597 | * Global kernel interface to tell the VSP object in the primary | 599 | * Global kernel interface to tell the VSP object in the primary |
598 | * partition to reboot this partition. | 600 | * partition to reboot this partition. |
599 | */ | 601 | */ |
600 | void mf_reboot(void) | 602 | void mf_reboot(char *cmd) |
601 | { | 603 | { |
602 | printk(KERN_INFO "mf.c: Preparing to bounce...\n"); | 604 | printk(KERN_INFO "mf.c: Preparing to bounce...\n"); |
603 | signal_ce_msg_simple(0x4e, NULL); | 605 | signal_ce_msg_simple(0x4e, NULL); |
@@ -625,7 +627,7 @@ void mf_display_src(u32 word) | |||
625 | /* | 627 | /* |
626 | * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. | 628 | * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. |
627 | */ | 629 | */ |
628 | void mf_display_progress(u16 value) | 630 | static __init void mf_display_progress_src(u16 value) |
629 | { | 631 | { |
630 | u8 ce[12]; | 632 | u8 ce[12]; |
631 | u8 src[72]; | 633 | u8 src[72]; |
@@ -649,30 +651,42 @@ void mf_display_progress(u16 value) | |||
649 | * Clear the VSP control panel. Used to "erase" an SRC that was | 651 | * Clear the VSP control panel. Used to "erase" an SRC that was |
650 | * previously displayed. | 652 | * previously displayed. |
651 | */ | 653 | */ |
652 | void mf_clear_src(void) | 654 | static void mf_clear_src(void) |
653 | { | 655 | { |
654 | signal_ce_msg_simple(0x4b, NULL); | 656 | signal_ce_msg_simple(0x4b, NULL); |
655 | } | 657 | } |
656 | 658 | ||
659 | void __init mf_display_progress(u16 value) | ||
660 | { | ||
661 | if (piranha_simulator || !mf_initialized) | ||
662 | return; | ||
663 | |||
664 | if (0xFFFF == value) | ||
665 | mf_clear_src(); | ||
666 | else | ||
667 | mf_display_progress_src(value); | ||
668 | } | ||
669 | |||
657 | /* | 670 | /* |
658 | * Initialization code here. | 671 | * Initialization code here. |
659 | */ | 672 | */ |
660 | void mf_init(void) | 673 | void __init mf_init(void) |
661 | { | 674 | { |
662 | int i; | 675 | int i; |
663 | 676 | ||
664 | /* initialize */ | ||
665 | spin_lock_init(&pending_event_spinlock); | 677 | spin_lock_init(&pending_event_spinlock); |
666 | for (i = 0; | 678 | |
667 | i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc); | 679 | for (i = 0; i < PENDING_EVENT_PREALLOC_LEN; i++) |
668 | ++i) | ||
669 | free_pending_event(&pending_event_prealloc[i]); | 680 | free_pending_event(&pending_event_prealloc[i]); |
681 | |||
670 | HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); | 682 | HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); |
671 | 683 | ||
672 | /* virtual continue ack */ | 684 | /* virtual continue ack */ |
673 | signal_ce_msg_simple(0x57, NULL); | 685 | signal_ce_msg_simple(0x57, NULL); |
674 | 686 | ||
675 | /* initialization complete */ | 687 | mf_initialized = 1; |
688 | mb(); | ||
689 | |||
676 | printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " | 690 | printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " |
677 | "initialized\n"); | 691 | "initialized\n"); |
678 | } | 692 | } |
@@ -692,6 +706,43 @@ static void get_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) | |||
692 | complete(&rtc->com); | 706 | complete(&rtc->com); |
693 | } | 707 | } |
694 | 708 | ||
709 | static int mf_set_rtc(struct rtc_time *tm) | ||
710 | { | ||
711 | char ce_time[12]; | ||
712 | u8 day, mon, hour, min, sec, y1, y2; | ||
713 | unsigned year; | ||
714 | |||
715 | year = 1900 + tm->tm_year; | ||
716 | y1 = year / 100; | ||
717 | y2 = year % 100; | ||
718 | |||
719 | sec = tm->tm_sec; | ||
720 | min = tm->tm_min; | ||
721 | hour = tm->tm_hour; | ||
722 | day = tm->tm_mday; | ||
723 | mon = tm->tm_mon + 1; | ||
724 | |||
725 | BIN_TO_BCD(sec); | ||
726 | BIN_TO_BCD(min); | ||
727 | BIN_TO_BCD(hour); | ||
728 | BIN_TO_BCD(mon); | ||
729 | BIN_TO_BCD(day); | ||
730 | BIN_TO_BCD(y1); | ||
731 | BIN_TO_BCD(y2); | ||
732 | |||
733 | memset(ce_time, 0, sizeof(ce_time)); | ||
734 | ce_time[3] = 0x41; | ||
735 | ce_time[4] = y1; | ||
736 | ce_time[5] = y2; | ||
737 | ce_time[6] = sec; | ||
738 | ce_time[7] = min; | ||
739 | ce_time[8] = hour; | ||
740 | ce_time[10] = day; | ||
741 | ce_time[11] = mon; | ||
742 | |||
743 | return signal_ce_msg(ce_time, NULL); | ||
744 | } | ||
745 | |||
695 | static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) | 746 | static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) |
696 | { | 747 | { |
697 | tm->tm_wday = 0; | 748 | tm->tm_wday = 0; |
@@ -747,7 +798,7 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) | |||
747 | return 0; | 798 | return 0; |
748 | } | 799 | } |
749 | 800 | ||
750 | int mf_get_rtc(struct rtc_time *tm) | 801 | static int mf_get_rtc(struct rtc_time *tm) |
751 | { | 802 | { |
752 | struct ce_msg_comp_data ce_complete; | 803 | struct ce_msg_comp_data ce_complete; |
753 | struct rtc_time_data rtc_data; | 804 | struct rtc_time_data rtc_data; |
@@ -780,7 +831,7 @@ static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) | |||
780 | rtc->busy = 0; | 831 | rtc->busy = 0; |
781 | } | 832 | } |
782 | 833 | ||
783 | int mf_get_boot_rtc(struct rtc_time *tm) | 834 | static int mf_get_boot_rtc(struct rtc_time *tm) |
784 | { | 835 | { |
785 | struct ce_msg_comp_data ce_complete; | 836 | struct ce_msg_comp_data ce_complete; |
786 | struct boot_rtc_time_data rtc_data; | 837 | struct boot_rtc_time_data rtc_data; |
@@ -802,43 +853,6 @@ int mf_get_boot_rtc(struct rtc_time *tm) | |||
802 | return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); | 853 | return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); |
803 | } | 854 | } |
804 | 855 | ||
805 | int mf_set_rtc(struct rtc_time *tm) | ||
806 | { | ||
807 | char ce_time[12]; | ||
808 | u8 day, mon, hour, min, sec, y1, y2; | ||
809 | unsigned year; | ||
810 | |||
811 | year = 1900 + tm->tm_year; | ||
812 | y1 = year / 100; | ||
813 | y2 = year % 100; | ||
814 | |||
815 | sec = tm->tm_sec; | ||
816 | min = tm->tm_min; | ||
817 | hour = tm->tm_hour; | ||
818 | day = tm->tm_mday; | ||
819 | mon = tm->tm_mon + 1; | ||
820 | |||
821 | BIN_TO_BCD(sec); | ||
822 | BIN_TO_BCD(min); | ||
823 | BIN_TO_BCD(hour); | ||
824 | BIN_TO_BCD(mon); | ||
825 | BIN_TO_BCD(day); | ||
826 | BIN_TO_BCD(y1); | ||
827 | BIN_TO_BCD(y2); | ||
828 | |||
829 | memset(ce_time, 0, sizeof(ce_time)); | ||
830 | ce_time[3] = 0x41; | ||
831 | ce_time[4] = y1; | ||
832 | ce_time[5] = y2; | ||
833 | ce_time[6] = sec; | ||
834 | ce_time[7] = min; | ||
835 | ce_time[8] = hour; | ||
836 | ce_time[10] = day; | ||
837 | ce_time[11] = mon; | ||
838 | |||
839 | return signal_ce_msg(ce_time, NULL); | ||
840 | } | ||
841 | |||
842 | #ifdef CONFIG_PROC_FS | 856 | #ifdef CONFIG_PROC_FS |
843 | 857 | ||
844 | static int proc_mf_dump_cmdline(char *page, char **start, off_t off, | 858 | static int proc_mf_dump_cmdline(char *page, char **start, off_t off, |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 3ecc4a652d82..fa4550611c11 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <asm/iseries/hv_call_xm.h> | 50 | #include <asm/iseries/hv_call_xm.h> |
51 | #include <asm/iseries/it_lp_queue.h> | 51 | #include <asm/iseries/it_lp_queue.h> |
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
53 | #include <asm/iseries/hv_lp_event.h> | 54 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 55 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | 56 | #include <asm/udbg.h> |
@@ -89,8 +90,6 @@ extern unsigned long embedded_sysmap_end; | |||
89 | extern unsigned long iSeries_recal_tb; | 90 | extern unsigned long iSeries_recal_tb; |
90 | extern unsigned long iSeries_recal_titan; | 91 | extern unsigned long iSeries_recal_titan; |
91 | 92 | ||
92 | static int mf_initialized; | ||
93 | |||
94 | static unsigned long cmd_mem_limit; | 93 | static unsigned long cmd_mem_limit; |
95 | 94 | ||
96 | struct MemoryBlock { | 95 | struct MemoryBlock { |
@@ -303,8 +302,6 @@ static void __init iSeries_init_early(void) | |||
303 | { | 302 | { |
304 | DBG(" -> iSeries_init_early()\n"); | 303 | DBG(" -> iSeries_init_early()\n"); |
305 | 304 | ||
306 | ppc64_firmware_features = FW_FEATURE_ISERIES; | ||
307 | |||
308 | ppc64_interrupt_controller = IC_ISERIES; | 305 | ppc64_interrupt_controller = IC_ISERIES; |
309 | 306 | ||
310 | #if defined(CONFIG_BLK_DEV_INITRD) | 307 | #if defined(CONFIG_BLK_DEV_INITRD) |
@@ -349,8 +346,6 @@ static void __init iSeries_init_early(void) | |||
349 | HvCallEvent_setLpEventQueueInterruptProc(0, 0); | 346 | HvCallEvent_setLpEventQueueInterruptProc(0, 0); |
350 | 347 | ||
351 | mf_init(); | 348 | mf_init(); |
352 | mf_initialized = 1; | ||
353 | mb(); | ||
354 | 349 | ||
355 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | 350 | /* If we were passed an initrd, set the ROOT_DEV properly if the values |
356 | * look sensible. If not, clear initrd reference. | 351 | * look sensible. If not, clear initrd reference. |
@@ -560,39 +555,10 @@ static void iSeries_show_cpuinfo(struct seq_file *m) | |||
560 | seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); | 555 | seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); |
561 | } | 556 | } |
562 | 557 | ||
563 | /* | ||
564 | * Document me. | ||
565 | */ | ||
566 | static void iSeries_restart(char *cmd) | ||
567 | { | ||
568 | mf_reboot(); | ||
569 | } | ||
570 | |||
571 | /* | ||
572 | * Document me. | ||
573 | */ | ||
574 | static void iSeries_power_off(void) | ||
575 | { | ||
576 | mf_power_off(); | ||
577 | } | ||
578 | |||
579 | /* | ||
580 | * Document me. | ||
581 | */ | ||
582 | static void iSeries_halt(void) | ||
583 | { | ||
584 | mf_power_off(); | ||
585 | } | ||
586 | |||
587 | static void __init iSeries_progress(char * st, unsigned short code) | 558 | static void __init iSeries_progress(char * st, unsigned short code) |
588 | { | 559 | { |
589 | printk("Progress: [%04x] - %s\n", (unsigned)code, st); | 560 | printk("Progress: [%04x] - %s\n", (unsigned)code, st); |
590 | if (!piranha_simulator && mf_initialized) { | 561 | mf_display_progress(code); |
591 | if (code != 0xffff) | ||
592 | mf_display_progress(code); | ||
593 | else | ||
594 | mf_clear_src(); | ||
595 | } | ||
596 | } | 562 | } |
597 | 563 | ||
598 | static void __init iSeries_fixup_klimit(void) | 564 | static void __init iSeries_fixup_klimit(void) |
@@ -711,7 +677,13 @@ void __init iSeries_init_IRQ(void) { } | |||
711 | 677 | ||
712 | static int __init iseries_probe(int platform) | 678 | static int __init iseries_probe(int platform) |
713 | { | 679 | { |
714 | return PLATFORM_ISERIES_LPAR == platform; | 680 | if (PLATFORM_ISERIES_LPAR != platform) |
681 | return 0; | ||
682 | |||
683 | ppc64_firmware_features |= FW_FEATURE_ISERIES; | ||
684 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
685 | |||
686 | return 1; | ||
715 | } | 687 | } |
716 | 688 | ||
717 | struct machdep_calls __initdata iseries_md = { | 689 | struct machdep_calls __initdata iseries_md = { |
@@ -721,9 +693,9 @@ struct machdep_calls __initdata iseries_md = { | |||
721 | .get_irq = iSeries_get_irq, | 693 | .get_irq = iSeries_get_irq, |
722 | .init_early = iSeries_init_early, | 694 | .init_early = iSeries_init_early, |
723 | .pcibios_fixup = iSeries_pci_final_fixup, | 695 | .pcibios_fixup = iSeries_pci_final_fixup, |
724 | .restart = iSeries_restart, | 696 | .restart = mf_reboot, |
725 | .power_off = iSeries_power_off, | 697 | .power_off = mf_power_off, |
726 | .halt = iSeries_halt, | 698 | .halt = mf_power_off, |
727 | .get_boot_time = iSeries_get_boot_time, | 699 | .get_boot_time = iSeries_get_boot_time, |
728 | .set_rtc_time = iSeries_set_rtc_time, | 700 | .set_rtc_time = iSeries_set_rtc_time, |
729 | .get_rtc_time = iSeries_get_rtc_time, | 701 | .get_rtc_time = iSeries_get_rtc_time, |
@@ -917,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
917 | dt_end_node(dt); | 889 | dt_end_node(dt); |
918 | } | 890 | } |
919 | 891 | ||
892 | void dt_model(struct iseries_flat_dt *dt) | ||
893 | { | ||
894 | char buf[16] = "IBM,"; | ||
895 | |||
896 | /* "IBM," + mfgId[2:3] + systemSerial[1:5] */ | ||
897 | strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2); | ||
898 | strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5); | ||
899 | buf[11] = '\0'; | ||
900 | dt_prop_str(dt, "system-id", buf); | ||
901 | |||
902 | /* "IBM," + machineType[0:4] */ | ||
903 | strne2a(buf + 4, xItExtVpdPanel.machineType, 4); | ||
904 | buf[8] = '\0'; | ||
905 | dt_prop_str(dt, "model", buf); | ||
906 | |||
907 | dt_prop_str(dt, "compatible", "IBM,iSeries"); | ||
908 | } | ||
909 | |||
920 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | 910 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) |
921 | { | 911 | { |
922 | u64 tmp[2]; | 912 | u64 tmp[2]; |
@@ -927,6 +917,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
927 | 917 | ||
928 | dt_prop_u32(dt, "#address-cells", 2); | 918 | dt_prop_u32(dt, "#address-cells", 2); |
929 | dt_prop_u32(dt, "#size-cells", 2); | 919 | dt_prop_u32(dt, "#size-cells", 2); |
920 | dt_model(dt); | ||
930 | 921 | ||
931 | /* /memory */ | 922 | /* /memory */ |
932 | dt_start_node(dt, "memory@0"); | 923 | dt_start_node(dt, "memory@0"); |
@@ -940,6 +931,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
940 | /* /chosen */ | 931 | /* /chosen */ |
941 | dt_start_node(dt, "chosen"); | 932 | dt_start_node(dt, "chosen"); |
942 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); | 933 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); |
934 | dt_prop_str(dt, "bootargs", cmd_line); | ||
943 | if (cmd_mem_limit) | 935 | if (cmd_mem_limit) |
944 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); | 936 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); |
945 | dt_end_node(dt); | 937 | dt_end_node(dt); |
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c index 50bc4eb85353..5e6981d17379 100644 --- a/arch/powerpc/platforms/maple/time.c +++ b/arch/powerpc/platforms/maple/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/maple_time.c | ||
3 | * | ||
4 | * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), | 2 | * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), |
5 | * IBM Corp. | 3 | * IBM Corp. |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 56fd4e05fede..cfd6527a0d7e 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_cpufreq.c | ||
3 | * | ||
4 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
5 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> | 3 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index bbe794891a20..e49eddd5042d 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_feature.c | ||
3 | * | ||
4 | * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) | 2 | * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) |
5 | * Ben. Herrenschmidt (benh@kernel.crashing.org) | 3 | * Ben. Herrenschmidt (benh@kernel.crashing.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index 3ebd045a3350..5fd28995c74c 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) | 2 | * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 29c2946f1c77..385aab90c4d2 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -86,11 +86,10 @@ int ppc_override_l2cr = 0; | |||
86 | int ppc_override_l2cr_value; | 86 | int ppc_override_l2cr_value; |
87 | int has_l2cache = 0; | 87 | int has_l2cache = 0; |
88 | 88 | ||
89 | int pmac_newworld = 1; | 89 | int pmac_newworld; |
90 | 90 | ||
91 | static int current_root_goodness = -1; | 91 | static int current_root_goodness = -1; |
92 | 92 | ||
93 | extern int pmac_newworld; | ||
94 | extern struct machdep_calls pmac_md; | 93 | extern struct machdep_calls pmac_md; |
95 | 94 | ||
96 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ | 95 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ |
@@ -308,9 +307,10 @@ static void __init pmac_setup_arch(void) | |||
308 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) | 307 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) |
309 | if (get_property(ic, "interrupt-controller", NULL)) | 308 | if (get_property(ic, "interrupt-controller", NULL)) |
310 | break; | 309 | break; |
311 | pmac_newworld = (ic != NULL); | 310 | if (ic) { |
312 | if (ic) | 311 | pmac_newworld = 1; |
313 | of_node_put(ic); | 312 | of_node_put(ic); |
313 | } | ||
314 | 314 | ||
315 | /* Lookup PCI hosts */ | 315 | /* Lookup PCI hosts */ |
316 | pmac_pci_init(); | 316 | pmac_pci_init(); |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 61616d144072..930898635c9f 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -1,5 +1,6 @@ | |||
1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ | 1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ |
2 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o | 2 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ |
3 | firmware.o | ||
3 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
4 | obj-$(CONFIG_IBMVIO) += vio.o | 5 | obj-$(CONFIG_IBMVIO) += vio.o |
5 | obj-$(CONFIG_XICS) += xics.o | 6 | obj-$(CONFIG_XICS) += xics.o |
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c new file mode 100644 index 000000000000..989f4bc136cb --- /dev/null +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * pSeries firmware setup code. | ||
3 | * | ||
4 | * Portions from arch/powerpc/platforms/pseries/setup.c: | ||
5 | * Copyright (C) 1995 Linus Torvalds | ||
6 | * Adapted from 'alpha' version by Gary Thomas | ||
7 | * Modified by Cort Dougan (cort@cs.nmt.edu) | ||
8 | * Modified by PPC64 Team, IBM Corp | ||
9 | * | ||
10 | * Portions from arch/powerpc/kernel/firmware.c | ||
11 | * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) | ||
12 | * Modifications for ppc64: | ||
13 | * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> | ||
14 | * Copyright (C) 2005 Stephen Rothwell, IBM Corporation | ||
15 | * | ||
16 | * Copyright 2006 IBM Corporation. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or | ||
19 | * modify it under the terms of the GNU General Public License | ||
20 | * as published by the Free Software Foundation; either version | ||
21 | * 2 of the License, or (at your option) any later version. | ||
22 | */ | ||
23 | |||
24 | #undef DEBUG | ||
25 | |||
26 | #include <asm/firmware.h> | ||
27 | #include <asm/prom.h> | ||
28 | |||
29 | #ifdef DEBUG | ||
30 | #define DBG(fmt...) udbg_printf(fmt) | ||
31 | #else | ||
32 | #define DBG(fmt...) | ||
33 | #endif | ||
34 | |||
35 | typedef struct { | ||
36 | unsigned long val; | ||
37 | char * name; | ||
38 | } firmware_feature_t; | ||
39 | |||
40 | static __initdata firmware_feature_t | ||
41 | firmware_features_table[FIRMWARE_MAX_FEATURES] = { | ||
42 | {FW_FEATURE_PFT, "hcall-pft"}, | ||
43 | {FW_FEATURE_TCE, "hcall-tce"}, | ||
44 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | ||
45 | {FW_FEATURE_DABR, "hcall-dabr"}, | ||
46 | {FW_FEATURE_COPY, "hcall-copy"}, | ||
47 | {FW_FEATURE_ASR, "hcall-asr"}, | ||
48 | {FW_FEATURE_DEBUG, "hcall-debug"}, | ||
49 | {FW_FEATURE_PERF, "hcall-perf"}, | ||
50 | {FW_FEATURE_DUMP, "hcall-dump"}, | ||
51 | {FW_FEATURE_INTERRUPT, "hcall-interrupt"}, | ||
52 | {FW_FEATURE_MIGRATE, "hcall-migrate"}, | ||
53 | {FW_FEATURE_PERFMON, "hcall-perfmon"}, | ||
54 | {FW_FEATURE_CRQ, "hcall-crq"}, | ||
55 | {FW_FEATURE_VIO, "hcall-vio"}, | ||
56 | {FW_FEATURE_RDMA, "hcall-rdma"}, | ||
57 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | ||
58 | {FW_FEATURE_BULK, "hcall-bulk"}, | ||
59 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | ||
60 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | ||
61 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | ||
62 | }; | ||
63 | |||
64 | /* Build up the firmware features bitmask using the contents of | ||
65 | * device-tree/ibm,hypertas-functions. Ultimately this functionality may | ||
66 | * be moved into prom.c prom_init(). | ||
67 | */ | ||
68 | void __init fw_feature_init(void) | ||
69 | { | ||
70 | struct device_node *dn; | ||
71 | char *hypertas, *s; | ||
72 | int len, i; | ||
73 | |||
74 | DBG(" -> fw_feature_init()\n"); | ||
75 | |||
76 | dn = of_find_node_by_path("/rtas"); | ||
77 | if (dn == NULL) { | ||
78 | printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n"); | ||
79 | goto out; | ||
80 | } | ||
81 | |||
82 | hypertas = get_property(dn, "ibm,hypertas-functions", &len); | ||
83 | if (hypertas == NULL) | ||
84 | goto out; | ||
85 | |||
86 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { | ||
87 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { | ||
88 | /* check value against table of strings */ | ||
89 | if (!firmware_features_table[i].name || | ||
90 | strcmp(firmware_features_table[i].name, s)) | ||
91 | continue; | ||
92 | |||
93 | /* we have a match */ | ||
94 | ppc64_firmware_features |= | ||
95 | firmware_features_table[i].val; | ||
96 | break; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | out: | ||
101 | of_node_put(dn); | ||
102 | DBG(" <- fw_feature_init()\n"); | ||
103 | } | ||
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h new file mode 100644 index 000000000000..714f56f55362 --- /dev/null +++ b/arch/powerpc/platforms/pseries/firmware.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright 2006 IBM Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef _PSERIES_FIRMWARE_H | ||
11 | #define _PSERIES_FIRMWARE_H | ||
12 | |||
13 | #include <asm/firmware.h> | ||
14 | |||
15 | extern void __init fw_feature_init(void); | ||
16 | |||
17 | #endif /* _PSERIES_FIRMWARE_H */ | ||
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index 176e8da76466..db7c19fe9297 100644 --- a/arch/powerpc/platforms/pseries/hvCall.S +++ b/arch/powerpc/platforms/pseries/hvCall.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_hvCall.S | ||
3 | * | ||
4 | * This file contains the generic code to perform a call to the | 2 | * This file contains the generic code to perform a call to the |
5 | * pSeries LPAR hypervisor. | 3 | * pSeries LPAR hypervisor. |
6 | * NOTE: this file will go away when we move to inline this work. | 4 | * NOTE: this file will go away when we move to inline this work. |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 48cfbfc43f99..2643078433f0 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_iommu.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
5 | * | 3 | * |
6 | * Rewrite, cleanup: | 4 | * Rewrite, cleanup: |
@@ -582,7 +580,7 @@ void iommu_init_early_pSeries(void) | |||
582 | return; | 580 | return; |
583 | } | 581 | } |
584 | 582 | ||
585 | if (platform_is_lpar()) { | 583 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
586 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { | 584 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { |
587 | ppc_md.tce_build = tce_buildmulti_pSeriesLP; | 585 | ppc_md.tce_build = tce_buildmulti_pSeriesLP; |
588 | ppc_md.tce_free = tce_freemulti_pSeriesLP; | 586 | ppc_md.tce_free = tce_freemulti_pSeriesLP; |
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 999a9620b5ce..946ad59e3352 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation |
5 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | 3 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 9edeca83f434..44d5c7fdcd97 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <asm/time.h> | 60 | #include <asm/time.h> |
61 | #include <asm/nvram.h> | 61 | #include <asm/nvram.h> |
62 | #include "xics.h" | 62 | #include "xics.h" |
63 | #include <asm/firmware.h> | ||
64 | #include <asm/pmc.h> | 63 | #include <asm/pmc.h> |
65 | #include <asm/mpic.h> | 64 | #include <asm/mpic.h> |
66 | #include <asm/ppc-pci.h> | 65 | #include <asm/ppc-pci.h> |
@@ -70,6 +69,7 @@ | |||
70 | 69 | ||
71 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
72 | #include "ras.h" | 71 | #include "ras.h" |
72 | #include "firmware.h" | ||
73 | 73 | ||
74 | #ifdef DEBUG | 74 | #ifdef DEBUG |
75 | #define DBG(fmt...) udbg_printf(fmt) | 75 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void) | |||
246 | ppc_md.idle_loop = default_idle; | 246 | ppc_md.idle_loop = default_idle; |
247 | } | 247 | } |
248 | 248 | ||
249 | if (platform_is_lpar()) | 249 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; | 250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; |
251 | else | 251 | else |
252 | ppc_md.enable_pmcs = power4_enable_pmcs; | 252 | ppc_md.enable_pmcs = power4_enable_pmcs; |
@@ -262,53 +262,6 @@ static int __init pSeries_init_panel(void) | |||
262 | } | 262 | } |
263 | arch_initcall(pSeries_init_panel); | 263 | arch_initcall(pSeries_init_panel); |
264 | 264 | ||
265 | |||
266 | /* Build up the ppc64_firmware_features bitmask field | ||
267 | * using contents of device-tree/ibm,hypertas-functions. | ||
268 | * Ultimately this functionality may be moved into prom.c prom_init(). | ||
269 | */ | ||
270 | static void __init fw_feature_init(void) | ||
271 | { | ||
272 | struct device_node * dn; | ||
273 | char * hypertas; | ||
274 | unsigned int len; | ||
275 | |||
276 | DBG(" -> fw_feature_init()\n"); | ||
277 | |||
278 | ppc64_firmware_features = 0; | ||
279 | dn = of_find_node_by_path("/rtas"); | ||
280 | if (dn == NULL) { | ||
281 | printk(KERN_ERR "WARNING ! Cannot find RTAS in device-tree !\n"); | ||
282 | goto no_rtas; | ||
283 | } | ||
284 | |||
285 | hypertas = get_property(dn, "ibm,hypertas-functions", &len); | ||
286 | if (hypertas) { | ||
287 | while (len > 0){ | ||
288 | int i, hypertas_len; | ||
289 | /* check value against table of strings */ | ||
290 | for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) { | ||
291 | if ((firmware_features_table[i].name) && | ||
292 | (strcmp(firmware_features_table[i].name,hypertas))==0) { | ||
293 | /* we have a match */ | ||
294 | ppc64_firmware_features |= | ||
295 | (firmware_features_table[i].val); | ||
296 | break; | ||
297 | } | ||
298 | } | ||
299 | hypertas_len = strlen(hypertas); | ||
300 | len -= hypertas_len +1; | ||
301 | hypertas+= hypertas_len +1; | ||
302 | } | ||
303 | } | ||
304 | |||
305 | of_node_put(dn); | ||
306 | no_rtas: | ||
307 | |||
308 | DBG(" <- fw_feature_init()\n"); | ||
309 | } | ||
310 | |||
311 | |||
312 | static void __init pSeries_discover_pic(void) | 265 | static void __init pSeries_discover_pic(void) |
313 | { | 266 | { |
314 | struct device_node *np; | 267 | struct device_node *np; |
@@ -367,21 +320,16 @@ static int pseries_set_xdabr(unsigned long dabr) | |||
367 | */ | 320 | */ |
368 | static void __init pSeries_init_early(void) | 321 | static void __init pSeries_init_early(void) |
369 | { | 322 | { |
370 | int iommu_off = 0; | ||
371 | |||
372 | DBG(" -> pSeries_init_early()\n"); | 323 | DBG(" -> pSeries_init_early()\n"); |
373 | 324 | ||
374 | fw_feature_init(); | 325 | fw_feature_init(); |
375 | 326 | ||
376 | if (platform_is_lpar()) | 327 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
377 | hpte_init_lpar(); | 328 | hpte_init_lpar(); |
378 | else { | 329 | else |
379 | hpte_init_native(); | 330 | hpte_init_native(); |
380 | iommu_off = (of_chosen && | ||
381 | get_property(of_chosen, "linux,iommu-off", NULL)); | ||
382 | } | ||
383 | 331 | ||
384 | if (platform_is_lpar()) | 332 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
385 | find_udbg_vterm(); | 333 | find_udbg_vterm(); |
386 | 334 | ||
387 | if (firmware_has_feature(FW_FEATURE_DABR)) | 335 | if (firmware_has_feature(FW_FEATURE_DABR)) |
@@ -437,6 +385,9 @@ static int __init pSeries_probe(int platform) | |||
437 | * it here ... | 385 | * it here ... |
438 | */ | 386 | */ |
439 | 387 | ||
388 | if (platform == PLATFORM_PSERIES_LPAR) | ||
389 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
390 | |||
440 | return 1; | 391 | return 1; |
441 | } | 392 | } |
442 | 393 | ||
@@ -576,7 +527,7 @@ static void pseries_shared_idle(void) | |||
576 | 527 | ||
577 | static int pSeries_pci_probe_mode(struct pci_bus *bus) | 528 | static int pSeries_pci_probe_mode(struct pci_bus *bus) |
578 | { | 529 | { |
579 | if (platform_is_lpar()) | 530 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
580 | return PCI_PROBE_DEVTREE; | 531 | return PCI_PROBE_DEVTREE; |
581 | return PCI_PROBE_NORMAL; | 532 | return PCI_PROBE_NORMAL; |
582 | } | 533 | } |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 8d710af50756..3cf78a6cd27c 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -443,7 +443,7 @@ void __init smp_init_pSeries(void) | |||
443 | smp_ops->cpu_die = pSeries_cpu_die; | 443 | smp_ops->cpu_die = pSeries_cpu_die; |
444 | 444 | ||
445 | /* Processors can be added/removed only on LPAR */ | 445 | /* Processors can be added/removed only on LPAR */ |
446 | if (platform_is_lpar()) | 446 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
447 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); | 447 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); |
448 | #endif | 448 | #endif |
449 | 449 | ||
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index fd823c7c9ac8..eb86cdb9b802 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gfp.h> | 20 | #include <linux/gfp.h> |
21 | #include <linux/radix-tree.h> | 21 | #include <linux/radix-tree.h> |
22 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
23 | #include <asm/firmware.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
@@ -536,7 +537,7 @@ nextnode: | |||
536 | of_node_put(np); | 537 | of_node_put(np); |
537 | } | 538 | } |
538 | 539 | ||
539 | if (platform_is_lpar()) | 540 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
540 | ops = &pSeriesLP_ops; | 541 | ops = &pSeriesLP_ops; |
541 | else { | 542 | else { |
542 | #ifdef CONFIG_SMP | 543 | #ifdef CONFIG_SMP |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 6298264efe36..61d317428610 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -194,8 +194,6 @@ static int dart_init(struct device_node *dart_node) | |||
194 | * prefetching into invalid pages and corrupting data | 194 | * prefetching into invalid pages and corrupting data |
195 | */ | 195 | */ |
196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); | 196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); |
197 | if (!tmp) | ||
198 | panic("DART: Cannot allocate spare page!"); | ||
199 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & | 197 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & |
200 | DARTMAP_RPNMASK); | 198 | DARTMAP_RPNMASK); |
201 | 199 | ||
diff --git a/arch/powerpc/sysdev/dcr.S b/arch/powerpc/sysdev/dcr.S index 895f10243a43..2078f39e2f17 100644 --- a/arch/powerpc/sysdev/dcr.S +++ b/arch/powerpc/sysdev/dcr.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/dcr.S | ||
3 | * | ||
4 | * "Indirect" DCR access | 2 | * "Indirect" DCR access |
5 | * | 3 | * |
6 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> | 4 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 064c9de47732..ceb584682fa3 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -40,7 +40,7 @@ phys_addr_t get_immrbase(void) | |||
40 | return immrbase; | 40 | return immrbase; |
41 | 41 | ||
42 | soc = of_find_node_by_type(NULL, "soc"); | 42 | soc = of_find_node_by_type(NULL, "soc"); |
43 | if (soc != 0) { | 43 | if (soc) { |
44 | unsigned int size; | 44 | unsigned int size; |
45 | void *prop = get_property(soc, "reg", &size); | 45 | void *prop = get_property(soc, "reg", &size); |
46 | immrbase = of_translate_address(soc, prop); | 46 | immrbase = of_translate_address(soc, prop); |
@@ -49,21 +49,20 @@ phys_addr_t get_immrbase(void) | |||
49 | 49 | ||
50 | return immrbase; | 50 | return immrbase; |
51 | } | 51 | } |
52 | EXPORT_SYMBOL(get_immrbase); | ||
53 | 52 | ||
54 | static const char * gfar_tx_intr = "tx"; | 53 | EXPORT_SYMBOL(get_immrbase); |
55 | static const char * gfar_rx_intr = "rx"; | ||
56 | static const char * gfar_err_intr = "error"; | ||
57 | 54 | ||
58 | static int __init gfar_of_init(void) | 55 | static int __init gfar_mdio_of_init(void) |
59 | { | 56 | { |
60 | struct device_node *np; | 57 | struct device_node *np; |
61 | unsigned int i; | 58 | unsigned int i; |
62 | struct platform_device *mdio_dev, *gfar_dev; | 59 | struct platform_device *mdio_dev; |
63 | struct resource res; | 60 | struct resource res; |
64 | int ret; | 61 | int ret; |
65 | 62 | ||
66 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; i++) { | 63 | for (np = NULL, i = 0; |
64 | (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; | ||
65 | i++) { | ||
67 | int k; | 66 | int k; |
68 | struct device_node *child = NULL; | 67 | struct device_node *child = NULL; |
69 | struct gianfar_mdio_data mdio_data; | 68 | struct gianfar_mdio_data mdio_data; |
@@ -73,12 +72,14 @@ static int __init gfar_of_init(void) | |||
73 | 72 | ||
74 | ret = of_address_to_resource(np, 0, &res); | 73 | ret = of_address_to_resource(np, 0, &res); |
75 | if (ret) | 74 | if (ret) |
76 | goto mdio_err; | 75 | goto err; |
77 | 76 | ||
78 | mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", res.start, &res, 1); | 77 | mdio_dev = |
78 | platform_device_register_simple("fsl-gianfar_mdio", | ||
79 | res.start, &res, 1); | ||
79 | if (IS_ERR(mdio_dev)) { | 80 | if (IS_ERR(mdio_dev)) { |
80 | ret = PTR_ERR(mdio_dev); | 81 | ret = PTR_ERR(mdio_dev); |
81 | goto mdio_err; | 82 | goto err; |
82 | } | 83 | } |
83 | 84 | ||
84 | for (k = 0; k < 32; k++) | 85 | for (k = 0; k < 32; k++) |
@@ -86,17 +87,44 @@ static int __init gfar_of_init(void) | |||
86 | 87 | ||
87 | while ((child = of_get_next_child(np, child)) != NULL) { | 88 | while ((child = of_get_next_child(np, child)) != NULL) { |
88 | if (child->n_intrs) { | 89 | if (child->n_intrs) { |
89 | u32 *id = (u32 *) get_property(child, "reg", NULL); | 90 | u32 *id = |
91 | (u32 *) get_property(child, "reg", NULL); | ||
90 | mdio_data.irq[*id] = child->intrs[0].line; | 92 | mdio_data.irq[*id] = child->intrs[0].line; |
91 | } | 93 | } |
92 | } | 94 | } |
93 | 95 | ||
94 | ret = platform_device_add_data(mdio_dev, &mdio_data, sizeof(struct gianfar_mdio_data)); | 96 | ret = |
97 | platform_device_add_data(mdio_dev, &mdio_data, | ||
98 | sizeof(struct gianfar_mdio_data)); | ||
95 | if (ret) | 99 | if (ret) |
96 | goto mdio_unreg; | 100 | goto unreg; |
97 | } | 101 | } |
98 | 102 | ||
99 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; i++) { | 103 | return 0; |
104 | |||
105 | unreg: | ||
106 | platform_device_unregister(mdio_dev); | ||
107 | err: | ||
108 | return ret; | ||
109 | } | ||
110 | |||
111 | arch_initcall(gfar_mdio_of_init); | ||
112 | |||
113 | static const char *gfar_tx_intr = "tx"; | ||
114 | static const char *gfar_rx_intr = "rx"; | ||
115 | static const char *gfar_err_intr = "error"; | ||
116 | |||
117 | static int __init gfar_of_init(void) | ||
118 | { | ||
119 | struct device_node *np; | ||
120 | unsigned int i; | ||
121 | struct platform_device *gfar_dev; | ||
122 | struct resource res; | ||
123 | int ret; | ||
124 | |||
125 | for (np = NULL, i = 0; | ||
126 | (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; | ||
127 | i++) { | ||
100 | struct resource r[4]; | 128 | struct resource r[4]; |
101 | struct device_node *phy, *mdio; | 129 | struct device_node *phy, *mdio; |
102 | struct gianfar_platform_data gfar_data; | 130 | struct gianfar_platform_data gfar_data; |
@@ -110,7 +138,7 @@ static int __init gfar_of_init(void) | |||
110 | 138 | ||
111 | ret = of_address_to_resource(np, 0, &r[0]); | 139 | ret = of_address_to_resource(np, 0, &r[0]); |
112 | if (ret) | 140 | if (ret) |
113 | goto gfar_err; | 141 | goto err; |
114 | 142 | ||
115 | r[1].start = np->intrs[0].line; | 143 | r[1].start = np->intrs[0].line; |
116 | r[1].end = np->intrs[0].line; | 144 | r[1].end = np->intrs[0].line; |
@@ -133,11 +161,13 @@ static int __init gfar_of_init(void) | |||
133 | r[3].flags = IORESOURCE_IRQ; | 161 | r[3].flags = IORESOURCE_IRQ; |
134 | } | 162 | } |
135 | 163 | ||
136 | gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], np->n_intrs + 1); | 164 | gfar_dev = |
165 | platform_device_register_simple("fsl-gianfar", i, &r[0], | ||
166 | np->n_intrs + 1); | ||
137 | 167 | ||
138 | if (IS_ERR(gfar_dev)) { | 168 | if (IS_ERR(gfar_dev)) { |
139 | ret = PTR_ERR(gfar_dev); | 169 | ret = PTR_ERR(gfar_dev); |
140 | goto gfar_err; | 170 | goto err; |
141 | } | 171 | } |
142 | 172 | ||
143 | mac_addr = get_property(np, "address", NULL); | 173 | mac_addr = get_property(np, "address", NULL); |
@@ -145,26 +175,26 @@ static int __init gfar_of_init(void) | |||
145 | 175 | ||
146 | if (model && !strcasecmp(model, "TSEC")) | 176 | if (model && !strcasecmp(model, "TSEC")) |
147 | gfar_data.device_flags = | 177 | gfar_data.device_flags = |
148 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 178 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
149 | FSL_GIANFAR_DEV_HAS_COALESCE | | 179 | FSL_GIANFAR_DEV_HAS_COALESCE | |
150 | FSL_GIANFAR_DEV_HAS_RMON | | 180 | FSL_GIANFAR_DEV_HAS_RMON | |
151 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; | 181 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; |
152 | if (model && !strcasecmp(model, "eTSEC")) | 182 | if (model && !strcasecmp(model, "eTSEC")) |
153 | gfar_data.device_flags = | 183 | gfar_data.device_flags = |
154 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 184 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
155 | FSL_GIANFAR_DEV_HAS_COALESCE | | 185 | FSL_GIANFAR_DEV_HAS_COALESCE | |
156 | FSL_GIANFAR_DEV_HAS_RMON | | 186 | FSL_GIANFAR_DEV_HAS_RMON | |
157 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | 187 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | |
158 | FSL_GIANFAR_DEV_HAS_CSUM | | 188 | FSL_GIANFAR_DEV_HAS_CSUM | |
159 | FSL_GIANFAR_DEV_HAS_VLAN | | 189 | FSL_GIANFAR_DEV_HAS_VLAN | |
160 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; | 190 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; |
161 | 191 | ||
162 | ph = (phandle *) get_property(np, "phy-handle", NULL); | 192 | ph = (phandle *) get_property(np, "phy-handle", NULL); |
163 | phy = of_find_node_by_phandle(*ph); | 193 | phy = of_find_node_by_phandle(*ph); |
164 | 194 | ||
165 | if (phy == NULL) { | 195 | if (phy == NULL) { |
166 | ret = -ENODEV; | 196 | ret = -ENODEV; |
167 | goto gfar_unreg; | 197 | goto unreg; |
168 | } | 198 | } |
169 | 199 | ||
170 | mdio = of_get_parent(phy); | 200 | mdio = of_get_parent(phy); |
@@ -174,7 +204,7 @@ static int __init gfar_of_init(void) | |||
174 | if (ret) { | 204 | if (ret) { |
175 | of_node_put(phy); | 205 | of_node_put(phy); |
176 | of_node_put(mdio); | 206 | of_node_put(mdio); |
177 | goto gfar_unreg; | 207 | goto unreg; |
178 | } | 208 | } |
179 | 209 | ||
180 | gfar_data.phy_id = *id; | 210 | gfar_data.phy_id = *id; |
@@ -183,23 +213,22 @@ static int __init gfar_of_init(void) | |||
183 | of_node_put(phy); | 213 | of_node_put(phy); |
184 | of_node_put(mdio); | 214 | of_node_put(mdio); |
185 | 215 | ||
186 | ret = platform_device_add_data(gfar_dev, &gfar_data, sizeof(struct gianfar_platform_data)); | 216 | ret = |
217 | platform_device_add_data(gfar_dev, &gfar_data, | ||
218 | sizeof(struct | ||
219 | gianfar_platform_data)); | ||
187 | if (ret) | 220 | if (ret) |
188 | goto gfar_unreg; | 221 | goto unreg; |
189 | } | 222 | } |
190 | 223 | ||
191 | return 0; | 224 | return 0; |
192 | 225 | ||
193 | mdio_unreg: | 226 | unreg: |
194 | platform_device_unregister(mdio_dev); | ||
195 | mdio_err: | ||
196 | return ret; | ||
197 | |||
198 | gfar_unreg: | ||
199 | platform_device_unregister(gfar_dev); | 227 | platform_device_unregister(gfar_dev); |
200 | gfar_err: | 228 | err: |
201 | return ret; | 229 | return ret; |
202 | } | 230 | } |
231 | |||
203 | arch_initcall(gfar_of_init); | 232 | arch_initcall(gfar_of_init); |
204 | 233 | ||
205 | static int __init fsl_i2c_of_init(void) | 234 | static int __init fsl_i2c_of_init(void) |
@@ -209,17 +238,19 @@ static int __init fsl_i2c_of_init(void) | |||
209 | struct platform_device *i2c_dev; | 238 | struct platform_device *i2c_dev; |
210 | int ret; | 239 | int ret; |
211 | 240 | ||
212 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; i++) { | 241 | for (np = NULL, i = 0; |
242 | (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; | ||
243 | i++) { | ||
213 | struct resource r[2]; | 244 | struct resource r[2]; |
214 | struct fsl_i2c_platform_data i2c_data; | 245 | struct fsl_i2c_platform_data i2c_data; |
215 | unsigned char * flags = NULL; | 246 | unsigned char *flags = NULL; |
216 | 247 | ||
217 | memset(&r, 0, sizeof(r)); | 248 | memset(&r, 0, sizeof(r)); |
218 | memset(&i2c_data, 0, sizeof(i2c_data)); | 249 | memset(&i2c_data, 0, sizeof(i2c_data)); |
219 | 250 | ||
220 | ret = of_address_to_resource(np, 0, &r[0]); | 251 | ret = of_address_to_resource(np, 0, &r[0]); |
221 | if (ret) | 252 | if (ret) |
222 | goto i2c_err; | 253 | goto err; |
223 | 254 | ||
224 | r[1].start = np->intrs[0].line; | 255 | r[1].start = np->intrs[0].line; |
225 | r[1].end = np->intrs[0].line; | 256 | r[1].end = np->intrs[0].line; |
@@ -228,7 +259,7 @@ static int __init fsl_i2c_of_init(void) | |||
228 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); | 259 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); |
229 | if (IS_ERR(i2c_dev)) { | 260 | if (IS_ERR(i2c_dev)) { |
230 | ret = PTR_ERR(i2c_dev); | 261 | ret = PTR_ERR(i2c_dev); |
231 | goto i2c_err; | 262 | goto err; |
232 | } | 263 | } |
233 | 264 | ||
234 | i2c_data.device_flags = 0; | 265 | i2c_data.device_flags = 0; |
@@ -240,18 +271,22 @@ static int __init fsl_i2c_of_init(void) | |||
240 | if (flags) | 271 | if (flags) |
241 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; | 272 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; |
242 | 273 | ||
243 | ret = platform_device_add_data(i2c_dev, &i2c_data, sizeof(struct fsl_i2c_platform_data)); | 274 | ret = |
275 | platform_device_add_data(i2c_dev, &i2c_data, | ||
276 | sizeof(struct | ||
277 | fsl_i2c_platform_data)); | ||
244 | if (ret) | 278 | if (ret) |
245 | goto i2c_unreg; | 279 | goto unreg; |
246 | } | 280 | } |
247 | 281 | ||
248 | return 0; | 282 | return 0; |
249 | 283 | ||
250 | i2c_unreg: | 284 | unreg: |
251 | platform_device_unregister(i2c_dev); | 285 | platform_device_unregister(i2c_dev); |
252 | i2c_err: | 286 | err: |
253 | return ret; | 287 | return ret; |
254 | } | 288 | } |
289 | |||
255 | arch_initcall(fsl_i2c_of_init); | 290 | arch_initcall(fsl_i2c_of_init); |
256 | 291 | ||
257 | #ifdef CONFIG_PPC_83xx | 292 | #ifdef CONFIG_PPC_83xx |
@@ -267,51 +302,192 @@ static int __init mpc83xx_wdt_init(void) | |||
267 | 302 | ||
268 | if (!np) { | 303 | if (!np) { |
269 | ret = -ENODEV; | 304 | ret = -ENODEV; |
270 | goto mpc83xx_wdt_nodev; | 305 | goto nodev; |
271 | } | 306 | } |
272 | 307 | ||
273 | soc = of_find_node_by_type(NULL, "soc"); | 308 | soc = of_find_node_by_type(NULL, "soc"); |
274 | 309 | ||
275 | if (!soc) { | 310 | if (!soc) { |
276 | ret = -ENODEV; | 311 | ret = -ENODEV; |
277 | goto mpc83xx_wdt_nosoc; | 312 | goto nosoc; |
278 | } | 313 | } |
279 | 314 | ||
280 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); | 315 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); |
281 | if (!freq) { | 316 | if (!freq) { |
282 | ret = -ENODEV; | 317 | ret = -ENODEV; |
283 | goto mpc83xx_wdt_err; | 318 | goto err; |
284 | } | 319 | } |
285 | 320 | ||
286 | memset(&r, 0, sizeof(r)); | 321 | memset(&r, 0, sizeof(r)); |
287 | 322 | ||
288 | ret = of_address_to_resource(np, 0, &r); | 323 | ret = of_address_to_resource(np, 0, &r); |
289 | if (ret) | 324 | if (ret) |
290 | goto mpc83xx_wdt_err; | 325 | goto err; |
291 | 326 | ||
292 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); | 327 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); |
293 | if (IS_ERR(dev)) { | 328 | if (IS_ERR(dev)) { |
294 | ret = PTR_ERR(dev); | 329 | ret = PTR_ERR(dev); |
295 | goto mpc83xx_wdt_err; | 330 | goto err; |
296 | } | 331 | } |
297 | 332 | ||
298 | ret = platform_device_add_data(dev, freq, sizeof(int)); | 333 | ret = platform_device_add_data(dev, freq, sizeof(int)); |
299 | if (ret) | 334 | if (ret) |
300 | goto mpc83xx_wdt_unreg; | 335 | goto unreg; |
301 | 336 | ||
302 | of_node_put(soc); | 337 | of_node_put(soc); |
303 | of_node_put(np); | 338 | of_node_put(np); |
304 | 339 | ||
305 | return 0; | 340 | return 0; |
306 | 341 | ||
307 | mpc83xx_wdt_unreg: | 342 | unreg: |
308 | platform_device_unregister(dev); | 343 | platform_device_unregister(dev); |
309 | mpc83xx_wdt_err: | 344 | err: |
310 | of_node_put(soc); | 345 | of_node_put(soc); |
311 | mpc83xx_wdt_nosoc: | 346 | nosoc: |
312 | of_node_put(np); | 347 | of_node_put(np); |
313 | mpc83xx_wdt_nodev: | 348 | nodev: |
314 | return ret; | 349 | return ret; |
315 | } | 350 | } |
351 | |||
316 | arch_initcall(mpc83xx_wdt_init); | 352 | arch_initcall(mpc83xx_wdt_init); |
317 | #endif | 353 | #endif |
354 | |||
355 | static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type) | ||
356 | { | ||
357 | if (!phy_type) | ||
358 | return FSL_USB2_PHY_NONE; | ||
359 | if (!strcasecmp(phy_type, "ulpi")) | ||
360 | return FSL_USB2_PHY_ULPI; | ||
361 | if (!strcasecmp(phy_type, "utmi")) | ||
362 | return FSL_USB2_PHY_UTMI; | ||
363 | if (!strcasecmp(phy_type, "utmi_wide")) | ||
364 | return FSL_USB2_PHY_UTMI_WIDE; | ||
365 | if (!strcasecmp(phy_type, "serial")) | ||
366 | return FSL_USB2_PHY_SERIAL; | ||
367 | |||
368 | return FSL_USB2_PHY_NONE; | ||
369 | } | ||
370 | |||
371 | static int __init fsl_usb_of_init(void) | ||
372 | { | ||
373 | struct device_node *np; | ||
374 | unsigned int i; | ||
375 | struct platform_device *usb_dev; | ||
376 | int ret; | ||
377 | |||
378 | for (np = NULL, i = 0; | ||
379 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL; | ||
380 | i++) { | ||
381 | struct resource r[2]; | ||
382 | struct fsl_usb2_platform_data usb_data; | ||
383 | unsigned char *prop = NULL; | ||
384 | |||
385 | memset(&r, 0, sizeof(r)); | ||
386 | memset(&usb_data, 0, sizeof(usb_data)); | ||
387 | |||
388 | ret = of_address_to_resource(np, 0, &r[0]); | ||
389 | if (ret) | ||
390 | goto err; | ||
391 | |||
392 | r[1].start = np->intrs[0].line; | ||
393 | r[1].end = np->intrs[0].line; | ||
394 | r[1].flags = IORESOURCE_IRQ; | ||
395 | |||
396 | usb_dev = | ||
397 | platform_device_register_simple("fsl-usb2-mph", i, r, 2); | ||
398 | if (IS_ERR(usb_dev)) { | ||
399 | ret = PTR_ERR(usb_dev); | ||
400 | goto err; | ||
401 | } | ||
402 | |||
403 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
404 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
405 | |||
406 | usb_data.operating_mode = FSL_USB2_MPH_HOST; | ||
407 | |||
408 | prop = get_property(np, "port0", NULL); | ||
409 | if (prop) | ||
410 | usb_data.port_enables |= FSL_USB2_PORT0_ENABLED; | ||
411 | |||
412 | prop = get_property(np, "port1", NULL); | ||
413 | if (prop) | ||
414 | usb_data.port_enables |= FSL_USB2_PORT1_ENABLED; | ||
415 | |||
416 | prop = get_property(np, "phy_type", NULL); | ||
417 | usb_data.phy_mode = determine_usb_phy(prop); | ||
418 | |||
419 | ret = | ||
420 | platform_device_add_data(usb_dev, &usb_data, | ||
421 | sizeof(struct | ||
422 | fsl_usb2_platform_data)); | ||
423 | if (ret) | ||
424 | goto unreg; | ||
425 | } | ||
426 | |||
427 | return 0; | ||
428 | |||
429 | unreg: | ||
430 | platform_device_unregister(usb_dev); | ||
431 | err: | ||
432 | return ret; | ||
433 | } | ||
434 | |||
435 | arch_initcall(fsl_usb_of_init); | ||
436 | |||
437 | static int __init fsl_usb_dr_of_init(void) | ||
438 | { | ||
439 | struct device_node *np; | ||
440 | unsigned int i; | ||
441 | struct platform_device *usb_dev; | ||
442 | int ret; | ||
443 | |||
444 | for (np = NULL, i = 0; | ||
445 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL; | ||
446 | i++) { | ||
447 | struct resource r[2]; | ||
448 | struct fsl_usb2_platform_data usb_data; | ||
449 | unsigned char *prop = NULL; | ||
450 | |||
451 | memset(&r, 0, sizeof(r)); | ||
452 | memset(&usb_data, 0, sizeof(usb_data)); | ||
453 | |||
454 | ret = of_address_to_resource(np, 0, &r[0]); | ||
455 | if (ret) | ||
456 | goto err; | ||
457 | |||
458 | r[1].start = np->intrs[0].line; | ||
459 | r[1].end = np->intrs[0].line; | ||
460 | r[1].flags = IORESOURCE_IRQ; | ||
461 | |||
462 | usb_dev = | ||
463 | platform_device_register_simple("fsl-usb2-dr", i, r, 2); | ||
464 | if (IS_ERR(usb_dev)) { | ||
465 | ret = PTR_ERR(usb_dev); | ||
466 | goto err; | ||
467 | } | ||
468 | |||
469 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
470 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
471 | |||
472 | usb_data.operating_mode = FSL_USB2_DR_HOST; | ||
473 | |||
474 | prop = get_property(np, "phy_type", NULL); | ||
475 | usb_data.phy_mode = determine_usb_phy(prop); | ||
476 | |||
477 | ret = | ||
478 | platform_device_add_data(usb_dev, &usb_data, | ||
479 | sizeof(struct | ||
480 | fsl_usb2_platform_data)); | ||
481 | if (ret) | ||
482 | goto unreg; | ||
483 | } | ||
484 | |||
485 | return 0; | ||
486 | |||
487 | unreg: | ||
488 | platform_device_unregister(usb_dev); | ||
489 | err: | ||
490 | return ret; | ||
491 | } | ||
492 | |||
493 | arch_initcall(fsl_usb_dr_of_init); | ||
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h index a7ce7da8785c..a60c9d18bb7f 100644 --- a/arch/powerpc/sysdev/ipic.h +++ b/arch/powerpc/sysdev/ipic.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ipic.h | ||
3 | * | ||
4 | * IPIC private definitions and structure. | 2 | * IPIC private definitions and structure. |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 7d02fa2a8990..4735b41c113c 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -191,6 +191,7 @@ Commands:\n\ | |||
191 | di dump instructions\n\ | 191 | di dump instructions\n\ |
192 | df dump float values\n\ | 192 | df dump float values\n\ |
193 | dd dump double values\n\ | 193 | dd dump double values\n\ |
194 | dr dump stream of raw bytes\n\ | ||
194 | e print exception information\n\ | 195 | e print exception information\n\ |
195 | f flush cache\n\ | 196 | f flush cache\n\ |
196 | la lookup symbol+offset of specified address\n\ | 197 | la lookup symbol+offset of specified address\n\ |
@@ -1938,6 +1939,28 @@ bsesc(void) | |||
1938 | return c; | 1939 | return c; |
1939 | } | 1940 | } |
1940 | 1941 | ||
1942 | static void xmon_rawdump (unsigned long adrs, long ndump) | ||
1943 | { | ||
1944 | long n, m, r, nr; | ||
1945 | unsigned char temp[16]; | ||
1946 | |||
1947 | for (n = ndump; n > 0;) { | ||
1948 | r = n < 16? n: 16; | ||
1949 | nr = mread(adrs, temp, r); | ||
1950 | adrs += nr; | ||
1951 | for (m = 0; m < r; ++m) { | ||
1952 | if (m < nr) | ||
1953 | printf("%.2x", temp[m]); | ||
1954 | else | ||
1955 | printf("%s", fault_chars[fault_type]); | ||
1956 | } | ||
1957 | n -= r; | ||
1958 | if (nr < r) | ||
1959 | break; | ||
1960 | } | ||
1961 | printf("\n"); | ||
1962 | } | ||
1963 | |||
1941 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ | 1964 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ |
1942 | || ('a' <= (c) && (c) <= 'f') \ | 1965 | || ('a' <= (c) && (c) <= 'f') \ |
1943 | || ('A' <= (c) && (c) <= 'F')) | 1966 | || ('A' <= (c) && (c) <= 'F')) |
@@ -1960,6 +1983,13 @@ dump(void) | |||
1960 | nidump = MAX_DUMP; | 1983 | nidump = MAX_DUMP; |
1961 | adrs += ppc_inst_dump(adrs, nidump, 1); | 1984 | adrs += ppc_inst_dump(adrs, nidump, 1); |
1962 | last_cmd = "di\n"; | 1985 | last_cmd = "di\n"; |
1986 | } else if (c == 'r') { | ||
1987 | scanhex(&ndump); | ||
1988 | if (ndump == 0) | ||
1989 | ndump = 64; | ||
1990 | xmon_rawdump(adrs, ndump); | ||
1991 | adrs += ndump; | ||
1992 | last_cmd = "dr\n"; | ||
1963 | } else { | 1993 | } else { |
1964 | scanhex(&ndump); | 1994 | scanhex(&ndump); |
1965 | if (ndump == 0) | 1995 | if (ndump == 0) |
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index 8ace2a1f3b48..98b25fa0049a 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/4xx_io/serial_sicc.c | ||
3 | * | ||
4 | * Driver for IBM STB3xxx SICC serial port | 2 | * Driver for IBM STB3xxx SICC serial port |
5 | * | 3 | * |
6 | * Based on drivers/char/serial_amba.c, by ARM Ltd. | 4 | * Based on drivers/char/serial_amba.c, by ARM Ltd. |
@@ -1639,9 +1637,8 @@ static struct SICC_info *siccuart_get(int line) | |||
1639 | state->count++; | 1637 | state->count++; |
1640 | if (state->info) | 1638 | if (state->info) |
1641 | return state->info; | 1639 | return state->info; |
1642 | info = kmalloc(sizeof(struct SICC_info), GFP_KERNEL); | 1640 | info = kzalloc(sizeof(struct SICC_info), GFP_KERNEL); |
1643 | if (info) { | 1641 | if (info) { |
1644 | memset(info, 0, sizeof(struct SICC_info)); | ||
1645 | init_waitqueue_head(&info->open_wait); | 1642 | init_waitqueue_head(&info->open_wait); |
1646 | init_waitqueue_head(&info->close_wait); | 1643 | init_waitqueue_head(&info->close_wait); |
1647 | init_waitqueue_head(&info->delta_msr_wait); | 1644 | init_waitqueue_head(&info->delta_msr_wait); |
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 579cd40258b9..12b84ca51327 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -73,7 +73,7 @@ cpm_mask_irq(unsigned int irq) | |||
73 | { | 73 | { |
74 | int cpm_vec = irq - CPM_IRQ_OFFSET; | 74 | int cpm_vec = irq - CPM_IRQ_OFFSET; |
75 | 75 | ||
76 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) & ~(1 << cpm_vec)); | 76 | clrbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec)); |
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
@@ -81,7 +81,7 @@ cpm_unmask_irq(unsigned int irq) | |||
81 | { | 81 | { |
82 | int cpm_vec = irq - CPM_IRQ_OFFSET; | 82 | int cpm_vec = irq - CPM_IRQ_OFFSET; |
83 | 83 | ||
84 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) | (1 << cpm_vec)); | 84 | setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec)); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
@@ -198,7 +198,7 @@ cpm_interrupt_init(void) | |||
198 | if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) | 198 | if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) |
199 | panic("Could not allocate CPM error IRQ!"); | 199 | panic("Could not allocate CPM error IRQ!"); |
200 | 200 | ||
201 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr) | CICR_IEN); | 201 | setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, CICR_IEN); |
202 | } | 202 | } |
203 | 203 | ||
204 | /* | 204 | /* |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 11899f06bf06..54a0a9bb12dd 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -481,6 +481,53 @@ config WINCEPT | |||
481 | 481 | ||
482 | endchoice | 482 | endchoice |
483 | 483 | ||
484 | menu "Freescale Ethernet driver platform-specific options" | ||
485 | depends on FS_ENET | ||
486 | |||
487 | config MPC8xx_SECOND_ETH | ||
488 | bool "Second Ethernet channel" | ||
489 | depends on (MPC885ADS || MPC86XADS) | ||
490 | default y | ||
491 | help | ||
492 | This enables support for second Ethernet on MPC885ADS and MPC86xADS boards. | ||
493 | The latter will use SCC1, for 885ADS you can select it below. | ||
494 | |||
495 | choice | ||
496 | prompt "Second Ethernet channel" | ||
497 | depends on MPC8xx_SECOND_ETH | ||
498 | default MPC8xx_SECOND_ETH_FEC2 | ||
499 | |||
500 | config MPC8xx_SECOND_ETH_FEC2 | ||
501 | bool "FEC2" | ||
502 | depends on MPC885ADS | ||
503 | help | ||
504 | Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2 | ||
505 | (often 2-nd UART) will not work if this is enabled. | ||
506 | |||
507 | config MPC8xx_SECOND_ETH_SCC1 | ||
508 | bool "SCC1" | ||
509 | depends on MPC86XADS | ||
510 | select MPC8xx_SCC_ENET_FIXED | ||
511 | help | ||
512 | Enable SCC1 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
513 | (often 1-nd UART) will not work if this is enabled. | ||
514 | |||
515 | config MPC8xx_SECOND_ETH_SCC3 | ||
516 | bool "SCC3" | ||
517 | depends on MPC885ADS | ||
518 | help | ||
519 | Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
520 | (often 1-nd UART) will not work if this is enabled. | ||
521 | |||
522 | endchoice | ||
523 | |||
524 | config MPC8xx_SCC_ENET_FIXED | ||
525 | depends on MPC8xx_SECOND_ETH_SCC | ||
526 | default n | ||
527 | bool "Use fixed MII-less mode for SCC Ethernet" | ||
528 | |||
529 | endmenu | ||
530 | |||
484 | choice | 531 | choice |
485 | prompt "Machine Type" | 532 | prompt "Machine Type" |
486 | depends on 6xx || POWER3 | 533 | depends on 6xx || POWER3 |
diff --git a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug index 61653cb60c4e..8cc75abf3d83 100644 --- a/arch/ppc/Kconfig.debug +++ b/arch/ppc/Kconfig.debug | |||
@@ -67,7 +67,7 @@ config SERIAL_TEXT_DEBUG | |||
67 | 67 | ||
68 | config PPC_OCP | 68 | config PPC_OCP |
69 | bool | 69 | bool |
70 | depends on IBM_OCP || XILINX_OCP | 70 | depends on IBM_OCP |
71 | default y | 71 | default y |
72 | 72 | ||
73 | endmenu | 73 | endmenu |
diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c index 5f35cf3986f7..b2bba052ab93 100644 --- a/arch/ppc/amiga/amiints.c +++ b/arch/ppc/amiga/amiints.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/amiints.c -- Amiga Linux interrupt handling code | 2 | * Amiga Linux interrupt handling code |
3 | * | 3 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file COPYING in the main directory of this archive | 5 | * License. See the file COPYING in the main directory of this archive |
diff --git a/arch/ppc/amiga/bootinfo.c b/arch/ppc/amiga/bootinfo.c index e2e965661d03..efd869a3ed9b 100644 --- a/arch/ppc/amiga/bootinfo.c +++ b/arch/ppc/amiga/bootinfo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/bootinfo.c | ||
3 | * | ||
4 | * Extracted from arch/m68k/kernel/setup.c. | 2 | * Extracted from arch/m68k/kernel/setup.c. |
5 | * Should be properly generalized and put somewhere else. | 3 | * Should be properly generalized and put somewhere else. |
6 | * Jesper | 4 | * Jesper |
diff --git a/arch/ppc/amiga/cia.c b/arch/ppc/amiga/cia.c index 4431c58f611a..9558f2f40e64 100644 --- a/arch/ppc/amiga/cia.c +++ b/arch/ppc/amiga/cia.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/cia.c - CIA support | ||
3 | * | ||
4 | * Copyright (C) 1996 Roman Zippel | 2 | * Copyright (C) 1996 Roman Zippel |
5 | * | 3 | * |
6 | * The concept of some functions bases on the original Amiga OS function | 4 | * The concept of some functions bases on the original Amiga OS function |
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c index 60e2da1c92c0..bbe47c9bd707 100644 --- a/arch/ppc/amiga/config.c +++ b/arch/ppc/amiga/config.c | |||
@@ -1,8 +1,6 @@ | |||
1 | #define m68k_debug_device debug_device | 1 | #define m68k_debug_device debug_device |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * arch/ppc/amiga/config.c | ||
5 | * | ||
6 | * Copyright (C) 1993 Hamish Macdonald | 4 | * Copyright (C) 1993 Hamish Macdonald |
7 | * | 5 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/amiga/ints.c b/arch/ppc/amiga/ints.c index 5d318e498f06..083a17462190 100644 --- a/arch/ppc/amiga/ints.c +++ b/arch/ppc/amiga/ints.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/ints.c | ||
3 | * | ||
4 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c | 2 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c |
5 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. | 3 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. |
6 | */ | 4 | */ |
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index efd8ce515d5f..f565699a9fe0 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile | |||
@@ -1,6 +1,3 @@ | |||
1 | # | ||
2 | # arch/ppc/boot/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 1 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 2 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 3 | # for more details. |
diff --git a/arch/ppc/boot/common/Makefile b/arch/ppc/boot/common/Makefile index f88d647d5dd4..a2e85e3beb88 100644 --- a/arch/ppc/boot/common/Makefile +++ b/arch/ppc/boot/common/Makefile | |||
@@ -1,6 +1,3 @@ | |||
1 | # | ||
2 | # arch/ppc/boot/common/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 1 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 2 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 3 | # for more details. |
diff --git a/arch/ppc/boot/common/bootinfo.c b/arch/ppc/boot/common/bootinfo.c index 9c6e528940e9..f4dc9b9fab9c 100644 --- a/arch/ppc/boot/common/bootinfo.c +++ b/arch/ppc/boot/common/bootinfo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/common/bootinfo.c | ||
3 | * | ||
4 | * General bootinfo record utilities | 2 | * General bootinfo record utilities |
5 | * Author: Randy Vinson <rvinson@mvista.com> | 3 | * Author: Randy Vinson <rvinson@mvista.com> |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c index e79e6b3f276e..073830a8559a 100644 --- a/arch/ppc/boot/common/misc-common.c +++ b/arch/ppc/boot/common/misc-common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/misc-common.c | ||
3 | * | ||
4 | * Misc. bootloader code (almost) all platforms can use | 2 | * Misc. bootloader code (almost) all platforms can use |
5 | * | 3 | * |
6 | * Author: Johnnie Peters <jpeters@mvista.com> | 4 | * Author: Johnnie Peters <jpeters@mvista.com> |
diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c index 26818bbb6cff..4f00c93ac870 100644 --- a/arch/ppc/boot/common/ns16550.c +++ b/arch/ppc/boot/common/ns16550.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <linux/serial_reg.h> | 8 | #include <linux/serial_reg.h> |
9 | #include <asm/serial.h> | 9 | #include <asm/serial.h> |
10 | 10 | ||
11 | #if defined(CONFIG_XILINX_VIRTEX) | ||
12 | #include <platforms/4xx/xparameters/xparameters.h> | ||
13 | #endif | ||
11 | #include "nonstdio.h" | 14 | #include "nonstdio.h" |
12 | #include "serial.h" | 15 | #include "serial.h" |
13 | 16 | ||
diff --git a/arch/ppc/boot/common/serial_stub.c b/arch/ppc/boot/common/serial_stub.c index 03dfaa01fa63..5cc9ae66a8ba 100644 --- a/arch/ppc/boot/common/serial_stub.c +++ b/arch/ppc/boot/common/serial_stub.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/serial_stub.c | ||
3 | * | ||
4 | * This is a few stub routines to make the boot code cleaner looking when | 2 | * This is a few stub routines to make the boot code cleaner looking when |
5 | * there is no serial port support doesn't need to be closed, for example. | 3 | * there is no serial port support doesn't need to be closed, for example. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S index 368ec035e6cd..0c5e43c4ae06 100644 --- a/arch/ppc/boot/common/util.S +++ b/arch/ppc/boot/common/util.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/util.S | ||
3 | * | ||
4 | * Useful bootup functions, which are more easily done in asm than C. | 2 | * Useful bootup functions, which are more easily done in asm than C. |
5 | * | 3 | * |
6 | * NOTE: Be very very careful about the registers you use here. | 4 | * NOTE: Be very very careful about the registers you use here. |
diff --git a/arch/ppc/boot/include/mpc10x.h b/arch/ppc/boot/include/mpc10x.h index 6cd40ecabc74..6e5d540d8d3e 100644 --- a/arch/ppc/boot/include/mpc10x.h +++ b/arch/ppc/boot/include/mpc10x.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/include/mpc10.h | ||
3 | * | ||
4 | * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem | 2 | * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem |
5 | * ctrl/EPIC/etc. | 3 | * ctrl/EPIC/etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index 9533f8de238f..28be01b99c44 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -192,6 +192,7 @@ boot-$(CONFIG_8xx) += embed_config.o | |||
192 | boot-$(CONFIG_8260) += embed_config.o | 192 | boot-$(CONFIG_8260) += embed_config.o |
193 | boot-$(CONFIG_EP405) += embed_config.o | 193 | boot-$(CONFIG_EP405) += embed_config.o |
194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o | 194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o |
195 | boot-$(CONFIG_XILINX_ML403) += embed_config.o | ||
195 | boot-$(CONFIG_BSEIP) += iic.o | 196 | boot-$(CONFIG_BSEIP) += iic.o |
196 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o | 197 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o |
197 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o | 198 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o |
diff --git a/arch/ppc/boot/simple/cpc700_memory.c b/arch/ppc/boot/simple/cpc700_memory.c index 8c75cf6c2383..d75420a45a59 100644 --- a/arch/ppc/boot/simple/cpc700_memory.c +++ b/arch/ppc/boot/simple/cpc700_memory.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/cpc700_memory.c | ||
3 | * | ||
4 | * Find memory based upon settings in the CPC700 bridge | 2 | * Find memory based upon settings in the CPC700 bridge |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c index 491a691d10cc..3a51b1062940 100644 --- a/arch/ppc/boot/simple/embed_config.c +++ b/arch/ppc/boot/simple/embed_config.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #ifdef CONFIG_40x | 21 | #ifdef CONFIG_40x |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #endif | 23 | #endif |
24 | #ifdef CONFIG_XILINX_VIRTEX | ||
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | #endif | ||
24 | extern unsigned long timebase_period_ns; | 27 | extern unsigned long timebase_period_ns; |
25 | 28 | ||
26 | /* For those boards that don't provide one. | 29 | /* For those boards that don't provide one. |
@@ -742,7 +745,7 @@ embed_config(bd_t **bdp) | |||
742 | } | 745 | } |
743 | #endif /* WILLOW */ | 746 | #endif /* WILLOW */ |
744 | 747 | ||
745 | #ifdef CONFIG_XILINX_ML300 | 748 | #if defined(CONFIG_XILINX_ML300) || defined(CONFIG_XILINX_ML403) |
746 | void | 749 | void |
747 | embed_config(bd_t ** bdp) | 750 | embed_config(bd_t ** bdp) |
748 | { | 751 | { |
@@ -779,7 +782,7 @@ embed_config(bd_t ** bdp) | |||
779 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; | 782 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; |
780 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ | 783 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ |
781 | } | 784 | } |
782 | #endif /* CONFIG_XILINX_ML300 */ | 785 | #endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */ |
783 | 786 | ||
784 | #ifdef CONFIG_IBM_OPENBIOS | 787 | #ifdef CONFIG_IBM_OPENBIOS |
785 | /* This could possibly work for all treeboot roms. | 788 | /* This could possibly work for all treeboot roms. |
diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S index 5e4adc298bf9..160da1006ff8 100644 --- a/arch/ppc/boot/simple/head.S +++ b/arch/ppc/boot/simple/head.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/head.S | ||
3 | * | ||
4 | * Initial board bringup code for many different boards. | 2 | * Initial board bringup code for many different boards. |
5 | * | 3 | * |
6 | * Author: Tom Rini | 4 | * Author: Tom Rini |
@@ -65,6 +63,13 @@ start_: | |||
65 | */ | 63 | */ |
66 | #endif | 64 | #endif |
67 | 65 | ||
66 | #if defined(CONFIG_XILINX_VIRTEX_4_FX) | ||
67 | /* PPC errata 213: only for Virtex-4 FX */ | ||
68 | mfccr0 0 | ||
69 | oris 0,0,0x50000000@h | ||
70 | mtccr0 0 | ||
71 | #endif | ||
72 | |||
68 | mflr r3 /* Save our actual starting address. */ | 73 | mflr r3 /* Save our actual starting address. */ |
69 | 74 | ||
70 | /* The following functions we call must not modify r3 or r4..... | 75 | /* The following functions we call must not modify r3 or r4..... |
diff --git a/arch/ppc/boot/simple/misc-chestnut.c b/arch/ppc/boot/simple/misc-chestnut.c index 0dce7f3557e4..b94e142ad892 100644 --- a/arch/ppc/boot/simple/misc-chestnut.c +++ b/arch/ppc/boot/simple/misc-chestnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-chestnut.c | ||
3 | * | ||
4 | * Setup for the IBM Chestnut (ibm-750fxgx_eval) | 2 | * Setup for the IBM Chestnut (ibm-750fxgx_eval) |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-cpci690.c b/arch/ppc/boot/simple/misc-cpci690.c index 26860300fa09..8a8614d11a32 100644 --- a/arch/ppc/boot/simple/misc-cpci690.c +++ b/arch/ppc/boot/simple/misc-cpci690.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-cpci690.c | ||
3 | * | ||
4 | * Add birec data for Force CPCI690 board. | 2 | * Add birec data for Force CPCI690 board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-ev64260.c b/arch/ppc/boot/simple/misc-ev64260.c index 52ece6937a7a..2678c224af22 100644 --- a/arch/ppc/boot/simple/misc-ev64260.c +++ b/arch/ppc/boot/simple/misc-ev64260.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-ev64260.c | ||
3 | * | ||
4 | * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board | 2 | * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board |
5 | * with a GT64260 onboard. | 3 | * with a GT64260 onboard. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/misc-ev64360.c b/arch/ppc/boot/simple/misc-ev64360.c index cd1ccf2a1582..a212b5b988cb 100644 --- a/arch/ppc/boot/simple/misc-ev64360.c +++ b/arch/ppc/boot/simple/misc-ev64360.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-ev64360.c | ||
3 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> | 2 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> |
4 | * | 3 | * |
5 | * Based on arch/ppc/boot/simple/misc-katana.c from: | 4 | * Based on arch/ppc/boot/simple/misc-katana.c from: |
diff --git a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c index ec94a11bacac..d97f2ee6f04e 100644 --- a/arch/ppc/boot/simple/misc-katana.c +++ b/arch/ppc/boot/simple/misc-katana.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-katana.c | ||
3 | * | ||
4 | * Set up MPSC values to bootwrapper can prompt user. | 2 | * Set up MPSC values to bootwrapper can prompt user. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c index 258d4599fadc..71ff20fd494a 100644 --- a/arch/ppc/boot/simple/misc-mv64x60.c +++ b/arch/ppc/boot/simple/misc-mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-mv64x60.c | ||
3 | * | ||
4 | * Relocate bridge's register base and call board specific routine. | 2 | * Relocate bridge's register base and call board specific routine. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c index 75380ac41669..63def9d13d70 100644 --- a/arch/ppc/boot/simple/misc-prep.c +++ b/arch/ppc/boot/simple/misc-prep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-prep.c | ||
3 | * | ||
4 | * Maintainer: Tom Rini <trini@kernel.crashing.org> | 2 | * Maintainer: Tom Rini <trini@kernel.crashing.org> |
5 | * | 3 | * |
6 | * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> | 4 | * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> |
diff --git a/arch/ppc/boot/simple/misc-radstone_ppc7d.c b/arch/ppc/boot/simple/misc-radstone_ppc7d.c index 569e0d4feeaf..0f302ea9c3d1 100644 --- a/arch/ppc/boot/simple/misc-radstone_ppc7d.c +++ b/arch/ppc/boot/simple/misc-radstone_ppc7d.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-radstone_ppc7d.c | ||
3 | * | ||
4 | * Misc data for Radstone PPC7D board. | 2 | * Misc data for Radstone PPC7D board. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
diff --git a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c index d012c39278fd..0cad2f557a1e 100644 --- a/arch/ppc/boot/simple/misc-spruce.c +++ b/arch/ppc/boot/simple/misc-spruce.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/spruce/misc.c | ||
3 | * | ||
4 | * Misc. bootloader code for IBM Spruce reference platform | 2 | * Misc. bootloader code for IBM Spruce reference platform |
5 | * | 3 | * |
6 | * Authors: Johnnie Peters <jpeters@mvista.com> | 4 | * Authors: Johnnie Peters <jpeters@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c index f415d6c62362..3d78571ad945 100644 --- a/arch/ppc/boot/simple/misc.c +++ b/arch/ppc/boot/simple/misc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/simple/misc.c | ||
3 | * | ||
4 | * Misc. bootloader code for many machines. This assumes you have are using | 2 | * Misc. bootloader code for many machines. This assumes you have are using |
5 | * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory | 3 | * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory |
6 | * below 8MB is free. Finally, it assumes you have a NS16550-style uart for | 4 | * below 8MB is free. Finally, it assumes you have a NS16550-style uart for |
diff --git a/arch/ppc/boot/simple/mpc10x_memory.c b/arch/ppc/boot/simple/mpc10x_memory.c index 20d92a34ceb8..c24290823f7f 100644 --- a/arch/ppc/boot/simple/mpc10x_memory.c +++ b/arch/ppc/boot/simple/mpc10x_memory.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/mpc10x_common.c | ||
3 | * | ||
4 | * A routine to find out how much memory the machine has. | 2 | * A routine to find out how much memory the machine has. |
5 | * | 3 | * |
6 | * Based on: | 4 | * Based on: |
diff --git a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c index 3acc6b7c0727..1964493cf3bd 100644 --- a/arch/ppc/boot/simple/mpc52xx_tty.c +++ b/arch/ppc/boot/simple/mpc52xx_tty.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/mpc52xx_tty.c | ||
3 | * | ||
4 | * Minimal serial functions needed to send messages out a MPC52xx | 2 | * Minimal serial functions needed to send messages out a MPC52xx |
5 | * Programmable Serial Controller (PSC). | 3 | * Programmable Serial Controller (PSC). |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c index b9c24d4c738b..0c52f5c784a2 100644 --- a/arch/ppc/boot/simple/mv64x60_tty.c +++ b/arch/ppc/boot/simple/mv64x60_tty.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/mv64x60_tty.c | ||
3 | * | ||
4 | * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60. | 2 | * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60. |
5 | * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA). | 3 | * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA). |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c index 81f11d8b30a7..3f2ed53f793a 100644 --- a/arch/ppc/boot/simple/openbios.c +++ b/arch/ppc/boot/simple/openbios.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/openbios.c | ||
3 | * | ||
4 | * Copyright (c) 2005 DENX Software Engineering | 2 | * Copyright (c) 2005 DENX Software Engineering |
5 | * Stefan Roese <sr@denx.de> | 3 | * Stefan Roese <sr@denx.de> |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S index 555a216ccc49..7efddc507564 100644 --- a/arch/ppc/boot/simple/relocate.S +++ b/arch/ppc/boot/simple/relocate.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/relocate.S | ||
3 | * | ||
4 | * This is the common part of the loader relocation and initialization | 2 | * This is the common part of the loader relocation and initialization |
5 | * process. All of the board/processor specific initialization is | 3 | * process. All of the board/processor specific initialization is |
6 | * done before we get here. | 4 | * done before we get here. |
diff --git a/arch/ppc/boot/utils/mkbugboot.c b/arch/ppc/boot/utils/mkbugboot.c index 886122283f39..29115e01f60a 100644 --- a/arch/ppc/boot/utils/mkbugboot.c +++ b/arch/ppc/boot/utils/mkbugboot.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/utils/mkbugboot.c | ||
3 | * | ||
4 | * Makes a Motorola PPCBUG ROM bootable image which can be flashed | 2 | * Makes a Motorola PPCBUG ROM bootable image which can be flashed |
5 | * into one of the FLASH banks on a Motorola PowerPlus board. | 3 | * into one of the FLASH banks on a Motorola PowerPlus board. |
6 | * | 4 | * |
diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig new file mode 100644 index 000000000000..4a33aca948cc --- /dev/null +++ b/arch/ppc/configs/ml300_defconfig | |||
@@ -0,0 +1,739 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 00:49:20 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | CONFIG_XILINX_ML300=y | ||
116 | CONFIG_IBM405_ERR77=y | ||
117 | CONFIG_IBM405_ERR51=y | ||
118 | CONFIG_XILINX_VIRTEX=y | ||
119 | CONFIG_EMBEDDEDBOOT=y | ||
120 | # CONFIG_PPC4xx_DMA is not set | ||
121 | CONFIG_PPC_GEN550=y | ||
122 | CONFIG_UART0_TTYS0=y | ||
123 | # CONFIG_UART0_TTYS1 is not set | ||
124 | CONFIG_NOT_COHERENT_CACHE=y | ||
125 | |||
126 | # | ||
127 | # Platform options | ||
128 | # | ||
129 | # CONFIG_PC_KEYBOARD is not set | ||
130 | # CONFIG_HIGHMEM is not set | ||
131 | # CONFIG_HZ_100 is not set | ||
132 | CONFIG_HZ_250=y | ||
133 | # CONFIG_HZ_1000 is not set | ||
134 | CONFIG_HZ=250 | ||
135 | CONFIG_PREEMPT_NONE=y | ||
136 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
137 | # CONFIG_PREEMPT is not set | ||
138 | CONFIG_SELECT_MEMORY_MODEL=y | ||
139 | CONFIG_FLATMEM_MANUAL=y | ||
140 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
141 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
142 | CONFIG_FLATMEM=y | ||
143 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
144 | # CONFIG_SPARSEMEM_STATIC is not set | ||
145 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
146 | CONFIG_BINFMT_ELF=y | ||
147 | # CONFIG_BINFMT_MISC is not set | ||
148 | CONFIG_CMDLINE_BOOL=y | ||
149 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
150 | # CONFIG_PM is not set | ||
151 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
152 | CONFIG_SECCOMP=y | ||
153 | CONFIG_ISA_DMA_API=y | ||
154 | |||
155 | # | ||
156 | # Bus options | ||
157 | # | ||
158 | # CONFIG_PPC_I8259 is not set | ||
159 | # CONFIG_PCI is not set | ||
160 | # CONFIG_PCI_DOMAINS is not set | ||
161 | |||
162 | # | ||
163 | # PCCARD (PCMCIA/CardBus) support | ||
164 | # | ||
165 | # CONFIG_PCCARD is not set | ||
166 | |||
167 | # | ||
168 | # Advanced setup | ||
169 | # | ||
170 | # CONFIG_ADVANCED_OPTIONS is not set | ||
171 | |||
172 | # | ||
173 | # Default settings for advanced configuration options are used | ||
174 | # | ||
175 | CONFIG_HIGHMEM_START=0xfe000000 | ||
176 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
177 | CONFIG_KERNEL_START=0xc0000000 | ||
178 | CONFIG_TASK_SIZE=0x80000000 | ||
179 | CONFIG_CONSISTENT_START=0xff100000 | ||
180 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
181 | CONFIG_BOOT_LOAD=0x00400000 | ||
182 | |||
183 | # | ||
184 | # Networking | ||
185 | # | ||
186 | CONFIG_NET=y | ||
187 | |||
188 | # | ||
189 | # Networking options | ||
190 | # | ||
191 | CONFIG_PACKET=y | ||
192 | CONFIG_PACKET_MMAP=y | ||
193 | CONFIG_UNIX=y | ||
194 | # CONFIG_NET_KEY is not set | ||
195 | CONFIG_INET=y | ||
196 | # CONFIG_IP_MULTICAST is not set | ||
197 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
198 | CONFIG_IP_FIB_HASH=y | ||
199 | CONFIG_IP_PNP=y | ||
200 | CONFIG_IP_PNP_DHCP=y | ||
201 | # CONFIG_IP_PNP_BOOTP is not set | ||
202 | # CONFIG_IP_PNP_RARP is not set | ||
203 | # CONFIG_NET_IPIP is not set | ||
204 | # CONFIG_NET_IPGRE is not set | ||
205 | # CONFIG_ARPD is not set | ||
206 | # CONFIG_SYN_COOKIES is not set | ||
207 | # CONFIG_INET_AH is not set | ||
208 | # CONFIG_INET_ESP is not set | ||
209 | # CONFIG_INET_IPCOMP is not set | ||
210 | # CONFIG_INET_TUNNEL is not set | ||
211 | CONFIG_INET_DIAG=y | ||
212 | CONFIG_INET_TCP_DIAG=y | ||
213 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
214 | CONFIG_TCP_CONG_BIC=y | ||
215 | # CONFIG_IPV6 is not set | ||
216 | # CONFIG_NETFILTER is not set | ||
217 | |||
218 | # | ||
219 | # DCCP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_DCCP is not set | ||
222 | |||
223 | # | ||
224 | # SCTP Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_IP_SCTP is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | |||
237 | # | ||
238 | # TIPC Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_TIPC is not set | ||
241 | # CONFIG_NET_DIVERT is not set | ||
242 | # CONFIG_ECONET is not set | ||
243 | # CONFIG_WAN_ROUTER is not set | ||
244 | |||
245 | # | ||
246 | # QoS and/or fair queueing | ||
247 | # | ||
248 | # CONFIG_NET_SCHED is not set | ||
249 | |||
250 | # | ||
251 | # Network testing | ||
252 | # | ||
253 | # CONFIG_NET_PKTGEN is not set | ||
254 | # CONFIG_HAMRADIO is not set | ||
255 | # CONFIG_IRDA is not set | ||
256 | # CONFIG_BT is not set | ||
257 | # CONFIG_IEEE80211 is not set | ||
258 | |||
259 | # | ||
260 | # Device Drivers | ||
261 | # | ||
262 | |||
263 | # | ||
264 | # Generic Driver Options | ||
265 | # | ||
266 | CONFIG_STANDALONE=y | ||
267 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
268 | # CONFIG_FW_LOADER is not set | ||
269 | # CONFIG_DEBUG_DRIVER is not set | ||
270 | |||
271 | # | ||
272 | # Connector - unified userspace <-> kernelspace linker | ||
273 | # | ||
274 | # CONFIG_CONNECTOR is not set | ||
275 | |||
276 | # | ||
277 | # Memory Technology Devices (MTD) | ||
278 | # | ||
279 | # CONFIG_MTD is not set | ||
280 | |||
281 | # | ||
282 | # Parallel port support | ||
283 | # | ||
284 | # CONFIG_PARPORT is not set | ||
285 | |||
286 | # | ||
287 | # Plug and Play support | ||
288 | # | ||
289 | |||
290 | # | ||
291 | # Block devices | ||
292 | # | ||
293 | # CONFIG_BLK_DEV_FD is not set | ||
294 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
295 | # CONFIG_BLK_DEV_LOOP is not set | ||
296 | # CONFIG_BLK_DEV_NBD is not set | ||
297 | CONFIG_BLK_DEV_RAM=y | ||
298 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
299 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
300 | CONFIG_BLK_DEV_INITRD=y | ||
301 | # CONFIG_CDROM_PKTCDVD is not set | ||
302 | # CONFIG_ATA_OVER_ETH is not set | ||
303 | |||
304 | # | ||
305 | # ATA/ATAPI/MFM/RLL support | ||
306 | # | ||
307 | # CONFIG_IDE is not set | ||
308 | |||
309 | # | ||
310 | # SCSI device support | ||
311 | # | ||
312 | # CONFIG_RAID_ATTRS is not set | ||
313 | # CONFIG_SCSI is not set | ||
314 | |||
315 | # | ||
316 | # Multi-device support (RAID and LVM) | ||
317 | # | ||
318 | # CONFIG_MD is not set | ||
319 | |||
320 | # | ||
321 | # Fusion MPT device support | ||
322 | # | ||
323 | # CONFIG_FUSION is not set | ||
324 | |||
325 | # | ||
326 | # IEEE 1394 (FireWire) support | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # I2O device support | ||
331 | # | ||
332 | |||
333 | # | ||
334 | # Macintosh device drivers | ||
335 | # | ||
336 | # CONFIG_WINDFARM is not set | ||
337 | |||
338 | # | ||
339 | # Network device support | ||
340 | # | ||
341 | CONFIG_NETDEVICES=y | ||
342 | # CONFIG_DUMMY is not set | ||
343 | # CONFIG_BONDING is not set | ||
344 | # CONFIG_EQUALIZER is not set | ||
345 | CONFIG_TUN=y | ||
346 | |||
347 | # | ||
348 | # PHY device support | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Ethernet (10 or 100Mbit) | ||
353 | # | ||
354 | # CONFIG_NET_ETHERNET is not set | ||
355 | # CONFIG_IBM_EMAC is not set | ||
356 | |||
357 | # | ||
358 | # Ethernet (1000 Mbit) | ||
359 | # | ||
360 | |||
361 | # | ||
362 | # Ethernet (10000 Mbit) | ||
363 | # | ||
364 | |||
365 | # | ||
366 | # Token Ring devices | ||
367 | # | ||
368 | |||
369 | # | ||
370 | # Wireless LAN (non-hamradio) | ||
371 | # | ||
372 | # CONFIG_NET_RADIO is not set | ||
373 | |||
374 | # | ||
375 | # Wan interfaces | ||
376 | # | ||
377 | # CONFIG_WAN is not set | ||
378 | # CONFIG_PPP is not set | ||
379 | # CONFIG_SLIP is not set | ||
380 | # CONFIG_SHAPER is not set | ||
381 | # CONFIG_NETCONSOLE is not set | ||
382 | # CONFIG_NETPOLL is not set | ||
383 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
384 | |||
385 | # | ||
386 | # ISDN subsystem | ||
387 | # | ||
388 | # CONFIG_ISDN is not set | ||
389 | |||
390 | # | ||
391 | # Telephony Support | ||
392 | # | ||
393 | # CONFIG_PHONE is not set | ||
394 | |||
395 | # | ||
396 | # Input device support | ||
397 | # | ||
398 | CONFIG_INPUT=y | ||
399 | |||
400 | # | ||
401 | # Userland interfaces | ||
402 | # | ||
403 | CONFIG_INPUT_MOUSEDEV=y | ||
404 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
405 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
407 | # CONFIG_INPUT_JOYDEV is not set | ||
408 | # CONFIG_INPUT_TSDEV is not set | ||
409 | # CONFIG_INPUT_EVDEV is not set | ||
410 | # CONFIG_INPUT_EVBUG is not set | ||
411 | |||
412 | # | ||
413 | # Input Device Drivers | ||
414 | # | ||
415 | # CONFIG_INPUT_KEYBOARD is not set | ||
416 | # CONFIG_INPUT_MOUSE is not set | ||
417 | # CONFIG_INPUT_JOYSTICK is not set | ||
418 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
419 | # CONFIG_INPUT_MISC is not set | ||
420 | |||
421 | # | ||
422 | # Hardware I/O ports | ||
423 | # | ||
424 | # CONFIG_SERIO is not set | ||
425 | # CONFIG_GAMEPORT is not set | ||
426 | |||
427 | # | ||
428 | # Character devices | ||
429 | # | ||
430 | CONFIG_VT=y | ||
431 | CONFIG_VT_CONSOLE=y | ||
432 | CONFIG_HW_CONSOLE=y | ||
433 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
434 | |||
435 | # | ||
436 | # Serial drivers | ||
437 | # | ||
438 | CONFIG_SERIAL_8250=y | ||
439 | CONFIG_SERIAL_8250_CONSOLE=y | ||
440 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
441 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
442 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
443 | |||
444 | # | ||
445 | # Non-8250 serial port support | ||
446 | # | ||
447 | CONFIG_SERIAL_CORE=y | ||
448 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
449 | CONFIG_UNIX98_PTYS=y | ||
450 | # CONFIG_LEGACY_PTYS is not set | ||
451 | |||
452 | # | ||
453 | # IPMI | ||
454 | # | ||
455 | # CONFIG_IPMI_HANDLER is not set | ||
456 | |||
457 | # | ||
458 | # Watchdog Cards | ||
459 | # | ||
460 | # CONFIG_WATCHDOG is not set | ||
461 | # CONFIG_NVRAM is not set | ||
462 | # CONFIG_GEN_RTC is not set | ||
463 | # CONFIG_DTLK is not set | ||
464 | # CONFIG_R3964 is not set | ||
465 | |||
466 | # | ||
467 | # Ftape, the floppy tape device driver | ||
468 | # | ||
469 | # CONFIG_AGP is not set | ||
470 | # CONFIG_RAW_DRIVER is not set | ||
471 | |||
472 | # | ||
473 | # TPM devices | ||
474 | # | ||
475 | # CONFIG_TCG_TPM is not set | ||
476 | # CONFIG_TELCLOCK is not set | ||
477 | |||
478 | # | ||
479 | # I2C support | ||
480 | # | ||
481 | # CONFIG_I2C is not set | ||
482 | |||
483 | # | ||
484 | # SPI support | ||
485 | # | ||
486 | # CONFIG_SPI is not set | ||
487 | # CONFIG_SPI_MASTER is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | # CONFIG_HWMON is not set | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | |||
500 | # | ||
501 | # Misc devices | ||
502 | # | ||
503 | |||
504 | # | ||
505 | # Multimedia Capabilities Port drivers | ||
506 | # | ||
507 | |||
508 | # | ||
509 | # Multimedia devices | ||
510 | # | ||
511 | # CONFIG_VIDEO_DEV is not set | ||
512 | |||
513 | # | ||
514 | # Digital Video Broadcasting Devices | ||
515 | # | ||
516 | # CONFIG_DVB is not set | ||
517 | |||
518 | # | ||
519 | # Graphics support | ||
520 | # | ||
521 | # CONFIG_FB is not set | ||
522 | |||
523 | # | ||
524 | # Console display driver support | ||
525 | # | ||
526 | CONFIG_DUMMY_CONSOLE=y | ||
527 | |||
528 | # | ||
529 | # Sound | ||
530 | # | ||
531 | # CONFIG_SOUND is not set | ||
532 | |||
533 | # | ||
534 | # USB support | ||
535 | # | ||
536 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
537 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
538 | |||
539 | # | ||
540 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
541 | # | ||
542 | |||
543 | # | ||
544 | # USB Gadget Support | ||
545 | # | ||
546 | # CONFIG_USB_GADGET is not set | ||
547 | |||
548 | # | ||
549 | # MMC/SD Card support | ||
550 | # | ||
551 | # CONFIG_MMC is not set | ||
552 | |||
553 | # | ||
554 | # InfiniBand support | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # SN Devices | ||
559 | # | ||
560 | |||
561 | # | ||
562 | # File systems | ||
563 | # | ||
564 | CONFIG_EXT2_FS=y | ||
565 | # CONFIG_EXT2_FS_XATTR is not set | ||
566 | # CONFIG_EXT2_FS_XIP is not set | ||
567 | # CONFIG_EXT3_FS is not set | ||
568 | # CONFIG_REISERFS_FS is not set | ||
569 | # CONFIG_JFS_FS is not set | ||
570 | # CONFIG_FS_POSIX_ACL is not set | ||
571 | # CONFIG_XFS_FS is not set | ||
572 | # CONFIG_OCFS2_FS is not set | ||
573 | # CONFIG_MINIX_FS is not set | ||
574 | # CONFIG_ROMFS_FS is not set | ||
575 | CONFIG_INOTIFY=y | ||
576 | # CONFIG_QUOTA is not set | ||
577 | CONFIG_DNOTIFY=y | ||
578 | # CONFIG_AUTOFS_FS is not set | ||
579 | # CONFIG_AUTOFS4_FS is not set | ||
580 | # CONFIG_FUSE_FS is not set | ||
581 | |||
582 | # | ||
583 | # CD-ROM/DVD Filesystems | ||
584 | # | ||
585 | # CONFIG_ISO9660_FS is not set | ||
586 | # CONFIG_UDF_FS is not set | ||
587 | |||
588 | # | ||
589 | # DOS/FAT/NT Filesystems | ||
590 | # | ||
591 | CONFIG_FAT_FS=y | ||
592 | CONFIG_MSDOS_FS=y | ||
593 | CONFIG_VFAT_FS=y | ||
594 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
595 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
596 | # CONFIG_NTFS_FS is not set | ||
597 | |||
598 | # | ||
599 | # Pseudo filesystems | ||
600 | # | ||
601 | CONFIG_PROC_FS=y | ||
602 | CONFIG_PROC_KCORE=y | ||
603 | CONFIG_SYSFS=y | ||
604 | CONFIG_TMPFS=y | ||
605 | # CONFIG_HUGETLB_PAGE is not set | ||
606 | CONFIG_RAMFS=y | ||
607 | # CONFIG_RELAYFS_FS is not set | ||
608 | # CONFIG_CONFIGFS_FS is not set | ||
609 | |||
610 | # | ||
611 | # Miscellaneous filesystems | ||
612 | # | ||
613 | # CONFIG_ADFS_FS is not set | ||
614 | # CONFIG_AFFS_FS is not set | ||
615 | # CONFIG_HFS_FS is not set | ||
616 | # CONFIG_HFSPLUS_FS is not set | ||
617 | # CONFIG_BEFS_FS is not set | ||
618 | # CONFIG_BFS_FS is not set | ||
619 | # CONFIG_EFS_FS is not set | ||
620 | # CONFIG_CRAMFS is not set | ||
621 | # CONFIG_VXFS_FS is not set | ||
622 | # CONFIG_HPFS_FS is not set | ||
623 | # CONFIG_QNX4FS_FS is not set | ||
624 | # CONFIG_SYSV_FS is not set | ||
625 | # CONFIG_UFS_FS is not set | ||
626 | |||
627 | # | ||
628 | # Network File Systems | ||
629 | # | ||
630 | # CONFIG_NFS_FS is not set | ||
631 | # CONFIG_NFSD is not set | ||
632 | # CONFIG_SMB_FS is not set | ||
633 | # CONFIG_CIFS is not set | ||
634 | # CONFIG_NCP_FS is not set | ||
635 | # CONFIG_CODA_FS is not set | ||
636 | # CONFIG_AFS_FS is not set | ||
637 | # CONFIG_9P_FS is not set | ||
638 | |||
639 | # | ||
640 | # Partition Types | ||
641 | # | ||
642 | # CONFIG_PARTITION_ADVANCED is not set | ||
643 | CONFIG_MSDOS_PARTITION=y | ||
644 | |||
645 | # | ||
646 | # Native Language Support | ||
647 | # | ||
648 | CONFIG_NLS=y | ||
649 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
650 | CONFIG_NLS_CODEPAGE_437=y | ||
651 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
652 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
670 | # CONFIG_NLS_ISO8859_8 is not set | ||
671 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
673 | CONFIG_NLS_ASCII=y | ||
674 | CONFIG_NLS_ISO8859_1=y | ||
675 | # CONFIG_NLS_ISO8859_2 is not set | ||
676 | # CONFIG_NLS_ISO8859_3 is not set | ||
677 | # CONFIG_NLS_ISO8859_4 is not set | ||
678 | # CONFIG_NLS_ISO8859_5 is not set | ||
679 | # CONFIG_NLS_ISO8859_6 is not set | ||
680 | # CONFIG_NLS_ISO8859_7 is not set | ||
681 | # CONFIG_NLS_ISO8859_9 is not set | ||
682 | # CONFIG_NLS_ISO8859_13 is not set | ||
683 | # CONFIG_NLS_ISO8859_14 is not set | ||
684 | # CONFIG_NLS_ISO8859_15 is not set | ||
685 | # CONFIG_NLS_KOI8_R is not set | ||
686 | # CONFIG_NLS_KOI8_U is not set | ||
687 | CONFIG_NLS_UTF8=y | ||
688 | |||
689 | # | ||
690 | # IBM 40x options | ||
691 | # | ||
692 | |||
693 | # | ||
694 | # Library routines | ||
695 | # | ||
696 | # CONFIG_CRC_CCITT is not set | ||
697 | # CONFIG_CRC16 is not set | ||
698 | CONFIG_CRC32=y | ||
699 | # CONFIG_LIBCRC32C is not set | ||
700 | # CONFIG_PROFILING is not set | ||
701 | |||
702 | # | ||
703 | # Kernel hacking | ||
704 | # | ||
705 | CONFIG_PRINTK_TIME=y | ||
706 | CONFIG_MAGIC_SYSRQ=y | ||
707 | CONFIG_DEBUG_KERNEL=y | ||
708 | CONFIG_LOG_BUF_SHIFT=14 | ||
709 | CONFIG_DETECT_SOFTLOCKUP=y | ||
710 | # CONFIG_SCHEDSTATS is not set | ||
711 | # CONFIG_DEBUG_SLAB is not set | ||
712 | CONFIG_DEBUG_MUTEXES=y | ||
713 | # CONFIG_DEBUG_SPINLOCK is not set | ||
714 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
715 | # CONFIG_DEBUG_KOBJECT is not set | ||
716 | CONFIG_DEBUG_INFO=y | ||
717 | # CONFIG_DEBUG_FS is not set | ||
718 | # CONFIG_DEBUG_VM is not set | ||
719 | CONFIG_FORCED_INLINING=y | ||
720 | # CONFIG_RCU_TORTURE_TEST is not set | ||
721 | # CONFIG_KGDB is not set | ||
722 | CONFIG_XMON=y | ||
723 | # CONFIG_BDI_SWITCH is not set | ||
724 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
725 | |||
726 | # | ||
727 | # Security options | ||
728 | # | ||
729 | # CONFIG_KEYS is not set | ||
730 | # CONFIG_SECURITY is not set | ||
731 | |||
732 | # | ||
733 | # Cryptographic options | ||
734 | # | ||
735 | # CONFIG_CRYPTO is not set | ||
736 | |||
737 | # | ||
738 | # Hardware crypto devices | ||
739 | # | ||
diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig new file mode 100644 index 000000000000..fafd2516fa51 --- /dev/null +++ b/arch/ppc/configs/ml403_defconfig | |||
@@ -0,0 +1,740 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 01:11:41 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | # CONFIG_XILINX_ML300 is not set | ||
116 | CONFIG_XILINX_ML403=y | ||
117 | CONFIG_IBM405_ERR77=y | ||
118 | CONFIG_IBM405_ERR51=y | ||
119 | CONFIG_XILINX_VIRTEX=y | ||
120 | CONFIG_EMBEDDEDBOOT=y | ||
121 | # CONFIG_PPC4xx_DMA is not set | ||
122 | CONFIG_PPC_GEN550=y | ||
123 | CONFIG_UART0_TTYS0=y | ||
124 | # CONFIG_UART0_TTYS1 is not set | ||
125 | CONFIG_NOT_COHERENT_CACHE=y | ||
126 | |||
127 | # | ||
128 | # Platform options | ||
129 | # | ||
130 | # CONFIG_PC_KEYBOARD is not set | ||
131 | # CONFIG_HIGHMEM is not set | ||
132 | # CONFIG_HZ_100 is not set | ||
133 | CONFIG_HZ_250=y | ||
134 | # CONFIG_HZ_1000 is not set | ||
135 | CONFIG_HZ=250 | ||
136 | CONFIG_PREEMPT_NONE=y | ||
137 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
138 | # CONFIG_PREEMPT is not set | ||
139 | CONFIG_SELECT_MEMORY_MODEL=y | ||
140 | CONFIG_FLATMEM_MANUAL=y | ||
141 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
142 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
143 | CONFIG_FLATMEM=y | ||
144 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
145 | # CONFIG_SPARSEMEM_STATIC is not set | ||
146 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
147 | CONFIG_BINFMT_ELF=y | ||
148 | # CONFIG_BINFMT_MISC is not set | ||
149 | CONFIG_CMDLINE_BOOL=y | ||
150 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
151 | # CONFIG_PM is not set | ||
152 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
153 | CONFIG_SECCOMP=y | ||
154 | CONFIG_ISA_DMA_API=y | ||
155 | |||
156 | # | ||
157 | # Bus options | ||
158 | # | ||
159 | # CONFIG_PPC_I8259 is not set | ||
160 | # CONFIG_PCI is not set | ||
161 | # CONFIG_PCI_DOMAINS is not set | ||
162 | |||
163 | # | ||
164 | # PCCARD (PCMCIA/CardBus) support | ||
165 | # | ||
166 | # CONFIG_PCCARD is not set | ||
167 | |||
168 | # | ||
169 | # Advanced setup | ||
170 | # | ||
171 | # CONFIG_ADVANCED_OPTIONS is not set | ||
172 | |||
173 | # | ||
174 | # Default settings for advanced configuration options are used | ||
175 | # | ||
176 | CONFIG_HIGHMEM_START=0xfe000000 | ||
177 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
178 | CONFIG_KERNEL_START=0xc0000000 | ||
179 | CONFIG_TASK_SIZE=0x80000000 | ||
180 | CONFIG_CONSISTENT_START=0xff100000 | ||
181 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
182 | CONFIG_BOOT_LOAD=0x00400000 | ||
183 | |||
184 | # | ||
185 | # Networking | ||
186 | # | ||
187 | CONFIG_NET=y | ||
188 | |||
189 | # | ||
190 | # Networking options | ||
191 | # | ||
192 | CONFIG_PACKET=y | ||
193 | CONFIG_PACKET_MMAP=y | ||
194 | CONFIG_UNIX=y | ||
195 | # CONFIG_NET_KEY is not set | ||
196 | CONFIG_INET=y | ||
197 | # CONFIG_IP_MULTICAST is not set | ||
198 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
199 | CONFIG_IP_FIB_HASH=y | ||
200 | CONFIG_IP_PNP=y | ||
201 | CONFIG_IP_PNP_DHCP=y | ||
202 | # CONFIG_IP_PNP_BOOTP is not set | ||
203 | # CONFIG_IP_PNP_RARP is not set | ||
204 | # CONFIG_NET_IPIP is not set | ||
205 | # CONFIG_NET_IPGRE is not set | ||
206 | # CONFIG_ARPD is not set | ||
207 | # CONFIG_SYN_COOKIES is not set | ||
208 | # CONFIG_INET_AH is not set | ||
209 | # CONFIG_INET_ESP is not set | ||
210 | # CONFIG_INET_IPCOMP is not set | ||
211 | # CONFIG_INET_TUNNEL is not set | ||
212 | CONFIG_INET_DIAG=y | ||
213 | CONFIG_INET_TCP_DIAG=y | ||
214 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
215 | CONFIG_TCP_CONG_BIC=y | ||
216 | # CONFIG_IPV6 is not set | ||
217 | # CONFIG_NETFILTER is not set | ||
218 | |||
219 | # | ||
220 | # DCCP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_DCCP is not set | ||
223 | |||
224 | # | ||
225 | # SCTP Configuration (EXPERIMENTAL) | ||
226 | # | ||
227 | # CONFIG_IP_SCTP is not set | ||
228 | # CONFIG_ATM is not set | ||
229 | # CONFIG_BRIDGE is not set | ||
230 | # CONFIG_VLAN_8021Q is not set | ||
231 | # CONFIG_DECNET is not set | ||
232 | # CONFIG_LLC2 is not set | ||
233 | # CONFIG_IPX is not set | ||
234 | # CONFIG_ATALK is not set | ||
235 | # CONFIG_X25 is not set | ||
236 | # CONFIG_LAPB is not set | ||
237 | |||
238 | # | ||
239 | # TIPC Configuration (EXPERIMENTAL) | ||
240 | # | ||
241 | # CONFIG_TIPC is not set | ||
242 | # CONFIG_NET_DIVERT is not set | ||
243 | # CONFIG_ECONET is not set | ||
244 | # CONFIG_WAN_ROUTER is not set | ||
245 | |||
246 | # | ||
247 | # QoS and/or fair queueing | ||
248 | # | ||
249 | # CONFIG_NET_SCHED is not set | ||
250 | |||
251 | # | ||
252 | # Network testing | ||
253 | # | ||
254 | # CONFIG_NET_PKTGEN is not set | ||
255 | # CONFIG_HAMRADIO is not set | ||
256 | # CONFIG_IRDA is not set | ||
257 | # CONFIG_BT is not set | ||
258 | # CONFIG_IEEE80211 is not set | ||
259 | |||
260 | # | ||
261 | # Device Drivers | ||
262 | # | ||
263 | |||
264 | # | ||
265 | # Generic Driver Options | ||
266 | # | ||
267 | CONFIG_STANDALONE=y | ||
268 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
269 | # CONFIG_FW_LOADER is not set | ||
270 | # CONFIG_DEBUG_DRIVER is not set | ||
271 | |||
272 | # | ||
273 | # Connector - unified userspace <-> kernelspace linker | ||
274 | # | ||
275 | # CONFIG_CONNECTOR is not set | ||
276 | |||
277 | # | ||
278 | # Memory Technology Devices (MTD) | ||
279 | # | ||
280 | # CONFIG_MTD is not set | ||
281 | |||
282 | # | ||
283 | # Parallel port support | ||
284 | # | ||
285 | # CONFIG_PARPORT is not set | ||
286 | |||
287 | # | ||
288 | # Plug and Play support | ||
289 | # | ||
290 | |||
291 | # | ||
292 | # Block devices | ||
293 | # | ||
294 | # CONFIG_BLK_DEV_FD is not set | ||
295 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
296 | # CONFIG_BLK_DEV_LOOP is not set | ||
297 | # CONFIG_BLK_DEV_NBD is not set | ||
298 | CONFIG_BLK_DEV_RAM=y | ||
299 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
300 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
301 | CONFIG_BLK_DEV_INITRD=y | ||
302 | # CONFIG_CDROM_PKTCDVD is not set | ||
303 | # CONFIG_ATA_OVER_ETH is not set | ||
304 | |||
305 | # | ||
306 | # ATA/ATAPI/MFM/RLL support | ||
307 | # | ||
308 | # CONFIG_IDE is not set | ||
309 | |||
310 | # | ||
311 | # SCSI device support | ||
312 | # | ||
313 | # CONFIG_RAID_ATTRS is not set | ||
314 | # CONFIG_SCSI is not set | ||
315 | |||
316 | # | ||
317 | # Multi-device support (RAID and LVM) | ||
318 | # | ||
319 | # CONFIG_MD is not set | ||
320 | |||
321 | # | ||
322 | # Fusion MPT device support | ||
323 | # | ||
324 | # CONFIG_FUSION is not set | ||
325 | |||
326 | # | ||
327 | # IEEE 1394 (FireWire) support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # I2O device support | ||
332 | # | ||
333 | |||
334 | # | ||
335 | # Macintosh device drivers | ||
336 | # | ||
337 | # CONFIG_WINDFARM is not set | ||
338 | |||
339 | # | ||
340 | # Network device support | ||
341 | # | ||
342 | CONFIG_NETDEVICES=y | ||
343 | # CONFIG_DUMMY is not set | ||
344 | # CONFIG_BONDING is not set | ||
345 | # CONFIG_EQUALIZER is not set | ||
346 | CONFIG_TUN=y | ||
347 | |||
348 | # | ||
349 | # PHY device support | ||
350 | # | ||
351 | |||
352 | # | ||
353 | # Ethernet (10 or 100Mbit) | ||
354 | # | ||
355 | # CONFIG_NET_ETHERNET is not set | ||
356 | # CONFIG_IBM_EMAC is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (1000 Mbit) | ||
360 | # | ||
361 | |||
362 | # | ||
363 | # Ethernet (10000 Mbit) | ||
364 | # | ||
365 | |||
366 | # | ||
367 | # Token Ring devices | ||
368 | # | ||
369 | |||
370 | # | ||
371 | # Wireless LAN (non-hamradio) | ||
372 | # | ||
373 | # CONFIG_NET_RADIO is not set | ||
374 | |||
375 | # | ||
376 | # Wan interfaces | ||
377 | # | ||
378 | # CONFIG_WAN is not set | ||
379 | # CONFIG_PPP is not set | ||
380 | # CONFIG_SLIP is not set | ||
381 | # CONFIG_SHAPER is not set | ||
382 | # CONFIG_NETCONSOLE is not set | ||
383 | # CONFIG_NETPOLL is not set | ||
384 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
385 | |||
386 | # | ||
387 | # ISDN subsystem | ||
388 | # | ||
389 | # CONFIG_ISDN is not set | ||
390 | |||
391 | # | ||
392 | # Telephony Support | ||
393 | # | ||
394 | # CONFIG_PHONE is not set | ||
395 | |||
396 | # | ||
397 | # Input device support | ||
398 | # | ||
399 | CONFIG_INPUT=y | ||
400 | |||
401 | # | ||
402 | # Userland interfaces | ||
403 | # | ||
404 | CONFIG_INPUT_MOUSEDEV=y | ||
405 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
407 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
408 | # CONFIG_INPUT_JOYDEV is not set | ||
409 | # CONFIG_INPUT_TSDEV is not set | ||
410 | # CONFIG_INPUT_EVDEV is not set | ||
411 | # CONFIG_INPUT_EVBUG is not set | ||
412 | |||
413 | # | ||
414 | # Input Device Drivers | ||
415 | # | ||
416 | # CONFIG_INPUT_KEYBOARD is not set | ||
417 | # CONFIG_INPUT_MOUSE is not set | ||
418 | # CONFIG_INPUT_JOYSTICK is not set | ||
419 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
420 | # CONFIG_INPUT_MISC is not set | ||
421 | |||
422 | # | ||
423 | # Hardware I/O ports | ||
424 | # | ||
425 | # CONFIG_SERIO is not set | ||
426 | # CONFIG_GAMEPORT is not set | ||
427 | |||
428 | # | ||
429 | # Character devices | ||
430 | # | ||
431 | CONFIG_VT=y | ||
432 | CONFIG_VT_CONSOLE=y | ||
433 | CONFIG_HW_CONSOLE=y | ||
434 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
435 | |||
436 | # | ||
437 | # Serial drivers | ||
438 | # | ||
439 | CONFIG_SERIAL_8250=y | ||
440 | CONFIG_SERIAL_8250_CONSOLE=y | ||
441 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
442 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
443 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
444 | |||
445 | # | ||
446 | # Non-8250 serial port support | ||
447 | # | ||
448 | CONFIG_SERIAL_CORE=y | ||
449 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
450 | CONFIG_UNIX98_PTYS=y | ||
451 | # CONFIG_LEGACY_PTYS is not set | ||
452 | |||
453 | # | ||
454 | # IPMI | ||
455 | # | ||
456 | # CONFIG_IPMI_HANDLER is not set | ||
457 | |||
458 | # | ||
459 | # Watchdog Cards | ||
460 | # | ||
461 | # CONFIG_WATCHDOG is not set | ||
462 | # CONFIG_NVRAM is not set | ||
463 | # CONFIG_GEN_RTC is not set | ||
464 | # CONFIG_DTLK is not set | ||
465 | # CONFIG_R3964 is not set | ||
466 | |||
467 | # | ||
468 | # Ftape, the floppy tape device driver | ||
469 | # | ||
470 | # CONFIG_AGP is not set | ||
471 | # CONFIG_RAW_DRIVER is not set | ||
472 | |||
473 | # | ||
474 | # TPM devices | ||
475 | # | ||
476 | # CONFIG_TCG_TPM is not set | ||
477 | # CONFIG_TELCLOCK is not set | ||
478 | |||
479 | # | ||
480 | # I2C support | ||
481 | # | ||
482 | # CONFIG_I2C is not set | ||
483 | |||
484 | # | ||
485 | # SPI support | ||
486 | # | ||
487 | # CONFIG_SPI is not set | ||
488 | # CONFIG_SPI_MASTER is not set | ||
489 | |||
490 | # | ||
491 | # Dallas's 1-wire bus | ||
492 | # | ||
493 | # CONFIG_W1 is not set | ||
494 | |||
495 | # | ||
496 | # Hardware Monitoring support | ||
497 | # | ||
498 | # CONFIG_HWMON is not set | ||
499 | # CONFIG_HWMON_VID is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Console display driver support | ||
526 | # | ||
527 | CONFIG_DUMMY_CONSOLE=y | ||
528 | |||
529 | # | ||
530 | # Sound | ||
531 | # | ||
532 | # CONFIG_SOUND is not set | ||
533 | |||
534 | # | ||
535 | # USB support | ||
536 | # | ||
537 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
538 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
539 | |||
540 | # | ||
541 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
542 | # | ||
543 | |||
544 | # | ||
545 | # USB Gadget Support | ||
546 | # | ||
547 | # CONFIG_USB_GADGET is not set | ||
548 | |||
549 | # | ||
550 | # MMC/SD Card support | ||
551 | # | ||
552 | # CONFIG_MMC is not set | ||
553 | |||
554 | # | ||
555 | # InfiniBand support | ||
556 | # | ||
557 | |||
558 | # | ||
559 | # SN Devices | ||
560 | # | ||
561 | |||
562 | # | ||
563 | # File systems | ||
564 | # | ||
565 | CONFIG_EXT2_FS=y | ||
566 | # CONFIG_EXT2_FS_XATTR is not set | ||
567 | # CONFIG_EXT2_FS_XIP is not set | ||
568 | # CONFIG_EXT3_FS is not set | ||
569 | # CONFIG_REISERFS_FS is not set | ||
570 | # CONFIG_JFS_FS is not set | ||
571 | # CONFIG_FS_POSIX_ACL is not set | ||
572 | # CONFIG_XFS_FS is not set | ||
573 | # CONFIG_OCFS2_FS is not set | ||
574 | # CONFIG_MINIX_FS is not set | ||
575 | # CONFIG_ROMFS_FS is not set | ||
576 | CONFIG_INOTIFY=y | ||
577 | # CONFIG_QUOTA is not set | ||
578 | CONFIG_DNOTIFY=y | ||
579 | # CONFIG_AUTOFS_FS is not set | ||
580 | # CONFIG_AUTOFS4_FS is not set | ||
581 | # CONFIG_FUSE_FS is not set | ||
582 | |||
583 | # | ||
584 | # CD-ROM/DVD Filesystems | ||
585 | # | ||
586 | # CONFIG_ISO9660_FS is not set | ||
587 | # CONFIG_UDF_FS is not set | ||
588 | |||
589 | # | ||
590 | # DOS/FAT/NT Filesystems | ||
591 | # | ||
592 | CONFIG_FAT_FS=y | ||
593 | CONFIG_MSDOS_FS=y | ||
594 | CONFIG_VFAT_FS=y | ||
595 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
596 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
597 | # CONFIG_NTFS_FS is not set | ||
598 | |||
599 | # | ||
600 | # Pseudo filesystems | ||
601 | # | ||
602 | CONFIG_PROC_FS=y | ||
603 | CONFIG_PROC_KCORE=y | ||
604 | CONFIG_SYSFS=y | ||
605 | CONFIG_TMPFS=y | ||
606 | # CONFIG_HUGETLB_PAGE is not set | ||
607 | CONFIG_RAMFS=y | ||
608 | # CONFIG_RELAYFS_FS is not set | ||
609 | # CONFIG_CONFIGFS_FS is not set | ||
610 | |||
611 | # | ||
612 | # Miscellaneous filesystems | ||
613 | # | ||
614 | # CONFIG_ADFS_FS is not set | ||
615 | # CONFIG_AFFS_FS is not set | ||
616 | # CONFIG_HFS_FS is not set | ||
617 | # CONFIG_HFSPLUS_FS is not set | ||
618 | # CONFIG_BEFS_FS is not set | ||
619 | # CONFIG_BFS_FS is not set | ||
620 | # CONFIG_EFS_FS is not set | ||
621 | # CONFIG_CRAMFS is not set | ||
622 | # CONFIG_VXFS_FS is not set | ||
623 | # CONFIG_HPFS_FS is not set | ||
624 | # CONFIG_QNX4FS_FS is not set | ||
625 | # CONFIG_SYSV_FS is not set | ||
626 | # CONFIG_UFS_FS is not set | ||
627 | |||
628 | # | ||
629 | # Network File Systems | ||
630 | # | ||
631 | # CONFIG_NFS_FS is not set | ||
632 | # CONFIG_NFSD is not set | ||
633 | # CONFIG_SMB_FS is not set | ||
634 | # CONFIG_CIFS is not set | ||
635 | # CONFIG_NCP_FS is not set | ||
636 | # CONFIG_CODA_FS is not set | ||
637 | # CONFIG_AFS_FS is not set | ||
638 | # CONFIG_9P_FS is not set | ||
639 | |||
640 | # | ||
641 | # Partition Types | ||
642 | # | ||
643 | # CONFIG_PARTITION_ADVANCED is not set | ||
644 | CONFIG_MSDOS_PARTITION=y | ||
645 | |||
646 | # | ||
647 | # Native Language Support | ||
648 | # | ||
649 | CONFIG_NLS=y | ||
650 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
651 | CONFIG_NLS_CODEPAGE_437=y | ||
652 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
670 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
671 | # CONFIG_NLS_ISO8859_8 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
673 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
674 | CONFIG_NLS_ASCII=y | ||
675 | CONFIG_NLS_ISO8859_1=y | ||
676 | # CONFIG_NLS_ISO8859_2 is not set | ||
677 | # CONFIG_NLS_ISO8859_3 is not set | ||
678 | # CONFIG_NLS_ISO8859_4 is not set | ||
679 | # CONFIG_NLS_ISO8859_5 is not set | ||
680 | # CONFIG_NLS_ISO8859_6 is not set | ||
681 | # CONFIG_NLS_ISO8859_7 is not set | ||
682 | # CONFIG_NLS_ISO8859_9 is not set | ||
683 | # CONFIG_NLS_ISO8859_13 is not set | ||
684 | # CONFIG_NLS_ISO8859_14 is not set | ||
685 | # CONFIG_NLS_ISO8859_15 is not set | ||
686 | # CONFIG_NLS_KOI8_R is not set | ||
687 | # CONFIG_NLS_KOI8_U is not set | ||
688 | CONFIG_NLS_UTF8=y | ||
689 | |||
690 | # | ||
691 | # IBM 40x options | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # Library routines | ||
696 | # | ||
697 | # CONFIG_CRC_CCITT is not set | ||
698 | # CONFIG_CRC16 is not set | ||
699 | CONFIG_CRC32=y | ||
700 | # CONFIG_LIBCRC32C is not set | ||
701 | # CONFIG_PROFILING is not set | ||
702 | |||
703 | # | ||
704 | # Kernel hacking | ||
705 | # | ||
706 | CONFIG_PRINTK_TIME=y | ||
707 | CONFIG_MAGIC_SYSRQ=y | ||
708 | CONFIG_DEBUG_KERNEL=y | ||
709 | CONFIG_LOG_BUF_SHIFT=14 | ||
710 | CONFIG_DETECT_SOFTLOCKUP=y | ||
711 | # CONFIG_SCHEDSTATS is not set | ||
712 | # CONFIG_DEBUG_SLAB is not set | ||
713 | CONFIG_DEBUG_MUTEXES=y | ||
714 | # CONFIG_DEBUG_SPINLOCK is not set | ||
715 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
716 | # CONFIG_DEBUG_KOBJECT is not set | ||
717 | CONFIG_DEBUG_INFO=y | ||
718 | # CONFIG_DEBUG_FS is not set | ||
719 | # CONFIG_DEBUG_VM is not set | ||
720 | CONFIG_FORCED_INLINING=y | ||
721 | # CONFIG_RCU_TORTURE_TEST is not set | ||
722 | # CONFIG_KGDB is not set | ||
723 | CONFIG_XMON=y | ||
724 | # CONFIG_BDI_SWITCH is not set | ||
725 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
726 | |||
727 | # | ||
728 | # Security options | ||
729 | # | ||
730 | # CONFIG_KEYS is not set | ||
731 | # CONFIG_SECURITY is not set | ||
732 | |||
733 | # | ||
734 | # Cryptographic options | ||
735 | # | ||
736 | # CONFIG_CRYPTO is not set | ||
737 | |||
738 | # | ||
739 | # Hardware crypto devices | ||
740 | # | ||
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 677c571aa276..0d8b88219d38 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_44x.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index c1e89ad0684d..ec53c7d65f2b 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/except_8xx.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 8d60fa99fc4b..dd86bbed7627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_fsl_booke.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
316 | */ | 314 | */ |
317 | lis r2,DBCR0_IDM@h | 315 | lis r2,DBCR0_IDM@h |
318 | mtspr SPRN_DBCR0,r2 | 316 | mtspr SPRN_DBCR0,r2 |
317 | isync | ||
319 | /* clear any residual debug events */ | 318 | /* clear any residual debug events */ |
320 | li r2,-1 | 319 | li r2,-1 |
321 | mtspr SPRN_DBSR,r2 | 320 | mtspr SPRN_DBSR,r2 |
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu) | |||
1002 | _GLOBAL(abort) | 1001 | _GLOBAL(abort) |
1003 | li r13,0 | 1002 | li r13,0 |
1004 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ | 1003 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ |
1004 | isync | ||
1005 | mfmsr r13 | 1005 | mfmsr r13 |
1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ | 1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ |
1007 | mtmsr r13 | 1007 | mtmsr r13 |
1008 | isync | ||
1008 | mfspr r13,SPRN_DBCR0 | 1009 | mfspr r13,SPRN_DBCR0 |
1009 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h | 1010 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h |
1010 | mtspr SPRN_DBCR0,r13 | 1011 | mtspr SPRN_DBCR0,r13 |
1012 | isync | ||
1011 | 1013 | ||
1012 | _GLOBAL(set_context) | 1014 | _GLOBAL(set_context) |
1013 | 1015 | ||
diff --git a/arch/ppc/kernel/smp-tbsync.c b/arch/ppc/kernel/smp-tbsync.c index 2c9cd95bcea6..6a5694fcc711 100644 --- a/arch/ppc/kernel/smp-tbsync.c +++ b/arch/ppc/kernel/smp-tbsync.c | |||
@@ -126,8 +126,7 @@ smp_generic_give_timebase( void ) | |||
126 | printk("Synchronizing timebase\n"); | 126 | printk("Synchronizing timebase\n"); |
127 | 127 | ||
128 | /* if this fails then this kernel won't work anyway... */ | 128 | /* if this fails then this kernel won't work anyway... */ |
129 | tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL ); | 129 | tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL ); |
130 | memset( tbsync, 0, sizeof(*tbsync) ); | ||
131 | mb(); | 130 | mb(); |
132 | running = 1; | 131 | running = 1; |
133 | 132 | ||
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 6d0a1838d94c..1c0d68026abd 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/traps.c | ||
3 | * | ||
4 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 2 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/ppc/lib/rheap.c b/arch/ppc/lib/rheap.c index 42c5de2c898f..31e511856dc5 100644 --- a/arch/ppc/lib/rheap.c +++ b/arch/ppc/lib/rheap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/rheap.c | ||
3 | * | ||
4 | * A Remote Heap. Remote means that we don't touch the memory that the | 2 | * A Remote Heap. Remote means that we don't touch the memory that the |
5 | * heap points to. Normal heap implementations use the memory they manage | 3 | * heap points to. Normal heap implementations use the memory they manage |
6 | * to place their list. We cannot do that because the memory we manage may | 4 | * to place their list. We cannot do that because the memory we manage may |
diff --git a/arch/ppc/math-emu/math.c b/arch/ppc/math-emu/math.c index b7dff53a7103..589153472761 100644 --- a/arch/ppc/math-emu/math.c +++ b/arch/ppc/math-emu/math.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/math-emu/math.c | ||
3 | * | ||
4 | * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) | 2 | * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) |
5 | */ | 3 | */ |
6 | 4 | ||
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c index 3d79ce281b67..e0152a9b26e6 100644 --- a/arch/ppc/mm/44x_mmu.c +++ b/arch/ppc/mm/44x_mmu.c | |||
@@ -104,7 +104,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
104 | 104 | ||
105 | /* Determine number of entries necessary to cover lowmem */ | 105 | /* Determine number of entries necessary to cover lowmem */ |
106 | pinned_tlbs = (unsigned int) | 106 | pinned_tlbs = (unsigned int) |
107 | (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT); | 107 | (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT); |
108 | 108 | ||
109 | /* Write upper watermark to save location */ | 109 | /* Write upper watermark to save location */ |
110 | tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; | 110 | tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; |
@@ -112,7 +112,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
112 | /* If necessary, set additional pinned TLBs */ | 112 | /* If necessary, set additional pinned TLBs */ |
113 | if (pinned_tlbs > 1) | 113 | if (pinned_tlbs > 1) |
114 | for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { | 114 | for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { |
115 | unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE; | 115 | unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE; |
116 | ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); | 116 | ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); |
117 | } | 117 | } |
118 | 118 | ||
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index ee5e9f25baf9..0217188ef465 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/mm/fault.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S index 3ec87c91343e..f09fa88db35a 100644 --- a/arch/ppc/mm/hashtable.S +++ b/arch/ppc/mm/hashtable.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/hashtable.S | ||
3 | * | ||
4 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | 2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ |
5 | * | 3 | * |
6 | * PowerPC version | 4 | * PowerPC version |
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index d8837911bbc6..174ddbc9758b 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -57,6 +57,10 @@ config XILINX_ML300 | |||
57 | help | 57 | help |
58 | This option enables support for the Xilinx ML300 evaluation board. | 58 | This option enables support for the Xilinx ML300 evaluation board. |
59 | 59 | ||
60 | config XILINX_ML403 | ||
61 | bool "Xilinx-ML403" | ||
62 | help | ||
63 | This option enables support for the Xilinx ML403 evaluation board. | ||
60 | endchoice | 64 | endchoice |
61 | 65 | ||
62 | choice | 66 | choice |
@@ -172,11 +176,6 @@ config IBM_OCP | |||
172 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT | 176 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT |
173 | default y | 177 | default y |
174 | 178 | ||
175 | config XILINX_OCP | ||
176 | bool | ||
177 | depends on XILINX_ML300 | ||
178 | default y | ||
179 | |||
180 | config IBM_EMAC4 | 179 | config IBM_EMAC4 |
181 | bool | 180 | bool |
182 | depends on 440GX || 440SP || 440SPE | 181 | depends on 440GX || 440SP || 440SPE |
@@ -208,11 +207,21 @@ config 405GPR | |||
208 | depends on SYCAMORE | 207 | depends on SYCAMORE |
209 | default y | 208 | default y |
210 | 209 | ||
211 | config VIRTEX_II_PRO | 210 | config XILINX_VIRTEX_II_PRO |
212 | bool | 211 | bool |
213 | depends on XILINX_ML300 | 212 | depends on XILINX_ML300 |
214 | default y | 213 | default y |
215 | 214 | ||
215 | config XILINX_VIRTEX_4_FX | ||
216 | bool | ||
217 | depends on XILINX_ML403 | ||
218 | default y | ||
219 | |||
220 | config XILINX_VIRTEX | ||
221 | bool | ||
222 | depends on XILINX_VIRTEX_II_PRO || XILINX_VIRTEX_4_FX | ||
223 | default y | ||
224 | |||
216 | config STB03xxx | 225 | config STB03xxx |
217 | bool | 226 | bool |
218 | depends on REDWOOD_5 || REDWOOD_6 | 227 | depends on REDWOOD_5 || REDWOOD_6 |
@@ -220,7 +229,7 @@ config STB03xxx | |||
220 | 229 | ||
221 | config EMBEDDEDBOOT | 230 | config EMBEDDEDBOOT |
222 | bool | 231 | bool |
223 | depends on EP405 || XILINX_ML300 | 232 | depends on EP405 || XILINX_ML300 || XILINX_ML403 |
224 | default y | 233 | default y |
225 | 234 | ||
226 | config IBM_OPENBIOS | 235 | config IBM_OPENBIOS |
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile index c9bb61170954..a04a0d0a0f5c 100644 --- a/arch/ppc/platforms/4xx/Makefile +++ b/arch/ppc/platforms/4xx/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_REDWOOD_6) += redwood6.o | |||
14 | obj-$(CONFIG_SYCAMORE) += sycamore.o | 14 | obj-$(CONFIG_SYCAMORE) += sycamore.o |
15 | obj-$(CONFIG_WALNUT) += walnut.o | 15 | obj-$(CONFIG_WALNUT) += walnut.o |
16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o | 16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o |
17 | obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_405GP) += ibm405gp.o | 19 | obj-$(CONFIG_405GP) += ibm405gp.o |
19 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o | 20 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o |
@@ -26,4 +27,5 @@ obj-$(CONFIG_440SP) += ibm440sp.o | |||
26 | obj-$(CONFIG_440SPE) += ppc440spe.o | 27 | obj-$(CONFIG_440SPE) += ppc440spe.o |
27 | obj-$(CONFIG_405EP) += ibm405ep.o | 28 | obj-$(CONFIG_405EP) += ibm405ep.o |
28 | obj-$(CONFIG_405GPR) += ibm405gpr.o | 29 | obj-$(CONFIG_405GPR) += ibm405gpr.o |
29 | obj-$(CONFIG_VIRTEX_II_PRO) += virtex-ii_pro.o | 30 | obj-$(CONFIG_XILINX_VIRTEX) += virtex.o |
31 | |||
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index 0ec53f049338..b940cfd646c2 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/bamboo.c | ||
3 | * | ||
4 | * Bamboo board specific routines | 2 | * Bamboo board specific routines |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/bamboo.h b/arch/ppc/platforms/4xx/bamboo.h index 5c0192826494..31c0dd6a26cb 100644 --- a/arch/ppc/platforms/4xx/bamboo.h +++ b/arch/ppc/platforms/4xx/bamboo.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/bamboo.h | ||
3 | * | ||
4 | * Bamboo board definitions | 2 | * Bamboo board definitions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/bubinga.h b/arch/ppc/platforms/4xx/bubinga.h index b5380cfaf5c0..606aa9fa5caa 100644 --- a/arch/ppc/platforms/4xx/bubinga.h +++ b/arch/ppc/platforms/4xx/bubinga.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/bubinga.h | ||
3 | * | ||
4 | * Bubinga board definitions | 2 | * Bubinga board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c index ff966773a0bf..6571e39fbe48 100644 --- a/arch/ppc/platforms/4xx/cpci405.c +++ b/arch/ppc/platforms/4xx/cpci405.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci405.c | ||
3 | * | ||
4 | * Board setup routines for the esd CPCI-405 cPCI Board. | 2 | * Board setup routines for the esd CPCI-405 cPCI Board. |
5 | * | 3 | * |
6 | * Author: Stefan Roese | 4 | * Author: Stefan Roese |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 9a828b623417..b4ecb9c79854 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ebony.c | ||
3 | * | ||
4 | * Ebony board specific routines | 2 | * Ebony board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h index b91ad4272dfe..27b2e77c7c83 100644 --- a/arch/ppc/platforms/4xx/ebony.h +++ b/arch/ppc/platforms/4xx/ebony.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ebony.h | ||
3 | * | ||
4 | * Ebony board definitions | 2 | * Ebony board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ep405.c b/arch/ppc/platforms/4xx/ep405.c index 26a07cdb30ec..6efa91ff9c07 100644 --- a/arch/ppc/platforms/4xx/ep405.c +++ b/arch/ppc/platforms/4xx/ep405.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ep405.c | ||
3 | * | ||
4 | * Embedded Planet 405GP board | 2 | * Embedded Planet 405GP board |
5 | * http://www.embeddedplanet.com | 3 | * http://www.embeddedplanet.com |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/ep405.h b/arch/ppc/platforms/4xx/ep405.h index ea3eb21338fb..9814fc431725 100644 --- a/arch/ppc/platforms/4xx/ep405.h +++ b/arch/ppc/platforms/4xx/ep405.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ep405.h | ||
3 | * | ||
4 | * Embedded Planet 405GP board | 2 | * Embedded Planet 405GP board |
5 | * http://www.embeddedplanet.com | 3 | * http://www.embeddedplanet.com |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c index 093b28d27a41..55af769a6e70 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.c +++ b/arch/ppc/platforms/4xx/ibm405ep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ibm405ep.c | ||
3 | * | ||
4 | * Support for IBM PPC 405EP processors. | 2 | * Support for IBM PPC 405EP processors. |
5 | * | 3 | * |
6 | * Author: SAW (IBM), derived from ibmnp405l.c. | 4 | * Author: SAW (IBM), derived from ibmnp405l.c. |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.h b/arch/ppc/platforms/4xx/ibm405ep.h index e051e3fe8c63..fe46640de152 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.h +++ b/arch/ppc/platforms/4xx/ibm405ep.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405ep.h | ||
3 | * | ||
4 | * IBM PPC 405EP processor defines. | 2 | * IBM PPC 405EP processor defines. |
5 | * | 3 | * |
6 | * Author: SAW (IBM), derived from ibm405gp.h. | 4 | * Author: SAW (IBM), derived from ibm405gp.h. |
diff --git a/arch/ppc/platforms/4xx/ibm405gp.h b/arch/ppc/platforms/4xx/ibm405gp.h index b2b642e81af7..eaf0ef57028d 100644 --- a/arch/ppc/platforms/4xx/ibm405gp.h +++ b/arch/ppc/platforms/4xx/ibm405gp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gp.h | ||
3 | * | ||
4 | * Author: Armin Kuster akuster@mvista.com | 2 | * Author: Armin Kuster akuster@mvista.com |
5 | * | 3 | * |
6 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c index cd0d00d8e8ee..49da61f6854a 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.c +++ b/arch/ppc/platforms/4xx/ibm405gpr.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gpr.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.h b/arch/ppc/platforms/4xx/ibm405gpr.h index 45412fb4368f..e90c5dde01d3 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.h +++ b/arch/ppc/platforms/4xx/ibm405gpr.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gpr.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm440ep.c b/arch/ppc/platforms/4xx/ibm440ep.c index 65ac0b9c2d05..1fed6638c81f 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.c +++ b/arch/ppc/platforms/4xx/ibm440ep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440ep.c | ||
3 | * | ||
4 | * PPC440EP I/O descriptions | 2 | * PPC440EP I/O descriptions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440ep.h b/arch/ppc/platforms/4xx/ibm440ep.h index 97c80b8e3e10..61717e8a799e 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.h +++ b/arch/ppc/platforms/4xx/ibm440ep.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440ep.h | ||
3 | * | ||
4 | * PPC440EP definitions | 2 | * PPC440EP definitions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gp.c b/arch/ppc/platforms/4xx/ibm440gp.c index d926245e8b3e..b67a72e5c6fe 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.c +++ b/arch/ppc/platforms/4xx/ibm440gp.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gp.c | ||
3 | * | ||
4 | * PPC440GP I/O descriptions | 2 | * PPC440GP I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gp.h b/arch/ppc/platforms/4xx/ibm440gp.h index ae1efc03b295..7b2763b6024f 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.h +++ b/arch/ppc/platforms/4xx/ibm440gp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gp.h | ||
3 | * | ||
4 | * PPC440GP definitions | 2 | * PPC440GP definitions |
5 | * | 3 | * |
6 | * Roland Dreier <roland@digitalvampire.org> | 4 | * Roland Dreier <roland@digitalvampire.org> |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.c b/arch/ppc/platforms/4xx/ibm440gx.c index d24c09ee7b18..685abffcb6ce 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.c +++ b/arch/ppc/platforms/4xx/ibm440gx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gx.c | ||
3 | * | ||
4 | * PPC440GX I/O descriptions | 2 | * PPC440GX I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.h b/arch/ppc/platforms/4xx/ibm440gx.h index 0b59d8dcd03c..070a34efe1c7 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.h +++ b/arch/ppc/platforms/4xx/ibm440gx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ibm440gx.h | ||
3 | * | ||
4 | * PPC440GX definitions | 2 | * PPC440GX definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440sp.c b/arch/ppc/platforms/4xx/ibm440sp.c index 71a0117d3597..de8f7ac5623c 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.c +++ b/arch/ppc/platforms/4xx/ibm440sp.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440sp.c | ||
3 | * | ||
4 | * PPC440SP I/O descriptions | 2 | * PPC440SP I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ibm440sp.h b/arch/ppc/platforms/4xx/ibm440sp.h index c71e46a18b9e..77e8bb22c527 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.h +++ b/arch/ppc/platforms/4xx/ibm440sp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440sp.h | ||
3 | * | ||
4 | * PPC440SP definitions | 2 | * PPC440SP definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c index a477a78f4902..f1dcb0ac15b7 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.c +++ b/arch/ppc/platforms/4xx/ibmnp405h.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmnp405h.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h index e2c2b06128c8..2c683f6aaa66 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.h +++ b/arch/ppc/platforms/4xx/ibmnp405h.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmnp405h.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstb4.c b/arch/ppc/platforms/4xx/ibmstb4.c index 7e33bb635443..799a2eccccc3 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.c +++ b/arch/ppc/platforms/4xx/ibmstb4.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstb4.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h index 9f21d4c88a3d..9de426597351 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.h +++ b/arch/ppc/platforms/4xx/ibmstb4.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstb4.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.c b/arch/ppc/platforms/4xx/ibmstbx25.c index b895b9cca57d..090ddcbecc5e 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.c +++ b/arch/ppc/platforms/4xx/ibmstbx25.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstbx25.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.h b/arch/ppc/platforms/4xx/ibmstbx25.h index 9a2efc366e9c..6884a49d3482 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.h +++ b/arch/ppc/platforms/4xx/ibmstbx25.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstbx25.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 21d29132aebd..5c37de28e135 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/luan.c | ||
3 | * | ||
4 | * Luan board specific routines | 2 | * Luan board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h index bbe7d0766db8..e0db6a810feb 100644 --- a/arch/ppc/platforms/4xx/luan.h +++ b/arch/ppc/platforms/4xx/luan.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/luan.h | ||
3 | * | ||
4 | * Luan board definitions | 2 | * Luan board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 4f355b6acab2..f841972f1fa9 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ocotea.c | ||
3 | * | ||
4 | * Ocotea board specific routines | 2 | * Ocotea board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ocotea.h b/arch/ppc/platforms/4xx/ocotea.h index 33251153ac5f..7c799a9ff82b 100644 --- a/arch/ppc/platforms/4xx/ocotea.h +++ b/arch/ppc/platforms/4xx/ocotea.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ocotea.h | ||
3 | * | ||
4 | * Ocotea board definitions | 2 | * Ocotea board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.c b/arch/ppc/platforms/4xx/ppc440spe.c index 6139a0b3393e..1be5d1c8e266 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.c +++ b/arch/ppc/platforms/4xx/ppc440spe.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ppc440spe.c | ||
3 | * | ||
4 | * PPC440SPe I/O descriptions | 2 | * PPC440SPe I/O descriptions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> | 4 | * Roland Dreier <rolandd@cisco.com> |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.h b/arch/ppc/platforms/4xx/ppc440spe.h index 2216846973b8..d3a620ddcdee 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.h +++ b/arch/ppc/platforms/4xx/ppc440spe.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440spe.h | ||
3 | * | ||
4 | * PPC440SPe definitions | 2 | * PPC440SPe definitions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> | 4 | * Roland Dreier <rolandd@cisco.com> |
diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c index 611ac861804d..53da2b4f7c24 100644 --- a/arch/ppc/platforms/4xx/redwood5.c +++ b/arch/ppc/platforms/4xx/redwood5.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood5.c | ||
3 | * | ||
4 | * Support for the IBM redwood5 eval board file | 2 | * Support for the IBM redwood5 eval board file |
5 | * | 3 | * |
6 | * Author: Armin Kuster <akuster@mvista.com> | 4 | * Author: Armin Kuster <akuster@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/redwood5.h b/arch/ppc/platforms/4xx/redwood5.h index 264e34fb3fbd..49edd4818970 100644 --- a/arch/ppc/platforms/4xx/redwood5.h +++ b/arch/ppc/platforms/4xx/redwood5.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood5.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 2 | * Macros, definitions, and data structures specific to the IBM PowerPC |
5 | * STB03xxx "Redwood" evaluation board. | 3 | * STB03xxx "Redwood" evaluation board. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c index b13116691289..41b27d106fa3 100644 --- a/arch/ppc/platforms/4xx/redwood6.c +++ b/arch/ppc/platforms/4xx/redwood6.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood6.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/redwood6.h b/arch/ppc/platforms/4xx/redwood6.h index 1814b9f5fc3a..1edcbe5c51c7 100644 --- a/arch/ppc/platforms/4xx/redwood6.h +++ b/arch/ppc/platforms/4xx/redwood6.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood6.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 2 | * Macros, definitions, and data structures specific to the IBM PowerPC |
5 | * STBx25xx "Redwood6" evaluation board. | 3 | * STBx25xx "Redwood6" evaluation board. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index 281b4a2ffb96..bab31eb30687 100644 --- a/arch/ppc/platforms/4xx/sycamore.c +++ b/arch/ppc/platforms/4xx/sycamore.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.c | ||
3 | * | ||
4 | * Architecture- / platform-specific boot-time initialization code for | 2 | * Architecture- / platform-specific boot-time initialization code for |
5 | * IBM PowerPC 4xx based boards. | 3 | * IBM PowerPC 4xx based boards. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h index 1cd6c824fd62..dae01620227d 100644 --- a/arch/ppc/platforms/4xx/sycamore.h +++ b/arch/ppc/platforms/4xx/sycamore.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.h | ||
3 | * | ||
4 | * Sycamore board definitions | 2 | * Sycamore board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.c b/arch/ppc/platforms/4xx/virtex-ii_pro.c deleted file mode 100644 index 097cc9d5aca0..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.c | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
8 | * terms of the GNU General Public License version 2. This program is licensed | ||
9 | * "as is" without any warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/ocp.h> | ||
15 | #include "virtex-ii_pro.h" | ||
16 | |||
17 | /* Have OCP take care of the serial ports. */ | ||
18 | struct ocp_def core_ocp[] = { | ||
19 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
20 | { .vendor = OCP_VENDOR_XILINX, | ||
21 | .function = OCP_FUNC_16550, | ||
22 | .index = 0, | ||
23 | .paddr = XPAR_UARTNS550_0_BASEADDR, | ||
24 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, | ||
25 | .pm = OCP_CPM_NA | ||
26 | }, | ||
27 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
28 | { .vendor = OCP_VENDOR_XILINX, | ||
29 | .function = OCP_FUNC_16550, | ||
30 | .index = 1, | ||
31 | .paddr = XPAR_UARTNS550_1_BASEADDR, | ||
32 | .irq = XPAR_INTC_0_UARTNS550_1_VEC_ID, | ||
33 | .pm = OCP_CPM_NA | ||
34 | }, | ||
35 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
36 | { .vendor = OCP_VENDOR_XILINX, | ||
37 | .function = OCP_FUNC_16550, | ||
38 | .index = 2, | ||
39 | .paddr = XPAR_UARTNS550_2_BASEADDR, | ||
40 | .irq = XPAR_INTC_0_UARTNS550_2_VEC_ID, | ||
41 | .pm = OCP_CPM_NA | ||
42 | }, | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | { .vendor = OCP_VENDOR_XILINX, | ||
45 | .function = OCP_FUNC_16550, | ||
46 | .index = 3, | ||
47 | .paddr = XPAR_UARTNS550_3_BASEADDR, | ||
48 | .irq = XPAR_INTC_0_UARTNS550_3_VEC_ID, | ||
49 | .pm = OCP_CPM_NA | ||
50 | }, | ||
51 | #ifdef XPAR_UARTNS550_4_BASEADDR | ||
52 | #error Edit this file to add more devices. | ||
53 | #endif /* 4 */ | ||
54 | #endif /* 3 */ | ||
55 | #endif /* 2 */ | ||
56 | #endif /* 1 */ | ||
57 | #endif /* 0 */ | ||
58 | { .vendor = OCP_VENDOR_INVALID | ||
59 | } | ||
60 | }; | ||
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.h b/arch/ppc/platforms/4xx/virtex-ii_pro.h deleted file mode 100644 index 9014c4887339..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEXIIPRO_H__ | ||
16 | #define __ASM_VIRTEXIIPRO_H__ | ||
17 | |||
18 | #include <linux/config.h> | ||
19 | #include <asm/xparameters.h> | ||
20 | |||
21 | /* serial defines */ | ||
22 | |||
23 | #define RS_TABLE_SIZE 4 /* change this and add more devices below | ||
24 | if you have more then 4 16x50 UARTs */ | ||
25 | |||
26 | #define BASE_BAUD (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16) | ||
27 | |||
28 | /* The serial ports in the Virtex-II Pro have each I/O byte in the | ||
29 | * LSByte of a word. This means that iomem_reg_shift needs to be 2 to | ||
30 | * change the byte offsets into word offsets. In addition the base | ||
31 | * addresses need to have 3 added to them to get to the LSByte. | ||
32 | */ | ||
33 | #define STD_UART_OP(num) \ | ||
34 | { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
35 | ASYNC_BOOT_AUTOCONF, \ | ||
36 | .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
37 | .iomem_reg_shift = 2, \ | ||
38 | .io_type = SERIAL_IO_MEM}, | ||
39 | |||
40 | #if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
41 | #define ML300_UART0 STD_UART_OP(0) | ||
42 | #else | ||
43 | #define ML300_UART0 | ||
44 | #endif | ||
45 | |||
46 | #if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
47 | #define ML300_UART1 STD_UART_OP(1) | ||
48 | #else | ||
49 | #define ML300_UART1 | ||
50 | #endif | ||
51 | |||
52 | #if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
53 | #define ML300_UART2 STD_UART_OP(2) | ||
54 | #else | ||
55 | #define ML300_UART2 | ||
56 | #endif | ||
57 | |||
58 | #if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
59 | #define ML300_UART3 STD_UART_OP(3) | ||
60 | #else | ||
61 | #define ML300_UART3 | ||
62 | #endif | ||
63 | |||
64 | #if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID) | ||
65 | #error Edit this file to add more devices. | ||
66 | #elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
67 | #define NR_SER_PORTS 4 | ||
68 | #elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
69 | #define NR_SER_PORTS 3 | ||
70 | #elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
71 | #define NR_SER_PORTS 2 | ||
72 | #elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
73 | #define NR_SER_PORTS 1 | ||
74 | #else | ||
75 | #define NR_SER_PORTS 0 | ||
76 | #endif | ||
77 | |||
78 | #if defined(CONFIG_UART0_TTYS0) | ||
79 | #define SERIAL_PORT_DFNS \ | ||
80 | ML300_UART0 \ | ||
81 | ML300_UART1 \ | ||
82 | ML300_UART2 \ | ||
83 | ML300_UART3 | ||
84 | #endif | ||
85 | |||
86 | #if defined(CONFIG_UART0_TTYS1) | ||
87 | #define SERIAL_PORT_DFNS \ | ||
88 | ML300_UART1 \ | ||
89 | ML300_UART0 \ | ||
90 | ML300_UART2 \ | ||
91 | ML300_UART3 | ||
92 | #endif | ||
93 | |||
94 | #define DCRN_CPMFR_BASE 0 | ||
95 | |||
96 | #include <asm/ibm405.h> | ||
97 | |||
98 | #endif /* __ASM_VIRTEXIIPRO_H__ */ | ||
99 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/virtex.c b/arch/ppc/platforms/4xx/virtex.c new file mode 100644 index 000000000000..133a83147199 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Virtex-II Pro & Virtex-4 FX common infrastructure | ||
3 | * | ||
4 | * Maintainer: Grant Likely <grant.likely@secretlab.ca> | ||
5 | * | ||
6 | * Copyright 2005 Secret Lab Technologies Ltd. | ||
7 | * Copyright 2005 General Dynamics Canada Ltd. | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <asm/ppc_sys.h> | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | #include <platforms/4xx/xparameters/xparameters.h> | ||
23 | |||
24 | #define XPAR_UART(num) { \ | ||
25 | .mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
26 | .irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
27 | .iotype = UPIO_MEM, \ | ||
28 | .uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \ | ||
29 | .flags = UPF_BOOT_AUTOCONF, \ | ||
30 | .regshift = 2, \ | ||
31 | } | ||
32 | |||
33 | struct plat_serial8250_port serial_platform_data[] = { | ||
34 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
35 | XPAR_UART(0), | ||
36 | #endif | ||
37 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
38 | XPAR_UART(1), | ||
39 | #endif | ||
40 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
41 | XPAR_UART(2), | ||
42 | #endif | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | XPAR_UART(3), | ||
45 | #endif | ||
46 | { }, /* terminated by empty record */ | ||
47 | }; | ||
48 | |||
49 | struct platform_device ppc_sys_platform_devices[] = { | ||
50 | [VIRTEX_UART] = { | ||
51 | .name = "serial8250", | ||
52 | .id = 0, | ||
53 | .dev.platform_data = serial_platform_data, | ||
54 | }, | ||
55 | }; | ||
56 | |||
diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h new file mode 100644 index 000000000000..c14325dfd7b1 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEX_H__ | ||
16 | #define __ASM_VIRTEX_H__ | ||
17 | |||
18 | /* serial defines */ | ||
19 | |||
20 | #include <asm/ibm405.h> | ||
21 | |||
22 | /* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */ | ||
23 | #if !defined(BASE_BAUD) | ||
24 | #define BASE_BAUD (0) /* dummy value; not used */ | ||
25 | #endif | ||
26 | |||
27 | /* Device type enumeration for platform bus definitions */ | ||
28 | #ifndef __ASSEMBLY__ | ||
29 | enum ppc_sys_devices { | ||
30 | VIRTEX_UART, NUM_PPC_SYS_DEVS, | ||
31 | }; | ||
32 | #endif | ||
33 | |||
34 | #endif /* __ASM_VIRTEX_H__ */ | ||
35 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c index 74cb33182d9f..6bd77902b9a4 100644 --- a/arch/ppc/platforms/4xx/walnut.c +++ b/arch/ppc/platforms/4xx/walnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.c | ||
3 | * | ||
4 | * Architecture- / platform-specific boot-time initialization code for | 2 | * Architecture- / platform-specific boot-time initialization code for |
5 | * IBM PowerPC 4xx based boards. Adapted from original | 3 | * IBM PowerPC 4xx based boards. Adapted from original |
6 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | 4 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek |
diff --git a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h index dcf2691698c0..f13a577f0a41 100644 --- a/arch/ppc/platforms/4xx/walnut.h +++ b/arch/ppc/platforms/4xx/walnut.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.h | ||
3 | * | ||
4 | * Walnut board definitions | 2 | * Walnut board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c index e90d97f64f76..d97a7f269f97 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.c +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml300.c | ||
3 | * | ||
4 | * Xilinx ML300 evaluation board initialization | 2 | * Xilinx ML300 evaluation board initialization |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -17,12 +15,14 @@ | |||
17 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
18 | #include <linux/serial.h> | 16 | #include <linux/serial.h> |
19 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/serial_8250.h> | ||
20 | #include <linux/serialP.h> | 19 | #include <linux/serialP.h> |
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
22 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
23 | #include <asm/ocp.h> | 22 | #include <asm/ppc_sys.h> |
24 | 23 | ||
25 | #include <platforms/4xx/virtex-ii_pro.h> /* for NR_SER_PORTS */ | 24 | #include <syslib/gen550.h> |
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | 26 | ||
27 | /* | 27 | /* |
28 | * As an overview of how the following functions (platform_init, | 28 | * As an overview of how the following functions (platform_init, |
@@ -54,6 +54,22 @@ | |||
54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | 54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c |
55 | */ | 55 | */ |
56 | 56 | ||
57 | /* Board specifications structures */ | ||
58 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
59 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
60 | { | ||
61 | /* Only one entry, always assume the same design */ | ||
62 | .ppc_sys_name = "Xilinx ML300 Reference Design", | ||
63 | .mask = 0x00000000, | ||
64 | .value = 0x00000000, | ||
65 | .num_devices = 1, | ||
66 | .device_list = (enum ppc_sys_devices[]) | ||
67 | { | ||
68 | VIRTEX_UART, | ||
69 | }, | ||
70 | }, | ||
71 | }; | ||
72 | |||
57 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | 73 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) |
58 | 74 | ||
59 | static volatile unsigned *powerdown_base = | 75 | static volatile unsigned *powerdown_base = |
@@ -80,28 +96,39 @@ ml300_map_io(void) | |||
80 | #endif | 96 | #endif |
81 | } | 97 | } |
82 | 98 | ||
99 | /* Early serial support functions */ | ||
83 | static void __init | 100 | static void __init |
101 | ml300_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
102 | { | ||
103 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
104 | struct uart_port serial_req; | ||
105 | |||
106 | memset(&serial_req, 0, sizeof(serial_req)); | ||
107 | serial_req.mapbase = pdata->mapbase; | ||
108 | serial_req.membase = pdata->membase; | ||
109 | serial_req.irq = pdata->irq; | ||
110 | serial_req.uartclk = pdata->uartclk; | ||
111 | serial_req.regshift = pdata->regshift; | ||
112 | serial_req.iotype = pdata->iotype; | ||
113 | serial_req.flags = pdata->flags; | ||
114 | gen550_init(num, &serial_req); | ||
115 | #endif | ||
116 | } | ||
117 | |||
118 | void __init | ||
84 | ml300_early_serial_map(void) | 119 | ml300_early_serial_map(void) |
85 | { | 120 | { |
86 | #ifdef CONFIG_SERIAL_8250 | 121 | #ifdef CONFIG_SERIAL_8250 |
87 | struct serial_state old_ports[] = { SERIAL_PORT_DFNS }; | 122 | struct plat_serial8250_port *pdata; |
88 | struct uart_port port; | 123 | int i = 0; |
89 | int i; | 124 | |
90 | 125 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | |
91 | /* Setup ioremapped serial port access */ | 126 | while(pdata && pdata->flags) |
92 | for (i = 0; i < ARRAY_SIZE(old_ports); i++ ) { | 127 | { |
93 | memset(&port, 0, sizeof(port)); | 128 | pdata->membase = ioremap(pdata->mapbase, 0x100); |
94 | port.membase = ioremap((phys_addr_t)(old_ports[i].iomem_base), 16); | 129 | ml300_early_serial_init(i, pdata); |
95 | port.irq = old_ports[i].irq; | 130 | pdata++; |
96 | port.uartclk = old_ports[i].baud_base * 16; | 131 | i++; |
97 | port.regshift = old_ports[i].iomem_reg_shift; | ||
98 | port.iotype = UPIO_MEM; | ||
99 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; | ||
100 | port.line = i; | ||
101 | |||
102 | if (early_serial_setup(&port) != 0) { | ||
103 | printk("Early serial init of port %d failed\n", i); | ||
104 | } | ||
105 | } | 132 | } |
106 | #endif /* CONFIG_SERIAL_8250 */ | 133 | #endif /* CONFIG_SERIAL_8250 */ |
107 | } | 134 | } |
@@ -109,9 +136,8 @@ ml300_early_serial_map(void) | |||
109 | void __init | 136 | void __init |
110 | ml300_setup_arch(void) | 137 | ml300_setup_arch(void) |
111 | { | 138 | { |
112 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
113 | |||
114 | ml300_early_serial_map(); | 139 | ml300_early_serial_map(); |
140 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
115 | 141 | ||
116 | /* Identify the system */ | 142 | /* Identify the system */ |
117 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); | 143 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); |
@@ -131,6 +157,8 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
131 | { | 157 | { |
132 | ppc4xx_init(r3, r4, r5, r6, r7); | 158 | ppc4xx_init(r3, r4, r5, r6, r7); |
133 | 159 | ||
160 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
161 | |||
134 | ppc_md.setup_arch = ml300_setup_arch; | 162 | ppc_md.setup_arch = ml300_setup_arch; |
135 | ppc_md.setup_io_mappings = ml300_map_io; | 163 | ppc_md.setup_io_mappings = ml300_map_io; |
136 | ppc_md.init_IRQ = ml300_init_irq; | 164 | ppc_md.init_IRQ = ml300_init_irq; |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.h b/arch/ppc/platforms/4xx/xilinx_ml300.h index f8c588412336..3d57332ba820 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.h +++ b/arch/ppc/platforms/4xx/xilinx_ml300.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml300.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML300 evaluation board | 2 | * Include file that defines the Xilinx ML300 evaluation board |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -16,7 +14,7 @@ | |||
16 | #define __ASM_XILINX_ML300_H__ | 14 | #define __ASM_XILINX_ML300_H__ |
17 | 15 | ||
18 | /* ML300 has a Xilinx Virtex-II Pro processor */ | 16 | /* ML300 has a Xilinx Virtex-II Pro processor */ |
19 | #include <platforms/4xx/virtex-ii_pro.h> | 17 | #include <platforms/4xx/virtex.h> |
20 | 18 | ||
21 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
22 | 20 | ||
@@ -41,7 +39,7 @@ typedef struct board_info { | |||
41 | #define PPC4xx_ONB_IO_VADDR 0u | 39 | #define PPC4xx_ONB_IO_VADDR 0u |
42 | #define PPC4xx_ONB_IO_SIZE 0u | 40 | #define PPC4xx_ONB_IO_SIZE 0u |
43 | 41 | ||
44 | #define PPC4xx_MACHINE_NAME "Xilinx ML300" | 42 | #define PPC4xx_MACHINE_NAME "Xilinx ML300 Reference System" |
45 | 43 | ||
46 | #endif /* __ASM_XILINX_ML300_H__ */ | 44 | #endif /* __ASM_XILINX_ML300_H__ */ |
47 | #endif /* __KERNEL__ */ | 45 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c new file mode 100644 index 000000000000..4c0c7e4c1114 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.c | |||
@@ -0,0 +1,177 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.c | ||
3 | * | ||
4 | * Xilinx ML403 evaluation board initialization | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/serial.h> | ||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serialP.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/ppc_sys.h> | ||
27 | |||
28 | #include <syslib/gen550.h> | ||
29 | #include <platforms/4xx/xparameters/xparameters.h> | ||
30 | |||
31 | /* | ||
32 | * As an overview of how the following functions (platform_init, | ||
33 | * ml403_map_io, ml403_setup_arch and ml403_init_IRQ) fit into the | ||
34 | * kernel startup procedure, here's a call tree: | ||
35 | * | ||
36 | * start_here arch/ppc/kernel/head_4xx.S | ||
37 | * early_init arch/ppc/kernel/setup.c | ||
38 | * machine_init arch/ppc/kernel/setup.c | ||
39 | * platform_init this file | ||
40 | * ppc4xx_init arch/ppc/syslib/ppc4xx_setup.c | ||
41 | * parse_bootinfo | ||
42 | * find_bootinfo | ||
43 | * "setup some default ppc_md pointers" | ||
44 | * MMU_init arch/ppc/mm/init.c | ||
45 | * *ppc_md.setup_io_mappings == ml403_map_io this file | ||
46 | * ppc4xx_map_io arch/ppc/syslib/ppc4xx_setup.c | ||
47 | * start_kernel init/main.c | ||
48 | * setup_arch arch/ppc/kernel/setup.c | ||
49 | * #if defined(CONFIG_KGDB) | ||
50 | * *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc | ||
51 | * #endif | ||
52 | * *ppc_md.setup_arch == ml403_setup_arch this file | ||
53 | * ppc4xx_setup_arch arch/ppc/syslib/ppc4xx_setup.c | ||
54 | * ppc4xx_find_bridges arch/ppc/syslib/ppc405_pci.c | ||
55 | * init_IRQ arch/ppc/kernel/irq.c | ||
56 | * *ppc_md.init_IRQ == ml403_init_IRQ this file | ||
57 | * ppc4xx_init_IRQ arch/ppc/syslib/ppc4xx_setup.c | ||
58 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | ||
59 | */ | ||
60 | |||
61 | /* Board specifications structures */ | ||
62 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
63 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
64 | { | ||
65 | /* Only one entry, always assume the same design */ | ||
66 | .ppc_sys_name = "Xilinx ML403 Reference Design", | ||
67 | .mask = 0x00000000, | ||
68 | .value = 0x00000000, | ||
69 | .num_devices = 1, | ||
70 | .device_list = (enum ppc_sys_devices[]) | ||
71 | { | ||
72 | VIRTEX_UART, | ||
73 | }, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
78 | |||
79 | static volatile unsigned *powerdown_base = | ||
80 | (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR; | ||
81 | |||
82 | static void | ||
83 | xilinx_power_off(void) | ||
84 | { | ||
85 | local_irq_disable(); | ||
86 | out_be32(powerdown_base, XPAR_POWER_0_POWERDOWN_VALUE); | ||
87 | while (1) ; | ||
88 | } | ||
89 | #endif | ||
90 | |||
91 | void __init | ||
92 | ml403_map_io(void) | ||
93 | { | ||
94 | ppc4xx_map_io(); | ||
95 | |||
96 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
97 | powerdown_base = ioremap((unsigned long) powerdown_base, | ||
98 | XPAR_POWER_0_POWERDOWN_HIGHADDR - | ||
99 | XPAR_POWER_0_POWERDOWN_BASEADDR + 1); | ||
100 | #endif | ||
101 | } | ||
102 | |||
103 | /* Early serial support functions */ | ||
104 | static void __init | ||
105 | ml403_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
106 | { | ||
107 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
108 | struct uart_port serial_req; | ||
109 | |||
110 | memset(&serial_req, 0, sizeof(serial_req)); | ||
111 | serial_req.mapbase = pdata->mapbase; | ||
112 | serial_req.membase = pdata->membase; | ||
113 | serial_req.irq = pdata->irq; | ||
114 | serial_req.uartclk = pdata->uartclk; | ||
115 | serial_req.regshift = pdata->regshift; | ||
116 | serial_req.iotype = pdata->iotype; | ||
117 | serial_req.flags = pdata->flags; | ||
118 | gen550_init(num, &serial_req); | ||
119 | #endif | ||
120 | } | ||
121 | |||
122 | void __init | ||
123 | ml403_early_serial_map(void) | ||
124 | { | ||
125 | #ifdef CONFIG_SERIAL_8250 | ||
126 | struct plat_serial8250_port *pdata; | ||
127 | int i = 0; | ||
128 | |||
129 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | ||
130 | while(pdata && pdata->flags) | ||
131 | { | ||
132 | pdata->membase = ioremap(pdata->mapbase, 0x100); | ||
133 | ml403_early_serial_init(i, pdata); | ||
134 | pdata++; | ||
135 | i++; | ||
136 | } | ||
137 | #endif /* CONFIG_SERIAL_8250 */ | ||
138 | } | ||
139 | |||
140 | void __init | ||
141 | ml403_setup_arch(void) | ||
142 | { | ||
143 | ml403_early_serial_map(); | ||
144 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
145 | |||
146 | /* Identify the system */ | ||
147 | printk(KERN_INFO "Xilinx ML403 Reference System (Virtex-4 FX)\n"); | ||
148 | } | ||
149 | |||
150 | /* Called after board_setup_irq from ppc4xx_init_IRQ(). */ | ||
151 | void __init | ||
152 | ml403_init_irq(void) | ||
153 | { | ||
154 | ppc4xx_init_IRQ(); | ||
155 | } | ||
156 | |||
157 | void __init | ||
158 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
159 | unsigned long r6, unsigned long r7) | ||
160 | { | ||
161 | ppc4xx_init(r3, r4, r5, r6, r7); | ||
162 | |||
163 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
164 | |||
165 | ppc_md.setup_arch = ml403_setup_arch; | ||
166 | ppc_md.setup_io_mappings = ml403_map_io; | ||
167 | ppc_md.init_IRQ = ml403_init_irq; | ||
168 | |||
169 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
170 | ppc_md.power_off = xilinx_power_off; | ||
171 | #endif | ||
172 | |||
173 | #ifdef CONFIG_KGDB | ||
174 | ppc_md.early_serial_map = ml403_early_serial_map; | ||
175 | #endif | ||
176 | } | ||
177 | |||
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.h b/arch/ppc/platforms/4xx/xilinx_ml403.h new file mode 100644 index 000000000000..473596959902 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML403 reference design | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | #ifndef __ASM_XILINX_ML403_H__ | ||
18 | #define __ASM_XILINX_ML403_H__ | ||
19 | |||
20 | /* ML403 has a Xilinx Virtex-4 FPGA with a PPC405 hard core */ | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | ||
24 | |||
25 | #include <linux/types.h> | ||
26 | |||
27 | typedef struct board_info { | ||
28 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
29 | unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */ | ||
30 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
31 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
32 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
33 | } bd_t; | ||
34 | |||
35 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
36 | */ | ||
37 | #define bi_tbfreq bi_intfreq | ||
38 | |||
39 | #endif /* !__ASSEMBLY__ */ | ||
40 | |||
41 | /* We don't need anything mapped. Size of zero will accomplish that. */ | ||
42 | #define PPC4xx_ONB_IO_PADDR 0u | ||
43 | #define PPC4xx_ONB_IO_VADDR 0u | ||
44 | #define PPC4xx_ONB_IO_SIZE 0u | ||
45 | |||
46 | #define PPC4xx_MACHINE_NAME "Xilinx ML403 Reference Design" | ||
47 | |||
48 | #endif /* __ASM_XILINX_ML403_H__ */ | ||
49 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h new file mode 100644 index 000000000000..4cf21f256356 --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/xparameters.h | ||
3 | * | ||
4 | * This file includes the correct xparameters.h for the CONFIG'ed board plus | ||
5 | * fixups to translate board specific XPAR values to a common set of names | ||
6 | * | ||
7 | * Author: MontaVista Software, Inc. | ||
8 | * source@mvista.com | ||
9 | * | ||
10 | * 2004 (c) MontaVista Software, Inc. This file is licensed under the terms | ||
11 | * of the GNU General Public License version 2. This program is licensed | ||
12 | * "as is" without any warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | |||
17 | #if defined(CONFIG_XILINX_ML300) | ||
18 | #include "xparameters_ml300.h" | ||
19 | #elif defined(CONFIG_XILINX_ML403) | ||
20 | #include "xparameters_ml403.h" | ||
21 | #else | ||
22 | /* Add other board xparameter includes here before the #else */ | ||
23 | #error No xparameters_*.h file included | ||
24 | #endif | ||
25 | |||
26 | #ifndef SERIAL_PORT_DFNS | ||
27 | /* zImage serial port definitions */ | ||
28 | #define RS_TABLE_SIZE 1 | ||
29 | #define SERIAL_PORT_DFNS { \ | ||
30 | .baud_base = XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16, \ | ||
31 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, \ | ||
32 | .flags = ASYNC_BOOT_AUTOCONF, \ | ||
33 | .iomem_base = (u8 *)XPAR_UARTNS550_0_BASEADDR + 3, \ | ||
34 | .iomem_reg_shift = 2, \ | ||
35 | .io_type = SERIAL_IO_MEM, \ | ||
36 | }, | ||
37 | #endif | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h new file mode 100644 index 000000000000..5cacdcb3964d --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h | |||
@@ -0,0 +1,243 @@ | |||
1 | |||
2 | /******************************************************************* | ||
3 | * | ||
4 | * CAUTION: This file is automatically generated by libgen. | ||
5 | * Version: Xilinx EDK 7.1.2 EDK_H.12.5.1 | ||
6 | * DO NOT EDIT. | ||
7 | * | ||
8 | * Copyright (c) 2005 Xilinx, Inc. All rights reserved. | ||
9 | * | ||
10 | * Description: Driver parameters | ||
11 | * | ||
12 | *******************************************************************/ | ||
13 | |||
14 | #define XPAR_PLB_BRAM_IF_CNTLR_0_BASEADDR 0xFFFF0000 | ||
15 | #define XPAR_PLB_BRAM_IF_CNTLR_0_HIGHADDR 0xFFFFFFFF | ||
16 | |||
17 | /******************************************************************/ | ||
18 | |||
19 | #define XPAR_OPB_EMC_0_MEM0_BASEADDR 0x20000000 | ||
20 | #define XPAR_OPB_EMC_0_MEM0_HIGHADDR 0x200FFFFF | ||
21 | #define XPAR_OPB_EMC_0_MEM1_BASEADDR 0x28000000 | ||
22 | #define XPAR_OPB_EMC_0_MEM1_HIGHADDR 0x287FFFFF | ||
23 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR 0xA6000000 | ||
24 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR 0xA60000FF | ||
25 | #define XPAR_OPB_EMC_USB_0_MEM0_BASEADDR 0xA5000000 | ||
26 | #define XPAR_OPB_EMC_USB_0_MEM0_HIGHADDR 0xA50000FF | ||
27 | #define XPAR_PLB_DDR_0_MEM0_BASEADDR 0x00000000 | ||
28 | #define XPAR_PLB_DDR_0_MEM0_HIGHADDR 0x0FFFFFFF | ||
29 | |||
30 | /******************************************************************/ | ||
31 | |||
32 | #define XPAR_XEMAC_NUM_INSTANCES 1 | ||
33 | #define XPAR_OPB_ETHERNET_0_BASEADDR 0x60000000 | ||
34 | #define XPAR_OPB_ETHERNET_0_HIGHADDR 0x60003FFF | ||
35 | #define XPAR_OPB_ETHERNET_0_DEVICE_ID 0 | ||
36 | #define XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST 1 | ||
37 | #define XPAR_OPB_ETHERNET_0_DMA_PRESENT 1 | ||
38 | #define XPAR_OPB_ETHERNET_0_MII_EXIST 1 | ||
39 | |||
40 | /******************************************************************/ | ||
41 | |||
42 | #define XPAR_XUARTNS550_NUM_INSTANCES 1 | ||
43 | #define XPAR_XUARTNS550_CLOCK_HZ 100000000 | ||
44 | #define XPAR_OPB_UART16550_0_BASEADDR 0xA0000000 | ||
45 | #define XPAR_OPB_UART16550_0_HIGHADDR 0xA0001FFF | ||
46 | #define XPAR_OPB_UART16550_0_DEVICE_ID 0 | ||
47 | |||
48 | /******************************************************************/ | ||
49 | |||
50 | #define XPAR_XGPIO_NUM_INSTANCES 3 | ||
51 | #define XPAR_OPB_GPIO_0_BASEADDR 0x90000000 | ||
52 | #define XPAR_OPB_GPIO_0_HIGHADDR 0x900001FF | ||
53 | #define XPAR_OPB_GPIO_0_DEVICE_ID 0 | ||
54 | #define XPAR_OPB_GPIO_0_INTERRUPT_PRESENT 0 | ||
55 | #define XPAR_OPB_GPIO_0_IS_DUAL 1 | ||
56 | #define XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR 0x90001000 | ||
57 | #define XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR 0x900011FF | ||
58 | #define XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID 1 | ||
59 | #define XPAR_OPB_GPIO_EXP_HDR_0_INTERRUPT_PRESENT 0 | ||
60 | #define XPAR_OPB_GPIO_EXP_HDR_0_IS_DUAL 1 | ||
61 | #define XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR 0x90002000 | ||
62 | #define XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR 0x900021FF | ||
63 | #define XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID 2 | ||
64 | #define XPAR_OPB_GPIO_CHAR_LCD_0_INTERRUPT_PRESENT 0 | ||
65 | #define XPAR_OPB_GPIO_CHAR_LCD_0_IS_DUAL 0 | ||
66 | |||
67 | /******************************************************************/ | ||
68 | |||
69 | #define XPAR_XPS2_NUM_INSTANCES 2 | ||
70 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 0 | ||
71 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 0xA9000000 | ||
72 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 (0xA9000000+0x3F) | ||
73 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 1 | ||
74 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 (0xA9000000+0x1000) | ||
75 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 (0xA9000000+0x103F) | ||
76 | |||
77 | /******************************************************************/ | ||
78 | |||
79 | #define XPAR_XIIC_NUM_INSTANCES 1 | ||
80 | #define XPAR_OPB_IIC_0_BASEADDR 0xA8000000 | ||
81 | #define XPAR_OPB_IIC_0_HIGHADDR 0xA80001FF | ||
82 | #define XPAR_OPB_IIC_0_DEVICE_ID 0 | ||
83 | #define XPAR_OPB_IIC_0_TEN_BIT_ADR 0 | ||
84 | #define XPAR_OPB_IIC_0_GPO_WIDTH 1 | ||
85 | |||
86 | /******************************************************************/ | ||
87 | |||
88 | #define XPAR_INTC_MAX_NUM_INTR_INPUTS 10 | ||
89 | #define XPAR_XINTC_HAS_IPR 1 | ||
90 | #define XPAR_XINTC_USE_DCR 0 | ||
91 | #define XPAR_XINTC_NUM_INSTANCES 1 | ||
92 | #define XPAR_OPB_INTC_0_BASEADDR 0xD1000FC0 | ||
93 | #define XPAR_OPB_INTC_0_HIGHADDR 0xD1000FDF | ||
94 | #define XPAR_OPB_INTC_0_DEVICE_ID 0 | ||
95 | #define XPAR_OPB_INTC_0_KIND_OF_INTR 0x00000000 | ||
96 | |||
97 | /******************************************************************/ | ||
98 | |||
99 | #define XPAR_INTC_SINGLE_BASEADDR 0xD1000FC0 | ||
100 | #define XPAR_INTC_SINGLE_HIGHADDR 0xD1000FDF | ||
101 | #define XPAR_INTC_SINGLE_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
102 | #define XPAR_OPB_ETHERNET_0_IP2INTC_IRPT_MASK 0X000001 | ||
103 | #define XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR 0 | ||
104 | #define XPAR_SYSTEM_USB_HPI_INT_MASK 0X000002 | ||
105 | #define XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR 1 | ||
106 | #define XPAR_MISC_LOGIC_0_PHY_MII_INT_MASK 0X000004 | ||
107 | #define XPAR_OPB_INTC_0_MISC_LOGIC_0_PHY_MII_INT_INTR 2 | ||
108 | #define XPAR_OPB_SYSACE_0_SYSACE_IRQ_MASK 0X000008 | ||
109 | #define XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR 3 | ||
110 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_MASK 0X000010 | ||
111 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR 4 | ||
112 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_MASK 0X000020 | ||
113 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR 5 | ||
114 | #define XPAR_OPB_IIC_0_IP2INTC_IRPT_MASK 0X000040 | ||
115 | #define XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR 6 | ||
116 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR2_MASK 0X000080 | ||
117 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR 7 | ||
118 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR1_MASK 0X000100 | ||
119 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR 8 | ||
120 | #define XPAR_OPB_UART16550_0_IP2INTC_IRPT_MASK 0X000200 | ||
121 | #define XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR 9 | ||
122 | |||
123 | /******************************************************************/ | ||
124 | |||
125 | #define XPAR_XTFT_NUM_INSTANCES 1 | ||
126 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR 0xD0000200 | ||
127 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_HIGHADDR 0xD0000207 | ||
128 | #define XPAR_PLB_TFT_CNTLR_REF_0_DEVICE_ID 0 | ||
129 | |||
130 | /******************************************************************/ | ||
131 | |||
132 | #define XPAR_XSYSACE_MEM_WIDTH 16 | ||
133 | #define XPAR_XSYSACE_NUM_INSTANCES 1 | ||
134 | #define XPAR_OPB_SYSACE_0_BASEADDR 0xCF000000 | ||
135 | #define XPAR_OPB_SYSACE_0_HIGHADDR 0xCF0001FF | ||
136 | #define XPAR_OPB_SYSACE_0_DEVICE_ID 0 | ||
137 | #define XPAR_OPB_SYSACE_0_MEM_WIDTH 16 | ||
138 | |||
139 | /******************************************************************/ | ||
140 | |||
141 | #define XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ 300000000 | ||
142 | |||
143 | /******************************************************************/ | ||
144 | |||
145 | |||
146 | /******************************************************************/ | ||
147 | |||
148 | /* Linux Redefines */ | ||
149 | |||
150 | /******************************************************************/ | ||
151 | |||
152 | #define XPAR_UARTNS550_0_BASEADDR (XPAR_OPB_UART16550_0_BASEADDR+0x1000) | ||
153 | #define XPAR_UARTNS550_0_HIGHADDR XPAR_OPB_UART16550_0_HIGHADDR | ||
154 | #define XPAR_UARTNS550_0_CLOCK_FREQ_HZ XPAR_XUARTNS550_CLOCK_HZ | ||
155 | #define XPAR_UARTNS550_0_DEVICE_ID XPAR_OPB_UART16550_0_DEVICE_ID | ||
156 | |||
157 | /******************************************************************/ | ||
158 | |||
159 | #define XPAR_INTC_0_BASEADDR XPAR_OPB_INTC_0_BASEADDR | ||
160 | #define XPAR_INTC_0_HIGHADDR XPAR_OPB_INTC_0_HIGHADDR | ||
161 | #define XPAR_INTC_0_KIND_OF_INTR XPAR_OPB_INTC_0_KIND_OF_INTR | ||
162 | #define XPAR_INTC_0_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
163 | |||
164 | /******************************************************************/ | ||
165 | |||
166 | #define XPAR_INTC_0_EMAC_0_VEC_ID XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR | ||
167 | #define XPAR_INTC_0_SYSACE_0_VEC_ID XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR | ||
168 | #define XPAR_INTC_0_IIC_0_VEC_ID XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR | ||
169 | #define XPAR_INTC_0_PS2_1_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR | ||
170 | #define XPAR_INTC_0_PS2_0_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR | ||
171 | #define XPAR_INTC_0_UARTNS550_0_VEC_ID XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR | ||
172 | |||
173 | /******************************************************************/ | ||
174 | |||
175 | #define XPAR_TFT_0_BASEADDR XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR | ||
176 | |||
177 | /******************************************************************/ | ||
178 | |||
179 | #define XPAR_EMAC_0_BASEADDR XPAR_OPB_ETHERNET_0_BASEADDR | ||
180 | #define XPAR_EMAC_0_HIGHADDR XPAR_OPB_ETHERNET_0_HIGHADDR | ||
181 | #define XPAR_EMAC_0_DMA_PRESENT XPAR_OPB_ETHERNET_0_DMA_PRESENT | ||
182 | #define XPAR_EMAC_0_MII_EXIST XPAR_OPB_ETHERNET_0_MII_EXIST | ||
183 | #define XPAR_EMAC_0_ERR_COUNT_EXIST XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST | ||
184 | #define XPAR_EMAC_0_DEVICE_ID XPAR_OPB_ETHERNET_0_DEVICE_ID | ||
185 | |||
186 | /******************************************************************/ | ||
187 | |||
188 | #define XPAR_GPIO_0_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_0 | ||
189 | #define XPAR_GPIO_0_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_0 | ||
190 | #define XPAR_GPIO_0_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_0 | ||
191 | #define XPAR_GPIO_1_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_1 | ||
192 | #define XPAR_GPIO_1_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_1 | ||
193 | #define XPAR_GPIO_1_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_1 | ||
194 | #define XPAR_GPIO_2_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_0 | ||
195 | #define XPAR_GPIO_2_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_0 | ||
196 | #define XPAR_GPIO_2_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_0 | ||
197 | #define XPAR_GPIO_3_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_1 | ||
198 | #define XPAR_GPIO_3_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_1 | ||
199 | #define XPAR_GPIO_3_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_1 | ||
200 | #define XPAR_GPIO_4_BASEADDR XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR | ||
201 | #define XPAR_GPIO_4_HIGHADDR XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR | ||
202 | #define XPAR_GPIO_4_DEVICE_ID XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID | ||
203 | |||
204 | /******************************************************************/ | ||
205 | |||
206 | #define XPAR_PS2_0_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 | ||
207 | #define XPAR_PS2_0_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 | ||
208 | #define XPAR_PS2_0_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 | ||
209 | #define XPAR_PS2_1_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 | ||
210 | #define XPAR_PS2_1_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 | ||
211 | #define XPAR_PS2_1_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 | ||
212 | |||
213 | /******************************************************************/ | ||
214 | |||
215 | #define XPAR_SYSACE_0_BASEADDR XPAR_OPB_SYSACE_0_BASEADDR | ||
216 | #define XPAR_SYSACE_0_HIGHADDR XPAR_OPB_SYSACE_0_HIGHADDR | ||
217 | #define XPAR_SYSACE_0_DEVICE_ID XPAR_OPB_SYSACE_0_DEVICE_ID | ||
218 | |||
219 | /******************************************************************/ | ||
220 | |||
221 | #define XPAR_IIC_0_BASEADDR XPAR_OPB_IIC_0_BASEADDR | ||
222 | #define XPAR_IIC_0_HIGHADDR XPAR_OPB_IIC_0_HIGHADDR | ||
223 | #define XPAR_IIC_0_TEN_BIT_ADR XPAR_OPB_IIC_0_TEN_BIT_ADR | ||
224 | #define XPAR_IIC_0_DEVICE_ID XPAR_OPB_IIC_0_DEVICE_ID | ||
225 | |||
226 | /******************************************************************/ | ||
227 | |||
228 | #define XPAR_PLB_CLOCK_FREQ_HZ 100000000 | ||
229 | #define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ | ||
230 | #define XPAR_DDR_0_SIZE 0x4000000 | ||
231 | |||
232 | /******************************************************************/ | ||
233 | |||
234 | #define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0x00000400 | ||
235 | #define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 0x000007FF | ||
236 | #define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0xA0 | ||
237 | |||
238 | /******************************************************************/ | ||
239 | |||
240 | #define XPAR_PCI_0_CLOCK_FREQ_HZ 0 | ||
241 | |||
242 | /******************************************************************/ | ||
243 | |||
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index b065b8babcd3..f287dcdbffce 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/yucca.c | ||
3 | * | ||
4 | * Yucca board specific routines | 2 | * Yucca board specific routines |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) | 4 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) |
diff --git a/arch/ppc/platforms/4xx/yucca.h b/arch/ppc/platforms/4xx/yucca.h index 01a4afea1514..7ae23012237a 100644 --- a/arch/ppc/platforms/4xx/yucca.h +++ b/arch/ppc/platforms/4xx/yucca.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/yucca.h | ||
3 | * | ||
4 | * Yucca board definitions | 2 | * Yucca board definitions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) | 4 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index 1a659bbc1860..11626dd9090f 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc834x_sys.c | ||
3 | * | ||
4 | * MPC834x SYS board specific routines | 2 | * MPC834x SYS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index 2e514d316fb8..6727bbdc36ec 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc834x_sys.h | ||
3 | * | ||
4 | * MPC834X SYS common board definitions | 2 | * MPC834X SYS common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -25,7 +23,7 @@ | |||
25 | #define VIRT_IMMRBAR ((uint)0xfe000000) | 23 | #define VIRT_IMMRBAR ((uint)0xfe000000) |
26 | 24 | ||
27 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) | 25 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) |
28 | #define BCSR_SIZE ((uint)(128 * 1024)) | 26 | #define BCSR_SIZE ((uint)(32 * 1024)) |
29 | 27 | ||
30 | #define BCSR_MISC_REG2_OFF 0x07 | 28 | #define BCSR_MISC_REG2_OFF 0x07 |
31 | #define BCSR_MISC_REG2_PORESET 0x01 | 29 | #define BCSR_MISC_REG2_PORESET 0x01 |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 408d64f18e1a..9b014df516b9 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8540_ads.c | ||
3 | * | ||
4 | * MPC8540ADS board specific routines | 2 | * MPC8540ADS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.h b/arch/ppc/platforms/85xx/mpc8540_ads.h index e48ca3a97397..0b5e7ff856f5 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.h +++ b/arch/ppc/platforms/85xx/mpc8540_ads.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8540_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | 2 | * MPC8540ADS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8555_cds.h b/arch/ppc/platforms/85xx/mpc8555_cds.h index 1a8e6c67355d..9754dbd5d18c 100644 --- a/arch/ppc/platforms/85xx/mpc8555_cds.h +++ b/arch/ppc/platforms/85xx/mpc8555_cds.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8555_cds.h | ||
3 | * | ||
4 | * MPC8555CDS board definitions | 2 | * MPC8555CDS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 442c7ff195d3..0cb2e86470e2 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8560_ads.c | ||
3 | * | ||
4 | * MPC8560ADS board specific routines | 2 | * MPC8560ADS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.h b/arch/ppc/platforms/85xx/mpc8560_ads.h index 143ae7eefa7c..c2247c21fc53 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.h +++ b/arch/ppc/platforms/85xx/mpc8560_ads.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8560_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | 2 | * MPC8540ADS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c index 17ce48fe3503..8fd9d763f58d 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_ads_common.c | ||
3 | * | ||
4 | * MPC85xx ADS board common routines | 2 | * MPC85xx ADS board common routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h index 198a6a02cde8..de8d41aafe11 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_ads_common.h | ||
3 | * | ||
4 | * MPC85XX ADS common board definitions | 2 | * MPC85XX ADS common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 1801ab392e22..c9e0aeeca3d8 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platform/85xx/mpc85xx_cds_common.c | ||
3 | * | ||
4 | * MPC85xx CDS board specific routines | 2 | * MPC85xx CDS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h index 5b588cfd0e41..62df54f61ae3 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_cds_common.h | ||
3 | * | ||
4 | * MPC85xx CDS board definitions | 2 | * MPC85xx CDS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 8a72221f816c..b73778ecf827 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc8560.c | ||
3 | * | ||
4 | * Wind River SBC8560 board specific routines | 2 | * Wind River SBC8560 board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala | 4 | * Maintainer: Kumar Gala |
diff --git a/arch/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h index 5e1b00c77da5..44ffaa2d2c87 100644 --- a/arch/ppc/platforms/85xx/sbc8560.h +++ b/arch/ppc/platforms/85xx/sbc8560.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc8560.h | ||
3 | * | ||
4 | * Wind River SBC8560 board definitions | 2 | * Wind River SBC8560 board definitions |
5 | * | 3 | * |
6 | * Copyright 2003 Motorola Inc. | 4 | * Copyright 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c index c02f110219f5..d3ff280510ff 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.c +++ b/arch/ppc/platforms/85xx/sbc85xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platform/85xx/sbc85xx.c | ||
3 | * | ||
4 | * WindRiver PowerQUICC III SBC85xx board common routines | 2 | * WindRiver PowerQUICC III SBC85xx board common routines |
5 | * | 3 | * |
6 | * Copyright 2002, 2003 Motorola Inc. | 4 | * Copyright 2002, 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/sbc85xx.h b/arch/ppc/platforms/85xx/sbc85xx.h index 7af93c691a6b..5dd8b6a98c9b 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.h +++ b/arch/ppc/platforms/85xx/sbc85xx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc85xx.h | ||
3 | * | ||
4 | * WindRiver PowerQUICC III SBC85xx common board definitions | 2 | * WindRiver PowerQUICC III SBC85xx common board definitions |
5 | * | 3 | * |
6 | * Copyright 2003 Motorola Inc. | 4 | * Copyright 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 061bb7cf2d9a..8d7baa9a397a 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/stx_gp3.c | ||
3 | * | ||
4 | * STx GP3 board specific routines | 2 | * STx GP3 board specific routines |
5 | * | 3 | * |
6 | * Dan Malek <dan@embeddededge.com> | 4 | * Dan Malek <dan@embeddededge.com> |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h index 2f25b5195152..3f71f8f59370 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.h +++ b/arch/ppc/platforms/85xx/stx_gp3.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/stx8560_gp3.h | ||
3 | * | ||
4 | * STx GP3 board definitions | 2 | * STx GP3 board definitions |
5 | * | 3 | * |
6 | * Dan Malek (dan@embeddededge.com) | 4 | * Dan Malek (dan@embeddededge.com) |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c index a5e38ba62732..00af132262b3 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.c +++ b/arch/ppc/platforms/85xx/tqm85xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/tqm85xx.c | ||
3 | * | ||
4 | * TQM85xx (40/41/55/60) board specific routines | 2 | * TQM85xx (40/41/55/60) board specific routines |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.h b/arch/ppc/platforms/85xx/tqm85xx.h index 3775eb363fde..612d80504f9b 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.h +++ b/arch/ppc/platforms/85xx/tqm85xx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/tqm85xx.h | ||
3 | * | ||
4 | * TQM85xx (40/41/55/60) board definitions | 2 | * TQM85xx (40/41/55/60) board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index 51430e294b32..e8b91a33ce91 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -37,6 +37,9 @@ obj-$(CONFIG_SBC82xx) += sbc82xx.o | |||
37 | obj-$(CONFIG_SPRUCE) += spruce.o | 37 | obj-$(CONFIG_SPRUCE) += spruce.o |
38 | obj-$(CONFIG_LITE5200) += lite5200.o | 38 | obj-$(CONFIG_LITE5200) += lite5200.o |
39 | obj-$(CONFIG_EV64360) += ev64360.o | 39 | obj-$(CONFIG_EV64360) += ev64360.o |
40 | obj-$(CONFIG_MPC86XADS) += mpc866ads_setup.o | ||
41 | obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o | ||
42 | obj-$(CONFIG_ADS8272) += mpc8272ads_setup.o | ||
40 | 43 | ||
41 | ifeq ($(CONFIG_SMP),y) | 44 | ifeq ($(CONFIG_SMP),y) |
42 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o | 45 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o |
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c index c42c50073da5..fe0cdc04d436 100644 --- a/arch/ppc/platforms/apus_setup.c +++ b/arch/ppc/platforms/apus_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/apus_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1998, 1999 Jesper Skov | 2 | * Copyright (C) 1998, 1999 Jesper Skov |
5 | * | 3 | * |
6 | * Basically what is needed to replace functionality found in | 4 | * Basically what is needed to replace functionality found in |
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index aefcc0e7be57..f324f757cae1 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chestnut.c | ||
3 | * | ||
4 | * Board setup routines for IBM Chestnut | 2 | * Board setup routines for IBM Chestnut |
5 | * | 3 | * |
6 | * Author: <source@mvista.com> | 4 | * Author: <source@mvista.com> |
diff --git a/arch/ppc/platforms/chestnut.h b/arch/ppc/platforms/chestnut.h index 0400b2be40ab..e00fd9f8bbd0 100644 --- a/arch/ppc/platforms/chestnut.h +++ b/arch/ppc/platforms/chestnut.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chestnut.h | ||
3 | * | ||
4 | * Definitions for IBM 750FXGX Eval (Chestnut) | 2 | * Definitions for IBM 750FXGX Eval (Chestnut) |
5 | * | 3 | * |
6 | * Author: <source@mvista.com> | 4 | * Author: <source@mvista.com> |
diff --git a/arch/ppc/platforms/chrp_pegasos_eth.c b/arch/ppc/platforms/chrp_pegasos_eth.c index 108a6e265185..9305c8aa1373 100644 --- a/arch/ppc/platforms/chrp_pegasos_eth.c +++ b/arch/ppc/platforms/chrp_pegasos_eth.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_pegasos_eth.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> | 2 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> |
5 | * Thanks to : | 3 | * Thanks to : |
6 | * Dale Farnsworth <dale@farnsworth.org> | 4 | * Dale Farnsworth <dale@farnsworth.org> |
diff --git a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c index 48996b787378..f9fd3f4f8e2e 100644 --- a/arch/ppc/platforms/chrp_setup.c +++ b/arch/ppc/platforms/chrp_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c index 57753a55b580..c8627770af13 100644 --- a/arch/ppc/platforms/chrp_time.c +++ b/arch/ppc/platforms/chrp_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * | 3 | * |
6 | * Adapted for PowerPC (PReP) by Gary Thomas | 4 | * Adapted for PowerPC (PReP) by Gary Thomas |
diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c index 6ca7bcac9474..790475c22fd7 100644 --- a/arch/ppc/platforms/cpci690.c +++ b/arch/ppc/platforms/cpci690.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci690.c | ||
3 | * | ||
4 | * Board setup routines for the Force CPCI690 board. | 2 | * Board setup routines for the Force CPCI690 board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
@@ -290,7 +288,7 @@ cpci690_fixup_mpsc_pdata(struct platform_device *pdev) | |||
290 | pdata->brg_clk_freq = cpci690_get_bus_freq(); | 288 | pdata->brg_clk_freq = cpci690_get_bus_freq(); |
291 | } | 289 | } |
292 | 290 | ||
293 | static int __init | 291 | static int |
294 | cpci690_platform_notify(struct device *dev) | 292 | cpci690_platform_notify(struct device *dev) |
295 | { | 293 | { |
296 | static struct { | 294 | static struct { |
diff --git a/arch/ppc/platforms/cpci690.h b/arch/ppc/platforms/cpci690.h index 49584c9cedf3..0fa5a4c31b67 100644 --- a/arch/ppc/platforms/cpci690.h +++ b/arch/ppc/platforms/cpci690.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci690.h | ||
3 | * | ||
4 | * Definitions for Force CPCI690 | 2 | * Definitions for Force CPCI690 |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c index ffde8f6f6302..31e8e21e1d5c 100644 --- a/arch/ppc/platforms/ev64260.c +++ b/arch/ppc/platforms/ev64260.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64260.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board. | 2 | * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
@@ -416,7 +414,7 @@ ev64260_fixup_mpsc_pdata(struct platform_device *pdev) | |||
416 | return; | 414 | return; |
417 | } | 415 | } |
418 | 416 | ||
419 | static int __init | 417 | static int |
420 | ev64260_platform_notify(struct device *dev) | 418 | ev64260_platform_notify(struct device *dev) |
421 | { | 419 | { |
422 | static struct { | 420 | static struct { |
diff --git a/arch/ppc/platforms/ev64260.h b/arch/ppc/platforms/ev64260.h index bedffced3a02..44d90d56745a 100644 --- a/arch/ppc/platforms/ev64260.h +++ b/arch/ppc/platforms/ev64260.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64260.h | ||
3 | * | ||
4 | * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board. | 2 | * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c index b9d844f88c2b..104ac9b16e8b 100644 --- a/arch/ppc/platforms/ev64360.c +++ b/arch/ppc/platforms/ev64360.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64360.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. | 2 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Lee Nicks <allinux@gmail.com> | 4 | * Author: Lee Nicks <allinux@gmail.com> |
@@ -300,7 +298,7 @@ ev64360_fixup_eth_pdata(struct platform_device *pdev) | |||
300 | } | 298 | } |
301 | #endif | 299 | #endif |
302 | 300 | ||
303 | static int __init | 301 | static int |
304 | ev64360_platform_notify(struct device *dev) | 302 | ev64360_platform_notify(struct device *dev) |
305 | { | 303 | { |
306 | static struct { | 304 | static struct { |
diff --git a/arch/ppc/platforms/ev64360.h b/arch/ppc/platforms/ev64360.h index 68eabe490397..b30f4722690a 100644 --- a/arch/ppc/platforms/ev64360.h +++ b/arch/ppc/platforms/ev64360.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64360.h | ||
3 | * | ||
4 | * Definitions for Marvell EV-64360-BP Evaluation Board. | 2 | * Definitions for Marvell EV-64360-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Lee Nicks <allinux@gmail.com> | 4 | * Author: Lee Nicks <allinux@gmail.com> |
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index a48fb8d723e4..e1c0b1b6dcb3 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h | |||
@@ -112,7 +112,7 @@ | |||
112 | 112 | ||
113 | /* CPM Ethernet through SCC1 or SCC2 */ | 113 | /* CPM Ethernet through SCC1 or SCC2 */ |
114 | 114 | ||
115 | #ifdef CONFIG_SCC1_ENET /* Probably 860 variant */ | 115 | #if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1) /* Probably 860 variant */ |
116 | /* Bits in parallel I/O port registers that have to be set/cleared | 116 | /* Bits in parallel I/O port registers that have to be set/cleared |
117 | * to configure the pins for SCC1 use. | 117 | * to configure the pins for SCC1 use. |
118 | * TCLK - CLK1, RCLK - CLK2. | 118 | * TCLK - CLK1, RCLK - CLK2. |
diff --git a/arch/ppc/platforms/gemini.h b/arch/ppc/platforms/gemini.h index 06de59248918..5528fd0a1216 100644 --- a/arch/ppc/platforms/gemini.h +++ b/arch/ppc/platforms/gemini.h | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini.h | ||
3 | * | ||
4 | * | ||
5 | * Onboard registers and descriptions for Synergy Microsystems' | 2 | * Onboard registers and descriptions for Synergy Microsystems' |
6 | * "Gemini" boards. | 3 | * "Gemini" boards. |
7 | * | 4 | * |
diff --git a/arch/ppc/platforms/gemini_prom.S b/arch/ppc/platforms/gemini_prom.S index 8c5065d56505..b181f2108001 100644 --- a/arch/ppc/platforms/gemini_prom.S +++ b/arch/ppc/platforms/gemini_prom.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini_prom.S | ||
3 | * | ||
4 | * Not really prom support code (yet), but sort of anti-prom code. The current | 2 | * Not really prom support code (yet), but sort of anti-prom code. The current |
5 | * bootloader does a number of things it shouldn't and doesn't do things that it | 3 | * bootloader does a number of things it shouldn't and doesn't do things that it |
6 | * should. The stuff in here is mainly a hodge-podge collection of setup code | 4 | * should. The stuff in here is mainly a hodge-podge collection of setup code |
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c index 729897c59033..0090ff154608 100644 --- a/arch/ppc/platforms/gemini_setup.c +++ b/arch/ppc/platforms/gemini_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index f945416960e9..75dc2ee87d2f 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -1,7 +1,4 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * arch/ppc/platforms/hdpu_setup.c | ||
4 | * | ||
5 | * Board setup routines for the Sky Computers HDPU Compute Blade. | 2 | * Board setup routines for the Sky Computers HDPU Compute Blade. |
6 | * | 3 | * |
7 | * Written by Brian Waite <waite@skycomputers.com> | 4 | * Written by Brian Waite <waite@skycomputers.com> |
@@ -353,7 +350,7 @@ static void __init hdpu_fixup_cpustate_pdata(struct platform_device *pd) | |||
353 | } | 350 | } |
354 | #endif | 351 | #endif |
355 | 352 | ||
356 | static int __init hdpu_platform_notify(struct device *dev) | 353 | static int hdpu_platform_notify(struct device *dev) |
357 | { | 354 | { |
358 | static struct { | 355 | static struct { |
359 | char *bus_id; | 356 | char *bus_id; |
diff --git a/arch/ppc/platforms/hdpu.h b/arch/ppc/platforms/hdpu.h index 07c3cffb5c7b..f9e020b6970c 100644 --- a/arch/ppc/platforms/hdpu.h +++ b/arch/ppc/platforms/hdpu.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/hdpu.h | ||
3 | * | ||
4 | * Definitions for Sky Computers HDPU board. | 2 | * Definitions for Sky Computers HDPU board. |
5 | * | 3 | * |
6 | * Brian Waite <waite@skycomputers.com> | 4 | * Brian Waite <waite@skycomputers.com> |
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 6e58e30ceed1..ad21280e8920 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/katana.c | ||
3 | * | ||
4 | * Board setup routines for the Artesyn Katana cPCI boards. | 2 | * Board setup routines for the Artesyn Katana cPCI boards. |
5 | * | 3 | * |
6 | * Author: Tim Montgomery <timm@artesyncp.com> | 4 | * Author: Tim Montgomery <timm@artesyncp.com> |
@@ -598,7 +596,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev) | |||
598 | } | 596 | } |
599 | #endif | 597 | #endif |
600 | 598 | ||
601 | static int __init | 599 | static int |
602 | katana_platform_notify(struct device *dev) | 600 | katana_platform_notify(struct device *dev) |
603 | { | 601 | { |
604 | static struct { | 602 | static struct { |
@@ -664,12 +662,11 @@ katana_setup_mtd(void) | |||
664 | 662 | ||
665 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; | 663 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; |
666 | 664 | ||
667 | if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), | 665 | if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition), |
668 | GFP_KERNEL)) == NULL) { | 666 | GFP_KERNEL)) == NULL) { |
669 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); | 667 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); |
670 | return -ENOMEM; | 668 | return -ENOMEM; |
671 | } | 669 | } |
672 | memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); | ||
673 | 670 | ||
674 | ptbl[0].name = "Monitor"; | 671 | ptbl[0].name = "Monitor"; |
675 | ptbl[0].size = KATANA_MTD_MONITOR_SIZE; | 672 | ptbl[0].size = KATANA_MTD_MONITOR_SIZE; |
diff --git a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h index 597257eff2ec..0a9b036526b1 100644 --- a/arch/ppc/platforms/katana.h +++ b/arch/ppc/platforms/katana.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/katana.h | ||
3 | * | ||
4 | * Definitions for Artesyn Katana750i/3750 board. | 2 | * Definitions for Artesyn Katana750i/3750 board. |
5 | * | 3 | * |
6 | * Author: Tim Montgomery <timm@artesyncp.com> | 4 | * Author: Tim Montgomery <timm@artesyncp.com> |
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c index 7ed52dc340c9..5171b53bccb5 100644 --- a/arch/ppc/platforms/lite5200.c +++ b/arch/ppc/platforms/lite5200.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lite5200.c | ||
3 | * | ||
4 | * Platform support file for the Freescale LITE5200 based on MPC52xx. | 2 | * Platform support file for the Freescale LITE5200 based on MPC52xx. |
5 | * A maximum of this file should be moved to syslib/mpc52xx_????? | 3 | * A maximum of this file should be moved to syslib/mpc52xx_????? |
6 | * so that new platform based on MPC52xx need a minimal platform file | 4 | * so that new platform based on MPC52xx need a minimal platform file |
diff --git a/arch/ppc/platforms/lite5200.h b/arch/ppc/platforms/lite5200.h index c1de2aa47175..852a18e24d0b 100644 --- a/arch/ppc/platforms/lite5200.h +++ b/arch/ppc/platforms/lite5200.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lite5200.h | ||
3 | * | ||
4 | * Definitions for Freescale LITE5200 : MPC52xx Standard Development | 2 | * Definitions for Freescale LITE5200 : MPC52xx Standard Development |
5 | * Platform board support | 3 | * Platform board support |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c index 06d247c23b82..c6445a727ca3 100644 --- a/arch/ppc/platforms/lopec.c +++ b/arch/ppc/platforms/lopec.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lopec.c | ||
3 | * | ||
4 | * Setup routines for the Motorola LoPEC. | 2 | * Setup routines for the Motorola LoPEC. |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c new file mode 100644 index 000000000000..bc9b94f77e39 --- /dev/null +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/82xx/pq2ads_pd.c | ||
3 | * | ||
4 | * MPC82xx Board-specific PlatformDevice descriptions | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. | ||
7 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/fs_enet_pd.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/mpc8260.h> | ||
24 | #include <asm/cpm2.h> | ||
25 | #include <asm/immap_cpm2.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <asm/ppc_sys.h> | ||
28 | #include <asm/ppcboot.h> | ||
29 | |||
30 | #include "pq2ads_pd.h" | ||
31 | |||
32 | static void init_fcc1_ioports(void); | ||
33 | static void init_fcc2_ioports(void); | ||
34 | |||
35 | static struct fs_mii_bus_info mii_bus_info = { | ||
36 | .method = fsmii_bitbang, | ||
37 | .id = 0, | ||
38 | .i.bitbang = { | ||
39 | .mdio_port = fsiop_portc, | ||
40 | .mdio_bit = 18, | ||
41 | .mdc_port = fsiop_portc, | ||
42 | .mdc_bit = 19, | ||
43 | .delay = 1, | ||
44 | }, | ||
45 | }; | ||
46 | |||
47 | static struct fs_platform_info mpc82xx_fcc1_pdata = { | ||
48 | .fs_no = fsid_fcc1, | ||
49 | .cp_page = CPM_CR_FCC1_PAGE, | ||
50 | .cp_block = CPM_CR_FCC1_SBLOCK, | ||
51 | .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), | ||
52 | .clk_route = CMX1_CLK_ROUTE, | ||
53 | .clk_mask = CMX1_CLK_MASK, | ||
54 | .init_ioports = init_fcc1_ioports, | ||
55 | |||
56 | .phy_addr = 0, | ||
57 | #ifdef PHY_INTERRUPT | ||
58 | .phy_irq = PHY_INTERRUPT, | ||
59 | #else | ||
60 | .phy_irq = -1; | ||
61 | #endif | ||
62 | .mem_offset = FCC1_MEM_OFFSET, | ||
63 | .bus_info = &mii_bus_info, | ||
64 | .rx_ring = 32, | ||
65 | .tx_ring = 32, | ||
66 | .rx_copybreak = 240, | ||
67 | .use_napi = 0, | ||
68 | .napi_weight = 17, | ||
69 | }; | ||
70 | |||
71 | static struct fs_platform_info mpc82xx_fcc2_pdata = { | ||
72 | .fs_no = fsid_fcc2, | ||
73 | .cp_page = CPM_CR_FCC2_PAGE, | ||
74 | .cp_block = CPM_CR_FCC2_SBLOCK, | ||
75 | .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), | ||
76 | .clk_route = CMX2_CLK_ROUTE, | ||
77 | .clk_mask = CMX2_CLK_MASK, | ||
78 | .init_ioports = init_fcc2_ioports, | ||
79 | |||
80 | .phy_addr = 3, | ||
81 | #ifdef PHY_INTERRUPT | ||
82 | .phy_irq = PHY_INTERRUPT, | ||
83 | #else | ||
84 | .phy_irq = -1; | ||
85 | #endif | ||
86 | .mem_offset = FCC2_MEM_OFFSET, | ||
87 | .bus_info = &mii_bus_info, | ||
88 | .rx_ring = 32, | ||
89 | .tx_ring = 32, | ||
90 | .rx_copybreak = 240, | ||
91 | .use_napi = 0, | ||
92 | .napi_weight = 17, | ||
93 | }; | ||
94 | |||
95 | static void init_fcc1_ioports(void) | ||
96 | { | ||
97 | struct io_port *io; | ||
98 | u32 tempval; | ||
99 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
100 | u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32)); | ||
101 | |||
102 | io = &immap->im_ioport; | ||
103 | |||
104 | /* Enable the PHY */ | ||
105 | clrbits32(bcsr, BCSR1_FETHIEN); | ||
106 | setbits32(bcsr, BCSR1_FETH_RST); | ||
107 | |||
108 | /* FCC1 pins are on port A/C. */ | ||
109 | /* Configure port A and C pins for FCC1 Ethernet. */ | ||
110 | |||
111 | tempval = in_be32(&io->iop_pdira); | ||
112 | tempval &= ~PA1_DIRA0; | ||
113 | tempval |= PA1_DIRA1; | ||
114 | out_be32(&io->iop_pdira, tempval); | ||
115 | |||
116 | tempval = in_be32(&io->iop_psora); | ||
117 | tempval &= ~PA1_PSORA0; | ||
118 | tempval |= PA1_PSORA1; | ||
119 | out_be32(&io->iop_psora, tempval); | ||
120 | |||
121 | setbits32(&io->iop_ppara,PA1_DIRA0 | PA1_DIRA1); | ||
122 | |||
123 | /* Alter clocks */ | ||
124 | tempval = PC_F1TXCLK|PC_F1RXCLK; | ||
125 | |||
126 | clrbits32(&io->iop_psorc, tempval); | ||
127 | clrbits32(&io->iop_pdirc, tempval); | ||
128 | setbits32(&io->iop_pparc, tempval); | ||
129 | |||
130 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_MASK); | ||
131 | setbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_ROUTE); | ||
132 | iounmap(bcsr); | ||
133 | iounmap(immap); | ||
134 | } | ||
135 | |||
136 | static void init_fcc2_ioports(void) | ||
137 | { | ||
138 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
139 | u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32)); | ||
140 | |||
141 | struct io_port *io; | ||
142 | u32 tempval; | ||
143 | |||
144 | immap = cpm2_immr; | ||
145 | |||
146 | io = &immap->im_ioport; | ||
147 | |||
148 | /* Enable the PHY */ | ||
149 | clrbits32(bcsr, BCSR3_FETHIEN2); | ||
150 | setbits32(bcsr, BCSR3_FETH2_RST); | ||
151 | |||
152 | /* FCC2 are port B/C. */ | ||
153 | /* Configure port A and C pins for FCC2 Ethernet. */ | ||
154 | |||
155 | tempval = in_be32(&io->iop_pdirb); | ||
156 | tempval &= ~PB2_DIRB0; | ||
157 | tempval |= PB2_DIRB1; | ||
158 | out_be32(&io->iop_pdirb, tempval); | ||
159 | |||
160 | tempval = in_be32(&io->iop_psorb); | ||
161 | tempval &= ~PB2_PSORB0; | ||
162 | tempval |= PB2_PSORB1; | ||
163 | out_be32(&io->iop_psorb, tempval); | ||
164 | |||
165 | setbits32(&io->iop_pparb,PB2_DIRB0 | PB2_DIRB1); | ||
166 | |||
167 | tempval = PC_F2RXCLK|PC_F2TXCLK; | ||
168 | |||
169 | /* Alter clocks */ | ||
170 | clrbits32(&io->iop_psorc,tempval); | ||
171 | clrbits32(&io->iop_pdirc,tempval); | ||
172 | setbits32(&io->iop_pparc,tempval); | ||
173 | |||
174 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_MASK); | ||
175 | setbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_ROUTE); | ||
176 | |||
177 | iounmap(bcsr); | ||
178 | iounmap(immap); | ||
179 | } | ||
180 | |||
181 | |||
182 | static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev, | ||
183 | int idx) | ||
184 | { | ||
185 | bd_t* bi = (void*)__res; | ||
186 | int fs_no = fsid_fcc1+pdev->id-1; | ||
187 | |||
188 | mpc82xx_fcc1_pdata.dpram_offset = mpc82xx_fcc2_pdata.dpram_offset = (u32)cpm2_immr->im_dprambase; | ||
189 | mpc82xx_fcc1_pdata.fcc_regs_c = mpc82xx_fcc2_pdata.fcc_regs_c = (u32)cpm2_immr->im_fcc_c; | ||
190 | |||
191 | switch(fs_no) { | ||
192 | case fsid_fcc1: | ||
193 | memcpy(&mpc82xx_fcc1_pdata.macaddr,bi->bi_enetaddr,6); | ||
194 | pdev->dev.platform_data = &mpc82xx_fcc1_pdata; | ||
195 | break; | ||
196 | case fsid_fcc2: | ||
197 | memcpy(&mpc82xx_fcc2_pdata.macaddr,bi->bi_enetaddr,6); | ||
198 | mpc82xx_fcc2_pdata.macaddr[5] ^= 1; | ||
199 | pdev->dev.platform_data = &mpc82xx_fcc2_pdata; | ||
200 | break; | ||
201 | } | ||
202 | } | ||
203 | |||
204 | static int mpc8272ads_platform_notify(struct device *dev) | ||
205 | { | ||
206 | static const struct platform_notify_dev_map dev_map[] = { | ||
207 | { | ||
208 | .bus_id = "fsl-cpm-fcc", | ||
209 | .rtn = mpc8272ads_fixup_enet_pdata | ||
210 | }, | ||
211 | { | ||
212 | .bus_id = NULL | ||
213 | } | ||
214 | }; | ||
215 | platform_notify_map(dev_map,dev); | ||
216 | |||
217 | return 0; | ||
218 | |||
219 | } | ||
220 | |||
221 | int __init mpc8272ads_init(void) | ||
222 | { | ||
223 | printk(KERN_NOTICE "mpc8272ads: Init\n"); | ||
224 | |||
225 | platform_notify = mpc8272ads_platform_notify; | ||
226 | |||
227 | ppc_sys_device_initfunc(); | ||
228 | |||
229 | ppc_sys_device_disable_all(); | ||
230 | ppc_sys_device_enable(MPC82xx_CPM_FCC1); | ||
231 | ppc_sys_device_enable(MPC82xx_CPM_FCC2); | ||
232 | |||
233 | return 0; | ||
234 | } | ||
235 | |||
236 | arch_initcall(mpc8272ads_init); | ||
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c new file mode 100644 index 000000000000..ac8fcc68afeb --- /dev/null +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -0,0 +1,273 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | #include <asm/mpc8xx.h> | ||
37 | |||
38 | extern unsigned char __res[]; | ||
39 | |||
40 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
41 | .method = fsmii_fec, | ||
42 | .id = 0, | ||
43 | }; | ||
44 | |||
45 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
46 | .method = fsmii_fixed, | ||
47 | .id = 0, | ||
48 | .i.fixed.speed = 10, | ||
49 | .i.fixed.duplex = 0, | ||
50 | }; | ||
51 | |||
52 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
53 | { | ||
54 | .rx_ring = 128, | ||
55 | .tx_ring = 16, | ||
56 | .rx_copybreak = 240, | ||
57 | |||
58 | .use_napi = 1, | ||
59 | .napi_weight = 17, | ||
60 | |||
61 | .phy_addr = 15, | ||
62 | .phy_irq = -1, | ||
63 | |||
64 | .use_rmii = 0, | ||
65 | |||
66 | .bus_info = &fec_mii_bus_info, | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
71 | .rx_ring = 64, | ||
72 | .tx_ring = 8, | ||
73 | .rx_copybreak = 240, | ||
74 | |||
75 | .use_napi = 1, | ||
76 | .napi_weight = 17, | ||
77 | |||
78 | .phy_addr = -1, | ||
79 | .phy_irq = -1, | ||
80 | |||
81 | .bus_info = &scc_mii_bus_info, | ||
82 | }; | ||
83 | |||
84 | void __init board_init(void) | ||
85 | { | ||
86 | volatile cpm8xx_t *cp = cpmp; | ||
87 | unsigned *bcsr_io; | ||
88 | |||
89 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
90 | |||
91 | if (bcsr_io == NULL) { | ||
92 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
93 | return; | ||
94 | } | ||
95 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
96 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
97 | clrbits32(bcsr_io,(0x80000000 >> 7)); | ||
98 | #else | ||
99 | setbits32(bcsr_io,(0x80000000 >> 7)); | ||
100 | |||
101 | cp->cp_pbpar &= ~(0x000000c0); | ||
102 | cp->cp_pbdir |= 0x000000c0; | ||
103 | cp->cp_smc[0].smc_smcmr = 0; | ||
104 | cp->cp_smc[0].smc_smce = 0; | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
108 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
109 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
110 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
111 | #else | ||
112 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
113 | cp->cp_pbpar &= ~(0x00000c00); | ||
114 | cp->cp_pbdir |= 0x00000c00; | ||
115 | cp->cp_smc[1].smc_smcmr = 0; | ||
116 | cp->cp_smc[1].smc_smce = 0; | ||
117 | #endif | ||
118 | iounmap(bcsr_io); | ||
119 | } | ||
120 | |||
121 | static void setup_fec1_ioports(void) | ||
122 | { | ||
123 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
124 | |||
125 | setbits16(&immap->im_ioport.iop_pdpar, 0x1fff); | ||
126 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); | ||
127 | } | ||
128 | |||
129 | static void setup_scc1_ioports(void) | ||
130 | { | ||
131 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
132 | unsigned *bcsr_io; | ||
133 | |||
134 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
135 | |||
136 | if (bcsr_io == NULL) { | ||
137 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
138 | return; | ||
139 | } | ||
140 | |||
141 | /* Enable the PHY. | ||
142 | */ | ||
143 | clrbits32(bcsr_io,BCSR1_ETHEN); | ||
144 | |||
145 | /* Configure port A pins for Txd and Rxd. | ||
146 | */ | ||
147 | /* Disable receive and transmit in case EPPC-Bug started it. | ||
148 | */ | ||
149 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
151 | clrbits16(&immap->im_ioport.iop_paodr, PA_ENET_TXD); | ||
152 | |||
153 | /* Configure port C pins to enable CLSN and RENA. | ||
154 | */ | ||
155 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
156 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
157 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
158 | /* Configure port A for TCLK and RCLK. | ||
159 | */ | ||
160 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_TCLK | PA_ENET_RCLK); | ||
161 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_TCLK | PA_ENET_RCLK); | ||
162 | clrbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
163 | clrbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
164 | |||
165 | /* Configure Serial Interface clock routing. | ||
166 | * First, clear all SCC bits to zero, then set the ones we want. | ||
167 | */ | ||
168 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
169 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
170 | |||
171 | /* In the original SCC enet driver the following code is placed at | ||
172 | the end of the initialization */ | ||
173 | setbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
174 | setbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
175 | |||
176 | } | ||
177 | |||
178 | static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
179 | { | ||
180 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
181 | |||
182 | volatile cpm8xx_t *cp; | ||
183 | bd_t *bd = (bd_t *) __res; | ||
184 | char *e; | ||
185 | int i; | ||
186 | |||
187 | /* Get pointer to Communication Processor */ | ||
188 | cp = cpmp; | ||
189 | switch (fs_no) { | ||
190 | case fsid_fec1: | ||
191 | fpi = &mpc8xx_fec_pdata[0]; | ||
192 | fpi->init_ioports = &setup_fec1_ioports; | ||
193 | |||
194 | break; | ||
195 | case fsid_scc1: | ||
196 | fpi = &mpc8xx_scc_pdata; | ||
197 | fpi->init_ioports = &setup_scc1_ioports; | ||
198 | |||
199 | break; | ||
200 | default: | ||
201 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
202 | return; | ||
203 | } | ||
204 | |||
205 | pdev->dev.platform_data = fpi; | ||
206 | fpi->fs_no = fs_no; | ||
207 | |||
208 | e = (unsigned char *)&bd->bi_enetaddr; | ||
209 | for (i = 0; i < 6; i++) | ||
210 | fpi->macaddr[i] = *e++; | ||
211 | |||
212 | fpi->macaddr[5 - pdev->id]++; | ||
213 | |||
214 | } | ||
215 | |||
216 | static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
217 | int idx) | ||
218 | { | ||
219 | /* This is for FEC devices only */ | ||
220 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
221 | return; | ||
222 | mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
223 | } | ||
224 | |||
225 | static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
226 | int idx) | ||
227 | { | ||
228 | /* This is for SCC devices only */ | ||
229 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
230 | return; | ||
231 | |||
232 | mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
233 | } | ||
234 | |||
235 | static int mpc866ads_platform_notify(struct device *dev) | ||
236 | { | ||
237 | static const struct platform_notify_dev_map dev_map[] = { | ||
238 | { | ||
239 | .bus_id = "fsl-cpm-fec", | ||
240 | .rtn = mpc866ads_fixup_fec_enet_pdata, | ||
241 | }, | ||
242 | { | ||
243 | .bus_id = "fsl-cpm-scc", | ||
244 | .rtn = mpc866ads_fixup_scc_enet_pdata, | ||
245 | }, | ||
246 | { | ||
247 | .bus_id = NULL | ||
248 | } | ||
249 | }; | ||
250 | |||
251 | platform_notify_map(dev_map,dev); | ||
252 | |||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | int __init mpc866ads_init(void) | ||
257 | { | ||
258 | printk(KERN_NOTICE "mpc866ads: Init\n"); | ||
259 | |||
260 | platform_notify = mpc866ads_platform_notify; | ||
261 | |||
262 | ppc_sys_device_initfunc(); | ||
263 | ppc_sys_device_disable_all(); | ||
264 | |||
265 | #ifdef MPC8xx_SECOND_ETH_SCC1 | ||
266 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
267 | #endif | ||
268 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
269 | |||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | arch_initcall(mpc866ads_init); | ||
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c new file mode 100644 index 000000000000..50a99e5f7c68 --- /dev/null +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | |||
37 | extern unsigned char __res[]; | ||
38 | |||
39 | static void __init mpc885ads_scc_phy_init(char); | ||
40 | |||
41 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
42 | .method = fsmii_fec, | ||
43 | .id = 0, | ||
44 | }; | ||
45 | |||
46 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
47 | #ifdef CONFIG_SCC_ENET_8xx_FIXED | ||
48 | .method = fsmii_fixed, | ||
49 | #else | ||
50 | .method = fsmii_fec, | ||
51 | #endif | ||
52 | |||
53 | .id = 0, | ||
54 | }; | ||
55 | |||
56 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
57 | { | ||
58 | .rx_ring = 128, | ||
59 | .tx_ring = 16, | ||
60 | .rx_copybreak = 240, | ||
61 | |||
62 | .use_napi = 1, | ||
63 | .napi_weight = 17, | ||
64 | |||
65 | .phy_addr = 0, | ||
66 | .phy_irq = SIU_IRQ7, | ||
67 | |||
68 | .bus_info = &fec_mii_bus_info, | ||
69 | }, { | ||
70 | .rx_ring = 128, | ||
71 | .tx_ring = 16, | ||
72 | .rx_copybreak = 240, | ||
73 | |||
74 | .use_napi = 1, | ||
75 | .napi_weight = 17, | ||
76 | |||
77 | .phy_addr = 1, | ||
78 | .phy_irq = SIU_IRQ7, | ||
79 | |||
80 | .bus_info = &fec_mii_bus_info, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
85 | .rx_ring = 64, | ||
86 | .tx_ring = 8, | ||
87 | .rx_copybreak = 240, | ||
88 | |||
89 | .use_napi = 1, | ||
90 | .napi_weight = 17, | ||
91 | |||
92 | .phy_addr = 2, | ||
93 | #ifdef CONFIG_MPC8xx_SCC_ENET_FIXED | ||
94 | .phy_irq = -1, | ||
95 | #else | ||
96 | .phy_irq = SIU_IRQ7, | ||
97 | #endif | ||
98 | |||
99 | .bus_info = &scc_mii_bus_info, | ||
100 | }; | ||
101 | |||
102 | void __init board_init(void) | ||
103 | { | ||
104 | volatile cpm8xx_t *cp = cpmp; | ||
105 | unsigned int *bcsr_io; | ||
106 | |||
107 | #ifdef CONFIG_FS_ENET | ||
108 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
109 | #endif | ||
110 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
111 | |||
112 | if (bcsr_io == NULL) { | ||
113 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
114 | return; | ||
115 | } | ||
116 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
117 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
118 | clrbits32(bcsr_io, BCSR1_RS232EN_1); | ||
119 | #else | ||
120 | setbits32(bcsr_io,BCSR1_RS232EN_1); | ||
121 | cp->cp_smc[0].smc_smcmr = 0; | ||
122 | cp->cp_smc[0].smc_smce = 0; | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
126 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
127 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
128 | clrbits32(bcsr_io,BCSR1_RS232EN_2); | ||
129 | #else | ||
130 | setbits32(bcsr_io,BCSR1_RS232EN_2); | ||
131 | cp->cp_smc[1].smc_smcmr = 0; | ||
132 | cp->cp_smc[1].smc_smce = 0; | ||
133 | #endif | ||
134 | iounmap(bcsr_io); | ||
135 | |||
136 | #ifdef CONFIG_FS_ENET | ||
137 | /* use MDC for MII (common) */ | ||
138 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
139 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
140 | #endif | ||
141 | } | ||
142 | |||
143 | static void setup_fec1_ioports(void) | ||
144 | { | ||
145 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
146 | |||
147 | /* configure FEC1 pins */ | ||
148 | setbits16(&immap->im_ioport.iop_papar, 0xf830); | ||
149 | setbits16(&immap->im_ioport.iop_padir, 0x0830); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, 0xf000); | ||
151 | setbits32(&immap->im_cpm.cp_pbpar, 0x00001001); | ||
152 | |||
153 | clrbits32(&immap->im_cpm.cp_pbdir, 0x00001001); | ||
154 | setbits16(&immap->im_ioport.iop_pcpar, 0x000c); | ||
155 | clrbits16(&immap->im_ioport.iop_pcdir, 0x000c); | ||
156 | setbits32(&immap->im_cpm.cp_pepar, 0x00000003); | ||
157 | |||
158 | setbits32(&immap->im_cpm.cp_pedir, 0x00000003); | ||
159 | clrbits32(&immap->im_cpm.cp_peso, 0x00000003); | ||
160 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000100); | ||
161 | } | ||
162 | |||
163 | static void setup_fec2_ioports(void) | ||
164 | { | ||
165 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
166 | |||
167 | /* configure FEC2 pins */ | ||
168 | setbits32(&immap->im_cpm.cp_pepar, 0x0003fffc); | ||
169 | setbits32(&immap->im_cpm.cp_pedir, 0x0003fffc); | ||
170 | setbits32(&immap->im_cpm.cp_peso, 0x00037800); | ||
171 | clrbits32(&immap->im_cpm.cp_peso, 0x000087fc); | ||
172 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); | ||
173 | } | ||
174 | |||
175 | static void setup_scc3_ioports(void) | ||
176 | { | ||
177 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
178 | unsigned *bcsr_io; | ||
179 | |||
180 | bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); | ||
181 | |||
182 | if (bcsr_io == NULL) { | ||
183 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
184 | return; | ||
185 | } | ||
186 | |||
187 | /* Enable the PHY. | ||
188 | */ | ||
189 | setbits32(bcsr_io+4, BCSR4_ETH10_RST); | ||
190 | /* Configure port A pins for Txd and Rxd. | ||
191 | */ | ||
192 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
193 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
194 | |||
195 | /* Configure port C pins to enable CLSN and RENA. | ||
196 | */ | ||
197 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
198 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
199 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
200 | |||
201 | /* Configure port E for TCLK and RCLK. | ||
202 | */ | ||
203 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); | ||
204 | clrbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
205 | clrbits32(&immap->im_cpm.cp_pedir, | ||
206 | PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA); | ||
207 | clrbits32(&immap->im_cpm.cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); | ||
208 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
209 | |||
210 | /* Configure Serial Interface clock routing. | ||
211 | * First, clear all SCC bits to zero, then set the ones we want. | ||
212 | */ | ||
213 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
214 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
215 | |||
216 | /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used. | ||
217 | */ | ||
218 | immap->im_cpm.cp_smc[0].smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); | ||
219 | /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode | ||
220 | * by H/W setting after reset. SCC ethernet controller support only half duplex. | ||
221 | * This discrepancy of modes causes a lot of carrier lost errors. | ||
222 | */ | ||
223 | |||
224 | /* In the original SCC enet driver the following code is placed at | ||
225 | the end of the initialization */ | ||
226 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
227 | clrbits32(&immap->im_cpm.cp_pedir, PE_ENET_TENA); | ||
228 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
229 | |||
230 | setbits32(bcsr_io+1, BCSR1_ETHEN); | ||
231 | iounmap(bcsr_io); | ||
232 | } | ||
233 | |||
234 | static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
235 | { | ||
236 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
237 | |||
238 | volatile cpm8xx_t *cp; | ||
239 | bd_t *bd = (bd_t *) __res; | ||
240 | char *e; | ||
241 | int i; | ||
242 | |||
243 | /* Get pointer to Communication Processor */ | ||
244 | cp = cpmp; | ||
245 | switch (fs_no) { | ||
246 | case fsid_fec1: | ||
247 | fpi = &mpc8xx_fec_pdata[0]; | ||
248 | fpi->init_ioports = &setup_fec1_ioports; | ||
249 | break; | ||
250 | case fsid_fec2: | ||
251 | fpi = &mpc8xx_fec_pdata[1]; | ||
252 | fpi->init_ioports = &setup_fec2_ioports; | ||
253 | break; | ||
254 | case fsid_scc3: | ||
255 | fpi = &mpc8xx_scc_pdata; | ||
256 | fpi->init_ioports = &setup_scc3_ioports; | ||
257 | mpc885ads_scc_phy_init(fpi->phy_addr); | ||
258 | break; | ||
259 | default: | ||
260 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
261 | return; | ||
262 | } | ||
263 | |||
264 | pdev->dev.platform_data = fpi; | ||
265 | fpi->fs_no = fs_no; | ||
266 | |||
267 | e = (unsigned char *)&bd->bi_enetaddr; | ||
268 | for (i = 0; i < 6; i++) | ||
269 | fpi->macaddr[i] = *e++; | ||
270 | |||
271 | fpi->macaddr[5 - pdev->id]++; | ||
272 | |||
273 | } | ||
274 | |||
275 | static void mpc885ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
276 | int idx) | ||
277 | { | ||
278 | /* This is for FEC devices only */ | ||
279 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
280 | return; | ||
281 | mpc885ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
282 | } | ||
283 | |||
284 | static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
285 | int idx) | ||
286 | { | ||
287 | /* This is for SCC devices only */ | ||
288 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
289 | return; | ||
290 | |||
291 | mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
292 | } | ||
293 | |||
294 | /* SCC ethernet controller does not have MII management channel. FEC1 MII | ||
295 | * channel is used to communicate with the 10Mbit PHY. | ||
296 | */ | ||
297 | |||
298 | #define MII_ECNTRL_PINMUX 0x4 | ||
299 | #define FEC_ECNTRL_PINMUX 0x00000004 | ||
300 | #define FEC_RCNTRL_MII_MODE 0x00000004 | ||
301 | |||
302 | /* Make MII read/write commands. | ||
303 | */ | ||
304 | #define mk_mii_write(REG, VAL, PHY_ADDR) (0x50020000 | (((REG) & 0x1f) << 18) | \ | ||
305 | ((VAL) & 0xffff) | ((PHY_ADDR) << 23)) | ||
306 | |||
307 | static void mpc885ads_scc_phy_init(char phy_addr) | ||
308 | { | ||
309 | volatile immap_t *immap; | ||
310 | volatile fec_t *fecp; | ||
311 | bd_t *bd; | ||
312 | |||
313 | bd = (bd_t *) __res; | ||
314 | immap = (immap_t *) IMAP_ADDR; /* pointer to internal registers */ | ||
315 | fecp = &(immap->im_cpm.cp_fec); | ||
316 | |||
317 | /* Enable MII pins of the FEC1 | ||
318 | */ | ||
319 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
320 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
321 | /* Set MII speed to 2.5 MHz | ||
322 | */ | ||
323 | out_be32(&fecp->fec_mii_speed, | ||
324 | ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1); | ||
325 | |||
326 | /* Enable FEC pin MUX | ||
327 | */ | ||
328 | setbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
329 | setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
330 | |||
331 | out_be32(&fecp->fec_mii_data, | ||
332 | mk_mii_write(MII_BMCR, BMCR_ISOLATE, phy_addr)); | ||
333 | udelay(100); | ||
334 | out_be32(&fecp->fec_mii_data, | ||
335 | mk_mii_write(MII_ADVERTISE, | ||
336 | ADVERTISE_10HALF | ADVERTISE_CSMA, phy_addr)); | ||
337 | udelay(100); | ||
338 | |||
339 | /* Disable FEC MII settings | ||
340 | */ | ||
341 | clrbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
342 | clrbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
343 | out_be32(&fecp->fec_mii_speed, 0); | ||
344 | } | ||
345 | |||
346 | static int mpc885ads_platform_notify(struct device *dev) | ||
347 | { | ||
348 | |||
349 | static const struct platform_notify_dev_map dev_map[] = { | ||
350 | { | ||
351 | .bus_id = "fsl-cpm-fec", | ||
352 | .rtn = mpc885ads_fixup_fec_enet_pdata, | ||
353 | }, | ||
354 | { | ||
355 | .bus_id = "fsl-cpm-scc", | ||
356 | .rtn = mpc885ads_fixup_scc_enet_pdata, | ||
357 | }, | ||
358 | { | ||
359 | .bus_id = NULL | ||
360 | } | ||
361 | }; | ||
362 | |||
363 | platform_notify_map(dev_map,dev); | ||
364 | |||
365 | } | ||
366 | |||
367 | int __init mpc885ads_init(void) | ||
368 | { | ||
369 | printk(KERN_NOTICE "mpc885ads: Init\n"); | ||
370 | |||
371 | platform_notify = mpc885ads_platform_notify; | ||
372 | |||
373 | ppc_sys_device_initfunc(); | ||
374 | ppc_sys_device_disable_all(); | ||
375 | |||
376 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
377 | |||
378 | #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 | ||
379 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
380 | |||
381 | #endif | ||
382 | #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 | ||
383 | ppc_sys_device_enable(MPC8xx_CPM_FEC2); | ||
384 | #endif | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | arch_initcall(mpc885ads_init); | ||
diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c index 108eb182dddc..c717cd92c028 100644 --- a/arch/ppc/platforms/mvme5100.c +++ b/arch/ppc/platforms/mvme5100.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mvme5100.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola MVME5100. | 2 | * Board setup routines for the Motorola MVME5100. |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/pal4.h b/arch/ppc/platforms/pal4.h index 641a11a31657..8569c423d887 100644 --- a/arch/ppc/platforms/pal4.h +++ b/arch/ppc/platforms/pal4.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4.h | ||
3 | * | ||
4 | * Definitions for SBS Palomar IV board | 2 | * Definitions for SBS Palomar IV board |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_pci.c b/arch/ppc/platforms/pal4_pci.c index c3b1b757a48b..d81ae1c7e1cf 100644 --- a/arch/ppc/platforms/pal4_pci.c +++ b/arch/ppc/platforms/pal4_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_pci.c | ||
3 | * | ||
4 | * PCI support for SBS Palomar IV | 2 | * PCI support for SBS Palomar IV |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_serial.h b/arch/ppc/platforms/pal4_serial.h index a715c66e1adf..a75343224cfd 100644 --- a/arch/ppc/platforms/pal4_serial.h +++ b/arch/ppc/platforms/pal4_serial.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_serial.h | ||
3 | * | ||
4 | * Definitions for SBS PalomarIV serial support | 2 | * Definitions for SBS PalomarIV serial support |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_setup.c b/arch/ppc/platforms/pal4_setup.c index f93a3f871932..3c3d881df00d 100644 --- a/arch/ppc/platforms/pal4_setup.c +++ b/arch/ppc/platforms/pal4_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_setup.c | ||
3 | * | ||
4 | * Board setup routines for the SBS PalomarIV. | 2 | * Board setup routines for the SBS PalomarIV. |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c index e6b520e6e13f..c3a86be11fb7 100644 --- a/arch/ppc/platforms/powerpmc250.c +++ b/arch/ppc/platforms/powerpmc250.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/powerpmc250.c | ||
3 | * | ||
4 | * Board setup routines for Force PowerPMC-250 Processor PMC | 2 | * Board setup routines for Force PowerPMC-250 Processor PMC |
5 | * | 3 | * |
6 | * Author: Troy Benjegerdes <tbenjegerdes@mvista.com> | 4 | * Author: Troy Benjegerdes <tbenjegerdes@mvista.com> |
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c index 22bd40cfb092..de2761ebe0d9 100644 --- a/arch/ppc/platforms/pplus.c +++ b/arch/ppc/platforms/pplus.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pplus.c | ||
3 | * | ||
4 | * Board and PCI setup routines for MCG PowerPlus | 2 | * Board and PCI setup routines for MCG PowerPlus |
5 | * | 3 | * |
6 | * Author: Randy Vinson <rvinson@mvista.com> | 4 | * Author: Randy Vinson <rvinson@mvista.com> |
diff --git a/arch/ppc/platforms/pplus.h b/arch/ppc/platforms/pplus.h index 90f0cb2d409f..a07cbbdd72c6 100644 --- a/arch/ppc/platforms/pplus.h +++ b/arch/ppc/platforms/pplus.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pplus.h | ||
3 | * | ||
4 | * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr. | 2 | * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr. |
5 | * | 3 | * |
6 | * Author: Mark A. Greerinclude/asm-ppc/hawk.h | 4 | * Author: Mark A. Greerinclude/asm-ppc/hawk.h |
diff --git a/arch/ppc/platforms/pq2ads.c b/arch/ppc/platforms/pq2ads.c index 71c9fca1fe9b..3365fd788a7a 100644 --- a/arch/ppc/platforms/pq2ads.c +++ b/arch/ppc/platforms/pq2ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pq2ads.c | ||
3 | * | ||
4 | * PQ2ADS platform support | 2 | * PQ2ADS platform support |
5 | * | 3 | * |
6 | * Author: Kumar Gala <galak@kernel.crashing.org> | 4 | * Author: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index 067d9a5aebc1..6b26dd36c640 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h | |||
@@ -13,6 +13,10 @@ | |||
13 | 13 | ||
14 | #include <asm/ppcboot.h> | 14 | #include <asm/ppcboot.h> |
15 | 15 | ||
16 | #if defined(CONFIG_ADS8272) | ||
17 | #define BOARD_CHIP_NAME "8272" | ||
18 | #endif | ||
19 | |||
16 | /* Memory map is configured by the PROM startup. | 20 | /* Memory map is configured by the PROM startup. |
17 | * We just map a few things we need. The CSR is actually 4 byte-wide | 21 | * We just map a few things we need. The CSR is actually 4 byte-wide |
18 | * registers that can be accessed as 8-, 16-, or 32-bit values. | 22 | * registers that can be accessed as 8-, 16-, or 32-bit values. |
diff --git a/arch/ppc/platforms/pq2ads_pd.h b/arch/ppc/platforms/pq2ads_pd.h new file mode 100644 index 000000000000..8f14a43eafec --- /dev/null +++ b/arch/ppc/platforms/pq2ads_pd.h | |||
@@ -0,0 +1,114 @@ | |||
1 | #ifndef __PQ2ADS_PD_H | ||
2 | #define __PQ2ADS_PD_H | ||
3 | /* | ||
4 | * arch/ppc/platforms/82xx/pq2ads_pd.h | ||
5 | * | ||
6 | * Some defines for MPC82xx board-specific PlatformDevice descriptions | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | /* FCC1 Clock Source Configuration. These can be redefined in the board specific file. | ||
17 | Can only choose from CLK9-12 */ | ||
18 | |||
19 | #define F1_RXCLK 11 | ||
20 | #define F1_TXCLK 10 | ||
21 | |||
22 | /* FCC2 Clock Source Configuration. These can be redefined in the board specific file. | ||
23 | Can only choose from CLK13-16 */ | ||
24 | #define F2_RXCLK 15 | ||
25 | #define F2_TXCLK 16 | ||
26 | |||
27 | /* FCC3 Clock Source Configuration. These can be redefined in the board specific file. | ||
28 | Can only choose from CLK13-16 */ | ||
29 | #define F3_RXCLK 13 | ||
30 | #define F3_TXCLK 14 | ||
31 | |||
32 | /* Automatically generates register configurations */ | ||
33 | #define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ | ||
34 | |||
35 | #define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ | ||
36 | #define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ | ||
37 | #define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ | ||
38 | #define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ | ||
39 | #define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ | ||
40 | #define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ | ||
41 | |||
42 | #define PC_F1RXCLK PC_CLK(F1_RXCLK) | ||
43 | #define PC_F1TXCLK PC_CLK(F1_TXCLK) | ||
44 | #define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) | ||
45 | #define CMX1_CLK_MASK ((uint)0xff000000) | ||
46 | |||
47 | #define PC_F2RXCLK PC_CLK(F2_RXCLK) | ||
48 | #define PC_F2TXCLK PC_CLK(F2_TXCLK) | ||
49 | #define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) | ||
50 | #define CMX2_CLK_MASK ((uint)0x00ff0000) | ||
51 | |||
52 | #define PC_F3RXCLK PC_CLK(F3_RXCLK) | ||
53 | #define PC_F3TXCLK PC_CLK(F3_TXCLK) | ||
54 | #define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) | ||
55 | #define CMX3_CLK_MASK ((uint)0x0000ff00) | ||
56 | |||
57 | /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, | ||
58 | * but there is little variation among the choices. | ||
59 | */ | ||
60 | #define PA1_COL 0x00000001U | ||
61 | #define PA1_CRS 0x00000002U | ||
62 | #define PA1_TXER 0x00000004U | ||
63 | #define PA1_TXEN 0x00000008U | ||
64 | #define PA1_RXDV 0x00000010U | ||
65 | #define PA1_RXER 0x00000020U | ||
66 | #define PA1_TXDAT 0x00003c00U | ||
67 | #define PA1_RXDAT 0x0003c000U | ||
68 | #define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) | ||
69 | #define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ | ||
70 | PA1_RXDV | PA1_RXER) | ||
71 | #define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) | ||
72 | #define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) | ||
73 | |||
74 | |||
75 | /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, | ||
76 | * but there is little variation among the choices. | ||
77 | */ | ||
78 | #define PB2_TXER 0x00000001U | ||
79 | #define PB2_RXDV 0x00000002U | ||
80 | #define PB2_TXEN 0x00000004U | ||
81 | #define PB2_RXER 0x00000008U | ||
82 | #define PB2_COL 0x00000010U | ||
83 | #define PB2_CRS 0x00000020U | ||
84 | #define PB2_TXDAT 0x000003c0U | ||
85 | #define PB2_RXDAT 0x00003c00U | ||
86 | #define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ | ||
87 | PB2_RXER | PB2_RXDV | PB2_TXER) | ||
88 | #define PB2_PSORB1 (PB2_TXEN) | ||
89 | #define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) | ||
90 | #define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) | ||
91 | |||
92 | |||
93 | /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, | ||
94 | * but there is little variation among the choices. | ||
95 | */ | ||
96 | #define PB3_RXDV 0x00004000U | ||
97 | #define PB3_RXER 0x00008000U | ||
98 | #define PB3_TXER 0x00010000U | ||
99 | #define PB3_TXEN 0x00020000U | ||
100 | #define PB3_COL 0x00040000U | ||
101 | #define PB3_CRS 0x00080000U | ||
102 | #define PB3_TXDAT 0x0f000000U | ||
103 | #define PB3_RXDAT 0x00f00000U | ||
104 | #define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ | ||
105 | PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) | ||
106 | #define PB3_PSORB1 0 | ||
107 | #define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) | ||
108 | #define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) | ||
109 | |||
110 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | ||
111 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | ||
112 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | ||
113 | |||
114 | #endif | ||
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c index d06535802003..a0fc628ffb1e 100644 --- a/arch/ppc/platforms/prep_setup.c +++ b/arch/ppc/platforms/prep_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c index 0bb14a5e824c..cdd9cfb13ee9 100644 --- a/arch/ppc/platforms/prpmc750.c +++ b/arch/ppc/platforms/prpmc750.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/prpmc750_setup.c | ||
3 | * | ||
4 | * Board setup routines for Motorola PrPMC750 | 2 | * Board setup routines for Motorola PrPMC750 |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c index de7baefacd3a..e459a199fb1d 100644 --- a/arch/ppc/platforms/prpmc800.c +++ b/arch/ppc/platforms/prpmc800.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/prpmc800.c | ||
3 | * | ||
4 | * Author: Dale Farnsworth <dale.farnsworth@mvista.com> | 2 | * Author: Dale Farnsworth <dale.farnsworth@mvista.com> |
5 | * | 3 | * |
6 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 872c0a3ba3c7..bc26b6d71c1d 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/radstone_ppc7d.c | ||
3 | * | ||
4 | * Board setup routines for the Radstone PPC7D boards. | 2 | * Board setup routines for the Radstone PPC7D boards. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
@@ -685,11 +683,10 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev) | |||
685 | 683 | ||
686 | pdata = pdev->dev.platform_data; | 684 | pdata = pdev->dev.platform_data; |
687 | if (pdata == NULL) { | 685 | if (pdata == NULL) { |
688 | pdata = kmalloc(sizeof(*pdata), GFP_KERNEL); | 686 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); |
689 | if (pdata == NULL) | 687 | if (pdata == NULL) |
690 | return; | 688 | return; |
691 | 689 | ||
692 | memset(pdata, 0, sizeof(*pdata)); | ||
693 | pdev->dev.platform_data = pdata; | 690 | pdev->dev.platform_data = pdata; |
694 | } | 691 | } |
695 | 692 | ||
@@ -712,7 +709,7 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev) | |||
712 | } | 709 | } |
713 | #endif | 710 | #endif |
714 | 711 | ||
715 | static int __init ppc7d_platform_notify(struct device *dev) | 712 | static int ppc7d_platform_notify(struct device *dev) |
716 | { | 713 | { |
717 | static struct { | 714 | static struct { |
718 | char *bus_id; | 715 | char *bus_id; |
diff --git a/arch/ppc/platforms/radstone_ppc7d.h b/arch/ppc/platforms/radstone_ppc7d.h index 938375510be4..2bb093a0c03e 100644 --- a/arch/ppc/platforms/radstone_ppc7d.h +++ b/arch/ppc/platforms/radstone_ppc7d.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/radstone_ppc7d.h | ||
3 | * | ||
4 | * Board definitions for the Radstone PPC7D boards. | 2 | * Board definitions for the Radstone PPC7D boards. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 9eeed3572309..6dc459decb2d 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sandpoint_setup.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola SPS Sandpoint Test Platform. | 2 | * Board setup routines for the Motorola SPS Sandpoint Test Platform. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/platforms/sandpoint.h b/arch/ppc/platforms/sandpoint.h index f4e982cb69df..3b64e6418489 100644 --- a/arch/ppc/platforms/sandpoint.h +++ b/arch/ppc/platforms/sandpoint.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sandpoint.h | ||
3 | * | ||
4 | * Definitions for Motorola SPS Sandpoint Test Platform | 2 | * Definitions for Motorola SPS Sandpoint Test Platform |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c index 74c9ff72c3dd..866807b4ad0b 100644 --- a/arch/ppc/platforms/sbc82xx.c +++ b/arch/ppc/platforms/sbc82xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sbc82xx.c | ||
3 | * | ||
4 | * SBC82XX platform support | 2 | * SBC82XX platform support |
5 | * | 3 | * |
6 | * Author: Guy Streeter <streeter@redhat.com> | 4 | * Author: Guy Streeter <streeter@redhat.com> |
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c index 69e1de7971f2..3783deccd9b2 100644 --- a/arch/ppc/platforms/spruce.c +++ b/arch/ppc/platforms/spruce.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/spruce.c | ||
3 | * | ||
4 | * Board and PCI setup routines for IBM Spruce | 2 | * Board and PCI setup routines for IBM Spruce |
5 | * | 3 | * |
6 | * Author: MontaVista Software <source@mvista.com> | 4 | * Author: MontaVista Software <source@mvista.com> |
diff --git a/arch/ppc/platforms/tqm8260_setup.c b/arch/ppc/platforms/tqm8260_setup.c index 3409139330b1..b766339f44ac 100644 --- a/arch/ppc/platforms/tqm8260_setup.c +++ b/arch/ppc/platforms/tqm8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/tqm8260_setup.c | ||
3 | * | ||
4 | * TQM8260 platform support | 2 | * TQM8260 platform support |
5 | * | 3 | * |
6 | * Author: Allen Curtis <acurtis@onz.com> | 4 | * Author: Allen Curtis <acurtis@onz.com> |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 159dcd92a6d1..5cb62c6a51c8 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -17,8 +17,8 @@ obj-$(CONFIG_440GX) += ibm440gx_common.o | |||
17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o | 17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o |
18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o | 18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o |
19 | ifeq ($(CONFIG_4xx),y) | 19 | ifeq ($(CONFIG_4xx),y) |
20 | ifeq ($(CONFIG_VIRTEX_II_PRO),y) | 20 | ifeq ($(CONFIG_XILINX_VIRTEX),y) |
21 | obj-$(CONFIG_40x) += xilinx_pic.o | 21 | obj-$(CONFIG_40x) += xilinx_pic.o ppc_sys.o |
22 | else | 22 | else |
23 | ifeq ($(CONFIG_403),y) | 23 | ifeq ($(CONFIG_403),y) |
24 | obj-$(CONFIG_40x) += ppc403_pic.o | 24 | obj-$(CONFIG_40x) += ppc403_pic.o |
diff --git a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h index f2c002531019..0a8a5d84390f 100644 --- a/arch/ppc/syslib/cpc700.h +++ b/arch/ppc/syslib/cpc700.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700.h | ||
3 | * | ||
4 | * Header file for IBM CPC700 Host Bridge, et. al. | 2 | * Header file for IBM CPC700 Host Bridge, et. al. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c index 75fe8eb10693..5add0a919ef6 100644 --- a/arch/ppc/syslib/cpc700_pic.c +++ b/arch/ppc/syslib/cpc700_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for IBM Spruce | 2 | * Interrupt controller support for IBM Spruce |
5 | * | 3 | * |
6 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters | 4 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters |
diff --git a/arch/ppc/syslib/cpc710.h b/arch/ppc/syslib/cpc710.h index cc0afd804029..5299bf8b5d01 100644 --- a/arch/ppc/syslib/cpc710.h +++ b/arch/ppc/syslib/cpc710.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc710.h | ||
3 | * | ||
4 | * Definitions for the IBM CPC710 PCI Host Bridge | 2 | * Definitions for the IBM CPC710 PCI Host Bridge |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/gen550.h b/arch/ppc/syslib/gen550.h index 039d249e19a8..5254d3cdbca6 100644 --- a/arch/ppc/syslib/gen550.h +++ b/arch/ppc/syslib/gen550.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550.h | ||
3 | * | ||
4 | * gen550 prototypes | 2 | * gen550 prototypes |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c index 9ef0113c83d1..9fcff74bfdd0 100644 --- a/arch/ppc/syslib/gen550_dbg.c +++ b/arch/ppc/syslib/gen550_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_dbg.c | ||
3 | * | ||
4 | * A library of polled 16550 serial routines. These are intended to | 2 | * A library of polled 16550 serial routines. These are intended to |
5 | * be used to support progress messages, xmon, kgdb, etc. on a | 3 | * be used to support progress messages, xmon, kgdb, etc. on a |
6 | * variety of platforms. | 4 | * variety of platforms. |
diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c index 7239d5d7ddcd..874078a7664d 100644 --- a/arch/ppc/syslib/gen550_kgdb.c +++ b/arch/ppc/syslib/gen550_kgdb.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_kgdb.c | ||
3 | * | ||
4 | * Generic 16550 kgdb support intended to be useful on a variety | 2 | * Generic 16550 kgdb support intended to be useful on a variety |
5 | * of platforms. To enable this support, it is necessary to set | 3 | * of platforms. To enable this support, it is necessary to set |
6 | * the CONFIG_GEN550 option. Any virtual mapping of the serial | 4 | * the CONFIG_GEN550 option. Any virtual mapping of the serial |
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c index f97b3a9abd1e..dc3bd9ecbbf6 100644 --- a/arch/ppc/syslib/gt64260_pic.c +++ b/arch/ppc/syslib/gt64260_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gt64260_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Galileo's GT64260. | 2 | * Interrupt controller support for Galileo's GT64260. |
5 | * | 3 | * |
6 | * Author: Chris Zankel <source@mvista.com> | 4 | * Author: Chris Zankel <source@mvista.com> |
diff --git a/arch/ppc/syslib/harrier.c b/arch/ppc/syslib/harrier.c index a6b3f8645793..c1583f488325 100644 --- a/arch/ppc/syslib/harrier.c +++ b/arch/ppc/syslib/harrier.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/harrier.c | ||
3 | * | ||
4 | * Motorola MCG Harrier northbridge/memory controller support | 2 | * Motorola MCG Harrier northbridge/memory controller support |
5 | * | 3 | * |
6 | * Author: Dale Farnsworth | 4 | * Author: Dale Farnsworth |
diff --git a/arch/ppc/syslib/hawk_common.c b/arch/ppc/syslib/hawk_common.c index a9911dc3a82f..c5bf16b0d6a1 100644 --- a/arch/ppc/syslib/hawk_common.c +++ b/arch/ppc/syslib/hawk_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/hawk_common.c | ||
3 | * | ||
4 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. | 2 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c index 0d6be2d6dd67..fbaae5f6d834 100644 --- a/arch/ppc/syslib/ibm440gp_common.c +++ b/arch/ppc/syslib/ibm440gp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440gp_common.c | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ibm440gp_common.h b/arch/ppc/syslib/ibm440gp_common.h index a054d83cb1ac..f48529f3c23d 100644 --- a/arch/ppc/syslib/ibm440gp_common.h +++ b/arch/ppc/syslib/ibm440gp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gp_common.h | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index c36db279b43d..a7dd55f1c63e 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.c | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.h b/arch/ppc/syslib/ibm440gx_common.h index e73aa0411d35..a2ab9fab8e34 100644 --- a/arch/ppc/syslib/ibm440gx_common.h +++ b/arch/ppc/syslib/ibm440gx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.h | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440sp_common.c b/arch/ppc/syslib/ibm440sp_common.c index cdafda127d81..293e4138d172 100644 --- a/arch/ppc/syslib/ibm440sp_common.c +++ b/arch/ppc/syslib/ibm440sp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.c | ||
3 | * | ||
4 | * PPC440SP/PPC440SPe system library | 2 | * PPC440SP/PPC440SPe system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm440sp_common.h b/arch/ppc/syslib/ibm440sp_common.h index a21a9906dcc9..8077bf8ed118 100644 --- a/arch/ppc/syslib/ibm440sp_common.h +++ b/arch/ppc/syslib/ibm440sp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.h | ||
3 | * | ||
4 | * PPC440SP system library | 2 | * PPC440SP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c index 71db11d22158..14a981a5cea7 100644 --- a/arch/ppc/syslib/ibm44x_common.c +++ b/arch/ppc/syslib/ibm44x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm44x_common.c | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.h b/arch/ppc/syslib/ibm44x_common.h index b25a8995e4e9..f179db8634e0 100644 --- a/arch/ppc/syslib/ibm44x_common.h +++ b/arch/ppc/syslib/ibm44x_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm44x_common.h | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 1dc7e4e1d491..99e4bc0e42af 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8260_pci9.c | ||
3 | * | ||
4 | * Workaround for device erratum PCI 9. | 2 | * Workaround for device erratum PCI 9. |
5 | * See Motorola's "XPC826xA Family Device Errata Reference." | 3 | * See Motorola's "XPC826xA Family Device Errata Reference." |
6 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled | 4 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled |
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 76a2aa4ce65e..b7a6cb2d8d52 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/m8260_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 688616de3cde..dae9af78bde1 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
@@ -34,6 +32,13 @@ | |||
34 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
35 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
36 | 34 | ||
35 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
36 | #include <linux/mtd/partitions.h> | ||
37 | #include <linux/mtd/physmap.h> | ||
38 | #include <linux/mtd/mtd.h> | ||
39 | #include <linux/mtd/map.h> | ||
40 | #endif | ||
41 | |||
37 | #include <asm/mmu.h> | 42 | #include <asm/mmu.h> |
38 | #include <asm/reg.h> | 43 | #include <asm/reg.h> |
39 | #include <asm/residual.h> | 44 | #include <asm/residual.h> |
@@ -49,6 +54,34 @@ | |||
49 | 54 | ||
50 | #include "ppc8xx_pic.h" | 55 | #include "ppc8xx_pic.h" |
51 | 56 | ||
57 | #ifdef CONFIG_MTD_PHYSMAP | ||
58 | #define MPC8xxADS_BANK_WIDTH 4 | ||
59 | #endif | ||
60 | |||
61 | #define MPC8xxADS_U_BOOT_SIZE 0x80000 | ||
62 | #define MPC8xxADS_FREE_AREA_OFFSET MPC8xxADS_U_BOOT_SIZE | ||
63 | |||
64 | #if defined(CONFIG_MTD_PARTITIONS) | ||
65 | /* | ||
66 | NOTE: bank width and interleave relative to the installed flash | ||
67 | should have been chosen within MTD_CFI_GEOMETRY options. | ||
68 | */ | ||
69 | static struct mtd_partition mpc8xxads_partitions[] = { | ||
70 | { | ||
71 | .name = "bootloader", | ||
72 | .size = MPC8xxADS_U_BOOT_SIZE, | ||
73 | .offset = 0, | ||
74 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
75 | }, { | ||
76 | .name = "User FS", | ||
77 | .offset = MPC8xxADS_FREE_AREA_OFFSET | ||
78 | } | ||
79 | }; | ||
80 | |||
81 | #define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0])) | ||
82 | |||
83 | #endif | ||
84 | |||
52 | static int m8xx_set_rtc_time(unsigned long time); | 85 | static int m8xx_set_rtc_time(unsigned long time); |
53 | static unsigned long m8xx_get_rtc_time(void); | 86 | static unsigned long m8xx_get_rtc_time(void); |
54 | void m8xx_calibrate_decr(void); | 87 | void m8xx_calibrate_decr(void); |
@@ -71,6 +104,10 @@ board_init(void) | |||
71 | void __init | 104 | void __init |
72 | m8xx_setup_arch(void) | 105 | m8xx_setup_arch(void) |
73 | { | 106 | { |
107 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
108 | bd_t *binfo = (bd_t *)__res; | ||
109 | #endif | ||
110 | |||
74 | /* Reset the Communication Processor Module. | 111 | /* Reset the Communication Processor Module. |
75 | */ | 112 | */ |
76 | m8xx_cpm_reset(); | 113 | m8xx_cpm_reset(); |
@@ -106,6 +143,17 @@ m8xx_setup_arch(void) | |||
106 | } | 143 | } |
107 | #endif | 144 | #endif |
108 | #endif | 145 | #endif |
146 | |||
147 | #if defined (CONFIG_MPC86XADS) || defined (CONFIG_MPC885ADS) | ||
148 | #if defined(CONFIG_MTD_PHYSMAP) | ||
149 | physmap_configure(binfo->bi_flashstart, binfo->bi_flashsize, | ||
150 | MPC8xxADS_BANK_WIDTH, NULL); | ||
151 | #ifdef CONFIG_MTD_PARTITIONS | ||
152 | physmap_set_partitions(mpc8xxads_partitions, mpc8xxads_part_num); | ||
153 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
154 | #endif /* CONFIG_MTD_PHYSMAP */ | ||
155 | #endif | ||
156 | |||
109 | board_init(); | 157 | board_init(); |
110 | } | 158 | } |
111 | 159 | ||
@@ -140,9 +188,11 @@ void __init __attribute__ ((weak)) | |||
140 | init_internal_rtc(void) | 188 | init_internal_rtc(void) |
141 | { | 189 | { |
142 | /* Disable the RTC one second and alarm interrupts. */ | 190 | /* Disable the RTC one second and alarm interrupts. */ |
143 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) & ~(RTCSC_SIE | RTCSC_ALE)); | 191 | clrbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_SIE | RTCSC_ALE)); |
192 | |||
144 | /* Enable the RTC */ | 193 | /* Enable the RTC */ |
145 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) | (RTCSC_RTF | RTCSC_RTE)); | 194 | setbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_RTF | RTCSC_RTE)); |
195 | |||
146 | } | 196 | } |
147 | 197 | ||
148 | /* The decrementer counts at the system (internal) clock frequency divided by | 198 | /* The decrementer counts at the system (internal) clock frequency divided by |
@@ -159,8 +209,7 @@ void __init m8xx_calibrate_decr(void) | |||
159 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); | 209 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); |
160 | 210 | ||
161 | /* Force all 8xx processors to use divide by 16 processor clock. */ | 211 | /* Force all 8xx processors to use divide by 16 processor clock. */ |
162 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, | 212 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, 0x02000000); |
163 | in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr)|0x02000000); | ||
164 | /* Processor frequency is MHz. | 213 | /* Processor frequency is MHz. |
165 | * The value 'fp' is the number of decrementer ticks per second. | 214 | * The value 'fp' is the number of decrementer ticks per second. |
166 | */ | 215 | */ |
@@ -239,8 +288,8 @@ m8xx_restart(char *cmd) | |||
239 | __volatile__ unsigned char dummy; | 288 | __volatile__ unsigned char dummy; |
240 | 289 | ||
241 | local_irq_disable(); | 290 | local_irq_disable(); |
242 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr) | 0x00000080); | ||
243 | 291 | ||
292 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, 0x00000080); | ||
244 | /* Clear the ME bit in MSR to cause checkstop on machine check | 293 | /* Clear the ME bit in MSR to cause checkstop on machine check |
245 | */ | 294 | */ |
246 | mtmsr(mfmsr() & ~0x1000); | 295 | mtmsr(mfmsr() & ~0x1000); |
@@ -310,8 +359,8 @@ m8xx_init_IRQ(void) | |||
310 | i8259_init(0); | 359 | i8259_init(0); |
311 | 360 | ||
312 | /* The i8259 cascade interrupt must be level sensitive. */ | 361 | /* The i8259 cascade interrupt must be level sensitive. */ |
313 | out_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, in_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel & ~(0x80000000 >> ISA_BRIDGE_INT))); | ||
314 | 362 | ||
363 | clrbits32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, (0x80000000 >> ISA_BRIDGE_INT)); | ||
315 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) | 364 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) |
316 | enable_irq(ISA_BRIDGE_INT); | 365 | enable_irq(ISA_BRIDGE_INT); |
317 | #endif /* CONFIG_PCI */ | 366 | #endif /* CONFIG_PCI */ |
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index df6c9557b86a..ac11d7bab443 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -41,8 +41,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
41 | 41 | ||
42 | m8xx_wdt_reset(); | 42 | m8xx_wdt_reset(); |
43 | 43 | ||
44 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ | 44 | setbits16(&imap->im_sit.sit_piscr, PISCR_PS); |
45 | |||
46 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
47 | } | 46 | } |
48 | 47 | ||
diff --git a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c index 3e039706bdbc..2fc7c4150a18 100644 --- a/arch/ppc/syslib/mpc10x_common.c +++ b/arch/ppc/syslib/mpc10x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc10x_common.c | ||
3 | * | ||
4 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, | 2 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, |
5 | * Mem ctlr, EPIC, etc. | 3 | * Mem ctlr, EPIC, etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_devices.c b/arch/ppc/syslib/mpc52xx_devices.c index da3c74bfdc92..7487539a4e92 100644 --- a/arch/ppc/syslib/mpc52xx_devices.c +++ b/arch/ppc/syslib/mpc52xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_devices.c | ||
3 | * | ||
4 | * Freescale MPC52xx device descriptions | 2 | * Freescale MPC52xx device descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c index 313c96ec7eb1..9ec525f9fe98 100644 --- a/arch/ppc/syslib/mpc52xx_pci.c +++ b/arch/ppc/syslib/mpc52xx_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.c | ||
3 | * | ||
4 | * PCI code for the Freescale MPC52xx embedded CPU. | 2 | * PCI code for the Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.h b/arch/ppc/syslib/mpc52xx_pci.h index 04b509a02530..77d47dbba85e 100644 --- a/arch/ppc/syslib/mpc52xx_pci.h +++ b/arch/ppc/syslib/mpc52xx_pci.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.h | ||
3 | * | ||
4 | * PCI Include file the Freescale MPC52xx embedded cpu chips | 2 | * PCI Include file the Freescale MPC52xx embedded cpu chips |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c index 4c4497e62517..c4406f9dc6a3 100644 --- a/arch/ppc/syslib/mpc52xx_pic.c +++ b/arch/ppc/syslib/mpc52xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pic.c | ||
3 | * | ||
4 | * Programmable Interrupt Controller functions for the Freescale MPC52xx | 2 | * Programmable Interrupt Controller functions for the Freescale MPC52xx |
5 | * embedded CPU. | 3 | * embedded CPU. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index a4a4b02227df..2ee48ce0a517 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_setup.c | ||
3 | * | ||
4 | * Common code for the boards based on Freescale MPC52xx embedded CPU. | 2 | * Common code for the boards based on Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_sys.c b/arch/ppc/syslib/mpc52xx_sys.c index 9a0f90aa8aac..b4e6f978f057 100644 --- a/arch/ppc/syslib/mpc52xx_sys.c +++ b/arch/ppc/syslib/mpc52xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_sys.c | ||
3 | * | ||
4 | * Freescale MPC52xx system descriptions | 2 | * Freescale MPC52xx system descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index f9b95de70e23..1af2c000fcfa 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_devices.c | ||
3 | * | ||
4 | * MPC83xx Device descriptions | 2 | * MPC83xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c index 82cf3ab77f4a..0498ae7e01e3 100644 --- a/arch/ppc/syslib/mpc83xx_sys.c +++ b/arch/ppc/syslib/mpc83xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_sys.c | ||
3 | * | ||
4 | * MPC83xx System descriptions | 2 | * MPC83xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 00e9b6ff2f6e..7735336f5b8f 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_devices.c | ||
3 | * | ||
4 | * MPC85xx Device descriptions | 2 | * MPC85xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c index 397cfbcce5ea..d96a93dbcb5a 100644 --- a/arch/ppc/syslib/mpc85xx_sys.c +++ b/arch/ppc/syslib/mpc85xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_sys.c | ||
3 | * | ||
4 | * MPC85xx System descriptions | 2 | * MPC85xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index 92dc98b36bde..bd41ed83beb3 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc8xx_devices.c | ||
3 | * | ||
4 | * MPC8xx Device descriptions | 2 | * MPC8xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c index d3c617521603..eee213284855 100644 --- a/arch/ppc/syslib/mpc8xx_sys.c +++ b/arch/ppc/syslib/mpc8xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8xx_sys.c | ||
3 | * | ||
4 | * MPC8xx System descriptions | 2 | * MPC8xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 58b0aa813e85..5a19697060f0 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/mv64360_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Marvell's MV64360. | 2 | * Interrupt controller support for Marvell's MV64360. |
5 | * | 3 | * |
6 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> | 4 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 1f01b7e2376b..3b039c30a439 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60.c | ||
3 | * | ||
4 | * Common routines for the Marvell/Galileo Discovery line of host bridges | 2 | * Common routines for the Marvell/Galileo Discovery line of host bridges |
5 | * (gt64260, mv64360, mv64460, ...). | 3 | * (gt64260, mv64360, mv64460, ...). |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c index fa5b2e45e0ca..9cf18764a1a1 100644 --- a/arch/ppc/syslib/mv64x60_dbg.c +++ b/arch/ppc/syslib/mv64x60_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_dbg.c | ||
3 | * | ||
4 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). | 2 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/syslib/mv64x60_win.c b/arch/ppc/syslib/mv64x60_win.c index 5b827e2bbe22..4bf1ad17bf1a 100644 --- a/arch/ppc/syslib/mv64x60_win.c +++ b/arch/ppc/syslib/mv64x60_win.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_win.c | ||
3 | * | ||
4 | * Tables with info on how to manipulate the 32 & 64 bit windows on the | 2 | * Tables with info on how to manipulate the 32 & 64 bit windows on the |
5 | * various types of Marvell bridge chips. | 3 | * various types of Marvell bridge chips. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index 2fe28ded2c60..a4ecc2ee579f 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -451,10 +451,9 @@ ocp_driver_init(void) | |||
451 | DBG(("ocp: ocp_driver_init()...\n")); | 451 | DBG(("ocp: ocp_driver_init()...\n")); |
452 | 452 | ||
453 | /* Allocate/register primary OCP bus */ | 453 | /* Allocate/register primary OCP bus */ |
454 | ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL); | 454 | ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL); |
455 | if (ocp_bus == NULL) | 455 | if (ocp_bus == NULL) |
456 | return 1; | 456 | return 1; |
457 | memset(ocp_bus, 0, sizeof(struct device)); | ||
458 | strcpy(ocp_bus->bus_id, "ocp"); | 457 | strcpy(ocp_bus->bus_id, "ocp"); |
459 | 458 | ||
460 | bus_register(&ocp_bus_type); | 459 | bus_register(&ocp_bus_type); |
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 894779712b46..38e5b93fbe41 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index 1c40049b9a45..bcbe40de26fe 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic_defs.h b/arch/ppc/syslib/open_pic_defs.h index 6c94e7131463..3a25de7cb572 100644 --- a/arch/ppc/syslib/open_pic_defs.h +++ b/arch/ppc/syslib/open_pic_defs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic_defs.h -- OpenPIC definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is based on the following documentation: | 4 | * This file is based on the following documentation: |
diff --git a/arch/ppc/syslib/pci_auto.c b/arch/ppc/syslib/pci_auto.c index d64207c2a972..ee20a86fcc4b 100644 --- a/arch/ppc/syslib/pci_auto.c +++ b/arch/ppc/syslib/pci_auto.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pci_auto.c | ||
3 | * | ||
4 | * PCI autoconfiguration library | 2 | * PCI autoconfiguration library |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c index 05ccd598dd4e..b40b96a8c609 100644 --- a/arch/ppc/syslib/ppc4xx_dma.c +++ b/arch/ppc/syslib/ppc4xx_dma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_dma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine core library | 2 | * IBM PPC4xx DMA engine core library |
5 | * | 3 | * |
6 | * Copyright 2000-2004 MontaVista Software Inc. | 4 | * Copyright 2000-2004 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index aa4165144ec2..fd9af0fc0e9f 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc4xx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for PowerPC 4xx-based processors. | 2 | * Interrupt controller driver for PowerPC 4xx-based processors. |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ppc4xx_pm.c b/arch/ppc/syslib/ppc4xx_pm.c deleted file mode 100644 index 60a479204885..000000000000 --- a/arch/ppc/syslib/ppc4xx_pm.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Author: Armin Kuster <akuster@mvista.com> | ||
3 | * | ||
4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
5 | * the terms of the GNU General Public License version 2. This program | ||
6 | * is licensed "as is" without any warranty of any kind, whether express | ||
7 | * or implied. | ||
8 | * | ||
9 | * This an attempt to get Power Management going for the IBM 4xx processor. | ||
10 | * This was derived from the ppc4xx._setup.c file | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/ibm4xx.h> | ||
17 | |||
18 | void __init | ||
19 | ppc4xx_pm_init(void) | ||
20 | { | ||
21 | |||
22 | unsigned int value = 0; | ||
23 | |||
24 | /* turn off unused hardware to save power */ | ||
25 | #ifdef CONFIG_405GP | ||
26 | value |= CPM_DCP; /* CodePack */ | ||
27 | #endif | ||
28 | |||
29 | #if !defined(CONFIG_IBM_OCP_GPIO) | ||
30 | value |= CPM_GPIO0; | ||
31 | #endif | ||
32 | |||
33 | #if !defined(CONFIG_PPC405_I2C_ADAP) | ||
34 | value |= CPM_IIC0; | ||
35 | #ifdef CONFIG_STB03xxx | ||
36 | value |= CPM_IIC1; | ||
37 | #endif | ||
38 | #endif | ||
39 | |||
40 | |||
41 | #if !defined(CONFIG_405_DMA) | ||
42 | value |= CPM_DMA; | ||
43 | #endif | ||
44 | |||
45 | mtdcr(DCRN_CPMFR, value); | ||
46 | |||
47 | } | ||
diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c index 9f76e8ee39ed..280ea010a9c8 100644 --- a/arch/ppc/syslib/ppc4xx_sgdma.c +++ b/arch/ppc/syslib/ppc4xx_sgdma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_sgdma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine scatter/gather library | 2 | * IBM PPC4xx DMA engine scatter/gather library |
5 | * | 3 | * |
6 | * Copyright 2002-2003 MontaVista Software Inc. | 4 | * Copyright 2002-2003 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 7bada82527a8..26afd637dc81 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.c | ||
3 | * | ||
4 | * MPC83XX common board code | 2 | * MPC83XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h index a122a7322e5e..478b011cd963 100644 --- a/arch/ppc/syslib/ppc83xx_setup.h +++ b/arch/ppc/syslib/ppc83xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.h | ||
3 | * | ||
4 | * MPC83XX common board definitions | 2 | * MPC83XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c index 19ad537225e4..0145c968f9ad 100644 --- a/arch/ppc/syslib/ppc85xx_common.c +++ b/arch/ppc/syslib/ppc85xx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.c | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h index 94edf32151dd..182744a1321c 100644 --- a/arch/ppc/syslib/ppc85xx_common.h +++ b/arch/ppc/syslib/ppc85xx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.h | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index e4dda43fdaa7..e70b34ee6275 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.c | ||
3 | * | ||
4 | * MPC85XX common board code | 2 | * MPC85XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h index e340b0545fb5..f55b8032d3d9 100644 --- a/arch/ppc/syslib/ppc85xx_setup.h +++ b/arch/ppc/syslib/ppc85xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.h | ||
3 | * | ||
4 | * MPC85XX common board definitions | 2 | * MPC85XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index c0b93c4191ee..60c724e11584 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc_sys.c | ||
3 | * | ||
4 | * PPC System library functions | 2 | * PPC System library functions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -15,11 +13,22 @@ | |||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/bootmem.h> | ||
18 | #include <asm/ppc_sys.h> | 17 | #include <asm/ppc_sys.h> |
19 | 18 | ||
20 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); | 19 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); |
21 | 20 | ||
22 | static int ppc_sys_inited; | 21 | static int ppc_sys_inited; |
22 | static int ppc_sys_func_inited; | ||
23 | |||
24 | static const char *ppc_sys_func_names[] = { | ||
25 | [PPC_SYS_FUNC_DUMMY] = "dummy", | ||
26 | [PPC_SYS_FUNC_ETH] = "eth", | ||
27 | [PPC_SYS_FUNC_UART] = "uart", | ||
28 | [PPC_SYS_FUNC_HLDC] = "hldc", | ||
29 | [PPC_SYS_FUNC_USB] = "usb", | ||
30 | [PPC_SYS_FUNC_IRDA] = "irda", | ||
31 | }; | ||
23 | 32 | ||
24 | void __init identify_ppc_sys_by_id(u32 id) | 33 | void __init identify_ppc_sys_by_id(u32 id) |
25 | { | 34 | { |
@@ -38,13 +47,13 @@ void __init identify_ppc_sys_by_id(u32 id) | |||
38 | void __init identify_ppc_sys_by_name(char *name) | 47 | void __init identify_ppc_sys_by_name(char *name) |
39 | { | 48 | { |
40 | unsigned int i = 0; | 49 | unsigned int i = 0; |
41 | while (ppc_sys_specs[i].ppc_sys_name[0]) | 50 | while (ppc_sys_specs[i].ppc_sys_name[0]) { |
42 | { | ||
43 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) | 51 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) |
44 | break; | 52 | break; |
45 | i++; | 53 | i++; |
46 | } | 54 | } |
47 | cur_ppc_sys_spec = &ppc_sys_specs[i]; | 55 | cur_ppc_sys_spec = &ppc_sys_specs[i]; |
56 | |||
48 | return; | 57 | return; |
49 | } | 58 | } |
50 | 59 | ||
@@ -128,6 +137,165 @@ void ppc_sys_device_remove(enum ppc_sys_devices dev) | |||
128 | } | 137 | } |
129 | } | 138 | } |
130 | 139 | ||
140 | /* Platform-notify mapping | ||
141 | * Helper function for BSP code to assign board-specific platfom-divice bits | ||
142 | */ | ||
143 | |||
144 | void platform_notify_map(const struct platform_notify_dev_map *map, | ||
145 | struct device *dev) | ||
146 | { | ||
147 | struct platform_device *pdev; | ||
148 | int len, idx; | ||
149 | const char *s; | ||
150 | |||
151 | /* do nothing if no device or no bus_id */ | ||
152 | if (!dev || !dev->bus_id) | ||
153 | return; | ||
154 | |||
155 | /* call per device map */ | ||
156 | while (map->bus_id != NULL) { | ||
157 | idx = -1; | ||
158 | s = strrchr(dev->bus_id, '.'); | ||
159 | if (s != NULL) | ||
160 | idx = (int)simple_strtol(s + 1, NULL, 10); | ||
161 | else | ||
162 | s = dev->bus_id; | ||
163 | |||
164 | len = s - dev->bus_id; | ||
165 | |||
166 | if (!strncmp(dev->bus_id, map->bus_id, len)) { | ||
167 | pdev = container_of(dev, struct platform_device, dev); | ||
168 | map->rtn(pdev, idx); | ||
169 | } | ||
170 | map++; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | Function assignment stuff. | ||
176 | Intended to work as follows: | ||
177 | the device name defined in foo_devices.c will be concatenated with :"func", | ||
178 | where func is string map of respective function from platfom_device_func enum | ||
179 | |||
180 | The PPC_SYS_FUNC_DUMMY function is intended to remove all assignments, making the device to appear | ||
181 | in platform bus with unmodified name. | ||
182 | */ | ||
183 | |||
184 | /* | ||
185 | Here we'll replace .name pointers with fixed-lenght strings | ||
186 | Hereby, this should be called *before* any func stuff triggeded. | ||
187 | */ | ||
188 | void ppc_sys_device_initfunc(void) | ||
189 | { | ||
190 | int i; | ||
191 | const char *name; | ||
192 | static char new_names[NUM_PPC_SYS_DEVS][BUS_ID_SIZE]; | ||
193 | enum ppc_sys_devices cur_dev; | ||
194 | |||
195 | /* If inited yet, do nothing */ | ||
196 | if (ppc_sys_func_inited) | ||
197 | return; | ||
198 | |||
199 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
200 | if ((cur_dev = cur_ppc_sys_spec->device_list[i]) < 0) | ||
201 | continue; | ||
202 | |||
203 | if (ppc_sys_platform_devices[cur_dev].name) { | ||
204 | /*backup name */ | ||
205 | name = ppc_sys_platform_devices[cur_dev].name; | ||
206 | strlcpy(new_names[i], name, BUS_ID_SIZE); | ||
207 | ppc_sys_platform_devices[cur_dev].name = new_names[i]; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | ppc_sys_func_inited = 1; | ||
212 | } | ||
213 | |||
214 | /*The "engine" of the func stuff. Here we either concat specified function string description | ||
215 | to the name, or remove it if PPC_SYS_FUNC_DUMMY parameter is passed here*/ | ||
216 | void ppc_sys_device_setfunc(enum ppc_sys_devices dev, | ||
217 | enum platform_device_func func) | ||
218 | { | ||
219 | char *s; | ||
220 | char *name = (char *)ppc_sys_platform_devices[dev].name; | ||
221 | char tmp[BUS_ID_SIZE]; | ||
222 | |||
223 | if (!ppc_sys_func_inited) { | ||
224 | printk(KERN_ERR "Unable to alter function - not inited!\n"); | ||
225 | return; | ||
226 | } | ||
227 | |||
228 | if (ppc_sys_inited) { | ||
229 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
230 | } | ||
231 | |||
232 | if ((s = (char *)strchr(name, ':')) != NULL) { /* reassign */ | ||
233 | /* Either change the name after ':' or remove func modifications */ | ||
234 | if (func != PPC_SYS_FUNC_DUMMY) | ||
235 | strlcpy(s + 1, ppc_sys_func_names[func], BUS_ID_SIZE); | ||
236 | else | ||
237 | *s = 0; | ||
238 | } else if (func != PPC_SYS_FUNC_DUMMY) { | ||
239 | /* do assignment if it is not just "clear" request */ | ||
240 | sprintf(tmp, "%s:%s", name, ppc_sys_func_names[func]); | ||
241 | strlcpy(name, tmp, BUS_ID_SIZE); | ||
242 | } | ||
243 | |||
244 | if (ppc_sys_inited) { | ||
245 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | void ppc_sys_device_disable(enum ppc_sys_devices dev) | ||
250 | { | ||
251 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
252 | |||
253 | /*Check if it is enabled*/ | ||
254 | if(!(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED)) { | ||
255 | if (ppc_sys_inited) { | ||
256 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
257 | } | ||
258 | cur_ppc_sys_spec->config[dev] |= PPC_SYS_CONFIG_DISABLED; | ||
259 | } | ||
260 | } | ||
261 | |||
262 | void ppc_sys_device_enable(enum ppc_sys_devices dev) | ||
263 | { | ||
264 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
265 | |||
266 | /*Check if it is disabled*/ | ||
267 | if(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED) { | ||
268 | if (ppc_sys_inited) { | ||
269 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
270 | } | ||
271 | cur_ppc_sys_spec->config[dev] &= ~PPC_SYS_CONFIG_DISABLED; | ||
272 | } | ||
273 | |||
274 | } | ||
275 | |||
276 | void ppc_sys_device_enable_all(void) | ||
277 | { | ||
278 | enum ppc_sys_devices cur_dev; | ||
279 | int i; | ||
280 | |||
281 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
282 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
283 | ppc_sys_device_enable(cur_dev); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | void ppc_sys_device_disable_all(void) | ||
288 | { | ||
289 | enum ppc_sys_devices cur_dev; | ||
290 | int i; | ||
291 | |||
292 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
293 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
294 | ppc_sys_device_disable(cur_dev); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | |||
131 | static int __init ppc_sys_init(void) | 299 | static int __init ppc_sys_init(void) |
132 | { | 300 | { |
133 | unsigned int i, dev_id, ret = 0; | 301 | unsigned int i, dev_id, ret = 0; |
@@ -136,7 +304,8 @@ static int __init ppc_sys_init(void) | |||
136 | 304 | ||
137 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | 305 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { |
138 | dev_id = cur_ppc_sys_spec->device_list[i]; | 306 | dev_id = cur_ppc_sys_spec->device_list[i]; |
139 | if (dev_id != -1) { | 307 | if ((dev_id != -1) && |
308 | !(cur_ppc_sys_spec->config[dev_id] & PPC_SYS_CONFIG_DISABLED)) { | ||
140 | if (ppc_sys_device_fixup != NULL) | 309 | if (ppc_sys_device_fixup != NULL) |
141 | ppc_sys_device_fixup(&ppc_sys_platform_devices | 310 | ppc_sys_device_fixup(&ppc_sys_platform_devices |
142 | [dev_id]); | 311 | [dev_id]); |
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index 6ff3aab82fc3..0636aed7b827 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 Device descriptions | 2 | * PQ2 Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index 36d6e2179940..75e64f1c144d 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 System descriptions | 2 | * PQ2 System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/prep_nvram.c b/arch/ppc/syslib/prep_nvram.c index 2c6364d9641f..474dccbc4a8a 100644 --- a/arch/ppc/syslib/prep_nvram.c +++ b/arch/ppc/syslib/prep_nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/prep_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Corey Minyard | 2 | * Copyright (C) 1998 Corey Minyard |
5 | * | 3 | * |
6 | * This reads the NvRAM on PReP compliant machines (generally from IBM or | 4 | * This reads the NvRAM on PReP compliant machines (generally from IBM or |
diff --git a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c index 1323c641c19d..a8168b8e5683 100644 --- a/arch/ppc/syslib/todc_time.c +++ b/arch/ppc/syslib/todc_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/todc_time.c | ||
3 | * | ||
4 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 | 2 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 |
5 | * Real Time Clocks/Timekeepers. | 3 | * Real Time Clocks/Timekeepers. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index 47f04c71fe9c..e672b600f315 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/xilinx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for Xilinx Virtex-II Pro. | 2 | * Interrupt controller driver for Xilinx Virtex-II Pro. |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -15,7 +13,7 @@ | |||
15 | #include <linux/init.h> | 13 | #include <linux/init.h> |
16 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
17 | #include <asm/io.h> | 15 | #include <asm/io.h> |
18 | #include <asm/xparameters.h> | 16 | #include <platforms/4xx/xparameters/xparameters.h> |
19 | #include <asm/ibm4xx.h> | 17 | #include <asm/ibm4xx.h> |
20 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
21 | 19 | ||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 05ba410682a3..b524f5ba78a9 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -695,7 +695,7 @@ config NVRAM | |||
695 | 695 | ||
696 | config RTC | 696 | config RTC |
697 | tristate "Enhanced Real Time Clock Support" | 697 | tristate "Enhanced Real Time Clock Support" |
698 | depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV | 698 | depends on !PPC && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV |
699 | ---help--- | 699 | ---help--- |
700 | If you say Y here and create a character special file /dev/rtc with | 700 | If you say Y here and create a character special file /dev/rtc with |
701 | major number 10 and minor number 135 using mknod ("man mknod"), you | 701 | major number 10 and minor number 135 using mknod ("man mknod"), you |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 831eb4e8d9d3..f7ac31856572 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -118,7 +118,7 @@ | |||
118 | * the hvcs_final_close() function in order to get it out of the spinlock. | 118 | * the hvcs_final_close() function in order to get it out of the spinlock. |
119 | * Rearranged hvcs_close(). Cleaned up some printks and did some housekeeping | 119 | * Rearranged hvcs_close(). Cleaned up some printks and did some housekeeping |
120 | * on the changelog. Removed local CLC_LENGTH and used HVCS_CLC_LENGTH from | 120 | * on the changelog. Removed local CLC_LENGTH and used HVCS_CLC_LENGTH from |
121 | * arch/ppc64/hvcserver.h. | 121 | * include/asm-powerpc/hvcserver.h |
122 | * | 122 | * |
123 | * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to | 123 | * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to |
124 | * prevent possible lockup with realtime scheduling as similarily pointed out by | 124 | * prevent possible lockup with realtime scheduling as similarily pointed out by |
@@ -168,9 +168,10 @@ MODULE_VERSION(HVCS_DRIVER_VERSION); | |||
168 | 168 | ||
169 | /* | 169 | /* |
170 | * The hcall interface involves putting 8 chars into each of two registers. | 170 | * The hcall interface involves putting 8 chars into each of two registers. |
171 | * We load up those 2 registers (in arch/ppc64/hvconsole.c) by casting char[16] | 171 | * We load up those 2 registers (in arch/powerpc/platforms/pseries/hvconsole.c) |
172 | * to long[2]. It would work without __ALIGNED__, but a little (tiny) bit | 172 | * by casting char[16] to long[2]. It would work without __ALIGNED__, but a |
173 | * slower because an unaligned load is slower than aligned load. | 173 | * little (tiny) bit slower because an unaligned load is slower than aligned |
174 | * load. | ||
174 | */ | 175 | */ |
175 | #define __ALIGNED__ __attribute__((__aligned__(8))) | 176 | #define __ALIGNED__ __attribute__((__aligned__(8))) |
176 | 177 | ||
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 69596f6438e9..431bd37225a1 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -550,15 +550,12 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
550 | */ | 550 | */ |
551 | int macio_register_driver(struct macio_driver *drv) | 551 | int macio_register_driver(struct macio_driver *drv) |
552 | { | 552 | { |
553 | int count = 0; | ||
554 | |||
555 | /* initialize common driver fields */ | 553 | /* initialize common driver fields */ |
556 | drv->driver.name = drv->name; | 554 | drv->driver.name = drv->name; |
557 | drv->driver.bus = &macio_bus_type; | 555 | drv->driver.bus = &macio_bus_type; |
558 | 556 | ||
559 | /* register with core */ | 557 | /* register with core */ |
560 | count = driver_register(&drv->driver); | 558 | return driver_register(&drv->driver); |
561 | return count ? count : 1; | ||
562 | } | 559 | } |
563 | 560 | ||
564 | /** | 561 | /** |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index db2ae71d07ef..4eb05d7143d8 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -629,8 +629,6 @@ static struct of_platform_driver smu_of_platform_driver = | |||
629 | 629 | ||
630 | static int __init smu_init_sysfs(void) | 630 | static int __init smu_init_sysfs(void) |
631 | { | 631 | { |
632 | int rc; | ||
633 | |||
634 | /* | 632 | /* |
635 | * Due to sysfs bogosity, a sysdev is not a real device, so | 633 | * Due to sysfs bogosity, a sysdev is not a real device, so |
636 | * we should in fact create both if we want sysdev semantics | 634 | * we should in fact create both if we want sysdev semantics |
@@ -639,7 +637,7 @@ static int __init smu_init_sysfs(void) | |||
639 | * I'm a bit too far from figuring out how that works with those | 637 | * I'm a bit too far from figuring out how that works with those |
640 | * new chipsets, but that will come back and bite us | 638 | * new chipsets, but that will come back and bite us |
641 | */ | 639 | */ |
642 | rc = of_register_driver(&smu_of_platform_driver); | 640 | of_register_driver(&smu_of_platform_driver); |
643 | return 0; | 641 | return 0; |
644 | } | 642 | } |
645 | 643 | ||
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 4f50ee5767a2..231146f439dd 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -104,7 +104,6 @@ | |||
104 | #include <linux/kernel.h> | 104 | #include <linux/kernel.h> |
105 | #include <linux/delay.h> | 105 | #include <linux/delay.h> |
106 | #include <linux/sched.h> | 106 | #include <linux/sched.h> |
107 | #include <linux/i2c.h> | ||
108 | #include <linux/slab.h> | 107 | #include <linux/slab.h> |
109 | #include <linux/init.h> | 108 | #include <linux/init.h> |
110 | #include <linux/spinlock.h> | 109 | #include <linux/spinlock.h> |
@@ -113,7 +112,6 @@ | |||
113 | #include <linux/reboot.h> | 112 | #include <linux/reboot.h> |
114 | #include <linux/kmod.h> | 113 | #include <linux/kmod.h> |
115 | #include <linux/i2c.h> | 114 | #include <linux/i2c.h> |
116 | #include <linux/i2c-dev.h> | ||
117 | #include <asm/prom.h> | 115 | #include <asm/prom.h> |
118 | #include <asm/machdep.h> | 116 | #include <asm/machdep.h> |
119 | #include <asm/io.h> | 117 | #include <asm/io.h> |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 4a478eb0e27d..4f5f3abc9cb3 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -161,7 +161,9 @@ static int drop_interrupts; | |||
161 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 161 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) |
162 | static int option_lid_wakeup = 1; | 162 | static int option_lid_wakeup = 1; |
163 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 163 | #endif /* CONFIG_PM && CONFIG_PPC32 */ |
164 | #if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT) | ||
164 | static int sleep_in_progress; | 165 | static int sleep_in_progress; |
166 | #endif | ||
165 | static unsigned long async_req_locks; | 167 | static unsigned long async_req_locks; |
166 | static unsigned int pmu_irq_stats[11]; | 168 | static unsigned int pmu_irq_stats[11]; |
167 | 169 | ||
@@ -2201,8 +2203,7 @@ pmac_wakeup_devices(void) | |||
2201 | #define GRACKLE_NAP (1<<4) | 2203 | #define GRACKLE_NAP (1<<4) |
2202 | #define GRACKLE_SLEEP (1<<3) | 2204 | #define GRACKLE_SLEEP (1<<3) |
2203 | 2205 | ||
2204 | int | 2206 | static int powerbook_sleep_grackle(void) |
2205 | powerbook_sleep_grackle(void) | ||
2206 | { | 2207 | { |
2207 | unsigned long save_l2cr; | 2208 | unsigned long save_l2cr; |
2208 | unsigned short pmcr1; | 2209 | unsigned short pmcr1; |
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index 423bfa2432c0..3f7967feaf5b 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/i2c-dev.h> | ||
19 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
20 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c index 8e99d408fddd..eae1189d6c41 100644 --- a/drivers/macintosh/windfarm_max6690_sensor.c +++ b/drivers/macintosh/windfarm_max6690_sensor.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/i2c-dev.h> | ||
15 | #include <asm/prom.h> | 14 | #include <asm/prom.h> |
16 | #include <asm/pmac_low_i2c.h> | 15 | #include <asm/pmac_low_i2c.h> |
17 | 16 | ||
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 24e51d5e97fc..e295a07a1ebc 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/i2c-dev.h> | ||
17 | #include <asm/semaphore.h> | 16 | #include <asm/semaphore.h> |
18 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
19 | #include <asm/smu.h> | 18 | #include <asm/smu.h> |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 00993e8ba589..e20b849a22e8 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2172,6 +2172,7 @@ config BNX2 | |||
2172 | config SPIDER_NET | 2172 | config SPIDER_NET |
2173 | tristate "Spider Gigabit Ethernet driver" | 2173 | tristate "Spider Gigabit Ethernet driver" |
2174 | depends on PCI && PPC_CELL | 2174 | depends on PCI && PPC_CELL |
2175 | select FW_LOADER | ||
2175 | help | 2176 | help |
2176 | This driver supports the Gigabit Ethernet chips present on the | 2177 | This driver supports the Gigabit Ethernet chips present on the |
2177 | Cell Processor-Based Blades from IBM. | 2178 | Cell Processor-Based Blades from IBM. |
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index 147a38dcc766..bb3c0ab7e667 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h | |||
@@ -8,6 +8,7 @@ | |||
8 | typedef struct { volatile int counter; } atomic_t; | 8 | typedef struct { volatile int counter; } atomic_t; |
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | #include <linux/compiler.h> | ||
11 | #include <asm/synch.h> | 12 | #include <asm/synch.h> |
12 | #include <asm/asm-compat.h> | 13 | #include <asm/asm-compat.h> |
13 | 14 | ||
@@ -176,20 +177,29 @@ static __inline__ int atomic_dec_return(atomic_t *v) | |||
176 | * Atomically adds @a to @v, so long as it was not @u. | 177 | * Atomically adds @a to @v, so long as it was not @u. |
177 | * Returns non-zero if @v was not @u, and zero otherwise. | 178 | * Returns non-zero if @v was not @u, and zero otherwise. |
178 | */ | 179 | */ |
179 | #define atomic_add_unless(v, a, u) \ | 180 | static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) |
180 | ({ \ | 181 | { |
181 | int c, old; \ | 182 | int t; |
182 | c = atomic_read(v); \ | 183 | |
183 | for (;;) { \ | 184 | __asm__ __volatile__ ( |
184 | if (unlikely(c == (u))) \ | 185 | LWSYNC_ON_SMP |
185 | break; \ | 186 | "1: lwarx %0,0,%1 # atomic_add_unless\n\ |
186 | old = atomic_cmpxchg((v), c, c + (a)); \ | 187 | cmpw 0,%0,%3 \n\ |
187 | if (likely(old == c)) \ | 188 | beq- 2f \n\ |
188 | break; \ | 189 | add %0,%2,%0 \n" |
189 | c = old; \ | 190 | PPC405_ERR77(0,%2) |
190 | } \ | 191 | " stwcx. %0,0,%1 \n\ |
191 | c != (u); \ | 192 | bne- 1b \n" |
192 | }) | 193 | ISYNC_ON_SMP |
194 | " subf %0,%2,%0 \n\ | ||
195 | 2:" | ||
196 | : "=&r" (t) | ||
197 | : "r" (&v->counter), "r" (a), "r" (u) | ||
198 | : "cc", "memory"); | ||
199 | |||
200 | return t != u; | ||
201 | } | ||
202 | |||
193 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 203 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
194 | 204 | ||
195 | #define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0) | 205 | #define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0) |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 5638518968c3..fe45f6f3a4be 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -102,38 +102,40 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
102 | #define CPU_FTR_NEED_COHERENT ASM_CONST(0x0000000000020000) | 102 | #define CPU_FTR_NEED_COHERENT ASM_CONST(0x0000000000020000) |
103 | #define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000) | 103 | #define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000) |
104 | #define CPU_FTR_BIG_PHYS ASM_CONST(0x0000000000080000) | 104 | #define CPU_FTR_BIG_PHYS ASM_CONST(0x0000000000080000) |
105 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) | 105 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) |
106 | 106 | ||
107 | #ifdef __powerpc64__ | 107 | #ifdef __powerpc64__ |
108 | /* Add the 64b processor unique features in the top half of the word */ | 108 | /* Add the 64b processor unique features in the top half of the word */ |
109 | #define CPU_FTR_SLB ASM_CONST(0x0000000100000000) | 109 | #define CPU_FTR_SLB ASM_CONST(0x0000000100000000) |
110 | #define CPU_FTR_16M_PAGE ASM_CONST(0x0000000200000000) | 110 | #define CPU_FTR_16M_PAGE ASM_CONST(0x0000000200000000) |
111 | #define CPU_FTR_TLBIEL ASM_CONST(0x0000000400000000) | 111 | #define CPU_FTR_TLBIEL ASM_CONST(0x0000000400000000) |
112 | #define CPU_FTR_NOEXECUTE ASM_CONST(0x0000000800000000) | 112 | #define CPU_FTR_NOEXECUTE ASM_CONST(0x0000000800000000) |
113 | #define CPU_FTR_IABR ASM_CONST(0x0000002000000000) | 113 | #define CPU_FTR_IABR ASM_CONST(0x0000002000000000) |
114 | #define CPU_FTR_MMCRA ASM_CONST(0x0000004000000000) | 114 | #define CPU_FTR_MMCRA ASM_CONST(0x0000004000000000) |
115 | #define CPU_FTR_CTRL ASM_CONST(0x0000008000000000) | 115 | #define CPU_FTR_CTRL ASM_CONST(0x0000008000000000) |
116 | #define CPU_FTR_SMT ASM_CONST(0x0000010000000000) | 116 | #define CPU_FTR_SMT ASM_CONST(0x0000010000000000) |
117 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) | 117 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) |
118 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) | 118 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) |
119 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) | 119 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) |
120 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) | 120 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) |
121 | #define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000) | 121 | #define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000) |
122 | #define CPU_FTR_PURR ASM_CONST(0x0000400000000000) | ||
122 | #else | 123 | #else |
123 | /* ensure on 32b processors the flags are available for compiling but | 124 | /* ensure on 32b processors the flags are available for compiling but |
124 | * don't do anything */ | 125 | * don't do anything */ |
125 | #define CPU_FTR_SLB ASM_CONST(0x0) | 126 | #define CPU_FTR_SLB ASM_CONST(0x0) |
126 | #define CPU_FTR_16M_PAGE ASM_CONST(0x0) | 127 | #define CPU_FTR_16M_PAGE ASM_CONST(0x0) |
127 | #define CPU_FTR_TLBIEL ASM_CONST(0x0) | 128 | #define CPU_FTR_TLBIEL ASM_CONST(0x0) |
128 | #define CPU_FTR_NOEXECUTE ASM_CONST(0x0) | 129 | #define CPU_FTR_NOEXECUTE ASM_CONST(0x0) |
129 | #define CPU_FTR_IABR ASM_CONST(0x0) | 130 | #define CPU_FTR_IABR ASM_CONST(0x0) |
130 | #define CPU_FTR_MMCRA ASM_CONST(0x0) | 131 | #define CPU_FTR_MMCRA ASM_CONST(0x0) |
131 | #define CPU_FTR_CTRL ASM_CONST(0x0) | 132 | #define CPU_FTR_CTRL ASM_CONST(0x0) |
132 | #define CPU_FTR_SMT ASM_CONST(0x0) | 133 | #define CPU_FTR_SMT ASM_CONST(0x0) |
133 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) | 134 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) |
134 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) | 135 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) |
135 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0) | 136 | #define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0) |
136 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0) | 137 | #define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0) |
138 | #define CPU_FTR_PURR ASM_CONST(0x0) | ||
137 | #endif | 139 | #endif |
138 | 140 | ||
139 | #ifndef __ASSEMBLY__ | 141 | #ifndef __ASSEMBLY__ |
@@ -318,7 +320,7 @@ enum { | |||
318 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | | 320 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | |
319 | CPU_FTR_MMCRA | CPU_FTR_SMT | | 321 | CPU_FTR_MMCRA | CPU_FTR_SMT | |
320 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | | 322 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | |
321 | CPU_FTR_MMCRA_SIHV, | 323 | CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR, |
322 | CPU_FTRS_CELL = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | | 324 | CPU_FTRS_CELL = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | |
323 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | | 325 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | |
324 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | | 326 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | |
diff --git a/include/asm-powerpc/cputime.h b/include/asm-powerpc/cputime.h index 6d68ad7e0ea3..a21185d47883 100644 --- a/include/asm-powerpc/cputime.h +++ b/include/asm-powerpc/cputime.h | |||
@@ -1 +1,203 @@ | |||
1 | /* | ||
2 | * Definitions for measuring cputime on powerpc machines. | ||
3 | * | ||
4 | * Copyright (C) 2006 Paul Mackerras, IBM Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * If we have CONFIG_VIRT_CPU_ACCOUNTING, we measure cpu time in | ||
12 | * the same units as the timebase. Otherwise we measure cpu time | ||
13 | * in jiffies using the generic definitions. | ||
14 | */ | ||
15 | |||
16 | #ifndef __POWERPC_CPUTIME_H | ||
17 | #define __POWERPC_CPUTIME_H | ||
18 | |||
19 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
1 | #include <asm-generic/cputime.h> | 20 | #include <asm-generic/cputime.h> |
21 | #else | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | #include <linux/time.h> | ||
25 | #include <asm/div64.h> | ||
26 | #include <asm/time.h> | ||
27 | #include <asm/param.h> | ||
28 | |||
29 | typedef u64 cputime_t; | ||
30 | typedef u64 cputime64_t; | ||
31 | |||
32 | #define cputime_zero ((cputime_t)0) | ||
33 | #define cputime_max ((~((cputime_t)0) >> 1) - 1) | ||
34 | #define cputime_add(__a, __b) ((__a) + (__b)) | ||
35 | #define cputime_sub(__a, __b) ((__a) - (__b)) | ||
36 | #define cputime_div(__a, __n) ((__a) / (__n)) | ||
37 | #define cputime_halve(__a) ((__a) >> 1) | ||
38 | #define cputime_eq(__a, __b) ((__a) == (__b)) | ||
39 | #define cputime_gt(__a, __b) ((__a) > (__b)) | ||
40 | #define cputime_ge(__a, __b) ((__a) >= (__b)) | ||
41 | #define cputime_lt(__a, __b) ((__a) < (__b)) | ||
42 | #define cputime_le(__a, __b) ((__a) <= (__b)) | ||
43 | |||
44 | #define cputime64_zero ((cputime64_t)0) | ||
45 | #define cputime64_add(__a, __b) ((__a) + (__b)) | ||
46 | #define cputime_to_cputime64(__ct) (__ct) | ||
47 | |||
48 | #ifdef __KERNEL__ | ||
49 | |||
50 | /* | ||
51 | * Convert cputime <-> jiffies | ||
52 | */ | ||
53 | extern u64 __cputime_jiffies_factor; | ||
54 | |||
55 | static inline unsigned long cputime_to_jiffies(const cputime_t ct) | ||
56 | { | ||
57 | return mulhdu(ct, __cputime_jiffies_factor); | ||
58 | } | ||
59 | |||
60 | static inline cputime_t jiffies_to_cputime(const unsigned long jif) | ||
61 | { | ||
62 | cputime_t ct; | ||
63 | unsigned long sec; | ||
64 | |||
65 | /* have to be a little careful about overflow */ | ||
66 | ct = jif % HZ; | ||
67 | sec = jif / HZ; | ||
68 | if (ct) { | ||
69 | ct *= tb_ticks_per_sec; | ||
70 | do_div(ct, HZ); | ||
71 | } | ||
72 | if (sec) | ||
73 | ct += (cputime_t) sec * tb_ticks_per_sec; | ||
74 | return ct; | ||
75 | } | ||
76 | |||
77 | static inline u64 cputime64_to_jiffies64(const cputime_t ct) | ||
78 | { | ||
79 | return mulhdu(ct, __cputime_jiffies_factor); | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * Convert cputime <-> milliseconds | ||
84 | */ | ||
85 | extern u64 __cputime_msec_factor; | ||
86 | |||
87 | static inline unsigned long cputime_to_msecs(const cputime_t ct) | ||
88 | { | ||
89 | return mulhdu(ct, __cputime_msec_factor); | ||
90 | } | ||
91 | |||
92 | static inline cputime_t msecs_to_cputime(const unsigned long ms) | ||
93 | { | ||
94 | cputime_t ct; | ||
95 | unsigned long sec; | ||
96 | |||
97 | /* have to be a little careful about overflow */ | ||
98 | ct = ms % 1000; | ||
99 | sec = ms / 1000; | ||
100 | if (ct) { | ||
101 | ct *= tb_ticks_per_sec; | ||
102 | do_div(ct, 1000); | ||
103 | } | ||
104 | if (sec) | ||
105 | ct += (cputime_t) sec * tb_ticks_per_sec; | ||
106 | return ct; | ||
107 | } | ||
108 | |||
109 | /* | ||
110 | * Convert cputime <-> seconds | ||
111 | */ | ||
112 | extern u64 __cputime_sec_factor; | ||
113 | |||
114 | static inline unsigned long cputime_to_secs(const cputime_t ct) | ||
115 | { | ||
116 | return mulhdu(ct, __cputime_sec_factor); | ||
117 | } | ||
118 | |||
119 | static inline cputime_t secs_to_cputime(const unsigned long sec) | ||
120 | { | ||
121 | return (cputime_t) sec * tb_ticks_per_sec; | ||
122 | } | ||
123 | |||
124 | /* | ||
125 | * Convert cputime <-> timespec | ||
126 | */ | ||
127 | static inline void cputime_to_timespec(const cputime_t ct, struct timespec *p) | ||
128 | { | ||
129 | u64 x = ct; | ||
130 | unsigned int frac; | ||
131 | |||
132 | frac = do_div(x, tb_ticks_per_sec); | ||
133 | p->tv_sec = x; | ||
134 | x = (u64) frac * 1000000000; | ||
135 | do_div(x, tb_ticks_per_sec); | ||
136 | p->tv_nsec = x; | ||
137 | } | ||
138 | |||
139 | static inline cputime_t timespec_to_cputime(const struct timespec *p) | ||
140 | { | ||
141 | cputime_t ct; | ||
142 | |||
143 | ct = (u64) p->tv_nsec * tb_ticks_per_sec; | ||
144 | do_div(ct, 1000000000); | ||
145 | return ct + (u64) p->tv_sec * tb_ticks_per_sec; | ||
146 | } | ||
147 | |||
148 | /* | ||
149 | * Convert cputime <-> timeval | ||
150 | */ | ||
151 | static inline void cputime_to_timeval(const cputime_t ct, struct timeval *p) | ||
152 | { | ||
153 | u64 x = ct; | ||
154 | unsigned int frac; | ||
155 | |||
156 | frac = do_div(x, tb_ticks_per_sec); | ||
157 | p->tv_sec = x; | ||
158 | x = (u64) frac * 1000000; | ||
159 | do_div(x, tb_ticks_per_sec); | ||
160 | p->tv_usec = x; | ||
161 | } | ||
162 | |||
163 | static inline cputime_t timeval_to_cputime(const struct timeval *p) | ||
164 | { | ||
165 | cputime_t ct; | ||
166 | |||
167 | ct = (u64) p->tv_usec * tb_ticks_per_sec; | ||
168 | do_div(ct, 1000000); | ||
169 | return ct + (u64) p->tv_sec * tb_ticks_per_sec; | ||
170 | } | ||
171 | |||
172 | /* | ||
173 | * Convert cputime <-> clock_t (units of 1/USER_HZ seconds) | ||
174 | */ | ||
175 | extern u64 __cputime_clockt_factor; | ||
176 | |||
177 | static inline unsigned long cputime_to_clock_t(const cputime_t ct) | ||
178 | { | ||
179 | return mulhdu(ct, __cputime_clockt_factor); | ||
180 | } | ||
181 | |||
182 | static inline cputime_t clock_t_to_cputime(const unsigned long clk) | ||
183 | { | ||
184 | cputime_t ct; | ||
185 | unsigned long sec; | ||
186 | |||
187 | /* have to be a little careful about overflow */ | ||
188 | ct = clk % USER_HZ; | ||
189 | sec = clk / USER_HZ; | ||
190 | if (ct) { | ||
191 | ct *= tb_ticks_per_sec; | ||
192 | do_div(ct, USER_HZ); | ||
193 | } | ||
194 | if (sec) | ||
195 | ct += (cputime_t) sec * tb_ticks_per_sec; | ||
196 | return ct; | ||
197 | } | ||
198 | |||
199 | #define cputime64_to_clock_t(ct) cputime_to_clock_t((cputime_t)(ct)) | ||
200 | |||
201 | #endif /* __KERNEL__ */ | ||
202 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING */ | ||
203 | #endif /* __POWERPC_CPUTIME_H */ | ||
diff --git a/include/asm-powerpc/firmware.h b/include/asm-powerpc/firmware.h index f804b34cf06a..ce3788224ed0 100644 --- a/include/asm-powerpc/firmware.h +++ b/include/asm-powerpc/firmware.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #define FW_FEATURE_MULTITCE (1UL<<19) | 41 | #define FW_FEATURE_MULTITCE (1UL<<19) |
42 | #define FW_FEATURE_SPLPAR (1UL<<20) | 42 | #define FW_FEATURE_SPLPAR (1UL<<20) |
43 | #define FW_FEATURE_ISERIES (1UL<<21) | 43 | #define FW_FEATURE_ISERIES (1UL<<21) |
44 | #define FW_FEATURE_LPAR (1UL<<22) | ||
44 | 45 | ||
45 | enum { | 46 | enum { |
46 | #ifdef CONFIG_PPC64 | 47 | #ifdef CONFIG_PPC64 |
@@ -51,10 +52,10 @@ enum { | |||
51 | FW_FEATURE_MIGRATE | FW_FEATURE_PERFMON | FW_FEATURE_CRQ | | 52 | FW_FEATURE_MIGRATE | FW_FEATURE_PERFMON | FW_FEATURE_CRQ | |
52 | FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN | | 53 | FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN | |
53 | FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE | | 54 | FW_FEATURE_BULK | FW_FEATURE_XDABR | FW_FEATURE_MULTITCE | |
54 | FW_FEATURE_SPLPAR, | 55 | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR, |
55 | FW_FEATURE_PSERIES_ALWAYS = 0, | 56 | FW_FEATURE_PSERIES_ALWAYS = 0, |
56 | FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES, | 57 | FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, |
57 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES, | 58 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, |
58 | FW_FEATURE_POSSIBLE = | 59 | FW_FEATURE_POSSIBLE = |
59 | #ifdef CONFIG_PPC_PSERIES | 60 | #ifdef CONFIG_PPC_PSERIES |
60 | FW_FEATURE_PSERIES_POSSIBLE | | 61 | FW_FEATURE_PSERIES_POSSIBLE | |
@@ -89,15 +90,6 @@ static inline unsigned long firmware_has_feature(unsigned long feature) | |||
89 | (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature); | 90 | (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature); |
90 | } | 91 | } |
91 | 92 | ||
92 | #ifdef CONFIG_PPC_PSERIES | ||
93 | typedef struct { | ||
94 | unsigned long val; | ||
95 | char * name; | ||
96 | } firmware_feature_t; | ||
97 | |||
98 | extern firmware_feature_t firmware_features_table[]; | ||
99 | #endif | ||
100 | |||
101 | extern void system_reset_fwnmi(void); | 93 | extern void system_reset_fwnmi(void); |
102 | extern void machine_check_fwnmi(void); | 94 | extern void machine_check_fwnmi(void); |
103 | 95 | ||
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 8eb7e857ec4c..51f87d9993b6 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -479,6 +479,10 @@ extern int distribute_irqs; | |||
479 | struct irqaction; | 479 | struct irqaction; |
480 | struct pt_regs; | 480 | struct pt_regs; |
481 | 481 | ||
482 | #define __ARCH_HAS_DO_SOFTIRQ | ||
483 | |||
484 | extern void __do_softirq(void); | ||
485 | |||
482 | #ifdef CONFIG_IRQSTACKS | 486 | #ifdef CONFIG_IRQSTACKS |
483 | /* | 487 | /* |
484 | * Per-cpu stacks for handling hard and soft interrupts. | 488 | * Per-cpu stacks for handling hard and soft interrupts. |
@@ -491,8 +495,6 @@ extern void call_do_softirq(struct thread_info *tp); | |||
491 | extern int call___do_IRQ(int irq, struct pt_regs *regs, | 495 | extern int call___do_IRQ(int irq, struct pt_regs *regs, |
492 | struct thread_info *tp); | 496 | struct thread_info *tp); |
493 | 497 | ||
494 | #define __ARCH_HAS_DO_SOFTIRQ | ||
495 | |||
496 | #else | 498 | #else |
497 | #define irq_ctx_init() | 499 | #define irq_ctx_init() |
498 | 500 | ||
diff --git a/include/asm-powerpc/iseries/mf.h b/include/asm-powerpc/iseries/mf.h index 857e5202fc78..eb851a9c9e5c 100644 --- a/include/asm-powerpc/iseries/mf.h +++ b/include/asm-powerpc/iseries/mf.h | |||
@@ -41,16 +41,11 @@ extern void mf_deallocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type, | |||
41 | unsigned count, MFCompleteHandler hdlr, void *userToken); | 41 | unsigned count, MFCompleteHandler hdlr, void *userToken); |
42 | 42 | ||
43 | extern void mf_power_off(void); | 43 | extern void mf_power_off(void); |
44 | extern void mf_reboot(void); | 44 | extern void mf_reboot(char *cmd); |
45 | 45 | ||
46 | extern void mf_display_src(u32 word); | 46 | extern void mf_display_src(u32 word); |
47 | extern void mf_display_progress(u16 value); | 47 | extern void mf_display_progress(u16 value); |
48 | extern void mf_clear_src(void); | ||
49 | 48 | ||
50 | extern void mf_init(void); | 49 | extern void mf_init(void); |
51 | 50 | ||
52 | extern int mf_get_rtc(struct rtc_time *tm); | ||
53 | extern int mf_get_boot_rtc(struct rtc_time *tm); | ||
54 | extern int mf_set_rtc(struct rtc_time *tm); | ||
55 | |||
56 | #endif /* _ASM_POWERPC_ISERIES_MF_H */ | 51 | #endif /* _ASM_POWERPC_ISERIES_MF_H */ |
diff --git a/include/asm-powerpc/lmb.h b/include/asm-powerpc/lmb.h index d3546c4c9f46..0c5880f70225 100644 --- a/include/asm-powerpc/lmb.h +++ b/include/asm-powerpc/lmb.h | |||
@@ -19,8 +19,6 @@ | |||
19 | 19 | ||
20 | #define MAX_LMB_REGIONS 128 | 20 | #define MAX_LMB_REGIONS 128 |
21 | 21 | ||
22 | #define LMB_ALLOC_ANYWHERE 0 | ||
23 | |||
24 | struct lmb_property { | 22 | struct lmb_property { |
25 | unsigned long base; | 23 | unsigned long base; |
26 | unsigned long size; | 24 | unsigned long size; |
@@ -43,20 +41,19 @@ extern struct lmb lmb; | |||
43 | 41 | ||
44 | extern void __init lmb_init(void); | 42 | extern void __init lmb_init(void); |
45 | extern void __init lmb_analyze(void); | 43 | extern void __init lmb_analyze(void); |
46 | extern long __init lmb_add(unsigned long, unsigned long); | 44 | extern long __init lmb_add(unsigned long base, unsigned long size); |
47 | extern long __init lmb_reserve(unsigned long, unsigned long); | 45 | extern long __init lmb_reserve(unsigned long base, unsigned long size); |
48 | extern unsigned long __init lmb_alloc(unsigned long, unsigned long); | 46 | extern unsigned long __init lmb_alloc(unsigned long size, unsigned long align); |
49 | extern unsigned long __init lmb_alloc_base(unsigned long, unsigned long, | 47 | extern unsigned long __init lmb_alloc_base(unsigned long size, |
50 | unsigned long); | 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); | 51 | extern unsigned long __init lmb_phys_mem_size(void); |
52 | extern unsigned long __init lmb_end_of_DRAM(void); | 52 | extern unsigned long __init lmb_end_of_DRAM(void); |
53 | extern unsigned long __init lmb_abs_to_phys(unsigned long); | 53 | extern void __init lmb_enforce_memory_limit(unsigned long memory_limit); |
54 | extern void __init lmb_enforce_memory_limit(unsigned long); | ||
55 | 54 | ||
56 | extern void lmb_dump_all(void); | 55 | extern void lmb_dump_all(void); |
57 | 56 | ||
58 | extern unsigned long io_hole_start; | ||
59 | |||
60 | static inline unsigned long | 57 | static inline unsigned long |
61 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | 58 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) |
62 | { | 59 | { |
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index b0b9a3f8cdc2..31f721994bd8 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -236,7 +236,6 @@ extern void htab_initialize_secondary(void); | |||
236 | extern void hpte_init_native(void); | 236 | extern void hpte_init_native(void); |
237 | extern void hpte_init_lpar(void); | 237 | extern void hpte_init_lpar(void); |
238 | extern void hpte_init_iSeries(void); | 238 | extern void hpte_init_iSeries(void); |
239 | extern void mm_init_ppc64(void); | ||
240 | 239 | ||
241 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | 240 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, |
242 | unsigned long va, unsigned long prpn, | 241 | unsigned long va, unsigned long prpn, |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index c9add8f1ad94..4465b95ebef0 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -54,7 +54,7 @@ struct paca_struct { | |||
54 | #endif /* CONFIG_PPC_ISERIES */ | 54 | #endif /* CONFIG_PPC_ISERIES */ |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c | 57 | * MAGIC: the spinlock functions in arch/powerpc/lib/locks.c |
58 | * load lock_token and paca_index with a single lwz | 58 | * load lock_token and paca_index with a single lwz |
59 | * instruction. They must travel together and be properly | 59 | * instruction. They must travel together and be properly |
60 | * aligned. | 60 | * aligned. |
@@ -96,6 +96,11 @@ struct paca_struct { | |||
96 | u64 saved_r1; /* r1 save for RTAS calls */ | 96 | u64 saved_r1; /* r1 save for RTAS calls */ |
97 | u64 saved_msr; /* MSR saved here by enter_rtas */ | 97 | u64 saved_msr; /* MSR saved here by enter_rtas */ |
98 | u8 proc_enabled; /* irq soft-enable flag */ | 98 | u8 proc_enabled; /* irq soft-enable flag */ |
99 | |||
100 | /* Stuff for accurate time accounting */ | ||
101 | u64 user_time; /* accumulated usermode TB ticks */ | ||
102 | u64 system_time; /* accumulated system TB ticks */ | ||
103 | u64 startpurr; /* PURR/TB value snapshot */ | ||
99 | }; | 104 | }; |
100 | 105 | ||
101 | extern struct paca_struct paca[]; | 106 | extern struct paca_struct paca[]; |
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index 80a7832d2721..b2e18629932a 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -62,9 +62,14 @@ | |||
62 | /* shift to put page number into pte */ | 62 | /* shift to put page number into pte */ |
63 | #define PTE_RPN_SHIFT (17) | 63 | #define PTE_RPN_SHIFT (17) |
64 | 64 | ||
65 | #define __real_pte(e,p) ((real_pte_t)(e)) | 65 | #ifdef STRICT_MM_TYPECHECKS |
66 | #define __rpte_to_pte(r) (r) | 66 | #define __real_pte(e,p) ((real_pte_t){(e)}) |
67 | #define __rpte_to_hidx(r,index) (pte_val((r)) >> 12) | 67 | #define __rpte_to_pte(r) ((r).pte) |
68 | #else | ||
69 | #define __real_pte(e,p) (e) | ||
70 | #define __rpte_to_pte(r) (__pte(r)) | ||
71 | #endif | ||
72 | #define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> 12) | ||
68 | 73 | ||
69 | #define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \ | 74 | #define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \ |
70 | do { \ | 75 | do { \ |
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index 185ee15963a1..e9f1f4627e6b 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h | |||
@@ -188,9 +188,13 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) | |||
188 | #define pte_pfn(x) ((unsigned long)((pte_val(x)>>PTE_RPN_SHIFT))) | 188 | #define pte_pfn(x) ((unsigned long)((pte_val(x)>>PTE_RPN_SHIFT))) |
189 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 189 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
190 | 190 | ||
191 | #define PMD_BAD_BITS (PTE_TABLE_SIZE-1) | ||
192 | #define PUD_BAD_BITS (PMD_TABLE_SIZE-1) | ||
193 | |||
191 | #define pmd_set(pmdp, pmdval) (pmd_val(*(pmdp)) = (pmdval)) | 194 | #define pmd_set(pmdp, pmdval) (pmd_val(*(pmdp)) = (pmdval)) |
192 | #define pmd_none(pmd) (!pmd_val(pmd)) | 195 | #define pmd_none(pmd) (!pmd_val(pmd)) |
193 | #define pmd_bad(pmd) (pmd_val(pmd) == 0) | 196 | #define pmd_bad(pmd) (!is_kernel_addr(pmd_val(pmd)) \ |
197 | || (pmd_val(pmd) & PMD_BAD_BITS)) | ||
194 | #define pmd_present(pmd) (pmd_val(pmd) != 0) | 198 | #define pmd_present(pmd) (pmd_val(pmd) != 0) |
195 | #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0) | 199 | #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0) |
196 | #define pmd_page_kernel(pmd) (pmd_val(pmd) & ~PMD_MASKED_BITS) | 200 | #define pmd_page_kernel(pmd) (pmd_val(pmd) & ~PMD_MASKED_BITS) |
@@ -198,7 +202,8 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) | |||
198 | 202 | ||
199 | #define pud_set(pudp, pudval) (pud_val(*(pudp)) = (pudval)) | 203 | #define pud_set(pudp, pudval) (pud_val(*(pudp)) = (pudval)) |
200 | #define pud_none(pud) (!pud_val(pud)) | 204 | #define pud_none(pud) (!pud_val(pud)) |
201 | #define pud_bad(pud) ((pud_val(pud)) == 0) | 205 | #define pud_bad(pud) (!is_kernel_addr(pud_val(pud)) \ |
206 | || (pud_val(pud) & PUD_BAD_BITS)) | ||
202 | #define pud_present(pud) (pud_val(pud) != 0) | 207 | #define pud_present(pud) (pud_val(pud) != 0) |
203 | #define pud_clear(pudp) (pud_val(*(pudp)) = 0) | 208 | #define pud_clear(pudp) (pud_val(*(pudp)) = 0) |
204 | #define pud_page(pud) (pud_val(pud) & ~PUD_MASKED_BITS) | 209 | #define pud_page(pud) (pud_val(pud) & ~PUD_MASKED_BITS) |
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index ab8688d39024..dd1c0a913d5f 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h | |||
@@ -15,6 +15,48 @@ | |||
15 | #define SZL (BITS_PER_LONG/8) | 15 | #define SZL (BITS_PER_LONG/8) |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Stuff for accurate CPU time accounting. | ||
19 | * These macros handle transitions between user and system state | ||
20 | * in exception entry and exit and accumulate time to the | ||
21 | * user_time and system_time fields in the paca. | ||
22 | */ | ||
23 | |||
24 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
25 | #define ACCOUNT_CPU_USER_ENTRY(ra, rb) | ||
26 | #define ACCOUNT_CPU_USER_EXIT(ra, rb) | ||
27 | #else | ||
28 | #define ACCOUNT_CPU_USER_ENTRY(ra, rb) \ | ||
29 | beq 2f; /* if from kernel mode */ \ | ||
30 | BEGIN_FTR_SECTION; \ | ||
31 | mfspr ra,SPRN_PURR; /* get processor util. reg */ \ | ||
32 | END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ | ||
33 | BEGIN_FTR_SECTION; \ | ||
34 | mftb ra; /* or get TB if no PURR */ \ | ||
35 | END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ | ||
36 | ld rb,PACA_STARTPURR(r13); \ | ||
37 | std ra,PACA_STARTPURR(r13); \ | ||
38 | subf rb,rb,ra; /* subtract start value */ \ | ||
39 | ld ra,PACA_USER_TIME(r13); \ | ||
40 | add ra,ra,rb; /* add on to user time */ \ | ||
41 | std ra,PACA_USER_TIME(r13); \ | ||
42 | 2: | ||
43 | |||
44 | #define ACCOUNT_CPU_USER_EXIT(ra, rb) \ | ||
45 | BEGIN_FTR_SECTION; \ | ||
46 | mfspr ra,SPRN_PURR; /* get processor util. reg */ \ | ||
47 | END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ | ||
48 | BEGIN_FTR_SECTION; \ | ||
49 | mftb ra; /* or get TB if no PURR */ \ | ||
50 | END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ | ||
51 | ld rb,PACA_STARTPURR(r13); \ | ||
52 | std ra,PACA_STARTPURR(r13); \ | ||
53 | subf rb,rb,ra; /* subtract start value */ \ | ||
54 | ld ra,PACA_SYSTEM_TIME(r13); \ | ||
55 | add ra,ra,rb; /* add on to user time */ \ | ||
56 | std ra,PACA_SYSTEM_TIME(r13); | ||
57 | #endif | ||
58 | |||
59 | /* | ||
18 | * Macros for storing registers into and loading registers from | 60 | * Macros for storing registers into and loading registers from |
19 | * exception frames. | 61 | * exception frames. |
20 | */ | 62 | */ |
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index 415fa393b00c..1c64a211cf19 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -52,7 +52,6 @@ | |||
52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
53 | #define platform_is_pseries() (_machine == PLATFORM_PSERIES || \ | 53 | #define platform_is_pseries() (_machine == PLATFORM_PSERIES || \ |
54 | _machine == PLATFORM_PSERIES_LPAR) | 54 | _machine == PLATFORM_PSERIES_LPAR) |
55 | #define platform_is_lpar() (!!(_machine & PLATFORM_LPAR)) | ||
56 | 55 | ||
57 | #if defined(CONFIG_PPC_MULTIPLATFORM) | 56 | #if defined(CONFIG_PPC_MULTIPLATFORM) |
58 | extern int _machine; | 57 | extern int _machine; |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index cbd297f44cce..782e13a070a1 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -126,8 +126,14 @@ extern struct device_node *find_all_nodes(void); | |||
126 | /* New style node lookup */ | 126 | /* New style node lookup */ |
127 | extern struct device_node *of_find_node_by_name(struct device_node *from, | 127 | extern struct device_node *of_find_node_by_name(struct device_node *from, |
128 | const char *name); | 128 | const char *name); |
129 | #define for_each_node_by_name(dn, name) \ | ||
130 | for (dn = of_find_node_by_name(NULL, name); dn; \ | ||
131 | dn = of_find_node_by_name(dn, name)) | ||
129 | extern struct device_node *of_find_node_by_type(struct device_node *from, | 132 | extern struct device_node *of_find_node_by_type(struct device_node *from, |
130 | const char *type); | 133 | const char *type); |
134 | #define for_each_node_by_type(dn, type) \ | ||
135 | for (dn = of_find_node_by_type(NULL, type); dn; \ | ||
136 | dn = of_find_node_by_type(dn, type)) | ||
131 | extern struct device_node *of_find_compatible_node(struct device_node *from, | 137 | extern struct device_node *of_find_compatible_node(struct device_node *from, |
132 | const char *type, const char *compat); | 138 | const char *type, const char *compat); |
133 | extern struct device_node *of_find_node_by_path(const char *path); | 139 | extern struct device_node *of_find_node_by_path(const char *path); |
diff --git a/include/asm-powerpc/rwsem.h b/include/asm-powerpc/rwsem.h index 79bae4933b73..2c2fe9647595 100644 --- a/include/asm-powerpc/rwsem.h +++ b/include/asm-powerpc/rwsem.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | /* | 6 | /* |
7 | * include/asm-ppc64/rwsem.h: R/W semaphores for PPC using the stuff | 7 | * include/asm-powerpc/rwsem.h: R/W semaphores for PPC using the stuff |
8 | * in lib/rwsem.c. Adapted largely from include/asm-i386/rwsem.h | 8 | * in lib/rwsem.c. Adapted largely from include/asm-i386/rwsem.h |
9 | * by Paul Mackerras <paulus@samba.org>. | 9 | * by Paul Mackerras <paulus@samba.org>. |
10 | */ | 10 | */ |
diff --git a/include/asm-powerpc/synch.h b/include/asm-powerpc/synch.h index c90d9d9aae72..2cda3c38a9fa 100644 --- a/include/asm-powerpc/synch.h +++ b/include/asm-powerpc/synch.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #ifdef CONFIG_SMP | 17 | #ifdef CONFIG_SMP |
18 | #define ISYNC_ON_SMP "\n\tisync" | 18 | #define ISYNC_ON_SMP "\n\tisync\n" |
19 | #define LWSYNC_ON_SMP __stringify(LWSYNC) "\n" | 19 | #define LWSYNC_ON_SMP __stringify(LWSYNC) "\n" |
20 | #else | 20 | #else |
21 | #define ISYNC_ON_SMP | 21 | #define ISYNC_ON_SMP |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index d9bf53653b10..65f5a7b2646b 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -171,6 +171,8 @@ extern u32 booke_wdt_period; | |||
171 | 171 | ||
172 | /* EBCDIC -> ASCII conversion for [0-9A-Z] on iSeries */ | 172 | /* EBCDIC -> ASCII conversion for [0-9A-Z] on iSeries */ |
173 | extern unsigned char e2a(unsigned char); | 173 | extern unsigned char e2a(unsigned char); |
174 | extern unsigned char* strne2a(unsigned char *dest, | ||
175 | const unsigned char *src, size_t n); | ||
174 | 176 | ||
175 | struct device_node; | 177 | struct device_node; |
176 | extern void note_scsi_host(struct device_node *, void *); | 178 | extern void note_scsi_host(struct device_node *, void *); |
@@ -424,5 +426,9 @@ static inline void create_function_call(unsigned long addr, void * func) | |||
424 | create_branch(addr, func_addr, BRANCH_SET_LINK); | 426 | create_branch(addr, func_addr, BRANCH_SET_LINK); |
425 | } | 427 | } |
426 | 428 | ||
429 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
430 | extern void account_system_vtime(struct task_struct *); | ||
431 | #endif | ||
432 | |||
427 | #endif /* __KERNEL__ */ | 433 | #endif /* __KERNEL__ */ |
428 | #endif /* _ASM_POWERPC_SYSTEM_H */ | 434 | #endif /* _ASM_POWERPC_SYSTEM_H */ |
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index baddc9ab57ad..912118db13ae 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -41,6 +41,7 @@ extern time_t last_rtc_update; | |||
41 | 41 | ||
42 | extern void generic_calibrate_decr(void); | 42 | extern void generic_calibrate_decr(void); |
43 | extern void wakeup_decrementer(void); | 43 | extern void wakeup_decrementer(void); |
44 | extern void snapshot_timebase(void); | ||
44 | 45 | ||
45 | /* Some sane defaults: 125 MHz timebase, 1GHz processor */ | 46 | /* Some sane defaults: 125 MHz timebase, 1GHz processor */ |
46 | extern unsigned long ppc_proc_freq; | 47 | extern unsigned long ppc_proc_freq; |
@@ -221,5 +222,19 @@ struct cpu_usage { | |||
221 | 222 | ||
222 | DECLARE_PER_CPU(struct cpu_usage, cpu_usage_array); | 223 | DECLARE_PER_CPU(struct cpu_usage, cpu_usage_array); |
223 | 224 | ||
225 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
226 | extern void account_process_vtime(struct task_struct *tsk); | ||
227 | #else | ||
228 | #define account_process_vtime(tsk) do { } while (0) | ||
229 | #endif | ||
230 | |||
231 | #if defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR) | ||
232 | extern void calculate_steal_time(void); | ||
233 | extern void snapshot_timebases(void); | ||
234 | #else | ||
235 | #define calculate_steal_time() do { } while (0) | ||
236 | #define snapshot_timebases() do { } while (0) | ||
237 | #endif | ||
238 | |||
224 | #endif /* __KERNEL__ */ | 239 | #endif /* __KERNEL__ */ |
225 | #endif /* __PPC64_TIME_H */ | 240 | #endif /* __PPC64_TIME_H */ |
diff --git a/include/asm-ppc/harrier.h b/include/asm-ppc/harrier.h index 36c73ab7e43e..7acd7fc126ec 100644 --- a/include/asm-ppc/harrier.h +++ b/include/asm-ppc/harrier.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/harrier.h | ||
3 | * | ||
4 | * Definitions for Motorola MCG Harrier North Bridge & Memory controller | 2 | * Definitions for Motorola MCG Harrier North Bridge & Memory controller |
5 | * | 3 | * |
6 | * Author: Dale Farnsworth | 4 | * Author: Dale Farnsworth |
diff --git a/include/asm-ppc/ibm44x.h b/include/asm-ppc/ibm44x.h index f835066fb3ca..3acc382cc83f 100644 --- a/include/asm-ppc/ibm44x.h +++ b/include/asm-ppc/ibm44x.h | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | /* TLB entry offset/size used for pinning kernel lowmem */ | 30 | /* TLB entry offset/size used for pinning kernel lowmem */ |
31 | #define PPC44x_PIN_SHIFT 28 | 31 | #define PPC44x_PIN_SHIFT 28 |
32 | #define PPC44x_PIN_SIZE (1 << PPC44x_PIN_SHIFT) | 32 | #define PPC_PIN_SIZE (1 << PPC44x_PIN_SHIFT) |
33 | 33 | ||
34 | /* Lowest TLB slot consumed by the default pinned TLBs */ | 34 | /* Lowest TLB slot consumed by the default pinned TLBs */ |
35 | #define PPC44x_LOW_SLOT 63 | 35 | #define PPC44x_LOW_SLOT 63 |
diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index 6c28ae7807f4..38f99710752b 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h | |||
@@ -51,6 +51,10 @@ | |||
51 | #include <platforms/4xx/xilinx_ml300.h> | 51 | #include <platforms/4xx/xilinx_ml300.h> |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #if defined(CONFIG_XILINX_ML403) | ||
55 | #include <platforms/4xx/xilinx_ml403.h> | ||
56 | #endif | ||
57 | |||
54 | #ifndef __ASSEMBLY__ | 58 | #ifndef __ASSEMBLY__ |
55 | 59 | ||
56 | #ifdef CONFIG_40x | 60 | #ifdef CONFIG_40x |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index df9cf6ed189d..b919d8fb7d98 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -575,4 +575,11 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
575 | */ | 575 | */ |
576 | #define xlate_dev_kmem_ptr(p) p | 576 | #define xlate_dev_kmem_ptr(p) p |
577 | 577 | ||
578 | /* access ports */ | ||
579 | #define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) | (_v)) | ||
580 | #define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v)) | ||
581 | |||
582 | #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) | ||
583 | #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) | ||
584 | |||
578 | #endif /* __KERNEL__ */ | 585 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/mpc10x.h b/include/asm-ppc/mpc10x.h index 77b1e092c206..b30a6a3b5bd2 100644 --- a/include/asm-ppc/mpc10x.h +++ b/include/asm-ppc/mpc10x.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/mpc10x.h | ||
3 | * | ||
4 | * Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem | 2 | * Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem |
5 | * ctlr/EPIC/etc. | 3 | * ctlr/EPIC/etc. |
6 | * | 4 | * |
@@ -165,6 +163,7 @@ enum ppc_sys_devices { | |||
165 | MPC10X_DMA1, | 163 | MPC10X_DMA1, |
166 | MPC10X_UART0, | 164 | MPC10X_UART0, |
167 | MPC10X_UART1, | 165 | MPC10X_UART1, |
166 | NUM_PPC_SYS_DEVS, | ||
168 | }; | 167 | }; |
169 | 168 | ||
170 | int mpc10x_bridge_init(struct pci_controller *hose, | 169 | int mpc10x_bridge_init(struct pci_controller *hose, |
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h index a055e0756b9d..6167f74635f7 100644 --- a/include/asm-ppc/mpc52xx.h +++ b/include/asm-ppc/mpc52xx.h | |||
@@ -60,6 +60,7 @@ enum ppc_sys_devices { | |||
60 | MPC52xx_ATA, | 60 | MPC52xx_ATA, |
61 | MPC52xx_I2C1, | 61 | MPC52xx_I2C1, |
62 | MPC52xx_I2C2, | 62 | MPC52xx_I2C2, |
63 | NUM_PPC_SYS_DEVS, | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | 66 | ||
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index 321452695039..6ba69a86b9dd 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h | |||
@@ -83,6 +83,7 @@ enum ppc_sys_devices { | |||
83 | MPC82xx_CPM_SMC2, | 83 | MPC82xx_CPM_SMC2, |
84 | MPC82xx_CPM_USB, | 84 | MPC82xx_CPM_USB, |
85 | MPC82xx_SEC1, | 85 | MPC82xx_SEC1, |
86 | NUM_PPC_SYS_DEVS, | ||
86 | }; | 87 | }; |
87 | 88 | ||
88 | #ifndef __ASSEMBLY__ | 89 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h index 7cdf60fa69b6..3c23fc43bfbc 100644 --- a/include/asm-ppc/mpc83xx.h +++ b/include/asm-ppc/mpc83xx.h | |||
@@ -108,6 +108,7 @@ enum ppc_sys_devices { | |||
108 | MPC83xx_USB2_DR, | 108 | MPC83xx_USB2_DR, |
109 | MPC83xx_USB2_MPH, | 109 | MPC83xx_USB2_MPH, |
110 | MPC83xx_MDIO, | 110 | MPC83xx_MDIO, |
111 | NUM_PPC_SYS_DEVS, | ||
111 | }; | 112 | }; |
112 | 113 | ||
113 | #endif /* CONFIG_83xx */ | 114 | #endif /* CONFIG_83xx */ |
diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h index c8a96aa44fb7..f47002a60edf 100644 --- a/include/asm-ppc/mpc85xx.h +++ b/include/asm-ppc/mpc85xx.h | |||
@@ -139,6 +139,7 @@ enum ppc_sys_devices { | |||
139 | MPC85xx_eTSEC4, | 139 | MPC85xx_eTSEC4, |
140 | MPC85xx_IIC2, | 140 | MPC85xx_IIC2, |
141 | MPC85xx_MDIO, | 141 | MPC85xx_MDIO, |
142 | NUM_PPC_SYS_DEVS, | ||
142 | }; | 143 | }; |
143 | 144 | ||
144 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ | 145 | /* Internal interrupts are all Level Sensitive, and Positive Polarity */ |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index 46f159cf589e..3515a7fa6c89 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -111,8 +111,11 @@ enum ppc_sys_devices { | |||
111 | MPC8xx_CPM_SMC1, | 111 | MPC8xx_CPM_SMC1, |
112 | MPC8xx_CPM_SMC2, | 112 | MPC8xx_CPM_SMC2, |
113 | MPC8xx_CPM_USB, | 113 | MPC8xx_CPM_USB, |
114 | NUM_PPC_SYS_DEVS, | ||
114 | }; | 115 | }; |
115 | 116 | ||
117 | #define PPC_PIN_SIZE (24 * 1024 * 1024) /* 24Mbytes of data pinned */ | ||
118 | |||
116 | #ifndef BOARD_CHIP_NAME | 119 | #ifndef BOARD_CHIP_NAME |
117 | #define BOARD_CHIP_NAME "" | 120 | #define BOARD_CHIP_NAME "" |
118 | #endif | 121 | #endif |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 6d1c39e8a6af..e1c62da12e74 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/processor.h> /* For TASK_SIZE */ | 12 | #include <asm/processor.h> /* For TASK_SIZE */ |
13 | #include <asm/mmu.h> | 13 | #include <asm/mmu.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/io.h> /* For sub-arch specific PPC_PIN_SIZE */ | ||
15 | struct mm_struct; | 16 | struct mm_struct; |
16 | 17 | ||
17 | extern unsigned long va_to_phys(unsigned long address); | 18 | extern unsigned long va_to_phys(unsigned long address); |
@@ -127,9 +128,8 @@ extern unsigned long ioremap_bot, ioremap_base; | |||
127 | * of RAM. -- Cort | 128 | * of RAM. -- Cort |
128 | */ | 129 | */ |
129 | #define VMALLOC_OFFSET (0x1000000) /* 16M */ | 130 | #define VMALLOC_OFFSET (0x1000000) /* 16M */ |
130 | #ifdef CONFIG_44x | 131 | #ifdef PPC_PIN_SIZE |
131 | #include <asm/ibm44x.h> | 132 | #define VMALLOC_START (((_ALIGN((long)high_memory, PPC_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))) |
132 | #define VMALLOC_START (((_ALIGN((long)high_memory, PPC44x_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))) | ||
133 | #else | 133 | #else |
134 | #define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))) | 134 | #define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))) |
135 | #endif | 135 | #endif |
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h index 83d8c77c124d..4b94f7059ebe 100644 --- a/include/asm-ppc/ppc_sys.h +++ b/include/asm-ppc/ppc_sys.h | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <asm/mpc52xx.h> | 33 | #include <asm/mpc52xx.h> |
34 | #elif defined(CONFIG_MPC10X_BRIDGE) | 34 | #elif defined(CONFIG_MPC10X_BRIDGE) |
35 | #include <asm/mpc10x.h> | 35 | #include <asm/mpc10x.h> |
36 | #elif defined(CONFIG_XILINX_VIRTEX) | ||
37 | #include <platforms/4xx/virtex.h> | ||
36 | #else | 38 | #else |
37 | #error "need definition of ppc_sys_devices" | 39 | #error "need definition of ppc_sys_devices" |
38 | #endif | 40 | #endif |
@@ -44,9 +46,26 @@ struct ppc_sys_spec { | |||
44 | u32 value; | 46 | u32 value; |
45 | u32 num_devices; | 47 | u32 num_devices; |
46 | char *ppc_sys_name; | 48 | char *ppc_sys_name; |
49 | u8 config[NUM_PPC_SYS_DEVS]; | ||
47 | enum ppc_sys_devices *device_list; | 50 | enum ppc_sys_devices *device_list; |
48 | }; | 51 | }; |
49 | 52 | ||
53 | struct platform_notify_dev_map { | ||
54 | const char *bus_id; | ||
55 | void (*rtn)(struct platform_device * pdev, int idx); | ||
56 | }; | ||
57 | |||
58 | enum platform_device_func { | ||
59 | PPC_SYS_FUNC_DUMMY = 0, | ||
60 | PPC_SYS_FUNC_ETH = 1, | ||
61 | PPC_SYS_FUNC_UART = 2, | ||
62 | PPC_SYS_FUNC_HLDC = 3, | ||
63 | PPC_SYS_FUNC_USB = 4, | ||
64 | PPC_SYS_FUNC_IRDA = 5, | ||
65 | }; | ||
66 | |||
67 | #define PPC_SYS_CONFIG_DISABLED 1 | ||
68 | |||
50 | /* describes all specific chips and which devices they have on them */ | 69 | /* describes all specific chips and which devices they have on them */ |
51 | extern struct ppc_sys_spec ppc_sys_specs[]; | 70 | extern struct ppc_sys_spec ppc_sys_specs[]; |
52 | extern struct ppc_sys_spec *cur_ppc_sys_spec; | 71 | extern struct ppc_sys_spec *cur_ppc_sys_spec; |
@@ -72,5 +91,20 @@ extern void *ppc_sys_get_pdata(enum ppc_sys_devices dev) __init; | |||
72 | /* remove a device from the system */ | 91 | /* remove a device from the system */ |
73 | extern void ppc_sys_device_remove(enum ppc_sys_devices dev); | 92 | extern void ppc_sys_device_remove(enum ppc_sys_devices dev); |
74 | 93 | ||
94 | /* Function assignment stuff */ | ||
95 | void ppc_sys_device_initfunc(void); | ||
96 | void ppc_sys_device_setfunc(enum ppc_sys_devices dev, | ||
97 | enum platform_device_func func); | ||
98 | void ppc_sys_device_set_func_all(enum platform_device_func func); | ||
99 | |||
100 | void platform_notify_map(const struct platform_notify_dev_map *map, | ||
101 | struct device *dev); | ||
102 | |||
103 | /* Enable / disable stuff */ | ||
104 | void ppc_sys_device_disable(enum ppc_sys_devices dev); | ||
105 | void ppc_sys_device_enable(enum ppc_sys_devices dev); | ||
106 | void ppc_sys_device_enable_all(void); | ||
107 | void ppc_sys_device_disable_all(void); | ||
108 | |||
75 | #endif /* __ASM_PPC_SYS_H */ | 109 | #endif /* __ASM_PPC_SYS_H */ |
76 | #endif /* __KERNEL__ */ | 110 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h index 321fb75b5f22..c86112323c9f 100644 --- a/include/asm-ppc/time.h +++ b/include/asm-ppc/time.h | |||
@@ -153,5 +153,10 @@ extern __inline__ unsigned binary_tbl(void) { | |||
153 | ({unsigned z; asm ("mulhwu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;}) | 153 | ({unsigned z; asm ("mulhwu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;}) |
154 | 154 | ||
155 | unsigned mulhwu_scale_factor(unsigned, unsigned); | 155 | unsigned mulhwu_scale_factor(unsigned, unsigned); |
156 | |||
157 | #define account_process_vtime(tsk) do { } while (0) | ||
158 | #define calculate_steal_time() do { } while (0) | ||
159 | #define snapshot_timebases() do { } while (0) | ||
160 | |||
156 | #endif /* __ASM_TIME_H__ */ | 161 | #endif /* __ASM_TIME_H__ */ |
157 | #endif /* __KERNEL__ */ | 162 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/todc.h b/include/asm-ppc/todc.h index 84bae7d76814..937c7dbe6e5c 100644 --- a/include/asm-ppc/todc.h +++ b/include/asm-ppc/todc.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-ppc/todc.h | ||
3 | * | ||
4 | * Definitions for the M48Txx and mc146818 series of Time of day/Real Time | 2 | * Definitions for the M48Txx and mc146818 series of Time of day/Real Time |
5 | * Clock chips. | 3 | * Clock chips. |
6 | * | 4 | * |
diff --git a/include/asm-ppc/xparameters.h b/include/asm-ppc/xparameters.h deleted file mode 100644 index fe4eac629139..000000000000 --- a/include/asm-ppc/xparameters.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/xparameters.h | ||
3 | * | ||
4 | * This file includes the correct xparameters.h for the CONFIG'ed board | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2004 (c) MontaVista Software, Inc. This file is licensed under the terms | ||
10 | * of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | |||
16 | #if defined(CONFIG_XILINX_ML300) | ||
17 | #include <platforms/4xx/xparameters/xparameters_ml300.h> | ||
18 | #endif | ||
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index d7e7e637b92a..c4394abcd5e6 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -958,7 +958,7 @@ void audit_syscall_entry(struct task_struct *tsk, int arch, int major, | |||
958 | * | 958 | * |
959 | * i386 no | 959 | * i386 no |
960 | * x86_64 no | 960 | * x86_64 no |
961 | * ppc64 yes (see arch/ppc64/kernel/misc.S) | 961 | * ppc64 yes (see arch/powerpc/platforms/iseries/misc.S) |
962 | * | 962 | * |
963 | * This also happens with vm86 emulation in a non-nested manner | 963 | * This also happens with vm86 emulation in a non-nested manner |
964 | * (entries without exits), so this case must be caught. | 964 | * (entries without exits), so this case must be caught. |
diff --git a/lib/extable.c b/lib/extable.c index 18df57c029df..01c08b5836f5 100644 --- a/lib/extable.c +++ b/lib/extable.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * lib/extable.c | ||
3 | * Derived from arch/ppc/mm/extable.c and arch/i386/mm/extable.c. | 2 | * Derived from arch/ppc/mm/extable.c and arch/i386/mm/extable.c. |
4 | * | 3 | * |
5 | * Copyright (C) 2004 Paul Mackerras, IBM Corp. | 4 | * Copyright (C) 2004 Paul Mackerras, IBM Corp. |