aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/Kconfig3
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts36
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts36
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts82
-rw-r--r--arch/powerpc/configs/mpc8560_ads_defconfig23
-rw-r--r--arch/powerpc/kernel/head_32.S18
-rw-r--r--arch/powerpc/kernel/head_40x.S6
-rw-r--r--arch/powerpc/kernel/head_44x.S6
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S11
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/85xx/mpc8540_ads.h35
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c168
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.h60
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c10
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.h43
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c1
-rw-r--r--include/asm-powerpc/cpm2.h4
-rw-r--r--include/asm-powerpc/fs_pd.h2
-rw-r--r--include/asm-powerpc/mpc85xx.h45
21 files changed, 259 insertions, 334 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 31804575dd5e..037664d496d7 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -599,7 +599,8 @@ config TASK_SIZE_BOOL
599 599
600config TASK_SIZE 600config TASK_SIZE
601 hex "Size of user task space" if TASK_SIZE_BOOL 601 hex "Size of user task space" if TASK_SIZE_BOOL
602 default "0x80000000" 602 default "0x80000000" if PPC_PREP || PPC_8xx
603 default "0xc0000000"
603 604
604config CONSISTENT_START_BOOL 605config CONSISTENT_START_BOOL
605 bool "Set custom consistent memory pool address" 606 bool "Set custom consistent memory pool address"
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 188179df0845..7285ca1325fd 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -121,7 +121,7 @@
121 #address-cells = <1>; 121 #address-cells = <1>;
122 #size-cells = <1>; 122 #size-cells = <1>;
123 compatible = "fsl,mpc8272-cpm", "fsl,cpm2"; 123 compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
124 reg = <119c0 30 0 2000>; 124 reg = <119c0 30>;
125 ranges; 125 ranges;
126 126
127 muram@0 { 127 muram@0 {
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 6633e07d9f4d..f3f4d79deb63 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -145,6 +145,42 @@
145 device_type = "open-pic"; 145 device_type = "open-pic";
146 big-endian; 146 big-endian;
147 }; 147 };
148
149 cpm@919c0 {
150 #address-cells = <1>;
151 #size-cells = <1>;
152 compatible = "fsl,mpc8541-cpm", "fsl,cpm2";
153 reg = <919c0 30>;
154 ranges;
155
156 muram@80000 {
157 #address-cells = <1>;
158 #size-cells = <1>;
159 ranges = <0 80000 10000>;
160
161 data@0 {
162 compatible = "fsl,cpm-muram-data";
163 reg = <0 2000 9000 1000>;
164 };
165 };
166
167 brg@919f0 {
168 compatible = "fsl,mpc8541-brg",
169 "fsl,cpm2-brg",
170 "fsl,cpm-brg";
171 reg = <919f0 10 915f0 10>;
172 };
173
174 cpmpic: pic@90c00 {
175 interrupt-controller;
176 #address-cells = <0>;
177 #interrupt-cells = <2>;
178 interrupts = <2e 2>;
179 interrupt-parent = <&mpic>;
180 reg = <90c00 80>;
181 compatible = "fsl,mpc8541-cpm-pic", "fsl,cpm2-pic";
182 };
183 };
148 }; 184 };
149 185
150 pci1: pci@e0008000 { 186 pci1: pci@e0008000 {
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 99199295147e..57029cca32b2 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -145,6 +145,42 @@
145 device_type = "open-pic"; 145 device_type = "open-pic";
146 big-endian; 146 big-endian;
147 }; 147 };
148
149 cpm@919c0 {
150 #address-cells = <1>;
151 #size-cells = <1>;
152 compatible = "fsl,mpc8555-cpm", "fsl,cpm2";
153 reg = <919c0 30>;
154 ranges;
155
156 muram@80000 {
157 #address-cells = <1>;
158 #size-cells = <1>;
159 ranges = <0 80000 10000>;
160
161 data@0 {
162 compatible = "fsl,cpm-muram-data";
163 reg = <0 2000 9000 1000>;
164 };
165 };
166
167 brg@919f0 {
168 compatible = "fsl,mpc8555-brg",
169 "fsl,cpm2-brg",
170 "fsl,cpm-brg";
171 reg = <919f0 10 915f0 10>;
172 };
173
174 cpmpic: pic@90c00 {
175 interrupt-controller;
176 #address-cells = <0>;
177 #interrupt-cells = <2>;
178 interrupts = <2e 2>;
179 interrupt-parent = <&mpic>;
180 reg = <90c00 80>;
181 compatible = "fsl,mpc8555-cpm-pic", "fsl,cpm2-pic";
182 };
183 };
148 }; 184 };
149 185
150 pci1: pci@e0008000 { 186 pci1: pci@e0008000 {
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 5577ec1f312b..6b362f8222c1 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -138,15 +138,31 @@
138 device_type = "open-pic"; 138 device_type = "open-pic";
139 }; 139 };
140 140
141 cpm@e0000000 { 141 cpm@919c0 {
142 #address-cells = <1>; 142 #address-cells = <1>;
143 #size-cells = <1>; 143 #size-cells = <1>;
144 device_type = "cpm"; 144 compatible = "fsl,mpc8560-cpm", "fsl,cpm2";
145 model = "CPM2"; 145 reg = <919c0 30>;
146 ranges = <0 0 c0000>; 146 ranges;
147 reg = <80000 40000>; 147
148 command-proc = <919c0>; 148 muram@80000 {
149 brg-frequency = <9d5b340>; 149 #address-cells = <1>;
150 #size-cells = <1>;
151 ranges = <0 80000 10000>;
152
153 data@0 {
154 compatible = "fsl,cpm-muram-data";
155 reg = <0 4000 9000 2000>;
156 };
157 };
158
159 brg@919f0 {
160 compatible = "fsl,mpc8560-brg",
161 "fsl,cpm2-brg",
162 "fsl,cpm-brg";
163 reg = <919f0 10 915f0 10>;
164 clock-frequency = <d#165000000>;
165 };
150 166
151 cpmpic: pic@90c00 { 167 cpmpic: pic@90c00 {
152 interrupt-controller; 168 interrupt-controller;
@@ -155,43 +171,38 @@
155 interrupts = <2e 2>; 171 interrupts = <2e 2>;
156 interrupt-parent = <&mpic>; 172 interrupt-parent = <&mpic>;
157 reg = <90c00 80>; 173 reg = <90c00 80>;
158 device_type = "cpm-pic"; 174 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
159 }; 175 };
160 176
161 scc@91a00 { 177 serial@91a00 {
162 device_type = "serial"; 178 device_type = "serial";
163 compatible = "cpm_uart"; 179 compatible = "fsl,mpc8560-scc-uart",
164 model = "SCC"; 180 "fsl,cpm2-scc-uart";
165 device-id = <1>;
166 reg = <91a00 20 88000 100>; 181 reg = <91a00 20 88000 100>;
167 clock-setup = <00ffffff 0>; 182 fsl,cpm-brg = <1>;
168 rx-clock = <1>; 183 fsl,cpm-command = <00800000>;
169 tx-clock = <1>;
170 current-speed = <1c200>; 184 current-speed = <1c200>;
171 interrupts = <28 8>; 185 interrupts = <28 8>;
172 interrupt-parent = <&cpmpic>; 186 interrupt-parent = <&cpmpic>;
173 }; 187 };
174 188
175 scc@91a20 { 189 serial@91a20 {
176 device_type = "serial"; 190 device_type = "serial";
177 compatible = "cpm_uart"; 191 compatible = "fsl,mpc8560-scc-uart",
178 model = "SCC"; 192 "fsl,cpm2-scc-uart";
179 device-id = <2>;
180 reg = <91a20 20 88100 100>; 193 reg = <91a20 20 88100 100>;
181 clock-setup = <ff00ffff 90000>; 194 fsl,cpm-brg = <2>;
182 rx-clock = <2>; 195 fsl,cpm-command = <04a00000>;
183 tx-clock = <2>;
184 current-speed = <1c200>; 196 current-speed = <1c200>;
185 interrupts = <29 8>; 197 interrupts = <29 8>;
186 interrupt-parent = <&cpmpic>; 198 interrupt-parent = <&cpmpic>;
187 }; 199 };
188 200
189 fcc@91320 { 201 ethernet@91320 {
190 device_type = "network"; 202 device_type = "network";
191 compatible = "fs_enet"; 203 compatible = "fsl,mpc8560-fcc-enet",
192 model = "FCC"; 204 "fsl,cpm2-fcc-enet";
193 device-id = <2>; 205 reg = <91320 20 88500 100 913b0 1>;
194 reg = <91320 20 88500 100 913a0 30>;
195 /* 206 /*
196 * mac-address is deprecated and will be removed 207 * mac-address is deprecated and will be removed
197 * in 2.6.25. Only recent versions of 208 * in 2.6.25. Only recent versions of
@@ -199,20 +210,17 @@
199 */ 210 */
200 mac-address = [ 00 00 00 00 00 00 ]; 211 mac-address = [ 00 00 00 00 00 00 ];
201 local-mac-address = [ 00 00 00 00 00 00 ]; 212 local-mac-address = [ 00 00 00 00 00 00 ];
202 clock-setup = <ff00ffff 250000>; 213 fsl,cpm-command = <16200300>;
203 rx-clock = <15>;
204 tx-clock = <16>;
205 interrupts = <21 8>; 214 interrupts = <21 8>;
206 interrupt-parent = <&cpmpic>; 215 interrupt-parent = <&cpmpic>;
207 phy-handle = <&phy2>; 216 phy-handle = <&phy2>;
208 }; 217 };
209 218
210 fcc@91340 { 219 ethernet@91340 {
211 device_type = "network"; 220 device_type = "network";
212 compatible = "fs_enet"; 221 compatible = "fsl,mpc8560-fcc-enet",
213 model = "FCC"; 222 "fsl,cpm2-fcc-enet";
214 device-id = <3>; 223 reg = <91340 20 88600 100 913d0 1>;
215 reg = <91340 20 88600 100 913d0 30>;
216 /* 224 /*
217 * mac-address is deprecated and will be removed 225 * mac-address is deprecated and will be removed
218 * in 2.6.25. Only recent versions of 226 * in 2.6.25. Only recent versions of
@@ -220,9 +228,7 @@
220 */ 228 */
221 mac-address = [ 00 00 00 00 00 00 ]; 229 mac-address = [ 00 00 00 00 00 00 ];
222 local-mac-address = [ 00 00 00 00 00 00 ]; 230 local-mac-address = [ 00 00 00 00 00 00 ];
223 clock-setup = <ffff00ff 3700>; 231 fsl,cpm-command = <1a400300>;
224 rx-clock = <17>;
225 tx-clock = <18>;
226 interrupts = <22 8>; 232 interrupts = <22 8>;
227 interrupt-parent = <&cpmpic>; 233 interrupt-parent = <&cpmpic>;
228 phy-handle = <&phy3>; 234 phy-handle = <&phy3>;
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/mpc8560_ads_defconfig
index 0fb54c775cf9..3d68c65212cf 100644
--- a/arch/powerpc/configs/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/mpc8560_ads_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc4 3# Linux kernel version: 2.6.23-rc9
4# Tue Aug 28 21:24:43 2007 4# Thu Oct 11 09:16:32 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -22,8 +22,13 @@ CONFIG_FSL_BOOKE=y
22CONFIG_SPE=y 22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y 24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y 26CONFIG_PPC_MERGE=y
26CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
27CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
28CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
29CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -86,7 +91,6 @@ CONFIG_FUTEX=y
86CONFIG_ANON_INODES=y 91CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 92CONFIG_EPOLL=y
88CONFIG_SIGNALFD=y 93CONFIG_SIGNALFD=y
89CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 94CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 95CONFIG_SHMEM=y
92CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
@@ -128,7 +132,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
128CONFIG_MPC8560_ADS=y 132CONFIG_MPC8560_ADS=y
129# CONFIG_MPC85xx_CDS is not set 133# CONFIG_MPC85xx_CDS is not set
130# CONFIG_MPC85xx_MDS is not set 134# CONFIG_MPC85xx_MDS is not set
131# CONFIG_MPC8544_DS is not set 135# CONFIG_MPC85xx_DS is not set
132CONFIG_MPC8560=y 136CONFIG_MPC8560=y
133CONFIG_MPC85xx=y 137CONFIG_MPC85xx=y
134CONFIG_MPIC=y 138CONFIG_MPIC=y
@@ -142,12 +146,17 @@ CONFIG_MPIC=y
142# CONFIG_GENERIC_IOMAP is not set 146# CONFIG_GENERIC_IOMAP is not set
143# CONFIG_CPU_FREQ is not set 147# CONFIG_CPU_FREQ is not set
144CONFIG_CPM2=y 148CONFIG_CPM2=y
149CONFIG_PPC_CPM_NEW_BINDING=y
145# CONFIG_FSL_ULI1575 is not set 150# CONFIG_FSL_ULI1575 is not set
151CONFIG_CPM=y
146 152
147# 153#
148# Kernel options 154# Kernel options
149# 155#
150# CONFIG_HIGHMEM is not set 156# CONFIG_HIGHMEM is not set
157# CONFIG_TICK_ONESHOT is not set
158# CONFIG_NO_HZ is not set
159# CONFIG_HIGH_RES_TIMERS is not set
151# CONFIG_HZ_100 is not set 160# CONFIG_HZ_100 is not set
152CONFIG_HZ_250=y 161CONFIG_HZ_250=y
153# CONFIG_HZ_300 is not set 162# CONFIG_HZ_300 is not set
@@ -158,7 +167,7 @@ CONFIG_PREEMPT_NONE=y
158# CONFIG_PREEMPT is not set 167# CONFIG_PREEMPT is not set
159CONFIG_BINFMT_ELF=y 168CONFIG_BINFMT_ELF=y
160CONFIG_BINFMT_MISC=y 169CONFIG_BINFMT_MISC=y
161# CONFIG_MATH_EMULATION is not set 170CONFIG_MATH_EMULATION=y
162CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 171CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
163CONFIG_ARCH_FLATMEM_ENABLE=y 172CONFIG_ARCH_FLATMEM_ENABLE=y
164CONFIG_ARCH_POPULATES_NODE_MAP=y 173CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -177,6 +186,8 @@ CONFIG_VIRT_TO_BUS=y
177# CONFIG_PROC_DEVICETREE is not set 186# CONFIG_PROC_DEVICETREE is not set
178# CONFIG_CMDLINE_BOOL is not set 187# CONFIG_CMDLINE_BOOL is not set
179# CONFIG_PM is not set 188# CONFIG_PM is not set
189CONFIG_SUSPEND_UP_POSSIBLE=y
190CONFIG_HIBERNATION_UP_POSSIBLE=y
180# CONFIG_SECCOMP is not set 191# CONFIG_SECCOMP is not set
181CONFIG_WANT_DEVICE_TREE=y 192CONFIG_WANT_DEVICE_TREE=y
182CONFIG_DEVICE_TREE="" 193CONFIG_DEVICE_TREE=""
@@ -415,6 +426,7 @@ CONFIG_E1000_NAPI=y
415# CONFIG_SIS190 is not set 426# CONFIG_SIS190 is not set
416# CONFIG_SKGE is not set 427# CONFIG_SKGE is not set
417# CONFIG_SKY2 is not set 428# CONFIG_SKY2 is not set
429# CONFIG_SK98LIN is not set
418# CONFIG_VIA_VELOCITY is not set 430# CONFIG_VIA_VELOCITY is not set
419# CONFIG_TIGON3 is not set 431# CONFIG_TIGON3 is not set
420# CONFIG_BNX2 is not set 432# CONFIG_BNX2 is not set
@@ -807,3 +819,4 @@ CONFIG_FORCED_INLINING=y
807# CONFIG_KEYS is not set 819# CONFIG_KEYS is not set
808# CONFIG_SECURITY is not set 820# CONFIG_SECURITY is not set
809# CONFIG_CRYPTO is not set 821# CONFIG_CRYPTO is not set
822# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index d83f04e5a599..a5b13ae7fd20 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -469,12 +469,12 @@ InstructionTLBMiss:
469 mfctr r0 469 mfctr r0
470 /* Get PTE (linux-style) and check access */ 470 /* Get PTE (linux-style) and check access */
471 mfspr r3,SPRN_IMISS 471 mfspr r3,SPRN_IMISS
472 lis r1,KERNELBASE@h /* check if kernel address */ 472 lis r1,PAGE_OFFSET@h /* check if kernel address */
473 cmplw 0,r3,r1 473 cmplw 0,r1,r3
474 mfspr r2,SPRN_SPRG3 474 mfspr r2,SPRN_SPRG3
475 li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ 475 li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */
476 lwz r2,PGDIR(r2) 476 lwz r2,PGDIR(r2)
477 blt+ 112f 477 bge- 112f
478 mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ 478 mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */
479 rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ 479 rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */
480 lis r2,swapper_pg_dir@ha /* if kernel address, use */ 480 lis r2,swapper_pg_dir@ha /* if kernel address, use */
@@ -543,12 +543,12 @@ DataLoadTLBMiss:
543 mfctr r0 543 mfctr r0
544 /* Get PTE (linux-style) and check access */ 544 /* Get PTE (linux-style) and check access */
545 mfspr r3,SPRN_DMISS 545 mfspr r3,SPRN_DMISS
546 lis r1,KERNELBASE@h /* check if kernel address */ 546 lis r1,PAGE_OFFSET@h /* check if kernel address */
547 cmplw 0,r3,r1 547 cmplw 0,r1,r3
548 mfspr r2,SPRN_SPRG3 548 mfspr r2,SPRN_SPRG3
549 li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ 549 li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */
550 lwz r2,PGDIR(r2) 550 lwz r2,PGDIR(r2)
551 blt+ 112f 551 bge- 112f
552 mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ 552 mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */
553 rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ 553 rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */
554 lis r2,swapper_pg_dir@ha /* if kernel address, use */ 554 lis r2,swapper_pg_dir@ha /* if kernel address, use */
@@ -615,12 +615,12 @@ DataStoreTLBMiss:
615 mfctr r0 615 mfctr r0
616 /* Get PTE (linux-style) and check access */ 616 /* Get PTE (linux-style) and check access */
617 mfspr r3,SPRN_DMISS 617 mfspr r3,SPRN_DMISS
618 lis r1,KERNELBASE@h /* check if kernel address */ 618 lis r1,PAGE_OFFSET@h /* check if kernel address */
619 cmplw 0,r3,r1 619 cmplw 0,r1,r3
620 mfspr r2,SPRN_SPRG3 620 mfspr r2,SPRN_SPRG3
621 li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */ 621 li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */
622 lwz r2,PGDIR(r2) 622 lwz r2,PGDIR(r2)
623 blt+ 112f 623 bge- 112f
624 mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ 624 mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */
625 rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ 625 rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */
626 lis r2,swapper_pg_dir@ha /* if kernel address, use */ 626 lis r2,swapper_pg_dir@ha /* if kernel address, use */
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
index e312824bdd98..cfefc2df8f2a 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -289,7 +289,7 @@ label:
289 /* If we are faulting a kernel address, we have to use the 289 /* If we are faulting a kernel address, we have to use the
290 * kernel page tables. 290 * kernel page tables.
291 */ 291 */
292 lis r11, TASK_SIZE@h 292 lis r11, PAGE_OFFSET@h
293 cmplw r10, r11 293 cmplw r10, r11
294 blt+ 3f 294 blt+ 3f
295 lis r11, swapper_pg_dir@h 295 lis r11, swapper_pg_dir@h
@@ -481,7 +481,7 @@ label:
481 /* If we are faulting a kernel address, we have to use the 481 /* If we are faulting a kernel address, we have to use the
482 * kernel page tables. 482 * kernel page tables.
483 */ 483 */
484 lis r11, TASK_SIZE@h 484 lis r11, PAGE_OFFSET@h
485 cmplw r10, r11 485 cmplw r10, r11
486 blt+ 3f 486 blt+ 3f
487 lis r11, swapper_pg_dir@h 487 lis r11, swapper_pg_dir@h
@@ -581,7 +581,7 @@ label:
581 /* If we are faulting a kernel address, we have to use the 581 /* If we are faulting a kernel address, we have to use the
582 * kernel page tables. 582 * kernel page tables.
583 */ 583 */
584 lis r11, TASK_SIZE@h 584 lis r11, PAGE_OFFSET@h
585 cmplw r10, r11 585 cmplw r10, r11
586 blt+ 3f 586 blt+ 3f
587 lis r11, swapper_pg_dir@h 587 lis r11, swapper_pg_dir@h
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 864d63fbb204..409db6123924 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -319,7 +319,7 @@ interrupt_base:
319 /* If we are faulting a kernel address, we have to use the 319 /* If we are faulting a kernel address, we have to use the
320 * kernel page tables. 320 * kernel page tables.
321 */ 321 */
322 lis r11, TASK_SIZE@h 322 lis r11, PAGE_OFFSET@h
323 cmplw r10, r11 323 cmplw r10, r11
324 blt+ 3f 324 blt+ 3f
325 lis r11, swapper_pg_dir@h 325 lis r11, swapper_pg_dir@h
@@ -458,7 +458,7 @@ interrupt_base:
458 /* If we are faulting a kernel address, we have to use the 458 /* If we are faulting a kernel address, we have to use the
459 * kernel page tables. 459 * kernel page tables.
460 */ 460 */
461 lis r11, TASK_SIZE@h 461 lis r11, PAGE_OFFSET@h
462 cmplw r10, r11 462 cmplw r10, r11
463 blt+ 3f 463 blt+ 3f
464 lis r11, swapper_pg_dir@h 464 lis r11, swapper_pg_dir@h
@@ -528,7 +528,7 @@ interrupt_base:
528 /* If we are faulting a kernel address, we have to use the 528 /* If we are faulting a kernel address, we have to use the
529 * kernel page tables. 529 * kernel page tables.
530 */ 530 */
531 lis r11, TASK_SIZE@h 531 lis r11, PAGE_OFFSET@h
532 cmplw r10, r11 532 cmplw r10, r11
533 blt+ 3f 533 blt+ 3f
534 lis r11, swapper_pg_dir@h 534 lis r11, swapper_pg_dir@h
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index ee33ddd97ef3..4b9822728aea 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -461,8 +461,7 @@ interrupt_base:
461 /* If we are faulting a kernel address, we have to use the 461 /* If we are faulting a kernel address, we have to use the
462 * kernel page tables. 462 * kernel page tables.
463 */ 463 */
464 lis r11, TASK_SIZE@h 464 lis r11, PAGE_OFFSET@h
465 ori r11, r11, TASK_SIZE@l
466 cmplw 0, r10, r11 465 cmplw 0, r10, r11
467 bge 2f 466 bge 2f
468 467
@@ -584,8 +583,7 @@ interrupt_base:
584 /* If we are faulting a kernel address, we have to use the 583 /* If we are faulting a kernel address, we have to use the
585 * kernel page tables. 584 * kernel page tables.
586 */ 585 */
587 lis r11, TASK_SIZE@h 586 lis r11, PAGE_OFFSET@h
588 ori r11, r11, TASK_SIZE@l
589 cmplw 5, r10, r11 587 cmplw 5, r10, r11
590 blt 5, 3f 588 blt 5, 3f
591 lis r11, swapper_pg_dir@h 589 lis r11, swapper_pg_dir@h
@@ -645,8 +643,7 @@ interrupt_base:
645 /* If we are faulting a kernel address, we have to use the 643 /* If we are faulting a kernel address, we have to use the
646 * kernel page tables. 644 * kernel page tables.
647 */ 645 */
648 lis r11, TASK_SIZE@h 646 lis r11, PAGE_OFFSET@h
649 ori r11, r11, TASK_SIZE@l
650 cmplw 5, r10, r11 647 cmplw 5, r10, r11
651 blt 5, 3f 648 blt 5, 3f
652 lis r11, swapper_pg_dir@h 649 lis r11, swapper_pg_dir@h
@@ -744,7 +741,7 @@ data_access:
744 * r10 - EA of fault 741 * r10 - EA of fault
745 * r11 - TLB (info from Linux PTE) 742 * r11 - TLB (info from Linux PTE)
746 * r12, r13 - available to use 743 * r12, r13 - available to use
747 * CR5 - results of addr < TASK_SIZE 744 * CR5 - results of addr >= PAGE_OFFSET
748 * MAS0, MAS1 - loaded with proper value when we get here 745 * MAS0, MAS1 - loaded with proper value when we get here
749 * MAS2, MAS3 - will need additional info from Linux PTE 746 * MAS2, MAS3 - will need additional info from Linux PTE
750 * Upon exit, we reload everything and RFI. 747 * Upon exit, we reload everything and RFI.
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index cf815b22b9fb..7748a3a426db 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -12,6 +12,7 @@ config MPC8540_ADS
12config MPC8560_ADS 12config MPC8560_ADS
13 bool "Freescale MPC8560 ADS" 13 bool "Freescale MPC8560 ADS"
14 select DEFAULT_UIMAGE 14 select DEFAULT_UIMAGE
15 select PPC_CPM_NEW_BINDING
15 help 16 help
16 This option enables support for the MPC 8560 ADS board 17 This option enables support for the MPC 8560 ADS board
17 18
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h
deleted file mode 100644
index da82f4c0fdac..000000000000
--- a/arch/powerpc/platforms/85xx/mpc8540_ads.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * arch/powerpc/platforms/85xx/mpc8540_ads.h
3 *
4 * MPC8540ADS board definitions
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2004 Freescale Semiconductor Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17#ifndef __MACH_MPC8540ADS_H__
18#define __MACH_MPC8540ADS_H__
19
20#include <linux/initrd.h>
21
22#define BOARD_CCSRBAR ((uint)0xe0000000)
23#define BCSR_ADDR ((uint)0xf8000000)
24#define BCSR_SIZE ((uint)(32 * 1024))
25
26/* PCI interrupt controller */
27#define PIRQA MPC85xx_IRQ_EXT1
28#define PIRQB MPC85xx_IRQ_EXT2
29#define PIRQC MPC85xx_IRQ_EXT3
30#define PIRQD MPC85xx_IRQ_EXT4
31
32/* Offset of CPM register space */
33#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
34
35#endif /* __MACH_MPC8540ADS_H__ */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 378a244b3bac..bccdc25f83a2 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -17,13 +17,12 @@
17#include <linux/kdev_t.h> 17#include <linux/kdev_t.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/seq_file.h> 19#include <linux/seq_file.h>
20#include <linux/of_platform.h>
20 21
21#include <asm/system.h> 22#include <asm/system.h>
22#include <asm/time.h> 23#include <asm/time.h>
23#include <asm/machdep.h> 24#include <asm/machdep.h>
24#include <asm/pci-bridge.h> 25#include <asm/pci-bridge.h>
25#include <asm/mpc85xx.h>
26#include <asm/prom.h>
27#include <asm/mpic.h> 26#include <asm/mpic.h>
28#include <mm/mmu_decl.h> 27#include <mm/mmu_decl.h>
29#include <asm/udbg.h> 28#include <asm/udbg.h>
@@ -32,10 +31,8 @@
32#include <sysdev/fsl_pci.h> 31#include <sysdev/fsl_pci.h>
33 32
34#ifdef CONFIG_CPM2 33#ifdef CONFIG_CPM2
35#include <linux/fs_enet_pd.h>
36#include <asm/cpm2.h> 34#include <asm/cpm2.h>
37#include <sysdev/cpm2_pic.h> 35#include <sysdev/cpm2_pic.h>
38#include <asm/fs_pd.h>
39#endif 36#endif
40 37
41#ifdef CONFIG_PCI 38#ifdef CONFIG_PCI
@@ -95,10 +92,10 @@ static void __init mpc85xx_ads_pic_init(void)
95 92
96#ifdef CONFIG_CPM2 93#ifdef CONFIG_CPM2
97 /* Setup CPM2 PIC */ 94 /* Setup CPM2 PIC */
98 np = of_find_node_by_type(NULL, "cpm-pic"); 95 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
99 if (np == NULL) { 96 if (np == NULL) {
100 printk(KERN_ERR "PIC init: can not find cpm-pic node\n"); 97 printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
101 return; 98 return;
102 } 99 }
103 irq = irq_of_parse_and_map(np, 0); 100 irq = irq_of_parse_and_map(np, 0);
104 101
@@ -111,81 +108,75 @@ static void __init mpc85xx_ads_pic_init(void)
111 * Setup the architecture 108 * Setup the architecture
112 */ 109 */
113#ifdef CONFIG_CPM2 110#ifdef CONFIG_CPM2
114void init_fcc_ioports(struct fs_platform_info *fpi) 111struct cpm_pin {
112 int port, pin, flags;
113};
114
115static struct cpm_pin mpc8560_ads_pins[] = {
116 /* SCC1 */
117 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
118 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
119 {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
120
121 /* SCC2 */
122 {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
123 {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
124 {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
125
126 /* FCC2 */
127 {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
128 {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
129 {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
130 {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
131 {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
132 {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
133 {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
134 {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
135 {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
136 {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
137 {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
138 {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
139 {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
140 {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
141 {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK14 */
142 {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK13 */
143
144 /* FCC3 */
145 {1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
146 {1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
147 {1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
148 {1, 7, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
149 {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
150 {1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
151 {1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
152 {1, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
153 {1, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
154 {1, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
155 {1, 14, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
156 {1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
157 {1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
158 {1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
159 {2, 16, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK16 */
160 {2, 17, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK15 */
161};
162
163static void __init init_ioports(void)
115{ 164{
116 struct io_port *io = cpm2_map(im_ioport); 165 int i;
117 int fcc_no = fs_get_fcc_index(fpi->fs_no); 166
118 int target; 167 for (i = 0; i < ARRAY_SIZE(mpc8560_ads_pins); i++) {
119 u32 tempval; 168 struct cpm_pin *pin = &mpc8560_ads_pins[i];
120 169 cpm2_set_pin(pin->port, pin->pin, pin->flags);
121 switch(fcc_no) {
122 case 1:
123 tempval = in_be32(&io->iop_pdirb);
124 tempval &= ~PB2_DIRB0;
125 tempval |= PB2_DIRB1;
126 out_be32(&io->iop_pdirb, tempval);
127
128 tempval = in_be32(&io->iop_psorb);
129 tempval &= ~PB2_PSORB0;
130 tempval |= PB2_PSORB1;
131 out_be32(&io->iop_psorb, tempval);
132
133 tempval = in_be32(&io->iop_pparb);
134 tempval |= (PB2_DIRB0 | PB2_DIRB1);
135 out_be32(&io->iop_pparb, tempval);
136
137 target = CPM_CLK_FCC2;
138 break;
139 case 2:
140 tempval = in_be32(&io->iop_pdirb);
141 tempval &= ~PB3_DIRB0;
142 tempval |= PB3_DIRB1;
143 out_be32(&io->iop_pdirb, tempval);
144
145 tempval = in_be32(&io->iop_psorb);
146 tempval &= ~PB3_PSORB0;
147 tempval |= PB3_PSORB1;
148 out_be32(&io->iop_psorb, tempval);
149
150 tempval = in_be32(&io->iop_pparb);
151 tempval |= (PB3_DIRB0 | PB3_DIRB1);
152 out_be32(&io->iop_pparb, tempval);
153
154 tempval = in_be32(&io->iop_pdirc);
155 tempval |= PC3_DIRC1;
156 out_be32(&io->iop_pdirc, tempval);
157
158 tempval = in_be32(&io->iop_pparc);
159 tempval |= PC3_DIRC1;
160 out_be32(&io->iop_pparc, tempval);
161
162 target = CPM_CLK_FCC3;
163 break;
164 default:
165 printk(KERN_ERR "init_fcc_ioports: invalid FCC number\n");
166 return;
167 } 170 }
168 171
169 /* Port C has clocks...... */ 172 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
170 tempval = in_be32(&io->iop_psorc); 173 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
171 tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8)); 174 cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX);
172 out_be32(&io->iop_psorc, tempval); 175 cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX);
173 176 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
174 tempval = in_be32(&io->iop_pdirc); 177 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
175 tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8)); 178 cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK15, CPM_CLK_RX);
176 out_be32(&io->iop_pdirc, tempval); 179 cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK16, CPM_CLK_TX);
177 tempval = in_be32(&io->iop_pparc);
178 tempval |= (PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8));
179 out_be32(&io->iop_pparc, tempval);
180
181 cpm2_unmap(io);
182
183 /* Configure Serial Interface clock routing.
184 * First, clear FCC bits to zero,
185 * then set the ones we want.
186 */
187 cpm2_clk_setup(target, fpi->clk_rx, CPM_CLK_RX);
188 cpm2_clk_setup(target, fpi->clk_tx, CPM_CLK_TX);
189} 180}
190#endif 181#endif
191 182
@@ -200,6 +191,7 @@ static void __init mpc85xx_ads_setup_arch(void)
200 191
201#ifdef CONFIG_CPM2 192#ifdef CONFIG_CPM2
202 cpm2_reset(); 193 cpm2_reset();
194 init_ioports();
203#endif 195#endif
204 196
205#ifdef CONFIG_PCI 197#ifdef CONFIG_PCI
@@ -231,6 +223,24 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
231 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); 223 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
232} 224}
233 225
226static struct of_device_id __initdata of_bus_ids[] = {
227 { .name = "soc", },
228 { .type = "soc", },
229 { .name = "cpm", },
230 { .name = "localbus", },
231 {},
232};
233
234static int __init declare_of_platform_devices(void)
235{
236 if (!machine_is(mpc85xx_ads))
237 return 0;
238
239 of_platform_bus_probe(NULL, of_bus_ids, NULL);
240 return 0;
241}
242device_initcall(declare_of_platform_devices);
243
234/* 244/*
235 * Called very early, device-tree isn't unflattened 245 * Called very early, device-tree isn't unflattened
236 */ 246 */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.h b/arch/powerpc/platforms/85xx/mpc85xx_ads.h
deleted file mode 100644
index 46c3532992aa..000000000000
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * MPC85xx ADS board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
7 *
8 * 2006 (c) MontaVista Software, Inc.
9 * Vitaly Bordug <vbordug@ru.mvista.com>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 *
16 */
17
18#ifndef __MACH_MPC85XXADS_H
19#define __MACH_MPC85XXADS_H
20
21#include <linux/initrd.h>
22#include <sysdev/fsl_soc.h>
23
24#define BCSR_ADDR ((uint)0xf8000000)
25#define BCSR_SIZE ((uint)(32 * 1024))
26
27#ifdef CONFIG_CPM2
28
29#define MPC85xx_CPM_OFFSET (0x80000)
30
31#define CPM_MAP_ADDR (get_immrbase() + MPC85xx_CPM_OFFSET)
32#define CPM_IRQ_OFFSET 60
33
34#define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET)
35#define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET)
36#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET)
37#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET)
38#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET)
39#define SIU_INT_SCC4 ((uint)0x2b+CPM_IRQ_OFFSET)
40
41/* FCC1 Clock Source Configuration. These can be
42 * redefined in the board specific file.
43 * Can only choose from CLK9-12 */
44#define F1_RXCLK 12
45#define F1_TXCLK 11
46
47/* FCC2 Clock Source Configuration. These can be
48 * redefined in the board specific file.
49 * Can only choose from CLK13-16 */
50#define F2_RXCLK 13
51#define F2_TXCLK 14
52
53/* FCC3 Clock Source Configuration. These can be
54 * redefined in the board specific file.
55 * Can only choose from CLK13-16 */
56#define F3_RXCLK 15
57#define F3_TXCLK 16
58
59#endif /* CONFIG_CPM2 */
60#endif /* __MACH_MPC85XXADS_H */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index afe5868cd975..4d063eec6210 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -36,7 +36,6 @@
36#include <asm/machdep.h> 36#include <asm/machdep.h>
37#include <asm/ipic.h> 37#include <asm/ipic.h>
38#include <asm/pci-bridge.h> 38#include <asm/pci-bridge.h>
39#include <asm/mpc85xx.h>
40#include <asm/irq.h> 39#include <asm/irq.h>
41#include <mm/mmu_decl.h> 40#include <mm/mmu_decl.h>
42#include <asm/prom.h> 41#include <asm/prom.h>
@@ -47,6 +46,15 @@
47#include <sysdev/fsl_soc.h> 46#include <sysdev/fsl_soc.h>
48#include <sysdev/fsl_pci.h> 47#include <sysdev/fsl_pci.h>
49 48
49/* CADMUS info */
50/* xxx - galak, move into device tree */
51#define CADMUS_BASE (0xf8004000)
52#define CADMUS_SIZE (256)
53#define CM_VER (0)
54#define CM_CSR (1)
55#define CM_RST (2)
56
57
50static int cds_pci_slot = 2; 58static int cds_pci_slot = 2;
51static volatile u8 *cadmus; 59static volatile u8 *cadmus;
52 60
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.h b/arch/powerpc/platforms/85xx/mpc85xx_cds.h
deleted file mode 100644
index b251c9feb3dc..000000000000
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * arch/powerpc/platforms/85xx/mpc85xx_cds.h
3 *
4 * MPC85xx CDS board definitions
5 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
7 *
8 * Copyright 2004 Freescale Semiconductor, Inc
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17#ifndef __MACH_MPC85XX_CDS_H__
18#define __MACH_MPC85XX_CDS_H__
19
20/* CADMUS info */
21#define CADMUS_BASE (0xf8004000)
22#define CADMUS_SIZE (256)
23#define CM_VER (0)
24#define CM_CSR (1)
25#define CM_RST (2)
26
27/* CDS NVRAM/RTC */
28#define CDS_RTC_ADDR (0xf8000000)
29#define CDS_RTC_SIZE (8 * 1024)
30
31/* PCI interrupt controller */
32#define PIRQ0A MPC85xx_IRQ_EXT0
33#define PIRQ0B MPC85xx_IRQ_EXT1
34#define PIRQ0C MPC85xx_IRQ_EXT2
35#define PIRQ0D MPC85xx_IRQ_EXT3
36#define PIRQ1A MPC85xx_IRQ_EXT11
37
38#define NR_8259_INTS 16
39#define CPM_IRQ_OFFSET NR_8259_INTS
40
41#define MPC85xx_OPENPIC_IRQ_OFFSET 80
42
43#endif /* __MACH_MPC85XX_CDS_H__ */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 772e8de9310e..59c121a97ac7 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -24,7 +24,6 @@
24#include <asm/time.h> 24#include <asm/time.h>
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/pci-bridge.h> 26#include <asm/pci-bridge.h>
27#include <asm/mpc85xx.h>
28#include <mm/mmu_decl.h> 27#include <mm/mmu_decl.h>
29#include <asm/prom.h> 28#include <asm/prom.h>
30#include <asm/udbg.h> 29#include <asm/udbg.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 6913e99c1279..61b3eedf41b9 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -39,7 +39,6 @@
39#include <asm/io.h> 39#include <asm/io.h>
40#include <asm/machdep.h> 40#include <asm/machdep.h>
41#include <asm/pci-bridge.h> 41#include <asm/pci-bridge.h>
42#include <asm/mpc85xx.h>
43#include <asm/irq.h> 42#include <asm/irq.h>
44#include <mm/mmu_decl.h> 43#include <mm/mmu_decl.h>
45#include <asm/prom.h> 44#include <asm/prom.h>
diff --git a/include/asm-powerpc/cpm2.h b/include/asm-powerpc/cpm2.h
index e698b1d09dcf..f1112c15ef96 100644
--- a/include/asm-powerpc/cpm2.h
+++ b/include/asm-powerpc/cpm2.h
@@ -13,6 +13,10 @@
13#include <asm/immap_cpm2.h> 13#include <asm/immap_cpm2.h>
14#include <asm/cpm.h> 14#include <asm/cpm.h>
15 15
16#ifdef CONFIG_PPC_85xx
17#define CPM_MAP_ADDR (get_immrbase() + 0x80000)
18#endif
19
16/* CPM Command register. 20/* CPM Command register.
17*/ 21*/
18#define CPM_CR_RST ((uint)0x80000000) 22#define CPM_CR_RST ((uint)0x80000000)
diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h
index 64706a0532d3..9361cd5342cc 100644
--- a/include/asm-powerpc/fs_pd.h
+++ b/include/asm-powerpc/fs_pd.h
@@ -19,8 +19,6 @@
19 19
20#if defined(CONFIG_8260) 20#if defined(CONFIG_8260)
21#include <asm/mpc8260.h> 21#include <asm/mpc8260.h>
22#elif defined(CONFIG_85xx)
23#include <asm/mpc85xx.h>
24#endif 22#endif
25 23
26#define cpm2_map(member) (&cpm2_immr->member) 24#define cpm2_map(member) (&cpm2_immr->member)
diff --git a/include/asm-powerpc/mpc85xx.h b/include/asm-powerpc/mpc85xx.h
deleted file mode 100644
index 54142997a584..000000000000
--- a/include/asm-powerpc/mpc85xx.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * include/asm-powerpc/mpc85xx.h
3 *
4 * MPC85xx definitions
5 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
7 *
8 * Copyright 2004 Freescale Semiconductor, Inc
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#ifdef __KERNEL__
17#ifndef __ASM_MPC85xx_H__
18#define __ASM_MPC85xx_H__
19
20#include <asm/mmu.h>
21
22#ifdef CONFIG_85xx
23
24#if defined(CONFIG_MPC8540_ADS) || defined(CONFIG_MPC8560_ADS)
25#include <platforms/85xx/mpc85xx_ads.h>
26#endif
27#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
28#include <platforms/85xx/mpc8555_cds.h>
29#endif
30#ifdef CONFIG_MPC85xx_CDS
31#include <platforms/85xx/mpc85xx_cds.h>
32#endif
33
34/* Let modules/drivers get at CCSRBAR */
35extern phys_addr_t get_ccsrbar(void);
36
37#ifdef MODULE
38#define CCSRBAR get_ccsrbar()
39#else
40#define CCSRBAR BOARD_CCSRBAR
41#endif
42
43#endif /* CONFIG_85xx */
44#endif /* __ASM_MPC85xx_H__ */
45#endif /* __KERNEL__ */