aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-30 18:50:17 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-30 18:50:17 -0500
commit4eece4ccf997c0e6d8fdad3d842e37b16b8d705f (patch)
treeb8ddfaa3401a6af36ab06829b1b0c31e0ff2fb38
parentcda13dd164f91df79ba797ab84848352b03de115 (diff)
parent4fb4c5582475452d3bf7c5072ef2d15ee06f7723 (diff)
Merge branch 'for-2.6.25' of git://git.secretlab.ca/git/linux-2.6-mpc52xx
-rw-r--r--arch/powerpc/boot/dts/cm5200.dts60
-rw-r--r--arch/powerpc/boot/dts/lite5200.dts96
-rw-r--r--arch/powerpc/boot/dts/lite5200b.dts93
-rw-r--r--arch/powerpc/boot/dts/motionpro.dts68
-rw-r--r--arch/powerpc/boot/dts/tqm5200.dts45
-rw-r--r--arch/powerpc/boot/serial.c2
-rw-r--r--arch/powerpc/kernel/prom_init.c149
-rw-r--r--arch/powerpc/platforms/52xx/Kconfig41
-rw-r--r--arch/powerpc/platforms/52xx/efika.c3
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c28
-rw-r--r--arch/powerpc/platforms/52xx/lite5200_pm.c9
-rw-r--r--arch/powerpc/platforms/52xx/mpc5200_simple.c6
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c117
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c10
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c16
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pm.c9
-rw-r--r--arch/powerpc/sysdev/bestcomm/bestcomm.c16
-rw-r--r--arch/ppc/syslib/mpc52xx_setup.c36
-rw-r--r--drivers/ata/pata_mpc52xx.c6
-rw-r--r--drivers/net/fec_mpc52xx.c6
-rw-r--r--drivers/net/fec_mpc52xx_phy.c8
-rw-r--r--drivers/serial/mpc52xx_uart.c4
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c82
-rw-r--r--drivers/usb/host/ohci-ppc-of.c2
-rw-r--r--include/asm-powerpc/mpc52xx.h9
25 files changed, 478 insertions, 443 deletions
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 9295083d1ce..30737eafe68 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -45,17 +45,16 @@
45 }; 45 };
46 46
47 soc5200@f0000000 { 47 soc5200@f0000000 {
48 model = "fsl,mpc5200b"; 48 #address-cells = <1>;
49 compatible = "fsl,mpc5200b"; 49 #size-cells = <1>;
50 revision = ""; // from bootloader 50 compatible = "fsl,mpc5200b-immr";
51 device_type = "soc";
52 ranges = <0 f0000000 0000c000>; 51 ranges = <0 f0000000 0000c000>;
53 reg = <f0000000 00000100>; 52 reg = <f0000000 00000100>;
54 bus-frequency = <0>; // from bootloader 53 bus-frequency = <0>; // from bootloader
55 system-frequency = <0>; // from bootloader 54 system-frequency = <0>; // from bootloader
56 55
57 cdm@200 { 56 cdm@200 {
58 compatible = "mpc5200b-cdm","mpc5200-cdm"; 57 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
59 reg = <200 38>; 58 reg = <200 38>;
60 }; 59 };
61 60
@@ -63,11 +62,11 @@
63 // 5200 interrupts are encoded into two levels; 62 // 5200 interrupts are encoded into two levels;
64 interrupt-controller; 63 interrupt-controller;
65 #interrupt-cells = <3>; 64 #interrupt-cells = <3>;
66 compatible = "mpc5200b-pic","mpc5200-pic"; 65 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
67 reg = <500 80>; 66 reg = <500 80>;
68 }; 67 };
69 68
70 gpt@600 { // General Purpose Timer 69 timer@600 { // General Purpose Timer
71 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 70 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
72 reg = <600 10>; 71 reg = <600 10>;
73 interrupts = <1 9 0>; 72 interrupts = <1 9 0>;
@@ -75,49 +74,49 @@
75 fsl,has-wdt; 74 fsl,has-wdt;
76 }; 75 };
77 76
78 gpt@610 { // General Purpose Timer 77 timer@610 { // General Purpose Timer
79 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 78 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
80 reg = <610 10>; 79 reg = <610 10>;
81 interrupts = <1 a 0>; 80 interrupts = <1 a 0>;
82 interrupt-parent = <&mpc5200_pic>; 81 interrupt-parent = <&mpc5200_pic>;
83 }; 82 };
84 83
85 gpt@620 { // General Purpose Timer 84 timer@620 { // General Purpose Timer
86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 85 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
87 reg = <620 10>; 86 reg = <620 10>;
88 interrupts = <1 b 0>; 87 interrupts = <1 b 0>;
89 interrupt-parent = <&mpc5200_pic>; 88 interrupt-parent = <&mpc5200_pic>;
90 }; 89 };
91 90
92 gpt@630 { // General Purpose Timer 91 timer@630 { // General Purpose Timer
93 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 92 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
94 reg = <630 10>; 93 reg = <630 10>;
95 interrupts = <1 c 0>; 94 interrupts = <1 c 0>;
96 interrupt-parent = <&mpc5200_pic>; 95 interrupt-parent = <&mpc5200_pic>;
97 }; 96 };
98 97
99 gpt@640 { // General Purpose Timer 98 timer@640 { // General Purpose Timer
100 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 99 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
101 reg = <640 10>; 100 reg = <640 10>;
102 interrupts = <1 d 0>; 101 interrupts = <1 d 0>;
103 interrupt-parent = <&mpc5200_pic>; 102 interrupt-parent = <&mpc5200_pic>;
104 }; 103 };
105 104
106 gpt@650 { // General Purpose Timer 105 timer@650 { // General Purpose Timer
107 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 106 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
108 reg = <650 10>; 107 reg = <650 10>;
109 interrupts = <1 e 0>; 108 interrupts = <1 e 0>;
110 interrupt-parent = <&mpc5200_pic>; 109 interrupt-parent = <&mpc5200_pic>;
111 }; 110 };
112 111
113 gpt@660 { // General Purpose Timer 112 timer@660 { // General Purpose Timer
114 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 113 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
115 reg = <660 10>; 114 reg = <660 10>;
116 interrupts = <1 f 0>; 115 interrupts = <1 f 0>;
117 interrupt-parent = <&mpc5200_pic>; 116 interrupt-parent = <&mpc5200_pic>;
118 }; 117 };
119 118
120 gpt@670 { // General Purpose Timer 119 timer@670 { // General Purpose Timer
121 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 120 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
122 reg = <670 10>; 121 reg = <670 10>;
123 interrupts = <1 10 0>; 122 interrupts = <1 10 0>;
@@ -125,43 +124,42 @@
125 }; 124 };
126 125
127 rtc@800 { // Real time clock 126 rtc@800 { // Real time clock
128 compatible = "mpc5200b-rtc","mpc5200-rtc"; 127 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
129 reg = <800 100>; 128 reg = <800 100>;
130 interrupts = <1 5 0 1 6 0>; 129 interrupts = <1 5 0 1 6 0>;
131 interrupt-parent = <&mpc5200_pic>; 130 interrupt-parent = <&mpc5200_pic>;
132 }; 131 };
133 132
134 gpio@b00 { 133 gpio@b00 {
135 compatible = "mpc5200b-gpio","mpc5200-gpio"; 134 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
136 reg = <b00 40>; 135 reg = <b00 40>;
137 interrupts = <1 7 0>; 136 interrupts = <1 7 0>;
138 interrupt-parent = <&mpc5200_pic>; 137 interrupt-parent = <&mpc5200_pic>;
139 }; 138 };
140 139
141 gpio-wkup@c00 { 140 gpio@c00 {
142 compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup"; 141 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
143 reg = <c00 40>; 142 reg = <c00 40>;
144 interrupts = <1 8 0 0 3 0>; 143 interrupts = <1 8 0 0 3 0>;
145 interrupt-parent = <&mpc5200_pic>; 144 interrupt-parent = <&mpc5200_pic>;
146 }; 145 };
147 146
148 spi@f00 { 147 spi@f00 {
149 compatible = "mpc5200b-spi","mpc5200-spi"; 148 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
150 reg = <f00 20>; 149 reg = <f00 20>;
151 interrupts = <2 d 0 2 e 0>; 150 interrupts = <2 d 0 2 e 0>;
152 interrupt-parent = <&mpc5200_pic>; 151 interrupt-parent = <&mpc5200_pic>;
153 }; 152 };
154 153
155 usb@1000 { 154 usb@1000 {
156 device_type = "usb-ohci-be"; 155 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
157 compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
158 reg = <1000 ff>; 156 reg = <1000 ff>;
159 interrupts = <2 6 0>; 157 interrupts = <2 6 0>;
160 interrupt-parent = <&mpc5200_pic>; 158 interrupt-parent = <&mpc5200_pic>;
161 }; 159 };
162 160
163 dma-controller@1200 { 161 dma-controller@1200 {
164 compatible = "mpc5200b-bestcomm","mpc5200-bestcomm"; 162 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
165 reg = <1200 80>; 163 reg = <1200 80>;
166 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 164 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
167 3 4 0 3 5 0 3 6 0 3 7 0 165 3 4 0 3 5 0 3 6 0 3 7 0
@@ -171,13 +169,13 @@
171 }; 169 };
172 170
173 xlb@1f00 { 171 xlb@1f00 {
174 compatible = "mpc5200b-xlb","mpc5200-xlb"; 172 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
175 reg = <1f00 100>; 173 reg = <1f00 100>;
176 }; 174 };
177 175
178 serial@2000 { // PSC1 176 serial@2000 { // PSC1
179 device_type = "serial"; 177 device_type = "serial";
180 compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 178 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
181 port-number = <0>; // Logical port assignment 179 port-number = <0>; // Logical port assignment
182 reg = <2000 100>; 180 reg = <2000 100>;
183 interrupts = <2 1 0>; 181 interrupts = <2 1 0>;
@@ -186,7 +184,7 @@
186 184
187 serial@2200 { // PSC2 185 serial@2200 { // PSC2
188 device_type = "serial"; 186 device_type = "serial";
189 compatible = "mpc5200-psc-uart"; 187 compatible = "fsl,mpc5200-psc-uart";
190 port-number = <1>; // Logical port assignment 188 port-number = <1>; // Logical port assignment
191 reg = <2200 100>; 189 reg = <2200 100>;
192 interrupts = <2 2 0>; 190 interrupts = <2 2 0>;
@@ -195,7 +193,7 @@
195 193
196 serial@2400 { // PSC3 194 serial@2400 { // PSC3
197 device_type = "serial"; 195 device_type = "serial";
198 compatible = "mpc5200-psc-uart"; 196 compatible = "fsl,mpc5200-psc-uart";
199 port-number = <2>; // Logical port assignment 197 port-number = <2>; // Logical port assignment
200 reg = <2400 100>; 198 reg = <2400 100>;
201 interrupts = <2 3 0>; 199 interrupts = <2 3 0>;
@@ -204,7 +202,7 @@
204 202
205 serial@2c00 { // PSC6 203 serial@2c00 { // PSC6
206 device_type = "serial"; 204 device_type = "serial";
207 compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 205 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
208 port-number = <5>; // Logical port assignment 206 port-number = <5>; // Logical port assignment
209 reg = <2c00 100>; 207 reg = <2c00 100>;
210 interrupts = <2 4 0>; 208 interrupts = <2 4 0>;
@@ -213,15 +211,15 @@
213 211
214 ethernet@3000 { 212 ethernet@3000 {
215 device_type = "network"; 213 device_type = "network";
216 compatible = "mpc5200b-fec","mpc5200-fec"; 214 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
217 reg = <3000 800>; 215 reg = <3000 800>;
218 local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ 216 local-mac-address = [ 00 00 00 00 00 00 ];
219 interrupts = <2 5 0>; 217 interrupts = <2 5 0>;
220 interrupt-parent = <&mpc5200_pic>; 218 interrupt-parent = <&mpc5200_pic>;
221 }; 219 };
222 220
223 i2c@3d40 { 221 i2c@3d40 {
224 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; 222 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
225 reg = <3d40 40>; 223 reg = <3d40 40>;
226 interrupts = <2 10 0>; 224 interrupts = <2 10 0>;
227 interrupt-parent = <&mpc5200_pic>; 225 interrupt-parent = <&mpc5200_pic>;
@@ -229,7 +227,7 @@
229 }; 227 };
230 228
231 sram@8000 { 229 sram@8000 {
232 compatible = "mpc5200b-sram","mpc5200-sram"; 230 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
233 reg = <8000 4000>; 231 reg = <8000 4000>;
234 }; 232 };
235 }; 233 };
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index e1d6f441532..0d701c1bf53 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -10,15 +10,8 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/*
14 * WARNING: Do not depend on this tree layout remaining static just yet.
15 * The MPC5200 device tree conventions are still in flux
16 * Keep an eye on the linuxppc-dev mailing list for more details
17 */
18
19/ { 13/ {
20 model = "fsl,lite5200"; 14 model = "fsl,lite5200";
21 // revision = "1.0";
22 compatible = "fsl,lite5200"; 15 compatible = "fsl,lite5200";
23 #address-cells = <1>; 16 #address-cells = <1>;
24 #size-cells = <1>; 17 #size-cells = <1>;
@@ -46,30 +39,29 @@
46 }; 39 };
47 40
48 soc5200@f0000000 { 41 soc5200@f0000000 {
49 model = "fsl,mpc5200"; 42 #address-cells = <1>;
50 compatible = "mpc5200"; 43 #size-cells = <1>;
51 revision = ""; // from bootloader 44 compatible = "fsl,mpc5200-immr";
52 device_type = "soc";
53 ranges = <0 f0000000 0000c000>; 45 ranges = <0 f0000000 0000c000>;
54 reg = <f0000000 00000100>; 46 reg = <f0000000 00000100>;
55 bus-frequency = <0>; // from bootloader 47 bus-frequency = <0>; // from bootloader
56 system-frequency = <0>; // from bootloader 48 system-frequency = <0>; // from bootloader
57 49
58 cdm@200 { 50 cdm@200 {
59 compatible = "mpc5200-cdm"; 51 compatible = "fsl,mpc5200-cdm";
60 reg = <200 38>; 52 reg = <200 38>;
61 }; 53 };
62 54
63 mpc5200_pic: pic@500 { 55 mpc5200_pic: interrupt-controller@500 {
64 // 5200 interrupts are encoded into two levels; 56 // 5200 interrupts are encoded into two levels;
65 interrupt-controller; 57 interrupt-controller;
66 #interrupt-cells = <3>; 58 #interrupt-cells = <3>;
67 device_type = "interrupt-controller"; 59 device_type = "interrupt-controller";
68 compatible = "mpc5200-pic"; 60 compatible = "fsl,mpc5200-pic";
69 reg = <500 80>; 61 reg = <500 80>;
70 }; 62 };
71 63
72 gpt@600 { // General Purpose Timer 64 timer@600 { // General Purpose Timer
73 compatible = "fsl,mpc5200-gpt"; 65 compatible = "fsl,mpc5200-gpt";
74 cell-index = <0>; 66 cell-index = <0>;
75 reg = <600 10>; 67 reg = <600 10>;
@@ -78,7 +70,7 @@
78 fsl,has-wdt; 70 fsl,has-wdt;
79 }; 71 };
80 72
81 gpt@610 { // General Purpose Timer 73 timer@610 { // General Purpose Timer
82 compatible = "fsl,mpc5200-gpt"; 74 compatible = "fsl,mpc5200-gpt";
83 cell-index = <1>; 75 cell-index = <1>;
84 reg = <610 10>; 76 reg = <610 10>;
@@ -86,7 +78,7 @@
86 interrupt-parent = <&mpc5200_pic>; 78 interrupt-parent = <&mpc5200_pic>;
87 }; 79 };
88 80
89 gpt@620 { // General Purpose Timer 81 timer@620 { // General Purpose Timer
90 compatible = "fsl,mpc5200-gpt"; 82 compatible = "fsl,mpc5200-gpt";
91 cell-index = <2>; 83 cell-index = <2>;
92 reg = <620 10>; 84 reg = <620 10>;
@@ -94,7 +86,7 @@
94 interrupt-parent = <&mpc5200_pic>; 86 interrupt-parent = <&mpc5200_pic>;
95 }; 87 };
96 88
97 gpt@630 { // General Purpose Timer 89 timer@630 { // General Purpose Timer
98 compatible = "fsl,mpc5200-gpt"; 90 compatible = "fsl,mpc5200-gpt";
99 cell-index = <3>; 91 cell-index = <3>;
100 reg = <630 10>; 92 reg = <630 10>;
@@ -102,7 +94,7 @@
102 interrupt-parent = <&mpc5200_pic>; 94 interrupt-parent = <&mpc5200_pic>;
103 }; 95 };
104 96
105 gpt@640 { // General Purpose Timer 97 timer@640 { // General Purpose Timer
106 compatible = "fsl,mpc5200-gpt"; 98 compatible = "fsl,mpc5200-gpt";
107 cell-index = <4>; 99 cell-index = <4>;
108 reg = <640 10>; 100 reg = <640 10>;
@@ -110,7 +102,7 @@
110 interrupt-parent = <&mpc5200_pic>; 102 interrupt-parent = <&mpc5200_pic>;
111 }; 103 };
112 104
113 gpt@650 { // General Purpose Timer 105 timer@650 { // General Purpose Timer
114 compatible = "fsl,mpc5200-gpt"; 106 compatible = "fsl,mpc5200-gpt";
115 cell-index = <5>; 107 cell-index = <5>;
116 reg = <650 10>; 108 reg = <650 10>;
@@ -118,7 +110,7 @@
118 interrupt-parent = <&mpc5200_pic>; 110 interrupt-parent = <&mpc5200_pic>;
119 }; 111 };
120 112
121 gpt@660 { // General Purpose Timer 113 timer@660 { // General Purpose Timer
122 compatible = "fsl,mpc5200-gpt"; 114 compatible = "fsl,mpc5200-gpt";
123 cell-index = <6>; 115 cell-index = <6>;
124 reg = <660 10>; 116 reg = <660 10>;
@@ -126,7 +118,7 @@
126 interrupt-parent = <&mpc5200_pic>; 118 interrupt-parent = <&mpc5200_pic>;
127 }; 119 };
128 120
129 gpt@670 { // General Purpose Timer 121 timer@670 { // General Purpose Timer
130 compatible = "fsl,mpc5200-gpt"; 122 compatible = "fsl,mpc5200-gpt";
131 cell-index = <7>; 123 cell-index = <7>;
132 reg = <670 10>; 124 reg = <670 10>;
@@ -135,25 +127,23 @@
135 }; 127 };
136 128
137 rtc@800 { // Real time clock 129 rtc@800 { // Real time clock
138 compatible = "mpc5200-rtc"; 130 compatible = "fsl,mpc5200-rtc";
139 device_type = "rtc"; 131 device_type = "rtc";
140 reg = <800 100>; 132 reg = <800 100>;
141 interrupts = <1 5 0 1 6 0>; 133 interrupts = <1 5 0 1 6 0>;
142 interrupt-parent = <&mpc5200_pic>; 134 interrupt-parent = <&mpc5200_pic>;
143 }; 135 };
144 136
145 mscan@900 { 137 can@900 {
146 device_type = "mscan"; 138 compatible = "fsl,mpc5200-mscan";
147 compatible = "mpc5200-mscan";
148 cell-index = <0>; 139 cell-index = <0>;
149 interrupts = <2 11 0>; 140 interrupts = <2 11 0>;
150 interrupt-parent = <&mpc5200_pic>; 141 interrupt-parent = <&mpc5200_pic>;
151 reg = <900 80>; 142 reg = <900 80>;
152 }; 143 };
153 144
154 mscan@980 { 145 can@980 {
155 device_type = "mscan"; 146 compatible = "fsl,mpc5200-mscan";
156 compatible = "mpc5200-mscan";
157 cell-index = <1>; 147 cell-index = <1>;
158 interrupts = <2 12 0>; 148 interrupts = <2 12 0>;
159 interrupt-parent = <&mpc5200_pic>; 149 interrupt-parent = <&mpc5200_pic>;
@@ -161,38 +151,36 @@
161 }; 151 };
162 152
163 gpio@b00 { 153 gpio@b00 {
164 compatible = "mpc5200-gpio"; 154 compatible = "fsl,mpc5200-gpio";
165 reg = <b00 40>; 155 reg = <b00 40>;
166 interrupts = <1 7 0>; 156 interrupts = <1 7 0>;
167 interrupt-parent = <&mpc5200_pic>; 157 interrupt-parent = <&mpc5200_pic>;
168 }; 158 };
169 159
170 gpio-wkup@c00 { 160 gpio@c00 {
171 compatible = "mpc5200-gpio-wkup"; 161 compatible = "fsl,mpc5200-gpio-wkup";
172 reg = <c00 40>; 162 reg = <c00 40>;
173 interrupts = <1 8 0 0 3 0>; 163 interrupts = <1 8 0 0 3 0>;
174 interrupt-parent = <&mpc5200_pic>; 164 interrupt-parent = <&mpc5200_pic>;
175 }; 165 };
176 166
177 spi@f00 { 167 spi@f00 {
178 device_type = "spi"; 168 compatible = "fsl,mpc5200-spi";
179 compatible = "mpc5200-spi";
180 reg = <f00 20>; 169 reg = <f00 20>;
181 interrupts = <2 d 0 2 e 0>; 170 interrupts = <2 d 0 2 e 0>;
182 interrupt-parent = <&mpc5200_pic>; 171 interrupt-parent = <&mpc5200_pic>;
183 }; 172 };
184 173
185 usb@1000 { 174 usb@1000 {
186 device_type = "usb-ohci-be"; 175 compatible = "fsl,mpc5200-ohci","ohci-be";
187 compatible = "mpc5200-ohci","ohci-be";
188 reg = <1000 ff>; 176 reg = <1000 ff>;
189 interrupts = <2 6 0>; 177 interrupts = <2 6 0>;
190 interrupt-parent = <&mpc5200_pic>; 178 interrupt-parent = <&mpc5200_pic>;
191 }; 179 };
192 180
193 bestcomm@1200 { 181 dma-controller@1200 {
194 device_type = "dma-controller"; 182 device_type = "dma-controller";
195 compatible = "mpc5200-bestcomm"; 183 compatible = "fsl,mpc5200-bestcomm";
196 reg = <1200 80>; 184 reg = <1200 80>;
197 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 185 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
198 3 4 0 3 5 0 3 6 0 3 7 0 186 3 4 0 3 5 0 3 6 0 3 7 0
@@ -202,13 +190,13 @@
202 }; 190 };
203 191
204 xlb@1f00 { 192 xlb@1f00 {
205 compatible = "mpc5200-xlb"; 193 compatible = "fsl,mpc5200-xlb";
206 reg = <1f00 100>; 194 reg = <1f00 100>;
207 }; 195 };
208 196
209 serial@2000 { // PSC1 197 serial@2000 { // PSC1
210 device_type = "serial"; 198 device_type = "serial";
211 compatible = "mpc5200-psc-uart"; 199 compatible = "fsl,mpc5200-psc-uart";
212 port-number = <0>; // Logical port assignment 200 port-number = <0>; // Logical port assignment
213 cell-index = <0>; 201 cell-index = <0>;
214 reg = <2000 100>; 202 reg = <2000 100>;
@@ -218,8 +206,7 @@
218 206
219 // PSC2 in ac97 mode example 207 // PSC2 in ac97 mode example
220 //ac97@2200 { // PSC2 208 //ac97@2200 { // PSC2
221 // device_type = "sound"; 209 // compatible = "fsl,mpc5200-psc-ac97";
222 // compatible = "mpc5200-psc-ac97";
223 // cell-index = <1>; 210 // cell-index = <1>;
224 // reg = <2200 100>; 211 // reg = <2200 100>;
225 // interrupts = <2 2 0>; 212 // interrupts = <2 2 0>;
@@ -228,8 +215,7 @@
228 215
229 // PSC3 in CODEC mode example 216 // PSC3 in CODEC mode example
230 //i2s@2400 { // PSC3 217 //i2s@2400 { // PSC3
231 // device_type = "sound"; 218 // compatible = "fsl,mpc5200-psc-i2s";
232 // compatible = "mpc5200-psc-i2s";
233 // cell-index = <2>; 219 // cell-index = <2>;
234 // reg = <2400 100>; 220 // reg = <2400 100>;
235 // interrupts = <2 3 0>; 221 // interrupts = <2 3 0>;
@@ -239,7 +225,7 @@
239 // PSC4 in uart mode example 225 // PSC4 in uart mode example
240 //serial@2600 { // PSC4 226 //serial@2600 { // PSC4
241 // device_type = "serial"; 227 // device_type = "serial";
242 // compatible = "mpc5200-psc-uart"; 228 // compatible = "fsl,mpc5200-psc-uart";
243 // cell-index = <3>; 229 // cell-index = <3>;
244 // reg = <2600 100>; 230 // reg = <2600 100>;
245 // interrupts = <2 b 0>; 231 // interrupts = <2 b 0>;
@@ -249,7 +235,7 @@
249 // PSC5 in uart mode example 235 // PSC5 in uart mode example
250 //serial@2800 { // PSC5 236 //serial@2800 { // PSC5
251 // device_type = "serial"; 237 // device_type = "serial";
252 // compatible = "mpc5200-psc-uart"; 238 // compatible = "fsl,mpc5200-psc-uart";
253 // cell-index = <4>; 239 // cell-index = <4>;
254 // reg = <2800 100>; 240 // reg = <2800 100>;
255 // interrupts = <2 c 0>; 241 // interrupts = <2 c 0>;
@@ -258,8 +244,7 @@
258 244
259 // PSC6 in spi mode example 245 // PSC6 in spi mode example
260 //spi@2c00 { // PSC6 246 //spi@2c00 { // PSC6
261 // device_type = "spi"; 247 // compatible = "fsl,mpc5200-psc-spi";
262 // compatible = "mpc5200-psc-spi";
263 // cell-index = <5>; 248 // cell-index = <5>;
264 // reg = <2c00 100>; 249 // reg = <2c00 100>;
265 // interrupts = <2 4 0>; 250 // interrupts = <2 4 0>;
@@ -268,16 +253,16 @@
268 253
269 ethernet@3000 { 254 ethernet@3000 {
270 device_type = "network"; 255 device_type = "network";
271 compatible = "mpc5200-fec"; 256 compatible = "fsl,mpc5200-fec";
272 reg = <3000 800>; 257 reg = <3000 800>;
273 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 258 local-mac-address = [ 00 00 00 00 00 00 ];
274 interrupts = <2 5 0>; 259 interrupts = <2 5 0>;
275 interrupt-parent = <&mpc5200_pic>; 260 interrupt-parent = <&mpc5200_pic>;
276 }; 261 };
277 262
278 ata@3a00 { 263 ata@3a00 {
279 device_type = "ata"; 264 device_type = "ata";
280 compatible = "mpc5200-ata"; 265 compatible = "fsl,mpc5200-ata";
281 reg = <3a00 100>; 266 reg = <3a00 100>;
282 interrupts = <2 7 0>; 267 interrupts = <2 7 0>;
283 interrupt-parent = <&mpc5200_pic>; 268 interrupt-parent = <&mpc5200_pic>;
@@ -286,7 +271,7 @@
286 i2c@3d00 { 271 i2c@3d00 {
287 #address-cells = <1>; 272 #address-cells = <1>;
288 #size-cells = <0>; 273 #size-cells = <0>;
289 compatible = "mpc5200-i2c","fsl-i2c"; 274 compatible = "fsl,mpc5200-i2c","fsl-i2c";
290 cell-index = <0>; 275 cell-index = <0>;
291 reg = <3d00 40>; 276 reg = <3d00 40>;
292 interrupts = <2 f 0>; 277 interrupts = <2 f 0>;
@@ -297,7 +282,7 @@
297 i2c@3d40 { 282 i2c@3d40 {
298 #address-cells = <1>; 283 #address-cells = <1>;
299 #size-cells = <0>; 284 #size-cells = <0>;
300 compatible = "mpc5200-i2c","fsl-i2c"; 285 compatible = "fsl,mpc5200-i2c","fsl-i2c";
301 cell-index = <1>; 286 cell-index = <1>;
302 reg = <3d40 40>; 287 reg = <3d40 40>;
303 interrupts = <2 10 0>; 288 interrupts = <2 10 0>;
@@ -305,8 +290,7 @@
305 fsl5200-clocking; 290 fsl5200-clocking;
306 }; 291 };
307 sram@8000 { 292 sram@8000 {
308 device_type = "sram"; 293 compatible = "fsl,mpc5200-sram","sram";
309 compatible = "mpc5200-sram","sram";
310 reg = <8000 4000>; 294 reg = <8000 4000>;
311 }; 295 };
312 }; 296 };
@@ -316,7 +300,7 @@
316 #size-cells = <2>; 300 #size-cells = <2>;
317 #address-cells = <3>; 301 #address-cells = <3>;
318 device_type = "pci"; 302 device_type = "pci";
319 compatible = "mpc5200-pci"; 303 compatible = "fsl,mpc5200-pci";
320 reg = <f0000d00 100>; 304 reg = <f0000d00 100>;
321 interrupt-map-mask = <f800 0 0 7>; 305 interrupt-map-mask = <f800 0 0 7>;
322 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 306 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 3e06f58a0a7..571ba02acca 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -18,7 +18,6 @@
18 18
19/ { 19/ {
20 model = "fsl,lite5200b"; 20 model = "fsl,lite5200b";
21 // revision = "1.0";
22 compatible = "fsl,lite5200b"; 21 compatible = "fsl,lite5200b";
23 #address-cells = <1>; 22 #address-cells = <1>;
24 #size-cells = <1>; 23 #size-cells = <1>;
@@ -46,30 +45,29 @@
46 }; 45 };
47 46
48 soc5200@f0000000 { 47 soc5200@f0000000 {
49 model = "fsl,mpc5200b"; 48 #address-cells = <1>;
50 compatible = "mpc5200"; 49 #size-cells = <1>;
51 revision = ""; // from bootloader 50 compatible = "fsl,mpc5200b-immr";
52 device_type = "soc";
53 ranges = <0 f0000000 0000c000>; 51 ranges = <0 f0000000 0000c000>;
54 reg = <f0000000 00000100>; 52 reg = <f0000000 00000100>;
55 bus-frequency = <0>; // from bootloader 53 bus-frequency = <0>; // from bootloader
56 system-frequency = <0>; // from bootloader 54 system-frequency = <0>; // from bootloader
57 55
58 cdm@200 { 56 cdm@200 {
59 compatible = "mpc5200b-cdm","mpc5200-cdm"; 57 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
60 reg = <200 38>; 58 reg = <200 38>;
61 }; 59 };
62 60
63 mpc5200_pic: pic@500 { 61 mpc5200_pic: interrupt-controller@500 {
64 // 5200 interrupts are encoded into two levels; 62 // 5200 interrupts are encoded into two levels;
65 interrupt-controller; 63 interrupt-controller;
66 #interrupt-cells = <3>; 64 #interrupt-cells = <3>;
67 device_type = "interrupt-controller"; 65 device_type = "interrupt-controller";
68 compatible = "mpc5200b-pic","mpc5200-pic"; 66 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
69 reg = <500 80>; 67 reg = <500 80>;
70 }; 68 };
71 69
72 gpt@600 { // General Purpose Timer 70 timer@600 { // General Purpose Timer
73 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 71 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
74 cell-index = <0>; 72 cell-index = <0>;
75 reg = <600 10>; 73 reg = <600 10>;
@@ -78,7 +76,7 @@
78 fsl,has-wdt; 76 fsl,has-wdt;
79 }; 77 };
80 78
81 gpt@610 { // General Purpose Timer 79 timer@610 { // General Purpose Timer
82 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 80 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
83 cell-index = <1>; 81 cell-index = <1>;
84 reg = <610 10>; 82 reg = <610 10>;
@@ -86,7 +84,7 @@
86 interrupt-parent = <&mpc5200_pic>; 84 interrupt-parent = <&mpc5200_pic>;
87 }; 85 };
88 86
89 gpt@620 { // General Purpose Timer 87 timer@620 { // General Purpose Timer
90 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 88 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
91 cell-index = <2>; 89 cell-index = <2>;
92 reg = <620 10>; 90 reg = <620 10>;
@@ -94,7 +92,7 @@
94 interrupt-parent = <&mpc5200_pic>; 92 interrupt-parent = <&mpc5200_pic>;
95 }; 93 };
96 94
97 gpt@630 { // General Purpose Timer 95 timer@630 { // General Purpose Timer
98 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 96 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
99 cell-index = <3>; 97 cell-index = <3>;
100 reg = <630 10>; 98 reg = <630 10>;
@@ -102,7 +100,7 @@
102 interrupt-parent = <&mpc5200_pic>; 100 interrupt-parent = <&mpc5200_pic>;
103 }; 101 };
104 102
105 gpt@640 { // General Purpose Timer 103 timer@640 { // General Purpose Timer
106 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 104 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
107 cell-index = <4>; 105 cell-index = <4>;
108 reg = <640 10>; 106 reg = <640 10>;
@@ -110,7 +108,7 @@
110 interrupt-parent = <&mpc5200_pic>; 108 interrupt-parent = <&mpc5200_pic>;
111 }; 109 };
112 110
113 gpt@650 { // General Purpose Timer 111 timer@650 { // General Purpose Timer
114 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 112 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
115 cell-index = <5>; 113 cell-index = <5>;
116 reg = <650 10>; 114 reg = <650 10>;
@@ -118,7 +116,7 @@
118 interrupt-parent = <&mpc5200_pic>; 116 interrupt-parent = <&mpc5200_pic>;
119 }; 117 };
120 118
121 gpt@660 { // General Purpose Timer 119 timer@660 { // General Purpose Timer
122 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 120 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
123 cell-index = <6>; 121 cell-index = <6>;
124 reg = <660 10>; 122 reg = <660 10>;
@@ -126,7 +124,7 @@
126 interrupt-parent = <&mpc5200_pic>; 124 interrupt-parent = <&mpc5200_pic>;
127 }; 125 };
128 126
129 gpt@670 { // General Purpose Timer 127 timer@670 { // General Purpose Timer
130 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 128 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
131 cell-index = <7>; 129 cell-index = <7>;
132 reg = <670 10>; 130 reg = <670 10>;
@@ -135,25 +133,23 @@
135 }; 133 };
136 134
137 rtc@800 { // Real time clock 135 rtc@800 { // Real time clock
138 compatible = "mpc5200b-rtc","mpc5200-rtc"; 136 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
139 device_type = "rtc"; 137 device_type = "rtc";
140 reg = <800 100>; 138 reg = <800 100>;
141 interrupts = <1 5 0 1 6 0>; 139 interrupts = <1 5 0 1 6 0>;
142 interrupt-parent = <&mpc5200_pic>; 140 interrupt-parent = <&mpc5200_pic>;
143 }; 141 };
144 142
145 mscan@900 { 143 can@900 {
146 device_type = "mscan"; 144 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
147 compatible = "mpc5200b-mscan","mpc5200-mscan";
148 cell-index = <0>; 145 cell-index = <0>;
149 interrupts = <2 11 0>; 146 interrupts = <2 11 0>;
150 interrupt-parent = <&mpc5200_pic>; 147 interrupt-parent = <&mpc5200_pic>;
151 reg = <900 80>; 148 reg = <900 80>;
152 }; 149 };
153 150
154 mscan@980 { 151 can@980 {
155 device_type = "mscan"; 152 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
156 compatible = "mpc5200b-mscan","mpc5200-mscan";
157 cell-index = <1>; 153 cell-index = <1>;
158 interrupts = <2 12 0>; 154 interrupts = <2 12 0>;
159 interrupt-parent = <&mpc5200_pic>; 155 interrupt-parent = <&mpc5200_pic>;
@@ -161,38 +157,36 @@
161 }; 157 };
162 158
163 gpio@b00 { 159 gpio@b00 {
164 compatible = "mpc5200b-gpio","mpc5200-gpio"; 160 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
165 reg = <b00 40>; 161 reg = <b00 40>;
166 interrupts = <1 7 0>; 162 interrupts = <1 7 0>;
167 interrupt-parent = <&mpc5200_pic>; 163 interrupt-parent = <&mpc5200_pic>;
168 }; 164 };
169 165
170 gpio-wkup@c00 { 166 gpio@c00 {
171 compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup"; 167 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
172 reg = <c00 40>; 168 reg = <c00 40>;
173 interrupts = <1 8 0 0 3 0>; 169 interrupts = <1 8 0 0 3 0>;
174 interrupt-parent = <&mpc5200_pic>; 170 interrupt-parent = <&mpc5200_pic>;
175 }; 171 };
176 172
177 spi@f00 { 173 spi@f00 {
178 device_type = "spi"; 174 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
179 compatible = "mpc5200b-spi","mpc5200-spi";
180 reg = <f00 20>; 175 reg = <f00 20>;
181 interrupts = <2 d 0 2 e 0>; 176 interrupts = <2 d 0 2 e 0>;
182 interrupt-parent = <&mpc5200_pic>; 177 interrupt-parent = <&mpc5200_pic>;
183 }; 178 };
184 179
185 usb@1000 { 180 usb@1000 {
186 device_type = "usb-ohci-be"; 181 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
187 compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
188 reg = <1000 ff>; 182 reg = <1000 ff>;
189 interrupts = <2 6 0>; 183 interrupts = <2 6 0>;
190 interrupt-parent = <&mpc5200_pic>; 184 interrupt-parent = <&mpc5200_pic>;
191 }; 185 };
192 186
193 bestcomm@1200 { 187 dma-controller@1200 {
194 device_type = "dma-controller"; 188 device_type = "dma-controller";
195 compatible = "mpc5200b-bestcomm","mpc5200-bestcomm"; 189 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
196 reg = <1200 80>; 190 reg = <1200 80>;
197 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 191 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
198 3 4 0 3 5 0 3 6 0 3 7 0 192 3 4 0 3 5 0 3 6 0 3 7 0
@@ -202,13 +196,13 @@
202 }; 196 };
203 197
204 xlb@1f00 { 198 xlb@1f00 {
205 compatible = "mpc5200b-xlb","mpc5200-xlb"; 199 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
206 reg = <1f00 100>; 200 reg = <1f00 100>;
207 }; 201 };
208 202
209 serial@2000 { // PSC1 203 serial@2000 { // PSC1
210 device_type = "serial"; 204 device_type = "serial";
211 compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 205 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
212 port-number = <0>; // Logical port assignment 206 port-number = <0>; // Logical port assignment
213 cell-index = <0>; 207 cell-index = <0>;
214 reg = <2000 100>; 208 reg = <2000 100>;
@@ -218,8 +212,7 @@
218 212
219 // PSC2 in ac97 mode example 213 // PSC2 in ac97 mode example
220 //ac97@2200 { // PSC2 214 //ac97@2200 { // PSC2
221 // device_type = "sound"; 215 // compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97";
222 // compatible = "mpc5200b-psc-ac97","mpc5200-psc-ac97";
223 // cell-index = <1>; 216 // cell-index = <1>;
224 // reg = <2200 100>; 217 // reg = <2200 100>;
225 // interrupts = <2 2 0>; 218 // interrupts = <2 2 0>;
@@ -228,8 +221,7 @@
228 221
229 // PSC3 in CODEC mode example 222 // PSC3 in CODEC mode example
230 //i2s@2400 { // PSC3 223 //i2s@2400 { // PSC3
231 // device_type = "sound"; 224 // compatible = "fsl,mpc5200b-psc-i2s"; //not 5200 compatible
232 // compatible = "mpc5200b-psc-i2s"; //not 5200 compatible
233 // cell-index = <2>; 225 // cell-index = <2>;
234 // reg = <2400 100>; 226 // reg = <2400 100>;
235 // interrupts = <2 3 0>; 227 // interrupts = <2 3 0>;
@@ -239,7 +231,7 @@
239 // PSC4 in uart mode example 231 // PSC4 in uart mode example
240 //serial@2600 { // PSC4 232 //serial@2600 { // PSC4
241 // device_type = "serial"; 233 // device_type = "serial";
242 // compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 234 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
243 // cell-index = <3>; 235 // cell-index = <3>;
244 // reg = <2600 100>; 236 // reg = <2600 100>;
245 // interrupts = <2 b 0>; 237 // interrupts = <2 b 0>;
@@ -249,7 +241,7 @@
249 // PSC5 in uart mode example 241 // PSC5 in uart mode example
250 //serial@2800 { // PSC5 242 //serial@2800 { // PSC5
251 // device_type = "serial"; 243 // device_type = "serial";
252 // compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 244 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
253 // cell-index = <4>; 245 // cell-index = <4>;
254 // reg = <2800 100>; 246 // reg = <2800 100>;
255 // interrupts = <2 c 0>; 247 // interrupts = <2 c 0>;
@@ -258,8 +250,7 @@
258 250
259 // PSC6 in spi mode example 251 // PSC6 in spi mode example
260 //spi@2c00 { // PSC6 252 //spi@2c00 { // PSC6
261 // device_type = "spi"; 253 // compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi";
262 // compatible = "mpc5200b-psc-spi","mpc5200-psc-spi";
263 // cell-index = <5>; 254 // cell-index = <5>;
264 // reg = <2c00 100>; 255 // reg = <2c00 100>;
265 // interrupts = <2 4 0>; 256 // interrupts = <2 4 0>;
@@ -268,9 +259,9 @@
268 259
269 ethernet@3000 { 260 ethernet@3000 {
270 device_type = "network"; 261 device_type = "network";
271 compatible = "mpc5200b-fec","mpc5200-fec"; 262 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
272 reg = <3000 400>; 263 reg = <3000 400>;
273 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 264 local-mac-address = [ 00 00 00 00 00 00 ];
274 interrupts = <2 5 0>; 265 interrupts = <2 5 0>;
275 interrupt-parent = <&mpc5200_pic>; 266 interrupt-parent = <&mpc5200_pic>;
276 phy-handle = <&phy0>; 267 phy-handle = <&phy0>;
@@ -279,8 +270,7 @@
279 mdio@3000 { 270 mdio@3000 {
280 #address-cells = <1>; 271 #address-cells = <1>;
281 #size-cells = <0>; 272 #size-cells = <0>;
282 device_type = "mdio"; 273 compatible = "fsl,mpc5200b-mdio";
283 compatible = "mpc5200b-fec-phy";
284 reg = <3000 400>; // fec range, since we need to setup fec interrupts 274 reg = <3000 400>; // fec range, since we need to setup fec interrupts
285 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 275 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
286 interrupt-parent = <&mpc5200_pic>; 276 interrupt-parent = <&mpc5200_pic>;
@@ -293,7 +283,7 @@
293 283
294 ata@3a00 { 284 ata@3a00 {
295 device_type = "ata"; 285 device_type = "ata";
296 compatible = "mpc5200b-ata","mpc5200-ata"; 286 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
297 reg = <3a00 100>; 287 reg = <3a00 100>;
298 interrupts = <2 7 0>; 288 interrupts = <2 7 0>;
299 interrupt-parent = <&mpc5200_pic>; 289 interrupt-parent = <&mpc5200_pic>;
@@ -302,7 +292,7 @@
302 i2c@3d00 { 292 i2c@3d00 {
303 #address-cells = <1>; 293 #address-cells = <1>;
304 #size-cells = <0>; 294 #size-cells = <0>;
305 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; 295 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
306 cell-index = <0>; 296 cell-index = <0>;
307 reg = <3d00 40>; 297 reg = <3d00 40>;
308 interrupts = <2 f 0>; 298 interrupts = <2 f 0>;
@@ -313,7 +303,7 @@
313 i2c@3d40 { 303 i2c@3d40 {
314 #address-cells = <1>; 304 #address-cells = <1>;
315 #size-cells = <0>; 305 #size-cells = <0>;
316 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; 306 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
317 cell-index = <1>; 307 cell-index = <1>;
318 reg = <3d40 40>; 308 reg = <3d40 40>;
319 interrupts = <2 10 0>; 309 interrupts = <2 10 0>;
@@ -321,8 +311,7 @@
321 fsl5200-clocking; 311 fsl5200-clocking;
322 }; 312 };
323 sram@8000 { 313 sram@8000 {
324 device_type = "sram"; 314 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram";
325 compatible = "mpc5200b-sram","mpc5200-sram","sram";
326 reg = <8000 4000>; 315 reg = <8000 4000>;
327 }; 316 };
328 }; 317 };
@@ -332,7 +321,7 @@
332 #size-cells = <2>; 321 #size-cells = <2>;
333 #address-cells = <3>; 322 #address-cells = <3>;
334 device_type = "pci"; 323 device_type = "pci";
335 compatible = "mpc5200b-pci","mpc5200-pci"; 324 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
336 reg = <f0000d00 100>; 325 reg = <f0000d00 100>;
337 interrupt-map-mask = <f800 0 0 7>; 326 interrupt-map-mask = <f800 0 0 7>;
338 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot 327 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index d8c316ae0a4..76951ab038e 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -10,12 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/*
14 * WARNING: Do not depend on this tree layout remaining static just yet.
15 * The MPC5200 device tree conventions are still in flux
16 * Keep an eye on the linuxppc-dev mailing list for more details
17 */
18
19/ { 13/ {
20 model = "promess,motionpro"; 14 model = "promess,motionpro";
21 compatible = "promess,motionpro"; 15 compatible = "promess,motionpro";
@@ -45,29 +39,28 @@
45 }; 39 };
46 40
47 soc5200@f0000000 { 41 soc5200@f0000000 {
48 model = "fsl,mpc5200b"; 42 #address-cells = <1>;
49 compatible = "fsl,mpc5200b"; 43 #size-cells = <1>;
50 revision = ""; // from bootloader 44 compatible = "fsl,mpc5200b-immr";
51 device_type = "soc";
52 ranges = <0 f0000000 0000c000>; 45 ranges = <0 f0000000 0000c000>;
53 reg = <f0000000 00000100>; 46 reg = <f0000000 00000100>;
54 bus-frequency = <0>; // from bootloader 47 bus-frequency = <0>; // from bootloader
55 system-frequency = <0>; // from bootloader 48 system-frequency = <0>; // from bootloader
56 49
57 cdm@200 { 50 cdm@200 {
58 compatible = "mpc5200b-cdm","mpc5200-cdm"; 51 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
59 reg = <200 38>; 52 reg = <200 38>;
60 }; 53 };
61 54
62 mpc5200_pic: pic@500 { 55 mpc5200_pic: interrupt-controller@500 {
63 // 5200 interrupts are encoded into two levels; 56 // 5200 interrupts are encoded into two levels;
64 interrupt-controller; 57 interrupt-controller;
65 #interrupt-cells = <3>; 58 #interrupt-cells = <3>;
66 compatible = "mpc5200b-pic","mpc5200-pic"; 59 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
67 reg = <500 80>; 60 reg = <500 80>;
68 }; 61 };
69 62
70 gpt@600 { // General Purpose Timer 63 timer@600 { // General Purpose Timer
71 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 64 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
72 reg = <600 10>; 65 reg = <600 10>;
73 interrupts = <1 9 0>; 66 interrupts = <1 9 0>;
@@ -75,35 +68,35 @@
75 fsl,has-wdt; 68 fsl,has-wdt;
76 }; 69 };
77 70
78 gpt@610 { // General Purpose Timer 71 timer@610 { // General Purpose Timer
79 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 72 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
80 reg = <610 10>; 73 reg = <610 10>;
81 interrupts = <1 a 0>; 74 interrupts = <1 a 0>;
82 interrupt-parent = <&mpc5200_pic>; 75 interrupt-parent = <&mpc5200_pic>;
83 }; 76 };
84 77
85 gpt@620 { // General Purpose Timer 78 timer@620 { // General Purpose Timer
86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 79 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
87 reg = <620 10>; 80 reg = <620 10>;
88 interrupts = <1 b 0>; 81 interrupts = <1 b 0>;
89 interrupt-parent = <&mpc5200_pic>; 82 interrupt-parent = <&mpc5200_pic>;
90 }; 83 };
91 84
92 gpt@630 { // General Purpose Timer 85 timer@630 { // General Purpose Timer
93 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
94 reg = <630 10>; 87 reg = <630 10>;
95 interrupts = <1 c 0>; 88 interrupts = <1 c 0>;
96 interrupt-parent = <&mpc5200_pic>; 89 interrupt-parent = <&mpc5200_pic>;
97 }; 90 };
98 91
99 gpt@640 { // General Purpose Timer 92 timer@640 { // General Purpose Timer
100 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 93 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
101 reg = <640 10>; 94 reg = <640 10>;
102 interrupts = <1 d 0>; 95 interrupts = <1 d 0>;
103 interrupt-parent = <&mpc5200_pic>; 96 interrupt-parent = <&mpc5200_pic>;
104 }; 97 };
105 98
106 gpt@650 { // General Purpose Timer 99 timer@650 { // General Purpose Timer
107 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 100 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
108 reg = <650 10>; 101 reg = <650 10>;
109 interrupts = <1 e 0>; 102 interrupts = <1 e 0>;
@@ -128,28 +121,28 @@
128 }; 121 };
129 122
130 rtc@800 { // Real time clock 123 rtc@800 { // Real time clock
131 compatible = "mpc5200b-rtc","mpc5200-rtc"; 124 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
132 reg = <800 100>; 125 reg = <800 100>;
133 interrupts = <1 5 0 1 6 0>; 126 interrupts = <1 5 0 1 6 0>;
134 interrupt-parent = <&mpc5200_pic>; 127 interrupt-parent = <&mpc5200_pic>;
135 }; 128 };
136 129
137 mscan@980 { 130 mscan@980 {
138 compatible = "mpc5200b-mscan","mpc5200-mscan"; 131 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
139 interrupts = <2 12 0>; 132 interrupts = <2 12 0>;
140 interrupt-parent = <&mpc5200_pic>; 133 interrupt-parent = <&mpc5200_pic>;
141 reg = <980 80>; 134 reg = <980 80>;
142 }; 135 };
143 136
144 gpio@b00 { 137 gpio@b00 {
145 compatible = "mpc5200b-gpio","mpc5200-gpio"; 138 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
146 reg = <b00 40>; 139 reg = <b00 40>;
147 interrupts = <1 7 0>; 140 interrupts = <1 7 0>;
148 interrupt-parent = <&mpc5200_pic>; 141 interrupt-parent = <&mpc5200_pic>;
149 }; 142 };
150 143
151 gpio-wkup@c00 { 144 gpio@c00 {
152 compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup"; 145 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
153 reg = <c00 40>; 146 reg = <c00 40>;
154 interrupts = <1 8 0 0 3 0>; 147 interrupts = <1 8 0 0 3 0>;
155 interrupt-parent = <&mpc5200_pic>; 148 interrupt-parent = <&mpc5200_pic>;
@@ -157,21 +150,21 @@
157 150
158 151
159 spi@f00 { 152 spi@f00 {
160 compatible = "mpc5200b-spi","mpc5200-spi"; 153 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
161 reg = <f00 20>; 154 reg = <f00 20>;
162 interrupts = <2 d 0 2 e 0>; 155 interrupts = <2 d 0 2 e 0>;
163 interrupt-parent = <&mpc5200_pic>; 156 interrupt-parent = <&mpc5200_pic>;
164 }; 157 };
165 158
166 usb@1000 { 159 usb@1000 {
167 compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be"; 160 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
168 reg = <1000 ff>; 161 reg = <1000 ff>;
169 interrupts = <2 6 0>; 162 interrupts = <2 6 0>;
170 interrupt-parent = <&mpc5200_pic>; 163 interrupt-parent = <&mpc5200_pic>;
171 }; 164 };
172 165
173 dma-controller@1200 { 166 dma-controller@1200 {
174 compatible = "mpc5200b-bestcomm","mpc5200-bestcomm"; 167 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
175 reg = <1200 80>; 168 reg = <1200 80>;
176 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 169 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
177 3 4 0 3 5 0 3 6 0 3 7 0 170 3 4 0 3 5 0 3 6 0 3 7 0
@@ -181,13 +174,13 @@
181 }; 174 };
182 175
183 xlb@1f00 { 176 xlb@1f00 {
184 compatible = "mpc5200b-xlb","mpc5200-xlb"; 177 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
185 reg = <1f00 100>; 178 reg = <1f00 100>;
186 }; 179 };
187 180
188 serial@2000 { // PSC1 181 serial@2000 { // PSC1
189 device_type = "serial"; 182 device_type = "serial";
190 compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 183 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
191 port-number = <0>; // Logical port assignment 184 port-number = <0>; // Logical port assignment
192 reg = <2000 100>; 185 reg = <2000 100>;
193 interrupts = <2 1 0>; 186 interrupts = <2 1 0>;
@@ -196,7 +189,7 @@
196 189
197 // PSC2 in spi master mode 190 // PSC2 in spi master mode
198 spi@2200 { // PSC2 191 spi@2200 { // PSC2
199 compatible = "mpc5200b-psc-spi","mpc5200-psc-spi"; 192 compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi";
200 cell-index = <1>; 193 cell-index = <1>;
201 reg = <2200 100>; 194 reg = <2200 100>;
202 interrupts = <2 2 0>; 195 interrupts = <2 2 0>;
@@ -206,7 +199,7 @@
206 // PSC5 in uart mode 199 // PSC5 in uart mode
207 serial@2800 { // PSC5 200 serial@2800 { // PSC5
208 device_type = "serial"; 201 device_type = "serial";
209 compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 202 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
210 port-number = <4>; // Logical port assignment 203 port-number = <4>; // Logical port assignment
211 reg = <2800 100>; 204 reg = <2800 100>;
212 interrupts = <2 c 0>; 205 interrupts = <2 c 0>;
@@ -215,22 +208,22 @@
215 208
216 ethernet@3000 { 209 ethernet@3000 {
217 device_type = "network"; 210 device_type = "network";
218 compatible = "mpc5200b-fec","mpc5200-fec"; 211 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
219 reg = <3000 800>; 212 reg = <3000 800>;
220 local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ 213 local-mac-address = [ 00 00 00 00 00 00 ];
221 interrupts = <2 5 0>; 214 interrupts = <2 5 0>;
222 interrupt-parent = <&mpc5200_pic>; 215 interrupt-parent = <&mpc5200_pic>;
223 }; 216 };
224 217
225 ata@3a00 { 218 ata@3a00 {
226 compatible = "mpc5200b-ata","mpc5200-ata"; 219 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
227 reg = <3a00 100>; 220 reg = <3a00 100>;
228 interrupts = <2 7 0>; 221 interrupts = <2 7 0>;
229 interrupt-parent = <&mpc5200_pic>; 222 interrupt-parent = <&mpc5200_pic>;
230 }; 223 };
231 224
232 i2c@3d40 { 225 i2c@3d40 {
233 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; 226 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
234 reg = <3d40 40>; 227 reg = <3d40 40>;
235 interrupts = <2 10 0>; 228 interrupts = <2 10 0>;
236 interrupt-parent = <&mpc5200_pic>; 229 interrupt-parent = <&mpc5200_pic>;
@@ -238,13 +231,12 @@
238 }; 231 };
239 232
240 sram@8000 { 233 sram@8000 {
241 compatible = "mpc5200b-sram","mpc5200-sram"; 234 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
242 reg = <8000 4000>; 235 reg = <8000 4000>;
243 }; 236 };
244 }; 237 };
245 238
246 lpb { 239 lpb {
247 model = "fsl,lpb";
248 compatible = "fsl,lpb"; 240 compatible = "fsl,lpb";
249 #address-cells = <2>; 241 #address-cells = <2>;
250 #size-cells = <1>; 242 #size-cells = <1>;
@@ -286,7 +278,7 @@
286 #size-cells = <2>; 278 #size-cells = <2>;
287 #address-cells = <3>; 279 #address-cells = <3>;
288 device_type = "pci"; 280 device_type = "pci";
289 compatible = "mpc5200b-pci","mpc5200-pci"; 281 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
290 reg = <f0000d00 100>; 282 reg = <f0000d00 100>;
291 interrupt-map-mask = <f800 0 0 7>; 283 interrupt-map-mask = <f800 0 0 7>;
292 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot 284 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index 5017cec3d38..c86464f007d 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -10,12 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/*
14 * WARNING: Do not depend on this tree layout remaining static just yet.
15 * The MPC5200 device tree conventions are still in flux
16 * Keep an eye on the linuxppc-dev mailing list for more details
17 */
18
19/ { 13/ {
20 model = "tqc,tqm5200"; 14 model = "tqc,tqm5200";
21 compatible = "tqc,tqm5200"; 15 compatible = "tqc,tqm5200";
@@ -45,29 +39,28 @@
45 }; 39 };
46 40
47 soc5200@f0000000 { 41 soc5200@f0000000 {
48 model = "fsl,mpc5200"; 42 #address-cells = <1>;
49 compatible = "fsl,mpc5200"; 43 #size-cells = <1>;
50 revision = ""; // from bootloader 44 compatible = "fsl,mpc5200-immr";
51 device_type = "soc";
52 ranges = <0 f0000000 0000c000>; 45 ranges = <0 f0000000 0000c000>;
53 reg = <f0000000 00000100>; 46 reg = <f0000000 00000100>;
54 bus-frequency = <0>; // from bootloader 47 bus-frequency = <0>; // from bootloader
55 system-frequency = <0>; // from bootloader 48 system-frequency = <0>; // from bootloader
56 49
57 cdm@200 { 50 cdm@200 {
58 compatible = "mpc5200-cdm"; 51 compatible = "fsl,mpc5200-cdm";
59 reg = <200 38>; 52 reg = <200 38>;
60 }; 53 };
61 54
62 mpc5200_pic: pic@500 { 55 mpc5200_pic: interrupt-controller@500 {
63 // 5200 interrupts are encoded into two levels; 56 // 5200 interrupts are encoded into two levels;
64 interrupt-controller; 57 interrupt-controller;
65 #interrupt-cells = <3>; 58 #interrupt-cells = <3>;
66 compatible = "mpc5200-pic"; 59 compatible = "fsl,mpc5200-pic";
67 reg = <500 80>; 60 reg = <500 80>;
68 }; 61 };
69 62
70 gpt@600 { // General Purpose Timer 63 timer@600 { // General Purpose Timer
71 compatible = "fsl,mpc5200-gpt"; 64 compatible = "fsl,mpc5200-gpt";
72 reg = <600 10>; 65 reg = <600 10>;
73 interrupts = <1 9 0>; 66 interrupts = <1 9 0>;
@@ -76,21 +69,21 @@
76 }; 69 };
77 70
78 gpio@b00 { 71 gpio@b00 {
79 compatible = "mpc5200-gpio"; 72 compatible = "fsl,mpc5200-gpio";
80 reg = <b00 40>; 73 reg = <b00 40>;
81 interrupts = <1 7 0>; 74 interrupts = <1 7 0>;
82 interrupt-parent = <&mpc5200_pic>; 75 interrupt-parent = <&mpc5200_pic>;
83 }; 76 };
84 77
85 usb@1000 { 78 usb@1000 {
86 compatible = "mpc5200-ohci","ohci-be"; 79 compatible = "fsl,mpc5200-ohci","ohci-be";
87 reg = <1000 ff>; 80 reg = <1000 ff>;
88 interrupts = <2 6 0>; 81 interrupts = <2 6 0>;
89 interrupt-parent = <&mpc5200_pic>; 82 interrupt-parent = <&mpc5200_pic>;
90 }; 83 };
91 84
92 dma-controller@1200 { 85 dma-controller@1200 {
93 compatible = "mpc5200-bestcomm"; 86 compatible = "fsl,mpc5200-bestcomm";
94 reg = <1200 80>; 87 reg = <1200 80>;
95 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 88 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
96 3 4 0 3 5 0 3 6 0 3 7 0 89 3 4 0 3 5 0 3 6 0 3 7 0
@@ -100,13 +93,13 @@
100 }; 93 };
101 94
102 xlb@1f00 { 95 xlb@1f00 {
103 compatible = "mpc5200-xlb"; 96 compatible = "fsl,mpc5200-xlb";
104 reg = <1f00 100>; 97 reg = <1f00 100>;
105 }; 98 };
106 99
107 serial@2000 { // PSC1 100 serial@2000 { // PSC1
108 device_type = "serial"; 101 device_type = "serial";
109 compatible = "mpc5200-psc-uart"; 102 compatible = "fsl,mpc5200-psc-uart";
110 port-number = <0>; // Logical port assignment 103 port-number = <0>; // Logical port assignment
111 reg = <2000 100>; 104 reg = <2000 100>;
112 interrupts = <2 1 0>; 105 interrupts = <2 1 0>;
@@ -115,7 +108,7 @@
115 108
116 serial@2200 { // PSC2 109 serial@2200 { // PSC2
117 device_type = "serial"; 110 device_type = "serial";
118 compatible = "mpc5200-psc-uart"; 111 compatible = "fsl,mpc5200-psc-uart";
119 port-number = <1>; // Logical port assignment 112 port-number = <1>; // Logical port assignment
120 reg = <2200 100>; 113 reg = <2200 100>;
121 interrupts = <2 2 0>; 114 interrupts = <2 2 0>;
@@ -124,7 +117,7 @@
124 117
125 serial@2400 { // PSC3 118 serial@2400 { // PSC3
126 device_type = "serial"; 119 device_type = "serial";
127 compatible = "mpc5200-psc-uart"; 120 compatible = "fsl,mpc5200-psc-uart";
128 port-number = <2>; // Logical port assignment 121 port-number = <2>; // Logical port assignment
129 reg = <2400 100>; 122 reg = <2400 100>;
130 interrupts = <2 3 0>; 123 interrupts = <2 3 0>;
@@ -133,22 +126,22 @@
133 126
134 ethernet@3000 { 127 ethernet@3000 {
135 device_type = "network"; 128 device_type = "network";
136 compatible = "mpc5200-fec"; 129 compatible = "fsl,mpc5200-fec";
137 reg = <3000 800>; 130 reg = <3000 800>;
138 local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ 131 local-mac-address = [ 00 00 00 00 00 00 ];
139 interrupts = <2 5 0>; 132 interrupts = <2 5 0>;
140 interrupt-parent = <&mpc5200_pic>; 133 interrupt-parent = <&mpc5200_pic>;
141 }; 134 };
142 135
143 ata@3a00 { 136 ata@3a00 {
144 compatible = "mpc5200-ata"; 137 compatible = "fsl,mpc5200-ata";
145 reg = <3a00 100>; 138 reg = <3a00 100>;
146 interrupts = <2 7 0>; 139 interrupts = <2 7 0>;
147 interrupt-parent = <&mpc5200_pic>; 140 interrupt-parent = <&mpc5200_pic>;
148 }; 141 };
149 142
150 i2c@3d40 { 143 i2c@3d40 {
151 compatible = "mpc5200-i2c","fsl-i2c"; 144 compatible = "fsl,mpc5200-i2c","fsl-i2c";
152 reg = <3d40 40>; 145 reg = <3d40 40>;
153 interrupts = <2 10 0>; 146 interrupts = <2 10 0>;
154 interrupt-parent = <&mpc5200_pic>; 147 interrupt-parent = <&mpc5200_pic>;
@@ -156,7 +149,7 @@
156 }; 149 };
157 150
158 sram@8000 { 151 sram@8000 {
159 compatible = "mpc5200-sram"; 152 compatible = "fsl,mpc5200-sram";
160 reg = <8000 4000>; 153 reg = <8000 4000>;
161 }; 154 };
162 }; 155 };
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index b6c68ef4680..9960421eb6b 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -126,7 +126,7 @@ int serial_console_init(void)
126 dt_is_compatible(devp, "fsl,cpm2-scc-uart") || 126 dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
127 dt_is_compatible(devp, "fsl,cpm2-smc-uart")) 127 dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
128 rc = cpm_console_init(devp, &serial_cd); 128 rc = cpm_console_init(devp, &serial_cd);
129 else if (dt_is_compatible(devp, "mpc5200-psc-uart")) 129 else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart"))
130 rc = mpc5200_psc_console_init(devp, &serial_cd); 130 rc = mpc5200_psc_console_init(devp, &serial_cd);
131 else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") || 131 else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
132 dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a")) 132 dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 5d89a21dd0d..5ab4c8466cc 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2142,82 +2142,34 @@ static void __init fixup_device_tree_pmac(void)
2142#endif 2142#endif
2143 2143
2144#ifdef CONFIG_PPC_EFIKA 2144#ifdef CONFIG_PPC_EFIKA
2145/* The current fw of the Efika has a device tree needs quite a few 2145/*
2146 * fixups to be compliant with the mpc52xx bindings. It's currently 2146 * The MPC5200 FEC driver requires an phy-handle property to tell it how
2147 * unknown if it will ever be compliant (come on bPlan ...) so we do fixups. 2147 * to talk to the phy. If the phy-handle property is missing, then this
2148 * NOTE that we (barely) tolerate it because the EFIKA was out before 2148 * function is called to add the appropriate nodes and link it to the
2149 * the bindings were finished, for any new boards -> RTFM ! */ 2149 * ethernet node.
2150 2150 */
2151struct subst_entry { 2151static void __init fixup_device_tree_efika_add_phy(void)
2152 char *path;
2153 char *property;
2154 void *value;
2155 int value_len;
2156};
2157
2158static void __init fixup_device_tree_efika(void)
2159{ 2152{
2160 /* Substitution table */
2161 #define prop_cstr(x) x, sizeof(x)
2162 int prop_sound_irq[3] = { 2, 2, 0 };
2163 int prop_bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
2164 3,4,0, 3,5,0, 3,6,0, 3,7,0,
2165 3,8,0, 3,9,0, 3,10,0, 3,11,0,
2166 3,12,0, 3,13,0, 3,14,0, 3,15,0 };
2167 struct subst_entry efika_subst_table[] = {
2168 { "/", "device_type", prop_cstr("efika") },
2169 { "/builtin", "device_type", prop_cstr("soc") },
2170 { "/builtin/ata", "compatible", prop_cstr("mpc5200b-ata\0mpc5200-ata"), },
2171 { "/builtin/bestcomm", "compatible", prop_cstr("mpc5200b-bestcomm\0mpc5200-bestcomm") },
2172 { "/builtin/bestcomm", "interrupts", prop_bcomm_irq, sizeof(prop_bcomm_irq) },
2173 { "/builtin/ethernet", "compatible", prop_cstr("mpc5200b-fec\0mpc5200-fec") },
2174 { "/builtin/pic", "compatible", prop_cstr("mpc5200b-pic\0mpc5200-pic") },
2175 { "/builtin/serial", "compatible", prop_cstr("mpc5200b-psc-uart\0mpc5200-psc-uart") },
2176 { "/builtin/sound", "compatible", prop_cstr("mpc5200b-psc-ac97\0mpc5200-psc-ac97") },
2177 { "/builtin/sound", "interrupts", prop_sound_irq, sizeof(prop_sound_irq) },
2178 { "/builtin/sram", "compatible", prop_cstr("mpc5200b-sram\0mpc5200-sram") },
2179 { "/builtin/sram", "device_type", prop_cstr("sram") },
2180 {}
2181 };
2182 #undef prop_cstr
2183
2184 /* Vars */
2185 u32 node; 2153 u32 node;
2186 char prop[64]; 2154 char prop[64];
2187 int rv, i; 2155 int rv;
2188 2156
2189 /* Check if we're really running on a EFIKA */ 2157 /* Check if /builtin/ethernet exists - bail if it doesn't */
2190 node = call_prom("finddevice", 1, 1, ADDR("/")); 2158 node = call_prom("finddevice", 1, 1, ADDR("/builtin/ethernet"));
2191 if (!PHANDLE_VALID(node)) 2159 if (!PHANDLE_VALID(node))
2192 return; 2160 return;
2193 2161
2194 rv = prom_getprop(node, "model", prop, sizeof(prop)); 2162 /* Check if the phy-handle property exists - bail if it does */
2195 if (rv == PROM_ERROR) 2163 rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
2196 return; 2164 if (!rv)
2197 if (strcmp(prop, "EFIKA5K2"))
2198 return; 2165 return;
2199 2166
2200 prom_printf("Applying EFIKA device tree fixups\n"); 2167 /*
2201 2168 * At this point the ethernet device doesn't have a phy described.
2202 /* Process substitution table */ 2169 * Now we need to add the missing phy node and linkage
2203 for (i=0; efika_subst_table[i].path; i++) { 2170 */
2204 struct subst_entry *se = &efika_subst_table[i];
2205
2206 node = call_prom("finddevice", 1, 1, ADDR(se->path));
2207 if (!PHANDLE_VALID(node)) {
2208 prom_printf("fixup_device_tree_efika: ",
2209 "skipped entry %x - not found\n", i);
2210 continue;
2211 }
2212
2213 rv = prom_setprop(node, se->path, se->property,
2214 se->value, se->value_len );
2215 if (rv == PROM_ERROR)
2216 prom_printf("fixup_device_tree_efika: ",
2217 "skipped entry %x - setprop error\n", i);
2218 }
2219 2171
2220 /* Make sure ethernet mdio bus node exists */ 2172 /* Check for an MDIO bus node - if missing then create one */
2221 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio")); 2173 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
2222 if (!PHANDLE_VALID(node)) { 2174 if (!PHANDLE_VALID(node)) {
2223 prom_printf("Adding Ethernet MDIO node\n"); 2175 prom_printf("Adding Ethernet MDIO node\n");
@@ -2226,8 +2178,8 @@ static void __init fixup_device_tree_efika(void)
2226 " new-device" 2178 " new-device"
2227 " 1 encode-int s\" #address-cells\" property" 2179 " 1 encode-int s\" #address-cells\" property"
2228 " 0 encode-int s\" #size-cells\" property" 2180 " 0 encode-int s\" #size-cells\" property"
2229 " s\" mdio\" 2dup device-name device-type" 2181 " s\" mdio\" device-name"
2230 " s\" mpc5200b-fec-phy\" encode-string" 2182 " s\" fsl,mpc5200b-mdio\" encode-string"
2231 " s\" compatible\" property" 2183 " s\" compatible\" property"
2232 " 0xf0003000 0x400 reg" 2184 " 0xf0003000 0x400 reg"
2233 " 0x2 encode-int" 2185 " 0x2 encode-int"
@@ -2237,8 +2189,10 @@ static void __init fixup_device_tree_efika(void)
2237 " finish-device"); 2189 " finish-device");
2238 }; 2190 };
2239 2191
2240 /* Make sure ethernet phy device node exist */ 2192 /* Check for a PHY device node - if missing then create one and
2241 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy")); 2193 * give it's phandle to the ethernet node */
2194 node = call_prom("finddevice", 1, 1,
2195 ADDR("/builtin/mdio/ethernet-phy"));
2242 if (!PHANDLE_VALID(node)) { 2196 if (!PHANDLE_VALID(node)) {
2243 prom_printf("Adding Ethernet PHY node\n"); 2197 prom_printf("Adding Ethernet PHY node\n");
2244 call_prom("interpret", 1, 1, 2198 call_prom("interpret", 1, 1,
@@ -2254,7 +2208,62 @@ static void __init fixup_device_tree_efika(void)
2254 " s\" phy-handle\" property" 2208 " s\" phy-handle\" property"
2255 " device-end"); 2209 " device-end");
2256 } 2210 }
2211}
2212
2213static void __init fixup_device_tree_efika(void)
2214{
2215 int sound_irq[3] = { 2, 2, 0 };
2216 int bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
2217 3,4,0, 3,5,0, 3,6,0, 3,7,0,
2218 3,8,0, 3,9,0, 3,10,0, 3,11,0,
2219 3,12,0, 3,13,0, 3,14,0, 3,15,0 };
2220 u32 node;
2221 char prop[64];
2222 int rv, len;
2223
2224 /* Check if we're really running on a EFIKA */
2225 node = call_prom("finddevice", 1, 1, ADDR("/"));
2226 if (!PHANDLE_VALID(node))
2227 return;
2228
2229 rv = prom_getprop(node, "model", prop, sizeof(prop));
2230 if (rv == PROM_ERROR)
2231 return;
2232 if (strcmp(prop, "EFIKA5K2"))
2233 return;
2234
2235 prom_printf("Applying EFIKA device tree fixups\n");
2236
2237 /* Claiming to be 'chrp' is death */
2238 node = call_prom("finddevice", 1, 1, ADDR("/"));
2239 rv = prom_getprop(node, "device_type", prop, sizeof(prop));
2240 if (rv != PROM_ERROR && (strcmp(prop, "chrp") == 0))
2241 prom_setprop(node, "/", "device_type", "efika", sizeof("efika"));
2242
2243 /* Fixup bestcomm interrupts property */
2244 node = call_prom("finddevice", 1, 1, ADDR("/builtin/bestcomm"));
2245 if (PHANDLE_VALID(node)) {
2246 len = prom_getproplen(node, "interrupts");
2247 if (len == 12) {
2248 prom_printf("Fixing bestcomm interrupts property\n");
2249 prom_setprop(node, "/builtin/bestcom", "interrupts",
2250 bcomm_irq, sizeof(bcomm_irq));
2251 }
2252 }
2253
2254 /* Fixup sound interrupts property */
2255 node = call_prom("finddevice", 1, 1, ADDR("/builtin/sound"));
2256 if (PHANDLE_VALID(node)) {
2257 rv = prom_getprop(node, "interrupts", prop, sizeof(prop));
2258 if (rv == PROM_ERROR) {
2259 prom_printf("Adding sound interrupts property\n");
2260 prom_setprop(node, "/builtin/sound", "interrupts",
2261 sound_irq, sizeof(sound_irq));
2262 }
2263 }
2257 2264
2265 /* Make sure ethernet phy-handle property exists */
2266 fixup_device_tree_efika_add_phy();
2258} 2267}
2259#else 2268#else
2260#define fixup_device_tree_efika() 2269#define fixup_device_tree_efika()
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig
index 733a8063d40..515f244c90b 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -1,31 +1,14 @@
1config PPC_MPC52xx 1config PPC_MPC52xx
2 bool 2 bool "52xx-based boards"
3 depends on PPC_MULTIPLATFORM && PPC32
3 select FSL_SOC 4 select FSL_SOC
4 select PPC_CLOCK 5 select PPC_CLOCK
5 default n
6
7config PPC_MPC5200
8 bool
9 select PPC_MPC52xx
10 default n
11
12config PPC_MPC5200_BUGFIX
13 bool "MPC5200 (L25R) bugfix support"
14 depends on PPC_MPC5200
15 default n
16 help
17 Enable workarounds for original MPC5200 errata. This is not required
18 for MPC5200B based boards.
19
20 It is safe to say 'Y' here
21 6
22config PPC_MPC5200_SIMPLE 7config PPC_MPC5200_SIMPLE
23 bool "Generic support for simple MPC5200 based boards" 8 bool "Generic support for simple MPC5200 based boards"
24 depends on PPC_MULTIPLATFORM && PPC32 9 depends on PPC_MPC52xx
25 select PPC_MPC5200
26 select DEFAULT_UIMAGE 10 select DEFAULT_UIMAGE
27 select WANT_DEVICE_TREE 11 select WANT_DEVICE_TREE
28 default n
29 help 12 help
30 This option enables support for a simple MPC52xx based boards which 13 This option enables support for a simple MPC52xx based boards which
31 do not need a custom platform specific setup. Such boards are 14 do not need a custom platform specific setup. Such boards are
@@ -43,17 +26,23 @@ config PPC_MPC5200_SIMPLE
43 26
44config PPC_EFIKA 27config PPC_EFIKA
45 bool "bPlan Efika 5k2. MPC5200B based computer" 28 bool "bPlan Efika 5k2. MPC5200B based computer"
46 depends on PPC_MULTIPLATFORM && PPC32 29 depends on PPC_MPC52xx
47 select PPC_RTAS 30 select PPC_RTAS
48 select RTAS_PROC 31 select RTAS_PROC
49 select PPC_MPC52xx
50 select PPC_NATIVE 32 select PPC_NATIVE
51 default n
52 33
53config PPC_LITE5200 34config PPC_LITE5200
54 bool "Freescale Lite5200 Eval Board" 35 bool "Freescale Lite5200 Eval Board"
55 depends on PPC_MULTIPLATFORM && PPC32 36 depends on PPC_MPC52xx
56 select PPC_MPC5200
57 select DEFAULT_UIMAGE 37 select DEFAULT_UIMAGE
58 select WANT_DEVICE_TREE 38 select WANT_DEVICE_TREE
59 default n 39
40config PPC_MPC5200_BUGFIX
41 bool "MPC5200 (L25R) bugfix support"
42 depends on PPC_MPC52xx
43 help
44 Enable workarounds for original MPC5200 errata. This is not required
45 for MPC5200B based boards.
46
47 It is safe to say 'Y' here
48
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index a0da70c8b50..a2068faef6e 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -180,6 +180,9 @@ static void __init efika_setup_arch(void)
180{ 180{
181 rtas_initialize(); 181 rtas_initialize();
182 182
183 /* Map important registers from the internal memory map */
184 mpc52xx_map_common_devices();
185
183 efika_pcisetup(); 186 efika_pcisetup();
184 187
185#ifdef CONFIG_PM 188#ifdef CONFIG_PM
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 5a8d190f53e..956f459e175 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -32,6 +32,19 @@
32 * 32 *
33 */ 33 */
34 34
35/* mpc5200 device tree match tables */
36static struct of_device_id mpc5200_cdm_ids[] __initdata = {
37 { .compatible = "fsl,mpc5200-cdm", },
38 { .compatible = "mpc5200-cdm", },
39 {}
40};
41
42static struct of_device_id mpc5200_gpio_ids[] __initdata = {
43 { .compatible = "fsl,mpc5200-gpio", },
44 { .compatible = "mpc5200-gpio", },
45 {}
46};
47
35/* 48/*
36 * Fix clock configuration. 49 * Fix clock configuration.
37 * 50 *
@@ -44,9 +57,8 @@ lite5200_fix_clock_config(void)
44{ 57{
45 struct device_node *np; 58 struct device_node *np;
46 struct mpc52xx_cdm __iomem *cdm; 59 struct mpc52xx_cdm __iomem *cdm;
47
48 /* Map zones */ 60 /* Map zones */
49 np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm"); 61 np = of_find_matching_node(NULL, mpc5200_cdm_ids);
50 cdm = of_iomap(np, 0); 62 cdm = of_iomap(np, 0);
51 of_node_put(np); 63 of_node_put(np);
52 if (!cdm) { 64 if (!cdm) {
@@ -81,7 +93,7 @@ lite5200_fix_port_config(void)
81 struct mpc52xx_gpio __iomem *gpio; 93 struct mpc52xx_gpio __iomem *gpio;
82 u32 port_config; 94 u32 port_config;
83 95
84 np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio"); 96 np = of_find_matching_node(NULL, mpc5200_gpio_ids);
85 gpio = of_iomap(np, 0); 97 gpio = of_iomap(np, 0);
86 of_node_put(np); 98 of_node_put(np);
87 if (!gpio) { 99 if (!gpio) {
@@ -140,15 +152,15 @@ static void __init lite5200_setup_arch(void)
140 if (ppc_md.progress) 152 if (ppc_md.progress)
141 ppc_md.progress("lite5200_setup_arch()", 0); 153 ppc_md.progress("lite5200_setup_arch()", 0);
142 154
143 /* Fix things that firmware should have done. */ 155 /* Map important registers from the internal memory map */
144 lite5200_fix_clock_config(); 156 mpc52xx_map_common_devices();
145 lite5200_fix_port_config();
146 157
147 /* Some mpc5200 & mpc5200b related configuration */ 158 /* Some mpc5200 & mpc5200b related configuration */
148 mpc5200_setup_xlb_arbiter(); 159 mpc5200_setup_xlb_arbiter();
149 160
150 /* Map wdt for mpc52xx_restart() */ 161 /* Fix things that firmware should have done. */
151 mpc52xx_map_wdt(); 162 lite5200_fix_clock_config();
163 lite5200_fix_port_config();
152 164
153#ifdef CONFIG_PM 165#ifdef CONFIG_PM
154 mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare; 166 mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare;
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c
index c3ada1e340d..c0f13e8deb0 100644
--- a/arch/powerpc/platforms/52xx/lite5200_pm.c
+++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
@@ -43,6 +43,13 @@ static int lite5200_pm_set_target(suspend_state_t state)
43static int lite5200_pm_prepare(void) 43static int lite5200_pm_prepare(void)
44{ 44{
45 struct device_node *np; 45 struct device_node *np;
46 const struct of_device_id immr_ids[] = {
47 { .compatible = "fsl,mpc5200-immr", },
48 { .compatible = "fsl,mpc5200b-immr", },
49 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
50 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
51 {}
52 };
46 53
47 /* deep sleep? let mpc52xx code handle that */ 54 /* deep sleep? let mpc52xx code handle that */
48 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) 55 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
@@ -52,7 +59,7 @@ static int lite5200_pm_prepare(void)
52 return -EINVAL; 59 return -EINVAL;
53 60
54 /* map registers */ 61 /* map registers */
55 np = of_find_compatible_node(NULL, NULL, "mpc5200"); 62 np = of_find_matching_node(NULL, immr_ids);
56 mbar = of_iomap(np, 0); 63 mbar = of_iomap(np, 0);
57 of_node_put(np); 64 of_node_put(np);
58 if (!mbar) { 65 if (!mbar) {
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index 754aa932f59..c48b82bc2aa 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -39,12 +39,12 @@ static void __init mpc5200_simple_setup_arch(void)
39 if (ppc_md.progress) 39 if (ppc_md.progress)
40 ppc_md.progress("mpc5200_simple_setup_arch()", 0); 40 ppc_md.progress("mpc5200_simple_setup_arch()", 0);
41 41
42 /* Map important registers from the internal memory map */
43 mpc52xx_map_common_devices();
44
42 /* Some mpc5200 & mpc5200b related configuration */ 45 /* Some mpc5200 & mpc5200b related configuration */
43 mpc5200_setup_xlb_arbiter(); 46 mpc5200_setup_xlb_arbiter();
44 47
45 /* Map wdt for mpc52xx_restart() */
46 mpc52xx_map_wdt();
47
48 mpc52xx_setup_pci(); 48 mpc52xx_setup_pci();
49} 49}
50 50
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 66955937be2..9aa4425d80b 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -13,18 +13,38 @@
13#undef DEBUG 13#undef DEBUG
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/spinlock.h>
16#include <linux/of_platform.h> 17#include <linux/of_platform.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <asm/prom.h> 19#include <asm/prom.h>
19#include <asm/mpc52xx.h> 20#include <asm/mpc52xx.h>
20 21
22/* MPC5200 device tree match tables */
23static struct of_device_id mpc52xx_xlb_ids[] __initdata = {
24 { .compatible = "fsl,mpc5200-xlb", },
25 { .compatible = "mpc5200-xlb", },
26 {}
27};
28static struct of_device_id mpc52xx_bus_ids[] __initdata = {
29 { .compatible = "fsl,mpc5200-immr", },
30 { .compatible = "fsl,mpc5200b-immr", },
31 { .compatible = "fsl,lpb", },
32
33 /* depreciated matches; shouldn't be used in new device trees */
34 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
35 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
36 {}
37};
38
21/* 39/*
22 * This variable is mapped in mpc52xx_map_wdt() and used in mpc52xx_restart(). 40 * This variable is mapped in mpc52xx_map_wdt() and used in mpc52xx_restart().
23 * Permanent mapping is required because mpc52xx_restart() can be called 41 * Permanent mapping is required because mpc52xx_restart() can be called
24 * from interrupt context while node mapping (which calls ioremap()) 42 * from interrupt context while node mapping (which calls ioremap())
25 * cannot be used at such point. 43 * cannot be used at such point.
26 */ 44 */
27static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL; 45static spinlock_t mpc52xx_lock = SPIN_LOCK_UNLOCKED;
46static struct mpc52xx_gpt __iomem *mpc52xx_wdt;
47static struct mpc52xx_cdm __iomem *mpc52xx_cdm;
28 48
29/** 49/**
30 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device 50 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
@@ -65,7 +85,7 @@ mpc5200_setup_xlb_arbiter(void)
65 struct device_node *np; 85 struct device_node *np;
66 struct mpc52xx_xlb __iomem *xlb; 86 struct mpc52xx_xlb __iomem *xlb;
67 87
68 np = of_find_compatible_node(NULL, NULL, "mpc5200-xlb"); 88 np = of_find_matching_node(NULL, mpc52xx_xlb_ids);
69 xlb = of_iomap(np, 0); 89 xlb = of_iomap(np, 0);
70 of_node_put(np); 90 of_node_put(np);
71 if (!xlb) { 91 if (!xlb) {
@@ -88,16 +108,11 @@ mpc5200_setup_xlb_arbiter(void)
88 iounmap(xlb); 108 iounmap(xlb);
89} 109}
90 110
91static struct of_device_id mpc52xx_bus_ids[] __initdata= { 111/**
92 { .compatible = "fsl,mpc5200-immr", }, 112 * mpc52xx_declare_of_platform_devices: register internal devices and children
93 { .compatible = "fsl,lpb", }, 113 * of the localplus bus to the of_platform
94 114 * bus.
95 /* depreciated matches; shouldn't be used in new device trees */ 115 */
96 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
97 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
98 {},
99};
100
101void __init 116void __init
102mpc52xx_declare_of_platform_devices(void) 117mpc52xx_declare_of_platform_devices(void)
103{ 118{
@@ -107,35 +122,87 @@ mpc52xx_declare_of_platform_devices(void)
107 "Error while probing of_platform bus\n"); 122 "Error while probing of_platform bus\n");
108} 123}
109 124
125/*
126 * match tables used by mpc52xx_map_common_devices()
127 */
128static struct of_device_id mpc52xx_gpt_ids[] __initdata = {
129 { .compatible = "fsl,mpc5200-gpt", },
130 { .compatible = "mpc5200-gpt", }, /* old */
131 {}
132};
133static struct of_device_id mpc52xx_cdm_ids[] __initdata = {
134 { .compatible = "fsl,mpc5200-cdm", },
135 { .compatible = "mpc5200-cdm", }, /* old */
136 {}
137};
138
139/**
140 * mpc52xx_map_common_devices: iomap devices required by common code
141 */
110void __init 142void __init
111mpc52xx_map_wdt(void) 143mpc52xx_map_common_devices(void)
112{ 144{
113 const void *has_wdt;
114 struct device_node *np; 145 struct device_node *np;
115 146
116 /* mpc52xx_wdt is mapped here and used in mpc52xx_restart, 147 /* mpc52xx_wdt is mapped here and used in mpc52xx_restart,
117 * possibly from a interrupt context. wdt is only implement 148 * possibly from a interrupt context. wdt is only implement
118 * on a gpt0, so check has-wdt property before mapping. 149 * on a gpt0, so check has-wdt property before mapping.
119 */ 150 */
120 for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") { 151 for_each_matching_node(np, mpc52xx_gpt_ids) {
121 has_wdt = of_get_property(np, "fsl,has-wdt", NULL); 152 if (of_get_property(np, "fsl,has-wdt", NULL) ||
122 if (has_wdt) { 153 of_get_property(np, "has-wdt", NULL)) {
123 mpc52xx_wdt = of_iomap(np, 0); 154 mpc52xx_wdt = of_iomap(np, 0);
124 of_node_put(np); 155 of_node_put(np);
125 return; 156 break;
126 } 157 }
127 } 158 }
128 for_each_compatible_node(np, NULL, "mpc5200-gpt") {
129 has_wdt = of_get_property(np, "has-wdt", NULL);
130 if (has_wdt) {
131 mpc52xx_wdt = of_iomap(np, 0);
132 of_node_put(np);
133 return;
134 }
135 159
160 /* Clock Distribution Module, used by PSC clock setting function */
161 np = of_find_matching_node(NULL, mpc52xx_cdm_ids);
162 mpc52xx_cdm = of_iomap(np, 0);
163 of_node_put(np);
164}
165
166/**
167 * mpc52xx_set_psc_clkdiv: Set clock divider in the CDM for PSC ports
168 *
169 * @psc_id: id of psc port; must be 1,2,3 or 6
170 * @clkdiv: clock divider value to put into CDM PSC register.
171 */
172int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
173{
174 unsigned long flags;
175 u16 __iomem *reg;
176 u32 val;
177 u32 mask;
178 u32 mclken_div;
179
180 if (!mpc52xx_cdm)
181 return -ENODEV;
182
183 mclken_div = 0x8000 | (clkdiv & 0x1FF);
184 switch (psc_id) {
185 case 1: reg = &mpc52xx_cdm->mclken_div_psc1; mask = 0x20; break;
186 case 2: reg = &mpc52xx_cdm->mclken_div_psc2; mask = 0x40; break;
187 case 3: reg = &mpc52xx_cdm->mclken_div_psc3; mask = 0x80; break;
188 case 6: reg = &mpc52xx_cdm->mclken_div_psc6; mask = 0x10; break;
189 default:
190 return -ENODEV;
136 } 191 }
192
193 /* Set the rate and enable the clock */
194 spin_lock_irqsave(&mpc52xx_lock, flags);
195 out_be16(reg, mclken_div);
196 val = in_be32(&mpc52xx_cdm->clk_enables);
197 out_be32(&mpc52xx_cdm->clk_enables, val | mask);
198 spin_unlock_irqrestore(&mpc52xx_lock, flags);
199
200 return 0;
137} 201}
138 202
203/**
204 * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer
205 */
139void 206void
140mpc52xx_restart(char *cmd) 207mpc52xx_restart(char *cmd)
141{ 208{
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4b79398b2e4..e3428ddd904 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -99,6 +99,12 @@ struct mpc52xx_pci {
99 u8 reserved6[4]; /* PCI + 0xFC */ 99 u8 reserved6[4]; /* PCI + 0xFC */
100}; 100};
101 101
102/* MPC5200 device tree match tables */
103const struct of_device_id mpc52xx_pci_ids[] __initdata = {
104 { .type = "pci", .compatible = "fsl,mpc5200-pci", },
105 { .type = "pci", .compatible = "mpc5200-pci", },
106 {}
107};
102 108
103/* ======================================================================== */ 109/* ======================================================================== */
104/* PCI configuration acess */ 110/* PCI configuration acess */
@@ -411,9 +417,7 @@ void __init mpc52xx_setup_pci(void)
411{ 417{
412 struct device_node *pci; 418 struct device_node *pci;
413 419
414 pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci"); 420 pci = of_find_matching_node(NULL, mpc52xx_pci_ids);
415 if (!pci)
416 pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci");
417 if (!pci) 421 if (!pci)
418 return; 422 return;
419 423
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 07e89876d58..d0dead8b9a9 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -29,6 +29,18 @@
29 * 29 *
30*/ 30*/
31 31
32/* MPC5200 device tree match tables */
33static struct of_device_id mpc52xx_pic_ids[] __initdata = {
34 { .compatible = "fsl,mpc5200-pic", },
35 { .compatible = "mpc5200-pic", },
36 {}
37};
38static struct of_device_id mpc52xx_sdma_ids[] __initdata = {
39 { .compatible = "fsl,mpc5200-bestcomm", },
40 { .compatible = "mpc5200-bestcomm", },
41 {}
42};
43
32static struct mpc52xx_intr __iomem *intr; 44static struct mpc52xx_intr __iomem *intr;
33static struct mpc52xx_sdma __iomem *sdma; 45static struct mpc52xx_sdma __iomem *sdma;
34static struct irq_host *mpc52xx_irqhost = NULL; 46static struct irq_host *mpc52xx_irqhost = NULL;
@@ -367,13 +379,13 @@ void __init mpc52xx_init_irq(void)
367 struct device_node *np; 379 struct device_node *np;
368 380
369 /* Remap the necessary zones */ 381 /* Remap the necessary zones */
370 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic"); 382 picnode = of_find_matching_node(NULL, mpc52xx_pic_ids);
371 intr = of_iomap(picnode, 0); 383 intr = of_iomap(picnode, 0);
372 if (!intr) 384 if (!intr)
373 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. " 385 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
374 "Check node !"); 386 "Check node !");
375 387
376 np = of_find_compatible_node(NULL, NULL, "mpc5200-bestcomm"); 388 np = of_find_matching_node(NULL, mpc52xx_sdma_ids);
377 sdma = of_iomap(np, 0); 389 sdma = of_iomap(np, 0);
378 of_node_put(np); 390 of_node_put(np);
379 if (!sdma) 391 if (!sdma)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index 52f027789c8..c72d3304387 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -60,9 +60,16 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level)
60int mpc52xx_pm_prepare(void) 60int mpc52xx_pm_prepare(void)
61{ 61{
62 struct device_node *np; 62 struct device_node *np;
63 const struct of_device_id immr_ids[] = {
64 { .compatible = "fsl,mpc5200-immr", },
65 { .compatible = "fsl,mpc5200b-immr", },
66 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
67 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
68 {}
69 };
63 70
64 /* map the whole register space */ 71 /* map the whole register space */
65 np = of_find_compatible_node(NULL, NULL, "mpc5200"); 72 np = of_find_matching_node(NULL, immr_ids);
66 mbar = of_iomap(np, 0); 73 mbar = of_iomap(np, 0);
67 of_node_put(np); 74 of_node_put(np);
68 if (!mbar) { 75 if (!mbar) {
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 740ad73ce5c..f589999361e 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -29,11 +29,17 @@
29 29
30#define DRIVER_NAME "bestcomm-core" 30#define DRIVER_NAME "bestcomm-core"
31 31
32/* MPC5200 device tree match tables */
33static struct of_device_id mpc52xx_sram_ids[] __devinitdata = {
34 { .compatible = "fsl,mpc5200-sram", },
35 { .compatible = "mpc5200-sram", },
36 {}
37};
38
32 39
33struct bcom_engine *bcom_eng = NULL; 40struct bcom_engine *bcom_eng = NULL;
34EXPORT_SYMBOL_GPL(bcom_eng); /* needed for inline functions */ 41EXPORT_SYMBOL_GPL(bcom_eng); /* needed for inline functions */
35 42
36
37/* ======================================================================== */ 43/* ======================================================================== */
38/* Public and private API */ 44/* Public and private API */
39/* ======================================================================== */ 45/* ======================================================================== */
@@ -373,7 +379,7 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
373 of_node_get(op->node); 379 of_node_get(op->node);
374 380
375 /* Prepare SRAM */ 381 /* Prepare SRAM */
376 ofn_sram = of_find_compatible_node(NULL, "sram", "mpc5200-sram"); 382 ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids);
377 if (!ofn_sram) { 383 if (!ofn_sram) {
378 printk(KERN_ERR DRIVER_NAME ": " 384 printk(KERN_ERR DRIVER_NAME ": "
379 "No SRAM found in device tree\n"); 385 "No SRAM found in device tree\n");
@@ -478,10 +484,8 @@ mpc52xx_bcom_remove(struct of_device *op)
478} 484}
479 485
480static struct of_device_id mpc52xx_bcom_of_match[] = { 486static struct of_device_id mpc52xx_bcom_of_match[] = {
481 { 487 { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
482 .type = "dma-controller", 488 { .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
483 .compatible = "mpc5200-bestcomm",
484 },
485 {}, 489 {},
486}; 490};
487 491
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
index ecfa2c0f8ba..9f504fc7693 100644
--- a/arch/ppc/syslib/mpc52xx_setup.c
+++ b/arch/ppc/syslib/mpc52xx_setup.c
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18 18
19#include <linux/spinlock.h>
19#include <asm/io.h> 20#include <asm/io.h>
20#include <asm/time.h> 21#include <asm/time.h>
21#include <asm/mpc52xx.h> 22#include <asm/mpc52xx.h>
@@ -275,3 +276,38 @@ int mpc52xx_match_psc_function(int psc_idx, const char *func)
275 276
276 return 0; 277 return 0;
277} 278}
279
280int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
281{
282 static spinlock_t lock = SPIN_LOCK_UNLOCKED;
283 struct mpc52xx_cdm __iomem *cdm;
284 unsigned long flags;
285 u16 mclken_div;
286 u16 __iomem *reg;
287 u32 mask;
288
289 cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
290 if (!cdm) {
291 printk(KERN_ERR __FILE__ ": Error mapping CDM\n");
292 return -ENODEV;
293 }
294
295 mclken_div = 0x8000 | (clkdiv & 0x1FF);
296 switch (psc_id) {
297 case 1: reg = &cdm->mclken_div_psc1; mask = 0x20; break;
298 case 2: reg = &cdm->mclken_div_psc2; mask = 0x40; break;
299 case 3: reg = &cdm->mclken_div_psc3; mask = 0x80; break;
300 case 6: reg = &cdm->mclken_div_psc6; mask = 0x10; break;
301 default:
302 return -ENODEV;
303 }
304
305 /* Set the rate and enable the clock */
306 spin_lock_irqsave(&lock, flags);
307 out_be16(reg, mclken_div);
308 out_be32(&cdm->clk_enables, in_be32(&cdm->clk_enables) | mask);
309 spin_unlock_irqrestore(&lock, flags);
310
311 iounmap(cdm);
312 return 0;
313}
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 50c56e2814c..1a7ca37168b 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -494,10 +494,8 @@ mpc52xx_ata_resume(struct of_device *op)
494 494
495 495
496static struct of_device_id mpc52xx_ata_of_match[] = { 496static struct of_device_id mpc52xx_ata_of_match[] = {
497 { 497 { .compatible = "fsl,mpc5200-ata", },
498 .type = "ata", 498 { .compatible = "mpc5200-ata", },
499 .compatible = "mpc5200-ata",
500 },
501 {}, 499 {},
502}; 500};
503 501
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index f91ee700e60..58b71e60204 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -1057,10 +1057,8 @@ static int mpc52xx_fec_of_resume(struct of_device *op)
1057#endif 1057#endif
1058 1058
1059static struct of_device_id mpc52xx_fec_match[] = { 1059static struct of_device_id mpc52xx_fec_match[] = {
1060 { 1060 { .type = "network", .compatible = "fsl,mpc5200-fec", },
1061 .type = "network", 1061 { .type = "network", .compatible = "mpc5200-fec", },
1062 .compatible = "mpc5200-fec",
1063 },
1064 { } 1062 { }
1065}; 1063};
1066 1064
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index ba6e8b218e0..1837584c450 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -177,11 +177,9 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of)
177 177
178 178
179static struct of_device_id mpc52xx_fec_mdio_match[] = { 179static struct of_device_id mpc52xx_fec_mdio_match[] = {
180 { 180 { .compatible = "fsl,mpc5200b-mdio", },
181 .type = "mdio", 181 { .compatible = "mpc5200b-fec-phy", },
182 .compatible = "mpc5200b-fec-phy", 182 {}
183 },
184 {},
185}; 183};
186 184
187struct of_platform_driver mpc52xx_fec_mdio_driver = { 185struct of_platform_driver mpc52xx_fec_mdio_driver = {
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 1e3721a0eef..3c4d29e59b2 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -130,7 +130,9 @@ static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id);
130 130
131#if defined(CONFIG_PPC_MERGE) 131#if defined(CONFIG_PPC_MERGE)
132static struct of_device_id mpc52xx_uart_of_match[] = { 132static struct of_device_id mpc52xx_uart_of_match[] = {
133 { .type = "serial", .compatible = "mpc5200-psc-uart", }, 133 { .type = "serial", .compatible = "fsl,mpc5200-psc-uart", },
134 { .type = "serial", .compatible = "mpc5200-psc-uart", }, /* lite5200 */
135 { .type = "serial", .compatible = "mpc5200-serial", }, /* efika */
134 {}, 136 {},
135}; 137};
136#endif 138#endif
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index d398c93195e..253ed5682a6 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -330,80 +330,13 @@ static void mpc52xx_psc_spi_cleanup(struct spi_device *spi)
330 330
331static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps) 331static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
332{ 332{
333 struct device_node *np;
334 struct mpc52xx_cdm __iomem *cdm;
335 struct mpc52xx_gpio __iomem *gpio;
336 struct mpc52xx_psc __iomem *psc = mps->psc; 333 struct mpc52xx_psc __iomem *psc = mps->psc;
337 u32 ul;
338 u32 mclken_div; 334 u32 mclken_div;
339 int ret = 0; 335 int ret = 0;
340 336
341#if defined(CONFIG_PPC_MERGE)
342 np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
343 cdm = of_iomap(np, 0);
344 of_node_put(np);
345 np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
346 gpio = of_iomap(np, 0);
347 of_node_put(np);
348#else
349 cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
350 gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
351#endif
352 if (!cdm || !gpio) {
353 printk(KERN_ERR "Error mapping CDM/GPIO\n");
354 ret = -EFAULT;
355 goto unmap_regs;
356 }
357
358 /* default sysclk is 512MHz */ 337 /* default sysclk is 512MHz */
359 mclken_div = 0x8000 | 338 mclken_div = (mps->sysclk ? mps->sysclk : 512000000) / MCLK;
360 (((mps->sysclk ? mps->sysclk : 512000000) / MCLK) & 0x1FF); 339 mpc52xx_set_psc_clkdiv(psc_id, mclken_div);
361
362 switch (psc_id) {
363 case 1:
364 ul = in_be32(&gpio->port_config);
365 ul &= 0xFFFFFFF8;
366 ul |= 0x00000006;
367 out_be32(&gpio->port_config, ul);
368 out_be16(&cdm->mclken_div_psc1, mclken_div);
369 ul = in_be32(&cdm->clk_enables);
370 ul |= 0x00000020;
371 out_be32(&cdm->clk_enables, ul);
372 break;
373 case 2:
374 ul = in_be32(&gpio->port_config);
375 ul &= 0xFFFFFF8F;
376 ul |= 0x00000060;
377 out_be32(&gpio->port_config, ul);
378 out_be16(&cdm->mclken_div_psc2, mclken_div);
379 ul = in_be32(&cdm->clk_enables);
380 ul |= 0x00000040;
381 out_be32(&cdm->clk_enables, ul);
382 break;
383 case 3:
384 ul = in_be32(&gpio->port_config);
385 ul &= 0xFFFFF0FF;
386 ul |= 0x00000600;
387 out_be32(&gpio->port_config, ul);
388 out_be16(&cdm->mclken_div_psc3, mclken_div);
389 ul = in_be32(&cdm->clk_enables);
390 ul |= 0x00000080;
391 out_be32(&cdm->clk_enables, ul);
392 break;
393 case 6:
394 ul = in_be32(&gpio->port_config);
395 ul &= 0xFF8FFFFF;
396 ul |= 0x00700000;
397 out_be32(&gpio->port_config, ul);
398 out_be16(&cdm->mclken_div_psc6, mclken_div);
399 ul = in_be32(&cdm->clk_enables);
400 ul |= 0x00000010;
401 out_be32(&cdm->clk_enables, ul);
402 break;
403 default:
404 ret = -EINVAL;
405 goto unmap_regs;
406 }
407 340
408 /* Reset the PSC into a known state */ 341 /* Reset the PSC into a known state */
409 out_8(&psc->command, MPC52xx_PSC_RST_RX); 342 out_8(&psc->command, MPC52xx_PSC_RST_RX);
@@ -427,12 +360,6 @@ static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
427 360
428 mps->bits_per_word = 8; 361 mps->bits_per_word = 8;
429 362
430unmap_regs:
431 if (cdm)
432 iounmap(cdm);
433 if (gpio)
434 iounmap(gpio);
435
436 return ret; 363 return ret;
437} 364}
438 365
@@ -628,8 +555,9 @@ static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op)
628} 555}
629 556
630static struct of_device_id mpc52xx_psc_spi_of_match[] = { 557static struct of_device_id mpc52xx_psc_spi_of_match[] = {
631 { .type = "spi", .compatible = "mpc5200-psc-spi", }, 558 { .compatible = "fsl,mpc5200-psc-spi", },
632 {}, 559 { .compatible = "mpc5200-psc-spi", }, /* old */
560 {}
633}; 561};
634 562
635MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match); 563MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match);
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 0c3e6b790b7..a6725279122 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -136,6 +136,8 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
136 ohci = hcd_to_ohci(hcd); 136 ohci = hcd_to_ohci(hcd);
137 if (is_bigendian) { 137 if (is_bigendian) {
138 ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC; 138 ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
139 if (of_device_is_compatible(dn, "fsl,mpc5200-ohci"))
140 ohci->flags |= OHCI_QUIRK_FRAME_NO;
139 if (of_device_is_compatible(dn, "mpc5200-ohci")) 141 if (of_device_is_compatible(dn, "mpc5200-ohci"))
140 ohci->flags |= OHCI_QUIRK_FRAME_NO; 142 ohci->flags |= OHCI_QUIRK_FRAME_NO;
141 } 143 }
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index 1c48c6d1633..81ef10b6b67 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -248,13 +248,19 @@ struct mpc52xx_cdm {
248 248
249#ifndef __ASSEMBLY__ 249#ifndef __ASSEMBLY__
250 250
251/* mpc52xx_common.c */
251extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node); 252extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
252extern void mpc5200_setup_xlb_arbiter(void); 253extern void mpc5200_setup_xlb_arbiter(void);
253extern void mpc52xx_declare_of_platform_devices(void); 254extern void mpc52xx_declare_of_platform_devices(void);
255extern void mpc52xx_map_common_devices(void);
256extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
257extern void mpc52xx_restart(char *cmd);
254 258
259/* mpc52xx_pic.c */
255extern void mpc52xx_init_irq(void); 260extern void mpc52xx_init_irq(void);
256extern unsigned int mpc52xx_get_irq(void); 261extern unsigned int mpc52xx_get_irq(void);
257 262
263/* mpc52xx_pci.c */
258#ifdef CONFIG_PCI 264#ifdef CONFIG_PCI
259extern int __init mpc52xx_add_bridge(struct device_node *node); 265extern int __init mpc52xx_add_bridge(struct device_node *node);
260extern void __init mpc52xx_setup_pci(void); 266extern void __init mpc52xx_setup_pci(void);
@@ -262,9 +268,6 @@ extern void __init mpc52xx_setup_pci(void);
262static inline void mpc52xx_setup_pci(void) { } 268static inline void mpc52xx_setup_pci(void) { }
263#endif 269#endif
264 270
265extern void __init mpc52xx_map_wdt(void);
266extern void mpc52xx_restart(char *cmd);
267
268#endif /* __ASSEMBLY__ */ 271#endif /* __ASSEMBLY__ */
269 272
270#ifdef CONFIG_PM 273#ifdef CONFIG_PM