diff options
Diffstat (limited to 'arch')
129 files changed, 3437 insertions, 1598 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 6c1e36c33faa..6015a92bc2a0 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -63,8 +63,7 @@ endif | |||
63 | 63 | ||
64 | LDFLAGS_vmlinux := -Bstatic | 64 | LDFLAGS_vmlinux := -Bstatic |
65 | 65 | ||
66 | # The -Iarch/$(ARCH)/include is temporary while we are merging | 66 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
67 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include | ||
68 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) | 67 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
69 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc | 68 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc |
70 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple | 69 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple |
@@ -72,9 +71,6 @@ CPPFLAGS += $(CPPFLAGS-y) | |||
72 | AFLAGS += $(AFLAGS-y) | 71 | AFLAGS += $(AFLAGS-y) |
73 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | 72 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) |
74 | CPP = $(CC) -E $(CFLAGS) | 73 | CPP = $(CC) -E $(CFLAGS) |
75 | # Temporary hack until we have migrated to asm-powerpc | ||
76 | LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include | ||
77 | LINUXINCLUDE += $(LINUXINCLUDE-y) | ||
78 | 74 | ||
79 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ | 75 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ |
80 | 76 | ||
@@ -123,7 +119,7 @@ CFLAGS += $(cpu-as-y) | |||
123 | head-y := arch/powerpc/kernel/head_32.o | 119 | head-y := arch/powerpc/kernel/head_32.o |
124 | head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o | 120 | head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o |
125 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o | 121 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o |
126 | head-$(CONFIG_4xx) := arch/powerpc/kernel/head_4xx.o | 122 | head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o |
127 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o | 123 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o |
128 | head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o | 124 | head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o |
129 | 125 | ||
@@ -172,19 +168,8 @@ install: | |||
172 | archclean: | 168 | archclean: |
173 | $(Q)$(MAKE) $(clean)=$(boot) | 169 | $(Q)$(MAKE) $(clean)=$(boot) |
174 | 170 | ||
175 | archmrproper: | ||
176 | $(Q)rm -rf arch/$(ARCH)/include | ||
177 | |||
178 | archprepare: checkbin | 171 | archprepare: checkbin |
179 | 172 | ||
180 | ifeq ($(CONFIG_PPC32),y) | ||
181 | # Temporary hack until we have migrated to asm-powerpc | ||
182 | include/asm: arch/$(ARCH)/include/asm | ||
183 | arch/$(ARCH)/include/asm: FORCE | ||
184 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi | ||
185 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm | ||
186 | endif | ||
187 | |||
188 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output | 173 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
189 | # to stdout and these checks are run even on install targets. | 174 | # to stdout and these checks are run even on install targets. |
190 | TOUT := .tmp_gas_check | 175 | TOUT := .tmp_gas_check |
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index eec7af7e5993..2c187ca05982 100644 --- a/arch/powerpc/boot/.gitignore +++ b/arch/powerpc/boot/.gitignore | |||
@@ -18,14 +18,14 @@ kernel-vmlinux.strip.c | |||
18 | kernel-vmlinux.strip.gz | 18 | kernel-vmlinux.strip.gz |
19 | mktree | 19 | mktree |
20 | uImage | 20 | uImage |
21 | cuImage | 21 | cuImage.* |
22 | cuImage.bin.gz | ||
23 | cuImage.elf | ||
24 | zImage | 22 | zImage |
23 | zImage.bin.* | ||
25 | zImage.chrp | 24 | zImage.chrp |
26 | zImage.coff | 25 | zImage.coff |
27 | zImage.coff.lds | 26 | zImage.coff.lds |
28 | zImage.lds | 27 | zImage.ep* |
28 | zImage.*lds | ||
29 | zImage.miboot | 29 | zImage.miboot |
30 | zImage.pmac | 30 | zImage.pmac |
31 | zImage.pseries | 31 | zImage.pseries |
diff --git a/arch/powerpc/boot/44x.c b/arch/powerpc/boot/44x.c deleted file mode 100644 index 9f64e840bef6..000000000000 --- a/arch/powerpc/boot/44x.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2007 David Gibson, IBM Corporation. | ||
3 | * | ||
4 | * Based on earlier code: | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * Copyright 2002-2005 MontaVista Software Inc. | ||
7 | * | ||
8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
9 | * Copyright (c) 2003, 2004 Zultys Technologies | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | #include <stddef.h> | ||
17 | #include "types.h" | ||
18 | #include "string.h" | ||
19 | #include "stdio.h" | ||
20 | #include "ops.h" | ||
21 | #include "reg.h" | ||
22 | #include "dcr.h" | ||
23 | |||
24 | /* Read the 44x memory controller to get size of system memory. */ | ||
25 | void ibm44x_fixup_memsize(void) | ||
26 | { | ||
27 | int i; | ||
28 | unsigned long memsize, bank_config; | ||
29 | |||
30 | memsize = 0; | ||
31 | for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) { | ||
32 | mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]); | ||
33 | bank_config = mfdcr(DCRN_SDRAM0_CFGDATA); | ||
34 | |||
35 | if (bank_config & SDRAM_CONFIG_BANK_ENABLE) | ||
36 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); | ||
37 | } | ||
38 | |||
39 | dt_fixup_memory(0, memsize); | ||
40 | } | ||
41 | |||
42 | #define SPRN_DBCR0 0x134 | ||
43 | #define DBCR0_RST_SYSTEM 0x30000000 | ||
44 | |||
45 | void ibm44x_dbcr_reset(void) | ||
46 | { | ||
47 | unsigned long tmp; | ||
48 | |||
49 | asm volatile ( | ||
50 | "mfspr %0,%1\n" | ||
51 | "oris %0,%0,%2@h\n" | ||
52 | "mtspr %1,%0" | ||
53 | : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM) | ||
54 | ); | ||
55 | |||
56 | } | ||
57 | |||
58 | /* Read 4xx EBC bus bridge registers to get mappings of the peripheral | ||
59 | * banks into the OPB address space */ | ||
60 | void ibm4xx_fixup_ebc_ranges(const char *ebc) | ||
61 | { | ||
62 | void *devp; | ||
63 | u32 bxcr; | ||
64 | u32 ranges[EBC_NUM_BANKS*4]; | ||
65 | u32 *p = ranges; | ||
66 | int i; | ||
67 | |||
68 | for (i = 0; i < EBC_NUM_BANKS; i++) { | ||
69 | mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i)); | ||
70 | bxcr = mfdcr(DCRN_EBC0_CFGDATA); | ||
71 | |||
72 | if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) { | ||
73 | *p++ = i; | ||
74 | *p++ = 0; | ||
75 | *p++ = bxcr & EBC_BXCR_BAS; | ||
76 | *p++ = EBC_BXCR_BANK_SIZE(bxcr); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | devp = finddevice(ebc); | ||
81 | if (! devp) | ||
82 | fatal("Couldn't locate EBC node %s\n\r", ebc); | ||
83 | |||
84 | setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); | ||
85 | } | ||
diff --git a/arch/powerpc/boot/44x.h b/arch/powerpc/boot/44x.h index 577982c9a3cd..ad33dcc95ae5 100644 --- a/arch/powerpc/boot/44x.h +++ b/arch/powerpc/boot/44x.h | |||
@@ -10,10 +10,7 @@ | |||
10 | #ifndef _PPC_BOOT_44X_H_ | 10 | #ifndef _PPC_BOOT_44X_H_ |
11 | #define _PPC_BOOT_44X_H_ | 11 | #define _PPC_BOOT_44X_H_ |
12 | 12 | ||
13 | void ibm44x_fixup_memsize(void); | ||
14 | void ibm4xx_fixup_ebc_ranges(const char *ebc); | ||
15 | |||
16 | void ibm44x_dbcr_reset(void); | ||
17 | void ebony_init(void *mac0, void *mac1); | 13 | void ebony_init(void *mac0, void *mac1); |
14 | void bamboo_init(void); | ||
18 | 15 | ||
19 | #endif /* _PPC_BOOT_44X_H_ */ | 16 | #endif /* _PPC_BOOT_44X_H_ */ |
diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c new file mode 100644 index 000000000000..642d8780bb31 --- /dev/null +++ b/arch/powerpc/boot/4xx.c | |||
@@ -0,0 +1,192 @@ | |||
1 | /* | ||
2 | * Copyright 2007 David Gibson, IBM Corporation. | ||
3 | * | ||
4 | * Based on earlier code: | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * Copyright 2002-2005 MontaVista Software Inc. | ||
7 | * | ||
8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
9 | * Copyright (c) 2003, 2004 Zultys Technologies | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | #include <stddef.h> | ||
17 | #include "types.h" | ||
18 | #include "string.h" | ||
19 | #include "stdio.h" | ||
20 | #include "ops.h" | ||
21 | #include "reg.h" | ||
22 | #include "dcr.h" | ||
23 | |||
24 | /* Read the 4xx SDRAM controller to get size of system memory. */ | ||
25 | void ibm4xx_fixup_memsize(void) | ||
26 | { | ||
27 | int i; | ||
28 | unsigned long memsize, bank_config; | ||
29 | |||
30 | memsize = 0; | ||
31 | for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) { | ||
32 | mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]); | ||
33 | bank_config = mfdcr(DCRN_SDRAM0_CFGDATA); | ||
34 | |||
35 | if (bank_config & SDRAM_CONFIG_BANK_ENABLE) | ||
36 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); | ||
37 | } | ||
38 | |||
39 | dt_fixup_memory(0, memsize); | ||
40 | } | ||
41 | |||
42 | #define SPRN_DBCR0_40X 0x3F2 | ||
43 | #define SPRN_DBCR0_44X 0x134 | ||
44 | #define DBCR0_RST_SYSTEM 0x30000000 | ||
45 | |||
46 | void ibm44x_dbcr_reset(void) | ||
47 | { | ||
48 | unsigned long tmp; | ||
49 | |||
50 | asm volatile ( | ||
51 | "mfspr %0,%1\n" | ||
52 | "oris %0,%0,%2@h\n" | ||
53 | "mtspr %1,%0" | ||
54 | : "=&r"(tmp) : "i"(SPRN_DBCR0_44X), "i"(DBCR0_RST_SYSTEM) | ||
55 | ); | ||
56 | |||
57 | } | ||
58 | |||
59 | void ibm40x_dbcr_reset(void) | ||
60 | { | ||
61 | unsigned long tmp; | ||
62 | |||
63 | asm volatile ( | ||
64 | "mfspr %0,%1\n" | ||
65 | "oris %0,%0,%2@h\n" | ||
66 | "mtspr %1,%0" | ||
67 | : "=&r"(tmp) : "i"(SPRN_DBCR0_40X), "i"(DBCR0_RST_SYSTEM) | ||
68 | ); | ||
69 | } | ||
70 | |||
71 | #define EMAC_RESET 0x20000000 | ||
72 | void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1) | ||
73 | { | ||
74 | /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */ | ||
75 | if (emac0) | ||
76 | *emac0 = EMAC_RESET; | ||
77 | if (emac1) | ||
78 | *emac1 = EMAC_RESET; | ||
79 | |||
80 | mtdcr(DCRN_MAL0_CFG, MAL_RESET); | ||
81 | } | ||
82 | |||
83 | /* Read 4xx EBC bus bridge registers to get mappings of the peripheral | ||
84 | * banks into the OPB address space */ | ||
85 | void ibm4xx_fixup_ebc_ranges(const char *ebc) | ||
86 | { | ||
87 | void *devp; | ||
88 | u32 bxcr; | ||
89 | u32 ranges[EBC_NUM_BANKS*4]; | ||
90 | u32 *p = ranges; | ||
91 | int i; | ||
92 | |||
93 | for (i = 0; i < EBC_NUM_BANKS; i++) { | ||
94 | mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i)); | ||
95 | bxcr = mfdcr(DCRN_EBC0_CFGDATA); | ||
96 | |||
97 | if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) { | ||
98 | *p++ = i; | ||
99 | *p++ = 0; | ||
100 | *p++ = bxcr & EBC_BXCR_BAS; | ||
101 | *p++ = EBC_BXCR_BANK_SIZE(bxcr); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | devp = finddevice(ebc); | ||
106 | if (! devp) | ||
107 | fatal("Couldn't locate EBC node %s\n\r", ebc); | ||
108 | |||
109 | setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); | ||
110 | } | ||
111 | |||
112 | #define SPRN_CCR1 0x378 | ||
113 | void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) | ||
114 | { | ||
115 | u32 cpu, plb, opb, ebc, tb, uart0, m, vco; | ||
116 | u32 reg; | ||
117 | u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp; | ||
118 | |||
119 | mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0); | ||
120 | reg = mfdcr(DCRN_CPR0_DATA); | ||
121 | tmp = (reg & 0x000F0000) >> 16; | ||
122 | fwdva = tmp ? tmp : 16; | ||
123 | tmp = (reg & 0x00000700) >> 8; | ||
124 | fwdvb = tmp ? tmp : 8; | ||
125 | tmp = (reg & 0x1F000000) >> 24; | ||
126 | fbdv = tmp ? tmp : 32; | ||
127 | lfbdv = (reg & 0x0000007F); | ||
128 | |||
129 | mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0); | ||
130 | reg = mfdcr(DCRN_CPR0_DATA); | ||
131 | tmp = (reg & 0x03000000) >> 24; | ||
132 | opbdv0 = tmp ? tmp : 4; | ||
133 | |||
134 | mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0); | ||
135 | reg = mfdcr(DCRN_CPR0_DATA); | ||
136 | tmp = (reg & 0x07000000) >> 24; | ||
137 | perdv0 = tmp ? tmp : 8; | ||
138 | |||
139 | mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0); | ||
140 | reg = mfdcr(DCRN_CPR0_DATA); | ||
141 | tmp = (reg & 0x07000000) >> 24; | ||
142 | prbdv0 = tmp ? tmp : 8; | ||
143 | |||
144 | mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID); | ||
145 | reg = mfdcr(DCRN_CPR0_DATA); | ||
146 | tmp = (reg & 0x03000000) >> 24; | ||
147 | spcid0 = tmp ? tmp : 4; | ||
148 | |||
149 | /* Calculate M */ | ||
150 | mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0); | ||
151 | reg = mfdcr(DCRN_CPR0_DATA); | ||
152 | tmp = (reg & 0x03000000) >> 24; | ||
153 | if (tmp == 0) { /* PLL output */ | ||
154 | tmp = (reg & 0x20000000) >> 29; | ||
155 | if (!tmp) /* PLLOUTA */ | ||
156 | m = fbdv * lfbdv * fwdva; | ||
157 | else | ||
158 | m = fbdv * lfbdv * fwdvb; | ||
159 | } | ||
160 | else if (tmp == 1) /* CPU output */ | ||
161 | m = fbdv * fwdva; | ||
162 | else | ||
163 | m = perdv0 * opbdv0 * fwdvb; | ||
164 | |||
165 | vco = (m * sysclk) + (m >> 1); | ||
166 | cpu = vco / fwdva; | ||
167 | plb = vco / fwdvb / prbdv0; | ||
168 | opb = plb / opbdv0; | ||
169 | ebc = plb / perdv0; | ||
170 | |||
171 | /* FIXME */ | ||
172 | uart0 = ser_clk; | ||
173 | |||
174 | /* Figure out timebase. Either CPU or default TmrClk */ | ||
175 | asm volatile ( | ||
176 | "mfspr %0,%1\n" | ||
177 | : | ||
178 | "=&r"(reg) : "i"(SPRN_CCR1)); | ||
179 | if (reg & 0x0080) | ||
180 | tb = 25000000; /* TmrClk is 25MHz */ | ||
181 | else | ||
182 | tb = cpu; | ||
183 | |||
184 | dt_fixup_cpu_clocks(cpu, tb, 0); | ||
185 | dt_fixup_clock("/plb", plb); | ||
186 | dt_fixup_clock("/plb/opb", opb); | ||
187 | dt_fixup_clock("/plb/opb/ebc", ebc); | ||
188 | dt_fixup_clock("/plb/opb/serial@ef600300", uart0); | ||
189 | dt_fixup_clock("/plb/opb/serial@ef600400", uart0); | ||
190 | dt_fixup_clock("/plb/opb/serial@ef600500", uart0); | ||
191 | dt_fixup_clock("/plb/opb/serial@ef600600", uart0); | ||
192 | } | ||
diff --git a/arch/powerpc/boot/4xx.h b/arch/powerpc/boot/4xx.h new file mode 100644 index 000000000000..8f26e480dcd3 --- /dev/null +++ b/arch/powerpc/boot/4xx.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * PowerPC 4xx related functions | ||
3 | * | ||
4 | * Copyright 2007 IBM Corporation. | ||
5 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | #ifndef _POWERPC_BOOT_4XX_H_ | ||
12 | #define _POWERPC_BOOT_4XX_H_ | ||
13 | |||
14 | void ibm4xx_fixup_memsize(void); | ||
15 | void ibm44x_dbcr_reset(void); | ||
16 | void ibm40x_dbcr_reset(void); | ||
17 | void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1); | ||
18 | void ibm4xx_fixup_ebc_ranges(const char *ebc); | ||
19 | void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk); | ||
20 | |||
21 | #endif /* _POWERPC_BOOT_4XX_H_ */ | ||
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 61a6f34ca5ed..cd7c05769e41 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -31,7 +31,7 @@ endif | |||
31 | 31 | ||
32 | BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) | 32 | BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) |
33 | 33 | ||
34 | $(obj)/44x.o: BOOTCFLAGS += -mcpu=440 | 34 | $(obj)/4xx.o: BOOTCFLAGS += -mcpu=440 |
35 | $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 | 35 | $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 |
36 | 36 | ||
37 | zlib := inffast.c inflate.c inftrees.c | 37 | zlib := inffast.c inflate.c inftrees.c |
@@ -44,10 +44,11 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ | |||
44 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ | 44 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ |
45 | ns16550.c serial.c simple_alloc.c div64.S util.S \ | 45 | ns16550.c serial.c simple_alloc.c div64.S util.S \ |
46 | gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ | 46 | gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ |
47 | 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c | 47 | 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ |
48 | cpm-serial.c | ||
48 | src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ | 49 | src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ |
49 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ | 50 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ |
50 | ps3-head.S ps3-hvcall.S ps3.c | 51 | ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c cuboot-pq2.c |
51 | src-boot := $(src-wlib) $(src-plat) empty.c | 52 | src-boot := $(src-wlib) $(src-plat) empty.c |
52 | 53 | ||
53 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 54 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
@@ -139,9 +140,12 @@ image-$(CONFIG_PPC_ISERIES) += zImage.iseries | |||
139 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage | 140 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage |
140 | 141 | ||
141 | ifneq ($(CONFIG_DEVICE_TREE),"") | 142 | ifneq ($(CONFIG_DEVICE_TREE),"") |
143 | image-$(CONFIG_PPC_8xx) += cuImage.8xx | ||
144 | image-$(CONFIG_8260) += cuImage.pq2 | ||
142 | image-$(CONFIG_PPC_83xx) += cuImage.83xx | 145 | image-$(CONFIG_PPC_83xx) += cuImage.83xx |
143 | image-$(CONFIG_PPC_85xx) += cuImage.85xx | 146 | image-$(CONFIG_PPC_85xx) += cuImage.85xx |
144 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony | 147 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony |
148 | image-$(CONFIG_BAMBOO) += treeImage.bamboo | ||
145 | endif | 149 | endif |
146 | 150 | ||
147 | # For 32-bit powermacs, build the COFF and miboot images | 151 | # For 32-bit powermacs, build the COFF and miboot images |
diff --git a/arch/powerpc/boot/bamboo.c b/arch/powerpc/boot/bamboo.c new file mode 100644 index 000000000000..bc097694b445 --- /dev/null +++ b/arch/powerpc/boot/bamboo.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Copyright IBM Corporation, 2007 | ||
3 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
4 | * | ||
5 | * Based on ebony wrapper: | ||
6 | * Copyright 2007 David Gibson, IBM Corporation. | ||
7 | * | ||
8 | * Clocking code based on code by: | ||
9 | * Stefan Roese <sr@denx.de> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; version 2 of the License | ||
14 | */ | ||
15 | #include <stdarg.h> | ||
16 | #include <stddef.h> | ||
17 | #include "types.h" | ||
18 | #include "elf.h" | ||
19 | #include "string.h" | ||
20 | #include "stdio.h" | ||
21 | #include "page.h" | ||
22 | #include "ops.h" | ||
23 | #include "dcr.h" | ||
24 | #include "4xx.h" | ||
25 | #include "44x.h" | ||
26 | |||
27 | extern char _dtb_start[]; | ||
28 | extern char _dtb_end[]; | ||
29 | |||
30 | static void bamboo_fixups(void) | ||
31 | { | ||
32 | unsigned long sysclk = 33333333; | ||
33 | |||
34 | ibm440ep_fixup_clocks(sysclk, 11059200); | ||
35 | ibm4xx_fixup_memsize(); | ||
36 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); | ||
37 | } | ||
38 | |||
39 | void bamboo_init(void) | ||
40 | { | ||
41 | platform_ops.fixups = bamboo_fixups; | ||
42 | platform_ops.exit = ibm44x_dbcr_reset; | ||
43 | ft_init(_dtb_start, 0, 32); | ||
44 | serial_console_init(); | ||
45 | } | ||
diff --git a/arch/powerpc/boot/cpm-serial.c b/arch/powerpc/boot/cpm-serial.c new file mode 100644 index 000000000000..fcb8b5e956bd --- /dev/null +++ b/arch/powerpc/boot/cpm-serial.c | |||
@@ -0,0 +1,249 @@ | |||
1 | /* | ||
2 | * CPM serial console support. | ||
3 | * | ||
4 | * Copyright 2007 Freescale Semiconductor, Inc. | ||
5 | * Author: Scott Wood <scottwood@freescale.com> | ||
6 | * | ||
7 | * It is assumed that the firmware (or the platform file) has already set | ||
8 | * up the port. | ||
9 | */ | ||
10 | |||
11 | #include "types.h" | ||
12 | #include "io.h" | ||
13 | #include "ops.h" | ||
14 | |||
15 | struct cpm_scc { | ||
16 | u32 gsmrl; | ||
17 | u32 gsmrh; | ||
18 | u16 psmr; | ||
19 | u8 res1[2]; | ||
20 | u16 todr; | ||
21 | u16 dsr; | ||
22 | u16 scce; | ||
23 | u8 res2[2]; | ||
24 | u16 sccm; | ||
25 | u8 res3; | ||
26 | u8 sccs; | ||
27 | u8 res4[8]; | ||
28 | }; | ||
29 | |||
30 | struct cpm_smc { | ||
31 | u8 res1[2]; | ||
32 | u16 smcmr; | ||
33 | u8 res2[2]; | ||
34 | u8 smce; | ||
35 | u8 res3[3]; | ||
36 | u8 smcm; | ||
37 | u8 res4[5]; | ||
38 | }; | ||
39 | |||
40 | struct cpm_param { | ||
41 | u16 rbase; | ||
42 | u16 tbase; | ||
43 | u8 rfcr; | ||
44 | u8 tfcr; | ||
45 | }; | ||
46 | |||
47 | struct cpm_bd { | ||
48 | u16 sc; /* Status and Control */ | ||
49 | u16 len; /* Data length in buffer */ | ||
50 | u8 *addr; /* Buffer address in host memory */ | ||
51 | }; | ||
52 | |||
53 | static void *cpcr; | ||
54 | static struct cpm_param *param; | ||
55 | static struct cpm_smc *smc; | ||
56 | static struct cpm_scc *scc; | ||
57 | struct cpm_bd *tbdf, *rbdf; | ||
58 | static u32 cpm_cmd; | ||
59 | static u8 *dpram_start; | ||
60 | |||
61 | static void (*do_cmd)(int op); | ||
62 | static void (*enable_port)(void); | ||
63 | static void (*disable_port)(void); | ||
64 | |||
65 | #define CPM_CMD_STOP_TX 4 | ||
66 | #define CPM_CMD_RESTART_TX 6 | ||
67 | #define CPM_CMD_INIT_RX_TX 0 | ||
68 | |||
69 | static void cpm1_cmd(int op) | ||
70 | { | ||
71 | while (in_be16(cpcr) & 1) | ||
72 | ; | ||
73 | |||
74 | out_be16(cpcr, (op << 8) | cpm_cmd | 1); | ||
75 | |||
76 | while (in_be16(cpcr) & 1) | ||
77 | ; | ||
78 | } | ||
79 | |||
80 | static void cpm2_cmd(int op) | ||
81 | { | ||
82 | while (in_be32(cpcr) & 0x10000) | ||
83 | ; | ||
84 | |||
85 | out_be32(cpcr, op | cpm_cmd | 0x10000); | ||
86 | |||
87 | while (in_be32(cpcr) & 0x10000) | ||
88 | ; | ||
89 | } | ||
90 | |||
91 | static void smc_disable_port(void) | ||
92 | { | ||
93 | do_cmd(CPM_CMD_STOP_TX); | ||
94 | out_be16(&smc->smcmr, in_be16(&smc->smcmr) & ~3); | ||
95 | } | ||
96 | |||
97 | static void scc_disable_port(void) | ||
98 | { | ||
99 | do_cmd(CPM_CMD_STOP_TX); | ||
100 | out_be32(&scc->gsmrl, in_be32(&scc->gsmrl) & ~0x30); | ||
101 | } | ||
102 | |||
103 | static void smc_enable_port(void) | ||
104 | { | ||
105 | out_be16(&smc->smcmr, in_be16(&smc->smcmr) | 3); | ||
106 | do_cmd(CPM_CMD_RESTART_TX); | ||
107 | } | ||
108 | |||
109 | static void scc_enable_port(void) | ||
110 | { | ||
111 | out_be32(&scc->gsmrl, in_be32(&scc->gsmrl) | 0x30); | ||
112 | do_cmd(CPM_CMD_RESTART_TX); | ||
113 | } | ||
114 | |||
115 | static int cpm_serial_open(void) | ||
116 | { | ||
117 | int dpaddr = 0x800; | ||
118 | disable_port(); | ||
119 | |||
120 | out_8(¶m->rfcr, 0x10); | ||
121 | out_8(¶m->tfcr, 0x10); | ||
122 | |||
123 | rbdf = (struct cpm_bd *)(dpram_start + dpaddr); | ||
124 | rbdf->addr = (u8 *)(rbdf + 2); | ||
125 | rbdf->sc = 0xa000; | ||
126 | rbdf->len = 1; | ||
127 | |||
128 | tbdf = rbdf + 1; | ||
129 | tbdf->addr = (u8 *)(rbdf + 2) + 1; | ||
130 | tbdf->sc = 0x2000; | ||
131 | tbdf->len = 1; | ||
132 | |||
133 | sync(); | ||
134 | out_be16(¶m->rbase, dpaddr); | ||
135 | out_be16(¶m->tbase, dpaddr + sizeof(struct cpm_bd)); | ||
136 | |||
137 | do_cmd(CPM_CMD_INIT_RX_TX); | ||
138 | |||
139 | enable_port(); | ||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static void cpm_serial_putc(unsigned char c) | ||
144 | { | ||
145 | while (tbdf->sc & 0x8000) | ||
146 | barrier(); | ||
147 | |||
148 | sync(); | ||
149 | |||
150 | tbdf->addr[0] = c; | ||
151 | eieio(); | ||
152 | tbdf->sc |= 0x8000; | ||
153 | } | ||
154 | |||
155 | static unsigned char cpm_serial_tstc(void) | ||
156 | { | ||
157 | barrier(); | ||
158 | return !(rbdf->sc & 0x8000); | ||
159 | } | ||
160 | |||
161 | static unsigned char cpm_serial_getc(void) | ||
162 | { | ||
163 | unsigned char c; | ||
164 | |||
165 | while (!cpm_serial_tstc()) | ||
166 | ; | ||
167 | |||
168 | sync(); | ||
169 | c = rbdf->addr[0]; | ||
170 | eieio(); | ||
171 | rbdf->sc |= 0x8000; | ||
172 | |||
173 | return c; | ||
174 | } | ||
175 | |||
176 | int cpm_console_init(void *devp, struct serial_console_data *scdp) | ||
177 | { | ||
178 | void *reg_virt[2]; | ||
179 | int is_smc = 0, is_cpm2 = 0, n; | ||
180 | unsigned long reg_phys; | ||
181 | void *parent; | ||
182 | |||
183 | if (dt_is_compatible(devp, "fsl,cpm1-smc-uart")) { | ||
184 | is_smc = 1; | ||
185 | } else if (dt_is_compatible(devp, "fsl,cpm2-scc-uart")) { | ||
186 | is_cpm2 = 1; | ||
187 | } else if (dt_is_compatible(devp, "fsl,cpm2-smc-uart")) { | ||
188 | is_cpm2 = 1; | ||
189 | is_smc = 1; | ||
190 | } | ||
191 | |||
192 | if (is_smc) { | ||
193 | enable_port = smc_enable_port; | ||
194 | disable_port = smc_disable_port; | ||
195 | } else { | ||
196 | enable_port = scc_enable_port; | ||
197 | disable_port = scc_disable_port; | ||
198 | } | ||
199 | |||
200 | if (is_cpm2) | ||
201 | do_cmd = cpm2_cmd; | ||
202 | else | ||
203 | do_cmd = cpm1_cmd; | ||
204 | |||
205 | n = getprop(devp, "fsl,cpm-command", &cpm_cmd, 4); | ||
206 | if (n < 4) | ||
207 | return -1; | ||
208 | |||
209 | n = getprop(devp, "virtual-reg", reg_virt, sizeof(reg_virt)); | ||
210 | if (n < (int)sizeof(reg_virt)) { | ||
211 | for (n = 0; n < 2; n++) { | ||
212 | if (!dt_xlate_reg(devp, n, ®_phys, NULL)) | ||
213 | return -1; | ||
214 | |||
215 | reg_virt[n] = (void *)reg_phys; | ||
216 | } | ||
217 | } | ||
218 | |||
219 | if (is_smc) | ||
220 | smc = reg_virt[0]; | ||
221 | else | ||
222 | scc = reg_virt[0]; | ||
223 | |||
224 | param = reg_virt[1]; | ||
225 | |||
226 | parent = get_parent(devp); | ||
227 | if (!parent) | ||
228 | return -1; | ||
229 | |||
230 | n = getprop(parent, "virtual-reg", reg_virt, sizeof(reg_virt)); | ||
231 | if (n < (int)sizeof(reg_virt)) { | ||
232 | for (n = 0; n < 2; n++) { | ||
233 | if (!dt_xlate_reg(parent, n, ®_phys, NULL)) | ||
234 | return -1; | ||
235 | |||
236 | reg_virt[n] = (void *)reg_phys; | ||
237 | } | ||
238 | } | ||
239 | |||
240 | cpcr = reg_virt[0]; | ||
241 | dpram_start = reg_virt[1]; | ||
242 | |||
243 | scdp->open = cpm_serial_open; | ||
244 | scdp->putc = cpm_serial_putc; | ||
245 | scdp->getc = cpm_serial_getc; | ||
246 | scdp->tstc = cpm_serial_tstc; | ||
247 | |||
248 | return 0; | ||
249 | } | ||
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c index 296025d8b295..a0505509abcc 100644 --- a/arch/powerpc/boot/cuboot-83xx.c +++ b/arch/powerpc/boot/cuboot-83xx.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include "ppcboot.h" | 18 | #include "ppcboot.h" |
19 | 19 | ||
20 | static bd_t bd; | 20 | static bd_t bd; |
21 | extern char _dtb_start[], _dtb_end[]; | ||
22 | 21 | ||
23 | static void platform_fixups(void) | 22 | static void platform_fixups(void) |
24 | { | 23 | { |
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c index 10f0f697c935..345dcbecef0f 100644 --- a/arch/powerpc/boot/cuboot-85xx.c +++ b/arch/powerpc/boot/cuboot-85xx.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include "ppcboot.h" | 18 | #include "ppcboot.h" |
19 | 19 | ||
20 | static bd_t bd; | 20 | static bd_t bd; |
21 | extern char _dtb_start[], _dtb_end[]; | ||
22 | 21 | ||
23 | static void platform_fixups(void) | 22 | static void platform_fixups(void) |
24 | { | 23 | { |
diff --git a/arch/powerpc/boot/cuboot-8xx.c b/arch/powerpc/boot/cuboot-8xx.c new file mode 100644 index 000000000000..88ed84015a8b --- /dev/null +++ b/arch/powerpc/boot/cuboot-8xx.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for 8xx | ||
3 | * | ||
4 | * Author: Scott Wood <scottwood@freescale.com> | ||
5 | * | ||
6 | * Copyright (c) 2007 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 version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include "ops.h" | ||
14 | #include "stdio.h" | ||
15 | #include "cuboot.h" | ||
16 | |||
17 | #define TARGET_8xx | ||
18 | #define TARGET_HAS_ETH1 | ||
19 | #include "ppcboot.h" | ||
20 | |||
21 | static bd_t bd; | ||
22 | |||
23 | static void platform_fixups(void) | ||
24 | { | ||
25 | void *node; | ||
26 | |||
27 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
28 | dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); | ||
29 | dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq); | ||
30 | |||
31 | node = finddevice("/soc/cpm"); | ||
32 | if (node) { | ||
33 | setprop(node, "clock-frequency", &bd.bi_busfreq, 4); | ||
34 | setprop(node, "fsl,brg-frequency", &bd.bi_busfreq, 4); | ||
35 | } | ||
36 | } | ||
37 | |||
38 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
39 | unsigned long r6, unsigned long r7) | ||
40 | { | ||
41 | CUBOOT_INIT(); | ||
42 | ft_init(_dtb_start, _dtb_end - _dtb_start, 32); | ||
43 | serial_console_init(); | ||
44 | platform_ops.fixups = platform_fixups; | ||
45 | } | ||
diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c new file mode 100644 index 000000000000..8021fd4a43bc --- /dev/null +++ b/arch/powerpc/boot/cuboot-pq2.c | |||
@@ -0,0 +1,283 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for PowerQUICC II | ||
3 | * (a.k.a. 82xx with CPM, not the 8240 family of chips) | ||
4 | * | ||
5 | * Author: Scott Wood <scottwood@freescale.com> | ||
6 | * | ||
7 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include "ops.h" | ||
15 | #include "stdio.h" | ||
16 | #include "cuboot.h" | ||
17 | #include "io.h" | ||
18 | |||
19 | #define TARGET_CPM2 | ||
20 | #define TARGET_HAS_ETH1 | ||
21 | #include "ppcboot.h" | ||
22 | |||
23 | static bd_t bd; | ||
24 | |||
25 | struct cs_range { | ||
26 | u32 csnum; | ||
27 | u32 base; /* must be zero */ | ||
28 | u32 addr; | ||
29 | u32 size; | ||
30 | }; | ||
31 | |||
32 | struct pci_range { | ||
33 | u32 flags; | ||
34 | u32 pci_addr[2]; | ||
35 | u32 phys_addr; | ||
36 | u32 size[2]; | ||
37 | }; | ||
38 | |||
39 | struct cs_range cs_ranges_buf[MAX_PROP_LEN / sizeof(struct cs_range)]; | ||
40 | struct pci_range pci_ranges_buf[MAX_PROP_LEN / sizeof(struct pci_range)]; | ||
41 | |||
42 | /* Different versions of u-boot put the BCSR in different places, and | ||
43 | * some don't set up the PCI PIC at all, so we assume the device tree is | ||
44 | * sane and update the BRx registers appropriately. | ||
45 | * | ||
46 | * For any node defined as compatible with fsl,pq2-chipselect, | ||
47 | * #address/#size must be 2/1 for chipselect bus, 1/1 for parent bus, | ||
48 | * and ranges must be for whole chip selects. | ||
49 | */ | ||
50 | static void update_cs_ranges(void) | ||
51 | { | ||
52 | u32 ctrl_ph; | ||
53 | void *ctrl_node, *bus_node, *parent_node; | ||
54 | u32 *ctrl_addr; | ||
55 | unsigned long ctrl_size; | ||
56 | u32 naddr, nsize; | ||
57 | int len; | ||
58 | int i; | ||
59 | |||
60 | bus_node = finddevice("/chipselect"); | ||
61 | if (!bus_node || !dt_is_compatible(bus_node, "fsl,pq2-chipselect")) | ||
62 | return; | ||
63 | |||
64 | dt_get_reg_format(bus_node, &naddr, &nsize); | ||
65 | if (naddr != 2 || nsize != 1) | ||
66 | goto err; | ||
67 | |||
68 | parent_node = get_parent(bus_node); | ||
69 | if (!parent_node) | ||
70 | goto err; | ||
71 | |||
72 | dt_get_reg_format(parent_node, &naddr, &nsize); | ||
73 | if (naddr != 1 || nsize != 1) | ||
74 | goto err; | ||
75 | |||
76 | len = getprop(bus_node, "fsl,ctrl", &ctrl_ph, 4); | ||
77 | if (len != 4) | ||
78 | goto err; | ||
79 | |||
80 | ctrl_node = find_node_by_prop_value(NULL, "linux,phandle", | ||
81 | (char *)&ctrl_ph, 4); | ||
82 | if (!ctrl_node) | ||
83 | goto err; | ||
84 | |||
85 | if (!dt_is_compatible(ctrl_node, "fsl,pq2-chipselect-ctrl")) | ||
86 | goto err; | ||
87 | |||
88 | if (!dt_xlate_reg(ctrl_node, 0, (unsigned long *)&ctrl_addr, | ||
89 | &ctrl_size)) | ||
90 | goto err; | ||
91 | |||
92 | len = getprop(bus_node, "ranges", cs_ranges_buf, sizeof(cs_ranges_buf)); | ||
93 | |||
94 | for (i = 0; i < len / sizeof(struct cs_range); i++) { | ||
95 | u32 base, option; | ||
96 | int cs = cs_ranges_buf[i].csnum; | ||
97 | if (cs >= ctrl_size / 8) | ||
98 | goto err; | ||
99 | |||
100 | if (cs_ranges_buf[i].base != 0) | ||
101 | goto err; | ||
102 | |||
103 | base = in_be32(&ctrl_addr[cs * 2]); | ||
104 | |||
105 | /* If CS is already valid, use the existing flags. | ||
106 | * Otherwise, guess a sane default. | ||
107 | */ | ||
108 | if (base & 1) { | ||
109 | base &= 0x7fff; | ||
110 | option = in_be32(&ctrl_addr[cs * 2 + 1]) & 0x7fff; | ||
111 | } else { | ||
112 | base = 0x1801; | ||
113 | option = 0x10; | ||
114 | } | ||
115 | |||
116 | out_be32(&ctrl_addr[cs * 2], 0); | ||
117 | out_be32(&ctrl_addr[cs * 2 + 1], | ||
118 | option | ~(cs_ranges_buf[i].size - 1)); | ||
119 | out_be32(&ctrl_addr[cs * 2], base | cs_ranges_buf[i].addr); | ||
120 | } | ||
121 | |||
122 | return; | ||
123 | |||
124 | err: | ||
125 | printf("Bad /chipselect or fsl,pq2-chipselect-ctrl node\r\n"); | ||
126 | } | ||
127 | |||
128 | /* Older u-boots don't set PCI up properly. Update the hardware to match | ||
129 | * the device tree. The prefetch mem region and non-prefetch mem region | ||
130 | * must be contiguous in the host bus. As required by the PCI binding, | ||
131 | * PCI #addr/#size must be 3/2. The parent bus must be 1/1. Only | ||
132 | * 32-bit PCI is supported. All three region types (prefetchable mem, | ||
133 | * non-prefetchable mem, and I/O) must be present. | ||
134 | */ | ||
135 | static void fixup_pci(void) | ||
136 | { | ||
137 | struct pci_range *mem = NULL, *mmio = NULL, | ||
138 | *io = NULL, *mem_base = NULL; | ||
139 | u32 *pci_regs[3]; | ||
140 | u8 *soc_regs; | ||
141 | int i, len; | ||
142 | void *ctrl_node, *bus_node, *parent_node, *soc_node; | ||
143 | u32 naddr, nsize, bus_ph, mem_log2; | ||
144 | |||
145 | ctrl_node = finddevice("/soc/pci"); | ||
146 | if (!ctrl_node || !dt_is_compatible(ctrl_node, "fsl,pq2-pci")) | ||
147 | return; | ||
148 | |||
149 | soc_node = finddevice("/soc"); | ||
150 | if (!soc_node || !dt_is_compatible(soc_node, "fsl,pq2-soc")) | ||
151 | goto err; | ||
152 | |||
153 | for (i = 0; i < 3; i++) | ||
154 | if (!dt_xlate_reg(ctrl_node, i, | ||
155 | (unsigned long *)&pci_regs[i], NULL)) | ||
156 | goto err; | ||
157 | |||
158 | if (!dt_xlate_reg(soc_node, 0, (unsigned long *)&soc_regs, NULL)) | ||
159 | goto err; | ||
160 | |||
161 | len = getprop(ctrl_node, "fsl,bus", &bus_ph, 4); | ||
162 | if (len != 4) | ||
163 | goto err; | ||
164 | |||
165 | bus_node = find_node_by_prop_value(NULL, "linux,phandle", | ||
166 | (char *)&bus_ph, 4); | ||
167 | if (!bus_node) | ||
168 | goto err; | ||
169 | |||
170 | dt_get_reg_format(bus_node, &naddr, &nsize); | ||
171 | if (naddr != 3 || nsize != 2) | ||
172 | goto err; | ||
173 | |||
174 | parent_node = get_parent(bus_node); | ||
175 | if (!parent_node) | ||
176 | goto err; | ||
177 | |||
178 | dt_get_reg_format(parent_node, &naddr, &nsize); | ||
179 | if (naddr != 1 || nsize != 1) | ||
180 | goto err; | ||
181 | |||
182 | len = getprop(bus_node, "ranges", pci_ranges_buf, | ||
183 | sizeof(pci_ranges_buf)); | ||
184 | |||
185 | for (i = 0; i < len / sizeof(struct pci_range); i++) { | ||
186 | u32 flags = pci_ranges_buf[i].flags & 0x43000000; | ||
187 | |||
188 | if (flags == 0x42000000) | ||
189 | mem = &pci_ranges_buf[i]; | ||
190 | else if (flags == 0x02000000) | ||
191 | mmio = &pci_ranges_buf[i]; | ||
192 | else if (flags == 0x01000000) | ||
193 | io = &pci_ranges_buf[i]; | ||
194 | } | ||
195 | |||
196 | if (!mem || !mmio || !io) | ||
197 | goto err; | ||
198 | |||
199 | if (mem->phys_addr + mem->size[1] == mmio->phys_addr) | ||
200 | mem_base = mem; | ||
201 | else if (mmio->phys_addr + mmio->size[1] == mem->phys_addr) | ||
202 | mem_base = mmio; | ||
203 | else | ||
204 | goto err; | ||
205 | |||
206 | out_be32(&pci_regs[1][0], mem_base->phys_addr | 1); | ||
207 | out_be32(&pci_regs[2][0], ~(mem->size[1] + mmio->size[1] - 1)); | ||
208 | |||
209 | out_be32(&pci_regs[1][1], io->phys_addr | 1); | ||
210 | out_be32(&pci_regs[2][1], ~(io->size[1] - 1)); | ||
211 | |||
212 | out_le32(&pci_regs[0][0], mem->pci_addr[1] >> 12); | ||
213 | out_le32(&pci_regs[0][2], mem->phys_addr >> 12); | ||
214 | out_le32(&pci_regs[0][4], (~(mem->size[1] - 1) >> 12) | 0xa0000000); | ||
215 | |||
216 | out_le32(&pci_regs[0][6], mmio->pci_addr[1] >> 12); | ||
217 | out_le32(&pci_regs[0][8], mmio->phys_addr >> 12); | ||
218 | out_le32(&pci_regs[0][10], (~(mmio->size[1] - 1) >> 12) | 0x80000000); | ||
219 | |||
220 | out_le32(&pci_regs[0][12], io->pci_addr[1] >> 12); | ||
221 | out_le32(&pci_regs[0][14], io->phys_addr >> 12); | ||
222 | out_le32(&pci_regs[0][16], (~(io->size[1] - 1) >> 12) | 0xc0000000); | ||
223 | |||
224 | /* Inbound translation */ | ||
225 | out_le32(&pci_regs[0][58], 0); | ||
226 | out_le32(&pci_regs[0][60], 0); | ||
227 | |||
228 | mem_log2 = 1 << (__ilog2_u32(bd.bi_memsize - 1) + 1); | ||
229 | out_le32(&pci_regs[0][62], 0xa0000000 | ~((1 << (mem_log2 - 12)) - 1)); | ||
230 | |||
231 | /* If PCI is disabled, drive RST high to enable. */ | ||
232 | if (!(in_le32(&pci_regs[0][32]) & 1)) { | ||
233 | /* Tpvrh (Power valid to RST# high) 100 ms */ | ||
234 | udelay(100000); | ||
235 | |||
236 | out_le32(&pci_regs[0][32], 1); | ||
237 | |||
238 | /* Trhfa (RST# high to first cfg access) 2^25 clocks */ | ||
239 | udelay(1020000); | ||
240 | } | ||
241 | |||
242 | /* Enable bus master and memory access */ | ||
243 | out_le32(&pci_regs[0][64], 0x80000004); | ||
244 | out_le32(&pci_regs[0][65], in_le32(&pci_regs[0][65]) | 6); | ||
245 | |||
246 | /* Park the bus on PCI, and elevate PCI's arbitration priority, | ||
247 | * as required by section 9.6 of the user's manual. | ||
248 | */ | ||
249 | out_8(&soc_regs[0x10028], 3); | ||
250 | out_be32((u32 *)&soc_regs[0x1002c], 0x01236745); | ||
251 | |||
252 | return; | ||
253 | |||
254 | err: | ||
255 | printf("Bad PCI node\r\n"); | ||
256 | } | ||
257 | |||
258 | static void pq2_platform_fixups(void) | ||
259 | { | ||
260 | void *node; | ||
261 | |||
262 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
263 | dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); | ||
264 | dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); | ||
265 | |||
266 | node = finddevice("/soc/cpm"); | ||
267 | if (node) { | ||
268 | setprop(node, "clock-frequency", &bd.bi_cpmfreq, 4); | ||
269 | setprop(node, "fsl,brg-frequency", &bd.bi_brgfreq, 4); | ||
270 | } | ||
271 | |||
272 | update_cs_ranges(); | ||
273 | fixup_pci(); | ||
274 | } | ||
275 | |||
276 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
277 | unsigned long r6, unsigned long r7) | ||
278 | { | ||
279 | CUBOOT_INIT(); | ||
280 | ft_init(_dtb_start, _dtb_end - _dtb_start, 32); | ||
281 | serial_console_init(); | ||
282 | platform_ops.fixups = pq2_platform_fixups; | ||
283 | } | ||
diff --git a/arch/powerpc/boot/cuboot.c b/arch/powerpc/boot/cuboot.c index 65795468ad6f..7768b2306b7a 100644 --- a/arch/powerpc/boot/cuboot.c +++ b/arch/powerpc/boot/cuboot.c | |||
@@ -17,9 +17,6 @@ | |||
17 | 17 | ||
18 | #include "ppcboot.h" | 18 | #include "ppcboot.h" |
19 | 19 | ||
20 | extern char _end[]; | ||
21 | extern char _dtb_start[], _dtb_end[]; | ||
22 | |||
23 | void cuboot_init(unsigned long r4, unsigned long r5, | 20 | void cuboot_init(unsigned long r4, unsigned long r5, |
24 | unsigned long r6, unsigned long r7, | 21 | unsigned long r6, unsigned long r7, |
25 | unsigned long end_of_ram) | 22 | unsigned long end_of_ram) |
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h index 14b44aa96fea..e158311c501b 100644 --- a/arch/powerpc/boot/dcr.h +++ b/arch/powerpc/boot/dcr.h | |||
@@ -121,4 +121,17 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2C | |||
121 | #define DCRN_CPC0_MIRQ1 0x0ed | 121 | #define DCRN_CPC0_MIRQ1 0x0ed |
122 | #define DCRN_CPC0_JTAGID 0x0ef | 122 | #define DCRN_CPC0_JTAGID 0x0ef |
123 | 123 | ||
124 | #define DCRN_MAL0_CFG 0x180 | ||
125 | #define MAL_RESET 0x80000000 | ||
126 | |||
127 | /* 440EP Clock/Power-on Reset regs */ | ||
128 | #define DCRN_CPR0_ADDR 0xc | ||
129 | #define DCRN_CPR0_DATA 0xd | ||
130 | #define CPR0_PLLD0 0x60 | ||
131 | #define CPR0_OPBD0 0xc0 | ||
132 | #define CPR0_PERD0 0xe0 | ||
133 | #define CPR0_PRIMBD0 0xa0 | ||
134 | #define CPR0_SCPID 0x120 | ||
135 | #define CPR0_PLLC0 0x40 | ||
136 | |||
124 | #endif /* _PPC_BOOT_DCR_H_ */ | 137 | #endif /* _PPC_BOOT_DCR_H_ */ |
diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c index c9951550ed2c..e1b8122b4393 100644 --- a/arch/powerpc/boot/devtree.c +++ b/arch/powerpc/boot/devtree.c | |||
@@ -74,6 +74,8 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus) | |||
74 | if (bus > 0) | 74 | if (bus > 0) |
75 | setprop_val(devp, "bus-frequency", bus); | 75 | setprop_val(devp, "bus-frequency", bus); |
76 | } | 76 | } |
77 | |||
78 | timebase_period_ns = 1000000000 / tb; | ||
77 | } | 79 | } |
78 | 80 | ||
79 | void dt_fixup_clock(const char *path, u32 freq) | 81 | void dt_fixup_clock(const char *path, u32 freq) |
@@ -111,9 +113,8 @@ void __dt_fixup_mac_addresses(u32 startindex, ...) | |||
111 | } | 113 | } |
112 | 114 | ||
113 | #define MAX_ADDR_CELLS 4 | 115 | #define MAX_ADDR_CELLS 4 |
114 | #define MAX_RANGES 8 | ||
115 | 116 | ||
116 | static void get_reg_format(void *node, u32 *naddr, u32 *nsize) | 117 | void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize) |
117 | { | 118 | { |
118 | if (getprop(node, "#address-cells", naddr, 4) != 4) | 119 | if (getprop(node, "#address-cells", naddr, 4) != 4) |
119 | *naddr = 2; | 120 | *naddr = 2; |
@@ -207,7 +208,7 @@ static int find_range(u32 *reg, u32 *ranges, int nregaddr, | |||
207 | * In particular, PCI is not supported. Also, only the beginning of the | 208 | * In particular, PCI is not supported. Also, only the beginning of the |
208 | * reg block is tracked; size is ignored except in ranges. | 209 | * reg block is tracked; size is ignored except in ranges. |
209 | */ | 210 | */ |
210 | static u32 dt_xlate_buf[MAX_ADDR_CELLS * MAX_RANGES * 3]; | 211 | static u32 prop_buf[MAX_PROP_LEN / 4]; |
211 | 212 | ||
212 | static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, | 213 | static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, |
213 | unsigned long *size) | 214 | unsigned long *size) |
@@ -216,14 +217,14 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, | |||
216 | u32 this_addr[MAX_ADDR_CELLS]; | 217 | u32 this_addr[MAX_ADDR_CELLS]; |
217 | void *parent; | 218 | void *parent; |
218 | u64 ret_addr, ret_size; | 219 | u64 ret_addr, ret_size; |
219 | u32 naddr, nsize, prev_naddr; | 220 | u32 naddr, nsize, prev_naddr, prev_nsize; |
220 | int buflen, offset; | 221 | int buflen, offset; |
221 | 222 | ||
222 | parent = get_parent(node); | 223 | parent = get_parent(node); |
223 | if (!parent) | 224 | if (!parent) |
224 | return 0; | 225 | return 0; |
225 | 226 | ||
226 | get_reg_format(parent, &naddr, &nsize); | 227 | dt_get_reg_format(parent, &naddr, &nsize); |
227 | 228 | ||
228 | if (nsize > 2) | 229 | if (nsize > 2) |
229 | return 0; | 230 | return 0; |
@@ -231,41 +232,47 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, | |||
231 | offset = (naddr + nsize) * res; | 232 | offset = (naddr + nsize) * res; |
232 | 233 | ||
233 | if (reglen < offset + naddr + nsize || | 234 | if (reglen < offset + naddr + nsize || |
234 | sizeof(dt_xlate_buf) < offset + naddr + nsize) | 235 | MAX_PROP_LEN < (offset + naddr + nsize) * 4) |
235 | return 0; | 236 | return 0; |
236 | 237 | ||
237 | copy_val(last_addr, dt_xlate_buf + offset, naddr); | 238 | copy_val(last_addr, prop_buf + offset, naddr); |
238 | 239 | ||
239 | ret_size = dt_xlate_buf[offset + naddr]; | 240 | ret_size = prop_buf[offset + naddr]; |
240 | if (nsize == 2) { | 241 | if (nsize == 2) { |
241 | ret_size <<= 32; | 242 | ret_size <<= 32; |
242 | ret_size |= dt_xlate_buf[offset + naddr + 1]; | 243 | ret_size |= prop_buf[offset + naddr + 1]; |
243 | } | 244 | } |
244 | 245 | ||
245 | while ((node = get_parent(node))) { | 246 | for (;;) { |
246 | prev_naddr = naddr; | 247 | prev_naddr = naddr; |
248 | prev_nsize = nsize; | ||
249 | node = parent; | ||
250 | |||
251 | parent = get_parent(node); | ||
252 | if (!parent) | ||
253 | break; | ||
247 | 254 | ||
248 | get_reg_format(node, &naddr, &nsize); | 255 | dt_get_reg_format(parent, &naddr, &nsize); |
249 | 256 | ||
250 | buflen = getprop(node, "ranges", dt_xlate_buf, | 257 | buflen = getprop(node, "ranges", prop_buf, |
251 | sizeof(dt_xlate_buf)); | 258 | sizeof(prop_buf)); |
252 | if (buflen < 0) | 259 | if (buflen == 0) |
253 | continue; | 260 | continue; |
254 | if (buflen > sizeof(dt_xlate_buf)) | 261 | if (buflen < 0 || buflen > sizeof(prop_buf)) |
255 | return 0; | 262 | return 0; |
256 | 263 | ||
257 | offset = find_range(last_addr, dt_xlate_buf, prev_naddr, | 264 | offset = find_range(last_addr, prop_buf, prev_naddr, |
258 | naddr, nsize, buflen / 4); | 265 | naddr, prev_nsize, buflen / 4); |
259 | 266 | ||
260 | if (offset < 0) | 267 | if (offset < 0) |
261 | return 0; | 268 | return 0; |
262 | 269 | ||
263 | copy_val(this_addr, dt_xlate_buf + offset, prev_naddr); | 270 | copy_val(this_addr, prop_buf + offset, prev_naddr); |
264 | 271 | ||
265 | if (!sub_reg(last_addr, this_addr)) | 272 | if (!sub_reg(last_addr, this_addr)) |
266 | return 0; | 273 | return 0; |
267 | 274 | ||
268 | copy_val(this_addr, dt_xlate_buf + offset + prev_naddr, naddr); | 275 | copy_val(this_addr, prop_buf + offset + prev_naddr, naddr); |
269 | 276 | ||
270 | if (!add_reg(last_addr, this_addr, naddr)) | 277 | if (!add_reg(last_addr, this_addr, naddr)) |
271 | return 0; | 278 | return 0; |
@@ -292,16 +299,35 @@ int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size) | |||
292 | { | 299 | { |
293 | int reglen; | 300 | int reglen; |
294 | 301 | ||
295 | reglen = getprop(node, "reg", dt_xlate_buf, sizeof(dt_xlate_buf)) / 4; | 302 | reglen = getprop(node, "reg", prop_buf, sizeof(prop_buf)) / 4; |
296 | return dt_xlate(node, res, reglen, addr, size); | 303 | return dt_xlate(node, res, reglen, addr, size); |
297 | } | 304 | } |
298 | 305 | ||
299 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) | 306 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) |
300 | { | 307 | { |
301 | 308 | ||
302 | if (buflen > sizeof(dt_xlate_buf)) | 309 | if (buflen > sizeof(prop_buf)) |
303 | return 0; | 310 | return 0; |
304 | 311 | ||
305 | memcpy(dt_xlate_buf, buf, buflen); | 312 | memcpy(prop_buf, buf, buflen); |
306 | return dt_xlate(node, 0, buflen / 4, xlated_addr, NULL); | 313 | return dt_xlate(node, 0, buflen / 4, xlated_addr, NULL); |
307 | } | 314 | } |
315 | |||
316 | int dt_is_compatible(void *node, const char *compat) | ||
317 | { | ||
318 | char *buf = (char *)prop_buf; | ||
319 | int len, pos; | ||
320 | |||
321 | len = getprop(node, "compatible", buf, MAX_PROP_LEN); | ||
322 | if (len < 0) | ||
323 | return 0; | ||
324 | |||
325 | for (pos = 0; pos < len; pos++) { | ||
326 | if (!strcmp(buf + pos, compat)) | ||
327 | return 1; | ||
328 | |||
329 | pos += strnlen(&buf[pos], len - pos); | ||
330 | } | ||
331 | |||
332 | return 0; | ||
333 | } | ||
diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts new file mode 100644 index 000000000000..bdd56b0e9460 --- /dev/null +++ b/arch/powerpc/boot/dts/bamboo.dts | |||
@@ -0,0 +1,244 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC Bamboo | ||
3 | * | ||
4 | * Copyright (c) 2006, 2007 IBM Corp. | ||
5 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
6 | * | ||
7 | * FIXME: Draft only! | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without | ||
11 | * any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | / { | ||
15 | #address-cells = <2>; | ||
16 | #size-cells = <1>; | ||
17 | model = "amcc,bamboo"; | ||
18 | compatible = "amcc,bamboo"; | ||
19 | dcr-parent = <&/cpus/PowerPC,440EP@0>; | ||
20 | |||
21 | cpus { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | |||
25 | PowerPC,440EP@0 { | ||
26 | device_type = "cpu"; | ||
27 | reg = <0>; | ||
28 | clock-frequency = <0>; /* Filled in by zImage */ | ||
29 | timebase-frequency = <0>; /* Filled in by zImage */ | ||
30 | i-cache-line-size = <20>; | ||
31 | d-cache-line-size = <20>; | ||
32 | i-cache-size = <8000>; | ||
33 | d-cache-size = <8000>; | ||
34 | dcr-controller; | ||
35 | dcr-access-method = "native"; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | memory { | ||
40 | device_type = "memory"; | ||
41 | reg = <0 0 0>; /* Filled in by zImage */ | ||
42 | }; | ||
43 | |||
44 | UIC0: interrupt-controller0 { | ||
45 | compatible = "ibm,uic-440ep","ibm,uic"; | ||
46 | interrupt-controller; | ||
47 | cell-index = <0>; | ||
48 | dcr-reg = <0c0 009>; | ||
49 | #address-cells = <0>; | ||
50 | #size-cells = <0>; | ||
51 | #interrupt-cells = <2>; | ||
52 | }; | ||
53 | |||
54 | UIC1: interrupt-controller1 { | ||
55 | compatible = "ibm,uic-440ep","ibm,uic"; | ||
56 | interrupt-controller; | ||
57 | cell-index = <1>; | ||
58 | dcr-reg = <0d0 009>; | ||
59 | #address-cells = <0>; | ||
60 | #size-cells = <0>; | ||
61 | #interrupt-cells = <2>; | ||
62 | interrupts = <1e 4 1f 4>; /* cascade */ | ||
63 | interrupt-parent = <&UIC0>; | ||
64 | }; | ||
65 | |||
66 | SDR0: sdr { | ||
67 | compatible = "ibm,sdr-440ep"; | ||
68 | dcr-reg = <00e 002>; | ||
69 | }; | ||
70 | |||
71 | CPR0: cpr { | ||
72 | compatible = "ibm,cpr-440ep"; | ||
73 | dcr-reg = <00c 002>; | ||
74 | }; | ||
75 | |||
76 | plb { | ||
77 | compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4"; | ||
78 | #address-cells = <2>; | ||
79 | #size-cells = <1>; | ||
80 | ranges; | ||
81 | clock-frequency = <0>; /* Filled in by zImage */ | ||
82 | |||
83 | SDRAM0: sdram { | ||
84 | compatible = "ibm,sdram-440ep", "ibm,sdram-405gp"; | ||
85 | dcr-reg = <010 2>; | ||
86 | }; | ||
87 | |||
88 | DMA0: dma { | ||
89 | compatible = "ibm,dma-440ep", "ibm,dma-440gp"; | ||
90 | dcr-reg = <100 027>; | ||
91 | }; | ||
92 | |||
93 | MAL0: mcmal { | ||
94 | compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal"; | ||
95 | dcr-reg = <180 62>; | ||
96 | num-tx-chans = <4>; | ||
97 | num-rx-chans = <4>; | ||
98 | interrupt-parent = <&MAL0>; | ||
99 | interrupts = <0 1 2 3 4>; | ||
100 | #interrupt-cells = <1>; | ||
101 | interrupt-map = </*TXEOB*/ 0 &UIC0 a 4 | ||
102 | /*RXEOB*/ 1 &UIC0 b 4 | ||
103 | /*SERR*/ 2 &UIC1 0 4 | ||
104 | /*TXDE*/ 3 &UIC1 1 4 | ||
105 | /*RXDE*/ 4 &UIC1 3 4>; | ||
106 | }; | ||
107 | |||
108 | POB0: opb { | ||
109 | compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb"; | ||
110 | #address-cells = <1>; | ||
111 | #size-cells = <1>; | ||
112 | /* Bamboo is oddball in the 44x world and doesn't use the ERPN | ||
113 | * bits. | ||
114 | */ | ||
115 | ranges = <00000000 0 00000000 80000000 | ||
116 | 80000000 0 80000000 80000000>; | ||
117 | interrupt-parent = <&UIC1>; | ||
118 | interrupts = <7 4>; | ||
119 | clock-frequency = <0>; /* Filled in by zImage */ | ||
120 | |||
121 | EBC0: ebc { | ||
122 | compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc"; | ||
123 | dcr-reg = <012 2>; | ||
124 | #address-cells = <2>; | ||
125 | #size-cells = <1>; | ||
126 | clock-frequency = <0>; /* Filled in by zImage */ | ||
127 | ranges; | ||
128 | interrupts = <5 1>; | ||
129 | interrupt-parent = <&UIC1>; | ||
130 | }; | ||
131 | |||
132 | UART0: serial@ef600300 { | ||
133 | device_type = "serial"; | ||
134 | compatible = "ns16550"; | ||
135 | reg = <ef600300 8>; | ||
136 | virtual-reg = <ef600300>; | ||
137 | clock-frequency = <0>; /* Filled in by zImage */ | ||
138 | current-speed = <1c200>; | ||
139 | interrupt-parent = <&UIC0>; | ||
140 | interrupts = <0 4>; | ||
141 | }; | ||
142 | |||
143 | UART1: serial@ef600400 { | ||
144 | device_type = "serial"; | ||
145 | compatible = "ns16550"; | ||
146 | reg = <ef600400 8>; | ||
147 | virtual-reg = <ef600400>; | ||
148 | clock-frequency = <0>; | ||
149 | current-speed = <0>; | ||
150 | interrupt-parent = <&UIC0>; | ||
151 | interrupts = <1 4>; | ||
152 | }; | ||
153 | |||
154 | UART2: serial@ef600500 { | ||
155 | device_type = "serial"; | ||
156 | compatible = "ns16550"; | ||
157 | reg = <ef600500 8>; | ||
158 | virtual-reg = <ef600500>; | ||
159 | clock-frequency = <0>; | ||
160 | current-speed = <0>; | ||
161 | interrupt-parent = <&UIC0>; | ||
162 | interrupts = <3 4>; | ||
163 | }; | ||
164 | |||
165 | UART3: serial@ef600600 { | ||
166 | device_type = "serial"; | ||
167 | compatible = "ns16550"; | ||
168 | reg = <ef600600 8>; | ||
169 | virtual-reg = <ef600600>; | ||
170 | clock-frequency = <0>; | ||
171 | current-speed = <0>; | ||
172 | interrupt-parent = <&UIC0>; | ||
173 | interrupts = <4 4>; | ||
174 | }; | ||
175 | |||
176 | IIC0: i2c@ef600700 { | ||
177 | device_type = "i2c"; | ||
178 | compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; | ||
179 | reg = <ef600700 14>; | ||
180 | interrupt-parent = <&UIC0>; | ||
181 | interrupts = <2 4>; | ||
182 | }; | ||
183 | |||
184 | IIC1: i2c@ef600800 { | ||
185 | device_type = "i2c"; | ||
186 | compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; | ||
187 | reg = <ef600800 14>; | ||
188 | interrupt-parent = <&UIC0>; | ||
189 | interrupts = <7 4>; | ||
190 | }; | ||
191 | |||
192 | ZMII0: emac-zmii@ef600d00 { | ||
193 | device_type = "zmii-interface"; | ||
194 | compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii"; | ||
195 | reg = <ef600d00 c>; | ||
196 | }; | ||
197 | |||
198 | EMAC0: ethernet@ef600e00 { | ||
199 | device_type = "network"; | ||
200 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | ||
201 | interrupt-parent = <&UIC1>; | ||
202 | interrupts = <1c 4 1d 4>; | ||
203 | reg = <ef600e00 70>; | ||
204 | local-mac-address = [000000000000]; | ||
205 | mal-device = <&MAL0>; | ||
206 | mal-tx-channel = <0 1>; | ||
207 | mal-rx-channel = <0>; | ||
208 | cell-index = <0>; | ||
209 | max-frame-size = <5dc>; | ||
210 | rx-fifo-size = <1000>; | ||
211 | tx-fifo-size = <800>; | ||
212 | phy-mode = "rmii"; | ||
213 | phy-map = <00000001>; | ||
214 | zmii-device = <&ZMII0>; | ||
215 | zmii-channel = <0>; | ||
216 | }; | ||
217 | |||
218 | EMAC1: ethernet@ef600f00 { | ||
219 | device_type = "network"; | ||
220 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | ||
221 | interrupt-parent = <&UIC1>; | ||
222 | interrupts = <1e 4 1f 4>; | ||
223 | reg = <ef600f00 70>; | ||
224 | local-mac-address = [000000000000]; | ||
225 | mal-device = <&MAL0>; | ||
226 | mal-tx-channel = <2 3>; | ||
227 | mal-rx-channel = <1>; | ||
228 | cell-index = <1>; | ||
229 | max-frame-size = <5dc>; | ||
230 | rx-fifo-size = <1000>; | ||
231 | tx-fifo-size = <800>; | ||
232 | phy-mode = "rmii"; | ||
233 | phy-map = <00000001>; | ||
234 | zmii-device = <&ZMII0>; | ||
235 | zmii-channel = <1>; | ||
236 | }; | ||
237 | }; | ||
238 | }; | ||
239 | |||
240 | chosen { | ||
241 | linux,stdout-path = "/plb/opb/serial@ef600300"; | ||
242 | bootargs = "console=ttyS0,115200"; | ||
243 | }; | ||
244 | }; | ||
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts index c5f99613fc7b..27a1463b6ab0 100644 --- a/arch/powerpc/boot/dts/ebony.dts +++ b/arch/powerpc/boot/dts/ebony.dts | |||
@@ -175,6 +175,7 @@ | |||
175 | fpga@7,0 { | 175 | fpga@7,0 { |
176 | compatible = "Ebony-FPGA"; | 176 | compatible = "Ebony-FPGA"; |
177 | reg = <7 0 10>; | 177 | reg = <7 0 10>; |
178 | virtual-reg = <e8300000>; | ||
178 | }; | 179 | }; |
179 | }; | 180 | }; |
180 | 181 | ||
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 1934b800278e..4d09dcad2537 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts | |||
@@ -10,207 +10,209 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | / { | 12 | / { |
13 | model = "MPC8272ADS"; | 13 | model = "MPC8272ADS"; |
14 | compatible = "MPC8260ADS"; | 14 | compatible = "MPC8260ADS"; |
15 | #address-cells = <1>; | 15 | #address-cells = <1>; |
16 | #size-cells = <1>; | 16 | #size-cells = <1>; |
17 | 17 | ||
18 | cpus { | 18 | cpus { |
19 | #address-cells = <1>; | 19 | #address-cells = <1>; |
20 | #size-cells = <0>; | 20 | #size-cells = <0>; |
21 | 21 | ||
22 | PowerPC,8272@0 { | 22 | PowerPC,8272@0 { |
23 | device_type = "cpu"; | 23 | device_type = "cpu"; |
24 | reg = <0>; | 24 | reg = <0>; |
25 | d-cache-line-size = <20>; // 32 bytes | 25 | d-cache-line-size = <20>; // 32 bytes |
26 | i-cache-line-size = <20>; // 32 bytes | 26 | i-cache-line-size = <20>; // 32 bytes |
27 | d-cache-size = <4000>; // L1, 16K | 27 | d-cache-size = <4000>; // L1, 16K |
28 | i-cache-size = <4000>; // L1, 16K | 28 | i-cache-size = <4000>; // L1, 16K |
29 | timebase-frequency = <0>; | 29 | timebase-frequency = <0>; |
30 | bus-frequency = <0>; | 30 | bus-frequency = <0>; |
31 | clock-frequency = <0>; | 31 | clock-frequency = <0>; |
32 | 32-bit; | 32 | 32-bit; |
33 | }; | 33 | }; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | pci_pic: interrupt-controller@f8200000 { | 36 | pci_pic: interrupt-controller@f8200000 { |
37 | #address-cells = <0>; | 37 | #address-cells = <0>; |
38 | #interrupt-cells = <2>; | 38 | #interrupt-cells = <2>; |
39 | interrupt-controller; | 39 | interrupt-controller; |
40 | reg = <f8200000 f8200004>; | 40 | reg = <f8200000 f8200004>; |
41 | built-in; | 41 | built-in; |
42 | device_type = "pci-pic"; | 42 | device_type = "pci-pic"; |
43 | }; | 43 | }; |
44 | memory { | 44 | |
45 | device_type = "memory"; | 45 | memory { |
46 | reg = <00000000 4000000 f4500000 00000020>; | 46 | device_type = "memory"; |
47 | }; | 47 | reg = <00000000 4000000 f4500000 00000020>; |
48 | 48 | }; | |
49 | chosen { | 49 | |
50 | name = "chosen"; | 50 | chosen { |
51 | linux,platform = <0>; | 51 | name = "chosen"; |
52 | linux,platform = <0>; | ||
52 | interrupt-controller = <&Cpm_pic>; | 53 | interrupt-controller = <&Cpm_pic>; |
53 | }; | 54 | }; |
54 | 55 | ||
55 | soc8272@f0000000 { | 56 | soc8272@f0000000 { |
56 | #address-cells = <1>; | 57 | #address-cells = <1>; |
57 | #size-cells = <1>; | 58 | #size-cells = <1>; |
58 | #interrupt-cells = <2>; | 59 | #interrupt-cells = <2>; |
59 | device_type = "soc"; | 60 | device_type = "soc"; |
60 | ranges = <00000000 f0000000 00053000>; | 61 | ranges = <00000000 f0000000 00053000>; |
61 | reg = <f0000000 10000>; | 62 | reg = <f0000000 10000>; |
62 | 63 | ||
63 | mdio@0 { | 64 | mdio@0 { |
64 | device_type = "mdio"; | 65 | device_type = "mdio"; |
65 | compatible = "fs_enet"; | 66 | compatible = "fs_enet"; |
66 | reg = <0 0>; | 67 | reg = <0 0>; |
67 | #address-cells = <1>; | 68 | #address-cells = <1>; |
68 | #size-cells = <0>; | 69 | #size-cells = <0>; |
70 | |||
69 | phy0:ethernet-phy@0 { | 71 | phy0:ethernet-phy@0 { |
70 | interrupt-parent = <&Cpm_pic>; | 72 | interrupt-parent = <&Cpm_pic>; |
71 | interrupts = <17 4>; | 73 | interrupts = <17 4>; |
72 | reg = <0>; | 74 | reg = <0>; |
73 | bitbang = [ 12 12 13 02 02 01 ]; | 75 | bitbang = [ 12 12 13 02 02 01 ]; |
74 | device_type = "ethernet-phy"; | 76 | device_type = "ethernet-phy"; |
75 | }; | 77 | }; |
78 | |||
76 | phy1:ethernet-phy@1 { | 79 | phy1:ethernet-phy@1 { |
77 | interrupt-parent = <&Cpm_pic>; | 80 | interrupt-parent = <&Cpm_pic>; |
78 | interrupts = <17 4>; | 81 | interrupts = <17 4>; |
79 | bitbang = [ 12 12 13 02 02 01 ]; | 82 | bitbang = [ 12 12 13 02 02 01 ]; |
80 | reg = <3>; | 83 | reg = <3>; |
81 | device_type = "ethernet-phy"; | 84 | device_type = "ethernet-phy"; |
82 | }; | 85 | }; |
83 | }; | 86 | }; |
84 | 87 | ||
85 | ethernet@24000 { | 88 | ethernet@24000 { |
86 | #address-cells = <1>; | 89 | #address-cells = <1>; |
87 | #size-cells = <0>; | 90 | #size-cells = <0>; |
88 | device_type = "network"; | 91 | device_type = "network"; |
89 | device-id = <1>; | 92 | device-id = <1>; |
90 | compatible = "fs_enet"; | 93 | compatible = "fs_enet"; |
91 | model = "FCC"; | 94 | model = "FCC"; |
92 | reg = <11300 20 8400 100 11380 30>; | 95 | reg = <11300 20 8400 100 11380 30>; |
93 | mac-address = [ 00 11 2F 99 43 54 ]; | 96 | mac-address = [ 00 11 2F 99 43 54 ]; |
94 | interrupts = <20 2>; | 97 | interrupts = <20 2>; |
95 | interrupt-parent = <&Cpm_pic>; | 98 | interrupt-parent = <&Cpm_pic>; |
96 | phy-handle = <&Phy0>; | 99 | phy-handle = <&Phy0>; |
97 | rx-clock = <13>; | 100 | rx-clock = <13>; |
98 | tx-clock = <12>; | 101 | tx-clock = <12>; |
99 | }; | 102 | }; |
100 | 103 | ||
101 | ethernet@25000 { | 104 | ethernet@25000 { |
102 | device_type = "network"; | 105 | device_type = "network"; |
103 | device-id = <2>; | 106 | device-id = <2>; |
104 | compatible = "fs_enet"; | 107 | compatible = "fs_enet"; |
105 | model = "FCC"; | 108 | model = "FCC"; |
106 | reg = <11320 20 8500 100 113b0 30>; | 109 | reg = <11320 20 8500 100 113b0 30>; |
107 | mac-address = [ 00 11 2F 99 44 54 ]; | 110 | mac-address = [ 00 11 2F 99 44 54 ]; |
108 | interrupts = <21 2>; | 111 | interrupts = <21 2>; |
109 | interrupt-parent = <&Cpm_pic>; | 112 | interrupt-parent = <&Cpm_pic>; |
110 | phy-handle = <&Phy1>; | 113 | phy-handle = <&Phy1>; |
111 | rx-clock = <17>; | 114 | rx-clock = <17>; |
112 | tx-clock = <18>; | 115 | tx-clock = <18>; |
113 | }; | 116 | }; |
114 | 117 | ||
115 | cpm@f0000000 { | 118 | cpm@f0000000 { |
116 | #address-cells = <1>; | 119 | #address-cells = <1>; |
117 | #size-cells = <1>; | 120 | #size-cells = <1>; |
118 | #interrupt-cells = <2>; | 121 | #interrupt-cells = <2>; |
119 | device_type = "cpm"; | 122 | device_type = "cpm"; |
120 | model = "CPM2"; | 123 | model = "CPM2"; |
121 | ranges = <00000000 00000000 20000>; | 124 | ranges = <00000000 00000000 20000>; |
122 | reg = <0 20000>; | 125 | reg = <0 20000>; |
123 | command-proc = <119c0>; | 126 | command-proc = <119c0>; |
124 | brg-frequency = <17D7840>; | 127 | brg-frequency = <17D7840>; |
125 | cpm_clk = <BEBC200>; | 128 | cpm_clk = <BEBC200>; |
126 | 129 | ||
127 | scc@11a00 { | 130 | scc@11a00 { |
128 | device_type = "serial"; | 131 | device_type = "serial"; |
129 | compatible = "cpm_uart"; | 132 | compatible = "cpm_uart"; |
130 | model = "SCC"; | 133 | model = "SCC"; |
131 | device-id = <1>; | 134 | device-id = <1>; |
132 | reg = <11a00 20 8000 100>; | 135 | reg = <11a00 20 8000 100>; |
133 | current-speed = <1c200>; | 136 | current-speed = <1c200>; |
134 | interrupts = <28 2>; | 137 | interrupts = <28 2>; |
135 | interrupt-parent = <&Cpm_pic>; | 138 | interrupt-parent = <&Cpm_pic>; |
136 | clock-setup = <0 00ffffff>; | 139 | clock-setup = <0 00ffffff>; |
137 | rx-clock = <1>; | 140 | rx-clock = <1>; |
138 | tx-clock = <1>; | 141 | tx-clock = <1>; |
139 | }; | 142 | }; |
140 | 143 | ||
141 | scc@11a60 { | 144 | scc@11a60 { |
142 | device_type = "serial"; | 145 | device_type = "serial"; |
143 | compatible = "cpm_uart"; | 146 | compatible = "cpm_uart"; |
144 | model = "SCC"; | 147 | model = "SCC"; |
145 | device-id = <4>; | 148 | device-id = <4>; |
146 | reg = <11a60 20 8300 100>; | 149 | reg = <11a60 20 8300 100>; |
147 | current-speed = <1c200>; | 150 | current-speed = <1c200>; |
148 | interrupts = <2b 2>; | 151 | interrupts = <2b 2>; |
149 | interrupt-parent = <&Cpm_pic>; | 152 | interrupt-parent = <&Cpm_pic>; |
150 | clock-setup = <1b ffffff00>; | 153 | clock-setup = <1b ffffff00>; |
151 | rx-clock = <4>; | 154 | rx-clock = <4>; |
152 | tx-clock = <4>; | 155 | tx-clock = <4>; |
153 | }; | 156 | }; |
154 | 157 | }; | |
155 | }; | 158 | |
156 | cpm_pic:interrupt-controller@10c00 { | 159 | cpm_pic:interrupt-controller@10c00 { |
157 | #address-cells = <0>; | 160 | #address-cells = <0>; |
158 | #interrupt-cells = <2>; | 161 | #interrupt-cells = <2>; |
159 | interrupt-controller; | 162 | interrupt-controller; |
160 | reg = <10c00 80>; | 163 | reg = <10c00 80>; |
161 | built-in; | 164 | built-in; |
162 | device_type = "cpm-pic"; | 165 | device_type = "cpm-pic"; |
163 | compatible = "CPM2"; | 166 | compatible = "CPM2"; |
164 | }; | 167 | }; |
165 | pci@0500 { | 168 | |
166 | #interrupt-cells = <1>; | 169 | pci@0500 { |
167 | #size-cells = <2>; | 170 | #interrupt-cells = <1>; |
168 | #address-cells = <3>; | 171 | #size-cells = <2>; |
169 | compatible = "8272"; | 172 | #address-cells = <3>; |
170 | device_type = "pci"; | 173 | compatible = "8272"; |
171 | reg = <10430 4dc>; | 174 | device_type = "pci"; |
172 | clock-frequency = <3f940aa>; | 175 | reg = <10430 4dc>; |
173 | interrupt-map-mask = <f800 0 0 7>; | 176 | clock-frequency = <3f940aa>; |
174 | interrupt-map = < | 177 | interrupt-map-mask = <f800 0 0 7>; |
175 | 178 | interrupt-map = < | |
176 | /* IDSEL 0x16 */ | 179 | /* IDSEL 0x16 */ |
177 | b000 0 0 1 f8200000 40 8 | 180 | b000 0 0 1 f8200000 40 8 |
178 | b000 0 0 2 f8200000 41 8 | 181 | b000 0 0 2 f8200000 41 8 |
179 | b000 0 0 3 f8200000 42 8 | 182 | b000 0 0 3 f8200000 42 8 |
180 | b000 0 0 4 f8200000 43 8 | 183 | b000 0 0 4 f8200000 43 8 |
181 | 184 | ||
182 | /* IDSEL 0x17 */ | 185 | /* IDSEL 0x17 */ |
183 | b800 0 0 1 f8200000 43 8 | 186 | b800 0 0 1 f8200000 43 8 |
184 | b800 0 0 2 f8200000 40 8 | 187 | b800 0 0 2 f8200000 40 8 |
185 | b800 0 0 3 f8200000 41 8 | 188 | b800 0 0 3 f8200000 41 8 |
186 | b800 0 0 4 f8200000 42 8 | 189 | b800 0 0 4 f8200000 42 8 |
187 | 190 | ||
188 | /* IDSEL 0x18 */ | 191 | /* IDSEL 0x18 */ |
189 | c000 0 0 1 f8200000 42 8 | 192 | c000 0 0 1 f8200000 42 8 |
190 | c000 0 0 2 f8200000 43 8 | 193 | c000 0 0 2 f8200000 43 8 |
191 | c000 0 0 3 f8200000 40 8 | 194 | c000 0 0 3 f8200000 40 8 |
192 | c000 0 0 4 f8200000 41 8>; | 195 | c000 0 0 4 f8200000 41 8>; |
193 | interrupt-parent = <&Cpm_pic>; | 196 | interrupt-parent = <&Cpm_pic>; |
194 | interrupts = <14 8>; | 197 | interrupts = <14 8>; |
195 | bus-range = <0 0>; | 198 | bus-range = <0 0>; |
196 | ranges = <02000000 0 80000000 80000000 0 40000000 | 199 | ranges = <02000000 0 80000000 80000000 0 40000000 |
197 | 01000000 0 00000000 f6000000 0 02000000>; | 200 | 01000000 0 00000000 f6000000 0 02000000>; |
198 | }; | 201 | }; |
199 | 202 | ||
200 | /* May need to remove if on a part without crypto engine */ | 203 | /* May need to remove if on a part without crypto engine */ |
201 | crypto@30000 { | 204 | crypto@30000 { |
202 | device_type = "crypto"; | 205 | device_type = "crypto"; |
203 | model = "SEC2"; | 206 | model = "SEC2"; |
204 | compatible = "talitos"; | 207 | compatible = "talitos"; |
205 | reg = <30000 10000>; | 208 | reg = <30000 10000>; |
206 | interrupts = <b 2>; | 209 | interrupts = <b 2>; |
207 | interrupt-parent = <&Cpm_pic>; | 210 | interrupt-parent = <&Cpm_pic>; |
208 | num-channels = <4>; | 211 | num-channels = <4>; |
209 | channel-fifo-len = <18>; | 212 | channel-fifo-len = <18>; |
210 | exec-units-mask = <0000007e>; | 213 | exec-units-mask = <0000007e>; |
211 | /* desc mask is for rev1.x, we need runtime fixup for >=2.x */ | 214 | /* desc mask is for rev1.x, we need runtime fixup for >=2.x */ |
212 | descriptor-types-mask = <01010ebf>; | 215 | descriptor-types-mask = <01010ebf>; |
213 | }; | 216 | }; |
214 | 217 | }; | |
215 | }; | ||
216 | }; | 218 | }; |
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c index 75daedafd0a4..86c0f5df0a86 100644 --- a/arch/powerpc/boot/ebony.c +++ b/arch/powerpc/boot/ebony.c | |||
@@ -24,12 +24,11 @@ | |||
24 | #include "page.h" | 24 | #include "page.h" |
25 | #include "ops.h" | 25 | #include "ops.h" |
26 | #include "reg.h" | 26 | #include "reg.h" |
27 | #include "io.h" | ||
27 | #include "dcr.h" | 28 | #include "dcr.h" |
29 | #include "4xx.h" | ||
28 | #include "44x.h" | 30 | #include "44x.h" |
29 | 31 | ||
30 | extern char _dtb_start[]; | ||
31 | extern char _dtb_end[]; | ||
32 | |||
33 | static u8 *ebony_mac0, *ebony_mac1; | 32 | static u8 *ebony_mac0, *ebony_mac1; |
34 | 33 | ||
35 | /* Calculate 440GP clocks */ | 34 | /* Calculate 440GP clocks */ |
@@ -92,15 +91,53 @@ void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) | |||
92 | dt_fixup_clock("/plb/opb/serial@40000300", uart1); | 91 | dt_fixup_clock("/plb/opb/serial@40000300", uart1); |
93 | } | 92 | } |
94 | 93 | ||
94 | #define EBONY_FPGA_PATH "/plb/opb/ebc/fpga" | ||
95 | #define EBONY_FPGA_FLASH_SEL 0x01 | ||
96 | #define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash" | ||
97 | |||
98 | static void ebony_flashsel_fixup(void) | ||
99 | { | ||
100 | void *devp; | ||
101 | u32 reg[3] = {0x0, 0x0, 0x80000}; | ||
102 | u8 *fpga; | ||
103 | u8 fpga_reg0 = 0x0; | ||
104 | |||
105 | devp = finddevice(EBONY_FPGA_PATH); | ||
106 | if (!devp) | ||
107 | fatal("Couldn't locate FPGA node %s\n\r", EBONY_FPGA_PATH); | ||
108 | |||
109 | if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) | ||
110 | fatal("%s has missing or invalid virtual-reg property\n\r", | ||
111 | EBONY_FPGA_PATH); | ||
112 | |||
113 | fpga_reg0 = in_8(fpga); | ||
114 | |||
115 | devp = finddevice(EBONY_SMALL_FLASH_PATH); | ||
116 | if (!devp) | ||
117 | fatal("Couldn't locate small flash node %s\n\r", | ||
118 | EBONY_SMALL_FLASH_PATH); | ||
119 | |||
120 | if (getprop(devp, "reg", reg, sizeof(reg)) != sizeof(reg)) | ||
121 | fatal("%s has reg property of unexpected size\n\r", | ||
122 | EBONY_SMALL_FLASH_PATH); | ||
123 | |||
124 | /* Invert address bit 14 (IBM-endian) if FLASH_SEL fpga bit is set */ | ||
125 | if (fpga_reg0 & EBONY_FPGA_FLASH_SEL) | ||
126 | reg[1] ^= 0x80000; | ||
127 | |||
128 | setprop(devp, "reg", reg, sizeof(reg)); | ||
129 | } | ||
130 | |||
95 | static void ebony_fixups(void) | 131 | static void ebony_fixups(void) |
96 | { | 132 | { |
97 | // FIXME: sysclk should be derived by reading the FPGA registers | 133 | // FIXME: sysclk should be derived by reading the FPGA registers |
98 | unsigned long sysclk = 33000000; | 134 | unsigned long sysclk = 33000000; |
99 | 135 | ||
100 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); | 136 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); |
101 | ibm44x_fixup_memsize(); | 137 | ibm4xx_fixup_memsize(); |
102 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); | 138 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); |
103 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 139 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
140 | ebony_flashsel_fixup(); | ||
104 | } | 141 | } |
105 | 142 | ||
106 | void ebony_init(void *mac0, void *mac1) | 143 | void ebony_init(void *mac0, void *mac1) |
diff --git a/arch/powerpc/boot/holly.c b/arch/powerpc/boot/holly.c index 7d6539f5e22c..199e783aea4d 100644 --- a/arch/powerpc/boot/holly.c +++ b/arch/powerpc/boot/holly.c | |||
@@ -21,11 +21,6 @@ | |||
21 | #include "ops.h" | 21 | #include "ops.h" |
22 | #include "io.h" | 22 | #include "io.h" |
23 | 23 | ||
24 | extern char _start[]; | ||
25 | extern char _end[]; | ||
26 | extern char _dtb_start[]; | ||
27 | extern char _dtb_end[]; | ||
28 | |||
29 | BSS_STACK(4096); | 24 | BSS_STACK(4096); |
30 | 25 | ||
31 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) | 26 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) |
diff --git a/arch/powerpc/boot/io.h b/arch/powerpc/boot/io.h index 32974ed49e02..ccaedaec50d5 100644 --- a/arch/powerpc/boot/io.h +++ b/arch/powerpc/boot/io.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef _IO_H | 1 | #ifndef _IO_H |
2 | #define __IO_H | 2 | #define __IO_H |
3 | |||
4 | #include "types.h" | ||
5 | |||
3 | /* | 6 | /* |
4 | * Low-level I/O routines. | 7 | * Low-level I/O routines. |
5 | * | 8 | * |
@@ -20,6 +23,37 @@ static inline void out_8(volatile unsigned char *addr, int val) | |||
20 | : "=m" (*addr) : "r" (val)); | 23 | : "=m" (*addr) : "r" (val)); |
21 | } | 24 | } |
22 | 25 | ||
26 | static inline unsigned in_le16(const volatile u16 *addr) | ||
27 | { | ||
28 | unsigned ret; | ||
29 | |||
30 | __asm__ __volatile__("lhbrx %0,0,%1; twi 0,%0,0; isync" | ||
31 | : "=r" (ret) : "r" (addr), "m" (*addr)); | ||
32 | |||
33 | return ret; | ||
34 | } | ||
35 | |||
36 | static inline unsigned in_be16(const volatile u16 *addr) | ||
37 | { | ||
38 | unsigned ret; | ||
39 | |||
40 | __asm__ __volatile__("lhz%U1%X1 %0,%1; twi 0,%0,0; isync" | ||
41 | : "=r" (ret) : "m" (*addr)); | ||
42 | return ret; | ||
43 | } | ||
44 | |||
45 | static inline void out_le16(volatile u16 *addr, int val) | ||
46 | { | ||
47 | __asm__ __volatile__("sthbrx %1,0,%2; sync" : "=m" (*addr) | ||
48 | : "r" (val), "r" (addr)); | ||
49 | } | ||
50 | |||
51 | static inline void out_be16(volatile u16 *addr, int val) | ||
52 | { | ||
53 | __asm__ __volatile__("sth%U0%X0 %1,%0; sync" | ||
54 | : "=m" (*addr) : "r" (val)); | ||
55 | } | ||
56 | |||
23 | static inline unsigned in_le32(const volatile unsigned *addr) | 57 | static inline unsigned in_le32(const volatile unsigned *addr) |
24 | { | 58 | { |
25 | unsigned ret; | 59 | unsigned ret; |
@@ -50,4 +84,19 @@ static inline void out_be32(volatile unsigned *addr, int val) | |||
50 | : "=m" (*addr) : "r" (val)); | 84 | : "=m" (*addr) : "r" (val)); |
51 | } | 85 | } |
52 | 86 | ||
87 | static inline void sync(void) | ||
88 | { | ||
89 | asm volatile("sync" : : : "memory"); | ||
90 | } | ||
91 | |||
92 | static inline void eieio(void) | ||
93 | { | ||
94 | asm volatile("eieio" : : : "memory"); | ||
95 | } | ||
96 | |||
97 | static inline void barrier(void) | ||
98 | { | ||
99 | asm volatile("" : : : "memory"); | ||
100 | } | ||
101 | |||
53 | #endif /* _IO_H */ | 102 | #endif /* _IO_H */ |
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 416dc3857bfe..1b496b37eca0 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -19,16 +19,6 @@ | |||
19 | #include "flatdevtree.h" | 19 | #include "flatdevtree.h" |
20 | #include "reg.h" | 20 | #include "reg.h" |
21 | 21 | ||
22 | extern char _start[]; | ||
23 | extern char __bss_start[]; | ||
24 | extern char _end[]; | ||
25 | extern char _vmlinux_start[]; | ||
26 | extern char _vmlinux_end[]; | ||
27 | extern char _initrd_start[]; | ||
28 | extern char _initrd_end[]; | ||
29 | extern char _dtb_start[]; | ||
30 | extern char _dtb_end[]; | ||
31 | |||
32 | static struct gunzip_state gzstate; | 22 | static struct gunzip_state gzstate; |
33 | 23 | ||
34 | struct addr_range { | 24 | struct addr_range { |
diff --git a/arch/powerpc/boot/mpsc.c b/arch/powerpc/boot/mpsc.c index f1c0e965e5ce..802ea53790d8 100644 --- a/arch/powerpc/boot/mpsc.c +++ b/arch/powerpc/boot/mpsc.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include "io.h" | 17 | #include "io.h" |
18 | #include "ops.h" | 18 | #include "ops.h" |
19 | 19 | ||
20 | extern void udelay(long delay); | ||
21 | 20 | ||
22 | #define MPSC_CHR_1 0x000c | 21 | #define MPSC_CHR_1 0x000c |
23 | 22 | ||
diff --git a/arch/powerpc/boot/mv64x60_i2c.c b/arch/powerpc/boot/mv64x60_i2c.c index 435fe8528680..d085377be3bc 100644 --- a/arch/powerpc/boot/mv64x60_i2c.c +++ b/arch/powerpc/boot/mv64x60_i2c.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include "ops.h" | 21 | #include "ops.h" |
22 | #include "mv64x60.h" | 22 | #include "mv64x60.h" |
23 | 23 | ||
24 | extern void udelay(long); | ||
25 | |||
26 | /* Register defines */ | 24 | /* Register defines */ |
27 | #define MV64x60_I2C_REG_SLAVE_ADDR 0x00 | 25 | #define MV64x60_I2C_REG_SLAVE_ADDR 0x00 |
28 | #define MV64x60_I2C_REG_DATA 0x04 | 26 | #define MV64x60_I2C_REG_DATA 0x04 |
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c index 385e08b83b7e..61d9899aa0d0 100644 --- a/arch/powerpc/boot/of.c +++ b/arch/powerpc/boot/of.c | |||
@@ -17,8 +17,6 @@ | |||
17 | 17 | ||
18 | #include "of.h" | 18 | #include "of.h" |
19 | 19 | ||
20 | extern char _end[]; | ||
21 | |||
22 | /* Value picked to match that used by yaboot */ | 20 | /* Value picked to match that used by yaboot */ |
23 | #define PROG_START 0x01400000 /* only used on 64-bit systems */ | 21 | #define PROG_START 0x01400000 /* only used on 64-bit systems */ |
24 | #define RAM_END (512<<20) /* Fixme: use OF */ | 22 | #define RAM_END (512<<20) /* Fixme: use OF */ |
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 86077066cd7c..45c2268d5c56 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h | |||
@@ -82,11 +82,14 @@ int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); | |||
82 | int serial_console_init(void); | 82 | int serial_console_init(void); |
83 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); | 83 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); |
84 | int mpsc_console_init(void *devp, struct serial_console_data *scdp); | 84 | int mpsc_console_init(void *devp, struct serial_console_data *scdp); |
85 | int cpm_console_init(void *devp, struct serial_console_data *scdp); | ||
85 | void *simple_alloc_init(char *base, unsigned long heap_size, | 86 | void *simple_alloc_init(char *base, unsigned long heap_size, |
86 | unsigned long granularity, unsigned long max_allocs); | 87 | unsigned long granularity, unsigned long max_allocs); |
87 | extern void flush_cache(void *, unsigned long); | 88 | extern void flush_cache(void *, unsigned long); |
88 | int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size); | 89 | int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size); |
89 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr); | 90 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr); |
91 | int dt_is_compatible(void *node, const char *compat); | ||
92 | void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize); | ||
90 | 93 | ||
91 | static inline void *finddevice(const char *name) | 94 | static inline void *finddevice(const char *name) |
92 | { | 95 | { |
@@ -191,4 +194,25 @@ static inline void exit(void) | |||
191 | static char _bss_stack[size]; \ | 194 | static char _bss_stack[size]; \ |
192 | void *_platform_stack_top = _bss_stack + sizeof(_bss_stack); | 195 | void *_platform_stack_top = _bss_stack + sizeof(_bss_stack); |
193 | 196 | ||
197 | extern unsigned long timebase_period_ns; | ||
198 | void udelay(long delay); | ||
199 | |||
200 | extern char _start[]; | ||
201 | extern char __bss_start[]; | ||
202 | extern char _end[]; | ||
203 | extern char _vmlinux_start[]; | ||
204 | extern char _vmlinux_end[]; | ||
205 | extern char _initrd_start[]; | ||
206 | extern char _initrd_end[]; | ||
207 | extern char _dtb_start[]; | ||
208 | extern char _dtb_end[]; | ||
209 | |||
210 | static inline __attribute__((const)) | ||
211 | int __ilog2_u32(u32 n) | ||
212 | { | ||
213 | int bit; | ||
214 | asm ("cntlzw %0,%1" : "=r" (bit) : "r" (n)); | ||
215 | return 31 - bit; | ||
216 | } | ||
217 | |||
194 | #endif /* _PPC_BOOT_OPS_H_ */ | 218 | #endif /* _PPC_BOOT_OPS_H_ */ |
diff --git a/arch/powerpc/boot/ppcboot.h b/arch/powerpc/boot/ppcboot.h index 5290ff2c2b2b..6ae6f9063952 100644 --- a/arch/powerpc/boot/ppcboot.h +++ b/arch/powerpc/boot/ppcboot.h | |||
@@ -78,17 +78,18 @@ typedef struct bd_info { | |||
78 | hymod_conf_t bi_hymod_conf; /* hymod configuration information */ | 78 | hymod_conf_t bi_hymod_conf; /* hymod configuration information */ |
79 | #endif | 79 | #endif |
80 | #if defined(TARGET_EVB64260) || defined(TARGET_405EP) || defined(TARGET_44x) || \ | 80 | #if defined(TARGET_EVB64260) || defined(TARGET_405EP) || defined(TARGET_44x) || \ |
81 | defined(TARGET_85xx) || defined(TARGET_83xx) | 81 | defined(TARGET_85xx) || defined(TARGET_83xx) || defined(TARGET_HAS_ETH1) |
82 | /* second onboard ethernet port */ | 82 | /* second onboard ethernet port */ |
83 | unsigned char bi_enet1addr[6]; | 83 | unsigned char bi_enet1addr[6]; |
84 | #define HAVE_ENET1ADDR | 84 | #define HAVE_ENET1ADDR |
85 | #endif | 85 | #endif |
86 | #if defined(TARGET_EVB64260) || defined(TARGET_440GX) || defined(TARGET_85xx) | 86 | #if defined(TARGET_EVB64260) || defined(TARGET_440GX) || \ |
87 | defined(TARGET_85xx) || defined(TARGET_HAS_ETH2) | ||
87 | /* third onboard ethernet ports */ | 88 | /* third onboard ethernet ports */ |
88 | unsigned char bi_enet2addr[6]; | 89 | unsigned char bi_enet2addr[6]; |
89 | #define HAVE_ENET2ADDR | 90 | #define HAVE_ENET2ADDR |
90 | #endif | 91 | #endif |
91 | #if defined(TARGET_440GX) | 92 | #if defined(TARGET_440GX) || defined(TARGET_HAS_ETH3) |
92 | /* fourth onboard ethernet ports */ | 93 | /* fourth onboard ethernet ports */ |
93 | unsigned char bi_enet3addr[6]; | 94 | unsigned char bi_enet3addr[6]; |
94 | #define HAVE_ENET3ADDR | 95 | #define HAVE_ENET3ADDR |
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c index f428bac10d4a..9614e1db9dae 100644 --- a/arch/powerpc/boot/prpmc2800.c +++ b/arch/powerpc/boot/prpmc2800.c | |||
@@ -21,12 +21,6 @@ | |||
21 | #include "gunzip_util.h" | 21 | #include "gunzip_util.h" |
22 | #include "mv64x60.h" | 22 | #include "mv64x60.h" |
23 | 23 | ||
24 | extern char _end[]; | ||
25 | extern char _vmlinux_start[], _vmlinux_end[]; | ||
26 | extern char _dtb_start[], _dtb_end[]; | ||
27 | |||
28 | extern void udelay(long delay); | ||
29 | |||
30 | #define KB 1024U | 24 | #define KB 1024U |
31 | #define MB (KB*KB) | 25 | #define MB (KB*KB) |
32 | #define GB (KB*MB) | 26 | #define GB (KB*MB) |
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index 893d59339c26..d6661151b494 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c | |||
@@ -120,10 +120,6 @@ void ps3_copy_vectors(void) | |||
120 | 120 | ||
121 | void platform_init(void) | 121 | void platform_init(void) |
122 | { | 122 | { |
123 | extern char _end[]; | ||
124 | extern char _dtb_start[]; | ||
125 | extern char _initrd_start[]; | ||
126 | extern char _initrd_end[]; | ||
127 | const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ | 123 | const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ |
128 | void *chosen; | 124 | void *chosen; |
129 | unsigned long ft_addr; | 125 | unsigned long ft_addr; |
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c index eaa0d3ae3518..d47f8e0b4b81 100644 --- a/arch/powerpc/boot/serial.c +++ b/arch/powerpc/boot/serial.c | |||
@@ -19,8 +19,6 @@ | |||
19 | #include "io.h" | 19 | #include "io.h" |
20 | #include "ops.h" | 20 | #include "ops.h" |
21 | 21 | ||
22 | extern void udelay(long delay); | ||
23 | |||
24 | static int serial_open(void) | 22 | static int serial_open(void) |
25 | { | 23 | { |
26 | struct serial_console_data *scdp = console_ops.data; | 24 | struct serial_console_data *scdp = console_ops.data; |
@@ -114,29 +112,32 @@ int serial_console_init(void) | |||
114 | { | 112 | { |
115 | void *devp; | 113 | void *devp; |
116 | int rc = -1; | 114 | int rc = -1; |
117 | char compat[MAX_PROP_LEN]; | ||
118 | 115 | ||
119 | devp = serial_get_stdout_devp(); | 116 | devp = serial_get_stdout_devp(); |
120 | if (devp == NULL) | 117 | if (devp == NULL) |
121 | goto err_out; | 118 | goto err_out; |
122 | 119 | ||
123 | if (getprop(devp, "compatible", compat, sizeof(compat)) < 0) | 120 | if (dt_is_compatible(devp, "ns16550")) |
124 | goto err_out; | ||
125 | |||
126 | if (!strcmp(compat, "ns16550")) | ||
127 | rc = ns16550_console_init(devp, &serial_cd); | 121 | rc = ns16550_console_init(devp, &serial_cd); |
128 | else if (!strcmp(compat, "marvell,mpsc")) | 122 | else if (dt_is_compatible(devp, "marvell,mpsc")) |
129 | rc = mpsc_console_init(devp, &serial_cd); | 123 | rc = mpsc_console_init(devp, &serial_cd); |
124 | else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") || | ||
125 | dt_is_compatible(devp, "fsl,cpm1-smc-uart") || | ||
126 | dt_is_compatible(devp, "fsl,cpm2-scc-uart") || | ||
127 | dt_is_compatible(devp, "fsl,cpm2-smc-uart")) | ||
128 | rc = cpm_console_init(devp, &serial_cd); | ||
130 | 129 | ||
131 | /* Add other serial console driver calls here */ | 130 | /* Add other serial console driver calls here */ |
132 | 131 | ||
133 | if (!rc) { | 132 | if (!rc) { |
134 | console_ops.open = serial_open; | 133 | console_ops.open = serial_open; |
135 | console_ops.write = serial_write; | 134 | console_ops.write = serial_write; |
136 | console_ops.edit_cmdline = serial_edit_cmdline; | ||
137 | console_ops.close = serial_close; | 135 | console_ops.close = serial_close; |
138 | console_ops.data = &serial_cd; | 136 | console_ops.data = &serial_cd; |
139 | 137 | ||
138 | if (serial_cd.getc) | ||
139 | console_ops.edit_cmdline = serial_edit_cmdline; | ||
140 | |||
140 | return 0; | 141 | return 0; |
141 | } | 142 | } |
142 | err_out: | 143 | err_out: |
diff --git a/arch/powerpc/boot/treeboot-bamboo.c b/arch/powerpc/boot/treeboot-bamboo.c new file mode 100644 index 000000000000..1f1fe5aaac12 --- /dev/null +++ b/arch/powerpc/boot/treeboot-bamboo.c | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright IBM Corporation, 2007 | ||
3 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
4 | * | ||
5 | * Based on ebony wrapper: | ||
6 | * Copyright 2007 David Gibson, IBM Corporation. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; version 2 of the License | ||
11 | */ | ||
12 | #include "ops.h" | ||
13 | #include "stdio.h" | ||
14 | #include "44x.h" | ||
15 | |||
16 | extern char _end[]; | ||
17 | |||
18 | BSS_STACK(4096); | ||
19 | |||
20 | void platform_init(void) | ||
21 | { | ||
22 | unsigned long end_of_ram = 0x8000000; | ||
23 | unsigned long avail_ram = end_of_ram - (unsigned long)_end; | ||
24 | |||
25 | simple_alloc_init(_end, avail_ram, 32, 64); | ||
26 | bamboo_init(); | ||
27 | } | ||
diff --git a/arch/powerpc/boot/treeboot-ebony.c b/arch/powerpc/boot/treeboot-ebony.c index 8436a9c55192..21cc4834a384 100644 --- a/arch/powerpc/boot/treeboot-ebony.c +++ b/arch/powerpc/boot/treeboot-ebony.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include "stdio.h" | 16 | #include "stdio.h" |
17 | #include "44x.h" | 17 | #include "44x.h" |
18 | 18 | ||
19 | extern char _end[]; | ||
20 | |||
21 | BSS_STACK(4096); | 19 | BSS_STACK(4096); |
22 | 20 | ||
23 | #define OPENBIOS_MAC_BASE 0xfffffe0c | 21 | #define OPENBIOS_MAC_BASE 0xfffffe0c |
diff --git a/arch/powerpc/configs/bamboo_defconfig b/arch/powerpc/configs/bamboo_defconfig new file mode 100644 index 000000000000..b592dec4640f --- /dev/null +++ b/arch/powerpc/configs/bamboo_defconfig | |||
@@ -0,0 +1,775 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23-rc1 | ||
4 | # Fri Aug 3 10:46:53 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | CONFIG_44x=y | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | CONFIG_4xx=y | ||
19 | CONFIG_BOOKE=y | ||
20 | CONFIG_PTE_64BIT=y | ||
21 | CONFIG_PHYS_64BIT=y | ||
22 | # CONFIG_PPC_MM_SLICES is not set | ||
23 | CONFIG_NOT_COHERENT_CACHE=y | ||
24 | CONFIG_PPC32=y | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_HARDIRQS=y | ||
28 | CONFIG_IRQ_PER_CPU=y | ||
29 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
30 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
31 | CONFIG_GENERIC_HWEIGHT=y | ||
32 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
33 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
34 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
35 | CONFIG_PPC=y | ||
36 | CONFIG_EARLY_PRINTK=y | ||
37 | CONFIG_GENERIC_NVRAM=y | ||
38 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
39 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
40 | CONFIG_PPC_OF=y | ||
41 | CONFIG_OF=y | ||
42 | CONFIG_PPC_UDBG_16550=y | ||
43 | # CONFIG_GENERIC_TBSYNC is not set | ||
44 | CONFIG_AUDIT_ARCH=y | ||
45 | CONFIG_GENERIC_BUG=y | ||
46 | # CONFIG_DEFAULT_UIMAGE is not set | ||
47 | CONFIG_PPC_DCR_NATIVE=y | ||
48 | # CONFIG_PPC_DCR_MMIO is not set | ||
49 | CONFIG_PPC_DCR=y | ||
50 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
51 | |||
52 | # | ||
53 | # General setup | ||
54 | # | ||
55 | CONFIG_EXPERIMENTAL=y | ||
56 | CONFIG_BROKEN_ON_SMP=y | ||
57 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
58 | CONFIG_LOCALVERSION="" | ||
59 | CONFIG_LOCALVERSION_AUTO=y | ||
60 | CONFIG_SWAP=y | ||
61 | CONFIG_SYSVIPC=y | ||
62 | CONFIG_SYSVIPC_SYSCTL=y | ||
63 | CONFIG_POSIX_MQUEUE=y | ||
64 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
65 | # CONFIG_TASKSTATS is not set | ||
66 | # CONFIG_USER_NS is not set | ||
67 | # CONFIG_AUDIT is not set | ||
68 | # CONFIG_IKCONFIG is not set | ||
69 | CONFIG_LOG_BUF_SHIFT=14 | ||
70 | CONFIG_SYSFS_DEPRECATED=y | ||
71 | # CONFIG_RELAY is not set | ||
72 | CONFIG_BLK_DEV_INITRD=y | ||
73 | CONFIG_INITRAMFS_SOURCE="" | ||
74 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
75 | CONFIG_SYSCTL=y | ||
76 | CONFIG_EMBEDDED=y | ||
77 | CONFIG_SYSCTL_SYSCALL=y | ||
78 | CONFIG_KALLSYMS=y | ||
79 | # CONFIG_KALLSYMS_ALL is not set | ||
80 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
81 | CONFIG_HOTPLUG=y | ||
82 | CONFIG_PRINTK=y | ||
83 | CONFIG_BUG=y | ||
84 | CONFIG_ELF_CORE=y | ||
85 | CONFIG_BASE_FULL=y | ||
86 | CONFIG_FUTEX=y | ||
87 | CONFIG_ANON_INODES=y | ||
88 | CONFIG_EPOLL=y | ||
89 | CONFIG_SIGNALFD=y | ||
90 | CONFIG_TIMERFD=y | ||
91 | CONFIG_EVENTFD=y | ||
92 | CONFIG_SHMEM=y | ||
93 | CONFIG_VM_EVENT_COUNTERS=y | ||
94 | CONFIG_SLAB=y | ||
95 | # CONFIG_SLUB is not set | ||
96 | # CONFIG_SLOB is not set | ||
97 | CONFIG_RT_MUTEXES=y | ||
98 | # CONFIG_TINY_SHMEM is not set | ||
99 | CONFIG_BASE_SMALL=0 | ||
100 | CONFIG_MODULES=y | ||
101 | CONFIG_MODULE_UNLOAD=y | ||
102 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
103 | # CONFIG_MODVERSIONS is not set | ||
104 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
105 | CONFIG_KMOD=y | ||
106 | CONFIG_BLOCK=y | ||
107 | CONFIG_LBD=y | ||
108 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
109 | # CONFIG_LSF is not set | ||
110 | # CONFIG_BLK_DEV_BSG is not set | ||
111 | |||
112 | # | ||
113 | # IO Schedulers | ||
114 | # | ||
115 | CONFIG_IOSCHED_NOOP=y | ||
116 | CONFIG_IOSCHED_AS=y | ||
117 | CONFIG_IOSCHED_DEADLINE=y | ||
118 | CONFIG_IOSCHED_CFQ=y | ||
119 | CONFIG_DEFAULT_AS=y | ||
120 | # CONFIG_DEFAULT_DEADLINE is not set | ||
121 | # CONFIG_DEFAULT_CFQ is not set | ||
122 | # CONFIG_DEFAULT_NOOP is not set | ||
123 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
124 | |||
125 | # | ||
126 | # Platform support | ||
127 | # | ||
128 | # CONFIG_PPC_MPC52xx is not set | ||
129 | # CONFIG_PPC_MPC5200 is not set | ||
130 | # CONFIG_PPC_CELL is not set | ||
131 | # CONFIG_PPC_CELL_NATIVE is not set | ||
132 | # CONFIG_PQ2ADS is not set | ||
133 | CONFIG_BAMBOO=y | ||
134 | # CONFIG_EBONY is not set | ||
135 | CONFIG_440EP=y | ||
136 | CONFIG_IBM440EP_ERR42=y | ||
137 | # CONFIG_MPIC is not set | ||
138 | # CONFIG_MPIC_WEIRD is not set | ||
139 | # CONFIG_PPC_I8259 is not set | ||
140 | # CONFIG_PPC_RTAS is not set | ||
141 | # CONFIG_MMIO_NVRAM is not set | ||
142 | # CONFIG_PPC_MPC106 is not set | ||
143 | # CONFIG_PPC_970_NAP is not set | ||
144 | # CONFIG_PPC_INDIRECT_IO is not set | ||
145 | # CONFIG_GENERIC_IOMAP is not set | ||
146 | # CONFIG_CPU_FREQ is not set | ||
147 | # CONFIG_CPM2 is not set | ||
148 | |||
149 | # | ||
150 | # Kernel options | ||
151 | # | ||
152 | # CONFIG_HIGHMEM is not set | ||
153 | # CONFIG_HZ_100 is not set | ||
154 | CONFIG_HZ_250=y | ||
155 | # CONFIG_HZ_300 is not set | ||
156 | # CONFIG_HZ_1000 is not set | ||
157 | CONFIG_HZ=250 | ||
158 | CONFIG_PREEMPT_NONE=y | ||
159 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
160 | # CONFIG_PREEMPT is not set | ||
161 | CONFIG_BINFMT_ELF=y | ||
162 | # CONFIG_BINFMT_MISC is not set | ||
163 | # CONFIG_MATH_EMULATION is not set | ||
164 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
165 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
166 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
167 | CONFIG_SELECT_MEMORY_MODEL=y | ||
168 | CONFIG_FLATMEM_MANUAL=y | ||
169 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
170 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
171 | CONFIG_FLATMEM=y | ||
172 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
173 | # CONFIG_SPARSEMEM_STATIC is not set | ||
174 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
175 | CONFIG_RESOURCES_64BIT=y | ||
176 | CONFIG_ZONE_DMA_FLAG=1 | ||
177 | CONFIG_BOUNCE=y | ||
178 | CONFIG_VIRT_TO_BUS=y | ||
179 | CONFIG_PROC_DEVICETREE=y | ||
180 | CONFIG_CMDLINE_BOOL=y | ||
181 | CONFIG_CMDLINE="" | ||
182 | CONFIG_SECCOMP=y | ||
183 | CONFIG_WANT_DEVICE_TREE=y | ||
184 | CONFIG_DEVICE_TREE="bamboo.dts" | ||
185 | CONFIG_ISA_DMA_API=y | ||
186 | |||
187 | # | ||
188 | # Bus options | ||
189 | # | ||
190 | CONFIG_ZONE_DMA=y | ||
191 | CONFIG_PPC_INDIRECT_PCI=y | ||
192 | CONFIG_PCI=y | ||
193 | CONFIG_PCI_DOMAINS=y | ||
194 | CONFIG_PCI_SYSCALL=y | ||
195 | # CONFIG_PCIEPORTBUS is not set | ||
196 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
197 | # CONFIG_PCI_MSI is not set | ||
198 | # CONFIG_PCI_DEBUG is not set | ||
199 | |||
200 | # | ||
201 | # PCCARD (PCMCIA/CardBus) support | ||
202 | # | ||
203 | # CONFIG_PCCARD is not set | ||
204 | # CONFIG_HOTPLUG_PCI is not set | ||
205 | |||
206 | # | ||
207 | # Advanced setup | ||
208 | # | ||
209 | # CONFIG_ADVANCED_OPTIONS is not set | ||
210 | |||
211 | # | ||
212 | # Default settings for advanced configuration options are used | ||
213 | # | ||
214 | CONFIG_HIGHMEM_START=0xfe000000 | ||
215 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
216 | CONFIG_KERNEL_START=0xc0000000 | ||
217 | CONFIG_TASK_SIZE=0x80000000 | ||
218 | CONFIG_CONSISTENT_START=0xff100000 | ||
219 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
220 | CONFIG_BOOT_LOAD=0x01000000 | ||
221 | |||
222 | # | ||
223 | # Networking | ||
224 | # | ||
225 | CONFIG_NET=y | ||
226 | |||
227 | # | ||
228 | # Networking options | ||
229 | # | ||
230 | CONFIG_PACKET=y | ||
231 | # CONFIG_PACKET_MMAP is not set | ||
232 | CONFIG_UNIX=y | ||
233 | # CONFIG_NET_KEY is not set | ||
234 | CONFIG_INET=y | ||
235 | # CONFIG_IP_MULTICAST is not set | ||
236 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
237 | CONFIG_IP_FIB_HASH=y | ||
238 | CONFIG_IP_PNP=y | ||
239 | CONFIG_IP_PNP_DHCP=y | ||
240 | CONFIG_IP_PNP_BOOTP=y | ||
241 | # CONFIG_IP_PNP_RARP is not set | ||
242 | # CONFIG_NET_IPIP is not set | ||
243 | # CONFIG_NET_IPGRE is not set | ||
244 | # CONFIG_ARPD is not set | ||
245 | # CONFIG_SYN_COOKIES is not set | ||
246 | # CONFIG_INET_AH is not set | ||
247 | # CONFIG_INET_ESP is not set | ||
248 | # CONFIG_INET_IPCOMP is not set | ||
249 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
250 | # CONFIG_INET_TUNNEL is not set | ||
251 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
252 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
253 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
254 | CONFIG_INET_DIAG=y | ||
255 | CONFIG_INET_TCP_DIAG=y | ||
256 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
257 | CONFIG_TCP_CONG_CUBIC=y | ||
258 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
259 | # CONFIG_TCP_MD5SIG is not set | ||
260 | # CONFIG_IPV6 is not set | ||
261 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
262 | # CONFIG_INET6_TUNNEL is not set | ||
263 | # CONFIG_NETWORK_SECMARK is not set | ||
264 | # CONFIG_NETFILTER is not set | ||
265 | # CONFIG_IP_DCCP is not set | ||
266 | # CONFIG_IP_SCTP is not set | ||
267 | # CONFIG_TIPC is not set | ||
268 | # CONFIG_ATM is not set | ||
269 | # CONFIG_BRIDGE is not set | ||
270 | # CONFIG_VLAN_8021Q is not set | ||
271 | # CONFIG_DECNET is not set | ||
272 | # CONFIG_LLC2 is not set | ||
273 | # CONFIG_IPX is not set | ||
274 | # CONFIG_ATALK is not set | ||
275 | # CONFIG_X25 is not set | ||
276 | # CONFIG_LAPB is not set | ||
277 | # CONFIG_ECONET is not set | ||
278 | # CONFIG_WAN_ROUTER is not set | ||
279 | |||
280 | # | ||
281 | # QoS and/or fair queueing | ||
282 | # | ||
283 | # CONFIG_NET_SCHED is not set | ||
284 | |||
285 | # | ||
286 | # Network testing | ||
287 | # | ||
288 | # CONFIG_NET_PKTGEN is not set | ||
289 | # CONFIG_HAMRADIO is not set | ||
290 | # CONFIG_IRDA is not set | ||
291 | # CONFIG_BT is not set | ||
292 | # CONFIG_AF_RXRPC is not set | ||
293 | |||
294 | # | ||
295 | # Wireless | ||
296 | # | ||
297 | # CONFIG_CFG80211 is not set | ||
298 | # CONFIG_WIRELESS_EXT is not set | ||
299 | # CONFIG_MAC80211 is not set | ||
300 | # CONFIG_IEEE80211 is not set | ||
301 | # CONFIG_RFKILL is not set | ||
302 | # CONFIG_NET_9P is not set | ||
303 | |||
304 | # | ||
305 | # Device Drivers | ||
306 | # | ||
307 | |||
308 | # | ||
309 | # Generic Driver Options | ||
310 | # | ||
311 | CONFIG_STANDALONE=y | ||
312 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
313 | CONFIG_FW_LOADER=y | ||
314 | # CONFIG_DEBUG_DRIVER is not set | ||
315 | # CONFIG_DEBUG_DEVRES is not set | ||
316 | # CONFIG_SYS_HYPERVISOR is not set | ||
317 | CONFIG_CONNECTOR=y | ||
318 | CONFIG_PROC_EVENTS=y | ||
319 | # CONFIG_MTD is not set | ||
320 | CONFIG_OF_DEVICE=y | ||
321 | # CONFIG_PARPORT is not set | ||
322 | CONFIG_BLK_DEV=y | ||
323 | # CONFIG_BLK_DEV_FD is not set | ||
324 | # CONFIG_BLK_CPQ_DA is not set | ||
325 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
326 | # CONFIG_BLK_DEV_DAC960 is not set | ||
327 | # CONFIG_BLK_DEV_UMEM is not set | ||
328 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
329 | # CONFIG_BLK_DEV_LOOP is not set | ||
330 | # CONFIG_BLK_DEV_NBD is not set | ||
331 | # CONFIG_BLK_DEV_SX8 is not set | ||
332 | CONFIG_BLK_DEV_RAM=y | ||
333 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
334 | CONFIG_BLK_DEV_RAM_SIZE=35000 | ||
335 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
336 | # CONFIG_CDROM_PKTCDVD is not set | ||
337 | # CONFIG_ATA_OVER_ETH is not set | ||
338 | # CONFIG_XILINX_SYSACE is not set | ||
339 | CONFIG_MISC_DEVICES=y | ||
340 | # CONFIG_PHANTOM is not set | ||
341 | # CONFIG_EEPROM_93CX6 is not set | ||
342 | # CONFIG_SGI_IOC4 is not set | ||
343 | # CONFIG_TIFM_CORE is not set | ||
344 | # CONFIG_IDE is not set | ||
345 | |||
346 | # | ||
347 | # SCSI device support | ||
348 | # | ||
349 | # CONFIG_RAID_ATTRS is not set | ||
350 | # CONFIG_SCSI is not set | ||
351 | # CONFIG_SCSI_DMA is not set | ||
352 | # CONFIG_SCSI_NETLINK is not set | ||
353 | # CONFIG_ATA is not set | ||
354 | # CONFIG_MD is not set | ||
355 | |||
356 | # | ||
357 | # Fusion MPT device support | ||
358 | # | ||
359 | # CONFIG_FUSION is not set | ||
360 | |||
361 | # | ||
362 | # IEEE 1394 (FireWire) support | ||
363 | # | ||
364 | # CONFIG_FIREWIRE is not set | ||
365 | # CONFIG_IEEE1394 is not set | ||
366 | # CONFIG_I2O is not set | ||
367 | CONFIG_MACINTOSH_DRIVERS=y | ||
368 | # CONFIG_MAC_EMUMOUSEBTN is not set | ||
369 | # CONFIG_WINDFARM is not set | ||
370 | CONFIG_NETDEVICES=y | ||
371 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
372 | # CONFIG_DUMMY is not set | ||
373 | # CONFIG_BONDING is not set | ||
374 | # CONFIG_MACVLAN is not set | ||
375 | # CONFIG_EQUALIZER is not set | ||
376 | # CONFIG_TUN is not set | ||
377 | # CONFIG_ARCNET is not set | ||
378 | # CONFIG_NET_ETHERNET is not set | ||
379 | CONFIG_NETDEV_1000=y | ||
380 | # CONFIG_ACENIC is not set | ||
381 | # CONFIG_DL2K is not set | ||
382 | # CONFIG_E1000 is not set | ||
383 | # CONFIG_NS83820 is not set | ||
384 | # CONFIG_HAMACHI is not set | ||
385 | # CONFIG_YELLOWFIN is not set | ||
386 | # CONFIG_R8169 is not set | ||
387 | # CONFIG_SIS190 is not set | ||
388 | # CONFIG_SKGE is not set | ||
389 | # CONFIG_SKY2 is not set | ||
390 | # CONFIG_VIA_VELOCITY is not set | ||
391 | # CONFIG_TIGON3 is not set | ||
392 | # CONFIG_BNX2 is not set | ||
393 | # CONFIG_QLA3XXX is not set | ||
394 | # CONFIG_ATL1 is not set | ||
395 | CONFIG_NETDEV_10000=y | ||
396 | # CONFIG_CHELSIO_T1 is not set | ||
397 | # CONFIG_CHELSIO_T3 is not set | ||
398 | # CONFIG_IXGB is not set | ||
399 | # CONFIG_S2IO is not set | ||
400 | # CONFIG_MYRI10GE is not set | ||
401 | # CONFIG_NETXEN_NIC is not set | ||
402 | # CONFIG_MLX4_CORE is not set | ||
403 | # CONFIG_TR is not set | ||
404 | |||
405 | # | ||
406 | # Wireless LAN | ||
407 | # | ||
408 | # CONFIG_WLAN_PRE80211 is not set | ||
409 | # CONFIG_WLAN_80211 is not set | ||
410 | # CONFIG_WAN is not set | ||
411 | # CONFIG_FDDI is not set | ||
412 | # CONFIG_HIPPI is not set | ||
413 | # CONFIG_PPP is not set | ||
414 | # CONFIG_SLIP is not set | ||
415 | # CONFIG_SHAPER is not set | ||
416 | # CONFIG_NETCONSOLE is not set | ||
417 | # CONFIG_NETPOLL is not set | ||
418 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
419 | # CONFIG_ISDN is not set | ||
420 | # CONFIG_PHONE is not set | ||
421 | |||
422 | # | ||
423 | # Input device support | ||
424 | # | ||
425 | # CONFIG_INPUT 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_PCI is not set | ||
445 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
446 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
447 | CONFIG_SERIAL_8250_EXTENDED=y | ||
448 | # CONFIG_SERIAL_8250_MANY_PORTS is not set | ||
449 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
450 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
451 | # CONFIG_SERIAL_8250_RSA is not set | ||
452 | |||
453 | # | ||
454 | # Non-8250 serial port support | ||
455 | # | ||
456 | # CONFIG_SERIAL_UARTLITE is not set | ||
457 | CONFIG_SERIAL_CORE=y | ||
458 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
459 | # CONFIG_SERIAL_JSM is not set | ||
460 | CONFIG_SERIAL_OF_PLATFORM=y | ||
461 | CONFIG_UNIX98_PTYS=y | ||
462 | CONFIG_LEGACY_PTYS=y | ||
463 | CONFIG_LEGACY_PTY_COUNT=256 | ||
464 | # CONFIG_IPMI_HANDLER is not set | ||
465 | # CONFIG_WATCHDOG is not set | ||
466 | # CONFIG_HW_RANDOM is not set | ||
467 | # CONFIG_NVRAM is not set | ||
468 | # CONFIG_GEN_RTC is not set | ||
469 | # CONFIG_R3964 is not set | ||
470 | # CONFIG_APPLICOM is not set | ||
471 | # CONFIG_AGP is not set | ||
472 | # CONFIG_DRM is not set | ||
473 | # CONFIG_RAW_DRIVER is not set | ||
474 | # CONFIG_TCG_TPM is not set | ||
475 | CONFIG_DEVPORT=y | ||
476 | # CONFIG_I2C is not set | ||
477 | |||
478 | # | ||
479 | # SPI support | ||
480 | # | ||
481 | # CONFIG_SPI is not set | ||
482 | # CONFIG_SPI_MASTER is not set | ||
483 | # CONFIG_W1 is not set | ||
484 | # CONFIG_POWER_SUPPLY is not set | ||
485 | # CONFIG_HWMON is not set | ||
486 | |||
487 | # | ||
488 | # Multifunction device drivers | ||
489 | # | ||
490 | # CONFIG_MFD_SM501 is not set | ||
491 | |||
492 | # | ||
493 | # Multimedia devices | ||
494 | # | ||
495 | # CONFIG_VIDEO_DEV is not set | ||
496 | # CONFIG_DVB_CORE is not set | ||
497 | CONFIG_DAB=y | ||
498 | |||
499 | # | ||
500 | # Graphics support | ||
501 | # | ||
502 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
503 | |||
504 | # | ||
505 | # Display device support | ||
506 | # | ||
507 | # CONFIG_DISPLAY_SUPPORT is not set | ||
508 | # CONFIG_VGASTATE is not set | ||
509 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
510 | # CONFIG_FB is not set | ||
511 | # CONFIG_FB_IBM_GXT4500 is not set | ||
512 | |||
513 | # | ||
514 | # Sound | ||
515 | # | ||
516 | # CONFIG_SOUND is not set | ||
517 | CONFIG_USB_SUPPORT=y | ||
518 | CONFIG_USB_ARCH_HAS_HCD=y | ||
519 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
520 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
521 | # CONFIG_USB is not set | ||
522 | |||
523 | # | ||
524 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
525 | # | ||
526 | |||
527 | # | ||
528 | # USB Gadget Support | ||
529 | # | ||
530 | # CONFIG_USB_GADGET is not set | ||
531 | # CONFIG_MMC is not set | ||
532 | # CONFIG_NEW_LEDS is not set | ||
533 | # CONFIG_INFINIBAND is not set | ||
534 | # CONFIG_EDAC is not set | ||
535 | # CONFIG_RTC_CLASS is not set | ||
536 | |||
537 | # | ||
538 | # DMA Engine support | ||
539 | # | ||
540 | # CONFIG_DMA_ENGINE is not set | ||
541 | |||
542 | # | ||
543 | # DMA Clients | ||
544 | # | ||
545 | |||
546 | # | ||
547 | # DMA Devices | ||
548 | # | ||
549 | |||
550 | # | ||
551 | # Userspace I/O | ||
552 | # | ||
553 | # CONFIG_UIO is not set | ||
554 | |||
555 | # | ||
556 | # File systems | ||
557 | # | ||
558 | CONFIG_EXT2_FS=y | ||
559 | # CONFIG_EXT2_FS_XATTR is not set | ||
560 | # CONFIG_EXT2_FS_XIP is not set | ||
561 | # CONFIG_EXT3_FS is not set | ||
562 | # CONFIG_EXT4DEV_FS is not set | ||
563 | # CONFIG_REISERFS_FS is not set | ||
564 | # CONFIG_JFS_FS is not set | ||
565 | # CONFIG_FS_POSIX_ACL is not set | ||
566 | # CONFIG_XFS_FS is not set | ||
567 | # CONFIG_GFS2_FS is not set | ||
568 | # CONFIG_OCFS2_FS is not set | ||
569 | # CONFIG_MINIX_FS is not set | ||
570 | # CONFIG_ROMFS_FS is not set | ||
571 | CONFIG_INOTIFY=y | ||
572 | CONFIG_INOTIFY_USER=y | ||
573 | # CONFIG_QUOTA is not set | ||
574 | CONFIG_DNOTIFY=y | ||
575 | # CONFIG_AUTOFS_FS is not set | ||
576 | # CONFIG_AUTOFS4_FS is not set | ||
577 | # CONFIG_FUSE_FS is not set | ||
578 | |||
579 | # | ||
580 | # CD-ROM/DVD Filesystems | ||
581 | # | ||
582 | # CONFIG_ISO9660_FS is not set | ||
583 | # CONFIG_UDF_FS is not set | ||
584 | |||
585 | # | ||
586 | # DOS/FAT/NT Filesystems | ||
587 | # | ||
588 | # CONFIG_MSDOS_FS is not set | ||
589 | # CONFIG_VFAT_FS is not set | ||
590 | # CONFIG_NTFS_FS is not set | ||
591 | |||
592 | # | ||
593 | # Pseudo filesystems | ||
594 | # | ||
595 | CONFIG_PROC_FS=y | ||
596 | CONFIG_PROC_KCORE=y | ||
597 | CONFIG_PROC_SYSCTL=y | ||
598 | CONFIG_SYSFS=y | ||
599 | CONFIG_TMPFS=y | ||
600 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
601 | # CONFIG_HUGETLB_PAGE is not set | ||
602 | CONFIG_RAMFS=y | ||
603 | # CONFIG_CONFIGFS_FS is not set | ||
604 | |||
605 | # | ||
606 | # Miscellaneous filesystems | ||
607 | # | ||
608 | # CONFIG_ADFS_FS is not set | ||
609 | # CONFIG_AFFS_FS is not set | ||
610 | # CONFIG_HFS_FS is not set | ||
611 | # CONFIG_HFSPLUS_FS is not set | ||
612 | # CONFIG_BEFS_FS is not set | ||
613 | # CONFIG_BFS_FS is not set | ||
614 | # CONFIG_EFS_FS is not set | ||
615 | CONFIG_CRAMFS=y | ||
616 | # CONFIG_VXFS_FS is not set | ||
617 | # CONFIG_HPFS_FS is not set | ||
618 | # CONFIG_QNX4FS_FS is not set | ||
619 | # CONFIG_SYSV_FS is not set | ||
620 | # CONFIG_UFS_FS is not set | ||
621 | |||
622 | # | ||
623 | # Network File Systems | ||
624 | # | ||
625 | CONFIG_NFS_FS=y | ||
626 | CONFIG_NFS_V3=y | ||
627 | # CONFIG_NFS_V3_ACL is not set | ||
628 | # CONFIG_NFS_V4 is not set | ||
629 | # CONFIG_NFS_DIRECTIO is not set | ||
630 | # CONFIG_NFSD is not set | ||
631 | CONFIG_ROOT_NFS=y | ||
632 | CONFIG_LOCKD=y | ||
633 | CONFIG_LOCKD_V4=y | ||
634 | CONFIG_NFS_COMMON=y | ||
635 | CONFIG_SUNRPC=y | ||
636 | # CONFIG_SUNRPC_BIND34 is not set | ||
637 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
638 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
639 | # CONFIG_SMB_FS is not set | ||
640 | # CONFIG_CIFS is not set | ||
641 | # CONFIG_NCP_FS is not set | ||
642 | # CONFIG_CODA_FS is not set | ||
643 | # CONFIG_AFS_FS is not set | ||
644 | |||
645 | # | ||
646 | # Partition Types | ||
647 | # | ||
648 | # CONFIG_PARTITION_ADVANCED is not set | ||
649 | CONFIG_MSDOS_PARTITION=y | ||
650 | |||
651 | # | ||
652 | # Native Language Support | ||
653 | # | ||
654 | # CONFIG_NLS is not set | ||
655 | |||
656 | # | ||
657 | # Distributed Lock Manager | ||
658 | # | ||
659 | # CONFIG_DLM is not set | ||
660 | # CONFIG_UCC_SLOW is not set | ||
661 | |||
662 | # | ||
663 | # Library routines | ||
664 | # | ||
665 | CONFIG_BITREVERSE=y | ||
666 | # CONFIG_CRC_CCITT is not set | ||
667 | # CONFIG_CRC16 is not set | ||
668 | # CONFIG_CRC_ITU_T is not set | ||
669 | CONFIG_CRC32=y | ||
670 | # CONFIG_CRC7 is not set | ||
671 | # CONFIG_LIBCRC32C is not set | ||
672 | CONFIG_ZLIB_INFLATE=y | ||
673 | CONFIG_PLIST=y | ||
674 | CONFIG_HAS_IOMEM=y | ||
675 | CONFIG_HAS_IOPORT=y | ||
676 | CONFIG_HAS_DMA=y | ||
677 | |||
678 | # | ||
679 | # Instrumentation Support | ||
680 | # | ||
681 | # CONFIG_PROFILING is not set | ||
682 | |||
683 | # | ||
684 | # Kernel hacking | ||
685 | # | ||
686 | # CONFIG_PRINTK_TIME is not set | ||
687 | CONFIG_ENABLE_MUST_CHECK=y | ||
688 | CONFIG_MAGIC_SYSRQ=y | ||
689 | # CONFIG_UNUSED_SYMBOLS is not set | ||
690 | # CONFIG_DEBUG_FS is not set | ||
691 | # CONFIG_HEADERS_CHECK is not set | ||
692 | CONFIG_DEBUG_KERNEL=y | ||
693 | # CONFIG_DEBUG_SHIRQ is not set | ||
694 | CONFIG_DETECT_SOFTLOCKUP=y | ||
695 | CONFIG_SCHED_DEBUG=y | ||
696 | # CONFIG_SCHEDSTATS is not set | ||
697 | # CONFIG_TIMER_STATS is not set | ||
698 | # CONFIG_DEBUG_SLAB is not set | ||
699 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
700 | # CONFIG_RT_MUTEX_TESTER is not set | ||
701 | # CONFIG_DEBUG_SPINLOCK is not set | ||
702 | # CONFIG_DEBUG_MUTEXES is not set | ||
703 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
704 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
705 | # CONFIG_DEBUG_KOBJECT is not set | ||
706 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
707 | # CONFIG_DEBUG_INFO is not set | ||
708 | # CONFIG_DEBUG_VM is not set | ||
709 | # CONFIG_DEBUG_LIST is not set | ||
710 | CONFIG_FORCED_INLINING=y | ||
711 | # CONFIG_RCU_TORTURE_TEST is not set | ||
712 | # CONFIG_FAULT_INJECTION is not set | ||
713 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
714 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
715 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
716 | CONFIG_DEBUGGER=y | ||
717 | # CONFIG_KGDB is not set | ||
718 | # CONFIG_XMON is not set | ||
719 | # CONFIG_BDI_SWITCH is not set | ||
720 | CONFIG_PPC_EARLY_DEBUG=y | ||
721 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | ||
722 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
723 | # CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set | ||
724 | # CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set | ||
725 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
726 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
727 | # CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set | ||
728 | # CONFIG_PPC_EARLY_DEBUG_BEAT is not set | ||
729 | CONFIG_PPC_EARLY_DEBUG_44x=y | ||
730 | CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300 | ||
731 | CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0 | ||
732 | |||
733 | # | ||
734 | # Security options | ||
735 | # | ||
736 | # CONFIG_KEYS is not set | ||
737 | # CONFIG_SECURITY is not set | ||
738 | CONFIG_CRYPTO=y | ||
739 | CONFIG_CRYPTO_ALGAPI=y | ||
740 | CONFIG_CRYPTO_BLKCIPHER=y | ||
741 | CONFIG_CRYPTO_MANAGER=y | ||
742 | # CONFIG_CRYPTO_HMAC is not set | ||
743 | # CONFIG_CRYPTO_XCBC is not set | ||
744 | # CONFIG_CRYPTO_NULL is not set | ||
745 | # CONFIG_CRYPTO_MD4 is not set | ||
746 | CONFIG_CRYPTO_MD5=y | ||
747 | # CONFIG_CRYPTO_SHA1 is not set | ||
748 | # CONFIG_CRYPTO_SHA256 is not set | ||
749 | # CONFIG_CRYPTO_SHA512 is not set | ||
750 | # CONFIG_CRYPTO_WP512 is not set | ||
751 | # CONFIG_CRYPTO_TGR192 is not set | ||
752 | # CONFIG_CRYPTO_GF128MUL is not set | ||
753 | CONFIG_CRYPTO_ECB=y | ||
754 | CONFIG_CRYPTO_CBC=y | ||
755 | CONFIG_CRYPTO_PCBC=y | ||
756 | # CONFIG_CRYPTO_LRW is not set | ||
757 | # CONFIG_CRYPTO_CRYPTD is not set | ||
758 | CONFIG_CRYPTO_DES=y | ||
759 | # CONFIG_CRYPTO_FCRYPT is not set | ||
760 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
761 | # CONFIG_CRYPTO_TWOFISH is not set | ||
762 | # CONFIG_CRYPTO_SERPENT is not set | ||
763 | # CONFIG_CRYPTO_AES is not set | ||
764 | # CONFIG_CRYPTO_CAST5 is not set | ||
765 | # CONFIG_CRYPTO_CAST6 is not set | ||
766 | # CONFIG_CRYPTO_TEA is not set | ||
767 | # CONFIG_CRYPTO_ARC4 is not set | ||
768 | # CONFIG_CRYPTO_KHAZAD is not set | ||
769 | # CONFIG_CRYPTO_ANUBIS is not set | ||
770 | # CONFIG_CRYPTO_DEFLATE is not set | ||
771 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
772 | # CONFIG_CRYPTO_CRC32C is not set | ||
773 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
774 | # CONFIG_CRYPTO_TEST is not set | ||
775 | CONFIG_CRYPTO_HW=y | ||
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig index 5762cddfc148..d8dc7e63aab5 100644 --- a/arch/powerpc/configs/ebony_defconfig +++ b/arch/powerpc/configs/ebony_defconfig | |||
@@ -1,9 +1,25 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22-rc6 | 3 | # Linux kernel version: 2.6.23-rc1-powerpc-ebony-mtd |
4 | # Tue Jun 26 12:38:33 2007 | 4 | # Mon Jul 30 15:47:59 2007 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | CONFIG_44x=y | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_4xx=y | ||
18 | CONFIG_BOOKE=y | ||
19 | CONFIG_PTE_64BIT=y | ||
20 | CONFIG_PHYS_64BIT=y | ||
21 | # CONFIG_PPC_MM_SLICES is not set | ||
22 | CONFIG_NOT_COHERENT_CACHE=y | ||
7 | CONFIG_PPC32=y | 23 | CONFIG_PPC32=y |
8 | CONFIG_PPC_MERGE=y | 24 | CONFIG_PPC_MERGE=y |
9 | CONFIG_MMU=y | 25 | CONFIG_MMU=y |
@@ -14,39 +30,22 @@ CONFIG_ARCH_HAS_ILOG2_U32=y | |||
14 | CONFIG_GENERIC_HWEIGHT=y | 30 | CONFIG_GENERIC_HWEIGHT=y |
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 31 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
16 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 32 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
33 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
17 | CONFIG_PPC=y | 34 | CONFIG_PPC=y |
18 | CONFIG_EARLY_PRINTK=y | 35 | CONFIG_EARLY_PRINTK=y |
19 | CONFIG_GENERIC_NVRAM=y | 36 | CONFIG_GENERIC_NVRAM=y |
20 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 37 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
21 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 38 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
22 | CONFIG_PPC_OF=y | 39 | CONFIG_PPC_OF=y |
40 | CONFIG_OF=y | ||
23 | # CONFIG_PPC_UDBG_16550 is not set | 41 | # CONFIG_PPC_UDBG_16550 is not set |
24 | # CONFIG_GENERIC_TBSYNC is not set | 42 | # CONFIG_GENERIC_TBSYNC is not set |
25 | CONFIG_AUDIT_ARCH=y | 43 | CONFIG_AUDIT_ARCH=y |
26 | CONFIG_GENERIC_BUG=y | 44 | CONFIG_GENERIC_BUG=y |
27 | # CONFIG_DEFAULT_UIMAGE is not set | 45 | # CONFIG_DEFAULT_UIMAGE is not set |
28 | |||
29 | # | ||
30 | # Processor support | ||
31 | # | ||
32 | # CONFIG_CLASSIC32 is not set | ||
33 | # CONFIG_PPC_82xx is not set | ||
34 | # CONFIG_PPC_83xx is not set | ||
35 | # CONFIG_PPC_85xx is not set | ||
36 | # CONFIG_PPC_86xx is not set | ||
37 | # CONFIG_PPC_8xx is not set | ||
38 | # CONFIG_40x is not set | ||
39 | CONFIG_44x=y | ||
40 | # CONFIG_E200 is not set | ||
41 | CONFIG_PPC_DCR_NATIVE=y | 46 | CONFIG_PPC_DCR_NATIVE=y |
42 | # CONFIG_PPC_DCR_MMIO is not set | 47 | # CONFIG_PPC_DCR_MMIO is not set |
43 | CONFIG_PPC_DCR=y | 48 | CONFIG_PPC_DCR=y |
44 | CONFIG_4xx=y | ||
45 | CONFIG_BOOKE=y | ||
46 | CONFIG_PTE_64BIT=y | ||
47 | CONFIG_PHYS_64BIT=y | ||
48 | # CONFIG_PPC_MM_SLICES is not set | ||
49 | CONFIG_NOT_COHERENT_CACHE=y | ||
50 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 49 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
51 | 50 | ||
52 | # | 51 | # |
@@ -63,12 +62,11 @@ CONFIG_LOCALVERSION="" | |||
63 | CONFIG_LOCALVERSION_AUTO=y | 62 | CONFIG_LOCALVERSION_AUTO=y |
64 | CONFIG_SWAP=y | 63 | CONFIG_SWAP=y |
65 | CONFIG_SYSVIPC=y | 64 | CONFIG_SYSVIPC=y |
66 | # CONFIG_IPC_NS is not set | ||
67 | CONFIG_SYSVIPC_SYSCTL=y | 65 | CONFIG_SYSVIPC_SYSCTL=y |
68 | CONFIG_POSIX_MQUEUE=y | 66 | CONFIG_POSIX_MQUEUE=y |
69 | # CONFIG_BSD_PROCESS_ACCT is not set | 67 | # CONFIG_BSD_PROCESS_ACCT is not set |
70 | # CONFIG_TASKSTATS is not set | 68 | # CONFIG_TASKSTATS is not set |
71 | # CONFIG_UTS_NS is not set | 69 | # CONFIG_USER_NS is not set |
72 | # CONFIG_AUDIT is not set | 70 | # CONFIG_AUDIT is not set |
73 | # CONFIG_IKCONFIG is not set | 71 | # CONFIG_IKCONFIG is not set |
74 | CONFIG_LOG_BUF_SHIFT=14 | 72 | CONFIG_LOG_BUF_SHIFT=14 |
@@ -102,24 +100,17 @@ CONFIG_SLAB=y | |||
102 | CONFIG_RT_MUTEXES=y | 100 | CONFIG_RT_MUTEXES=y |
103 | # CONFIG_TINY_SHMEM is not set | 101 | # CONFIG_TINY_SHMEM is not set |
104 | CONFIG_BASE_SMALL=0 | 102 | CONFIG_BASE_SMALL=0 |
105 | |||
106 | # | ||
107 | # Loadable module support | ||
108 | # | ||
109 | CONFIG_MODULES=y | 103 | CONFIG_MODULES=y |
110 | CONFIG_MODULE_UNLOAD=y | 104 | CONFIG_MODULE_UNLOAD=y |
111 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 105 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
112 | # CONFIG_MODVERSIONS is not set | 106 | # CONFIG_MODVERSIONS is not set |
113 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 107 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
114 | CONFIG_KMOD=y | 108 | CONFIG_KMOD=y |
115 | |||
116 | # | ||
117 | # Block layer | ||
118 | # | ||
119 | CONFIG_BLOCK=y | 109 | CONFIG_BLOCK=y |
120 | CONFIG_LBD=y | 110 | CONFIG_LBD=y |
121 | # CONFIG_BLK_DEV_IO_TRACE is not set | 111 | # CONFIG_BLK_DEV_IO_TRACE is not set |
122 | # CONFIG_LSF is not set | 112 | # CONFIG_LSF is not set |
113 | # CONFIG_BLK_DEV_BSG is not set | ||
123 | 114 | ||
124 | # | 115 | # |
125 | # IO Schedulers | 116 | # IO Schedulers |
@@ -184,6 +175,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
184 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 175 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
185 | CONFIG_RESOURCES_64BIT=y | 176 | CONFIG_RESOURCES_64BIT=y |
186 | CONFIG_ZONE_DMA_FLAG=1 | 177 | CONFIG_ZONE_DMA_FLAG=1 |
178 | CONFIG_BOUNCE=y | ||
179 | CONFIG_VIRT_TO_BUS=y | ||
187 | CONFIG_PROC_DEVICETREE=y | 180 | CONFIG_PROC_DEVICETREE=y |
188 | # CONFIG_CMDLINE_BOOL is not set | 181 | # CONFIG_CMDLINE_BOOL is not set |
189 | CONFIG_SECCOMP=y | 182 | CONFIG_SECCOMP=y |
@@ -196,9 +189,9 @@ CONFIG_ISA_DMA_API=y | |||
196 | # | 189 | # |
197 | CONFIG_ZONE_DMA=y | 190 | CONFIG_ZONE_DMA=y |
198 | CONFIG_PPC_INDIRECT_PCI=y | 191 | CONFIG_PPC_INDIRECT_PCI=y |
199 | # CONFIG_PPC_INDIRECT_PCI_BE is not set | ||
200 | CONFIG_PCI=y | 192 | CONFIG_PCI=y |
201 | CONFIG_PCI_DOMAINS=y | 193 | CONFIG_PCI_DOMAINS=y |
194 | CONFIG_PCI_SYSCALL=y | ||
202 | # CONFIG_PCIEPORTBUS is not set | 195 | # CONFIG_PCIEPORTBUS is not set |
203 | CONFIG_ARCH_SUPPORTS_MSI=y | 196 | CONFIG_ARCH_SUPPORTS_MSI=y |
204 | # CONFIG_PCI_MSI is not set | 197 | # CONFIG_PCI_MSI is not set |
@@ -306,6 +299,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
306 | # CONFIG_MAC80211 is not set | 299 | # CONFIG_MAC80211 is not set |
307 | # CONFIG_IEEE80211 is not set | 300 | # CONFIG_IEEE80211 is not set |
308 | # CONFIG_RFKILL is not set | 301 | # CONFIG_RFKILL is not set |
302 | # CONFIG_NET_9P is not set | ||
309 | 303 | ||
310 | # | 304 | # |
311 | # Device Drivers | 305 | # Device Drivers |
@@ -320,27 +314,85 @@ CONFIG_FW_LOADER=y | |||
320 | # CONFIG_DEBUG_DRIVER is not set | 314 | # CONFIG_DEBUG_DRIVER is not set |
321 | # CONFIG_DEBUG_DEVRES is not set | 315 | # CONFIG_DEBUG_DEVRES is not set |
322 | # CONFIG_SYS_HYPERVISOR is not set | 316 | # CONFIG_SYS_HYPERVISOR is not set |
317 | CONFIG_CONNECTOR=y | ||
318 | CONFIG_PROC_EVENTS=y | ||
319 | CONFIG_MTD=y | ||
320 | # CONFIG_MTD_DEBUG is not set | ||
321 | # CONFIG_MTD_CONCAT is not set | ||
322 | CONFIG_MTD_PARTITIONS=y | ||
323 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
324 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
323 | 325 | ||
324 | # | 326 | # |
325 | # Connector - unified userspace <-> kernelspace linker | 327 | # User Modules And Translation Layers |
326 | # | 328 | # |
327 | CONFIG_CONNECTOR=y | 329 | CONFIG_MTD_CHAR=y |
328 | CONFIG_PROC_EVENTS=y | 330 | CONFIG_MTD_BLKDEVS=y |
329 | # CONFIG_MTD is not set | 331 | CONFIG_MTD_BLOCK=y |
332 | # CONFIG_FTL is not set | ||
333 | # CONFIG_NFTL is not set | ||
334 | # CONFIG_INFTL is not set | ||
335 | # CONFIG_RFD_FTL is not set | ||
336 | # CONFIG_SSFDC is not set | ||
330 | 337 | ||
331 | # | 338 | # |
332 | # Parallel port support | 339 | # RAM/ROM/Flash chip drivers |
333 | # | 340 | # |
334 | # CONFIG_PARPORT is not set | 341 | CONFIG_MTD_CFI=y |
342 | CONFIG_MTD_JEDECPROBE=y | ||
343 | CONFIG_MTD_GEN_PROBE=y | ||
344 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
345 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
346 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
347 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
348 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
349 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
350 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
351 | CONFIG_MTD_CFI_I1=y | ||
352 | CONFIG_MTD_CFI_I2=y | ||
353 | # CONFIG_MTD_CFI_I4 is not set | ||
354 | # CONFIG_MTD_CFI_I8 is not set | ||
355 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
356 | CONFIG_MTD_CFI_AMDSTD=y | ||
357 | # CONFIG_MTD_CFI_STAA is not set | ||
358 | CONFIG_MTD_CFI_UTIL=y | ||
359 | # CONFIG_MTD_RAM is not set | ||
360 | # CONFIG_MTD_ROM is not set | ||
361 | # CONFIG_MTD_ABSENT is not set | ||
362 | |||
363 | # | ||
364 | # Mapping drivers for chip access | ||
365 | # | ||
366 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
367 | # CONFIG_MTD_PHYSMAP is not set | ||
368 | CONFIG_MTD_PHYSMAP_OF=y | ||
369 | # CONFIG_MTD_PLATRAM is not set | ||
370 | |||
371 | # | ||
372 | # Self-contained MTD device drivers | ||
373 | # | ||
374 | # CONFIG_MTD_PMC551 is not set | ||
375 | # CONFIG_MTD_SLRAM is not set | ||
376 | # CONFIG_MTD_PHRAM is not set | ||
377 | # CONFIG_MTD_MTDRAM is not set | ||
378 | # CONFIG_MTD_BLOCK2MTD is not set | ||
335 | 379 | ||
336 | # | 380 | # |
337 | # Plug and Play support | 381 | # Disk-On-Chip Device Drivers |
338 | # | 382 | # |
339 | # CONFIG_PNPACPI is not set | 383 | # CONFIG_MTD_DOC2000 is not set |
384 | # CONFIG_MTD_DOC2001 is not set | ||
385 | # CONFIG_MTD_DOC2001PLUS is not set | ||
386 | # CONFIG_MTD_NAND is not set | ||
387 | # CONFIG_MTD_ONENAND is not set | ||
340 | 388 | ||
341 | # | 389 | # |
342 | # Block devices | 390 | # UBI - Unsorted block images |
343 | # | 391 | # |
392 | # CONFIG_MTD_UBI is not set | ||
393 | CONFIG_OF_DEVICE=y | ||
394 | # CONFIG_PARPORT is not set | ||
395 | CONFIG_BLK_DEV=y | ||
344 | # CONFIG_BLK_DEV_FD is not set | 396 | # CONFIG_BLK_DEV_FD is not set |
345 | # CONFIG_BLK_CPQ_DA is not set | 397 | # CONFIG_BLK_CPQ_DA is not set |
346 | # CONFIG_BLK_CPQ_CISS_DA is not set | 398 | # CONFIG_BLK_CPQ_CISS_DA is not set |
@@ -356,14 +408,12 @@ CONFIG_BLK_DEV_RAM_SIZE=35000 | |||
356 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 408 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
357 | # CONFIG_CDROM_PKTCDVD is not set | 409 | # CONFIG_CDROM_PKTCDVD is not set |
358 | # CONFIG_ATA_OVER_ETH is not set | 410 | # CONFIG_ATA_OVER_ETH is not set |
359 | 411 | # CONFIG_XILINX_SYSACE is not set | |
360 | # | 412 | CONFIG_MISC_DEVICES=y |
361 | # Misc devices | ||
362 | # | ||
363 | # CONFIG_PHANTOM is not set | 413 | # CONFIG_PHANTOM is not set |
414 | # CONFIG_EEPROM_93CX6 is not set | ||
364 | # CONFIG_SGI_IOC4 is not set | 415 | # CONFIG_SGI_IOC4 is not set |
365 | # CONFIG_TIFM_CORE is not set | 416 | # CONFIG_TIFM_CORE is not set |
366 | # CONFIG_BLINK is not set | ||
367 | # CONFIG_IDE is not set | 417 | # CONFIG_IDE is not set |
368 | 418 | ||
369 | # | 419 | # |
@@ -371,12 +421,9 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
371 | # | 421 | # |
372 | # CONFIG_RAID_ATTRS is not set | 422 | # CONFIG_RAID_ATTRS is not set |
373 | # CONFIG_SCSI is not set | 423 | # CONFIG_SCSI is not set |
424 | # CONFIG_SCSI_DMA is not set | ||
374 | # CONFIG_SCSI_NETLINK is not set | 425 | # CONFIG_SCSI_NETLINK is not set |
375 | # CONFIG_ATA is not set | 426 | # CONFIG_ATA is not set |
376 | |||
377 | # | ||
378 | # Multi-device support (RAID and LVM) | ||
379 | # | ||
380 | # CONFIG_MD is not set | 427 | # CONFIG_MD is not set |
381 | 428 | ||
382 | # | 429 | # |
@@ -389,35 +436,17 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
389 | # | 436 | # |
390 | # CONFIG_FIREWIRE is not set | 437 | # CONFIG_FIREWIRE is not set |
391 | # CONFIG_IEEE1394 is not set | 438 | # CONFIG_IEEE1394 is not set |
392 | |||
393 | # | ||
394 | # I2O device support | ||
395 | # | ||
396 | # CONFIG_I2O is not set | 439 | # CONFIG_I2O is not set |
397 | # CONFIG_MACINTOSH_DRIVERS is not set | 440 | # CONFIG_MACINTOSH_DRIVERS is not set |
398 | |||
399 | # | ||
400 | # Network device support | ||
401 | # | ||
402 | CONFIG_NETDEVICES=y | 441 | CONFIG_NETDEVICES=y |
442 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
403 | # CONFIG_DUMMY is not set | 443 | # CONFIG_DUMMY is not set |
404 | # CONFIG_BONDING is not set | 444 | # CONFIG_BONDING is not set |
445 | # CONFIG_MACVLAN is not set | ||
405 | # CONFIG_EQUALIZER is not set | 446 | # CONFIG_EQUALIZER is not set |
406 | # CONFIG_TUN is not set | 447 | # CONFIG_TUN is not set |
407 | # CONFIG_ARCNET is not set | 448 | # CONFIG_ARCNET is not set |
408 | |||
409 | # | ||
410 | # Ethernet (10 or 100Mbit) | ||
411 | # | ||
412 | # CONFIG_NET_ETHERNET is not set | 449 | # CONFIG_NET_ETHERNET is not set |
413 | CONFIG_IBM_EMAC=y | ||
414 | CONFIG_IBM_EMAC_RXB=128 | ||
415 | CONFIG_IBM_EMAC_TXB=64 | ||
416 | CONFIG_IBM_EMAC_POLL_WEIGHT=32 | ||
417 | CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 | ||
418 | CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 | ||
419 | # CONFIG_IBM_EMAC_DEBUG is not set | ||
420 | CONFIG_IBM_EMAC_ZMII=y | ||
421 | CONFIG_NETDEV_1000=y | 450 | CONFIG_NETDEV_1000=y |
422 | # CONFIG_ACENIC is not set | 451 | # CONFIG_ACENIC is not set |
423 | # CONFIG_DL2K is not set | 452 | # CONFIG_DL2K is not set |
@@ -429,7 +458,6 @@ CONFIG_NETDEV_1000=y | |||
429 | # CONFIG_SIS190 is not set | 458 | # CONFIG_SIS190 is not set |
430 | # CONFIG_SKGE is not set | 459 | # CONFIG_SKGE is not set |
431 | # CONFIG_SKY2 is not set | 460 | # CONFIG_SKY2 is not set |
432 | # CONFIG_SK98LIN is not set | ||
433 | # CONFIG_VIA_VELOCITY is not set | 461 | # CONFIG_VIA_VELOCITY is not set |
434 | # CONFIG_TIGON3 is not set | 462 | # CONFIG_TIGON3 is not set |
435 | # CONFIG_BNX2 is not set | 463 | # CONFIG_BNX2 is not set |
@@ -459,15 +487,7 @@ CONFIG_NETDEV_10000=y | |||
459 | # CONFIG_NETCONSOLE is not set | 487 | # CONFIG_NETCONSOLE is not set |
460 | # CONFIG_NETPOLL is not set | 488 | # CONFIG_NETPOLL is not set |
461 | # CONFIG_NET_POLL_CONTROLLER is not set | 489 | # CONFIG_NET_POLL_CONTROLLER is not set |
462 | |||
463 | # | ||
464 | # ISDN subsystem | ||
465 | # | ||
466 | # CONFIG_ISDN is not set | 490 | # CONFIG_ISDN is not set |
467 | |||
468 | # | ||
469 | # Telephony Support | ||
470 | # | ||
471 | # CONFIG_PHONE is not set | 491 | # CONFIG_PHONE is not set |
472 | 492 | ||
473 | # | 493 | # |
@@ -512,10 +532,6 @@ CONFIG_SERIAL_OF_PLATFORM=y | |||
512 | CONFIG_UNIX98_PTYS=y | 532 | CONFIG_UNIX98_PTYS=y |
513 | CONFIG_LEGACY_PTYS=y | 533 | CONFIG_LEGACY_PTYS=y |
514 | CONFIG_LEGACY_PTY_COUNT=256 | 534 | CONFIG_LEGACY_PTY_COUNT=256 |
515 | |||
516 | # | ||
517 | # IPMI | ||
518 | # | ||
519 | # CONFIG_IPMI_HANDLER is not set | 535 | # CONFIG_IPMI_HANDLER is not set |
520 | # CONFIG_WATCHDOG is not set | 536 | # CONFIG_WATCHDOG is not set |
521 | # CONFIG_HW_RANDOM is not set | 537 | # CONFIG_HW_RANDOM is not set |
@@ -526,10 +542,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
526 | # CONFIG_AGP is not set | 542 | # CONFIG_AGP is not set |
527 | # CONFIG_DRM is not set | 543 | # CONFIG_DRM is not set |
528 | # CONFIG_RAW_DRIVER is not set | 544 | # CONFIG_RAW_DRIVER is not set |
529 | |||
530 | # | ||
531 | # TPM devices | ||
532 | # | ||
533 | # CONFIG_TCG_TPM is not set | 545 | # CONFIG_TCG_TPM is not set |
534 | CONFIG_DEVPORT=y | 546 | CONFIG_DEVPORT=y |
535 | # CONFIG_I2C is not set | 547 | # CONFIG_I2C is not set |
@@ -539,11 +551,8 @@ CONFIG_DEVPORT=y | |||
539 | # | 551 | # |
540 | # CONFIG_SPI is not set | 552 | # CONFIG_SPI is not set |
541 | # CONFIG_SPI_MASTER is not set | 553 | # CONFIG_SPI_MASTER is not set |
542 | |||
543 | # | ||
544 | # Dallas's 1-wire bus | ||
545 | # | ||
546 | # CONFIG_W1 is not set | 554 | # CONFIG_W1 is not set |
555 | # CONFIG_POWER_SUPPLY is not set | ||
547 | # CONFIG_HWMON is not set | 556 | # CONFIG_HWMON is not set |
548 | 557 | ||
549 | # | 558 | # |
@@ -568,6 +577,7 @@ CONFIG_DEVPORT=y | |||
568 | # | 577 | # |
569 | # CONFIG_DISPLAY_SUPPORT is not set | 578 | # CONFIG_DISPLAY_SUPPORT is not set |
570 | # CONFIG_VGASTATE is not set | 579 | # CONFIG_VGASTATE is not set |
580 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
571 | # CONFIG_FB is not set | 581 | # CONFIG_FB is not set |
572 | # CONFIG_FB_IBM_GXT4500 is not set | 582 | # CONFIG_FB_IBM_GXT4500 is not set |
573 | 583 | ||
@@ -575,10 +585,7 @@ CONFIG_DEVPORT=y | |||
575 | # Sound | 585 | # Sound |
576 | # | 586 | # |
577 | # CONFIG_SOUND is not set | 587 | # CONFIG_SOUND is not set |
578 | 588 | CONFIG_USB_SUPPORT=y | |
579 | # | ||
580 | # USB support | ||
581 | # | ||
582 | CONFIG_USB_ARCH_HAS_HCD=y | 589 | CONFIG_USB_ARCH_HAS_HCD=y |
583 | CONFIG_USB_ARCH_HAS_OHCI=y | 590 | CONFIG_USB_ARCH_HAS_OHCI=y |
584 | CONFIG_USB_ARCH_HAS_EHCI=y | 591 | CONFIG_USB_ARCH_HAS_EHCI=y |
@@ -593,28 +600,9 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
593 | # | 600 | # |
594 | # CONFIG_USB_GADGET is not set | 601 | # CONFIG_USB_GADGET is not set |
595 | # CONFIG_MMC is not set | 602 | # CONFIG_MMC is not set |
596 | |||
597 | # | ||
598 | # LED devices | ||
599 | # | ||
600 | # CONFIG_NEW_LEDS is not set | 603 | # CONFIG_NEW_LEDS is not set |
601 | |||
602 | # | ||
603 | # LED drivers | ||
604 | # | ||
605 | |||
606 | # | ||
607 | # LED Triggers | ||
608 | # | ||
609 | |||
610 | # | ||
611 | # InfiniBand support | ||
612 | # | ||
613 | # CONFIG_INFINIBAND is not set | 604 | # CONFIG_INFINIBAND is not set |
614 | 605 | # CONFIG_EDAC is not set | |
615 | # | ||
616 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
617 | # | ||
618 | 606 | ||
619 | # | 607 | # |
620 | # Real Time Clock | 608 | # Real Time Clock |
@@ -635,6 +623,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
635 | # | 623 | # |
636 | 624 | ||
637 | # | 625 | # |
626 | # Userspace I/O | ||
627 | # | ||
628 | # CONFIG_UIO is not set | ||
629 | |||
630 | # | ||
638 | # File systems | 631 | # File systems |
639 | # | 632 | # |
640 | CONFIG_EXT2_FS=y | 633 | CONFIG_EXT2_FS=y |
@@ -694,6 +687,15 @@ CONFIG_RAMFS=y | |||
694 | # CONFIG_BEFS_FS is not set | 687 | # CONFIG_BEFS_FS is not set |
695 | # CONFIG_BFS_FS is not set | 688 | # CONFIG_BFS_FS is not set |
696 | # CONFIG_EFS_FS is not set | 689 | # CONFIG_EFS_FS is not set |
690 | CONFIG_JFFS2_FS=y | ||
691 | CONFIG_JFFS2_FS_DEBUG=0 | ||
692 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
693 | # CONFIG_JFFS2_SUMMARY is not set | ||
694 | # CONFIG_JFFS2_FS_XATTR is not set | ||
695 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
696 | CONFIG_JFFS2_ZLIB=y | ||
697 | CONFIG_JFFS2_RTIME=y | ||
698 | # CONFIG_JFFS2_RUBIN is not set | ||
697 | CONFIG_CRAMFS=y | 699 | CONFIG_CRAMFS=y |
698 | # CONFIG_VXFS_FS is not set | 700 | # CONFIG_VXFS_FS is not set |
699 | # CONFIG_HPFS_FS is not set | 701 | # CONFIG_HPFS_FS is not set |
@@ -723,7 +725,6 @@ CONFIG_SUNRPC=y | |||
723 | # CONFIG_NCP_FS is not set | 725 | # CONFIG_NCP_FS is not set |
724 | # CONFIG_CODA_FS is not set | 726 | # CONFIG_CODA_FS is not set |
725 | # CONFIG_AFS_FS is not set | 727 | # CONFIG_AFS_FS is not set |
726 | # CONFIG_9P_FS is not set | ||
727 | 728 | ||
728 | # | 729 | # |
729 | # Partition Types | 730 | # Partition Types |
@@ -750,8 +751,10 @@ CONFIG_BITREVERSE=y | |||
750 | # CONFIG_CRC16 is not set | 751 | # CONFIG_CRC16 is not set |
751 | # CONFIG_CRC_ITU_T is not set | 752 | # CONFIG_CRC_ITU_T is not set |
752 | CONFIG_CRC32=y | 753 | CONFIG_CRC32=y |
754 | # CONFIG_CRC7 is not set | ||
753 | # CONFIG_LIBCRC32C is not set | 755 | # CONFIG_LIBCRC32C is not set |
754 | CONFIG_ZLIB_INFLATE=y | 756 | CONFIG_ZLIB_INFLATE=y |
757 | CONFIG_ZLIB_DEFLATE=y | ||
755 | CONFIG_PLIST=y | 758 | CONFIG_PLIST=y |
756 | CONFIG_HAS_IOMEM=y | 759 | CONFIG_HAS_IOMEM=y |
757 | CONFIG_HAS_IOPORT=y | 760 | CONFIG_HAS_IOPORT=y |
@@ -774,6 +777,7 @@ CONFIG_MAGIC_SYSRQ=y | |||
774 | CONFIG_DEBUG_KERNEL=y | 777 | CONFIG_DEBUG_KERNEL=y |
775 | # CONFIG_DEBUG_SHIRQ is not set | 778 | # CONFIG_DEBUG_SHIRQ is not set |
776 | CONFIG_DETECT_SOFTLOCKUP=y | 779 | CONFIG_DETECT_SOFTLOCKUP=y |
780 | CONFIG_SCHED_DEBUG=y | ||
777 | # CONFIG_SCHEDSTATS is not set | 781 | # CONFIG_SCHEDSTATS is not set |
778 | # CONFIG_TIMER_STATS is not set | 782 | # CONFIG_TIMER_STATS is not set |
779 | # CONFIG_DEBUG_SLAB is not set | 783 | # CONFIG_DEBUG_SLAB is not set |
@@ -796,7 +800,6 @@ CONFIG_FORCED_INLINING=y | |||
796 | # CONFIG_DEBUG_PAGEALLOC is not set | 800 | # CONFIG_DEBUG_PAGEALLOC is not set |
797 | # CONFIG_DEBUGGER is not set | 801 | # CONFIG_DEBUGGER is not set |
798 | # CONFIG_BDI_SWITCH is not set | 802 | # CONFIG_BDI_SWITCH is not set |
799 | # CONFIG_BOOTX_TEXT is not set | ||
800 | # CONFIG_PPC_EARLY_DEBUG is not set | 803 | # CONFIG_PPC_EARLY_DEBUG is not set |
801 | 804 | ||
802 | # | 805 | # |
@@ -804,10 +807,6 @@ CONFIG_FORCED_INLINING=y | |||
804 | # | 807 | # |
805 | # CONFIG_KEYS is not set | 808 | # CONFIG_KEYS is not set |
806 | # CONFIG_SECURITY is not set | 809 | # CONFIG_SECURITY is not set |
807 | |||
808 | # | ||
809 | # Cryptographic options | ||
810 | # | ||
811 | CONFIG_CRYPTO=y | 810 | CONFIG_CRYPTO=y |
812 | CONFIG_CRYPTO_ALGAPI=y | 811 | CONFIG_CRYPTO_ALGAPI=y |
813 | CONFIG_CRYPTO_BLKCIPHER=y | 812 | CONFIG_CRYPTO_BLKCIPHER=y |
@@ -845,7 +844,4 @@ CONFIG_CRYPTO_DES=y | |||
845 | # CONFIG_CRYPTO_CRC32C is not set | 844 | # CONFIG_CRYPTO_CRC32C is not set |
846 | # CONFIG_CRYPTO_CAMELLIA is not set | 845 | # CONFIG_CRYPTO_CAMELLIA is not set |
847 | # CONFIG_CRYPTO_TEST is not set | 846 | # CONFIG_CRYPTO_TEST is not set |
848 | 847 | CONFIG_CRYPTO_HW=y | |
849 | # | ||
850 | # Hardware crypto devices | ||
851 | # | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index b0cb2e662c25..967afc517d8f 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -46,7 +46,7 @@ ifeq ($(CONFIG_PPC_MERGE),y) | |||
46 | 46 | ||
47 | extra-$(CONFIG_PPC_STD_MMU) := head_32.o | 47 | extra-$(CONFIG_PPC_STD_MMU) := head_32.o |
48 | extra-$(CONFIG_PPC64) := head_64.o | 48 | extra-$(CONFIG_PPC64) := head_64.o |
49 | extra-$(CONFIG_40x) := head_4xx.o | 49 | extra-$(CONFIG_40x) := head_40x.o |
50 | extra-$(CONFIG_44x) := head_44x.o | 50 | extra-$(CONFIG_44x) := head_44x.o |
51 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | 51 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
52 | extra-$(CONFIG_8xx) := head_8xx.o | 52 | extra-$(CONFIG_8xx) := head_8xx.o |
@@ -80,13 +80,6 @@ ifneq ($(CONFIG_PPC_INDIRECT_IO),y) | |||
80 | obj-y += iomap.o | 80 | obj-y += iomap.o |
81 | endif | 81 | endif |
82 | 82 | ||
83 | ifeq ($(CONFIG_PPC_ISERIES),y) | ||
84 | CFLAGS_lparmap.s += -g0 | ||
85 | extra-y += lparmap.s | ||
86 | $(obj)/head_64.o: $(obj)/lparmap.s | ||
87 | AFLAGS_head_64.o += -I$(obj) | ||
88 | endif | ||
89 | |||
90 | else | 83 | else |
91 | # stuff used from here for ARCH=ppc | 84 | # stuff used from here for ARCH=ppc |
92 | smpobj-$(CONFIG_SMP) += smp.o | 85 | smpobj-$(CONFIG_SMP) += smp.o |
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 5c9ff7f5c44e..4c47f9cc0d9a 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c | |||
@@ -38,7 +38,7 @@ struct aligninfo { | |||
38 | /* Bits in the flags field */ | 38 | /* Bits in the flags field */ |
39 | #define LD 0 /* load */ | 39 | #define LD 0 /* load */ |
40 | #define ST 1 /* store */ | 40 | #define ST 1 /* store */ |
41 | #define SE 2 /* sign-extend value */ | 41 | #define SE 2 /* sign-extend value, or FP ld/st as word */ |
42 | #define F 4 /* to/from fp regs */ | 42 | #define F 4 /* to/from fp regs */ |
43 | #define U 8 /* update index register */ | 43 | #define U 8 /* update index register */ |
44 | #define M 0x10 /* multiple load/store */ | 44 | #define M 0x10 /* multiple load/store */ |
@@ -87,9 +87,9 @@ static struct aligninfo aligninfo[128] = { | |||
87 | { 8, LD+F+U }, /* 00 1 1001: lfdu */ | 87 | { 8, LD+F+U }, /* 00 1 1001: lfdu */ |
88 | { 4, ST+F+S+U }, /* 00 1 1010: stfsu */ | 88 | { 4, ST+F+S+U }, /* 00 1 1010: stfsu */ |
89 | { 8, ST+F+U }, /* 00 1 1011: stfdu */ | 89 | { 8, ST+F+U }, /* 00 1 1011: stfdu */ |
90 | INVALID, /* 00 1 1100 */ | 90 | { 16, LD+F }, /* 00 1 1100: lfdp */ |
91 | INVALID, /* 00 1 1101 */ | 91 | INVALID, /* 00 1 1101 */ |
92 | INVALID, /* 00 1 1110 */ | 92 | { 16, ST+F }, /* 00 1 1110: stfdp */ |
93 | INVALID, /* 00 1 1111 */ | 93 | INVALID, /* 00 1 1111 */ |
94 | { 8, LD }, /* 01 0 0000: ldx */ | 94 | { 8, LD }, /* 01 0 0000: ldx */ |
95 | INVALID, /* 01 0 0001 */ | 95 | INVALID, /* 01 0 0001 */ |
@@ -167,10 +167,10 @@ static struct aligninfo aligninfo[128] = { | |||
167 | { 8, LD+F }, /* 11 0 1001: lfdx */ | 167 | { 8, LD+F }, /* 11 0 1001: lfdx */ |
168 | { 4, ST+F+S }, /* 11 0 1010: stfsx */ | 168 | { 4, ST+F+S }, /* 11 0 1010: stfsx */ |
169 | { 8, ST+F }, /* 11 0 1011: stfdx */ | 169 | { 8, ST+F }, /* 11 0 1011: stfdx */ |
170 | INVALID, /* 11 0 1100 */ | 170 | { 16, LD+F }, /* 11 0 1100: lfdpx */ |
171 | { 8, LD+M }, /* 11 0 1101: lmd */ | 171 | { 4, LD+F+SE }, /* 11 0 1101: lfiwax */ |
172 | INVALID, /* 11 0 1110 */ | 172 | { 16, ST+F }, /* 11 0 1110: stfdpx */ |
173 | { 8, ST+M }, /* 11 0 1111: stmd */ | 173 | { 4, ST+F }, /* 11 0 1111: stfiwx */ |
174 | { 4, LD+U }, /* 11 1 0000: lwzux */ | 174 | { 4, LD+U }, /* 11 1 0000: lwzux */ |
175 | INVALID, /* 11 1 0001 */ | 175 | INVALID, /* 11 1 0001 */ |
176 | { 4, ST+U }, /* 11 1 0010: stwux */ | 176 | { 4, ST+U }, /* 11 1 0010: stwux */ |
@@ -356,6 +356,42 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr, | |||
356 | return 1; | 356 | return 1; |
357 | } | 357 | } |
358 | 358 | ||
359 | /* | ||
360 | * Emulate floating-point pair loads and stores. | ||
361 | * Only POWER6 has these instructions, and it does true little-endian, | ||
362 | * so we don't need the address swizzling. | ||
363 | */ | ||
364 | static int emulate_fp_pair(struct pt_regs *regs, unsigned char __user *addr, | ||
365 | unsigned int reg, unsigned int flags) | ||
366 | { | ||
367 | char *ptr = (char *) ¤t->thread.fpr[reg]; | ||
368 | int i, ret; | ||
369 | |||
370 | if (!(flags & F)) | ||
371 | return 0; | ||
372 | if (reg & 1) | ||
373 | return 0; /* invalid form: FRS/FRT must be even */ | ||
374 | if (!(flags & SW)) { | ||
375 | /* not byte-swapped - easy */ | ||
376 | if (!(flags & ST)) | ||
377 | ret = __copy_from_user(ptr, addr, 16); | ||
378 | else | ||
379 | ret = __copy_to_user(addr, ptr, 16); | ||
380 | } else { | ||
381 | /* each FPR value is byte-swapped separately */ | ||
382 | ret = 0; | ||
383 | for (i = 0; i < 16; ++i) { | ||
384 | if (!(flags & ST)) | ||
385 | ret |= __get_user(ptr[i^7], addr + i); | ||
386 | else | ||
387 | ret |= __put_user(ptr[i^7], addr + i); | ||
388 | } | ||
389 | } | ||
390 | if (ret) | ||
391 | return -EFAULT; | ||
392 | return 1; /* exception handled and fixed up */ | ||
393 | } | ||
394 | |||
359 | 395 | ||
360 | /* | 396 | /* |
361 | * Called on alignment exception. Attempts to fixup | 397 | * Called on alignment exception. Attempts to fixup |
@@ -471,6 +507,10 @@ int fix_alignment(struct pt_regs *regs) | |||
471 | flush_fp_to_thread(current); | 507 | flush_fp_to_thread(current); |
472 | } | 508 | } |
473 | 509 | ||
510 | /* Special case for 16-byte FP loads and stores */ | ||
511 | if (nb == 16) | ||
512 | return emulate_fp_pair(regs, addr, reg, flags); | ||
513 | |||
474 | /* If we are loading, get the data from user space, else | 514 | /* If we are loading, get the data from user space, else |
475 | * get it from register values | 515 | * get it from register values |
476 | */ | 516 | */ |
@@ -531,7 +571,8 @@ int fix_alignment(struct pt_regs *regs) | |||
531 | * or floating point single precision conversion | 571 | * or floating point single precision conversion |
532 | */ | 572 | */ |
533 | switch (flags & ~(U|SW)) { | 573 | switch (flags & ~(U|SW)) { |
534 | case LD+SE: /* sign extend */ | 574 | case LD+SE: /* sign extending integer loads */ |
575 | case LD+F+SE: /* sign extend for lfiwax */ | ||
535 | if ( nb == 2 ) | 576 | if ( nb == 2 ) |
536 | data.ll = data.x16.low16; | 577 | data.ll = data.x16.low16; |
537 | else /* nb must be 4 */ | 578 | else /* nb must be 4 */ |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 2cb1d9487796..a40805328f9b 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -312,5 +312,13 @@ int main(void) | |||
312 | #ifdef CONFIG_BUG | 312 | #ifdef CONFIG_BUG |
313 | DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); | 313 | DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); |
314 | #endif | 314 | #endif |
315 | |||
316 | #ifdef CONFIG_PPC_ISERIES | ||
317 | /* the assembler miscalculates the VSID values */ | ||
318 | DEFINE(PAGE_OFFSET_ESID, GET_ESID(PAGE_OFFSET)); | ||
319 | DEFINE(PAGE_OFFSET_VSID, KERNEL_VSID(PAGE_OFFSET)); | ||
320 | DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START)); | ||
321 | DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START)); | ||
322 | #endif | ||
315 | return 0; | 323 | return 0; |
316 | } | 324 | } |
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index e7b684689e04..3ef51fb6f107 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <asm/sections.h> | 11 | #include <asm/sections.h> |
12 | #include <asm/prom.h> | 12 | #include <asm/prom.h> |
13 | #include <asm/btext.h> | 13 | #include <asm/btext.h> |
14 | #include <asm/prom.h> | ||
15 | #include <asm/page.h> | 14 | #include <asm/page.h> |
16 | #include <asm/mmu.h> | 15 | #include <asm/mmu.h> |
17 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 37658ea417fa..77c749a13378 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/irq.h> | ||
28 | 27 | ||
29 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
30 | #include <asm/machdep.h> | 29 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 2f6f5a7bc69e..ffa91d673ec8 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #define DBG(fmt...) | 25 | #define DBG(fmt...) |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | void reserve_kdump_trampoline(void) | 28 | void __init reserve_kdump_trampoline(void) |
29 | { | 29 | { |
30 | lmb_reserve(0, KDUMP_RESERVE_LIMIT); | 30 | lmb_reserve(0, KDUMP_RESERVE_LIMIT); |
31 | } | 31 | } |
diff --git a/arch/powerpc/kernel/head_4xx.S b/arch/powerpc/kernel/head_40x.S index adc7f8097cd4..a8e045773a92 100644 --- a/arch/powerpc/kernel/head_4xx.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/page.h> | 35 | #include <asm/page.h> |
36 | #include <asm/mmu.h> | 36 | #include <asm/mmu.h> |
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/ibm4xx.h> | ||
39 | #include <asm/cputable.h> | 38 | #include <asm/cputable.h> |
40 | #include <asm/thread_info.h> | 39 | #include <asm/thread_info.h> |
41 | #include <asm/ppc_asm.h> | 40 | #include <asm/ppc_asm.h> |
@@ -772,7 +771,7 @@ finish_tlb_load: | |||
772 | */ | 771 | */ |
773 | lwz r9, tlb_4xx_index@l(0) | 772 | lwz r9, tlb_4xx_index@l(0) |
774 | addi r9, r9, 1 | 773 | addi r9, r9, 1 |
775 | andi. r9, r9, (PPC4XX_TLB_SIZE-1) | 774 | andi. r9, r9, (PPC40X_TLB_SIZE-1) |
776 | stw r9, tlb_4xx_index@l(0) | 775 | stw r9, tlb_4xx_index@l(0) |
777 | 776 | ||
778 | 6: | 777 | 6: |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 171800002ede..33c4e8cab0ba 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <asm/iseries/lpar_map.h> | 34 | #include <asm/iseries/lpar_map.h> |
35 | #include <asm/thread_info.h> | 35 | #include <asm/thread_info.h> |
36 | #include <asm/firmware.h> | 36 | #include <asm/firmware.h> |
37 | #include <asm/page_64.h> | ||
38 | #include <asm/exception.h> | ||
37 | 39 | ||
38 | #define DO_SOFT_DISABLE | 40 | #define DO_SOFT_DISABLE |
39 | 41 | ||
@@ -144,344 +146,9 @@ exception_marker: | |||
144 | .text | 146 | .text |
145 | 147 | ||
146 | /* | 148 | /* |
147 | * The following macros define the code that appears as | ||
148 | * the prologue to each of the exception handlers. They | ||
149 | * are split into two parts to allow a single kernel binary | ||
150 | * to be used for pSeries and iSeries. | ||
151 | * LOL. One day... - paulus | ||
152 | */ | ||
153 | |||
154 | /* | ||
155 | * We make as much of the exception code common between native | ||
156 | * exception handlers (including pSeries LPAR) and iSeries LPAR | ||
157 | * implementations as possible. | ||
158 | */ | ||
159 | |||
160 | /* | ||
161 | * This is the start of the interrupt handlers for pSeries | 149 | * This is the start of the interrupt handlers for pSeries |
162 | * This code runs with relocation off. | 150 | * This code runs with relocation off. |
163 | */ | 151 | */ |
164 | #define EX_R9 0 | ||
165 | #define EX_R10 8 | ||
166 | #define EX_R11 16 | ||
167 | #define EX_R12 24 | ||
168 | #define EX_R13 32 | ||
169 | #define EX_SRR0 40 | ||
170 | #define EX_DAR 48 | ||
171 | #define EX_DSISR 56 | ||
172 | #define EX_CCR 60 | ||
173 | #define EX_R3 64 | ||
174 | #define EX_LR 72 | ||
175 | |||
176 | /* | ||
177 | * We're short on space and time in the exception prolog, so we can't | ||
178 | * use the normal SET_REG_IMMEDIATE macro. Normally we just need the | ||
179 | * low halfword of the address, but for Kdump we need the whole low | ||
180 | * word. | ||
181 | */ | ||
182 | #ifdef CONFIG_CRASH_DUMP | ||
183 | #define LOAD_HANDLER(reg, label) \ | ||
184 | oris reg,reg,(label)@h; /* virt addr of handler ... */ \ | ||
185 | ori reg,reg,(label)@l; /* .. and the rest */ | ||
186 | #else | ||
187 | #define LOAD_HANDLER(reg, label) \ | ||
188 | ori reg,reg,(label)@l; /* virt addr of handler ... */ | ||
189 | #endif | ||
190 | |||
191 | /* | ||
192 | * Equal to EXCEPTION_PROLOG_PSERIES, except that it forces 64bit mode. | ||
193 | * The firmware calls the registered system_reset_fwnmi and | ||
194 | * machine_check_fwnmi handlers in 32bit mode if the cpu happens to run | ||
195 | * a 32bit application at the time of the event. | ||
196 | * This firmware bug is present on POWER4 and JS20. | ||
197 | */ | ||
198 | #define EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(area, label) \ | ||
199 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
200 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
201 | std r10,area+EX_R10(r13); \ | ||
202 | std r11,area+EX_R11(r13); \ | ||
203 | std r12,area+EX_R12(r13); \ | ||
204 | mfspr r9,SPRN_SPRG1; \ | ||
205 | std r9,area+EX_R13(r13); \ | ||
206 | mfcr r9; \ | ||
207 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
208 | mfmsr r10; \ | ||
209 | /* force 64bit mode */ \ | ||
210 | li r11,5; /* MSR_SF_LG|MSR_ISF_LG */ \ | ||
211 | rldimi r10,r11,61,0; /* insert into top 3 bits */ \ | ||
212 | /* done 64bit mode */ \ | ||
213 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
214 | LOAD_HANDLER(r12,label) \ | ||
215 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
216 | mtspr SPRN_SRR0,r12; \ | ||
217 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
218 | mtspr SPRN_SRR1,r10; \ | ||
219 | rfid; \ | ||
220 | b . /* prevent speculative execution */ | ||
221 | |||
222 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | ||
223 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
224 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
225 | std r10,area+EX_R10(r13); \ | ||
226 | std r11,area+EX_R11(r13); \ | ||
227 | std r12,area+EX_R12(r13); \ | ||
228 | mfspr r9,SPRN_SPRG1; \ | ||
229 | std r9,area+EX_R13(r13); \ | ||
230 | mfcr r9; \ | ||
231 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
232 | mfmsr r10; \ | ||
233 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
234 | LOAD_HANDLER(r12,label) \ | ||
235 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
236 | mtspr SPRN_SRR0,r12; \ | ||
237 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
238 | mtspr SPRN_SRR1,r10; \ | ||
239 | rfid; \ | ||
240 | b . /* prevent speculative execution */ | ||
241 | |||
242 | /* | ||
243 | * This is the start of the interrupt handlers for iSeries | ||
244 | * This code runs with relocation on. | ||
245 | */ | ||
246 | #define EXCEPTION_PROLOG_ISERIES_1(area) \ | ||
247 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
248 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
249 | std r10,area+EX_R10(r13); \ | ||
250 | std r11,area+EX_R11(r13); \ | ||
251 | std r12,area+EX_R12(r13); \ | ||
252 | mfspr r9,SPRN_SPRG1; \ | ||
253 | std r9,area+EX_R13(r13); \ | ||
254 | mfcr r9 | ||
255 | |||
256 | #define EXCEPTION_PROLOG_ISERIES_2 \ | ||
257 | mfmsr r10; \ | ||
258 | ld r12,PACALPPACAPTR(r13); \ | ||
259 | ld r11,LPPACASRR0(r12); \ | ||
260 | ld r12,LPPACASRR1(r12); \ | ||
261 | ori r10,r10,MSR_RI; \ | ||
262 | mtmsrd r10,1 | ||
263 | |||
264 | /* | ||
265 | * The common exception prolog is used for all except a few exceptions | ||
266 | * such as a segment miss on a kernel address. We have to be prepared | ||
267 | * to take another exception from the point where we first touch the | ||
268 | * kernel stack onwards. | ||
269 | * | ||
270 | * On entry r13 points to the paca, r9-r13 are saved in the paca, | ||
271 | * r9 contains the saved CR, r11 and r12 contain the saved SRR0 and | ||
272 | * SRR1, and relocation is on. | ||
273 | */ | ||
274 | #define EXCEPTION_PROLOG_COMMON(n, area) \ | ||
275 | andi. r10,r12,MSR_PR; /* See if coming from user */ \ | ||
276 | mr r10,r1; /* Save r1 */ \ | ||
277 | subi r1,r1,INT_FRAME_SIZE; /* alloc frame on kernel stack */ \ | ||
278 | beq- 1f; \ | ||
279 | ld r1,PACAKSAVE(r13); /* kernel stack to use */ \ | ||
280 | 1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ | ||
281 | bge- cr1,2f; /* abort if it is */ \ | ||
282 | b 3f; \ | ||
283 | 2: li r1,(n); /* will be reloaded later */ \ | ||
284 | sth r1,PACA_TRAP_SAVE(r13); \ | ||
285 | b bad_stack; \ | ||
286 | 3: std r9,_CCR(r1); /* save CR in stackframe */ \ | ||
287 | std r11,_NIP(r1); /* save SRR0 in stackframe */ \ | ||
288 | std r12,_MSR(r1); /* save SRR1 in stackframe */ \ | ||
289 | std r10,0(r1); /* make stack chain pointer */ \ | ||
290 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | ||
291 | std r10,GPR1(r1); /* save r1 in stackframe */ \ | ||
292 | ACCOUNT_CPU_USER_ENTRY(r9, r10); \ | ||
293 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | ||
294 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | ||
295 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | ||
296 | ld r9,area+EX_R9(r13); /* move r9, r10 to stackframe */ \ | ||
297 | ld r10,area+EX_R10(r13); \ | ||
298 | std r9,GPR9(r1); \ | ||
299 | std r10,GPR10(r1); \ | ||
300 | ld r9,area+EX_R11(r13); /* move r11 - r13 to stackframe */ \ | ||
301 | ld r10,area+EX_R12(r13); \ | ||
302 | ld r11,area+EX_R13(r13); \ | ||
303 | std r9,GPR11(r1); \ | ||
304 | std r10,GPR12(r1); \ | ||
305 | std r11,GPR13(r1); \ | ||
306 | ld r2,PACATOC(r13); /* get kernel TOC into r2 */ \ | ||
307 | mflr r9; /* save LR in stackframe */ \ | ||
308 | std r9,_LINK(r1); \ | ||
309 | mfctr r10; /* save CTR in stackframe */ \ | ||
310 | std r10,_CTR(r1); \ | ||
311 | lbz r10,PACASOFTIRQEN(r13); \ | ||
312 | mfspr r11,SPRN_XER; /* save XER in stackframe */ \ | ||
313 | std r10,SOFTE(r1); \ | ||
314 | std r11,_XER(r1); \ | ||
315 | li r9,(n)+1; \ | ||
316 | std r9,_TRAP(r1); /* set trap number */ \ | ||
317 | li r10,0; \ | ||
318 | ld r11,exception_marker@toc(r2); \ | ||
319 | std r10,RESULT(r1); /* clear regs->result */ \ | ||
320 | std r11,STACK_FRAME_OVERHEAD-16(r1); /* mark the frame */ | ||
321 | |||
322 | /* | ||
323 | * Exception vectors. | ||
324 | */ | ||
325 | #define STD_EXCEPTION_PSERIES(n, label) \ | ||
326 | . = n; \ | ||
327 | .globl label##_pSeries; \ | ||
328 | label##_pSeries: \ | ||
329 | HMT_MEDIUM; \ | ||
330 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
331 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | ||
332 | |||
333 | #define HSTD_EXCEPTION_PSERIES(n, label) \ | ||
334 | . = n; \ | ||
335 | .globl label##_pSeries; \ | ||
336 | label##_pSeries: \ | ||
337 | HMT_MEDIUM; \ | ||
338 | mtspr SPRN_SPRG1,r20; /* save r20 */ \ | ||
339 | mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ | ||
340 | mtspr SPRN_SRR0,r20; \ | ||
341 | mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ | ||
342 | mtspr SPRN_SRR1,r20; \ | ||
343 | mfspr r20,SPRN_SPRG1; /* restore r20 */ \ | ||
344 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
345 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | ||
346 | |||
347 | |||
348 | #define MASKABLE_EXCEPTION_PSERIES(n, label) \ | ||
349 | . = n; \ | ||
350 | .globl label##_pSeries; \ | ||
351 | label##_pSeries: \ | ||
352 | HMT_MEDIUM; \ | ||
353 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
354 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
355 | std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ | ||
356 | std r10,PACA_EXGEN+EX_R10(r13); \ | ||
357 | lbz r10,PACASOFTIRQEN(r13); \ | ||
358 | mfcr r9; \ | ||
359 | cmpwi r10,0; \ | ||
360 | beq masked_interrupt; \ | ||
361 | mfspr r10,SPRN_SPRG1; \ | ||
362 | std r10,PACA_EXGEN+EX_R13(r13); \ | ||
363 | std r11,PACA_EXGEN+EX_R11(r13); \ | ||
364 | std r12,PACA_EXGEN+EX_R12(r13); \ | ||
365 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
366 | mfmsr r10; \ | ||
367 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
368 | LOAD_HANDLER(r12,label##_common) \ | ||
369 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
370 | mtspr SPRN_SRR0,r12; \ | ||
371 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
372 | mtspr SPRN_SRR1,r10; \ | ||
373 | rfid; \ | ||
374 | b . /* prevent speculative execution */ | ||
375 | |||
376 | #define STD_EXCEPTION_ISERIES(n, label, area) \ | ||
377 | .globl label##_iSeries; \ | ||
378 | label##_iSeries: \ | ||
379 | HMT_MEDIUM; \ | ||
380 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
381 | EXCEPTION_PROLOG_ISERIES_1(area); \ | ||
382 | EXCEPTION_PROLOG_ISERIES_2; \ | ||
383 | b label##_common | ||
384 | |||
385 | #define MASKABLE_EXCEPTION_ISERIES(n, label) \ | ||
386 | .globl label##_iSeries; \ | ||
387 | label##_iSeries: \ | ||
388 | HMT_MEDIUM; \ | ||
389 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
390 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \ | ||
391 | lbz r10,PACASOFTIRQEN(r13); \ | ||
392 | cmpwi 0,r10,0; \ | ||
393 | beq- label##_iSeries_masked; \ | ||
394 | EXCEPTION_PROLOG_ISERIES_2; \ | ||
395 | b label##_common; \ | ||
396 | |||
397 | #ifdef CONFIG_PPC_ISERIES | ||
398 | #define DISABLE_INTS \ | ||
399 | li r11,0; \ | ||
400 | stb r11,PACASOFTIRQEN(r13); \ | ||
401 | BEGIN_FW_FTR_SECTION; \ | ||
402 | stb r11,PACAHARDIRQEN(r13); \ | ||
403 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES); \ | ||
404 | BEGIN_FW_FTR_SECTION; \ | ||
405 | mfmsr r10; \ | ||
406 | ori r10,r10,MSR_EE; \ | ||
407 | mtmsrd r10,1; \ | ||
408 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
409 | |||
410 | #else | ||
411 | #define DISABLE_INTS \ | ||
412 | li r11,0; \ | ||
413 | stb r11,PACASOFTIRQEN(r13); \ | ||
414 | stb r11,PACAHARDIRQEN(r13) | ||
415 | |||
416 | #endif /* CONFIG_PPC_ISERIES */ | ||
417 | |||
418 | #define ENABLE_INTS \ | ||
419 | ld r12,_MSR(r1); \ | ||
420 | mfmsr r11; \ | ||
421 | rlwimi r11,r12,0,MSR_EE; \ | ||
422 | mtmsrd r11,1 | ||
423 | |||
424 | #define STD_EXCEPTION_COMMON(trap, label, hdlr) \ | ||
425 | .align 7; \ | ||
426 | .globl label##_common; \ | ||
427 | label##_common: \ | ||
428 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
429 | DISABLE_INTS; \ | ||
430 | bl .save_nvgprs; \ | ||
431 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
432 | bl hdlr; \ | ||
433 | b .ret_from_except | ||
434 | |||
435 | /* | ||
436 | * Like STD_EXCEPTION_COMMON, but for exceptions that can occur | ||
437 | * in the idle task and therefore need the special idle handling. | ||
438 | */ | ||
439 | #define STD_EXCEPTION_COMMON_IDLE(trap, label, hdlr) \ | ||
440 | .align 7; \ | ||
441 | .globl label##_common; \ | ||
442 | label##_common: \ | ||
443 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
444 | FINISH_NAP; \ | ||
445 | DISABLE_INTS; \ | ||
446 | bl .save_nvgprs; \ | ||
447 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
448 | bl hdlr; \ | ||
449 | b .ret_from_except | ||
450 | |||
451 | #define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr) \ | ||
452 | .align 7; \ | ||
453 | .globl label##_common; \ | ||
454 | label##_common: \ | ||
455 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
456 | FINISH_NAP; \ | ||
457 | DISABLE_INTS; \ | ||
458 | bl .ppc64_runlatch_on; \ | ||
459 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
460 | bl hdlr; \ | ||
461 | b .ret_from_except_lite | ||
462 | |||
463 | /* | ||
464 | * When the idle code in power4_idle puts the CPU into NAP mode, | ||
465 | * it has to do so in a loop, and relies on the external interrupt | ||
466 | * and decrementer interrupt entry code to get it out of the loop. | ||
467 | * It sets the _TLF_NAPPING bit in current_thread_info()->local_flags | ||
468 | * to signal that it is in the loop and needs help to get out. | ||
469 | */ | ||
470 | #ifdef CONFIG_PPC_970_NAP | ||
471 | #define FINISH_NAP \ | ||
472 | BEGIN_FTR_SECTION \ | ||
473 | clrrdi r11,r1,THREAD_SHIFT; \ | ||
474 | ld r9,TI_LOCAL_FLAGS(r11); \ | ||
475 | andi. r10,r9,_TLF_NAPPING; \ | ||
476 | bnel power4_fixup_nap; \ | ||
477 | END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) | ||
478 | #else | ||
479 | #define FINISH_NAP | ||
480 | #endif | ||
481 | |||
482 | /* | ||
483 | * Start of pSeries system interrupt routines | ||
484 | */ | ||
485 | . = 0x100 | 152 | . = 0x100 |
486 | .globl __start_interrupts | 153 | .globl __start_interrupts |
487 | __start_interrupts: | 154 | __start_interrupts: |
@@ -691,192 +358,6 @@ machine_check_fwnmi: | |||
691 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 358 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
692 | EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common) | 359 | EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common) |
693 | 360 | ||
694 | #ifdef CONFIG_PPC_ISERIES | ||
695 | /*** ISeries-LPAR interrupt handlers ***/ | ||
696 | |||
697 | STD_EXCEPTION_ISERIES(0x200, machine_check, PACA_EXMC) | ||
698 | |||
699 | .globl data_access_iSeries | ||
700 | data_access_iSeries: | ||
701 | mtspr SPRN_SPRG1,r13 | ||
702 | BEGIN_FTR_SECTION | ||
703 | mtspr SPRN_SPRG2,r12 | ||
704 | mfspr r13,SPRN_DAR | ||
705 | mfspr r12,SPRN_DSISR | ||
706 | srdi r13,r13,60 | ||
707 | rlwimi r13,r12,16,0x20 | ||
708 | mfcr r12 | ||
709 | cmpwi r13,0x2c | ||
710 | beq .do_stab_bolted_iSeries | ||
711 | mtcrf 0x80,r12 | ||
712 | mfspr r12,SPRN_SPRG2 | ||
713 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | ||
714 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN) | ||
715 | EXCEPTION_PROLOG_ISERIES_2 | ||
716 | b data_access_common | ||
717 | |||
718 | .do_stab_bolted_iSeries: | ||
719 | mtcrf 0x80,r12 | ||
720 | mfspr r12,SPRN_SPRG2 | ||
721 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB) | ||
722 | EXCEPTION_PROLOG_ISERIES_2 | ||
723 | b .do_stab_bolted | ||
724 | |||
725 | .globl data_access_slb_iSeries | ||
726 | data_access_slb_iSeries: | ||
727 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
728 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
729 | std r3,PACA_EXSLB+EX_R3(r13) | ||
730 | mfspr r3,SPRN_DAR | ||
731 | std r9,PACA_EXSLB+EX_R9(r13) | ||
732 | mfcr r9 | ||
733 | #ifdef __DISABLED__ | ||
734 | cmpdi r3,0 | ||
735 | bge slb_miss_user_iseries | ||
736 | #endif | ||
737 | std r10,PACA_EXSLB+EX_R10(r13) | ||
738 | std r11,PACA_EXSLB+EX_R11(r13) | ||
739 | std r12,PACA_EXSLB+EX_R12(r13) | ||
740 | mfspr r10,SPRN_SPRG1 | ||
741 | std r10,PACA_EXSLB+EX_R13(r13) | ||
742 | ld r12,PACALPPACAPTR(r13) | ||
743 | ld r12,LPPACASRR1(r12) | ||
744 | b .slb_miss_realmode | ||
745 | |||
746 | STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN) | ||
747 | |||
748 | .globl instruction_access_slb_iSeries | ||
749 | instruction_access_slb_iSeries: | ||
750 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
751 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
752 | std r3,PACA_EXSLB+EX_R3(r13) | ||
753 | ld r3,PACALPPACAPTR(r13) | ||
754 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ | ||
755 | std r9,PACA_EXSLB+EX_R9(r13) | ||
756 | mfcr r9 | ||
757 | #ifdef __DISABLED__ | ||
758 | cmpdi r3,0 | ||
759 | bge .slb_miss_user_iseries | ||
760 | #endif | ||
761 | std r10,PACA_EXSLB+EX_R10(r13) | ||
762 | std r11,PACA_EXSLB+EX_R11(r13) | ||
763 | std r12,PACA_EXSLB+EX_R12(r13) | ||
764 | mfspr r10,SPRN_SPRG1 | ||
765 | std r10,PACA_EXSLB+EX_R13(r13) | ||
766 | ld r12,PACALPPACAPTR(r13) | ||
767 | ld r12,LPPACASRR1(r12) | ||
768 | b .slb_miss_realmode | ||
769 | |||
770 | #ifdef __DISABLED__ | ||
771 | slb_miss_user_iseries: | ||
772 | std r10,PACA_EXGEN+EX_R10(r13) | ||
773 | std r11,PACA_EXGEN+EX_R11(r13) | ||
774 | std r12,PACA_EXGEN+EX_R12(r13) | ||
775 | mfspr r10,SPRG1 | ||
776 | ld r11,PACA_EXSLB+EX_R9(r13) | ||
777 | ld r12,PACA_EXSLB+EX_R3(r13) | ||
778 | std r10,PACA_EXGEN+EX_R13(r13) | ||
779 | std r11,PACA_EXGEN+EX_R9(r13) | ||
780 | std r12,PACA_EXGEN+EX_R3(r13) | ||
781 | EXCEPTION_PROLOG_ISERIES_2 | ||
782 | b slb_miss_user_common | ||
783 | #endif | ||
784 | |||
785 | MASKABLE_EXCEPTION_ISERIES(0x500, hardware_interrupt) | ||
786 | STD_EXCEPTION_ISERIES(0x600, alignment, PACA_EXGEN) | ||
787 | STD_EXCEPTION_ISERIES(0x700, program_check, PACA_EXGEN) | ||
788 | STD_EXCEPTION_ISERIES(0x800, fp_unavailable, PACA_EXGEN) | ||
789 | MASKABLE_EXCEPTION_ISERIES(0x900, decrementer) | ||
790 | STD_EXCEPTION_ISERIES(0xa00, trap_0a, PACA_EXGEN) | ||
791 | STD_EXCEPTION_ISERIES(0xb00, trap_0b, PACA_EXGEN) | ||
792 | |||
793 | .globl system_call_iSeries | ||
794 | system_call_iSeries: | ||
795 | mr r9,r13 | ||
796 | mfspr r13,SPRN_SPRG3 | ||
797 | EXCEPTION_PROLOG_ISERIES_2 | ||
798 | b system_call_common | ||
799 | |||
800 | STD_EXCEPTION_ISERIES( 0xd00, single_step, PACA_EXGEN) | ||
801 | STD_EXCEPTION_ISERIES( 0xe00, trap_0e, PACA_EXGEN) | ||
802 | STD_EXCEPTION_ISERIES( 0xf00, performance_monitor, PACA_EXGEN) | ||
803 | |||
804 | .globl system_reset_iSeries | ||
805 | system_reset_iSeries: | ||
806 | mfspr r13,SPRN_SPRG3 /* Get paca address */ | ||
807 | mfmsr r24 | ||
808 | ori r24,r24,MSR_RI | ||
809 | mtmsrd r24 /* RI on */ | ||
810 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | ||
811 | cmpwi 0,r24,0 /* Are we processor 0? */ | ||
812 | bne 1f | ||
813 | b .__start_initialization_iSeries /* Start up the first processor */ | ||
814 | 1: mfspr r4,SPRN_CTRLF | ||
815 | li r5,CTRL_RUNLATCH /* Turn off the run light */ | ||
816 | andc r4,r4,r5 | ||
817 | mtspr SPRN_CTRLT,r4 | ||
818 | |||
819 | 1: | ||
820 | HMT_LOW | ||
821 | #ifdef CONFIG_SMP | ||
822 | lbz r23,PACAPROCSTART(r13) /* Test if this processor | ||
823 | * should start */ | ||
824 | sync | ||
825 | LOAD_REG_IMMEDIATE(r3,current_set) | ||
826 | sldi r28,r24,3 /* get current_set[cpu#] */ | ||
827 | ldx r3,r3,r28 | ||
828 | addi r1,r3,THREAD_SIZE | ||
829 | subi r1,r1,STACK_FRAME_OVERHEAD | ||
830 | |||
831 | cmpwi 0,r23,0 | ||
832 | beq iSeries_secondary_smp_loop /* Loop until told to go */ | ||
833 | bne __secondary_start /* Loop until told to go */ | ||
834 | iSeries_secondary_smp_loop: | ||
835 | /* Let the Hypervisor know we are alive */ | ||
836 | /* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */ | ||
837 | lis r3,0x8002 | ||
838 | rldicr r3,r3,32,15 /* r0 = (r3 << 32) & 0xffff000000000000 */ | ||
839 | #else /* CONFIG_SMP */ | ||
840 | /* Yield the processor. This is required for non-SMP kernels | ||
841 | which are running on multi-threaded machines. */ | ||
842 | lis r3,0x8000 | ||
843 | rldicr r3,r3,32,15 /* r3 = (r3 << 32) & 0xffff000000000000 */ | ||
844 | addi r3,r3,18 /* r3 = 0x8000000000000012 which is "yield" */ | ||
845 | li r4,0 /* "yield timed" */ | ||
846 | li r5,-1 /* "yield forever" */ | ||
847 | #endif /* CONFIG_SMP */ | ||
848 | li r0,-1 /* r0=-1 indicates a Hypervisor call */ | ||
849 | sc /* Invoke the hypervisor via a system call */ | ||
850 | mfspr r13,SPRN_SPRG3 /* Put r13 back ???? */ | ||
851 | b 1b /* If SMP not configured, secondaries | ||
852 | * loop forever */ | ||
853 | |||
854 | decrementer_iSeries_masked: | ||
855 | /* We may not have a valid TOC pointer in here. */ | ||
856 | li r11,1 | ||
857 | ld r12,PACALPPACAPTR(r13) | ||
858 | stb r11,LPPACADECRINT(r12) | ||
859 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) | ||
860 | lwz r12,0(r12) | ||
861 | mtspr SPRN_DEC,r12 | ||
862 | /* fall through */ | ||
863 | |||
864 | hardware_interrupt_iSeries_masked: | ||
865 | mtcrf 0x80,r9 /* Restore regs */ | ||
866 | ld r12,PACALPPACAPTR(r13) | ||
867 | ld r11,LPPACASRR0(r12) | ||
868 | ld r12,LPPACASRR1(r12) | ||
869 | mtspr SPRN_SRR0,r11 | ||
870 | mtspr SPRN_SRR1,r12 | ||
871 | ld r9,PACA_EXGEN+EX_R9(r13) | ||
872 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
873 | ld r11,PACA_EXGEN+EX_R11(r13) | ||
874 | ld r12,PACA_EXGEN+EX_R12(r13) | ||
875 | ld r13,PACA_EXGEN+EX_R13(r13) | ||
876 | rfid | ||
877 | b . /* prevent speculative execution */ | ||
878 | #endif /* CONFIG_PPC_ISERIES */ | ||
879 | |||
880 | /*** Common interrupt handlers ***/ | 361 | /*** Common interrupt handlers ***/ |
881 | 362 | ||
882 | STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception) | 363 | STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception) |
@@ -1519,8 +1000,8 @@ _GLOBAL(do_stab_bolted) | |||
1519 | * Space for CPU0's segment table. | 1000 | * Space for CPU0's segment table. |
1520 | * | 1001 | * |
1521 | * On iSeries, the hypervisor must fill in at least one entry before | 1002 | * On iSeries, the hypervisor must fill in at least one entry before |
1522 | * we get control (with relocate on). The address is give to the hv | 1003 | * we get control (with relocate on). The address is given to the hv |
1523 | * as a page number (see xLparMap in lpardata.c), so this must be at a | 1004 | * as a page number (see xLparMap below), so this must be at a |
1524 | * fixed address (the linker can't compute (u64)&initial_stab >> | 1005 | * fixed address (the linker can't compute (u64)&initial_stab >> |
1525 | * PAGE_SHIFT). | 1006 | * PAGE_SHIFT). |
1526 | */ | 1007 | */ |
@@ -1542,12 +1023,22 @@ fwnmi_data_area: | |||
1542 | * both pSeries and iSeries */ | 1023 | * both pSeries and iSeries */ |
1543 | #ifdef CONFIG_PPC_ISERIES | 1024 | #ifdef CONFIG_PPC_ISERIES |
1544 | . = LPARMAP_PHYS | 1025 | . = LPARMAP_PHYS |
1545 | #include "lparmap.s" | 1026 | .globl xLparMap |
1546 | /* | 1027 | xLparMap: |
1547 | * This ".text" is here for old compilers that generate a trailing | 1028 | .quad HvEsidsToMap /* xNumberEsids */ |
1548 | * .note section when compiling .c files to .s | 1029 | .quad HvRangesToMap /* xNumberRanges */ |
1549 | */ | 1030 | .quad STAB0_PAGE /* xSegmentTableOffs */ |
1550 | .text | 1031 | .zero 40 /* xRsvd */ |
1032 | /* xEsids (HvEsidsToMap entries of 2 quads) */ | ||
1033 | .quad PAGE_OFFSET_ESID /* xKernelEsid */ | ||
1034 | .quad PAGE_OFFSET_VSID /* xKernelVsid */ | ||
1035 | .quad VMALLOC_START_ESID /* xKernelEsid */ | ||
1036 | .quad VMALLOC_START_VSID /* xKernelVsid */ | ||
1037 | /* xRanges (HvRangesToMap entries of 3 quads) */ | ||
1038 | .quad HvPagesToMap /* xPages */ | ||
1039 | .quad 0 /* xOffset */ | ||
1040 | .quad PAGE_OFFSET_VSID << (SID_SHIFT - HW_PAGE_SHIFT) /* xVPN */ | ||
1041 | |||
1551 | #endif /* CONFIG_PPC_ISERIES */ | 1042 | #endif /* CONFIG_PPC_ISERIES */ |
1552 | 1043 | ||
1553 | . = 0x8000 | 1044 | . = 0x8000 |
@@ -1611,39 +1102,6 @@ _GLOBAL(generic_secondary_smp_init) | |||
1611 | b __secondary_start | 1102 | b __secondary_start |
1612 | #endif | 1103 | #endif |
1613 | 1104 | ||
1614 | #ifdef CONFIG_PPC_ISERIES | ||
1615 | _INIT_STATIC(__start_initialization_iSeries) | ||
1616 | /* Clear out the BSS */ | ||
1617 | LOAD_REG_IMMEDIATE(r11,__bss_stop) | ||
1618 | LOAD_REG_IMMEDIATE(r8,__bss_start) | ||
1619 | sub r11,r11,r8 /* bss size */ | ||
1620 | addi r11,r11,7 /* round up to an even double word */ | ||
1621 | rldicl. r11,r11,61,3 /* shift right by 3 */ | ||
1622 | beq 4f | ||
1623 | addi r8,r8,-8 | ||
1624 | li r0,0 | ||
1625 | mtctr r11 /* zero this many doublewords */ | ||
1626 | 3: stdu r0,8(r8) | ||
1627 | bdnz 3b | ||
1628 | 4: | ||
1629 | LOAD_REG_IMMEDIATE(r1,init_thread_union) | ||
1630 | addi r1,r1,THREAD_SIZE | ||
1631 | li r0,0 | ||
1632 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | ||
1633 | |||
1634 | LOAD_REG_IMMEDIATE(r2,__toc_start) | ||
1635 | addi r2,r2,0x4000 | ||
1636 | addi r2,r2,0x4000 | ||
1637 | |||
1638 | bl .iSeries_early_setup | ||
1639 | bl .early_setup | ||
1640 | |||
1641 | /* relocation is on at this point */ | ||
1642 | |||
1643 | b .start_here_common | ||
1644 | #endif /* CONFIG_PPC_ISERIES */ | ||
1645 | |||
1646 | |||
1647 | _STATIC(__mmu_off) | 1105 | _STATIC(__mmu_off) |
1648 | mfmsr r3 | 1106 | mfmsr r3 |
1649 | andi. r0,r3,MSR_IR|MSR_DR | 1107 | andi. r0,r3,MSR_IR|MSR_DR |
@@ -1891,6 +1349,7 @@ _GLOBAL(pmac_secondary_start) | |||
1891 | * r13 = paca virtual address | 1349 | * r13 = paca virtual address |
1892 | * SPRG3 = paca virtual address | 1350 | * SPRG3 = paca virtual address |
1893 | */ | 1351 | */ |
1352 | .globl __secondary_start | ||
1894 | __secondary_start: | 1353 | __secondary_start: |
1895 | /* Set thread priority to MEDIUM */ | 1354 | /* Set thread priority to MEDIUM */ |
1896 | HMT_MEDIUM | 1355 | HMT_MEDIUM |
@@ -2021,7 +1480,7 @@ _INIT_STATIC(start_here_multiplatform) | |||
2021 | b . /* prevent speculative execution */ | 1480 | b . /* prevent speculative execution */ |
2022 | 1481 | ||
2023 | /* This is where all platforms converge execution */ | 1482 | /* This is where all platforms converge execution */ |
2024 | _INIT_STATIC(start_here_common) | 1483 | _INIT_GLOBAL(start_here_common) |
2025 | /* relocation is on at this point */ | 1484 | /* relocation is on at this point */ |
2026 | 1485 | ||
2027 | /* The following code sets up the SP and TOC now that we are */ | 1486 | /* The following code sets up the SP and TOC now that we are */ |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index c08ceca6277d..e4ec6eee81a8 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/init.h> | ||
34 | #include <linux/bitops.h> | 33 | #include <linux/bitops.h> |
35 | #include <asm/io.h> | 34 | #include <asm/io.h> |
36 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 24bea97c736c..dfad0e469eec 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -272,7 +272,7 @@ void do_IRQ(struct pt_regs *regs) | |||
272 | struct thread_info *curtp, *irqtp; | 272 | struct thread_info *curtp, *irqtp; |
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | irq_enter(); | 275 | irq_enter(); |
276 | 276 | ||
277 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 277 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
278 | /* Debugging check for stack overflow: is there less than 2KB free? */ | 278 | /* Debugging check for stack overflow: is there less than 2KB free? */ |
@@ -321,7 +321,7 @@ void do_IRQ(struct pt_regs *regs) | |||
321 | /* That's not SMP safe ... but who cares ? */ | 321 | /* That's not SMP safe ... but who cares ? */ |
322 | ppc_spurious_interrupts++; | 322 | ppc_spurious_interrupts++; |
323 | 323 | ||
324 | irq_exit(); | 324 | irq_exit(); |
325 | set_irq_regs(old_regs); | 325 | set_irq_regs(old_regs); |
326 | 326 | ||
327 | #ifdef CONFIG_PPC_ISERIES | 327 | #ifdef CONFIG_PPC_ISERIES |
diff --git a/arch/powerpc/kernel/lparmap.c b/arch/powerpc/kernel/lparmap.c deleted file mode 100644 index af11285ffbd1..000000000000 --- a/arch/powerpc/kernel/lparmap.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005 Stephen Rothwell IBM Corp. | ||
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 | #include <asm/mmu.h> | ||
10 | #include <asm/pgtable.h> | ||
11 | #include <asm/iseries/lpar_map.h> | ||
12 | |||
13 | /* The # is to stop gcc trying to make .text nonexecutable */ | ||
14 | const struct LparMap __attribute__((__section__(".text #"))) xLparMap = { | ||
15 | .xNumberEsids = HvEsidsToMap, | ||
16 | .xNumberRanges = HvRangesToMap, | ||
17 | .xSegmentTableOffs = STAB0_PAGE, | ||
18 | |||
19 | .xEsids = { | ||
20 | { .xKernelEsid = GET_ESID(PAGE_OFFSET), | ||
21 | .xKernelVsid = KERNEL_VSID(PAGE_OFFSET), }, | ||
22 | { .xKernelEsid = GET_ESID(VMALLOC_START), | ||
23 | .xKernelVsid = KERNEL_VSID(VMALLOC_START), }, | ||
24 | }, | ||
25 | |||
26 | .xRanges = { | ||
27 | { .xPages = HvPagesToMap, | ||
28 | .xOffset = 0, | ||
29 | .xVPN = KERNEL_VSID(PAGE_OFFSET) << (SID_SHIFT - HW_PAGE_SHIFT), | ||
30 | }, | ||
31 | }, | ||
32 | }; | ||
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index f9676f52c6d8..0ed31f220482 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c | |||
@@ -34,21 +34,10 @@ | |||
34 | 34 | ||
35 | #undef DEBUG_NVRAM | 35 | #undef DEBUG_NVRAM |
36 | 36 | ||
37 | static int nvram_scan_partitions(void); | ||
38 | static int nvram_setup_partition(void); | ||
39 | static int nvram_create_os_partition(void); | ||
40 | static int nvram_remove_os_partition(void); | ||
41 | |||
42 | static struct nvram_partition * nvram_part; | 37 | static struct nvram_partition * nvram_part; |
43 | static long nvram_error_log_index = -1; | 38 | static long nvram_error_log_index = -1; |
44 | static long nvram_error_log_size = 0; | 39 | static long nvram_error_log_size = 0; |
45 | 40 | ||
46 | int no_logging = 1; /* Until we initialize everything, | ||
47 | * make sure we don't try logging | ||
48 | * anything */ | ||
49 | |||
50 | extern volatile int error_log_cnt; | ||
51 | |||
52 | struct err_log_info { | 41 | struct err_log_info { |
53 | int error_type; | 42 | int error_type; |
54 | unsigned int seq_num; | 43 | unsigned int seq_num; |
@@ -636,16 +625,13 @@ void __exit nvram_cleanup(void) | |||
636 | * sequence #: The unique sequence # for each event. (until it wraps) | 625 | * sequence #: The unique sequence # for each event. (until it wraps) |
637 | * error log: The error log from event_scan | 626 | * error log: The error log from event_scan |
638 | */ | 627 | */ |
639 | int nvram_write_error_log(char * buff, int length, unsigned int err_type) | 628 | int nvram_write_error_log(char * buff, int length, |
629 | unsigned int err_type, unsigned int error_log_cnt) | ||
640 | { | 630 | { |
641 | int rc; | 631 | int rc; |
642 | loff_t tmp_index; | 632 | loff_t tmp_index; |
643 | struct err_log_info info; | 633 | struct err_log_info info; |
644 | 634 | ||
645 | if (no_logging) { | ||
646 | return -EPERM; | ||
647 | } | ||
648 | |||
649 | if (nvram_error_log_index == -1) { | 635 | if (nvram_error_log_index == -1) { |
650 | return -ESPIPE; | 636 | return -ESPIPE; |
651 | } | 637 | } |
@@ -678,7 +664,8 @@ int nvram_write_error_log(char * buff, int length, unsigned int err_type) | |||
678 | * | 664 | * |
679 | * Reads nvram for error log for at most 'length' | 665 | * Reads nvram for error log for at most 'length' |
680 | */ | 666 | */ |
681 | int nvram_read_error_log(char * buff, int length, unsigned int * err_type) | 667 | int nvram_read_error_log(char * buff, int length, |
668 | unsigned int * err_type, unsigned int * error_log_cnt) | ||
682 | { | 669 | { |
683 | int rc; | 670 | int rc; |
684 | loff_t tmp_index; | 671 | loff_t tmp_index; |
@@ -704,7 +691,7 @@ int nvram_read_error_log(char * buff, int length, unsigned int * err_type) | |||
704 | return rc; | 691 | return rc; |
705 | } | 692 | } |
706 | 693 | ||
707 | error_log_cnt = info.seq_num; | 694 | *error_log_cnt = info.seq_num; |
708 | *err_type = info.error_type; | 695 | *err_type = info.error_type; |
709 | 696 | ||
710 | return 0; | 697 | return 0; |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 04a3109ae3c6..0e2bee46304c 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -1457,8 +1457,8 @@ null_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
1457 | 1457 | ||
1458 | static struct pci_ops null_pci_ops = | 1458 | static struct pci_ops null_pci_ops = |
1459 | { | 1459 | { |
1460 | null_read_config, | 1460 | .read = null_read_config, |
1461 | null_write_config | 1461 | .write = null_write_config, |
1462 | }; | 1462 | }; |
1463 | 1463 | ||
1464 | /* | 1464 | /* |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index a20f1951a5ce..430c502179c3 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -180,7 +180,7 @@ EXPORT_SYMBOL(cacheable_memcpy); | |||
180 | EXPORT_SYMBOL(cpm_install_handler); | 180 | EXPORT_SYMBOL(cpm_install_handler); |
181 | EXPORT_SYMBOL(cpm_free_handler); | 181 | EXPORT_SYMBOL(cpm_free_handler); |
182 | #endif /* CONFIG_8xx */ | 182 | #endif /* CONFIG_8xx */ |
183 | #if defined(CONFIG_8xx) || defined(CONFIG_40x) | 183 | #if defined(CONFIG_8xx) |
184 | EXPORT_SYMBOL(__res); | 184 | EXPORT_SYMBOL(__res); |
185 | #endif | 185 | #endif |
186 | 186 | ||
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index a38197b12d3e..0028fe68e09e 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <asm/pSeries_reconfig.h> | 52 | #include <asm/pSeries_reconfig.h> |
53 | #include <asm/pci-bridge.h> | 53 | #include <asm/pci-bridge.h> |
54 | #include <asm/kexec.h> | 54 | #include <asm/kexec.h> |
55 | #include <asm/system.h> | ||
56 | 55 | ||
57 | #ifdef DEBUG | 56 | #ifdef DEBUG |
58 | #define DBG(fmt...) printk(KERN_ERR fmt) | 57 | #define DBG(fmt...) printk(KERN_ERR fmt) |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a1d582e38627..29c2160bcbb5 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2046,6 +2046,7 @@ static void __init fixup_device_tree_maple(void) | |||
2046 | /* | 2046 | /* |
2047 | * Pegasos and BriQ lacks the "ranges" property in the isa node | 2047 | * Pegasos and BriQ lacks the "ranges" property in the isa node |
2048 | * Pegasos needs decimal IRQ 14/15, not hexadecimal | 2048 | * Pegasos needs decimal IRQ 14/15, not hexadecimal |
2049 | * Pegasos has the IDE configured in legacy mode, but advertised as native | ||
2049 | */ | 2050 | */ |
2050 | static void __init fixup_device_tree_chrp(void) | 2051 | static void __init fixup_device_tree_chrp(void) |
2051 | { | 2052 | { |
@@ -2083,9 +2084,13 @@ static void __init fixup_device_tree_chrp(void) | |||
2083 | prom_printf("Fixing up IDE interrupt on Pegasos...\n"); | 2084 | prom_printf("Fixing up IDE interrupt on Pegasos...\n"); |
2084 | prop[0] = 14; | 2085 | prop[0] = 14; |
2085 | prop[1] = 0x0; | 2086 | prop[1] = 0x0; |
2086 | prop[2] = 15; | 2087 | prom_setprop(ph, name, "interrupts", prop, 2*sizeof(u32)); |
2087 | prop[3] = 0x0; | 2088 | prom_printf("Fixing up IDE class-code on Pegasos...\n"); |
2088 | prom_setprop(ph, name, "interrupts", prop, 4*sizeof(u32)); | 2089 | rc = prom_getprop(ph, "class-code", prop, sizeof(u32)); |
2090 | if (rc == sizeof(u32)) { | ||
2091 | prop[0] &= ~0x5; | ||
2092 | prom_setprop(ph, name, "class-code", prop, sizeof(u32)); | ||
2093 | } | ||
2089 | } | 2094 | } |
2090 | } | 2095 | } |
2091 | #else | 2096 | #else |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index a5de6211b97a..21f14e57d1f3 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -171,8 +171,8 @@ static int rtas_pci_write_config(struct pci_bus *bus, | |||
171 | } | 171 | } |
172 | 172 | ||
173 | struct pci_ops rtas_pci_ops = { | 173 | struct pci_ops rtas_pci_ops = { |
174 | rtas_pci_read_config, | 174 | .read = rtas_pci_read_config, |
175 | rtas_pci_write_config | 175 | .write = rtas_pci_write_config, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | int is_python(struct device_node *dev) | 178 | int is_python(struct device_node *dev) |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 7ec6ba56d83d..a288a5f2dbc6 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -18,13 +18,11 @@ | |||
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/console.h> | 19 | #include <linux/console.h> |
20 | 20 | ||
21 | #include <asm/residual.h> | ||
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
23 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
24 | #include <asm/processor.h> | 23 | #include <asm/processor.h> |
25 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
26 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
27 | #include <asm/amigappc.h> | ||
28 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
29 | #include <asm/elf.h> | 27 | #include <asm/elf.h> |
30 | #include <asm/cputable.h> | 28 | #include <asm/cputable.h> |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 727a6699f2f4..b5944d8e3802 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -72,7 +72,6 @@ | |||
72 | #include <asm/iseries/it_lp_queue.h> | 72 | #include <asm/iseries/it_lp_queue.h> |
73 | #include <asm/iseries/hv_call_xm.h> | 73 | #include <asm/iseries/hv_call_xm.h> |
74 | #endif | 74 | #endif |
75 | #include <asm/smp.h> | ||
76 | 75 | ||
77 | /* keep track of when we need to update the rtc */ | 76 | /* keep track of when we need to update the rtc */ |
78 | time_t last_rtc_update; | 77 | time_t last_rtc_update; |
@@ -867,7 +866,7 @@ void __init generic_calibrate_decr(void) | |||
867 | "(not found)\n"); | 866 | "(not found)\n"); |
868 | } | 867 | } |
869 | 868 | ||
870 | #ifdef CONFIG_BOOKE | 869 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
871 | /* Set the time base to zero */ | 870 | /* Set the time base to zero */ |
872 | mtspr(SPRN_TBWL, 0); | 871 | mtspr(SPRN_TBWL, 0); |
873 | mtspr(SPRN_TBWU, 0); | 872 | mtspr(SPRN_TBWU, 0); |
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/40x_mmu.c index 7ff2609b64d1..e067df836be2 100644 --- a/arch/powerpc/mm/4xx_mmu.c +++ b/arch/powerpc/mm/40x_mmu.c | |||
@@ -108,7 +108,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
108 | pmd_t *pmdp; | 108 | pmd_t *pmdp; |
109 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 109 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
110 | 110 | ||
111 | pmdp = pmd_offset(pgd_offset_k(v), v); | 111 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); |
112 | pmd_val(*pmdp++) = val; | 112 | pmd_val(*pmdp++) = val; |
113 | pmd_val(*pmdp++) = val; | 113 | pmd_val(*pmdp++) = val; |
114 | pmd_val(*pmdp++) = val; | 114 | pmd_val(*pmdp++) = val; |
@@ -123,7 +123,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
123 | pmd_t *pmdp; | 123 | pmd_t *pmdp; |
124 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 124 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
125 | 125 | ||
126 | pmdp = pmd_offset(pgd_offset_k(v), v); | 126 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); |
127 | pmd_val(*pmdp) = val; | 127 | pmd_val(*pmdp) = val; |
128 | 128 | ||
129 | v += LARGE_PAGE_SIZE_4M; | 129 | v += LARGE_PAGE_SIZE_4M; |
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index 7e4d27ad3dee..bf20fa688809 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile | |||
@@ -13,7 +13,7 @@ obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \ | |||
13 | hash_utils_64.o hash_low_64.o tlb_64.o \ | 13 | hash_utils_64.o hash_low_64.o tlb_64.o \ |
14 | slb_low.o slb.o stab.o mmap.o $(hash-y) | 14 | slb_low.o slb.o stab.o mmap.o $(hash-y) |
15 | obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o | 15 | obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o |
16 | obj-$(CONFIG_40x) += 4xx_mmu.o | 16 | obj-$(CONFIG_40x) += 40x_mmu.o |
17 | obj-$(CONFIG_44x) += 44x_mmu.o | 17 | obj-$(CONFIG_44x) += 44x_mmu.o |
18 | obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o | 18 | obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o |
19 | obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o | 19 | obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index a47151e806ca..d525f2eba313 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <asm/tlb.h> | 49 | #include <asm/tlb.h> |
50 | #include <asm/cacheflush.h> | 50 | #include <asm/cacheflush.h> |
51 | #include <asm/cputable.h> | 51 | #include <asm/cputable.h> |
52 | #include <asm/abs_addr.h> | ||
53 | #include <asm/sections.h> | 52 | #include <asm/sections.h> |
54 | #include <asm/spu.h> | 53 | #include <asm/spu.h> |
55 | 54 | ||
@@ -602,13 +601,7 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr) | |||
602 | { | 601 | { |
603 | if (mm->context.user_psize == MMU_PAGE_4K) | 602 | if (mm->context.user_psize == MMU_PAGE_4K) |
604 | return; | 603 | return; |
605 | #ifdef CONFIG_PPC_MM_SLICES | ||
606 | slice_set_user_psize(mm, MMU_PAGE_4K); | 604 | slice_set_user_psize(mm, MMU_PAGE_4K); |
607 | #else /* CONFIG_PPC_MM_SLICES */ | ||
608 | mm->context.user_psize = MMU_PAGE_4K; | ||
609 | mm->context.sllp = SLB_VSID_USER | mmu_psize_defs[MMU_PAGE_4K].sllp; | ||
610 | #endif /* CONFIG_PPC_MM_SLICES */ | ||
611 | |||
612 | #ifdef CONFIG_SPU_BASE | 605 | #ifdef CONFIG_SPU_BASE |
613 | spu_flush_all_slbs(mm); | 606 | spu_flush_all_slbs(mm); |
614 | #endif | 607 | #endif |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 4835f73af304..ba5f12a60467 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -22,11 +22,8 @@ | |||
22 | #include <asm/mmu_context.h> | 22 | #include <asm/mmu_context.h> |
23 | #include <asm/machdep.h> | 23 | #include <asm/machdep.h> |
24 | #include <asm/cputable.h> | 24 | #include <asm/cputable.h> |
25 | #include <asm/tlb.h> | ||
26 | #include <asm/spu.h> | 25 | #include <asm/spu.h> |
27 | 26 | ||
28 | #include <linux/sysctl.h> | ||
29 | |||
30 | #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) | 27 | #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) |
31 | #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) | 28 | #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) |
32 | 29 | ||
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index e1f5ded851f6..d65995ae8273 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/machdep.h> | 41 | #include <asm/machdep.h> |
42 | #include <asm/btext.h> | 42 | #include <asm/btext.h> |
43 | #include <asm/tlb.h> | 43 | #include <asm/tlb.h> |
44 | #include <asm/prom.h> | ||
45 | #include <asm/lmb.h> | 44 | #include <asm/lmb.h> |
46 | #include <asm/sections.h> | 45 | #include <asm/sections.h> |
47 | 46 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index f0e7eedb1ba3..32dcfc9b0082 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
43 | #include <asm/btext.h> | 43 | #include <asm/btext.h> |
44 | #include <asm/tlb.h> | 44 | #include <asm/tlb.h> |
45 | #include <asm/prom.h> | ||
46 | #include <asm/lmb.h> | 45 | #include <asm/lmb.h> |
47 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
48 | #include <asm/vdso.h> | 47 | #include <asm/vdso.h> |
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c index 7a78cdc0515a..1db38ba1f544 100644 --- a/arch/powerpc/mm/mmu_context_64.c +++ b/arch/powerpc/mm/mmu_context_64.c | |||
@@ -28,7 +28,6 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
28 | { | 28 | { |
29 | int index; | 29 | int index; |
30 | int err; | 30 | int err; |
31 | int new_context = (mm->context.id == 0); | ||
32 | 31 | ||
33 | again: | 32 | again: |
34 | if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) | 33 | if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) |
@@ -50,19 +49,13 @@ again: | |||
50 | return -ENOMEM; | 49 | return -ENOMEM; |
51 | } | 50 | } |
52 | 51 | ||
53 | mm->context.id = index; | ||
54 | #ifdef CONFIG_PPC_MM_SLICES | ||
55 | /* The old code would re-promote on fork, we don't do that | 52 | /* The old code would re-promote on fork, we don't do that |
56 | * when using slices as it could cause problem promoting slices | 53 | * when using slices as it could cause problem promoting slices |
57 | * that have been forced down to 4K | 54 | * that have been forced down to 4K |
58 | */ | 55 | */ |
59 | if (new_context) | 56 | if (slice_mm_new_context(mm)) |
60 | slice_set_user_psize(mm, mmu_virtual_psize); | 57 | slice_set_user_psize(mm, mmu_virtual_psize); |
61 | #else | 58 | mm->context.id = index; |
62 | mm->context.user_psize = mmu_virtual_psize; | ||
63 | mm->context.sllp = SLB_VSID_USER | | ||
64 | mmu_psize_defs[mmu_virtual_psize].sllp; | ||
65 | #endif | ||
66 | 59 | ||
67 | return 0; | 60 | return 0; |
68 | } | 61 | } |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index d5fd3909d13a..319826ef1645 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -551,6 +551,7 @@ EXPORT_SYMBOL_GPL(get_slice_psize); | |||
551 | * | 551 | * |
552 | * This is also called in init_new_context() to change back the user | 552 | * This is also called in init_new_context() to change back the user |
553 | * psize from whatever the parent context had it set to | 553 | * psize from whatever the parent context had it set to |
554 | * N.B. This may be called before mm->context.id has been set. | ||
554 | * | 555 | * |
555 | * This function will only change the content of the {low,high)_slice_psize | 556 | * This function will only change the content of the {low,high)_slice_psize |
556 | * masks, it will not flush SLBs as this shall be handled lazily by the | 557 | * masks, it will not flush SLBs as this shall be handled lazily by the |
diff --git a/arch/powerpc/platforms/4xx/Kconfig b/arch/powerpc/platforms/40x/Kconfig index ded357c17414..2cc7343b468c 100644 --- a/arch/powerpc/platforms/4xx/Kconfig +++ b/arch/powerpc/platforms/40x/Kconfig | |||
@@ -1,16 +1,3 @@ | |||
1 | config 4xx | ||
2 | bool | ||
3 | depends on 40x || 44x | ||
4 | default y | ||
5 | |||
6 | config BOOKE | ||
7 | bool | ||
8 | depends on 44x | ||
9 | default y | ||
10 | |||
11 | menu "AMCC 40x options" | ||
12 | depends on 40x | ||
13 | |||
14 | #config BUBINGA | 1 | #config BUBINGA |
15 | # bool "Bubinga" | 2 | # bool "Bubinga" |
16 | # depends on 40x | 3 | # depends on 40x |
@@ -82,8 +69,6 @@ menu "AMCC 40x options" | |||
82 | # help | 69 | # help |
83 | # This option enables support for the Xilinx ML300 evaluation board. | 70 | # This option enables support for the Xilinx ML300 evaluation board. |
84 | 71 | ||
85 | endmenu | ||
86 | |||
87 | # 40x specific CPU modules, selected based on the board above. | 72 | # 40x specific CPU modules, selected based on the board above. |
88 | config NP405H | 73 | config NP405H |
89 | bool | 74 | bool |
@@ -126,68 +111,6 @@ config IBM405_ERR77 | |||
126 | config IBM405_ERR51 | 111 | config IBM405_ERR51 |
127 | bool | 112 | bool |
128 | 113 | ||
129 | menu "AMCC 44x options" | ||
130 | depends on 44x | ||
131 | |||
132 | #config BAMBOO | ||
133 | # bool "Bamboo" | ||
134 | # depends on 44x | ||
135 | # default n | ||
136 | # select 440EP | ||
137 | # help | ||
138 | # This option enables support for the IBM PPC440EP evaluation board. | ||
139 | |||
140 | config EBONY | ||
141 | bool "Ebony" | ||
142 | depends on 44x | ||
143 | default y | ||
144 | select 440GP | ||
145 | help | ||
146 | This option enables support for the IBM PPC440GP evaluation board. | ||
147 | |||
148 | #config LUAN | ||
149 | # bool "Luan" | ||
150 | # depends on 44x | ||
151 | # default n | ||
152 | # select 440SP | ||
153 | # help | ||
154 | # This option enables support for the IBM PPC440SP evaluation board. | ||
155 | |||
156 | #config OCOTEA | ||
157 | # bool "Ocotea" | ||
158 | # depends on 44x | ||
159 | # default n | ||
160 | # select 440GX | ||
161 | # help | ||
162 | # This option enables support for the IBM PPC440GX evaluation board. | ||
163 | |||
164 | endmenu | ||
165 | |||
166 | # 44x specific CPU modules, selected based on the board above. | ||
167 | config 440EP | ||
168 | bool | ||
169 | select PPC_FPU | ||
170 | select IBM440EP_ERR42 | ||
171 | |||
172 | config 440GP | ||
173 | bool | ||
174 | select IBM_NEW_EMAC_ZMII | ||
175 | |||
176 | config 440GX | ||
177 | bool | ||
178 | |||
179 | config 440SP | ||
180 | bool | ||
181 | |||
182 | config 440A | ||
183 | bool | ||
184 | depends on 440GX | ||
185 | default y | ||
186 | |||
187 | # 44x errata/workaround config symbols, selected by the CPU models above | ||
188 | config IBM440EP_ERR42 | ||
189 | bool | ||
190 | |||
191 | #config XILINX_OCP | 114 | #config XILINX_OCP |
192 | # bool | 115 | # bool |
193 | # depends on XILINX_ML300 | 116 | # depends on XILINX_ML300 |
diff --git a/arch/powerpc/platforms/4xx/Makefile b/arch/powerpc/platforms/40x/Makefile index 79ff6b1e887c..79ff6b1e887c 100644 --- a/arch/powerpc/platforms/4xx/Makefile +++ b/arch/powerpc/platforms/40x/Makefile | |||
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 1b3e008fd148..c7cc12a2f269 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig | |||
@@ -1,10 +1,10 @@ | |||
1 | #config BAMBOO | 1 | config BAMBOO |
2 | # bool "Bamboo" | 2 | bool "Bamboo" |
3 | # depends on 44x | 3 | depends on 44x |
4 | # default n | 4 | default n |
5 | # select 440EP | 5 | select 440EP |
6 | # help | 6 | help |
7 | # This option enables support for the IBM PPC440EP evaluation board. | 7 | This option enables support for the IBM PPC440EP evaluation board. |
8 | 8 | ||
9 | config EBONY | 9 | config EBONY |
10 | bool "Ebony" | 10 | bool "Ebony" |
@@ -35,6 +35,7 @@ config 440EP | |||
35 | bool | 35 | bool |
36 | select PPC_FPU | 36 | select PPC_FPU |
37 | select IBM440EP_ERR42 | 37 | select IBM440EP_ERR42 |
38 | # select IBM_NEW_EMAC_ZMII | ||
38 | 39 | ||
39 | config 440GP | 40 | config 440GP |
40 | bool | 41 | bool |
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile index 41d0a18a0e44..47ccc3659e34 100644 --- a/arch/powerpc/platforms/44x/Makefile +++ b/arch/powerpc/platforms/44x/Makefile | |||
@@ -1,2 +1,3 @@ | |||
1 | obj-$(CONFIG_44x) := misc_44x.o | 1 | obj-$(CONFIG_44x) := misc_44x.o |
2 | obj-$(CONFIG_EBONY) += ebony.o | 2 | obj-$(CONFIG_EBONY) += ebony.o |
3 | obj-$(CONFIG_BAMBOO) += bamboo.o | ||
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c new file mode 100644 index 000000000000..5522f1f9642e --- /dev/null +++ b/arch/powerpc/platforms/44x/bamboo.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * Bamboo board specific routines | ||
3 | * | ||
4 | * Wade Farnsworth <wfarnsworth@mvista.com> | ||
5 | * Copyright 2004 MontaVista Software Inc. | ||
6 | * | ||
7 | * Rewritten and ported to the merged powerpc tree: | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <asm/machdep.h> | ||
18 | #include <asm/prom.h> | ||
19 | #include <asm/udbg.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/uic.h> | ||
22 | #include <asm/of_platform.h> | ||
23 | #include "44x.h" | ||
24 | |||
25 | static struct of_device_id bamboo_of_bus[] = { | ||
26 | { .compatible = "ibm,plb", }, | ||
27 | { .compatible = "ibm,opb", }, | ||
28 | { .compatible = "ibm,ebc", }, | ||
29 | {}, | ||
30 | }; | ||
31 | |||
32 | static int __init bamboo_device_probe(void) | ||
33 | { | ||
34 | if (!machine_is(bamboo)) | ||
35 | return 0; | ||
36 | |||
37 | of_platform_bus_probe(NULL, bamboo_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | device_initcall(bamboo_device_probe); | ||
42 | |||
43 | static int __init bamboo_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "amcc,bamboo")) | ||
48 | return 0; | ||
49 | |||
50 | return 1; | ||
51 | } | ||
52 | |||
53 | static void __init bamboo_setup_arch(void) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | define_machine(bamboo) { | ||
58 | .name = "Bamboo", | ||
59 | .probe = bamboo_probe, | ||
60 | .setup_arch = bamboo_setup_arch, | ||
61 | .progress = udbg_progress, | ||
62 | .init_IRQ = uic_init_tree, | ||
63 | .get_irq = uic_get_irq, | ||
64 | .restart = ppc44x_reset_system, | ||
65 | .calibrate_decr = generic_calibrate_decr, | ||
66 | }; | ||
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 4be6e7a17b66..4263158b3274 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
@@ -78,8 +78,8 @@ static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, | |||
78 | } | 78 | } |
79 | 79 | ||
80 | static struct pci_ops rtas_pci_ops = { | 80 | static struct pci_ops rtas_pci_ops = { |
81 | rtas_read_config, | 81 | .read = rtas_read_config, |
82 | rtas_write_config | 82 | .write = rtas_write_config, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | 85 | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 5c46e898fd45..ce3f6951828e 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 36 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 37 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | ||
39 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
40 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
41 | #include <asm/udbg.h> | 40 | #include <asm/udbg.h> |
@@ -109,22 +108,13 @@ static void lite5200_resume_finish(void __iomem *mbar) | |||
109 | 108 | ||
110 | static void __init lite5200_setup_arch(void) | 109 | static void __init lite5200_setup_arch(void) |
111 | { | 110 | { |
111 | #ifdef CONFIG_PCI | ||
112 | struct device_node *np; | 112 | struct device_node *np; |
113 | #endif | ||
113 | 114 | ||
114 | if (ppc_md.progress) | 115 | if (ppc_md.progress) |
115 | ppc_md.progress("lite5200_setup_arch()", 0); | 116 | ppc_md.progress("lite5200_setup_arch()", 0); |
116 | 117 | ||
117 | np = of_find_node_by_type(NULL, "cpu"); | ||
118 | if (np) { | ||
119 | const unsigned int *fp = | ||
120 | of_get_property(np, "clock-frequency", NULL); | ||
121 | if (fp != 0) | ||
122 | loops_per_jiffy = *fp / HZ; | ||
123 | else | ||
124 | loops_per_jiffy = 50000000 / HZ; | ||
125 | of_node_put(np); | ||
126 | } | ||
127 | |||
128 | /* CPU & Port mux setup */ | 118 | /* CPU & Port mux setup */ |
129 | mpc52xx_setup_cpu(); /* Generic */ | 119 | mpc52xx_setup_cpu(); /* Generic */ |
130 | lite5200_setup_cpu(); /* Platorm specific */ | 120 | lite5200_setup_cpu(); /* Platorm specific */ |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index fbfff95b4437..8c464c55b5d0 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/signal.h> | 24 | #include <linux/signal.h> |
25 | #include <linux/stddef.h> | ||
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
27 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
28 | #include <linux/hardirq.h> | 27 | #include <linux/hardirq.h> |
diff --git a/arch/powerpc/platforms/82xx/m82xx_pci.h b/arch/powerpc/platforms/82xx/m82xx_pci.h index 9cd8893b5a32..65e38a7ff48f 100644 --- a/arch/powerpc/platforms/82xx/m82xx_pci.h +++ b/arch/powerpc/platforms/82xx/m82xx_pci.h | |||
@@ -8,8 +8,6 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/m8260_pci.h> | ||
12 | |||
13 | #define SIU_INT_IRQ1 ((uint)0x13 + CPM_IRQ_OFFSET) | 11 | #define SIU_INT_IRQ1 ((uint)0x13 + CPM_IRQ_OFFSET) |
14 | 12 | ||
15 | #ifndef _IO_BASE | 13 | #ifndef _IO_BASE |
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c index cc9900d2e5ee..c706871aec1a 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx.c +++ b/arch/powerpc/platforms/82xx/mpc82xx.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/time.h> | 36 | #include <asm/time.h> |
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | #include <asm/machdep.h> | 38 | #include <asm/machdep.h> |
39 | #include <asm/bootinfo.h> | ||
40 | #include <asm/pci-bridge.h> | 39 | #include <asm/pci-bridge.h> |
41 | #include <asm/mpc8260.h> | 40 | #include <asm/mpc8260.h> |
42 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c index 2d1b05b9f8ef..c0a0c56ac5b3 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c +++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <asm/time.h> | 37 | #include <asm/time.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/machdep.h> | 39 | #include <asm/machdep.h> |
40 | #include <asm/bootinfo.h> | ||
41 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
42 | #include <asm/mpc8260.h> | 41 | #include <asm/mpc8260.h> |
43 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h index 5b5cca6c8c88..6f749b76dd8f 100644 --- a/arch/powerpc/platforms/82xx/pq2ads.h +++ b/arch/powerpc/platforms/82xx/pq2ads.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #define __MACH_ADS8260_DEFS | 23 | #define __MACH_ADS8260_DEFS |
24 | 24 | ||
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <asm/ppcboot.h> | ||
27 | 26 | ||
28 | /* For our show_cpuinfo hooks. */ | 27 | /* For our show_cpuinfo hooks. */ |
29 | #define CPUINFO_VENDOR "Freescale Semiconductor" | 28 | #define CPUINFO_VENDOR "Freescale Semiconductor" |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 2c8e641a739b..61e3f1cb0a7e 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
34 | #include <asm/ipic.h> | 34 | #include <asm/ipic.h> |
35 | #include <asm/bootinfo.h> | ||
36 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
37 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
38 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 47ba5446f63c..6d06645e5ba8 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/ipic.h> | 32 | #include <asm/ipic.h> |
33 | #include <asm/bootinfo.h> | ||
34 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
35 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
36 | #include <asm/udbg.h> | 35 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 4c9ff9cadfe4..f8aba9a488bc 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/ipic.h> | 32 | #include <asm/ipic.h> |
33 | #include <asm/bootinfo.h> | ||
34 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
35 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
36 | #include <asm/udbg.h> | 35 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 84b58934aafd..69970b910c12 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/machdep.h> | 39 | #include <asm/machdep.h> |
40 | #include <asm/ipic.h> | 40 | #include <asm/ipic.h> |
41 | #include <asm/bootinfo.h> | ||
42 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
43 | #include <asm/prom.h> | 42 | #include <asm/prom.h> |
44 | #include <asm/udbg.h> | 43 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 6a171e9abf7d..040233472385 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 36 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 37 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | ||
39 | #include <asm/pci-bridge.h> | 38 | #include <asm/pci-bridge.h> |
40 | #include <asm/mpc85xx.h> | 39 | #include <asm/mpc85xx.h> |
41 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index be25ecd911ba..53830c9a88fd 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | #include <asm/machdep.h> | 40 | #include <asm/machdep.h> |
41 | #include <asm/bootinfo.h> | ||
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
43 | #include <asm/mpc85xx.h> | 42 | #include <asm/mpc85xx.h> |
44 | #include <asm/irq.h> | 43 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index f1693550c70c..b2b98dd8be6a 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c | |||
@@ -36,13 +36,11 @@ | |||
36 | 36 | ||
37 | #include <asm/mmu.h> | 37 | #include <asm/mmu.h> |
38 | #include <asm/reg.h> | 38 | #include <asm/reg.h> |
39 | #include <asm/residual.h> | ||
40 | #include <asm/io.h> | 39 | #include <asm/io.h> |
41 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
42 | #include <asm/mpc8xx.h> | 41 | #include <asm/mpc8xx.h> |
43 | #include <asm/8xx_immap.h> | 42 | #include <asm/8xx_immap.h> |
44 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
45 | #include <asm/bootinfo.h> | ||
46 | #include <asm/time.h> | 44 | #include <asm/time.h> |
47 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
48 | #include <asm/fs_pd.h> | 46 | #include <asm/fs_pd.h> |
@@ -55,7 +53,9 @@ struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops; | |||
55 | #endif | 53 | #endif |
56 | 54 | ||
57 | void m8xx_calibrate_decr(void); | 55 | void m8xx_calibrate_decr(void); |
56 | #ifdef CONFIG_8xx_WDT | ||
58 | extern void m8xx_wdt_handler_install(bd_t *bp); | 57 | extern void m8xx_wdt_handler_install(bd_t *bp); |
58 | #endif | ||
59 | extern int cpm_pic_init(void); | 59 | extern int cpm_pic_init(void); |
60 | extern int cpm_get_irq(void); | 60 | extern int cpm_get_irq(void); |
61 | 61 | ||
@@ -89,24 +89,24 @@ init_internal_rtc(void) | |||
89 | 89 | ||
90 | static int __init get_freq(char *name, unsigned long *val) | 90 | static int __init get_freq(char *name, unsigned long *val) |
91 | { | 91 | { |
92 | struct device_node *cpu; | 92 | struct device_node *cpu; |
93 | const unsigned int *fp; | 93 | const unsigned int *fp; |
94 | int found = 0; | 94 | int found = 0; |
95 | 95 | ||
96 | /* The cpu node should have timebase and clock frequency properties */ | 96 | /* The cpu node should have timebase and clock frequency properties */ |
97 | cpu = of_find_node_by_type(NULL, "cpu"); | 97 | cpu = of_find_node_by_type(NULL, "cpu"); |
98 | 98 | ||
99 | if (cpu) { | 99 | if (cpu) { |
100 | fp = of_get_property(cpu, name, NULL); | 100 | fp = of_get_property(cpu, name, NULL); |
101 | if (fp) { | 101 | if (fp) { |
102 | found = 1; | 102 | found = 1; |
103 | *val = *fp; | 103 | *val = *fp; |
104 | } | 104 | } |
105 | 105 | ||
106 | of_node_put(cpu); | 106 | of_node_put(cpu); |
107 | } | 107 | } |
108 | 108 | ||
109 | return found; | 109 | return found; |
110 | } | 110 | } |
111 | 111 | ||
112 | /* The decrementer counts at the system (internal) clock frequency divided by | 112 | /* The decrementer counts at the system (internal) clock frequency divided by |
@@ -122,7 +122,7 @@ void __init mpc8xx_calibrate_decr(void) | |||
122 | sit8xx_t *sys_tmr2; | 122 | sit8xx_t *sys_tmr2; |
123 | int irq, virq; | 123 | int irq, virq; |
124 | 124 | ||
125 | clk_r1 = (cark8xx_t *) immr_map(im_clkrstk); | 125 | clk_r1 = (cark8xx_t *) immr_map(im_clkrstk); |
126 | 126 | ||
127 | /* Unlock the SCCR. */ | 127 | /* Unlock the SCCR. */ |
128 | out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); | 128 | out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); |
@@ -130,24 +130,24 @@ void __init mpc8xx_calibrate_decr(void) | |||
130 | immr_unmap(clk_r1); | 130 | immr_unmap(clk_r1); |
131 | 131 | ||
132 | /* Force all 8xx processors to use divide by 16 processor clock. */ | 132 | /* Force all 8xx processors to use divide by 16 processor clock. */ |
133 | clk_r2 = (car8xx_t *) immr_map(im_clkrst); | 133 | clk_r2 = (car8xx_t *) immr_map(im_clkrst); |
134 | setbits32(&clk_r2->car_sccr, 0x02000000); | 134 | setbits32(&clk_r2->car_sccr, 0x02000000); |
135 | immr_unmap(clk_r2); | 135 | immr_unmap(clk_r2); |
136 | 136 | ||
137 | /* Processor frequency is MHz. | 137 | /* Processor frequency is MHz. |
138 | */ | 138 | */ |
139 | ppc_tb_freq = 50000000; | 139 | ppc_tb_freq = 50000000; |
140 | if (!get_freq("bus-frequency", &ppc_tb_freq)) { | 140 | if (!get_freq("bus-frequency", &ppc_tb_freq)) { |
141 | printk(KERN_ERR "WARNING: Estimating decrementer frequency " | 141 | printk(KERN_ERR "WARNING: Estimating decrementer frequency " |
142 | "(not found)\n"); | 142 | "(not found)\n"); |
143 | } | 143 | } |
144 | ppc_tb_freq /= 16; | 144 | ppc_tb_freq /= 16; |
145 | ppc_proc_freq = 50000000; | 145 | ppc_proc_freq = 50000000; |
146 | if (!get_freq("clock-frequency", &ppc_proc_freq)) | 146 | if (!get_freq("clock-frequency", &ppc_proc_freq)) |
147 | printk(KERN_ERR "WARNING: Estimating processor frequency" | 147 | printk(KERN_ERR "WARNING: Estimating processor frequency" |
148 | "(not found)\n"); | 148 | "(not found)\n"); |
149 | 149 | ||
150 | printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); | 150 | printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); |
151 | 151 | ||
152 | /* Perform some more timer/timebase initialization. This used | 152 | /* Perform some more timer/timebase initialization. This used |
153 | * to be done elsewhere, but other changes caused it to get | 153 | * to be done elsewhere, but other changes caused it to get |
@@ -164,7 +164,7 @@ void __init mpc8xx_calibrate_decr(void) | |||
164 | * we guarantee the registers are locked, then we unlock them | 164 | * we guarantee the registers are locked, then we unlock them |
165 | * for our use. | 165 | * for our use. |
166 | */ | 166 | */ |
167 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); | 167 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); |
168 | out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY); | 168 | out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY); |
169 | out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY); | 169 | out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY); |
170 | out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY); | 170 | out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY); |
@@ -180,8 +180,8 @@ void __init mpc8xx_calibrate_decr(void) | |||
180 | * we have to enable the timebase). The decrementer interrupt | 180 | * we have to enable the timebase). The decrementer interrupt |
181 | * is wired into the vector table, nothing to do here for that. | 181 | * is wired into the vector table, nothing to do here for that. |
182 | */ | 182 | */ |
183 | cpu = of_find_node_by_type(NULL, "cpu"); | 183 | cpu = of_find_node_by_type(NULL, "cpu"); |
184 | virq= irq_of_parse_and_map(cpu, 0); | 184 | virq= irq_of_parse_and_map(cpu, 0); |
185 | irq = irq_map[virq].hwirq; | 185 | irq = irq_map[virq].hwirq; |
186 | 186 | ||
187 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); | 187 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); |
@@ -211,10 +211,10 @@ int mpc8xx_set_rtc_time(struct rtc_time *tm) | |||
211 | sit8xx_t *sys_tmr2; | 211 | sit8xx_t *sys_tmr2; |
212 | int time; | 212 | int time; |
213 | 213 | ||
214 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); | 214 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); |
215 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); | 215 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); |
216 | time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, | 216 | time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, |
217 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 217 | tm->tm_hour, tm->tm_min, tm->tm_sec); |
218 | 218 | ||
219 | out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY); | 219 | out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY); |
220 | out_be32(&sys_tmr2->sit_rtc, time); | 220 | out_be32(&sys_tmr2->sit_rtc, time); |
@@ -233,8 +233,8 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm) | |||
233 | /* Get time from the RTC. */ | 233 | /* Get time from the RTC. */ |
234 | data = in_be32(&sys_tmr->sit_rtc); | 234 | data = in_be32(&sys_tmr->sit_rtc); |
235 | to_tm(data, tm); | 235 | to_tm(data, tm); |
236 | tm->tm_year -= 1900; | 236 | tm->tm_year -= 1900; |
237 | tm->tm_mon -= 1; | 237 | tm->tm_mon -= 1; |
238 | immr_unmap(sys_tmr); | 238 | immr_unmap(sys_tmr); |
239 | return; | 239 | return; |
240 | } | 240 | } |
@@ -298,7 +298,7 @@ void __init m8xx_pic_init(void) | |||
298 | int irq; | 298 | int irq; |
299 | 299 | ||
300 | if (mpc8xx_pic_init()) { | 300 | if (mpc8xx_pic_init()) { |
301 | printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); | 301 | printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); |
302 | return; | 302 | return; |
303 | } | 303 | } |
304 | 304 | ||
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h index 59bad2f9ae51..dd10cd20b6a7 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads.h +++ b/arch/powerpc/platforms/8xx/mpc86xads.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __ASM_MPC86XADS_H__ | 15 | #ifndef __ASM_MPC86XADS_H__ |
16 | #define __ASM_MPC86XADS_H__ | 16 | #define __ASM_MPC86XADS_H__ |
17 | 17 | ||
18 | #include <asm/ppcboot.h> | ||
19 | #include <sysdev/fsl_soc.h> | 18 | #include <sysdev/fsl_soc.h> |
20 | 19 | ||
21 | /* U-Boot maps BCSR to 0xff080000 */ | 20 | /* U-Boot maps BCSR to 0xff080000 */ |
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index cf0e7bc8c2e7..8f64f48698ab 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
33 | #include <asm/time.h> | 33 | #include <asm/time.h> |
34 | #include <asm/ppcboot.h> | ||
35 | #include <asm/mpc8xx.h> | 34 | #include <asm/mpc8xx.h> |
36 | #include <asm/8xx_immap.h> | 35 | #include <asm/8xx_immap.h> |
37 | #include <asm/commproc.h> | 36 | #include <asm/commproc.h> |
@@ -254,20 +253,6 @@ int platform_device_skip(const char *model, int id) | |||
254 | 253 | ||
255 | static void __init mpc86xads_setup_arch(void) | 254 | static void __init mpc86xads_setup_arch(void) |
256 | { | 255 | { |
257 | struct device_node *cpu; | ||
258 | |||
259 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
260 | if (cpu != 0) { | ||
261 | const unsigned int *fp; | ||
262 | |||
263 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
264 | if (fp != 0) | ||
265 | loops_per_jiffy = *fp / HZ; | ||
266 | else | ||
267 | loops_per_jiffy = 50000000 / HZ; | ||
268 | of_node_put(cpu); | ||
269 | } | ||
270 | |||
271 | cpm_reset(); | 256 | cpm_reset(); |
272 | 257 | ||
273 | mpc86xads_board_setup(); | 258 | mpc86xads_board_setup(); |
diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h index 7c31aec284c2..14db12417064 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads.h +++ b/arch/powerpc/platforms/8xx/mpc885ads.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __ASM_MPC885ADS_H__ | 15 | #ifndef __ASM_MPC885ADS_H__ |
16 | #define __ASM_MPC885ADS_H__ | 16 | #define __ASM_MPC885ADS_H__ |
17 | 17 | ||
18 | #include <asm/ppcboot.h> | ||
19 | #include <sysdev/fsl_soc.h> | 18 | #include <sysdev/fsl_soc.h> |
20 | 19 | ||
21 | /* U-Boot maps BCSR to 0xff080000 */ | 20 | /* U-Boot maps BCSR to 0xff080000 */ |
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index 5a808d611ae3..d3da38586b04 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
33 | #include <asm/system.h> | 33 | #include <asm/system.h> |
34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
35 | #include <asm/ppcboot.h> | ||
36 | #include <asm/mpc8xx.h> | 35 | #include <asm/mpc8xx.h> |
37 | #include <asm/8xx_immap.h> | 36 | #include <asm/8xx_immap.h> |
38 | #include <asm/commproc.h> | 37 | #include <asm/commproc.h> |
@@ -406,20 +405,6 @@ int platform_device_skip(const char *model, int id) | |||
406 | 405 | ||
407 | static void __init mpc885ads_setup_arch(void) | 406 | static void __init mpc885ads_setup_arch(void) |
408 | { | 407 | { |
409 | struct device_node *cpu; | ||
410 | |||
411 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
412 | if (cpu != 0) { | ||
413 | const unsigned int *fp; | ||
414 | |||
415 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
416 | if (fp != 0) | ||
417 | loops_per_jiffy = *fp / HZ; | ||
418 | else | ||
419 | loops_per_jiffy = 50000000 / HZ; | ||
420 | of_node_put(cpu); | ||
421 | } | ||
422 | |||
423 | cpm_reset(); | 408 | cpm_reset(); |
424 | 409 | ||
425 | mpc885ads_board_setup(); | 410 | mpc885ads_board_setup(); |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index cfc249741592..041df77ec117 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -19,6 +19,7 @@ config EMBEDDED6xx | |||
19 | config PPC_82xx | 19 | config PPC_82xx |
20 | bool "Freescale 82xx" | 20 | bool "Freescale 82xx" |
21 | depends on 6xx | 21 | depends on 6xx |
22 | select WANT_DEVICE_TREE | ||
22 | 23 | ||
23 | config PPC_83xx | 24 | config PPC_83xx |
24 | bool "Freescale 83xx" | 25 | bool "Freescale 83xx" |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index e4b2aee53a73..86eb4cf31f0b 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -36,10 +36,12 @@ config PPC_8xx | |||
36 | bool "Freescale 8xx" | 36 | bool "Freescale 8xx" |
37 | select FSL_SOC | 37 | select FSL_SOC |
38 | select 8xx | 38 | select 8xx |
39 | select WANT_DEVICE_TREE | ||
39 | 40 | ||
40 | config 40x | 41 | config 40x |
41 | bool "AMCC 40x" | 42 | bool "AMCC 40x" |
42 | select PPC_DCR_NATIVE | 43 | select PPC_DCR_NATIVE |
44 | select WANT_DEVICE_TREE | ||
43 | 45 | ||
44 | config 44x | 46 | config 44x |
45 | bool "AMCC 44x" | 47 | bool "AMCC 44x" |
diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c index e9ac19c4bba4..11336b40feca 100644 --- a/arch/powerpc/platforms/celleb/pci.c +++ b/arch/powerpc/platforms/celleb/pci.c | |||
@@ -242,8 +242,8 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus, | |||
242 | } | 242 | } |
243 | 243 | ||
244 | static struct pci_ops celleb_fake_pci_ops = { | 244 | static struct pci_ops celleb_fake_pci_ops = { |
245 | celleb_fake_pci_read_config, | 245 | .read = celleb_fake_pci_read_config, |
246 | celleb_fake_pci_write_config | 246 | .write = celleb_fake_pci_write_config, |
247 | }; | 247 | }; |
248 | 248 | ||
249 | static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose, | 249 | static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose, |
@@ -288,8 +288,8 @@ static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose, | |||
288 | celleb_config_write_fake(config, PCI_COMMAND, 2, val); | 288 | celleb_config_write_fake(config, PCI_COMMAND, 2, val); |
289 | } | 289 | } |
290 | 290 | ||
291 | static int __devinit celleb_setup_fake_pci_device(struct device_node *node, | 291 | static int __init celleb_setup_fake_pci_device(struct device_node *node, |
292 | struct pci_controller *hose) | 292 | struct pci_controller *hose) |
293 | { | 293 | { |
294 | unsigned int rlen; | 294 | unsigned int rlen; |
295 | int num_base_addr = 0; | 295 | int num_base_addr = 0; |
@@ -418,8 +418,8 @@ error: | |||
418 | return 1; | 418 | return 1; |
419 | } | 419 | } |
420 | 420 | ||
421 | static int __devinit phb_set_bus_ranges(struct device_node *dev, | 421 | static int __init phb_set_bus_ranges(struct device_node *dev, |
422 | struct pci_controller *phb) | 422 | struct pci_controller *phb) |
423 | { | 423 | { |
424 | const int *bus_range; | 424 | const int *bus_range; |
425 | unsigned int len; | 425 | unsigned int len; |
@@ -434,7 +434,7 @@ static int __devinit phb_set_bus_ranges(struct device_node *dev, | |||
434 | return 0; | 434 | return 0; |
435 | } | 435 | } |
436 | 436 | ||
437 | static void __devinit celleb_alloc_private_mem(struct pci_controller *hose) | 437 | static void __init celleb_alloc_private_mem(struct pci_controller *hose) |
438 | { | 438 | { |
439 | if (mem_init_done) | 439 | if (mem_init_done) |
440 | hose->private_data = | 440 | hose->private_data = |
@@ -444,7 +444,7 @@ static void __devinit celleb_alloc_private_mem(struct pci_controller *hose) | |||
444 | alloc_bootmem(sizeof(struct celleb_pci_private)); | 444 | alloc_bootmem(sizeof(struct celleb_pci_private)); |
445 | } | 445 | } |
446 | 446 | ||
447 | int __devinit celleb_setup_phb(struct pci_controller *phb) | 447 | int __init celleb_setup_phb(struct pci_controller *phb) |
448 | { | 448 | { |
449 | const char *name; | 449 | const char *name; |
450 | struct device_node *dev = phb->arch_data; | 450 | struct device_node *dev = phb->arch_data; |
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c index c4b011094bd6..506fc8447554 100644 --- a/arch/powerpc/platforms/celleb/scc_epci.c +++ b/arch/powerpc/platforms/celleb/scc_epci.c | |||
@@ -278,12 +278,12 @@ static int celleb_epci_write_config(struct pci_bus *bus, | |||
278 | } | 278 | } |
279 | 279 | ||
280 | struct pci_ops celleb_epci_ops = { | 280 | struct pci_ops celleb_epci_ops = { |
281 | celleb_epci_read_config, | 281 | .read = celleb_epci_read_config, |
282 | celleb_epci_write_config, | 282 | .write = celleb_epci_write_config, |
283 | }; | 283 | }; |
284 | 284 | ||
285 | /* to be moved in FW */ | 285 | /* to be moved in FW */ |
286 | static int __devinit celleb_epci_init(struct pci_controller *hose) | 286 | static int __init celleb_epci_init(struct pci_controller *hose) |
287 | { | 287 | { |
288 | u32 val; | 288 | u32 val; |
289 | volatile void __iomem *reg, *epci_base; | 289 | volatile void __iomem *reg, *epci_base; |
@@ -403,7 +403,7 @@ static int __devinit celleb_epci_init(struct pci_controller *hose) | |||
403 | return 0; | 403 | return 0; |
404 | } | 404 | } |
405 | 405 | ||
406 | int __devinit celleb_setup_epci(struct device_node *node, | 406 | int __init celleb_setup_epci(struct device_node *node, |
407 | struct pci_controller *hose) | 407 | struct pci_controller *hose) |
408 | { | 408 | { |
409 | struct resource r; | 409 | struct resource r; |
diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/celleb/scc_sio.c index bcd25f54d986..bb98735ac46f 100644 --- a/arch/powerpc/platforms/celleb/scc_sio.c +++ b/arch/powerpc/platforms/celleb/scc_sio.c | |||
@@ -28,18 +28,18 @@ | |||
28 | 28 | ||
29 | /* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024 | 29 | /* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024 |
30 | mmio=0xfff000-0x1000,0xff2000-0x1000 */ | 30 | mmio=0xfff000-0x1000,0xff2000-0x1000 */ |
31 | static int txx9_serial_bitmap = 0; | 31 | static int txx9_serial_bitmap __initdata = 0; |
32 | 32 | ||
33 | static struct { | 33 | static struct { |
34 | uint32_t offset; | 34 | uint32_t offset; |
35 | uint32_t index; | 35 | uint32_t index; |
36 | } txx9_scc_tab[3] = { | 36 | } txx9_scc_tab[3] __initdata = { |
37 | { 0x300, 0 }, /* 0xFFF300 */ | 37 | { 0x300, 0 }, /* 0xFFF300 */ |
38 | { 0x400, 0 }, /* 0xFFF400 */ | 38 | { 0x400, 0 }, /* 0xFFF400 */ |
39 | { 0x800, 1 } /* 0xFF2800 */ | 39 | { 0x800, 1 } /* 0xFF2800 */ |
40 | }; | 40 | }; |
41 | 41 | ||
42 | static int txx9_serial_init(void) | 42 | static int __init txx9_serial_init(void) |
43 | { | 43 | { |
44 | extern int early_serial_txx9_setup(struct uart_port *port); | 44 | extern int early_serial_txx9_setup(struct uart_port *port); |
45 | struct device_node *node; | 45 | struct device_node *node; |
@@ -79,7 +79,7 @@ static int txx9_serial_init(void) | |||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | static int txx9_serial_config(char *ptr) | 82 | static int __init txx9_serial_config(char *ptr) |
83 | { | 83 | { |
84 | int i; | 84 | int i; |
85 | 85 | ||
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c index 5e9f7f163571..1fca3f23533b 100644 --- a/arch/powerpc/platforms/celleb/setup.c +++ b/arch/powerpc/platforms/celleb/setup.c | |||
@@ -73,7 +73,7 @@ static void celleb_show_cpuinfo(struct seq_file *m) | |||
73 | of_node_put(root); | 73 | of_node_put(root); |
74 | } | 74 | } |
75 | 75 | ||
76 | static int celleb_machine_type_hack(char *ptr) | 76 | static int __init celleb_machine_type_hack(char *ptr) |
77 | { | 77 | { |
78 | strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); | 78 | strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); |
79 | celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; | 79 | celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; |
@@ -135,7 +135,7 @@ static void celleb_kexec_cpu_down(int crash, int secondary) | |||
135 | } | 135 | } |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | static struct of_device_id celleb_bus_ids[] = { | 138 | static struct of_device_id celleb_bus_ids[] __initdata = { |
139 | { .type = "scc", }, | 139 | { .type = "scc", }, |
140 | { .type = "ioif", }, /* old style */ | 140 | { .type = "ioif", }, /* old style */ |
141 | {}, | 141 | {}, |
diff --git a/arch/powerpc/platforms/chrp/gg2.h b/arch/powerpc/platforms/chrp/gg2.h new file mode 100644 index 000000000000..341ae55b99fb --- /dev/null +++ b/arch/powerpc/platforms/chrp/gg2.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/gg2.h -- VLSI VAS96011/12 `Golden Gate 2' register definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | ||
5 | * | ||
6 | * This file is based on the following documentation: | ||
7 | * | ||
8 | * The VAS96011/12 Chipset, Data Book, Edition 1.0 | ||
9 | * VLSI Technology, Inc. | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file COPYING in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _ASMPPC_GG2_H | ||
17 | #define _ASMPPC_GG2_H | ||
18 | |||
19 | /* | ||
20 | * Memory Map (CHRP mode) | ||
21 | */ | ||
22 | |||
23 | #define GG2_PCI_MEM_BASE 0xc0000000 /* Peripheral memory space */ | ||
24 | #define GG2_ISA_MEM_BASE 0xf7000000 /* Peripheral memory alias */ | ||
25 | #define GG2_ISA_IO_BASE 0xf8000000 /* Peripheral I/O space */ | ||
26 | #define GG2_PCI_CONFIG_BASE 0xfec00000 /* PCI configuration space */ | ||
27 | #define GG2_INT_ACK_SPECIAL 0xfec80000 /* Interrupt acknowledge and */ | ||
28 | /* special PCI cycles */ | ||
29 | #define GG2_ROM_BASE0 0xff000000 /* ROM bank 0 */ | ||
30 | #define GG2_ROM_BASE1 0xff800000 /* ROM bank 1 */ | ||
31 | |||
32 | |||
33 | /* | ||
34 | * GG2 specific PCI Registers | ||
35 | */ | ||
36 | |||
37 | extern void __iomem *gg2_pci_config_base; /* kernel virtual address */ | ||
38 | |||
39 | #define GG2_PCI_BUSNO 0x40 /* Bus number */ | ||
40 | #define GG2_PCI_SUBBUSNO 0x41 /* Subordinate bus number */ | ||
41 | #define GG2_PCI_DISCCTR 0x42 /* Disconnect counter */ | ||
42 | #define GG2_PCI_PPC_CTRL 0x50 /* PowerPC interface control register */ | ||
43 | #define GG2_PCI_ADDR_MAP 0x5c /* Address map */ | ||
44 | #define GG2_PCI_PCI_CTRL 0x60 /* PCI interface control register */ | ||
45 | #define GG2_PCI_ROM_CTRL 0x70 /* ROM interface control register */ | ||
46 | #define GG2_PCI_ROM_TIME 0x74 /* ROM timing */ | ||
47 | #define GG2_PCI_CC_CTRL 0x80 /* Cache controller control register */ | ||
48 | #define GG2_PCI_DRAM_BANK0 0x90 /* Control register for DRAM bank #0 */ | ||
49 | #define GG2_PCI_DRAM_BANK1 0x94 /* Control register for DRAM bank #1 */ | ||
50 | #define GG2_PCI_DRAM_BANK2 0x98 /* Control register for DRAM bank #2 */ | ||
51 | #define GG2_PCI_DRAM_BANK3 0x9c /* Control register for DRAM bank #3 */ | ||
52 | #define GG2_PCI_DRAM_BANK4 0xa0 /* Control register for DRAM bank #4 */ | ||
53 | #define GG2_PCI_DRAM_BANK5 0xa4 /* Control register for DRAM bank #5 */ | ||
54 | #define GG2_PCI_DRAM_TIME0 0xb0 /* Timing parameters set #0 */ | ||
55 | #define GG2_PCI_DRAM_TIME1 0xb4 /* Timing parameters set #1 */ | ||
56 | #define GG2_PCI_DRAM_CTRL 0xc0 /* DRAM control */ | ||
57 | #define GG2_PCI_ERR_CTRL 0xd0 /* Error control register */ | ||
58 | #define GG2_PCI_ERR_STATUS 0xd4 /* Error status register */ | ||
59 | /* Cleared when read */ | ||
60 | |||
61 | #endif /* _ASMPPC_GG2_H */ | ||
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 28d1647b204e..e43465d34d29 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
14 | #include <asm/hydra.h> | 14 | #include <asm/hydra.h> |
15 | #include <asm/prom.h> | 15 | #include <asm/prom.h> |
16 | #include <asm/gg2.h> | ||
17 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
18 | #include <asm/sections.h> | 17 | #include <asm/sections.h> |
19 | #include <asm/pci-bridge.h> | 18 | #include <asm/pci-bridge.h> |
@@ -21,6 +20,7 @@ | |||
21 | #include <asm/rtas.h> | 20 | #include <asm/rtas.h> |
22 | 21 | ||
23 | #include "chrp.h" | 22 | #include "chrp.h" |
23 | #include "gg2.h" | ||
24 | 24 | ||
25 | /* LongTrail */ | 25 | /* LongTrail */ |
26 | void __iomem *gg2_pci_config_base; | 26 | void __iomem *gg2_pci_config_base; |
@@ -86,8 +86,8 @@ int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off, | |||
86 | 86 | ||
87 | static struct pci_ops gg2_pci_ops = | 87 | static struct pci_ops gg2_pci_ops = |
88 | { | 88 | { |
89 | gg2_read_config, | 89 | .read = gg2_read_config, |
90 | gg2_write_config | 90 | .write = gg2_write_config, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* | 93 | /* |
@@ -124,8 +124,8 @@ int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
124 | 124 | ||
125 | static struct pci_ops rtas_pci_ops = | 125 | static struct pci_ops rtas_pci_ops = |
126 | { | 126 | { |
127 | rtas_read_config, | 127 | .read = rtas_read_config, |
128 | rtas_write_config | 128 | .write = rtas_write_config, |
129 | }; | 129 | }; |
130 | 130 | ||
131 | volatile struct Hydra __iomem *Hydra = NULL; | 131 | volatile struct Hydra __iomem *Hydra = NULL; |
@@ -338,3 +338,32 @@ void chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105) | |||
338 | } | 338 | } |
339 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, | 339 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, |
340 | chrp_pci_fixup_winbond_ata); | 340 | chrp_pci_fixup_winbond_ata); |
341 | |||
342 | /* Pegasos2 firmware version 20040810 configures the built-in IDE controller | ||
343 | * in legacy mode, but sets the PCI registers to PCI native mode. | ||
344 | * The chip can only operate in legacy mode, so force the PCI class into legacy | ||
345 | * mode as well. The same fixup must be done to the class-code property in | ||
346 | * the IDE node /pci@80000000/ide@C,1 | ||
347 | */ | ||
348 | static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) | ||
349 | { | ||
350 | u8 progif; | ||
351 | struct pci_dev *viaisa; | ||
352 | |||
353 | if (!machine_is(chrp) || _chrp_type != _CHRP_Pegasos) | ||
354 | return; | ||
355 | if (viaide->irq != 14) | ||
356 | return; | ||
357 | |||
358 | viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); | ||
359 | if (!viaisa) | ||
360 | return; | ||
361 | printk("Fixing VIA IDE, force legacy mode on '%s'\n", viaide->dev.bus_id); | ||
362 | |||
363 | pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); | ||
364 | pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); | ||
365 | viaide->class &= ~0x5; | ||
366 | |||
367 | pci_dev_put(viaisa); | ||
368 | } | ||
369 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata); | ||
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 373de4c063db..96498ad7b943 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -32,13 +32,11 @@ | |||
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
34 | #include <linux/initrd.h> | 34 | #include <linux/initrd.h> |
35 | #include <linux/module.h> | ||
36 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
37 | 36 | ||
38 | #include <asm/io.h> | 37 | #include <asm/io.h> |
39 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
40 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
41 | #include <asm/gg2.h> | ||
42 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
43 | #include <asm/dma.h> | 41 | #include <asm/dma.h> |
44 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
@@ -52,6 +50,7 @@ | |||
52 | #include <asm/xmon.h> | 50 | #include <asm/xmon.h> |
53 | 51 | ||
54 | #include "chrp.h" | 52 | #include "chrp.h" |
53 | #include "gg2.h" | ||
55 | 54 | ||
56 | void rtas_indicator_progress(char *, unsigned short); | 55 | void rtas_indicator_progress(char *, unsigned short); |
57 | 56 | ||
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index 3ea0eb78568e..10a4a4d063b6 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c | |||
@@ -26,10 +26,8 @@ | |||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/prom.h> | 27 | #include <asm/prom.h> |
28 | #include <asm/smp.h> | 28 | #include <asm/smp.h> |
29 | #include <asm/residual.h> | ||
30 | #include <asm/time.h> | 29 | #include <asm/time.h> |
31 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
32 | #include <asm/smp.h> | ||
33 | #include <asm/mpic.h> | 31 | #include <asm/mpic.h> |
34 | #include <asm/rtas.h> | 32 | #include <asm/rtas.h> |
35 | 33 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c index 6292e36dc577..b6de2b5223dd 100644 --- a/arch/powerpc/platforms/embedded6xx/holly.c +++ b/arch/powerpc/platforms/embedded6xx/holly.c | |||
@@ -113,23 +113,11 @@ static void holly_remap_bridge(void) | |||
113 | 113 | ||
114 | static void __init holly_setup_arch(void) | 114 | static void __init holly_setup_arch(void) |
115 | { | 115 | { |
116 | struct device_node *cpu; | ||
117 | struct device_node *np; | 116 | struct device_node *np; |
118 | 117 | ||
119 | if (ppc_md.progress) | 118 | if (ppc_md.progress) |
120 | ppc_md.progress("holly_setup_arch():set_bridge", 0); | 119 | ppc_md.progress("holly_setup_arch():set_bridge", 0); |
121 | 120 | ||
122 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
123 | if (cpu) { | ||
124 | const unsigned int *fp; | ||
125 | |||
126 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
127 | if (fp) | ||
128 | loops_per_jiffy = *fp / HZ; | ||
129 | else | ||
130 | loops_per_jiffy = 50000000 / HZ; | ||
131 | of_node_put(cpu); | ||
132 | } | ||
133 | tsi108_csr_vir_base = get_vir_csrbase(); | 121 | tsi108_csr_vir_base = get_vir_csrbase(); |
134 | 122 | ||
135 | /* setup PCI host bridge */ | 123 | /* setup PCI host bridge */ |
@@ -147,7 +135,7 @@ static void __init holly_setup_arch(void) | |||
147 | } | 135 | } |
148 | 136 | ||
149 | /* | 137 | /* |
150 | * Interrupt setup and service. Interrrupts on the holly come | 138 | * Interrupt setup and service. Interrupts on the holly come |
151 | * from the four external INT pins, PCI interrupts are routed via | 139 | * from the four external INT pins, PCI interrupts are routed via |
152 | * PCI interrupt control registers, it generates internal IRQ23 | 140 | * PCI interrupt control registers, it generates internal IRQ23 |
153 | * | 141 | * |
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c index bd5ca58345a1..61ca02c2d644 100644 --- a/arch/powerpc/platforms/embedded6xx/linkstation.c +++ b/arch/powerpc/platforms/embedded6xx/linkstation.c | |||
@@ -18,9 +18,10 @@ | |||
18 | #include <asm/time.h> | 18 | #include <asm/time.h> |
19 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
20 | #include <asm/mpic.h> | 20 | #include <asm/mpic.h> |
21 | #include <asm/mpc10x.h> | ||
22 | #include <asm/pci-bridge.h> | 21 | #include <asm/pci-bridge.h> |
23 | 22 | ||
23 | #include "mpc10x.h" | ||
24 | |||
24 | static struct mtd_partition linkstation_physmap_partitions[] = { | 25 | static struct mtd_partition linkstation_physmap_partitions[] = { |
25 | { | 26 | { |
26 | .name = "mtd_firmimg", | 27 | .name = "mtd_firmimg", |
@@ -99,7 +100,7 @@ static void __init linkstation_setup_arch(void) | |||
99 | } | 100 | } |
100 | 101 | ||
101 | /* | 102 | /* |
102 | * Interrupt setup and service. Interrrupts on the linkstation come | 103 | * Interrupt setup and service. Interrupts on the linkstation come |
103 | * from the four PCI slots plus onboard 8241 devices: I2C, DUART. | 104 | * from the four PCI slots plus onboard 8241 devices: I2C, DUART. |
104 | */ | 105 | */ |
105 | static void __init linkstation_init_IRQ(void) | 106 | static void __init linkstation_init_IRQ(void) |
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c index d0bee9f19e4e..0d9f1500a671 100644 --- a/arch/powerpc/platforms/embedded6xx/ls_uart.c +++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c | |||
@@ -4,11 +4,11 @@ | |||
4 | #include <linux/serial_reg.h> | 4 | #include <linux/serial_reg.h> |
5 | #include <linux/serial_8250.h> | 5 | #include <linux/serial_8250.h> |
6 | #include <asm/io.h> | 6 | #include <asm/io.h> |
7 | #include <asm/mpc10x.h> | ||
8 | #include <asm/ppc_sys.h> | ||
9 | #include <asm/prom.h> | 7 | #include <asm/prom.h> |
10 | #include <asm/termbits.h> | 8 | #include <asm/termbits.h> |
11 | 9 | ||
10 | #include "mpc10x.h" | ||
11 | |||
12 | static void __iomem *avr_addr; | 12 | static void __iomem *avr_addr; |
13 | static unsigned long avr_clock; | 13 | static unsigned long avr_clock; |
14 | 14 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/mpc10x.h b/arch/powerpc/platforms/embedded6xx/mpc10x.h new file mode 100644 index 000000000000..b30a6a3b5bd2 --- /dev/null +++ b/arch/powerpc/platforms/embedded6xx/mpc10x.h | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem | ||
3 | * ctlr/EPIC/etc. | ||
4 | * | ||
5 | * Author: Mark A. Greer | ||
6 | * mgreer@mvista.com | ||
7 | * | ||
8 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #ifndef __PPC_KERNEL_MPC10X_H | ||
14 | #define __PPC_KERNEL_MPC10X_H | ||
15 | |||
16 | #include <linux/pci_ids.h> | ||
17 | #include <asm/pci-bridge.h> | ||
18 | |||
19 | /* | ||
20 | * The values here don't completely map everything but should work in most | ||
21 | * cases. | ||
22 | * | ||
23 | * MAP A (PReP Map) | ||
24 | * Processor: 0x80000000 - 0x807fffff -> PCI I/O: 0x00000000 - 0x007fffff | ||
25 | * Processor: 0xc0000000 - 0xdfffffff -> PCI MEM: 0x00000000 - 0x1fffffff | ||
26 | * PCI MEM: 0x80000000 -> Processor System Memory: 0x00000000 | ||
27 | * EUMB mapped to: ioremap_base - 0x00100000 (ioremap_base - 1 MB) | ||
28 | * | ||
29 | * MAP B (CHRP Map) | ||
30 | * Processor: 0xfe000000 - 0xfebfffff -> PCI I/O: 0x00000000 - 0x00bfffff | ||
31 | * Processor: 0x80000000 - 0xbfffffff -> PCI MEM: 0x80000000 - 0xbfffffff | ||
32 | * PCI MEM: 0x00000000 -> Processor System Memory: 0x00000000 | ||
33 | * EUMB mapped to: ioremap_base - 0x00100000 (ioremap_base - 1 MB) | ||
34 | */ | ||
35 | |||
36 | /* | ||
37 | * Define the vendor/device IDs for the various bridges--should be added to | ||
38 | * <linux/pci_ids.h> | ||
39 | */ | ||
40 | #define MPC10X_BRIDGE_106 ((PCI_DEVICE_ID_MOTOROLA_MPC106 << 16) | \ | ||
41 | PCI_VENDOR_ID_MOTOROLA) | ||
42 | #define MPC10X_BRIDGE_8240 ((0x0003 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
43 | #define MPC10X_BRIDGE_107 ((0x0004 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
44 | #define MPC10X_BRIDGE_8245 ((0x0006 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
45 | |||
46 | /* Define the type of map to use */ | ||
47 | #define MPC10X_MEM_MAP_A 1 | ||
48 | #define MPC10X_MEM_MAP_B 2 | ||
49 | |||
50 | /* Map A (PReP Map) Defines */ | ||
51 | #define MPC10X_MAPA_CNFG_ADDR 0x80000cf8 | ||
52 | #define MPC10X_MAPA_CNFG_DATA 0x80000cfc | ||
53 | |||
54 | #define MPC10X_MAPA_ISA_IO_BASE 0x80000000 | ||
55 | #define MPC10X_MAPA_ISA_MEM_BASE 0xc0000000 | ||
56 | #define MPC10X_MAPA_DRAM_OFFSET 0x80000000 | ||
57 | |||
58 | #define MPC10X_MAPA_PCI_INTACK_ADDR 0xbffffff0 | ||
59 | #define MPC10X_MAPA_PCI_IO_START 0x00000000 | ||
60 | #define MPC10X_MAPA_PCI_IO_END (0x00800000 - 1) | ||
61 | #define MPC10X_MAPA_PCI_MEM_START 0x00000000 | ||
62 | #define MPC10X_MAPA_PCI_MEM_END (0x20000000 - 1) | ||
63 | |||
64 | #define MPC10X_MAPA_PCI_MEM_OFFSET (MPC10X_MAPA_ISA_MEM_BASE - \ | ||
65 | MPC10X_MAPA_PCI_MEM_START) | ||
66 | |||
67 | /* Map B (CHRP Map) Defines */ | ||
68 | #define MPC10X_MAPB_CNFG_ADDR 0xfec00000 | ||
69 | #define MPC10X_MAPB_CNFG_DATA 0xfee00000 | ||
70 | |||
71 | #define MPC10X_MAPB_ISA_IO_BASE 0xfe000000 | ||
72 | #define MPC10X_MAPB_ISA_MEM_BASE 0x80000000 | ||
73 | #define MPC10X_MAPB_DRAM_OFFSET 0x00000000 | ||
74 | |||
75 | #define MPC10X_MAPB_PCI_INTACK_ADDR 0xfef00000 | ||
76 | #define MPC10X_MAPB_PCI_IO_START 0x00000000 | ||
77 | #define MPC10X_MAPB_PCI_IO_END (0x00c00000 - 1) | ||
78 | #define MPC10X_MAPB_PCI_MEM_START 0x80000000 | ||
79 | #define MPC10X_MAPB_PCI_MEM_END (0xc0000000 - 1) | ||
80 | |||
81 | #define MPC10X_MAPB_PCI_MEM_OFFSET (MPC10X_MAPB_ISA_MEM_BASE - \ | ||
82 | MPC10X_MAPB_PCI_MEM_START) | ||
83 | |||
84 | /* Set hose members to values appropriate for the mem map used */ | ||
85 | #define MPC10X_SETUP_HOSE(hose, map) { \ | ||
86 | (hose)->pci_mem_offset = MPC10X_MAP##map##_PCI_MEM_OFFSET; \ | ||
87 | (hose)->io_space.start = MPC10X_MAP##map##_PCI_IO_START; \ | ||
88 | (hose)->io_space.end = MPC10X_MAP##map##_PCI_IO_END; \ | ||
89 | (hose)->mem_space.start = MPC10X_MAP##map##_PCI_MEM_START; \ | ||
90 | (hose)->mem_space.end = MPC10X_MAP##map##_PCI_MEM_END; \ | ||
91 | (hose)->io_base_virt = (void *)MPC10X_MAP##map##_ISA_IO_BASE; \ | ||
92 | } | ||
93 | |||
94 | |||
95 | /* Miscellaneous Configuration register offsets */ | ||
96 | #define MPC10X_CFG_PIR_REG 0x09 | ||
97 | #define MPC10X_CFG_PIR_HOST_BRIDGE 0x00 | ||
98 | #define MPC10X_CFG_PIR_AGENT 0x01 | ||
99 | |||
100 | #define MPC10X_CFG_EUMBBAR 0x78 | ||
101 | |||
102 | #define MPC10X_CFG_PICR1_REG 0xa8 | ||
103 | #define MPC10X_CFG_PICR1_ADDR_MAP_MASK 0x00010000 | ||
104 | #define MPC10X_CFG_PICR1_ADDR_MAP_A 0x00010000 | ||
105 | #define MPC10X_CFG_PICR1_ADDR_MAP_B 0x00000000 | ||
106 | #define MPC10X_CFG_PICR1_SPEC_PCI_RD 0x00000004 | ||
107 | #define MPC10X_CFG_PICR1_ST_GATH_EN 0x00000040 | ||
108 | |||
109 | #define MPC10X_CFG_PICR2_REG 0xac | ||
110 | #define MPC10X_CFG_PICR2_COPYBACK_OPT 0x00000001 | ||
111 | |||
112 | #define MPC10X_CFG_MAPB_OPTIONS_REG 0xe0 | ||
113 | #define MPC10X_CFG_MAPB_OPTIONS_CFAE 0x80 /* CPU_FD_ALIAS_EN */ | ||
114 | #define MPC10X_CFG_MAPB_OPTIONS_PFAE 0x40 /* PCI_FD_ALIAS_EN */ | ||
115 | #define MPC10X_CFG_MAPB_OPTIONS_DR 0x20 /* DLL_RESET */ | ||
116 | #define MPC10X_CFG_MAPB_OPTIONS_PCICH 0x08 /* PCI_COMPATIBILITY_HOLE */ | ||
117 | #define MPC10X_CFG_MAPB_OPTIONS_PROCCH 0x04 /* PROC_COMPATIBILITY_HOLE */ | ||
118 | |||
119 | /* Define offsets for the memory controller registers in the config space */ | ||
120 | #define MPC10X_MCTLR_MEM_START_1 0x80 /* Banks 0-3 */ | ||
121 | #define MPC10X_MCTLR_MEM_START_2 0x84 /* Banks 4-7 */ | ||
122 | #define MPC10X_MCTLR_EXT_MEM_START_1 0x88 /* Banks 0-3 */ | ||
123 | #define MPC10X_MCTLR_EXT_MEM_START_2 0x8c /* Banks 4-7 */ | ||
124 | |||
125 | #define MPC10X_MCTLR_MEM_END_1 0x90 /* Banks 0-3 */ | ||
126 | #define MPC10X_MCTLR_MEM_END_2 0x94 /* Banks 4-7 */ | ||
127 | #define MPC10X_MCTLR_EXT_MEM_END_1 0x98 /* Banks 0-3 */ | ||
128 | #define MPC10X_MCTLR_EXT_MEM_END_2 0x9c /* Banks 4-7 */ | ||
129 | |||
130 | #define MPC10X_MCTLR_MEM_BANK_ENABLES 0xa0 | ||
131 | |||
132 | /* Define some offset in the EUMB */ | ||
133 | #define MPC10X_EUMB_SIZE 0x00100000 /* Total EUMB size (1MB) */ | ||
134 | |||
135 | #define MPC10X_EUMB_MU_OFFSET 0x00000000 /* Msg Unit reg offset */ | ||
136 | #define MPC10X_EUMB_MU_SIZE 0x00001000 /* Msg Unit reg size */ | ||
137 | #define MPC10X_EUMB_DMA_OFFSET 0x00001000 /* DMA Unit reg offset */ | ||
138 | #define MPC10X_EUMB_DMA_SIZE 0x00001000 /* DMA Unit reg size */ | ||
139 | #define MPC10X_EUMB_ATU_OFFSET 0x00002000 /* Addr xlate reg offset */ | ||
140 | #define MPC10X_EUMB_ATU_SIZE 0x00001000 /* Addr xlate reg size */ | ||
141 | #define MPC10X_EUMB_I2C_OFFSET 0x00003000 /* I2C Unit reg offset */ | ||
142 | #define MPC10X_EUMB_I2C_SIZE 0x00001000 /* I2C Unit reg size */ | ||
143 | #define MPC10X_EUMB_DUART_OFFSET 0x00004000 /* DUART Unit reg offset (8245) */ | ||
144 | #define MPC10X_EUMB_DUART_SIZE 0x00001000 /* DUART Unit reg size (8245) */ | ||
145 | #define MPC10X_EUMB_EPIC_OFFSET 0x00040000 /* EPIC offset in EUMB */ | ||
146 | #define MPC10X_EUMB_EPIC_SIZE 0x00030000 /* EPIC size */ | ||
147 | #define MPC10X_EUMB_PM_OFFSET 0x000fe000 /* Performance Monitor reg offset (8245) */ | ||
148 | #define MPC10X_EUMB_PM_SIZE 0x00001000 /* Performance Monitor reg size (8245) */ | ||
149 | #define MPC10X_EUMB_WP_OFFSET 0x000ff000 /* Data path diagnostic, watchpoint reg offset */ | ||
150 | #define MPC10X_EUMB_WP_SIZE 0x00001000 /* Data path diagnostic, watchpoint reg size */ | ||
151 | |||
152 | /* | ||
153 | * Define some recommended places to put the EUMB regs. | ||
154 | * For both maps, recommend putting the EUMB from 0xeff00000 to 0xefffffff. | ||
155 | */ | ||
156 | extern unsigned long ioremap_base; | ||
157 | #define MPC10X_MAPA_EUMB_BASE (ioremap_base - MPC10X_EUMB_SIZE) | ||
158 | #define MPC10X_MAPB_EUMB_BASE MPC10X_MAPA_EUMB_BASE | ||
159 | |||
160 | enum ppc_sys_devices { | ||
161 | MPC10X_IIC1, | ||
162 | MPC10X_DMA0, | ||
163 | MPC10X_DMA1, | ||
164 | MPC10X_UART0, | ||
165 | MPC10X_UART1, | ||
166 | NUM_PPC_SYS_DEVS, | ||
167 | }; | ||
168 | |||
169 | int mpc10x_bridge_init(struct pci_controller *hose, | ||
170 | uint current_map, | ||
171 | uint new_map, | ||
172 | uint phys_eumb_base); | ||
173 | unsigned long mpc10x_get_mem_size(uint mem_map); | ||
174 | int mpc10x_enable_store_gathering(struct pci_controller *hose); | ||
175 | int mpc10x_disable_store_gathering(struct pci_controller *hose); | ||
176 | |||
177 | /* For MPC107 boards that use the built-in openpic */ | ||
178 | void mpc10x_set_openpic(void); | ||
179 | |||
180 | #endif /* __PPC_KERNEL_MPC10X_H */ | ||
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index 1e3cc69487b5..96737e5608d3 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
41 | #include <asm/reg.h> | 41 | #include <asm/reg.h> |
42 | #include <mm/mmu_decl.h> | 42 | #include <mm/mmu_decl.h> |
43 | #include "mpc7448_hpc2.h" | ||
44 | #include <asm/tsi108_pci.h> | 43 | #include <asm/tsi108_pci.h> |
45 | #include <asm/tsi108_irq.h> | 44 | #include <asm/tsi108_irq.h> |
46 | #include <asm/mpic.h> | 45 | #include <asm/mpic.h> |
@@ -91,7 +90,7 @@ static void __init mpc7448_hpc2_setup_arch(void) | |||
91 | } | 90 | } |
92 | 91 | ||
93 | /* | 92 | /* |
94 | * Interrupt setup and service. Interrrupts on the mpc7448_hpc2 come | 93 | * Interrupt setup and service. Interrupts on the mpc7448_hpc2 come |
95 | * from the four external INT pins, PCI interrupts are routed via | 94 | * from the four external INT pins, PCI interrupts are routed via |
96 | * PCI interrupt control registers, it generates internal IRQ23 | 95 | * PCI interrupt control registers, it generates internal IRQ23 |
97 | * | 96 | * |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h deleted file mode 100644 index f7e0e0c7f8d8..000000000000 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * mpc7448_hpc2.h | ||
3 | * | ||
4 | * Definitions for Freescale MPC7448_HPC2 platform | ||
5 | * | ||
6 | * Author: Jacob Pan | ||
7 | * jacob.pan@freescale.com | ||
8 | * Maintainer: Roy Zang <roy.zang@freescale.com> | ||
9 | * | ||
10 | * 2006 (c) Freescale Semiconductor, Inc. This file is licensed under | ||
11 | * the terms of the GNU General Public License version 2. This program | ||
12 | * is licensed "as is" without any warranty of any kind, whether express | ||
13 | * or implied. | ||
14 | */ | ||
15 | |||
16 | #ifndef __PPC_PLATFORMS_MPC7448_HPC2_H | ||
17 | #define __PPC_PLATFORMS_MPC7448_HPC2_H | ||
18 | |||
19 | #include <asm/ppcboot.h> | ||
20 | |||
21 | #endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */ | ||
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c index 53420951dc53..54675648d6de 100644 --- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c | |||
@@ -44,7 +44,6 @@ static void __init prpmc2800_setup_arch(void) | |||
44 | struct device_node *np; | 44 | struct device_node *np; |
45 | phys_addr_t paddr; | 45 | phys_addr_t paddr; |
46 | const unsigned int *reg; | 46 | const unsigned int *reg; |
47 | const unsigned int *prop; | ||
48 | 47 | ||
49 | /* | 48 | /* |
50 | * ioremap mpp and gpp registers in case they are later | 49 | * ioremap mpp and gpp registers in case they are later |
@@ -62,12 +61,6 @@ static void __init prpmc2800_setup_arch(void) | |||
62 | of_node_put(np); | 61 | of_node_put(np); |
63 | mv64x60_gpp_reg_base = ioremap(paddr, reg[1]); | 62 | mv64x60_gpp_reg_base = ioremap(paddr, reg[1]); |
64 | 63 | ||
65 | np = of_find_node_by_type(NULL, "cpu"); | ||
66 | prop = of_get_property(np, "clock-frequency", NULL); | ||
67 | if (prop) | ||
68 | loops_per_jiffy = *prop / HZ; | ||
69 | of_node_put(np); | ||
70 | |||
71 | #ifdef CONFIG_PCI | 64 | #ifdef CONFIG_PCI |
72 | mv64x60_pci_init(); | 65 | mv64x60_pci_init(); |
73 | #endif | 66 | #endif |
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index 13ac3015d91c..60db509638f1 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
@@ -2,6 +2,7 @@ EXTRA_CFLAGS += -mno-minimal-toc | |||
2 | 2 | ||
3 | extra-y += dt.o | 3 | extra-y += dt.o |
4 | 4 | ||
5 | obj-y += exception.o | ||
5 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ | 6 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ |
6 | hvcall.o proc.o htab.o iommu.o misc.o irq.o | 7 | hvcall.o proc.o htab.o iommu.o misc.o irq.o |
7 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o | 8 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o |
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S new file mode 100644 index 000000000000..5381038f0881 --- /dev/null +++ b/arch/powerpc/platforms/iseries/exception.S | |||
@@ -0,0 +1,251 @@ | |||
1 | /* | ||
2 | * Low level routines for legacy iSeries support. | ||
3 | * | ||
4 | * Extracted from head_64.S | ||
5 | * | ||
6 | * PowerPC version | ||
7 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
8 | * | ||
9 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | ||
10 | * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu> | ||
11 | * Adapted for Power Macintosh by Paul Mackerras. | ||
12 | * Low-level exception handlers and MMU support | ||
13 | * rewritten by Paul Mackerras. | ||
14 | * Copyright (C) 1996 Paul Mackerras. | ||
15 | * | ||
16 | * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and | ||
17 | * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com | ||
18 | * | ||
19 | * This file contains the low-level support and setup for the | ||
20 | * PowerPC-64 platform, including trap and interrupt dispatch. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or | ||
23 | * modify it under the terms of the GNU General Public License | ||
24 | * as published by the Free Software Foundation; either version | ||
25 | * 2 of the License, or (at your option) any later version. | ||
26 | */ | ||
27 | |||
28 | #include <asm/reg.h> | ||
29 | #include <asm/ppc_asm.h> | ||
30 | #include <asm/asm-offsets.h> | ||
31 | #include <asm/thread_info.h> | ||
32 | #include <asm/ptrace.h> | ||
33 | #include <asm/cputable.h> | ||
34 | |||
35 | #include "exception.h" | ||
36 | |||
37 | .text | ||
38 | |||
39 | .globl system_reset_iSeries | ||
40 | system_reset_iSeries: | ||
41 | mfspr r13,SPRN_SPRG3 /* Get paca address */ | ||
42 | mfmsr r24 | ||
43 | ori r24,r24,MSR_RI | ||
44 | mtmsrd r24 /* RI on */ | ||
45 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | ||
46 | cmpwi 0,r24,0 /* Are we processor 0? */ | ||
47 | bne 1f | ||
48 | b .__start_initialization_iSeries /* Start up the first processor */ | ||
49 | 1: mfspr r4,SPRN_CTRLF | ||
50 | li r5,CTRL_RUNLATCH /* Turn off the run light */ | ||
51 | andc r4,r4,r5 | ||
52 | mtspr SPRN_CTRLT,r4 | ||
53 | |||
54 | 1: | ||
55 | HMT_LOW | ||
56 | #ifdef CONFIG_SMP | ||
57 | lbz r23,PACAPROCSTART(r13) /* Test if this processor | ||
58 | * should start */ | ||
59 | sync | ||
60 | LOAD_REG_IMMEDIATE(r3,current_set) | ||
61 | sldi r28,r24,3 /* get current_set[cpu#] */ | ||
62 | ldx r3,r3,r28 | ||
63 | addi r1,r3,THREAD_SIZE | ||
64 | subi r1,r1,STACK_FRAME_OVERHEAD | ||
65 | |||
66 | cmpwi 0,r23,0 | ||
67 | beq iSeries_secondary_smp_loop /* Loop until told to go */ | ||
68 | b __secondary_start /* Loop until told to go */ | ||
69 | iSeries_secondary_smp_loop: | ||
70 | /* Let the Hypervisor know we are alive */ | ||
71 | /* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */ | ||
72 | lis r3,0x8002 | ||
73 | rldicr r3,r3,32,15 /* r0 = (r3 << 32) & 0xffff000000000000 */ | ||
74 | #else /* CONFIG_SMP */ | ||
75 | /* Yield the processor. This is required for non-SMP kernels | ||
76 | which are running on multi-threaded machines. */ | ||
77 | lis r3,0x8000 | ||
78 | rldicr r3,r3,32,15 /* r3 = (r3 << 32) & 0xffff000000000000 */ | ||
79 | addi r3,r3,18 /* r3 = 0x8000000000000012 which is "yield" */ | ||
80 | li r4,0 /* "yield timed" */ | ||
81 | li r5,-1 /* "yield forever" */ | ||
82 | #endif /* CONFIG_SMP */ | ||
83 | li r0,-1 /* r0=-1 indicates a Hypervisor call */ | ||
84 | sc /* Invoke the hypervisor via a system call */ | ||
85 | mfspr r13,SPRN_SPRG3 /* Put r13 back ???? */ | ||
86 | b 1b /* If SMP not configured, secondaries | ||
87 | * loop forever */ | ||
88 | |||
89 | /*** ISeries-LPAR interrupt handlers ***/ | ||
90 | |||
91 | STD_EXCEPTION_ISERIES(machine_check, PACA_EXMC) | ||
92 | |||
93 | .globl data_access_iSeries | ||
94 | data_access_iSeries: | ||
95 | mtspr SPRN_SPRG1,r13 | ||
96 | BEGIN_FTR_SECTION | ||
97 | mtspr SPRN_SPRG2,r12 | ||
98 | mfspr r13,SPRN_DAR | ||
99 | mfspr r12,SPRN_DSISR | ||
100 | srdi r13,r13,60 | ||
101 | rlwimi r13,r12,16,0x20 | ||
102 | mfcr r12 | ||
103 | cmpwi r13,0x2c | ||
104 | beq .do_stab_bolted_iSeries | ||
105 | mtcrf 0x80,r12 | ||
106 | mfspr r12,SPRN_SPRG2 | ||
107 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | ||
108 | EXCEPTION_PROLOG_1(PACA_EXGEN) | ||
109 | EXCEPTION_PROLOG_ISERIES_1 | ||
110 | b data_access_common | ||
111 | |||
112 | .do_stab_bolted_iSeries: | ||
113 | mtcrf 0x80,r12 | ||
114 | mfspr r12,SPRN_SPRG2 | ||
115 | EXCEPTION_PROLOG_1(PACA_EXSLB) | ||
116 | EXCEPTION_PROLOG_ISERIES_1 | ||
117 | b .do_stab_bolted | ||
118 | |||
119 | .globl data_access_slb_iSeries | ||
120 | data_access_slb_iSeries: | ||
121 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
122 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
123 | std r3,PACA_EXSLB+EX_R3(r13) | ||
124 | mfspr r3,SPRN_DAR | ||
125 | std r9,PACA_EXSLB+EX_R9(r13) | ||
126 | mfcr r9 | ||
127 | #ifdef __DISABLED__ | ||
128 | cmpdi r3,0 | ||
129 | bge slb_miss_user_iseries | ||
130 | #endif | ||
131 | std r10,PACA_EXSLB+EX_R10(r13) | ||
132 | std r11,PACA_EXSLB+EX_R11(r13) | ||
133 | std r12,PACA_EXSLB+EX_R12(r13) | ||
134 | mfspr r10,SPRN_SPRG1 | ||
135 | std r10,PACA_EXSLB+EX_R13(r13) | ||
136 | ld r12,PACALPPACAPTR(r13) | ||
137 | ld r12,LPPACASRR1(r12) | ||
138 | b .slb_miss_realmode | ||
139 | |||
140 | STD_EXCEPTION_ISERIES(instruction_access, PACA_EXGEN) | ||
141 | |||
142 | .globl instruction_access_slb_iSeries | ||
143 | instruction_access_slb_iSeries: | ||
144 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
145 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
146 | std r3,PACA_EXSLB+EX_R3(r13) | ||
147 | ld r3,PACALPPACAPTR(r13) | ||
148 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ | ||
149 | std r9,PACA_EXSLB+EX_R9(r13) | ||
150 | mfcr r9 | ||
151 | #ifdef __DISABLED__ | ||
152 | cmpdi r3,0 | ||
153 | bge slb_miss_user_iseries | ||
154 | #endif | ||
155 | std r10,PACA_EXSLB+EX_R10(r13) | ||
156 | std r11,PACA_EXSLB+EX_R11(r13) | ||
157 | std r12,PACA_EXSLB+EX_R12(r13) | ||
158 | mfspr r10,SPRN_SPRG1 | ||
159 | std r10,PACA_EXSLB+EX_R13(r13) | ||
160 | ld r12,PACALPPACAPTR(r13) | ||
161 | ld r12,LPPACASRR1(r12) | ||
162 | b .slb_miss_realmode | ||
163 | |||
164 | #ifdef __DISABLED__ | ||
165 | slb_miss_user_iseries: | ||
166 | std r10,PACA_EXGEN+EX_R10(r13) | ||
167 | std r11,PACA_EXGEN+EX_R11(r13) | ||
168 | std r12,PACA_EXGEN+EX_R12(r13) | ||
169 | mfspr r10,SPRG1 | ||
170 | ld r11,PACA_EXSLB+EX_R9(r13) | ||
171 | ld r12,PACA_EXSLB+EX_R3(r13) | ||
172 | std r10,PACA_EXGEN+EX_R13(r13) | ||
173 | std r11,PACA_EXGEN+EX_R9(r13) | ||
174 | std r12,PACA_EXGEN+EX_R3(r13) | ||
175 | EXCEPTION_PROLOG_ISERIES_1 | ||
176 | b slb_miss_user_common | ||
177 | #endif | ||
178 | |||
179 | MASKABLE_EXCEPTION_ISERIES(hardware_interrupt) | ||
180 | STD_EXCEPTION_ISERIES(alignment, PACA_EXGEN) | ||
181 | STD_EXCEPTION_ISERIES(program_check, PACA_EXGEN) | ||
182 | STD_EXCEPTION_ISERIES(fp_unavailable, PACA_EXGEN) | ||
183 | MASKABLE_EXCEPTION_ISERIES(decrementer) | ||
184 | STD_EXCEPTION_ISERIES(trap_0a, PACA_EXGEN) | ||
185 | STD_EXCEPTION_ISERIES(trap_0b, PACA_EXGEN) | ||
186 | |||
187 | .globl system_call_iSeries | ||
188 | system_call_iSeries: | ||
189 | mr r9,r13 | ||
190 | mfspr r13,SPRN_SPRG3 | ||
191 | EXCEPTION_PROLOG_ISERIES_1 | ||
192 | b system_call_common | ||
193 | |||
194 | STD_EXCEPTION_ISERIES(single_step, PACA_EXGEN) | ||
195 | STD_EXCEPTION_ISERIES(trap_0e, PACA_EXGEN) | ||
196 | STD_EXCEPTION_ISERIES(performance_monitor, PACA_EXGEN) | ||
197 | |||
198 | decrementer_iSeries_masked: | ||
199 | /* We may not have a valid TOC pointer in here. */ | ||
200 | li r11,1 | ||
201 | ld r12,PACALPPACAPTR(r13) | ||
202 | stb r11,LPPACADECRINT(r12) | ||
203 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) | ||
204 | lwz r12,0(r12) | ||
205 | mtspr SPRN_DEC,r12 | ||
206 | /* fall through */ | ||
207 | |||
208 | hardware_interrupt_iSeries_masked: | ||
209 | mtcrf 0x80,r9 /* Restore regs */ | ||
210 | ld r12,PACALPPACAPTR(r13) | ||
211 | ld r11,LPPACASRR0(r12) | ||
212 | ld r12,LPPACASRR1(r12) | ||
213 | mtspr SPRN_SRR0,r11 | ||
214 | mtspr SPRN_SRR1,r12 | ||
215 | ld r9,PACA_EXGEN+EX_R9(r13) | ||
216 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
217 | ld r11,PACA_EXGEN+EX_R11(r13) | ||
218 | ld r12,PACA_EXGEN+EX_R12(r13) | ||
219 | ld r13,PACA_EXGEN+EX_R13(r13) | ||
220 | rfid | ||
221 | b . /* prevent speculative execution */ | ||
222 | |||
223 | _INIT_STATIC(__start_initialization_iSeries) | ||
224 | /* Clear out the BSS */ | ||
225 | LOAD_REG_IMMEDIATE(r11,__bss_stop) | ||
226 | LOAD_REG_IMMEDIATE(r8,__bss_start) | ||
227 | sub r11,r11,r8 /* bss size */ | ||
228 | addi r11,r11,7 /* round up to an even double word */ | ||
229 | rldicl. r11,r11,61,3 /* shift right by 3 */ | ||
230 | beq 4f | ||
231 | addi r8,r8,-8 | ||
232 | li r0,0 | ||
233 | mtctr r11 /* zero this many doublewords */ | ||
234 | 3: stdu r0,8(r8) | ||
235 | bdnz 3b | ||
236 | 4: | ||
237 | LOAD_REG_IMMEDIATE(r1,init_thread_union) | ||
238 | addi r1,r1,THREAD_SIZE | ||
239 | li r0,0 | ||
240 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | ||
241 | |||
242 | LOAD_REG_IMMEDIATE(r2,__toc_start) | ||
243 | addi r2,r2,0x4000 | ||
244 | addi r2,r2,0x4000 | ||
245 | |||
246 | bl .iSeries_early_setup | ||
247 | bl .early_setup | ||
248 | |||
249 | /* relocation is on at this point */ | ||
250 | |||
251 | b .start_here_common | ||
diff --git a/arch/powerpc/platforms/iseries/exception.h b/arch/powerpc/platforms/iseries/exception.h new file mode 100644 index 000000000000..ced45a8fa1aa --- /dev/null +++ b/arch/powerpc/platforms/iseries/exception.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _ASM_POWERPC_ISERIES_EXCEPTION_H | ||
2 | #define _ASM_POWERPC_ISERIES_EXCEPTION_H | ||
3 | /* | ||
4 | * Extracted from head_64.S | ||
5 | * | ||
6 | * PowerPC version | ||
7 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
8 | * | ||
9 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | ||
10 | * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu> | ||
11 | * Adapted for Power Macintosh by Paul Mackerras. | ||
12 | * Low-level exception handlers and MMU support | ||
13 | * rewritten by Paul Mackerras. | ||
14 | * Copyright (C) 1996 Paul Mackerras. | ||
15 | * | ||
16 | * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and | ||
17 | * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com | ||
18 | * | ||
19 | * This file contains the low-level support and setup for the | ||
20 | * PowerPC-64 platform, including trap and interrupt dispatch. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or | ||
23 | * modify it under the terms of the GNU General Public License | ||
24 | * as published by the Free Software Foundation; either version | ||
25 | * 2 of the License, or (at your option) any later version. | ||
26 | */ | ||
27 | #include <asm/exception.h> | ||
28 | |||
29 | #define EXCEPTION_PROLOG_ISERIES_1 \ | ||
30 | mfmsr r10; \ | ||
31 | ld r12,PACALPPACAPTR(r13); \ | ||
32 | ld r11,LPPACASRR0(r12); \ | ||
33 | ld r12,LPPACASRR1(r12); \ | ||
34 | ori r10,r10,MSR_RI; \ | ||
35 | mtmsrd r10,1 | ||
36 | |||
37 | #define STD_EXCEPTION_ISERIES(label, area) \ | ||
38 | .globl label##_iSeries; \ | ||
39 | label##_iSeries: \ | ||
40 | HMT_MEDIUM; \ | ||
41 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
42 | EXCEPTION_PROLOG_1(area); \ | ||
43 | EXCEPTION_PROLOG_ISERIES_1; \ | ||
44 | b label##_common | ||
45 | |||
46 | #define MASKABLE_EXCEPTION_ISERIES(label) \ | ||
47 | .globl label##_iSeries; \ | ||
48 | label##_iSeries: \ | ||
49 | HMT_MEDIUM; \ | ||
50 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
51 | EXCEPTION_PROLOG_1(PACA_EXGEN); \ | ||
52 | lbz r10,PACASOFTIRQEN(r13); \ | ||
53 | cmpwi 0,r10,0; \ | ||
54 | beq- label##_iSeries_masked; \ | ||
55 | EXCEPTION_PROLOG_ISERIES_1; \ | ||
56 | b label##_common; \ | ||
57 | |||
58 | #endif /* _ASM_POWERPC_ISERIES_EXCEPTION_H */ | ||
diff --git a/arch/powerpc/platforms/iseries/it_lp_naca.h b/arch/powerpc/platforms/iseries/it_lp_naca.h index 9bbf58986819..cf6dcf6ef07b 100644 --- a/arch/powerpc/platforms/iseries/it_lp_naca.h +++ b/arch/powerpc/platforms/iseries/it_lp_naca.h | |||
@@ -60,7 +60,7 @@ struct ItLpNaca { | |||
60 | u8 xRsvd2_0[128]; // Reserved x00-x7F | 60 | u8 xRsvd2_0[128]; // Reserved x00-x7F |
61 | 61 | ||
62 | // CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators | 62 | // CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators |
63 | // NB: Padding required to keep xInterrruptHdlr at x300 which is required | 63 | // NB: Padding required to keep xInterruptHdlr at x300 which is required |
64 | // for v4r4 PLIC. | 64 | // for v4r4 PLIC. |
65 | u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F | 65 | u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F |
66 | u8 xRsvd3_0[384]; // Reserved 180-2FF | 66 | u8 xRsvd3_0[384]; // Reserved 180-2FF |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 13a8b1908ded..fad493e29d37 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/paca.h> | 42 | #include <asm/paca.h> |
43 | #include <asm/cache.h> | 43 | #include <asm/cache.h> |
44 | #include <asm/sections.h> | ||
45 | #include <asm/abs_addr.h> | 44 | #include <asm/abs_addr.h> |
46 | #include <asm/iseries/hv_lp_config.h> | 45 | #include <asm/iseries/hv_lp_config.h> |
47 | #include <asm/iseries/hv_call_event.h> | 46 | #include <asm/iseries/hv_call_event.h> |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 2542403288f9..771ed0cf29a5 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -169,15 +169,12 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
169 | switch (len) { | 169 | switch (len) { |
170 | case 1: | 170 | case 1: |
171 | out_8(addr, val); | 171 | out_8(addr, val); |
172 | (void) in_8(addr); | ||
173 | break; | 172 | break; |
174 | case 2: | 173 | case 2: |
175 | out_le16(addr, val); | 174 | out_le16(addr, val); |
176 | (void) in_le16(addr); | ||
177 | break; | 175 | break; |
178 | default: | 176 | default: |
179 | out_le32(addr, val); | 177 | out_le32(addr, val); |
180 | (void) in_le32(addr); | ||
181 | break; | 178 | break; |
182 | } | 179 | } |
183 | return PCIBIOS_SUCCESSFUL; | 180 | return PCIBIOS_SUCCESSFUL; |
@@ -185,8 +182,8 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
185 | 182 | ||
186 | static struct pci_ops u3_agp_pci_ops = | 183 | static struct pci_ops u3_agp_pci_ops = |
187 | { | 184 | { |
188 | u3_agp_read_config, | 185 | .read = u3_agp_read_config, |
189 | u3_agp_write_config | 186 | .write = u3_agp_write_config, |
190 | }; | 187 | }; |
191 | 188 | ||
192 | static unsigned long u3_ht_cfa0(u8 devfn, u8 off) | 189 | static unsigned long u3_ht_cfa0(u8 devfn, u8 off) |
@@ -268,15 +265,12 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
268 | switch (len) { | 265 | switch (len) { |
269 | case 1: | 266 | case 1: |
270 | out_8(addr, val); | 267 | out_8(addr, val); |
271 | (void) in_8(addr); | ||
272 | break; | 268 | break; |
273 | case 2: | 269 | case 2: |
274 | out_le16(addr, val); | 270 | out_le16(addr, val); |
275 | (void) in_le16(addr); | ||
276 | break; | 271 | break; |
277 | default: | 272 | default: |
278 | out_le32(addr, val); | 273 | out_le32(addr, val); |
279 | (void) in_le32(addr); | ||
280 | break; | 274 | break; |
281 | } | 275 | } |
282 | return PCIBIOS_SUCCESSFUL; | 276 | return PCIBIOS_SUCCESSFUL; |
@@ -284,8 +278,8 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
284 | 278 | ||
285 | static struct pci_ops u3_ht_pci_ops = | 279 | static struct pci_ops u3_ht_pci_ops = |
286 | { | 280 | { |
287 | u3_ht_read_config, | 281 | .read = u3_ht_read_config, |
288 | u3_ht_write_config | 282 | .write = u3_ht_write_config, |
289 | }; | 283 | }; |
290 | 284 | ||
291 | static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off) | 285 | static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off) |
@@ -376,15 +370,12 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
376 | switch (len) { | 370 | switch (len) { |
377 | case 1: | 371 | case 1: |
378 | out_8(addr, val); | 372 | out_8(addr, val); |
379 | (void) in_8(addr); | ||
380 | break; | 373 | break; |
381 | case 2: | 374 | case 2: |
382 | out_le16(addr, val); | 375 | out_le16(addr, val); |
383 | (void) in_le16(addr); | ||
384 | break; | 376 | break; |
385 | default: | 377 | default: |
386 | out_le32(addr, val); | 378 | out_le32(addr, val); |
387 | (void) in_le32(addr); | ||
388 | break; | 379 | break; |
389 | } | 380 | } |
390 | return PCIBIOS_SUCCESSFUL; | 381 | return PCIBIOS_SUCCESSFUL; |
@@ -392,8 +383,8 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
392 | 383 | ||
393 | static struct pci_ops u4_pcie_pci_ops = | 384 | static struct pci_ops u4_pcie_pci_ops = |
394 | { | 385 | { |
395 | u4_pcie_read_config, | 386 | .read = u4_pcie_read_config, |
396 | u4_pcie_write_config | 387 | .write = u4_pcie_write_config, |
397 | }; | 388 | }; |
398 | 389 | ||
399 | static void __init setup_u3_agp(struct pci_controller* hose) | 390 | static void __init setup_u3_agp(struct pci_controller* hose) |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 9014d55c717b..6c42787fb382 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -187,7 +187,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) | |||
187 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } | 187 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } |
188 | static void pci_dma_dev_setup_null(struct pci_dev *d) { } | 188 | static void pci_dma_dev_setup_null(struct pci_dev *d) { } |
189 | 189 | ||
190 | int iob_init(struct device_node *dn) | 190 | int __init iob_init(struct device_node *dn) |
191 | { | 191 | { |
192 | unsigned long tmp; | 192 | unsigned long tmp; |
193 | u32 regword; | 193 | u32 regword; |
@@ -233,7 +233,7 @@ int iob_init(struct device_node *dn) | |||
233 | 233 | ||
234 | 234 | ||
235 | /* These are called very early. */ | 235 | /* These are called very early. */ |
236 | void iommu_init_early_pasemi(void) | 236 | void __init iommu_init_early_pasemi(void) |
237 | { | 237 | { |
238 | int iommu_off; | 238 | int iommu_off; |
239 | 239 | ||
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index ab1f5f62bcd8..03d1d07aa2ac 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c | |||
@@ -107,23 +107,20 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
107 | switch (len) { | 107 | switch (len) { |
108 | case 1: | 108 | case 1: |
109 | out_8(addr, val); | 109 | out_8(addr, val); |
110 | (void) in_8(addr); | ||
111 | break; | 110 | break; |
112 | case 2: | 111 | case 2: |
113 | out_le16(addr, val); | 112 | out_le16(addr, val); |
114 | (void) in_le16(addr); | ||
115 | break; | 113 | break; |
116 | default: | 114 | default: |
117 | out_le32(addr, val); | 115 | out_le32(addr, val); |
118 | (void) in_le32(addr); | ||
119 | break; | 116 | break; |
120 | } | 117 | } |
121 | return PCIBIOS_SUCCESSFUL; | 118 | return PCIBIOS_SUCCESSFUL; |
122 | } | 119 | } |
123 | 120 | ||
124 | static struct pci_ops pa_pxp_ops = { | 121 | static struct pci_ops pa_pxp_ops = { |
125 | pa_pxp_read_config, | 122 | .read = pa_pxp_read_config, |
126 | pa_pxp_write_config, | 123 | .write = pa_pxp_write_config, |
127 | }; | 124 | }; |
128 | 125 | ||
129 | static void __init setup_pa_pxp(struct pci_controller *hose) | 126 | static void __init setup_pa_pxp(struct pci_controller *hose) |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index ffe6528048b5..05def6282f83 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -50,26 +50,30 @@ static void pas_restart(char *cmd) | |||
50 | 50 | ||
51 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
52 | static DEFINE_SPINLOCK(timebase_lock); | 52 | static DEFINE_SPINLOCK(timebase_lock); |
53 | static unsigned long timebase; | ||
53 | 54 | ||
54 | static void __devinit pas_give_timebase(void) | 55 | static void __devinit pas_give_timebase(void) |
55 | { | 56 | { |
56 | unsigned long tb; | ||
57 | |||
58 | spin_lock(&timebase_lock); | 57 | spin_lock(&timebase_lock); |
59 | mtspr(SPRN_TBCTL, TBCTL_FREEZE); | 58 | mtspr(SPRN_TBCTL, TBCTL_FREEZE); |
60 | tb = mftb(); | 59 | isync(); |
61 | mtspr(SPRN_TBCTL, TBCTL_UPDATE_LOWER | (tb & 0xffffffff)); | 60 | timebase = get_tb(); |
62 | mtspr(SPRN_TBCTL, TBCTL_UPDATE_UPPER | (tb >> 32)); | ||
63 | mtspr(SPRN_TBCTL, TBCTL_RESTART); | ||
64 | spin_unlock(&timebase_lock); | 61 | spin_unlock(&timebase_lock); |
65 | pr_debug("pas_give_timebase: cpu %d gave tb %lx\n", | 62 | |
66 | smp_processor_id(), tb); | 63 | while (timebase) |
64 | barrier(); | ||
65 | mtspr(SPRN_TBCTL, TBCTL_RESTART); | ||
67 | } | 66 | } |
68 | 67 | ||
69 | static void __devinit pas_take_timebase(void) | 68 | static void __devinit pas_take_timebase(void) |
70 | { | 69 | { |
71 | pr_debug("pas_take_timebase: cpu %d has tb %lx\n", | 70 | while (!timebase) |
72 | smp_processor_id(), mftb()); | 71 | smp_rmb(); |
72 | |||
73 | spin_lock(&timebase_lock); | ||
74 | set_tb(timebase >> 32, timebase & 0xffffffff); | ||
75 | timebase = 0; | ||
76 | spin_unlock(&timebase_lock); | ||
73 | } | 77 | } |
74 | 78 | ||
75 | struct smp_ops_t pas_smp_ops = { | 79 | struct smp_ops_t pas_smp_ops = { |
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c index 9d73d0234c5d..cf660916ae0b 100644 --- a/arch/powerpc/platforms/powermac/bootx_init.c +++ b/arch/powerpc/platforms/powermac/bootx_init.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/bootx.h> | 19 | #include <asm/bootx.h> |
20 | #include <asm/bootinfo.h> | ||
21 | #include <asm/btext.h> | 20 | #include <asm/btext.h> |
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
23 | 22 | ||
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index efdf5eb81ecc..da2007e3db0e 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/completion.h> | 40 | #include <linux/completion.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/completion.h> | ||
44 | #include <linux/timer.h> | 43 | #include <linux/timer.h> |
45 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
46 | #include <asm/keylargo.h> | 45 | #include <asm/keylargo.h> |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 92586db19754..ec49099830d5 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -209,15 +209,12 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
209 | switch (len) { | 209 | switch (len) { |
210 | case 1: | 210 | case 1: |
211 | out_8(addr, val); | 211 | out_8(addr, val); |
212 | (void) in_8(addr); | ||
213 | break; | 212 | break; |
214 | case 2: | 213 | case 2: |
215 | out_le16(addr, val); | 214 | out_le16(addr, val); |
216 | (void) in_le16(addr); | ||
217 | break; | 215 | break; |
218 | default: | 216 | default: |
219 | out_le32(addr, val); | 217 | out_le32(addr, val); |
220 | (void) in_le32(addr); | ||
221 | break; | 218 | break; |
222 | } | 219 | } |
223 | return PCIBIOS_SUCCESSFUL; | 220 | return PCIBIOS_SUCCESSFUL; |
@@ -225,8 +222,8 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
225 | 222 | ||
226 | static struct pci_ops macrisc_pci_ops = | 223 | static struct pci_ops macrisc_pci_ops = |
227 | { | 224 | { |
228 | macrisc_read_config, | 225 | .read = macrisc_read_config, |
229 | macrisc_write_config | 226 | .write = macrisc_write_config, |
230 | }; | 227 | }; |
231 | 228 | ||
232 | #ifdef CONFIG_PPC32 | 229 | #ifdef CONFIG_PPC32 |
@@ -280,8 +277,8 @@ chaos_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
280 | 277 | ||
281 | static struct pci_ops chaos_pci_ops = | 278 | static struct pci_ops chaos_pci_ops = |
282 | { | 279 | { |
283 | chaos_read_config, | 280 | .read = chaos_read_config, |
284 | chaos_write_config | 281 | .write = chaos_write_config, |
285 | }; | 282 | }; |
286 | 283 | ||
287 | static void __init setup_chaos(struct pci_controller *hose, | 284 | static void __init setup_chaos(struct pci_controller *hose, |
@@ -440,15 +437,12 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
440 | switch (len) { | 437 | switch (len) { |
441 | case 1: | 438 | case 1: |
442 | out_8(addr, val); | 439 | out_8(addr, val); |
443 | (void) in_8(addr); | ||
444 | break; | 440 | break; |
445 | case 2: | 441 | case 2: |
446 | out_le16(addr, val); | 442 | out_le16(addr, val); |
447 | (void) in_le16(addr); | ||
448 | break; | 443 | break; |
449 | default: | 444 | default: |
450 | out_le32((u32 __iomem *)addr, val); | 445 | out_le32((u32 __iomem *)addr, val); |
451 | (void) in_le32(addr); | ||
452 | break; | 446 | break; |
453 | } | 447 | } |
454 | return PCIBIOS_SUCCESSFUL; | 448 | return PCIBIOS_SUCCESSFUL; |
@@ -456,8 +450,8 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
456 | 450 | ||
457 | static struct pci_ops u3_ht_pci_ops = | 451 | static struct pci_ops u3_ht_pci_ops = |
458 | { | 452 | { |
459 | u3_ht_read_config, | 453 | .read = u3_ht_read_config, |
460 | u3_ht_write_config | 454 | .write = u3_ht_write_config, |
461 | }; | 455 | }; |
462 | 456 | ||
463 | #define U4_PCIE_CFA0(devfn, off) \ | 457 | #define U4_PCIE_CFA0(devfn, off) \ |
@@ -545,15 +539,12 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
545 | switch (len) { | 539 | switch (len) { |
546 | case 1: | 540 | case 1: |
547 | out_8(addr, val); | 541 | out_8(addr, val); |
548 | (void) in_8(addr); | ||
549 | break; | 542 | break; |
550 | case 2: | 543 | case 2: |
551 | out_le16(addr, val); | 544 | out_le16(addr, val); |
552 | (void) in_le16(addr); | ||
553 | break; | 545 | break; |
554 | default: | 546 | default: |
555 | out_le32(addr, val); | 547 | out_le32(addr, val); |
556 | (void) in_le32(addr); | ||
557 | break; | 548 | break; |
558 | } | 549 | } |
559 | return PCIBIOS_SUCCESSFUL; | 550 | return PCIBIOS_SUCCESSFUL; |
@@ -561,8 +552,8 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
561 | 552 | ||
562 | static struct pci_ops u4_pcie_pci_ops = | 553 | static struct pci_ops u4_pcie_pci_ops = |
563 | { | 554 | { |
564 | u4_pcie_read_config, | 555 | .read = u4_pcie_read_config, |
565 | u4_pcie_write_config | 556 | .write = u4_pcie_write_config, |
566 | }; | 557 | }; |
567 | 558 | ||
568 | #endif /* CONFIG_PPC64 */ | 559 | #endif /* CONFIG_PPC64 */ |
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index 6e090a7dea83..fcde070f7054 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h | |||
@@ -22,9 +22,6 @@ extern void pmac_read_rtc_time(void); | |||
22 | extern void pmac_calibrate_decr(void); | 22 | extern void pmac_calibrate_decr(void); |
23 | extern void pmac_pci_irq_fixup(struct pci_dev *); | 23 | extern void pmac_pci_irq_fixup(struct pci_dev *); |
24 | extern void pmac_pci_init(void); | 24 | extern void pmac_pci_init(void); |
25 | extern unsigned long pmac_ide_get_base(int index); | ||
26 | extern void pmac_ide_init_hwif_ports(hw_regs_t *hw, | ||
27 | unsigned long data_port, unsigned long ctrl_port, int *irq); | ||
28 | 25 | ||
29 | extern void pmac_nvram_update(void); | 26 | extern void pmac_nvram_update(void); |
30 | extern unsigned char pmac_nvram_read_byte(int addr); | 27 | extern unsigned char pmac_nvram_read_byte(int addr); |
@@ -33,7 +30,6 @@ extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial); | |||
33 | extern void pmac_pcibios_after_init(void); | 30 | extern void pmac_pcibios_after_init(void); |
34 | extern int of_show_percpuinfo(struct seq_file *m, int i); | 31 | extern int of_show_percpuinfo(struct seq_file *m, int i); |
35 | 32 | ||
36 | extern void pmac_pci_init(void); | ||
37 | extern void pmac_setup_pci_dma(void); | 33 | extern void pmac_setup_pci_dma(void); |
38 | extern void pmac_check_ht_link(void); | 34 | extern void pmac_check_ht_link(void); |
39 | 35 | ||
diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c index 6124e59e1038..44e0b55a2a02 100644 --- a/arch/powerpc/platforms/powermac/udbg_adb.c +++ b/arch/powerpc/platforms/powermac/udbg_adb.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/xmon.h> | 12 | #include <asm/xmon.h> |
13 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
14 | #include <asm/bootx.h> | 14 | #include <asm/bootx.h> |
15 | #include <asm/machdep.h> | ||
16 | #include <asm/errno.h> | 15 | #include <asm/errno.h> |
17 | #include <asm/pmac_feature.h> | 16 | #include <asm/pmac_feature.h> |
18 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
@@ -150,7 +149,7 @@ static void udbg_adb_putc(char c) | |||
150 | return udbg_adb_old_putc(c); | 149 | return udbg_adb_old_putc(c); |
151 | } | 150 | } |
152 | 151 | ||
153 | void udbg_adb_init_early(void) | 152 | void __init udbg_adb_init_early(void) |
154 | { | 153 | { |
155 | #ifdef CONFIG_BOOTX_TEXT | 154 | #ifdef CONFIG_BOOTX_TEXT |
156 | if (btext_find_display(1) == 0) { | 155 | if (btext_find_display(1) == 0) { |
@@ -160,7 +159,7 @@ void udbg_adb_init_early(void) | |||
160 | #endif | 159 | #endif |
161 | } | 160 | } |
162 | 161 | ||
163 | int udbg_adb_init(int force_btext) | 162 | int __init udbg_adb_init(int force_btext) |
164 | { | 163 | { |
165 | struct device_node *np; | 164 | struct device_node *np; |
166 | 165 | ||
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index b8770395013d..b242c6c34f81 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -169,6 +169,8 @@ static void rtas_slot_error_detail(struct pci_dn *pdn, int severity, | |||
169 | */ | 169 | */ |
170 | static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | 170 | static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) |
171 | { | 171 | { |
172 | struct device_node *dn; | ||
173 | struct pci_dev *dev = pdn->pcidev; | ||
172 | u32 cfg; | 174 | u32 cfg; |
173 | int cap, i; | 175 | int cap, i; |
174 | int n = 0; | 176 | int n = 0; |
@@ -184,6 +186,17 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
184 | n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); | 186 | n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); |
185 | printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); | 187 | printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); |
186 | 188 | ||
189 | /* Gather bridge-specific registers */ | ||
190 | if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { | ||
191 | rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); | ||
192 | n += scnprintf(buf+n, len-n, "sec stat:%x\n", cfg); | ||
193 | printk(KERN_WARNING "EEH: Bridge secondary status: %04x\n", cfg); | ||
194 | |||
195 | rtas_read_config(pdn, PCI_BRIDGE_CONTROL, 2, &cfg); | ||
196 | n += scnprintf(buf+n, len-n, "brdg ctl:%x\n", cfg); | ||
197 | printk(KERN_WARNING "EEH: Bridge control: %04x\n", cfg); | ||
198 | } | ||
199 | |||
187 | /* Dump out the PCI-X command and status regs */ | 200 | /* Dump out the PCI-X command and status regs */ |
188 | cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); | 201 | cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); |
189 | if (cap) { | 202 | if (cap) { |
@@ -209,7 +222,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
209 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); | 222 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); |
210 | } | 223 | } |
211 | 224 | ||
212 | cap = pci_find_ext_capability(pdn->pcidev,PCI_EXT_CAP_ID_ERR); | 225 | cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR); |
213 | if (cap) { | 226 | if (cap) { |
214 | n += scnprintf(buf+n, len-n, "pci-e AER:\n"); | 227 | n += scnprintf(buf+n, len-n, "pci-e AER:\n"); |
215 | printk(KERN_WARNING | 228 | printk(KERN_WARNING |
@@ -222,6 +235,18 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
222 | } | 235 | } |
223 | } | 236 | } |
224 | } | 237 | } |
238 | |||
239 | /* Gather status on devices under the bridge */ | ||
240 | if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { | ||
241 | dn = pdn->node->child; | ||
242 | while (dn) { | ||
243 | pdn = PCI_DN(dn); | ||
244 | if (pdn) | ||
245 | n += gather_pci_data(pdn, buf+n, len-n); | ||
246 | dn = dn->sibling; | ||
247 | } | ||
248 | } | ||
249 | |||
225 | return n; | 250 | return n; |
226 | } | 251 | } |
227 | 252 | ||
@@ -750,12 +775,12 @@ int rtas_set_slot_reset(struct pci_dn *pdn) | |||
750 | return 0; | 775 | return 0; |
751 | 776 | ||
752 | if (rc < 0) { | 777 | if (rc < 0) { |
753 | printk (KERN_ERR "EEH: unrecoverable slot failure %s\n", | 778 | printk(KERN_ERR "EEH: unrecoverable slot failure %s\n", |
754 | pdn->node->full_name); | 779 | pdn->node->full_name); |
755 | return -1; | 780 | return -1; |
756 | } | 781 | } |
757 | printk (KERN_ERR "EEH: bus reset %d failed on slot %s\n", | 782 | printk(KERN_ERR "EEH: bus reset %d failed on slot %s, rc=%d\n", |
758 | i+1, pdn->node->full_name); | 783 | i+1, pdn->node->full_name, rc); |
759 | } | 784 | } |
760 | 785 | ||
761 | return -1; | 786 | return -1; |
@@ -944,23 +969,6 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
944 | } | 969 | } |
945 | pdn->class_code = *class_code; | 970 | pdn->class_code = *class_code; |
946 | 971 | ||
947 | /* | ||
948 | * Now decide if we are going to "Disable" EEH checking | ||
949 | * for this device. We still run with the EEH hardware active, | ||
950 | * but we won't be checking for ff's. This means a driver | ||
951 | * could return bad data (very bad!), an interrupt handler could | ||
952 | * hang waiting on status bits that won't change, etc. | ||
953 | * But there are a few cases like display devices that make sense. | ||
954 | */ | ||
955 | enable = 1; /* i.e. we will do checking */ | ||
956 | #if 0 | ||
957 | if ((*class_code >> 16) == PCI_BASE_CLASS_DISPLAY) | ||
958 | enable = 0; | ||
959 | #endif | ||
960 | |||
961 | if (!enable) | ||
962 | pdn->eeh_mode |= EEH_MODE_NOCHECK; | ||
963 | |||
964 | /* Ok... see if this device supports EEH. Some do, some don't, | 972 | /* Ok... see if this device supports EEH. Some do, some don't, |
965 | * and the only way to find out is to check each and every one. */ | 973 | * and the only way to find out is to check each and every one. */ |
966 | regs = of_get_property(dn, "reg", NULL); | 974 | regs = of_get_property(dn, "reg", NULL); |
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index e49c815eae23..1e83fcd0df31 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c | |||
@@ -225,6 +225,10 @@ void pci_addr_cache_insert_device(struct pci_dev *dev) | |||
225 | { | 225 | { |
226 | unsigned long flags; | 226 | unsigned long flags; |
227 | 227 | ||
228 | /* Ignore PCI bridges */ | ||
229 | if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) | ||
230 | return; | ||
231 | |||
228 | spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags); | 232 | spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags); |
229 | __pci_addr_cache_insert_device(dev); | 233 | __pci_addr_cache_insert_device(dev); |
230 | spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags); | 234 | spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags); |
@@ -285,16 +289,13 @@ void __init pci_addr_cache_build(void) | |||
285 | spin_lock_init(&pci_io_addr_cache_root.piar_lock); | 289 | spin_lock_init(&pci_io_addr_cache_root.piar_lock); |
286 | 290 | ||
287 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 291 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
288 | /* Ignore PCI bridges */ | ||
289 | if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) | ||
290 | continue; | ||
291 | 292 | ||
292 | pci_addr_cache_insert_device(dev); | 293 | pci_addr_cache_insert_device(dev); |
293 | 294 | ||
294 | dn = pci_device_to_OF_node(dev); | 295 | dn = pci_device_to_OF_node(dev); |
295 | if (!dn) | 296 | if (!dn) |
296 | continue; | 297 | continue; |
297 | pci_dev_get (dev); /* matching put is in eeh_remove_device() */ | 298 | pci_dev_get(dev); /* matching put is in eeh_remove_device() */ |
298 | PCI_DN(dn)->pcidev = dev; | 299 | PCI_DN(dn)->pcidev = dev; |
299 | 300 | ||
300 | eeh_sysfs_add_device(dev); | 301 | eeh_sysfs_add_device(dev); |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 8cc6eeeaae2f..ea327ca345c6 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
36 | #include <asm/tlb.h> | 36 | #include <asm/tlb.h> |
37 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
38 | #include <asm/abs_addr.h> | ||
39 | #include <asm/cputable.h> | 38 | #include <asm/cputable.h> |
40 | #include <asm/udbg.h> | 39 | #include <asm/udbg.h> |
41 | #include <asm/smp.h> | 40 | #include <asm/smp.h> |
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c index 9797b10b2935..30925d29bcea 100644 --- a/arch/powerpc/platforms/pseries/rtasd.c +++ b/arch/powerpc/platforms/pseries/rtasd.c | |||
@@ -44,15 +44,19 @@ static unsigned long rtas_log_start; | |||
44 | static unsigned long rtas_log_size; | 44 | static unsigned long rtas_log_size; |
45 | 45 | ||
46 | static int surveillance_timeout = -1; | 46 | static int surveillance_timeout = -1; |
47 | static unsigned int rtas_event_scan_rate; | ||
48 | static unsigned int rtas_error_log_max; | 47 | static unsigned int rtas_error_log_max; |
49 | static unsigned int rtas_error_log_buffer_max; | 48 | static unsigned int rtas_error_log_buffer_max; |
50 | 49 | ||
50 | /* RTAS service tokens */ | ||
51 | static unsigned int event_scan; | ||
52 | static unsigned int rtas_event_scan_rate; | ||
53 | |||
51 | static int full_rtas_msgs = 0; | 54 | static int full_rtas_msgs = 0; |
52 | 55 | ||
53 | extern int no_logging; | 56 | /* Stop logging to nvram after first fatal error */ |
57 | static int no_more_logging; | ||
54 | 58 | ||
55 | volatile int error_log_cnt = 0; | 59 | static int error_log_cnt; |
56 | 60 | ||
57 | /* | 61 | /* |
58 | * Since we use 32 bit RTAS, the physical address of this must be below | 62 | * Since we use 32 bit RTAS, the physical address of this must be below |
@@ -61,8 +65,6 @@ volatile int error_log_cnt = 0; | |||
61 | */ | 65 | */ |
62 | static unsigned char logdata[RTAS_ERROR_LOG_MAX]; | 66 | static unsigned char logdata[RTAS_ERROR_LOG_MAX]; |
63 | 67 | ||
64 | static int get_eventscan_parms(void); | ||
65 | |||
66 | static char *rtas_type[] = { | 68 | static char *rtas_type[] = { |
67 | "Unknown", "Retry", "TCE Error", "Internal Device Failure", | 69 | "Unknown", "Retry", "TCE Error", "Internal Device Failure", |
68 | "Timeout", "Data Parity", "Address Parity", "Cache Parity", | 70 | "Timeout", "Data Parity", "Address Parity", "Cache Parity", |
@@ -166,9 +168,9 @@ static int log_rtas_len(char * buf) | |||
166 | len += err->extended_log_length; | 168 | len += err->extended_log_length; |
167 | } | 169 | } |
168 | 170 | ||
169 | if (rtas_error_log_max == 0) { | 171 | if (rtas_error_log_max == 0) |
170 | get_eventscan_parms(); | 172 | rtas_error_log_max = rtas_get_error_log_max(); |
171 | } | 173 | |
172 | if (len > rtas_error_log_max) | 174 | if (len > rtas_error_log_max) |
173 | len = rtas_error_log_max; | 175 | len = rtas_error_log_max; |
174 | 176 | ||
@@ -215,8 +217,8 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal) | |||
215 | } | 217 | } |
216 | 218 | ||
217 | /* Write error to NVRAM */ | 219 | /* Write error to NVRAM */ |
218 | if (!no_logging && !(err_type & ERR_FLAG_BOOT)) | 220 | if (!no_more_logging && !(err_type & ERR_FLAG_BOOT)) |
219 | nvram_write_error_log(buf, len, err_type); | 221 | nvram_write_error_log(buf, len, err_type, error_log_cnt); |
220 | 222 | ||
221 | /* | 223 | /* |
222 | * rtas errors can occur during boot, and we do want to capture | 224 | * rtas errors can occur during boot, and we do want to capture |
@@ -227,8 +229,8 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal) | |||
227 | printk_log_rtas(buf, len); | 229 | printk_log_rtas(buf, len); |
228 | 230 | ||
229 | /* Check to see if we need to or have stopped logging */ | 231 | /* Check to see if we need to or have stopped logging */ |
230 | if (fatal || no_logging) { | 232 | if (fatal || no_more_logging) { |
231 | no_logging = 1; | 233 | no_more_logging = 1; |
232 | spin_unlock_irqrestore(&rtasd_log_lock, s); | 234 | spin_unlock_irqrestore(&rtasd_log_lock, s); |
233 | return; | 235 | return; |
234 | } | 236 | } |
@@ -300,7 +302,7 @@ static ssize_t rtas_log_read(struct file * file, char __user * buf, | |||
300 | 302 | ||
301 | spin_lock_irqsave(&rtasd_log_lock, s); | 303 | spin_lock_irqsave(&rtasd_log_lock, s); |
302 | /* if it's 0, then we know we got the last one (the one in NVRAM) */ | 304 | /* if it's 0, then we know we got the last one (the one in NVRAM) */ |
303 | if (rtas_log_size == 0 && !no_logging) | 305 | if (rtas_log_size == 0 && !no_more_logging) |
304 | nvram_clear_error_log(); | 306 | nvram_clear_error_log(); |
305 | spin_unlock_irqrestore(&rtasd_log_lock, s); | 307 | spin_unlock_irqrestore(&rtasd_log_lock, s); |
306 | 308 | ||
@@ -356,32 +358,7 @@ static int enable_surveillance(int timeout) | |||
356 | return -1; | 358 | return -1; |
357 | } | 359 | } |
358 | 360 | ||
359 | static int get_eventscan_parms(void) | 361 | static void do_event_scan(void) |
360 | { | ||
361 | struct device_node *node; | ||
362 | const int *ip; | ||
363 | |||
364 | node = of_find_node_by_path("/rtas"); | ||
365 | |||
366 | ip = of_get_property(node, "rtas-event-scan-rate", NULL); | ||
367 | if (ip == NULL) { | ||
368 | printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n"); | ||
369 | of_node_put(node); | ||
370 | return -1; | ||
371 | } | ||
372 | rtas_event_scan_rate = *ip; | ||
373 | DEBUG("rtas-event-scan-rate %d\n", rtas_event_scan_rate); | ||
374 | |||
375 | /* Make room for the sequence number */ | ||
376 | rtas_error_log_max = rtas_get_error_log_max(); | ||
377 | rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); | ||
378 | |||
379 | of_node_put(node); | ||
380 | |||
381 | return 0; | ||
382 | } | ||
383 | |||
384 | static void do_event_scan(int event_scan) | ||
385 | { | 362 | { |
386 | int error; | 363 | int error; |
387 | do { | 364 | do { |
@@ -408,7 +385,7 @@ static void do_event_scan_all_cpus(long delay) | |||
408 | cpu = first_cpu(cpu_online_map); | 385 | cpu = first_cpu(cpu_online_map); |
409 | for (;;) { | 386 | for (;;) { |
410 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 387 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
411 | do_event_scan(rtas_token("event-scan")); | 388 | do_event_scan(); |
412 | set_cpus_allowed(current, CPU_MASK_ALL); | 389 | set_cpus_allowed(current, CPU_MASK_ALL); |
413 | 390 | ||
414 | /* Drop hotplug lock, and sleep for the specified delay */ | 391 | /* Drop hotplug lock, and sleep for the specified delay */ |
@@ -426,31 +403,17 @@ static void do_event_scan_all_cpus(long delay) | |||
426 | static int rtasd(void *unused) | 403 | static int rtasd(void *unused) |
427 | { | 404 | { |
428 | unsigned int err_type; | 405 | unsigned int err_type; |
429 | int event_scan = rtas_token("event-scan"); | ||
430 | int rc; | 406 | int rc; |
431 | 407 | ||
432 | daemonize("rtasd"); | 408 | daemonize("rtasd"); |
433 | 409 | ||
434 | if (event_scan == RTAS_UNKNOWN_SERVICE || get_eventscan_parms() == -1) | ||
435 | goto error; | ||
436 | |||
437 | rtas_log_buf = vmalloc(rtas_error_log_buffer_max*LOG_NUMBER); | ||
438 | if (!rtas_log_buf) { | ||
439 | printk(KERN_ERR "rtasd: no memory\n"); | ||
440 | goto error; | ||
441 | } | ||
442 | |||
443 | printk(KERN_DEBUG "RTAS daemon started\n"); | 410 | printk(KERN_DEBUG "RTAS daemon started\n"); |
444 | |||
445 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); | 411 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); |
446 | 412 | ||
447 | /* See if we have any error stored in NVRAM */ | 413 | /* See if we have any error stored in NVRAM */ |
448 | memset(logdata, 0, rtas_error_log_max); | 414 | memset(logdata, 0, rtas_error_log_max); |
449 | 415 | rc = nvram_read_error_log(logdata, rtas_error_log_max, | |
450 | rc = nvram_read_error_log(logdata, rtas_error_log_max, &err_type); | 416 | &err_type, &error_log_cnt); |
451 | |||
452 | /* We can use rtas_log_buf now */ | ||
453 | no_logging = 0; | ||
454 | 417 | ||
455 | if (!rc) { | 418 | if (!rc) { |
456 | if (err_type != ERR_FLAG_ALREADY_LOGGED) { | 419 | if (err_type != ERR_FLAG_ALREADY_LOGGED) { |
@@ -473,8 +436,6 @@ static int rtasd(void *unused) | |||
473 | for (;;) | 436 | for (;;) |
474 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); | 437 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); |
475 | 438 | ||
476 | error: | ||
477 | /* Should delete proc entries */ | ||
478 | return -EINVAL; | 439 | return -EINVAL; |
479 | } | 440 | } |
480 | 441 | ||
@@ -486,11 +447,28 @@ static int __init rtas_init(void) | |||
486 | return 0; | 447 | return 0; |
487 | 448 | ||
488 | /* No RTAS */ | 449 | /* No RTAS */ |
489 | if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { | 450 | event_scan = rtas_token("event-scan"); |
451 | if (event_scan == RTAS_UNKNOWN_SERVICE) { | ||
490 | printk(KERN_DEBUG "rtasd: no event-scan on system\n"); | 452 | printk(KERN_DEBUG "rtasd: no event-scan on system\n"); |
491 | return -ENODEV; | 453 | return -ENODEV; |
492 | } | 454 | } |
493 | 455 | ||
456 | rtas_event_scan_rate = rtas_token("rtas-event-scan-rate"); | ||
457 | if (rtas_event_scan_rate == RTAS_UNKNOWN_SERVICE) { | ||
458 | printk(KERN_ERR "rtasd: no rtas-event-scan-rate on system\n"); | ||
459 | return -ENODEV; | ||
460 | } | ||
461 | |||
462 | /* Make room for the sequence number */ | ||
463 | rtas_error_log_max = rtas_get_error_log_max(); | ||
464 | rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); | ||
465 | |||
466 | rtas_log_buf = vmalloc(rtas_error_log_buffer_max*LOG_NUMBER); | ||
467 | if (!rtas_log_buf) { | ||
468 | printk(KERN_ERR "rtasd: no memory\n"); | ||
469 | return -ENOMEM; | ||
470 | } | ||
471 | |||
494 | entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); | 472 | entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); |
495 | if (entry) | 473 | if (entry) |
496 | entry->proc_fops = &proc_rtas_log_operations; | 474 | entry->proc_fops = &proc_rtas_log_operations; |
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c index 4f67b89ba1d0..e8e79f83d198 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/commproc.c | |||
@@ -45,10 +45,10 @@ | |||
45 | #define CPM_MAP_SIZE (0x4000) | 45 | #define CPM_MAP_SIZE (0x4000) |
46 | 46 | ||
47 | static void m8xx_cpm_dpinit(void); | 47 | static void m8xx_cpm_dpinit(void); |
48 | static uint host_buffer; /* One page of host buffer */ | 48 | static uint host_buffer; /* One page of host buffer */ |
49 | static uint host_end; /* end + 1 */ | 49 | static uint host_end; /* end + 1 */ |
50 | cpm8xx_t *cpmp; /* Pointer to comm processor space */ | 50 | cpm8xx_t *cpmp; /* Pointer to comm processor space */ |
51 | cpic8xx_t *cpic_reg; | 51 | cpic8xx_t *cpic_reg; |
52 | 52 | ||
53 | static struct device_node *cpm_pic_node; | 53 | static struct device_node *cpm_pic_node; |
54 | static struct irq_host *cpm_pic_host; | 54 | static struct irq_host *cpm_pic_host; |
@@ -115,7 +115,7 @@ static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, | |||
115 | * and return. This is a no-op function so we don't need any special | 115 | * and return. This is a no-op function so we don't need any special |
116 | * tests in the interrupt handler. | 116 | * tests in the interrupt handler. |
117 | */ | 117 | */ |
118 | static irqreturn_t cpm_error_interrupt(int irq, void *dev) | 118 | static irqreturn_t cpm_error_interrupt(int irq, void *dev) |
119 | { | 119 | { |
120 | return IRQ_HANDLED; | 120 | return IRQ_HANDLED; |
121 | } | 121 | } |
@@ -181,7 +181,7 @@ unsigned int cpm_pic_init(void) | |||
181 | printk(KERN_ERR "CPM PIC init: can not find cpm node\n"); | 181 | printk(KERN_ERR "CPM PIC init: can not find cpm node\n"); |
182 | goto end; | 182 | goto end; |
183 | } | 183 | } |
184 | eirq= irq_of_parse_and_map(np, 0); | 184 | eirq = irq_of_parse_and_map(np, 0); |
185 | if (eirq == NO_IRQ) | 185 | if (eirq == NO_IRQ) |
186 | goto end; | 186 | goto end; |
187 | 187 | ||
@@ -197,15 +197,15 @@ end: | |||
197 | 197 | ||
198 | void cpm_reset(void) | 198 | void cpm_reset(void) |
199 | { | 199 | { |
200 | cpm8xx_t *commproc; | 200 | cpm8xx_t *commproc; |
201 | sysconf8xx_t *siu_conf; | 201 | sysconf8xx_t *siu_conf; |
202 | 202 | ||
203 | commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); | 203 | commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); |
204 | 204 | ||
205 | #ifdef CONFIG_UCODE_PATCH | 205 | #ifdef CONFIG_UCODE_PATCH |
206 | /* Perform a reset. | 206 | /* Perform a reset. |
207 | */ | 207 | */ |
208 | out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG); | 208 | out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG); |
209 | 209 | ||
210 | /* Wait for it. | 210 | /* Wait for it. |
211 | */ | 211 | */ |
@@ -307,7 +307,7 @@ static rh_block_t cpm_boot_dpmem_rh_block[16]; | |||
307 | static rh_info_t cpm_dpmem_info; | 307 | static rh_info_t cpm_dpmem_info; |
308 | 308 | ||
309 | #define CPM_DPMEM_ALIGNMENT 8 | 309 | #define CPM_DPMEM_ALIGNMENT 8 |
310 | static u8* dpram_vbase; | 310 | static u8 *dpram_vbase; |
311 | static uint dpram_pbase; | 311 | static uint dpram_pbase; |
312 | 312 | ||
313 | void m8xx_cpm_dpinit(void) | 313 | void m8xx_cpm_dpinit(void) |
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c index 924412974795..dbe8d1802189 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2_common.c | |||
@@ -201,7 +201,7 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | if (mode == CPM_CLK_RX) | 203 | if (mode == CPM_CLK_RX) |
204 | shift +=3; | 204 | shift += 3; |
205 | 205 | ||
206 | for (i=0; i<24; i++) { | 206 | for (i=0; i<24; i++) { |
207 | if (clk_map[i][0] == target && clk_map[i][1] == clock) { | 207 | if (clk_map[i][0] == target && clk_map[i][1] == clock) { |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index a1d2042bb304..e0e24b01e3a6 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -204,7 +204,7 @@ static void dart_free(struct iommu_table *tbl, long index, long npages) | |||
204 | } | 204 | } |
205 | 205 | ||
206 | 206 | ||
207 | static int dart_init(struct device_node *dart_node) | 207 | static int __init dart_init(struct device_node *dart_node) |
208 | { | 208 | { |
209 | unsigned int i; | 209 | unsigned int i; |
210 | unsigned long tmp, base, size; | 210 | unsigned long tmp, base, size; |
@@ -313,7 +313,7 @@ static void pci_dma_bus_setup_dart(struct pci_bus *bus) | |||
313 | PCI_DN(dn)->iommu_table = &iommu_table_dart; | 313 | PCI_DN(dn)->iommu_table = &iommu_table_dart; |
314 | } | 314 | } |
315 | 315 | ||
316 | void iommu_init_early_dart(void) | 316 | void __init iommu_init_early_dart(void) |
317 | { | 317 | { |
318 | struct device_node *dn; | 318 | struct device_node *dn; |
319 | 319 | ||
diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c index 574b6ef44e0b..e82d54de8a8d 100644 --- a/arch/powerpc/sysdev/dcr.c +++ b/arch/powerpc/sysdev/dcr.c | |||
@@ -33,6 +33,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index) | |||
33 | 33 | ||
34 | return dr[index * 2]; | 34 | return dr[index * 2]; |
35 | } | 35 | } |
36 | EXPORT_SYMBOL_GPL(dcr_resource_start); | ||
36 | 37 | ||
37 | unsigned int dcr_resource_len(struct device_node *np, unsigned int index) | 38 | unsigned int dcr_resource_len(struct device_node *np, unsigned int index) |
38 | { | 39 | { |
@@ -44,6 +45,7 @@ unsigned int dcr_resource_len(struct device_node *np, unsigned int index) | |||
44 | 45 | ||
45 | return dr[index * 2 + 1]; | 46 | return dr[index * 2 + 1]; |
46 | } | 47 | } |
48 | EXPORT_SYMBOL_GPL(dcr_resource_len); | ||
47 | 49 | ||
48 | #ifndef CONFIG_PPC_DCR_NATIVE | 50 | #ifndef CONFIG_PPC_DCR_NATIVE |
49 | 51 | ||
@@ -122,6 +124,7 @@ dcr_host_t dcr_map(struct device_node *dev, unsigned int dcr_n, | |||
122 | ret.token -= dcr_n * ret.stride; | 124 | ret.token -= dcr_n * ret.stride; |
123 | return ret; | 125 | return ret; |
124 | } | 126 | } |
127 | EXPORT_SYMBOL_GPL(dcr_map); | ||
125 | 128 | ||
126 | void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c) | 129 | void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c) |
127 | { | 130 | { |
@@ -133,5 +136,6 @@ void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c) | |||
133 | iounmap(h.token); | 136 | iounmap(h.token); |
134 | h.token = NULL; | 137 | h.token = NULL; |
135 | } | 138 | } |
139 | EXPORT_SYMBOL_GPL(dcr_unmap); | ||
136 | 140 | ||
137 | #endif /* !defined(CONFIG_PPC_DCR_NATIVE) */ | 141 | #endif /* !defined(CONFIG_PPC_DCR_NATIVE) */ |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 1cf29c9d4408..f3abce11bead 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -321,21 +321,26 @@ static struct i2c_driver_device i2c_devices[] __initdata = { | |||
321 | {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, | 321 | {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info) | 324 | static int __init of_find_i2c_driver(struct device_node *node, |
325 | struct i2c_board_info *info) | ||
325 | { | 326 | { |
326 | int i; | 327 | int i; |
327 | 328 | ||
328 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { | 329 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { |
329 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) | 330 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) |
330 | continue; | 331 | continue; |
331 | strncpy(info->driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN); | 332 | if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver, |
332 | strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); | 333 | KOBJ_NAME_LEN) >= KOBJ_NAME_LEN || |
334 | strlcpy(info->type, i2c_devices[i].i2c_type, | ||
335 | I2C_NAME_SIZE) >= I2C_NAME_SIZE) | ||
336 | return -ENOMEM; | ||
333 | return 0; | 337 | return 0; |
334 | } | 338 | } |
335 | return -ENODEV; | 339 | return -ENODEV; |
336 | } | 340 | } |
337 | 341 | ||
338 | static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num) | 342 | static void __init of_register_i2c_devices(struct device_node *adap_node, |
343 | int bus_num) | ||
339 | { | 344 | { |
340 | struct device_node *node = NULL; | 345 | struct device_node *node = NULL; |
341 | 346 | ||
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index 5294560c7b00..b5d068204aa3 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -144,8 +144,8 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
144 | 144 | ||
145 | static struct pci_ops indirect_pci_ops = | 145 | static struct pci_ops indirect_pci_ops = |
146 | { | 146 | { |
147 | indirect_read_config, | 147 | .read = indirect_read_config, |
148 | indirect_write_config | 148 | .write = indirect_write_config, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | void __init | 151 | void __init |
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 90db8a720fed..cf0bfbd73401 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -193,8 +193,8 @@ void tsi108_clear_pci_cfg_error(void) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | static struct pci_ops tsi108_direct_pci_ops = { | 195 | static struct pci_ops tsi108_direct_pci_ops = { |
196 | tsi108_direct_read_config, | 196 | .read = tsi108_direct_read_config, |
197 | tsi108_direct_write_config | 197 | .write = tsi108_direct_write_config, |
198 | }; | 198 | }; |
199 | 199 | ||
200 | int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) | 200 | int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 89059895a20d..47180b3fca56 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/kernel_stat.h> | ||
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
29 | #include <asm/prom.h> | 30 | #include <asm/prom.h> |
@@ -142,7 +143,7 @@ static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
142 | 143 | ||
143 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | 144 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); |
144 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | 145 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; |
145 | if (trigger) | 146 | if (!trigger) |
146 | desc->status |= IRQ_LEVEL; | 147 | desc->status |= IRQ_LEVEL; |
147 | 148 | ||
148 | spin_unlock_irqrestore(&uic->lock, flags); | 149 | spin_unlock_irqrestore(&uic->lock, flags); |
@@ -159,6 +160,64 @@ static struct irq_chip uic_irq_chip = { | |||
159 | .set_type = uic_set_irq_type, | 160 | .set_type = uic_set_irq_type, |
160 | }; | 161 | }; |
161 | 162 | ||
163 | /** | ||
164 | * handle_uic_irq - irq flow handler for UIC | ||
165 | * @irq: the interrupt number | ||
166 | * @desc: the interrupt description structure for this irq | ||
167 | * | ||
168 | * This is modified version of the generic handle_level_irq() suitable | ||
169 | * for the UIC. On the UIC, acking (i.e. clearing the SR bit) a level | ||
170 | * irq will have no effect if the interrupt is still asserted by the | ||
171 | * device, even if the interrupt is already masked. Therefore, unlike | ||
172 | * the standard handle_level_irq(), we must ack the interrupt *after* | ||
173 | * invoking the ISR (which should have de-asserted the interrupt in | ||
174 | * the external source). For edge interrupts we ack at the beginning | ||
175 | * instead of the end, to keep the window in which we can miss an | ||
176 | * interrupt as small as possible. | ||
177 | */ | ||
178 | void fastcall handle_uic_irq(unsigned int irq, struct irq_desc *desc) | ||
179 | { | ||
180 | unsigned int cpu = smp_processor_id(); | ||
181 | struct irqaction *action; | ||
182 | irqreturn_t action_ret; | ||
183 | |||
184 | spin_lock(&desc->lock); | ||
185 | if (desc->status & IRQ_LEVEL) | ||
186 | desc->chip->mask(irq); | ||
187 | else | ||
188 | desc->chip->mask_ack(irq); | ||
189 | |||
190 | if (unlikely(desc->status & IRQ_INPROGRESS)) | ||
191 | goto out_unlock; | ||
192 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); | ||
193 | kstat_cpu(cpu).irqs[irq]++; | ||
194 | |||
195 | /* | ||
196 | * If its disabled or no action available | ||
197 | * keep it masked and get out of here | ||
198 | */ | ||
199 | action = desc->action; | ||
200 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { | ||
201 | desc->status |= IRQ_PENDING; | ||
202 | goto out_unlock; | ||
203 | } | ||
204 | |||
205 | desc->status |= IRQ_INPROGRESS; | ||
206 | desc->status &= ~IRQ_PENDING; | ||
207 | spin_unlock(&desc->lock); | ||
208 | |||
209 | action_ret = handle_IRQ_event(irq, action); | ||
210 | |||
211 | spin_lock(&desc->lock); | ||
212 | desc->status &= ~IRQ_INPROGRESS; | ||
213 | if (desc->status & IRQ_LEVEL) | ||
214 | desc->chip->ack(irq); | ||
215 | if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) | ||
216 | desc->chip->unmask(irq); | ||
217 | out_unlock: | ||
218 | spin_unlock(&desc->lock); | ||
219 | } | ||
220 | |||
162 | static int uic_host_match(struct irq_host *h, struct device_node *node) | 221 | static int uic_host_match(struct irq_host *h, struct device_node *node) |
163 | { | 222 | { |
164 | struct uic *uic = h->host_data; | 223 | struct uic *uic = h->host_data; |
@@ -173,7 +232,7 @@ static int uic_host_map(struct irq_host *h, unsigned int virq, | |||
173 | set_irq_chip_data(virq, uic); | 232 | set_irq_chip_data(virq, uic); |
174 | /* Despite the name, handle_level_irq() works for both level | 233 | /* Despite the name, handle_level_irq() works for both level |
175 | * and edge irqs on UIC. FIXME: check this is correct */ | 234 | * and edge irqs on UIC. FIXME: check this is correct */ |
176 | set_irq_chip_and_handler(virq, &uic_irq_chip, handle_level_irq); | 235 | set_irq_chip_and_handler(virq, &uic_irq_chip, handle_uic_irq); |
177 | 236 | ||
178 | /* Set default irq type */ | 237 | /* Set default irq type */ |
179 | set_irq_type(virq, IRQ_TYPE_NONE); | 238 | set_irq_type(virq, IRQ_TYPE_NONE); |
@@ -207,6 +266,9 @@ irqreturn_t uic_cascade(int virq, void *data) | |||
207 | int subvirq; | 266 | int subvirq; |
208 | 267 | ||
209 | msr = mfdcr(uic->dcrbase + UIC_MSR); | 268 | msr = mfdcr(uic->dcrbase + UIC_MSR); |
269 | if (!msr) /* spurious interrupt */ | ||
270 | return IRQ_HANDLED; | ||
271 | |||
210 | src = 32 - ffs(msr); | 272 | src = 32 - ffs(msr); |
211 | 273 | ||
212 | subvirq = irq_linear_revmap(uic->irqhost, src); | 274 | subvirq = irq_linear_revmap(uic->irqhost, src); |
diff --git a/arch/ppc/.gitignore b/arch/ppc/.gitignore index a1a869c8c840..1e79a0ae4473 100644 --- a/arch/ppc/.gitignore +++ b/arch/ppc/.gitignore | |||
@@ -1 +1 @@ | |||
include | /include | ||