diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-18 00:58:15 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-18 01:00:38 -0500 |
commit | 35891d40bfc4f41fc627abb757c0894c0028f3ab (patch) | |
tree | beabb57ce8423538cd534a774fb5c0f8a3a8ec74 /arch | |
parent | 80fa93fce37d3490f4bb0da8a5b239a6745bc744 (diff) | |
parent | 76f3e2929bb6b476fb02b519ad953e2e29ee7bd5 (diff) |
Merge remote-tracking branch 'scottwood/next' into next
Scott says:
"Highlights include a bunch of 8xx optimizations, device tree bindings
for Freescale BMan, QMan, and FMan datapath components, misc device tree
updates, and inbound rio window support."
Diffstat (limited to 'arch')
35 files changed, 553 insertions, 541 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 421df5cc6d18..af696874248b 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -552,7 +552,7 @@ config PPC_4K_PAGES | |||
552 | bool "4k page size" | 552 | bool "4k page size" |
553 | 553 | ||
554 | config PPC_16K_PAGES | 554 | config PPC_16K_PAGES |
555 | bool "16k page size" if 44x | 555 | bool "16k page size" if 44x || PPC_8xx |
556 | 556 | ||
557 | config PPC_64K_PAGES | 557 | config PPC_64K_PAGES |
558 | bool "64k page size" if 44x || PPC_STD_MMU_64 || PPC_BOOK3E_64 | 558 | bool "64k page size" if 44x || PPC_STD_MMU_64 || PPC_BOOK3E_64 |
diff --git a/arch/powerpc/boot/dts/b4860emu.dts b/arch/powerpc/boot/dts/b4860emu.dts index 85646b4f96e1..2aa5cd318ce8 100644 --- a/arch/powerpc/boot/dts/b4860emu.dts +++ b/arch/powerpc/boot/dts/b4860emu.dts | |||
@@ -193,9 +193,9 @@ | |||
193 | fsl,liodn-bits = <12>; | 193 | fsl,liodn-bits = <12>; |
194 | }; | 194 | }; |
195 | 195 | ||
196 | clockgen: global-utilities@e1000 { | 196 | /include/ "fsl/qoriq-clockgen2.dtsi" |
197 | global-utilities@e1000 { | ||
197 | compatible = "fsl,b4-clockgen", "fsl,qoriq-clockgen-2.0"; | 198 | compatible = "fsl,b4-clockgen", "fsl,qoriq-clockgen-2.0"; |
198 | reg = <0xe1000 0x1000>; | ||
199 | }; | 199 | }; |
200 | 200 | ||
201 | /include/ "fsl/qoriq-dma-0.dtsi" | 201 | /include/ "fsl/qoriq-dma-0.dtsi" |
diff --git a/arch/powerpc/boot/dts/b4qds.dtsi b/arch/powerpc/boot/dts/b4qds.dtsi index 8b47edcfabf0..e5bde0b85135 100644 --- a/arch/powerpc/boot/dts/b4qds.dtsi +++ b/arch/powerpc/boot/dts/b4qds.dtsi | |||
@@ -152,6 +152,29 @@ | |||
152 | reg = <0x68>; | 152 | reg = <0x68>; |
153 | }; | 153 | }; |
154 | }; | 154 | }; |
155 | |||
156 | i2c@2 { | ||
157 | #address-cells = <1>; | ||
158 | #size-cells = <0>; | ||
159 | reg = <0x2>; | ||
160 | |||
161 | ina220@40 { | ||
162 | compatible = "ti,ina220"; | ||
163 | reg = <0x40>; | ||
164 | shunt-resistor = <1000>; | ||
165 | }; | ||
166 | }; | ||
167 | |||
168 | i2c@3 { | ||
169 | #address-cells = <1>; | ||
170 | #size-cells = <0>; | ||
171 | reg = <0x3>; | ||
172 | |||
173 | adt7461@4c { | ||
174 | compatible = "adi,adt7461"; | ||
175 | reg = <0x4c>; | ||
176 | }; | ||
177 | }; | ||
155 | }; | 178 | }; |
156 | }; | 179 | }; |
157 | 180 | ||
diff --git a/arch/powerpc/boot/dts/bsc9131rdb.dtsi b/arch/powerpc/boot/dts/bsc9131rdb.dtsi index 9e6c01339ccc..45efcbadb23c 100644 --- a/arch/powerpc/boot/dts/bsc9131rdb.dtsi +++ b/arch/powerpc/boot/dts/bsc9131rdb.dtsi | |||
@@ -40,31 +40,6 @@ | |||
40 | compatible = "fsl,ifc-nand"; | 40 | compatible = "fsl,ifc-nand"; |
41 | reg = <0x0 0x0 0x4000>; | 41 | reg = <0x0 0x0 0x4000>; |
42 | 42 | ||
43 | partition@0 { | ||
44 | /* This location must not be altered */ | ||
45 | /* 3MB for u-boot Bootloader Image */ | ||
46 | reg = <0x0 0x00300000>; | ||
47 | label = "NAND U-Boot Image"; | ||
48 | read-only; | ||
49 | }; | ||
50 | |||
51 | partition@300000 { | ||
52 | /* 1MB for DTB Image */ | ||
53 | reg = <0x00300000 0x00100000>; | ||
54 | label = "NAND DTB Image"; | ||
55 | }; | ||
56 | |||
57 | partition@400000 { | ||
58 | /* 8MB for Linux Kernel Image */ | ||
59 | reg = <0x00400000 0x00800000>; | ||
60 | label = "NAND Linux Kernel Image"; | ||
61 | }; | ||
62 | |||
63 | partition@c00000 { | ||
64 | /* Rest space for Root file System Image */ | ||
65 | reg = <0x00c00000 0x07400000>; | ||
66 | label = "NAND RFS Image"; | ||
67 | }; | ||
68 | }; | 43 | }; |
69 | }; | 44 | }; |
70 | 45 | ||
@@ -82,31 +57,6 @@ | |||
82 | reg = <0>; | 57 | reg = <0>; |
83 | spi-max-frequency = <50000000>; | 58 | spi-max-frequency = <50000000>; |
84 | 59 | ||
85 | /* 512KB for u-boot Bootloader Image */ | ||
86 | partition@0 { | ||
87 | reg = <0x0 0x00080000>; | ||
88 | label = "SPI Flash U-Boot Image"; | ||
89 | read-only; | ||
90 | }; | ||
91 | |||
92 | /* 512KB for DTB Image */ | ||
93 | partition@80000 { | ||
94 | reg = <0x00080000 0x00080000>; | ||
95 | label = "SPI Flash DTB Image"; | ||
96 | }; | ||
97 | |||
98 | /* 4MB for Linux Kernel Image */ | ||
99 | partition@100000 { | ||
100 | reg = <0x00100000 0x00400000>; | ||
101 | label = "SPI Flash Kernel Image"; | ||
102 | }; | ||
103 | |||
104 | /*11MB for RFS Image */ | ||
105 | partition@500000 { | ||
106 | reg = <0x00500000 0x00B00000>; | ||
107 | label = "SPI Flash RFS Image"; | ||
108 | }; | ||
109 | |||
110 | }; | 60 | }; |
111 | }; | 61 | }; |
112 | 62 | ||
diff --git a/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi index d67894459ac8..86161ae6c966 100644 --- a/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi | |||
@@ -80,33 +80,9 @@ | |||
80 | compatible = "fsl,b4420-device-config", "fsl,qoriq-device-config-2.0"; | 80 | compatible = "fsl,b4420-device-config", "fsl,qoriq-device-config-2.0"; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | clockgen: global-utilities@e1000 { | 83 | /include/ "qoriq-clockgen2.dtsi" |
84 | global-utilities@e1000 { | ||
84 | compatible = "fsl,b4420-clockgen", "fsl,qoriq-clockgen-2.0"; | 85 | compatible = "fsl,b4420-clockgen", "fsl,qoriq-clockgen-2.0"; |
85 | ranges = <0x0 0xe1000 0x1000>; | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <1>; | ||
88 | |||
89 | sysclk: sysclk { | ||
90 | #clock-cells = <0>; | ||
91 | compatible = "fsl,qoriq-sysclk-2.0"; | ||
92 | clock-output-names = "sysclk"; | ||
93 | }; | ||
94 | |||
95 | pll0: pll0@800 { | ||
96 | #clock-cells = <1>; | ||
97 | reg = <0x800 0x4>; | ||
98 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
99 | clocks = <&sysclk>; | ||
100 | clock-output-names = "pll0", "pll0-div2", "pll0-div4"; | ||
101 | }; | ||
102 | |||
103 | pll1: pll1@820 { | ||
104 | #clock-cells = <1>; | ||
105 | reg = <0x820 0x4>; | ||
106 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
107 | clocks = <&sysclk>; | ||
108 | clock-output-names = "pll1", "pll1-div2", "pll1-div4"; | ||
109 | }; | ||
110 | 86 | ||
111 | mux0: mux0@0 { | 87 | mux0: mux0@0 { |
112 | #clock-cells = <0>; | 88 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi index 582381dba1d7..65100b9636b7 100644 --- a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi | |||
@@ -124,33 +124,9 @@ | |||
124 | compatible = "fsl,b4860-device-config", "fsl,qoriq-device-config-2.0"; | 124 | compatible = "fsl,b4860-device-config", "fsl,qoriq-device-config-2.0"; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | clockgen: global-utilities@e1000 { | 127 | /include/ "qoriq-clockgen2.dtsi" |
128 | global-utilities@e1000 { | ||
128 | compatible = "fsl,b4860-clockgen", "fsl,qoriq-clockgen-2.0"; | 129 | compatible = "fsl,b4860-clockgen", "fsl,qoriq-clockgen-2.0"; |
129 | ranges = <0x0 0xe1000 0x1000>; | ||
130 | #address-cells = <1>; | ||
131 | #size-cells = <1>; | ||
132 | |||
133 | sysclk: sysclk { | ||
134 | #clock-cells = <0>; | ||
135 | compatible = "fsl,qoriq-sysclk-2.0"; | ||
136 | clock-output-names = "sysclk"; | ||
137 | }; | ||
138 | |||
139 | pll0: pll0@800 { | ||
140 | #clock-cells = <1>; | ||
141 | reg = <0x800 0x4>; | ||
142 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
143 | clocks = <&sysclk>; | ||
144 | clock-output-names = "pll0", "pll0-div2", "pll0-div4"; | ||
145 | }; | ||
146 | |||
147 | pll1: pll1@820 { | ||
148 | #clock-cells = <1>; | ||
149 | reg = <0x820 0x4>; | ||
150 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
151 | clocks = <&sysclk>; | ||
152 | clock-output-names = "pll1", "pll1-div2", "pll1-div4"; | ||
153 | }; | ||
154 | 130 | ||
155 | mux0: mux0@0 { | 131 | mux0: mux0@0 { |
156 | #clock-cells = <0>; | 132 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi index 69ce1026c948..efd74db4f9b0 100644 --- a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | |||
@@ -305,53 +305,9 @@ | |||
305 | #sleep-cells = <2>; | 305 | #sleep-cells = <2>; |
306 | }; | 306 | }; |
307 | 307 | ||
308 | clockgen: global-utilities@e1000 { | 308 | /include/ "qoriq-clockgen1.dtsi" |
309 | global-utilities@e1000 { | ||
309 | compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0"; | 310 | compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0"; |
310 | ranges = <0x0 0xe1000 0x1000>; | ||
311 | reg = <0xe1000 0x1000>; | ||
312 | clock-frequency = <0>; | ||
313 | #address-cells = <1>; | ||
314 | #size-cells = <1>; | ||
315 | |||
316 | sysclk: sysclk { | ||
317 | #clock-cells = <0>; | ||
318 | compatible = "fsl,qoriq-sysclk-1.0"; | ||
319 | clock-output-names = "sysclk"; | ||
320 | }; | ||
321 | |||
322 | pll0: pll0@800 { | ||
323 | #clock-cells = <1>; | ||
324 | reg = <0x800 0x4>; | ||
325 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
326 | clocks = <&sysclk>; | ||
327 | clock-output-names = "pll0", "pll0-div2"; | ||
328 | }; | ||
329 | |||
330 | pll1: pll1@820 { | ||
331 | #clock-cells = <1>; | ||
332 | reg = <0x820 0x4>; | ||
333 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
334 | clocks = <&sysclk>; | ||
335 | clock-output-names = "pll1", "pll1-div2"; | ||
336 | }; | ||
337 | |||
338 | mux0: mux0@0 { | ||
339 | #clock-cells = <0>; | ||
340 | reg = <0x0 0x4>; | ||
341 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
342 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
343 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
344 | clock-output-names = "cmux0"; | ||
345 | }; | ||
346 | |||
347 | mux1: mux1@20 { | ||
348 | #clock-cells = <0>; | ||
349 | reg = <0x20 0x4>; | ||
350 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
351 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
352 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
353 | clock-output-names = "cmux1"; | ||
354 | }; | ||
355 | 311 | ||
356 | mux2: mux2@40 { | 312 | mux2: mux2@40 { |
357 | #clock-cells = <0>; | 313 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi index cd63cb1b1042..d7425ef1ae41 100644 --- a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | |||
@@ -332,53 +332,9 @@ | |||
332 | #sleep-cells = <2>; | 332 | #sleep-cells = <2>; |
333 | }; | 333 | }; |
334 | 334 | ||
335 | clockgen: global-utilities@e1000 { | 335 | /include/ "qoriq-clockgen1.dtsi" |
336 | global-utilities@e1000 { | ||
336 | compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0"; | 337 | compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0"; |
337 | ranges = <0x0 0xe1000 0x1000>; | ||
338 | reg = <0xe1000 0x1000>; | ||
339 | clock-frequency = <0>; | ||
340 | #address-cells = <1>; | ||
341 | #size-cells = <1>; | ||
342 | |||
343 | sysclk: sysclk { | ||
344 | #clock-cells = <0>; | ||
345 | compatible = "fsl,qoriq-sysclk-1.0"; | ||
346 | clock-output-names = "sysclk"; | ||
347 | }; | ||
348 | |||
349 | pll0: pll0@800 { | ||
350 | #clock-cells = <1>; | ||
351 | reg = <0x800 0x4>; | ||
352 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
353 | clocks = <&sysclk>; | ||
354 | clock-output-names = "pll0", "pll0-div2"; | ||
355 | }; | ||
356 | |||
357 | pll1: pll1@820 { | ||
358 | #clock-cells = <1>; | ||
359 | reg = <0x820 0x4>; | ||
360 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
361 | clocks = <&sysclk>; | ||
362 | clock-output-names = "pll1", "pll1-div2"; | ||
363 | }; | ||
364 | |||
365 | mux0: mux0@0 { | ||
366 | #clock-cells = <0>; | ||
367 | reg = <0x0 0x4>; | ||
368 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
369 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
370 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
371 | clock-output-names = "cmux0"; | ||
372 | }; | ||
373 | |||
374 | mux1: mux1@20 { | ||
375 | #clock-cells = <0>; | ||
376 | reg = <0x20 0x4>; | ||
377 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
378 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
379 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
380 | clock-output-names = "cmux1"; | ||
381 | }; | ||
382 | 338 | ||
383 | mux2: mux2@40 { | 339 | mux2: mux2@40 { |
384 | #clock-cells = <0>; | 340 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi index 12947ccddf25..7005a4a4cef0 100644 --- a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | |||
@@ -352,35 +352,9 @@ | |||
352 | #sleep-cells = <2>; | 352 | #sleep-cells = <2>; |
353 | }; | 353 | }; |
354 | 354 | ||
355 | clockgen: global-utilities@e1000 { | 355 | /include/ "qoriq-clockgen1.dtsi" |
356 | global-utilities@e1000 { | ||
356 | compatible = "fsl,p4080-clockgen", "fsl,qoriq-clockgen-1.0"; | 357 | compatible = "fsl,p4080-clockgen", "fsl,qoriq-clockgen-1.0"; |
357 | ranges = <0x0 0xe1000 0x1000>; | ||
358 | reg = <0xe1000 0x1000>; | ||
359 | clock-frequency = <0>; | ||
360 | #address-cells = <1>; | ||
361 | #size-cells = <1>; | ||
362 | |||
363 | sysclk: sysclk { | ||
364 | #clock-cells = <0>; | ||
365 | compatible = "fsl,qoriq-sysclk-1.0"; | ||
366 | clock-output-names = "sysclk"; | ||
367 | }; | ||
368 | |||
369 | pll0: pll0@800 { | ||
370 | #clock-cells = <1>; | ||
371 | reg = <0x800 0x4>; | ||
372 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
373 | clocks = <&sysclk>; | ||
374 | clock-output-names = "pll0", "pll0-div2"; | ||
375 | }; | ||
376 | |||
377 | pll1: pll1@820 { | ||
378 | #clock-cells = <1>; | ||
379 | reg = <0x820 0x4>; | ||
380 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
381 | clocks = <&sysclk>; | ||
382 | clock-output-names = "pll1", "pll1-div2"; | ||
383 | }; | ||
384 | 358 | ||
385 | pll2: pll2@840 { | 359 | pll2: pll2@840 { |
386 | #clock-cells = <1>; | 360 | #clock-cells = <1>; |
@@ -398,24 +372,6 @@ | |||
398 | clock-output-names = "pll3", "pll3-div2"; | 372 | clock-output-names = "pll3", "pll3-div2"; |
399 | }; | 373 | }; |
400 | 374 | ||
401 | mux0: mux0@0 { | ||
402 | #clock-cells = <0>; | ||
403 | reg = <0x0 0x4>; | ||
404 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
405 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
406 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
407 | clock-output-names = "cmux0"; | ||
408 | }; | ||
409 | |||
410 | mux1: mux1@20 { | ||
411 | #clock-cells = <0>; | ||
412 | reg = <0x20 0x4>; | ||
413 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
414 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
415 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
416 | clock-output-names = "cmux1"; | ||
417 | }; | ||
418 | |||
419 | mux2: mux2@40 { | 375 | mux2: mux2@40 { |
420 | #clock-cells = <0>; | 376 | #clock-cells = <0>; |
421 | reg = <0x40 0x4>; | 377 | reg = <0x40 0x4>; |
diff --git a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi index 4c4a2b0436b2..55834211bd28 100644 --- a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi | |||
@@ -337,53 +337,9 @@ | |||
337 | #sleep-cells = <2>; | 337 | #sleep-cells = <2>; |
338 | }; | 338 | }; |
339 | 339 | ||
340 | clockgen: global-utilities@e1000 { | 340 | /include/ "qoriq-clockgen1.dtsi" |
341 | global-utilities@e1000 { | ||
341 | compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; | 342 | compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; |
342 | ranges = <0x0 0xe1000 0x1000>; | ||
343 | reg = <0xe1000 0x1000>; | ||
344 | clock-frequency = <0>; | ||
345 | #address-cells = <1>; | ||
346 | #size-cells = <1>; | ||
347 | |||
348 | sysclk: sysclk { | ||
349 | #clock-cells = <0>; | ||
350 | compatible = "fsl,qoriq-sysclk-1.0"; | ||
351 | clock-output-names = "sysclk"; | ||
352 | }; | ||
353 | |||
354 | pll0: pll0@800 { | ||
355 | #clock-cells = <1>; | ||
356 | reg = <0x800 0x4>; | ||
357 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
358 | clocks = <&sysclk>; | ||
359 | clock-output-names = "pll0", "pll0-div2"; | ||
360 | }; | ||
361 | |||
362 | pll1: pll1@820 { | ||
363 | #clock-cells = <1>; | ||
364 | reg = <0x820 0x4>; | ||
365 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
366 | clocks = <&sysclk>; | ||
367 | clock-output-names = "pll1", "pll1-div2"; | ||
368 | }; | ||
369 | |||
370 | mux0: mux0@0 { | ||
371 | #clock-cells = <0>; | ||
372 | reg = <0x0 0x4>; | ||
373 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
374 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
375 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
376 | clock-output-names = "cmux0"; | ||
377 | }; | ||
378 | |||
379 | mux1: mux1@20 { | ||
380 | #clock-cells = <0>; | ||
381 | reg = <0x20 0x4>; | ||
382 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
383 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
384 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
385 | clock-output-names = "cmux1"; | ||
386 | }; | ||
387 | }; | 343 | }; |
388 | 344 | ||
389 | rcpm: global-utilities@e2000 { | 345 | rcpm: global-utilities@e2000 { |
diff --git a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi index 67296fdd9698..6e4cd6ce363c 100644 --- a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | |||
@@ -297,53 +297,9 @@ | |||
297 | #sleep-cells = <2>; | 297 | #sleep-cells = <2>; |
298 | }; | 298 | }; |
299 | 299 | ||
300 | clockgen: global-utilities@e1000 { | 300 | /include/ "qoriq-clockgen1.dtsi" |
301 | global-utilities@e1000 { | ||
301 | compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0"; | 302 | compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0"; |
302 | ranges = <0x0 0xe1000 0x1000>; | ||
303 | reg = <0xe1000 0x1000>; | ||
304 | clock-frequency = <0>; | ||
305 | #address-cells = <1>; | ||
306 | #size-cells = <1>; | ||
307 | |||
308 | sysclk: sysclk { | ||
309 | #clock-cells = <0>; | ||
310 | compatible = "fsl,qoriq-sysclk-1.0"; | ||
311 | clock-output-names = "sysclk"; | ||
312 | }; | ||
313 | |||
314 | pll0: pll0@800 { | ||
315 | #clock-cells = <1>; | ||
316 | reg = <0x800 0x4>; | ||
317 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
318 | clocks = <&sysclk>; | ||
319 | clock-output-names = "pll0", "pll0-div2"; | ||
320 | }; | ||
321 | |||
322 | pll1: pll1@820 { | ||
323 | #clock-cells = <1>; | ||
324 | reg = <0x820 0x4>; | ||
325 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
326 | clocks = <&sysclk>; | ||
327 | clock-output-names = "pll1", "pll1-div2"; | ||
328 | }; | ||
329 | |||
330 | mux0: mux0@0 { | ||
331 | #clock-cells = <0>; | ||
332 | reg = <0x0 0x4>; | ||
333 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
334 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
335 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
336 | clock-output-names = "cmux0"; | ||
337 | }; | ||
338 | |||
339 | mux1: mux1@20 { | ||
340 | #clock-cells = <0>; | ||
341 | reg = <0x20 0x4>; | ||
342 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
343 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
344 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
345 | clock-output-names = "cmux1"; | ||
346 | }; | ||
347 | 303 | ||
348 | mux2: mux2@40 { | 304 | mux2: mux2@40 { |
349 | #clock-cells = <0>; | 305 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi new file mode 100644 index 000000000000..4ece1edbff63 --- /dev/null +++ b/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * QorIQ clock control device tree stub [ controller @ offset 0xe1000 ] | ||
3 | * | ||
4 | * Copyright 2014 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * Redistribution and use in source and binary forms, with or without | ||
7 | * modification, are permitted provided that the following conditions are met: | ||
8 | * * Redistributions of source code must retain the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer. | ||
10 | * * Redistributions in binary form must reproduce the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer in the | ||
12 | * documentation and/or other materials provided with the distribution. | ||
13 | * * Neither the name of Freescale Semiconductor nor the | ||
14 | * names of its contributors may be used to endorse or promote products | ||
15 | * derived from this software without specific prior written permission. | ||
16 | * | ||
17 | * | ||
18 | * ALTERNATIVELY, this software may be distributed under the terms of the | ||
19 | * GNU General Public License ("GPL") as published by the Free Software | ||
20 | * Foundation, either version 2 of that License or (at your option) any | ||
21 | * later version. | ||
22 | * | ||
23 | * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY | ||
24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
25 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
26 | * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY | ||
27 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
28 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
30 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
32 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | */ | ||
34 | |||
35 | global-utilities@e1000 { | ||
36 | compatible = "fsl,qoriq-clockgen-1.0"; | ||
37 | ranges = <0x0 0xe1000 0x1000>; | ||
38 | reg = <0xe1000 0x1000>; | ||
39 | clock-frequency = <0>; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <1>; | ||
42 | |||
43 | sysclk: sysclk { | ||
44 | #clock-cells = <0>; | ||
45 | compatible = "fsl,qoriq-sysclk-1.0", "fixed-clock"; | ||
46 | clock-output-names = "sysclk"; | ||
47 | }; | ||
48 | pll0: pll0@800 { | ||
49 | #clock-cells = <1>; | ||
50 | reg = <0x800 0x4>; | ||
51 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
52 | clocks = <&sysclk>; | ||
53 | clock-output-names = "pll0", "pll0-div2"; | ||
54 | }; | ||
55 | pll1: pll1@820 { | ||
56 | #clock-cells = <1>; | ||
57 | reg = <0x820 0x4>; | ||
58 | compatible = "fsl,qoriq-core-pll-1.0"; | ||
59 | clocks = <&sysclk>; | ||
60 | clock-output-names = "pll1", "pll1-div2"; | ||
61 | }; | ||
62 | mux0: mux0@0 { | ||
63 | #clock-cells = <0>; | ||
64 | reg = <0x0 0x4>; | ||
65 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
66 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
67 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
68 | clock-output-names = "cmux0"; | ||
69 | }; | ||
70 | mux1: mux1@20 { | ||
71 | #clock-cells = <0>; | ||
72 | reg = <0x20 0x4>; | ||
73 | compatible = "fsl,qoriq-core-mux-1.0"; | ||
74 | clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; | ||
75 | clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; | ||
76 | clock-output-names = "cmux1"; | ||
77 | }; | ||
78 | platform_pll: platform-pll@c00 { | ||
79 | #clock-cells = <1>; | ||
80 | reg = <0xc00 0x4>; | ||
81 | compatible = "fsl,qoriq-platform-pll-1.0"; | ||
82 | clocks = <&sysclk>; | ||
83 | clock-output-names = "platform-pll", "platform-pll-div2"; | ||
84 | }; | ||
85 | }; | ||
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi new file mode 100644 index 000000000000..48e0b6e4ce33 --- /dev/null +++ b/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * QorIQ clock control device tree stub [ controller @ offset 0xe1000 ] | ||
3 | * | ||
4 | * Copyright 2014 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * Redistribution and use in source and binary forms, with or without | ||
7 | * modification, are permitted provided that the following conditions are met: | ||
8 | * * Redistributions of source code must retain the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer. | ||
10 | * * Redistributions in binary form must reproduce the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer in the | ||
12 | * documentation and/or other materials provided with the distribution. | ||
13 | * * Neither the name of Freescale Semiconductor nor the | ||
14 | * names of its contributors may be used to endorse or promote products | ||
15 | * derived from this software without specific prior written permission. | ||
16 | * | ||
17 | * | ||
18 | * ALTERNATIVELY, this software may be distributed under the terms of the | ||
19 | * GNU General Public License ("GPL") as published by the Free Software | ||
20 | * Foundation, either version 2 of that License or (at your option) any | ||
21 | * later version. | ||
22 | * | ||
23 | * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY | ||
24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
25 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
26 | * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY | ||
27 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
28 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
30 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
32 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | */ | ||
34 | |||
35 | global-utilities@e1000 { | ||
36 | compatible = "fsl,qoriq-clockgen-2.0"; | ||
37 | ranges = <0x0 0xe1000 0x1000>; | ||
38 | reg = <0xe1000 0x1000>; | ||
39 | #address-cells = <1>; | ||
40 | #size-cells = <1>; | ||
41 | |||
42 | sysclk: sysclk { | ||
43 | #clock-cells = <0>; | ||
44 | compatible = "fsl,qoriq-sysclk-2.0", "fixed-clock"; | ||
45 | clock-output-names = "sysclk"; | ||
46 | }; | ||
47 | pll0: pll0@800 { | ||
48 | #clock-cells = <1>; | ||
49 | reg = <0x800 0x4>; | ||
50 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
51 | clocks = <&sysclk>; | ||
52 | clock-output-names = "pll0", "pll0-div2", "pll0-div4"; | ||
53 | }; | ||
54 | pll1: pll1@820 { | ||
55 | #clock-cells = <1>; | ||
56 | reg = <0x820 0x4>; | ||
57 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
58 | clocks = <&sysclk>; | ||
59 | clock-output-names = "pll1", "pll1-div2", "pll1-div4"; | ||
60 | }; | ||
61 | platform_pll: platform-pll@c00 { | ||
62 | #clock-cells = <1>; | ||
63 | reg = <0xc00 0x4>; | ||
64 | compatible = "fsl,qoriq-platform-pll-2.0"; | ||
65 | clocks = <&sysclk>; | ||
66 | clock-output-names = "platform-pll", "platform-pll-div2"; | ||
67 | }; | ||
68 | }; | ||
diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi index 12e597eea3c8..15ae462e758f 100644 --- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | |||
@@ -281,35 +281,9 @@ | |||
281 | fsl,liodn-bits = <12>; | 281 | fsl,liodn-bits = <12>; |
282 | }; | 282 | }; |
283 | 283 | ||
284 | clockgen: global-utilities@e1000 { | 284 | /include/ "qoriq-clockgen2.dtsi" |
285 | global-utilities@e1000 { | ||
285 | compatible = "fsl,t1040-clockgen", "fsl,qoriq-clockgen-2.0"; | 286 | compatible = "fsl,t1040-clockgen", "fsl,qoriq-clockgen-2.0"; |
286 | ranges = <0x0 0xe1000 0x1000>; | ||
287 | reg = <0xe1000 0x1000>; | ||
288 | #address-cells = <1>; | ||
289 | #size-cells = <1>; | ||
290 | |||
291 | sysclk: sysclk { | ||
292 | #clock-cells = <0>; | ||
293 | compatible = "fsl,qoriq-sysclk-2.0"; | ||
294 | clock-output-names = "sysclk", "fixed-clock"; | ||
295 | }; | ||
296 | |||
297 | |||
298 | pll0: pll0@800 { | ||
299 | #clock-cells = <1>; | ||
300 | reg = <0x800 4>; | ||
301 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
302 | clocks = <&sysclk>; | ||
303 | clock-output-names = "pll0", "pll0-div2", "pll0-div4"; | ||
304 | }; | ||
305 | |||
306 | pll1: pll1@820 { | ||
307 | #clock-cells = <1>; | ||
308 | reg = <0x820 4>; | ||
309 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
310 | clocks = <&sysclk>; | ||
311 | clock-output-names = "pll1", "pll1-div2", "pll1-div4"; | ||
312 | }; | ||
313 | 287 | ||
314 | mux0: mux0@0 { | 288 | mux0: mux0@0 { |
315 | #clock-cells = <0>; | 289 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi b/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi index aecee9690a88..1ce91e3485a9 100644 --- a/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | |||
@@ -305,34 +305,9 @@ | |||
305 | fsl,liodn-bits = <12>; | 305 | fsl,liodn-bits = <12>; |
306 | }; | 306 | }; |
307 | 307 | ||
308 | clockgen: global-utilities@e1000 { | 308 | /include/ "qoriq-clockgen2.dtsi" |
309 | global-utilities@e1000 { | ||
309 | compatible = "fsl,t2080-clockgen", "fsl,qoriq-clockgen-2.0"; | 310 | compatible = "fsl,t2080-clockgen", "fsl,qoriq-clockgen-2.0"; |
310 | ranges = <0x0 0xe1000 0x1000>; | ||
311 | reg = <0xe1000 0x1000>; | ||
312 | #address-cells = <1>; | ||
313 | #size-cells = <1>; | ||
314 | |||
315 | sysclk: sysclk { | ||
316 | #clock-cells = <0>; | ||
317 | compatible = "fsl,qoriq-sysclk-2.0"; | ||
318 | clock-output-names = "sysclk", "fixed-clock"; | ||
319 | }; | ||
320 | |||
321 | pll0: pll0@800 { | ||
322 | #clock-cells = <1>; | ||
323 | reg = <0x800 4>; | ||
324 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
325 | clocks = <&sysclk>; | ||
326 | clock-output-names = "pll0", "pll0-div2", "pll0-div4"; | ||
327 | }; | ||
328 | |||
329 | pll1: pll1@820 { | ||
330 | #clock-cells = <1>; | ||
331 | reg = <0x820 4>; | ||
332 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
333 | clocks = <&sysclk>; | ||
334 | clock-output-names = "pll1", "pll1-div2", "pll1-div4"; | ||
335 | }; | ||
336 | 311 | ||
337 | mux0: mux0@0 { | 312 | mux0: mux0@0 { |
338 | #clock-cells = <0>; | 313 | #clock-cells = <0>; |
diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi index 7e2fc7cdce48..0e96fcabe812 100644 --- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | |||
@@ -368,34 +368,9 @@ | |||
368 | fsl,liodn-bits = <12>; | 368 | fsl,liodn-bits = <12>; |
369 | }; | 369 | }; |
370 | 370 | ||
371 | clockgen: global-utilities@e1000 { | 371 | /include/ "qoriq-clockgen2.dtsi" |
372 | global-utilities@e1000 { | ||
372 | compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0"; | 373 | compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0"; |
373 | ranges = <0x0 0xe1000 0x1000>; | ||
374 | reg = <0xe1000 0x1000>; | ||
375 | #address-cells = <1>; | ||
376 | #size-cells = <1>; | ||
377 | |||
378 | sysclk: sysclk { | ||
379 | #clock-cells = <0>; | ||
380 | compatible = "fsl,qoriq-sysclk-2.0"; | ||
381 | clock-output-names = "sysclk"; | ||
382 | }; | ||
383 | |||
384 | pll0: pll0@800 { | ||
385 | #clock-cells = <1>; | ||
386 | reg = <0x800 0x4>; | ||
387 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
388 | clocks = <&sysclk>; | ||
389 | clock-output-names = "pll0", "pll0-div2", "pll0-div4"; | ||
390 | }; | ||
391 | |||
392 | pll1: pll1@820 { | ||
393 | #clock-cells = <1>; | ||
394 | reg = <0x820 0x4>; | ||
395 | compatible = "fsl,qoriq-core-pll-2.0"; | ||
396 | clocks = <&sysclk>; | ||
397 | clock-output-names = "pll1", "pll1-div2", "pll1-div4"; | ||
398 | }; | ||
399 | 374 | ||
400 | pll2: pll2@840 { | 375 | pll2: pll2@840 { |
401 | #clock-cells = <1>; | 376 | #clock-cells = <1>; |
diff --git a/arch/powerpc/boot/dts/p3041ds.dts b/arch/powerpc/boot/dts/p3041ds.dts index 2fed3bc0b990..394ea9c943c9 100644 --- a/arch/powerpc/boot/dts/p3041ds.dts +++ b/arch/powerpc/boot/dts/p3041ds.dts | |||
@@ -98,6 +98,26 @@ | |||
98 | reg = <0x68>; | 98 | reg = <0x68>; |
99 | interrupts = <0x1 0x1 0 0>; | 99 | interrupts = <0x1 0x1 0 0>; |
100 | }; | 100 | }; |
101 | ina220@40 { | ||
102 | compatible = "ti,ina220"; | ||
103 | reg = <0x40>; | ||
104 | shunt-resistor = <1000>; | ||
105 | }; | ||
106 | ina220@41 { | ||
107 | compatible = "ti,ina220"; | ||
108 | reg = <0x41>; | ||
109 | shunt-resistor = <1000>; | ||
110 | }; | ||
111 | ina220@44 { | ||
112 | compatible = "ti,ina220"; | ||
113 | reg = <0x44>; | ||
114 | shunt-resistor = <1000>; | ||
115 | }; | ||
116 | ina220@45 { | ||
117 | compatible = "ti,ina220"; | ||
118 | reg = <0x45>; | ||
119 | shunt-resistor = <1000>; | ||
120 | }; | ||
101 | adt7461@4c { | 121 | adt7461@4c { |
102 | compatible = "adi,adt7461"; | 122 | compatible = "adi,adt7461"; |
103 | reg = <0x4c>; | 123 | reg = <0x4c>; |
diff --git a/arch/powerpc/boot/dts/p5020ds.dts b/arch/powerpc/boot/dts/p5020ds.dts index 2869fea717dd..b7f3057cd894 100644 --- a/arch/powerpc/boot/dts/p5020ds.dts +++ b/arch/powerpc/boot/dts/p5020ds.dts | |||
@@ -98,6 +98,26 @@ | |||
98 | reg = <0x68>; | 98 | reg = <0x68>; |
99 | interrupts = <0x1 0x1 0 0>; | 99 | interrupts = <0x1 0x1 0 0>; |
100 | }; | 100 | }; |
101 | ina220@40 { | ||
102 | compatible = "ti,ina220"; | ||
103 | reg = <0x40>; | ||
104 | shunt-resistor = <1000>; | ||
105 | }; | ||
106 | ina220@41 { | ||
107 | compatible = "ti,ina220"; | ||
108 | reg = <0x41>; | ||
109 | shunt-resistor = <1000>; | ||
110 | }; | ||
111 | ina220@44 { | ||
112 | compatible = "ti,ina220"; | ||
113 | reg = <0x44>; | ||
114 | shunt-resistor = <1000>; | ||
115 | }; | ||
116 | ina220@45 { | ||
117 | compatible = "ti,ina220"; | ||
118 | reg = <0x45>; | ||
119 | shunt-resistor = <1000>; | ||
120 | }; | ||
101 | adt7461@4c { | 121 | adt7461@4c { |
102 | compatible = "adi,adt7461"; | 122 | compatible = "adi,adt7461"; |
103 | reg = <0x4c>; | 123 | reg = <0x4c>; |
diff --git a/arch/powerpc/boot/dts/p5040ds.dts b/arch/powerpc/boot/dts/p5040ds.dts index 860b5ccf76c0..7e04bf487c04 100644 --- a/arch/powerpc/boot/dts/p5040ds.dts +++ b/arch/powerpc/boot/dts/p5040ds.dts | |||
@@ -95,6 +95,26 @@ | |||
95 | reg = <0x68>; | 95 | reg = <0x68>; |
96 | interrupts = <0x1 0x1 0 0>; | 96 | interrupts = <0x1 0x1 0 0>; |
97 | }; | 97 | }; |
98 | ina220@40 { | ||
99 | compatible = "ti,ina220"; | ||
100 | reg = <0x40>; | ||
101 | shunt-resistor = <1000>; | ||
102 | }; | ||
103 | ina220@41 { | ||
104 | compatible = "ti,ina220"; | ||
105 | reg = <0x41>; | ||
106 | shunt-resistor = <1000>; | ||
107 | }; | ||
108 | ina220@44 { | ||
109 | compatible = "ti,ina220"; | ||
110 | reg = <0x44>; | ||
111 | shunt-resistor = <1000>; | ||
112 | }; | ||
113 | ina220@45 { | ||
114 | compatible = "ti,ina220"; | ||
115 | reg = <0x45>; | ||
116 | shunt-resistor = <1000>; | ||
117 | }; | ||
98 | adt7461@4c { | 118 | adt7461@4c { |
99 | compatible = "adi,adt7461"; | 119 | compatible = "adi,adt7461"; |
100 | reg = <0x4c>; | 120 | reg = <0x4c>; |
diff --git a/arch/powerpc/boot/dts/t104xrdb.dtsi b/arch/powerpc/boot/dts/t104xrdb.dtsi index 1cf0f3c5f7e5..187add885cae 100644 --- a/arch/powerpc/boot/dts/t104xrdb.dtsi +++ b/arch/powerpc/boot/dts/t104xrdb.dtsi | |||
@@ -83,6 +83,13 @@ | |||
83 | }; | 83 | }; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | i2c@118000 { | ||
87 | adt7461@4c { | ||
88 | compatible = "adi,adt7461"; | ||
89 | reg = <0x4c>; | ||
90 | }; | ||
91 | }; | ||
92 | |||
86 | i2c@118100 { | 93 | i2c@118100 { |
87 | pca9546@77 { | 94 | pca9546@77 { |
88 | compatible = "nxp,pca9546"; | 95 | compatible = "nxp,pca9546"; |
diff --git a/arch/powerpc/boot/dts/t208xqds.dtsi b/arch/powerpc/boot/dts/t208xqds.dtsi index 555dc6e03d89..59061834d54e 100644 --- a/arch/powerpc/boot/dts/t208xqds.dtsi +++ b/arch/powerpc/boot/dts/t208xqds.dtsi | |||
@@ -169,6 +169,17 @@ | |||
169 | shunt-resistor = <1000>; | 169 | shunt-resistor = <1000>; |
170 | }; | 170 | }; |
171 | }; | 171 | }; |
172 | |||
173 | i2c@3 { | ||
174 | #address-cells = <1>; | ||
175 | #size-cells = <0>; | ||
176 | reg = <0x3>; | ||
177 | |||
178 | adt7461@4c { | ||
179 | compatible = "adi,adt7461"; | ||
180 | reg = <0x4c>; | ||
181 | }; | ||
182 | }; | ||
172 | }; | 183 | }; |
173 | }; | 184 | }; |
174 | 185 | ||
diff --git a/arch/powerpc/boot/dts/t4240emu.dts b/arch/powerpc/boot/dts/t4240emu.dts index bc12127a03fb..decaf357db9c 100644 --- a/arch/powerpc/boot/dts/t4240emu.dts +++ b/arch/powerpc/boot/dts/t4240emu.dts | |||
@@ -250,9 +250,9 @@ | |||
250 | fsl,liodn-bits = <12>; | 250 | fsl,liodn-bits = <12>; |
251 | }; | 251 | }; |
252 | 252 | ||
253 | clockgen: global-utilities@e1000 { | 253 | /include/ "fsl/qoriq-clockgen2.dtsi" |
254 | global-utilities@e1000 { | ||
254 | compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0"; | 255 | compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0"; |
255 | reg = <0xe1000 0x1000>; | ||
256 | }; | 256 | }; |
257 | 257 | ||
258 | /include/ "fsl/qoriq-dma-0.dtsi" | 258 | /include/ "fsl/qoriq-dma-0.dtsi" |
diff --git a/arch/powerpc/configs/corenet32_smp_defconfig b/arch/powerpc/configs/corenet32_smp_defconfig index 688e9e4d29a1..611efe99faeb 100644 --- a/arch/powerpc/configs/corenet32_smp_defconfig +++ b/arch/powerpc/configs/corenet32_smp_defconfig | |||
@@ -144,6 +144,7 @@ CONFIG_RTC_DRV_DS1374=y | |||
144 | CONFIG_RTC_DRV_DS3232=y | 144 | CONFIG_RTC_DRV_DS3232=y |
145 | CONFIG_UIO=y | 145 | CONFIG_UIO=y |
146 | CONFIG_STAGING=y | 146 | CONFIG_STAGING=y |
147 | CONFIG_MEMORY=y | ||
147 | CONFIG_VIRT_DRIVERS=y | 148 | CONFIG_VIRT_DRIVERS=y |
148 | CONFIG_FSL_HV_MANAGER=y | 149 | CONFIG_FSL_HV_MANAGER=y |
149 | CONFIG_EXT2_FS=y | 150 | CONFIG_EXT2_FS=y |
diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig index 6db97e4414b2..be24a18c0d96 100644 --- a/arch/powerpc/configs/corenet64_smp_defconfig +++ b/arch/powerpc/configs/corenet64_smp_defconfig | |||
@@ -118,6 +118,7 @@ CONFIG_FSL_DMA=y | |||
118 | CONFIG_VIRT_DRIVERS=y | 118 | CONFIG_VIRT_DRIVERS=y |
119 | CONFIG_FSL_HV_MANAGER=y | 119 | CONFIG_FSL_HV_MANAGER=y |
120 | CONFIG_FSL_CORENET_CF=y | 120 | CONFIG_FSL_CORENET_CF=y |
121 | CONFIG_MEMORY=y | ||
121 | CONFIG_EXT2_FS=y | 122 | CONFIG_EXT2_FS=y |
122 | CONFIG_EXT3_FS=y | 123 | CONFIG_EXT3_FS=y |
123 | CONFIG_ISO9660_FS=m | 124 | CONFIG_ISO9660_FS=m |
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index d2c415489f72..02395fab19bd 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig | |||
@@ -215,6 +215,7 @@ CONFIG_RTC_DRV_DS3232=y | |||
215 | CONFIG_RTC_DRV_CMOS=y | 215 | CONFIG_RTC_DRV_CMOS=y |
216 | CONFIG_DMADEVICES=y | 216 | CONFIG_DMADEVICES=y |
217 | CONFIG_FSL_DMA=y | 217 | CONFIG_FSL_DMA=y |
218 | CONFIG_MEMORY=y | ||
218 | # CONFIG_NET_DMA is not set | 219 | # CONFIG_NET_DMA is not set |
219 | CONFIG_EXT2_FS=y | 220 | CONFIG_EXT2_FS=y |
220 | CONFIG_EXT3_FS=y | 221 | CONFIG_EXT3_FS=y |
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig index 87460083dbc7..b5d1b82a1b43 100644 --- a/arch/powerpc/configs/mpc85xx_smp_defconfig +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig | |||
@@ -216,6 +216,7 @@ CONFIG_RTC_DRV_DS3232=y | |||
216 | CONFIG_RTC_DRV_CMOS=y | 216 | CONFIG_RTC_DRV_CMOS=y |
217 | CONFIG_DMADEVICES=y | 217 | CONFIG_DMADEVICES=y |
218 | CONFIG_FSL_DMA=y | 218 | CONFIG_FSL_DMA=y |
219 | CONFIG_MEMORY=y | ||
219 | # CONFIG_NET_DMA is not set | 220 | # CONFIG_NET_DMA is not set |
220 | CONFIG_EXT2_FS=y | 221 | CONFIG_EXT2_FS=y |
221 | CONFIG_EXT3_FS=y | 222 | CONFIG_EXT3_FS=y |
diff --git a/arch/powerpc/include/asm/fsl_guts.h b/arch/powerpc/include/asm/fsl_guts.h index 77ced0b3d81d..43b6bb1a4a9c 100644 --- a/arch/powerpc/include/asm/fsl_guts.h +++ b/arch/powerpc/include/asm/fsl_guts.h | |||
@@ -68,7 +68,10 @@ struct ccsr_guts { | |||
68 | u8 res0b4[0xc0 - 0xb4]; | 68 | u8 res0b4[0xc0 - 0xb4]; |
69 | __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register | 69 | __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register |
70 | Called 'elbcvselcr' on 86xx SOCs */ | 70 | Called 'elbcvselcr' on 86xx SOCs */ |
71 | u8 res0c4[0x224 - 0xc4]; | 71 | u8 res0c4[0x100 - 0xc4]; |
72 | __be32 rcwsr[16]; /* 0x.0100 - Reset Control Word Status registers | ||
73 | There are 16 registers */ | ||
74 | u8 res140[0x224 - 0x140]; | ||
72 | __be32 iodelay1; /* 0x.0224 - IO delay control register 1 */ | 75 | __be32 iodelay1; /* 0x.0224 - IO delay control register 1 */ |
73 | __be32 iodelay2; /* 0x.0228 - IO delay control register 2 */ | 76 | __be32 iodelay2; /* 0x.0228 - IO delay control register 2 */ |
74 | u8 res22c[0x604 - 0x22c]; | 77 | u8 res22c[0x604 - 0x22c]; |
diff --git a/arch/powerpc/include/asm/mmu-8xx.h b/arch/powerpc/include/asm/mmu-8xx.h index 3d11d3ce79ec..986b9e1e1044 100644 --- a/arch/powerpc/include/asm/mmu-8xx.h +++ b/arch/powerpc/include/asm/mmu-8xx.h | |||
@@ -56,6 +56,7 @@ | |||
56 | * additional information from the MI_EPN, and MI_TWC registers. | 56 | * additional information from the MI_EPN, and MI_TWC registers. |
57 | */ | 57 | */ |
58 | #define SPRN_MI_RPN 790 | 58 | #define SPRN_MI_RPN 790 |
59 | #define MI_SPS16K 0x00000008 /* Small page size (0 = 4k, 1 = 16k) */ | ||
59 | 60 | ||
60 | /* Define an RPN value for mapping kernel memory to large virtual | 61 | /* Define an RPN value for mapping kernel memory to large virtual |
61 | * pages for boot initialization. This has real page number of 0, | 62 | * pages for boot initialization. This has real page number of 0, |
@@ -129,6 +130,7 @@ | |||
129 | * additional information from the MD_EPN, and MD_TWC registers. | 130 | * additional information from the MD_EPN, and MD_TWC registers. |
130 | */ | 131 | */ |
131 | #define SPRN_MD_RPN 798 | 132 | #define SPRN_MD_RPN 798 |
133 | #define MD_SPS16K 0x00000008 /* Small page size (0 = 4k, 1 = 16k) */ | ||
132 | 134 | ||
133 | /* This is a temporary storage register that could be used to save | 135 | /* This is a temporary storage register that could be used to save |
134 | * a processor working register during a tablewalk. | 136 | * a processor working register during a tablewalk. |
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h index 945e47adf7db..234e07c47803 100644 --- a/arch/powerpc/include/asm/pgtable-ppc32.h +++ b/arch/powerpc/include/asm/pgtable-ppc32.h | |||
@@ -170,6 +170,25 @@ static inline unsigned long pte_update(pte_t *p, | |||
170 | #ifdef PTE_ATOMIC_UPDATES | 170 | #ifdef PTE_ATOMIC_UPDATES |
171 | unsigned long old, tmp; | 171 | unsigned long old, tmp; |
172 | 172 | ||
173 | #ifdef CONFIG_PPC_8xx | ||
174 | unsigned long tmp2; | ||
175 | |||
176 | __asm__ __volatile__("\ | ||
177 | 1: lwarx %0,0,%4\n\ | ||
178 | andc %1,%0,%5\n\ | ||
179 | or %1,%1,%6\n\ | ||
180 | /* 0x200 == Extended encoding, bit 22 */ \ | ||
181 | /* Bit 22 has to be 1 if neither _PAGE_USER nor _PAGE_RW are set */ \ | ||
182 | rlwimi %1,%1,32-2,0x200\n /* get _PAGE_USER */ \ | ||
183 | rlwinm %3,%1,32-1,0x200\n /* get _PAGE_RW */ \ | ||
184 | or %1,%3,%1\n\ | ||
185 | xori %1,%1,0x200\n" | ||
186 | " stwcx. %1,0,%4\n\ | ||
187 | bne- 1b" | ||
188 | : "=&r" (old), "=&r" (tmp), "=m" (*p), "=&r" (tmp2) | ||
189 | : "r" (p), "r" (clr), "r" (set), "m" (*p) | ||
190 | : "cc" ); | ||
191 | #else /* CONFIG_PPC_8xx */ | ||
173 | __asm__ __volatile__("\ | 192 | __asm__ __volatile__("\ |
174 | 1: lwarx %0,0,%3\n\ | 193 | 1: lwarx %0,0,%3\n\ |
175 | andc %1,%0,%4\n\ | 194 | andc %1,%0,%4\n\ |
@@ -180,6 +199,7 @@ static inline unsigned long pte_update(pte_t *p, | |||
180 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 199 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
181 | : "r" (p), "r" (clr), "r" (set), "m" (*p) | 200 | : "r" (p), "r" (clr), "r" (set), "m" (*p) |
182 | : "cc" ); | 201 | : "cc" ); |
202 | #endif /* CONFIG_PPC_8xx */ | ||
183 | #else /* PTE_ATOMIC_UPDATES */ | 203 | #else /* PTE_ATOMIC_UPDATES */ |
184 | unsigned long old = pte_val(*p); | 204 | unsigned long old = pte_val(*p); |
185 | *p = __pte((old & ~clr) | set); | 205 | *p = __pte((old & ~clr) | set); |
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h index d44826e4ff97..daa4616e61c4 100644 --- a/arch/powerpc/include/asm/pte-8xx.h +++ b/arch/powerpc/include/asm/pte-8xx.h | |||
@@ -48,19 +48,22 @@ | |||
48 | */ | 48 | */ |
49 | #define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */ | 49 | #define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */ |
50 | #define _PAGE_USER 0x0800 /* msb PP bits */ | 50 | #define _PAGE_USER 0x0800 /* msb PP bits */ |
51 | /* set when neither _PAGE_USER nor _PAGE_RW are set */ | ||
52 | #define _PAGE_KNLRO 0x0200 | ||
51 | 53 | ||
52 | #define _PMD_PRESENT 0x0001 | 54 | #define _PMD_PRESENT 0x0001 |
53 | #define _PMD_BAD 0x0ff0 | 55 | #define _PMD_BAD 0x0ff0 |
54 | #define _PMD_PAGE_MASK 0x000c | 56 | #define _PMD_PAGE_MASK 0x000c |
55 | #define _PMD_PAGE_8M 0x000c | 57 | #define _PMD_PAGE_8M 0x000c |
56 | 58 | ||
57 | #define _PTE_NONE_MASK _PAGE_ACCESSED | 59 | #define _PTE_NONE_MASK _PAGE_KNLRO |
58 | 60 | ||
59 | /* Until my rework is finished, 8xx still needs atomic PTE updates */ | 61 | /* Until my rework is finished, 8xx still needs atomic PTE updates */ |
60 | #define PTE_ATOMIC_UPDATES 1 | 62 | #define PTE_ATOMIC_UPDATES 1 |
61 | 63 | ||
62 | /* We need to add _PAGE_SHARED to kernel pages */ | 64 | /* We need to add _PAGE_SHARED to kernel pages */ |
63 | #define _PAGE_KERNEL_RO (_PAGE_SHARED) | 65 | #define _PAGE_KERNEL_RO (_PAGE_SHARED | _PAGE_KNLRO) |
66 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC | _PAGE_KNLRO) | ||
64 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) | 67 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) |
65 | 68 | ||
66 | #endif /* __KERNEL__ */ | 69 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index fafff8dbd5d9..d99aac0d69f1 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -33,13 +33,31 @@ | |||
33 | 33 | ||
34 | /* Macro to make the code more readable. */ | 34 | /* Macro to make the code more readable. */ |
35 | #ifdef CONFIG_8xx_CPU6 | 35 | #ifdef CONFIG_8xx_CPU6 |
36 | #define DO_8xx_CPU6(val, reg) \ | 36 | #define SPRN_MI_TWC_ADDR 0x2b80 |
37 | li reg, val; \ | 37 | #define SPRN_MI_RPN_ADDR 0x2d80 |
38 | stw reg, 12(r0); \ | 38 | #define SPRN_MD_TWC_ADDR 0x3b80 |
39 | lwz reg, 12(r0); | 39 | #define SPRN_MD_RPN_ADDR 0x3d80 |
40 | |||
41 | #define MTSPR_CPU6(spr, reg, treg) \ | ||
42 | li treg, spr##_ADDR; \ | ||
43 | stw treg, 12(r0); \ | ||
44 | lwz treg, 12(r0); \ | ||
45 | mtspr spr, reg | ||
40 | #else | 46 | #else |
41 | #define DO_8xx_CPU6(val, reg) | 47 | #define MTSPR_CPU6(spr, reg, treg) \ |
48 | mtspr spr, reg | ||
42 | #endif | 49 | #endif |
50 | |||
51 | /* | ||
52 | * Value for the bits that have fixed value in RPN entries. | ||
53 | * Also used for tagging DAR for DTLBerror. | ||
54 | */ | ||
55 | #ifdef CONFIG_PPC_16K_PAGES | ||
56 | #define RPN_PATTERN (0x00f0 | MD_SPS16K) | ||
57 | #else | ||
58 | #define RPN_PATTERN 0x00f0 | ||
59 | #endif | ||
60 | |||
43 | __HEAD | 61 | __HEAD |
44 | _ENTRY(_stext); | 62 | _ENTRY(_stext); |
45 | _ENTRY(_start); | 63 | _ENTRY(_start); |
@@ -65,13 +83,6 @@ _ENTRY(_start); | |||
65 | * 8M 1:1. I also mapped an additional I/O space 1:1 so we can get to | 83 | * 8M 1:1. I also mapped an additional I/O space 1:1 so we can get to |
66 | * the "internal" processor registers before MMU_init is called. | 84 | * the "internal" processor registers before MMU_init is called. |
67 | * | 85 | * |
68 | * The TLB code currently contains a major hack. Since I use the condition | ||
69 | * code register, I have to save and restore it. I am out of registers, so | ||
70 | * I just store it in memory location 0 (the TLB handlers are not reentrant). | ||
71 | * To avoid making any decisions, I need to use the "segment" valid bit | ||
72 | * in the first level table, but that would require many changes to the | ||
73 | * Linux page directory/table functions that I don't want to do right now. | ||
74 | * | ||
75 | * -- Dan | 86 | * -- Dan |
76 | */ | 87 | */ |
77 | .globl __start | 88 | .globl __start |
@@ -211,7 +222,7 @@ MachineCheck: | |||
211 | EXCEPTION_PROLOG | 222 | EXCEPTION_PROLOG |
212 | mfspr r4,SPRN_DAR | 223 | mfspr r4,SPRN_DAR |
213 | stw r4,_DAR(r11) | 224 | stw r4,_DAR(r11) |
214 | li r5,0x00f0 | 225 | li r5,RPN_PATTERN |
215 | mtspr SPRN_DAR,r5 /* Tag DAR, to be used in DTLB Error */ | 226 | mtspr SPRN_DAR,r5 /* Tag DAR, to be used in DTLB Error */ |
216 | mfspr r5,SPRN_DSISR | 227 | mfspr r5,SPRN_DSISR |
217 | stw r5,_DSISR(r11) | 228 | stw r5,_DSISR(r11) |
@@ -219,30 +230,16 @@ MachineCheck: | |||
219 | EXC_XFER_STD(0x200, machine_check_exception) | 230 | EXC_XFER_STD(0x200, machine_check_exception) |
220 | 231 | ||
221 | /* Data access exception. | 232 | /* Data access exception. |
222 | * This is "never generated" by the MPC8xx. We jump to it for other | 233 | * This is "never generated" by the MPC8xx. |
223 | * translation errors. | ||
224 | */ | 234 | */ |
225 | . = 0x300 | 235 | . = 0x300 |
226 | DataAccess: | 236 | DataAccess: |
227 | EXCEPTION_PROLOG | ||
228 | mfspr r10,SPRN_DSISR | ||
229 | stw r10,_DSISR(r11) | ||
230 | mr r5,r10 | ||
231 | mfspr r4,SPRN_DAR | ||
232 | li r10,0x00f0 | ||
233 | mtspr SPRN_DAR,r10 /* Tag DAR, to be used in DTLB Error */ | ||
234 | EXC_XFER_LITE(0x300, handle_page_fault) | ||
235 | 237 | ||
236 | /* Instruction access exception. | 238 | /* Instruction access exception. |
237 | * This is "never generated" by the MPC8xx. We jump to it for other | 239 | * This is "never generated" by the MPC8xx. |
238 | * translation errors. | ||
239 | */ | 240 | */ |
240 | . = 0x400 | 241 | . = 0x400 |
241 | InstructionAccess: | 242 | InstructionAccess: |
242 | EXCEPTION_PROLOG | ||
243 | mr r4,r12 | ||
244 | mr r5,r9 | ||
245 | EXC_XFER_LITE(0x400, handle_page_fault) | ||
246 | 243 | ||
247 | /* External interrupt */ | 244 | /* External interrupt */ |
248 | EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE) | 245 | EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE) |
@@ -253,7 +250,7 @@ Alignment: | |||
253 | EXCEPTION_PROLOG | 250 | EXCEPTION_PROLOG |
254 | mfspr r4,SPRN_DAR | 251 | mfspr r4,SPRN_DAR |
255 | stw r4,_DAR(r11) | 252 | stw r4,_DAR(r11) |
256 | li r5,0x00f0 | 253 | li r5,RPN_PATTERN |
257 | mtspr SPRN_DAR,r5 /* Tag DAR, to be used in DTLB Error */ | 254 | mtspr SPRN_DAR,r5 /* Tag DAR, to be used in DTLB Error */ |
258 | mfspr r5,SPRN_DSISR | 255 | mfspr r5,SPRN_DSISR |
259 | stw r5,_DSISR(r11) | 256 | stw r5,_DSISR(r11) |
@@ -292,8 +289,8 @@ SystemCall: | |||
292 | . = 0x1100 | 289 | . = 0x1100 |
293 | /* | 290 | /* |
294 | * For the MPC8xx, this is a software tablewalk to load the instruction | 291 | * For the MPC8xx, this is a software tablewalk to load the instruction |
295 | * TLB. It is modelled after the example in the Motorola manual. The task | 292 | * TLB. The task switch loads the M_TW register with the pointer to the first |
296 | * switch loads the M_TWB register with the pointer to the first level table. | 293 | * level table. |
297 | * If we discover there is no second level table (value is zero) or if there | 294 | * If we discover there is no second level table (value is zero) or if there |
298 | * is an invalid pte, we load that into the TLB, which causes another fault | 295 | * is an invalid pte, we load that into the TLB, which causes another fault |
299 | * into the TLB Error interrupt where we can handle such problems. | 296 | * into the TLB Error interrupt where we can handle such problems. |
@@ -302,20 +299,17 @@ SystemCall: | |||
302 | */ | 299 | */ |
303 | InstructionTLBMiss: | 300 | InstructionTLBMiss: |
304 | #ifdef CONFIG_8xx_CPU6 | 301 | #ifdef CONFIG_8xx_CPU6 |
305 | stw r3, 8(r0) | 302 | mtspr SPRN_DAR, r3 |
306 | #endif | 303 | #endif |
307 | EXCEPTION_PROLOG_0 | 304 | EXCEPTION_PROLOG_0 |
308 | mtspr SPRN_SPRG_SCRATCH2, r10 | 305 | mtspr SPRN_SPRG_SCRATCH2, r10 |
309 | mfspr r10, SPRN_SRR0 /* Get effective address of fault */ | 306 | mfspr r10, SPRN_SRR0 /* Get effective address of fault */ |
310 | #ifdef CONFIG_8xx_CPU15 | 307 | #ifdef CONFIG_8xx_CPU15 |
311 | addi r11, r10, 0x1000 | 308 | addi r11, r10, PAGE_SIZE |
312 | tlbie r11 | 309 | tlbie r11 |
313 | addi r11, r10, -0x1000 | 310 | addi r11, r10, -PAGE_SIZE |
314 | tlbie r11 | 311 | tlbie r11 |
315 | #endif | 312 | #endif |
316 | DO_8xx_CPU6(0x3780, r3) | ||
317 | mtspr SPRN_MD_EPN, r10 /* Have to use MD_EPN for walk, MI_EPN can't */ | ||
318 | mfspr r10, SPRN_M_TWB /* Get level 1 table entry address */ | ||
319 | 313 | ||
320 | /* If we are faulting a kernel address, we have to use the | 314 | /* If we are faulting a kernel address, we have to use the |
321 | * kernel page tables. | 315 | * kernel page tables. |
@@ -323,32 +317,37 @@ InstructionTLBMiss: | |||
323 | #ifdef CONFIG_MODULES | 317 | #ifdef CONFIG_MODULES |
324 | /* Only modules will cause ITLB Misses as we always | 318 | /* Only modules will cause ITLB Misses as we always |
325 | * pin the first 8MB of kernel memory */ | 319 | * pin the first 8MB of kernel memory */ |
326 | andi. r11, r10, 0x0800 /* Address >= 0x80000000 */ | 320 | andis. r11, r10, 0x8000 /* Address >= 0x80000000 */ |
321 | #endif | ||
322 | mfspr r11, SPRN_M_TW /* Get level 1 table base address */ | ||
323 | #ifdef CONFIG_MODULES | ||
327 | beq 3f | 324 | beq 3f |
328 | lis r11, swapper_pg_dir@h | 325 | lis r11, (swapper_pg_dir-PAGE_OFFSET)@h |
329 | ori r11, r11, swapper_pg_dir@l | 326 | ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l |
330 | rlwimi r10, r11, 0, 2, 19 | ||
331 | 3: | 327 | 3: |
332 | #endif | 328 | #endif |
333 | lwz r11, 0(r10) /* Get the level 1 entry */ | 329 | /* Extract level 1 index */ |
330 | rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 | ||
331 | lwzx r11, r10, r11 /* Get the level 1 entry */ | ||
334 | rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ | 332 | rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ |
335 | beq 2f /* If zero, don't try to find a pte */ | 333 | beq 2f /* If zero, don't try to find a pte */ |
336 | 334 | ||
337 | /* We have a pte table, so load the MI_TWC with the attributes | 335 | /* We have a pte table, so load the MI_TWC with the attributes |
338 | * for this "segment." | 336 | * for this "segment." |
339 | */ | 337 | */ |
340 | ori r11,r11,1 /* Set valid bit */ | 338 | MTSPR_CPU6(SPRN_MI_TWC, r11, r3) /* Set segment attributes */ |
341 | DO_8xx_CPU6(0x2b80, r3) | 339 | mfspr r11, SPRN_SRR0 /* Get effective address of fault */ |
342 | mtspr SPRN_MI_TWC, r11 /* Set segment attributes */ | 340 | /* Extract level 2 index */ |
343 | DO_8xx_CPU6(0x3b80, r3) | 341 | rlwinm r11, r11, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29 |
344 | mtspr SPRN_MD_TWC, r11 /* Load pte table base address */ | 342 | lwzx r10, r10, r11 /* Get the pte */ |
345 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | ||
346 | lwz r10, 0(r11) /* Get the pte */ | ||
347 | 343 | ||
348 | #ifdef CONFIG_SWAP | 344 | #ifdef CONFIG_SWAP |
349 | andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT | 345 | andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT |
350 | cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT | 346 | cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT |
347 | li r11, RPN_PATTERN | ||
351 | bne- cr0, 2f | 348 | bne- cr0, 2f |
349 | #else | ||
350 | li r11, RPN_PATTERN | ||
352 | #endif | 351 | #endif |
353 | /* The Linux PTE won't go exactly into the MMU TLB. | 352 | /* The Linux PTE won't go exactly into the MMU TLB. |
354 | * Software indicator bits 21 and 28 must be clear. | 353 | * Software indicator bits 21 and 28 must be clear. |
@@ -356,62 +355,63 @@ InstructionTLBMiss: | |||
356 | * set. All other Linux PTE bits control the behavior | 355 | * set. All other Linux PTE bits control the behavior |
357 | * of the MMU. | 356 | * of the MMU. |
358 | */ | 357 | */ |
359 | li r11, 0x00f0 | ||
360 | rlwimi r10, r11, 0, 0x07f8 /* Set 24-27, clear 21-23,28 */ | 358 | rlwimi r10, r11, 0, 0x07f8 /* Set 24-27, clear 21-23,28 */ |
361 | DO_8xx_CPU6(0x2d80, r3) | 359 | MTSPR_CPU6(SPRN_MI_RPN, r10, r3) /* Update TLB entry */ |
362 | mtspr SPRN_MI_RPN, r10 /* Update TLB entry */ | ||
363 | 360 | ||
364 | /* Restore registers */ | 361 | /* Restore registers */ |
365 | #ifdef CONFIG_8xx_CPU6 | 362 | #ifdef CONFIG_8xx_CPU6 |
366 | lwz r3, 8(r0) | 363 | mfspr r3, SPRN_DAR |
364 | mtspr SPRN_DAR, r11 /* Tag DAR */ | ||
367 | #endif | 365 | #endif |
368 | mfspr r10, SPRN_SPRG_SCRATCH2 | 366 | mfspr r10, SPRN_SPRG_SCRATCH2 |
369 | EXCEPTION_EPILOG_0 | 367 | EXCEPTION_EPILOG_0 |
370 | rfi | 368 | rfi |
371 | 2: | 369 | 2: |
372 | mfspr r11, SPRN_SRR1 | 370 | mfspr r10, SPRN_SRR1 |
373 | /* clear all error bits as TLB Miss | 371 | /* clear all error bits as TLB Miss |
374 | * sets a few unconditionally | 372 | * sets a few unconditionally |
375 | */ | 373 | */ |
376 | rlwinm r11, r11, 0, 0xffff | 374 | rlwinm r10, r10, 0, 0xffff |
377 | mtspr SPRN_SRR1, r11 | 375 | mtspr SPRN_SRR1, r10 |
378 | 376 | ||
379 | /* Restore registers */ | 377 | /* Restore registers */ |
380 | #ifdef CONFIG_8xx_CPU6 | 378 | #ifdef CONFIG_8xx_CPU6 |
381 | lwz r3, 8(r0) | 379 | mfspr r3, SPRN_DAR |
380 | mtspr SPRN_DAR, r11 /* Tag DAR */ | ||
382 | #endif | 381 | #endif |
383 | mfspr r10, SPRN_SPRG_SCRATCH2 | 382 | mfspr r10, SPRN_SPRG_SCRATCH2 |
384 | EXCEPTION_EPILOG_0 | 383 | b InstructionTLBError1 |
385 | b InstructionAccess | ||
386 | 384 | ||
387 | . = 0x1200 | 385 | . = 0x1200 |
388 | DataStoreTLBMiss: | 386 | DataStoreTLBMiss: |
389 | #ifdef CONFIG_8xx_CPU6 | 387 | #ifdef CONFIG_8xx_CPU6 |
390 | stw r3, 8(r0) | 388 | mtspr SPRN_DAR, r3 |
391 | #endif | 389 | #endif |
392 | EXCEPTION_PROLOG_0 | 390 | EXCEPTION_PROLOG_0 |
393 | mtspr SPRN_SPRG_SCRATCH2, r10 | 391 | mtspr SPRN_SPRG_SCRATCH2, r10 |
394 | mfspr r10, SPRN_M_TWB /* Get level 1 table entry address */ | 392 | mfspr r10, SPRN_MD_EPN |
395 | 393 | ||
396 | /* If we are faulting a kernel address, we have to use the | 394 | /* If we are faulting a kernel address, we have to use the |
397 | * kernel page tables. | 395 | * kernel page tables. |
398 | */ | 396 | */ |
399 | andi. r11, r10, 0x0800 | 397 | andis. r11, r10, 0x8000 |
398 | mfspr r11, SPRN_M_TW /* Get level 1 table base address */ | ||
400 | beq 3f | 399 | beq 3f |
401 | lis r11, swapper_pg_dir@h | 400 | lis r11, (swapper_pg_dir-PAGE_OFFSET)@h |
402 | ori r11, r11, swapper_pg_dir@l | 401 | ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l |
403 | rlwimi r10, r11, 0, 2, 19 | ||
404 | 3: | 402 | 3: |
405 | lwz r11, 0(r10) /* Get the level 1 entry */ | 403 | /* Extract level 1 index */ |
404 | rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 | ||
405 | lwzx r11, r10, r11 /* Get the level 1 entry */ | ||
406 | rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ | 406 | rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */ |
407 | beq 2f /* If zero, don't try to find a pte */ | 407 | beq 2f /* If zero, don't try to find a pte */ |
408 | 408 | ||
409 | /* We have a pte table, so load fetch the pte from the table. | 409 | /* We have a pte table, so load fetch the pte from the table. |
410 | */ | 410 | */ |
411 | ori r11, r11, 1 /* Set valid bit in physical L2 page */ | 411 | mfspr r10, SPRN_MD_EPN /* Get address of fault */ |
412 | DO_8xx_CPU6(0x3b80, r3) | 412 | /* Extract level 2 index */ |
413 | mtspr SPRN_MD_TWC, r11 /* Load pte table base address */ | 413 | rlwinm r10, r10, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29 |
414 | mfspr r10, SPRN_MD_TWC /* ....and get the pte address */ | 414 | rlwimi r10, r11, 0, 0, 32 - PAGE_SHIFT - 1 /* Add level 2 base */ |
415 | lwz r10, 0(r10) /* Get the pte */ | 415 | lwz r10, 0(r10) /* Get the pte */ |
416 | 416 | ||
417 | /* Insert the Guarded flag into the TWC from the Linux PTE. | 417 | /* Insert the Guarded flag into the TWC from the Linux PTE. |
@@ -425,8 +425,7 @@ DataStoreTLBMiss: | |||
425 | * It is bit 25 in the Linux PTE and bit 30 in the TWC | 425 | * It is bit 25 in the Linux PTE and bit 30 in the TWC |
426 | */ | 426 | */ |
427 | rlwimi r11, r10, 32-5, 30, 30 | 427 | rlwimi r11, r10, 32-5, 30, 30 |
428 | DO_8xx_CPU6(0x3b80, r3) | 428 | MTSPR_CPU6(SPRN_MD_TWC, r11, r3) |
429 | mtspr SPRN_MD_TWC, r11 | ||
430 | 429 | ||
431 | /* Both _PAGE_ACCESSED and _PAGE_PRESENT has to be set. | 430 | /* Both _PAGE_ACCESSED and _PAGE_PRESENT has to be set. |
432 | * We also need to know if the insn is a load/store, so: | 431 | * We also need to know if the insn is a load/store, so: |
@@ -442,14 +441,8 @@ DataStoreTLBMiss: | |||
442 | and r11, r11, r10 | 441 | and r11, r11, r10 |
443 | rlwimi r10, r11, 0, _PAGE_PRESENT | 442 | rlwimi r10, r11, 0, _PAGE_PRESENT |
444 | #endif | 443 | #endif |
445 | /* Honour kernel RO, User NA */ | 444 | /* invert RW */ |
446 | /* 0x200 == Extended encoding, bit 22 */ | 445 | xori r10, r10, _PAGE_RW |
447 | rlwimi r10, r10, 32-2, 0x200 /* Copy USER to bit 22, 0x200 */ | ||
448 | /* r11 = (r10 & _PAGE_RW) >> 1 */ | ||
449 | rlwinm r11, r10, 32-1, 0x200 | ||
450 | or r10, r11, r10 | ||
451 | /* invert RW and 0x200 bits */ | ||
452 | xori r10, r10, _PAGE_RW | 0x200 | ||
453 | 446 | ||
454 | /* The Linux PTE won't go exactly into the MMU TLB. | 447 | /* The Linux PTE won't go exactly into the MMU TLB. |
455 | * Software indicator bits 22 and 28 must be clear. | 448 | * Software indicator bits 22 and 28 must be clear. |
@@ -457,14 +450,13 @@ DataStoreTLBMiss: | |||
457 | * set. All other Linux PTE bits control the behavior | 450 | * set. All other Linux PTE bits control the behavior |
458 | * of the MMU. | 451 | * of the MMU. |
459 | */ | 452 | */ |
460 | 2: li r11, 0x00f0 | 453 | 2: li r11, RPN_PATTERN |
461 | rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ | 454 | rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ |
462 | DO_8xx_CPU6(0x3d80, r3) | 455 | MTSPR_CPU6(SPRN_MD_RPN, r10, r3) /* Update TLB entry */ |
463 | mtspr SPRN_MD_RPN, r10 /* Update TLB entry */ | ||
464 | 456 | ||
465 | /* Restore registers */ | 457 | /* Restore registers */ |
466 | #ifdef CONFIG_8xx_CPU6 | 458 | #ifdef CONFIG_8xx_CPU6 |
467 | lwz r3, 8(r0) | 459 | mfspr r3, SPRN_DAR |
468 | #endif | 460 | #endif |
469 | mtspr SPRN_DAR, r11 /* Tag DAR */ | 461 | mtspr SPRN_DAR, r11 /* Tag DAR */ |
470 | mfspr r10, SPRN_SPRG_SCRATCH2 | 462 | mfspr r10, SPRN_SPRG_SCRATCH2 |
@@ -477,7 +469,17 @@ DataStoreTLBMiss: | |||
477 | */ | 469 | */ |
478 | . = 0x1300 | 470 | . = 0x1300 |
479 | InstructionTLBError: | 471 | InstructionTLBError: |
480 | b InstructionAccess | 472 | EXCEPTION_PROLOG_0 |
473 | InstructionTLBError1: | ||
474 | EXCEPTION_PROLOG_1 | ||
475 | EXCEPTION_PROLOG_2 | ||
476 | mr r4,r12 | ||
477 | mr r5,r9 | ||
478 | andis. r10,r5,0x4000 | ||
479 | beq+ 1f | ||
480 | tlbie r4 | ||
481 | /* 0x400 is InstructionAccess exception, needed by bad_page_fault() */ | ||
482 | 1: EXC_XFER_LITE(0x400, handle_page_fault) | ||
481 | 483 | ||
482 | /* This is the data TLB error on the MPC8xx. This could be due to | 484 | /* This is the data TLB error on the MPC8xx. This could be due to |
483 | * many reasons, including a dirty update to a pte. We bail out to | 485 | * many reasons, including a dirty update to a pte. We bail out to |
@@ -488,11 +490,21 @@ DataTLBError: | |||
488 | EXCEPTION_PROLOG_0 | 490 | EXCEPTION_PROLOG_0 |
489 | 491 | ||
490 | mfspr r11, SPRN_DAR | 492 | mfspr r11, SPRN_DAR |
491 | cmpwi cr0, r11, 0x00f0 | 493 | cmpwi cr0, r11, RPN_PATTERN |
492 | beq- FixupDAR /* must be a buggy dcbX, icbi insn. */ | 494 | beq- FixupDAR /* must be a buggy dcbX, icbi insn. */ |
493 | DARFixed:/* Return from dcbx instruction bug workaround */ | 495 | DARFixed:/* Return from dcbx instruction bug workaround */ |
494 | EXCEPTION_EPILOG_0 | 496 | EXCEPTION_PROLOG_1 |
495 | b DataAccess | 497 | EXCEPTION_PROLOG_2 |
498 | mfspr r5,SPRN_DSISR | ||
499 | stw r5,_DSISR(r11) | ||
500 | mfspr r4,SPRN_DAR | ||
501 | andis. r10,r5,0x4000 | ||
502 | beq+ 1f | ||
503 | tlbie r4 | ||
504 | 1: li r10,RPN_PATTERN | ||
505 | mtspr SPRN_DAR,r10 /* Tag DAR, to be used in DTLB Error */ | ||
506 | /* 0x300 is DataAccess exception, needed by bad_page_fault() */ | ||
507 | EXC_XFER_LITE(0x300, handle_page_fault) | ||
496 | 508 | ||
497 | EXCEPTION(0x1500, Trap_15, unknown_exception, EXC_XFER_EE) | 509 | EXCEPTION(0x1500, Trap_15, unknown_exception, EXC_XFER_EE) |
498 | EXCEPTION(0x1600, Trap_16, unknown_exception, EXC_XFER_EE) | 510 | EXCEPTION(0x1600, Trap_16, unknown_exception, EXC_XFER_EE) |
@@ -521,29 +533,30 @@ DARFixed:/* Return from dcbx instruction bug workaround */ | |||
521 | #define NO_SELF_MODIFYING_CODE | 533 | #define NO_SELF_MODIFYING_CODE |
522 | FixupDAR:/* Entry point for dcbx workaround. */ | 534 | FixupDAR:/* Entry point for dcbx workaround. */ |
523 | #ifdef CONFIG_8xx_CPU6 | 535 | #ifdef CONFIG_8xx_CPU6 |
524 | stw r3, 8(r0) | 536 | mtspr SPRN_DAR, r3 |
525 | #endif | 537 | #endif |
526 | mtspr SPRN_SPRG_SCRATCH2, r10 | 538 | mtspr SPRN_SPRG_SCRATCH2, r10 |
527 | /* fetch instruction from memory. */ | 539 | /* fetch instruction from memory. */ |
528 | mfspr r10, SPRN_SRR0 | 540 | mfspr r10, SPRN_SRR0 |
529 | andis. r11, r10, 0x8000 /* Address >= 0x80000000 */ | 541 | andis. r11, r10, 0x8000 /* Address >= 0x80000000 */ |
530 | DO_8xx_CPU6(0x3780, r3) | 542 | mfspr r11, SPRN_M_TW /* Get level 1 table base address */ |
531 | mtspr SPRN_MD_EPN, r10 | ||
532 | mfspr r11, SPRN_M_TWB /* Get level 1 table entry address */ | ||
533 | beq- 3f /* Branch if user space */ | 543 | beq- 3f /* Branch if user space */ |
534 | lis r11, (swapper_pg_dir-PAGE_OFFSET)@h | 544 | lis r11, (swapper_pg_dir-PAGE_OFFSET)@h |
535 | ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l | 545 | ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l |
536 | rlwimi r11, r10, 32-20, 0xffc /* r11 = r11&~0xffc|(r10>>20)&0xffc */ | 546 | /* Extract level 1 index */ |
537 | 3: lwz r11, 0(r11) /* Get the level 1 entry */ | 547 | 3: rlwinm r10, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29 |
538 | DO_8xx_CPU6(0x3b80, r3) | 548 | lwzx r11, r10, r11 /* Get the level 1 entry */ |
539 | mtspr SPRN_MD_TWC, r11 /* Load pte table base address */ | 549 | rlwinm r10, r11,0,0,19 /* Extract page descriptor page address */ |
540 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | 550 | mfspr r11, SPRN_SRR0 /* Get effective address of fault */ |
541 | lwz r11, 0(r11) /* Get the pte */ | 551 | /* Extract level 2 index */ |
552 | rlwinm r11, r11, 32 - (PAGE_SHIFT - 2), 32 - PAGE_SHIFT, 29 | ||
553 | lwzx r11, r10, r11 /* Get the pte */ | ||
542 | #ifdef CONFIG_8xx_CPU6 | 554 | #ifdef CONFIG_8xx_CPU6 |
543 | lwz r3, 8(r0) /* restore r3 from memory */ | 555 | mfspr r3, SPRN_DAR |
544 | #endif | 556 | #endif |
545 | /* concat physical page address(r11) and page offset(r10) */ | 557 | /* concat physical page address(r11) and page offset(r10) */ |
546 | rlwimi r11, r10, 0, 20, 31 | 558 | mfspr r10, SPRN_SRR0 |
559 | rlwimi r11, r10, 0, 32 - PAGE_SHIFT, 31 | ||
547 | lwz r11,0(r11) | 560 | lwz r11,0(r11) |
548 | /* Check if it really is a dcbx instruction. */ | 561 | /* Check if it really is a dcbx instruction. */ |
549 | /* dcbt and dcbtst does not generate DTLB Misses/Errors, | 562 | /* dcbt and dcbtst does not generate DTLB Misses/Errors, |
@@ -698,11 +711,11 @@ start_here: | |||
698 | #ifdef CONFIG_8xx_CPU6 | 711 | #ifdef CONFIG_8xx_CPU6 |
699 | lis r4, cpu6_errata_word@h | 712 | lis r4, cpu6_errata_word@h |
700 | ori r4, r4, cpu6_errata_word@l | 713 | ori r4, r4, cpu6_errata_word@l |
701 | li r3, 0x3980 | 714 | li r3, 0x3f80 |
702 | stw r3, 12(r4) | 715 | stw r3, 12(r4) |
703 | lwz r3, 12(r4) | 716 | lwz r3, 12(r4) |
704 | #endif | 717 | #endif |
705 | mtspr SPRN_M_TWB, r6 | 718 | mtspr SPRN_M_TW, r6 |
706 | lis r4,2f@h | 719 | lis r4,2f@h |
707 | ori r4,r4,2f@l | 720 | ori r4,r4,2f@l |
708 | tophys(r4,r4) | 721 | tophys(r4,r4) |
@@ -876,10 +889,10 @@ _GLOBAL(set_context) | |||
876 | lis r6, cpu6_errata_word@h | 889 | lis r6, cpu6_errata_word@h |
877 | ori r6, r6, cpu6_errata_word@l | 890 | ori r6, r6, cpu6_errata_word@l |
878 | tophys (r4, r4) | 891 | tophys (r4, r4) |
879 | li r7, 0x3980 | 892 | li r7, 0x3f80 |
880 | stw r7, 12(r6) | 893 | stw r7, 12(r6) |
881 | lwz r7, 12(r6) | 894 | lwz r7, 12(r6) |
882 | mtspr SPRN_M_TWB, r4 /* Update MMU base address */ | 895 | mtspr SPRN_M_TW, r4 /* Update MMU base address */ |
883 | li r7, 0x3380 | 896 | li r7, 0x3380 |
884 | stw r7, 12(r6) | 897 | stw r7, 12(r6) |
885 | lwz r7, 12(r6) | 898 | lwz r7, 12(r6) |
@@ -887,7 +900,7 @@ _GLOBAL(set_context) | |||
887 | #else | 900 | #else |
888 | mtspr SPRN_M_CASID,r3 /* Update context */ | 901 | mtspr SPRN_M_CASID,r3 /* Update context */ |
889 | tophys (r4, r4) | 902 | tophys (r4, r4) |
890 | mtspr SPRN_M_TWB, r4 /* and pgd */ | 903 | mtspr SPRN_M_TW, r4 /* and pgd */ |
891 | #endif | 904 | #endif |
892 | SYNC | 905 | SYNC |
893 | blr | 906 | blr |
@@ -919,12 +932,13 @@ set_dec_cpu6: | |||
919 | .globl sdata | 932 | .globl sdata |
920 | sdata: | 933 | sdata: |
921 | .globl empty_zero_page | 934 | .globl empty_zero_page |
935 | .align PAGE_SHIFT | ||
922 | empty_zero_page: | 936 | empty_zero_page: |
923 | .space 4096 | 937 | .space PAGE_SIZE |
924 | 938 | ||
925 | .globl swapper_pg_dir | 939 | .globl swapper_pg_dir |
926 | swapper_pg_dir: | 940 | swapper_pg_dir: |
927 | .space 4096 | 941 | .space PGD_TABLE_SIZE |
928 | 942 | ||
929 | /* Room for two PTE table poiners, usually the kernel and current user | 943 | /* Room for two PTE table poiners, usually the kernel and current user |
930 | * pointer to their respective root page table (pgdir). | 944 | * pointer to their respective root page table (pgdir). |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 08d659a9fcdb..eb79907f34fa 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <asm/tlbflush.h> | 43 | #include <asm/tlbflush.h> |
44 | #include <asm/siginfo.h> | 44 | #include <asm/siginfo.h> |
45 | #include <asm/debug.h> | 45 | #include <asm/debug.h> |
46 | #include <mm/mmu_decl.h> | ||
47 | 46 | ||
48 | #include "icswx.h" | 47 | #include "icswx.h" |
49 | 48 | ||
@@ -380,12 +379,6 @@ good_area: | |||
380 | goto bad_area; | 379 | goto bad_area; |
381 | #endif /* CONFIG_6xx */ | 380 | #endif /* CONFIG_6xx */ |
382 | #if defined(CONFIG_8xx) | 381 | #if defined(CONFIG_8xx) |
383 | /* 8xx sometimes need to load a invalid/non-present TLBs. | ||
384 | * These must be invalidated separately as linux mm don't. | ||
385 | */ | ||
386 | if (error_code & 0x40000000) /* no translation? */ | ||
387 | _tlbil_va(address, 0, 0, 0); | ||
388 | |||
389 | /* The MPC8xx seems to always set 0x80000000, which is | 382 | /* The MPC8xx seems to always set 0x80000000, which is |
390 | * "undefined". Of those that can be set, this is the only | 383 | * "undefined". Of those that can be set, this is the only |
391 | * one which seems bad. | 384 | * one which seems bad. |
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig index bd6f1a1cf922..157250426b56 100644 --- a/arch/powerpc/platforms/8xx/Kconfig +++ b/arch/powerpc/platforms/8xx/Kconfig | |||
@@ -1,6 +1,3 @@ | |||
1 | config FADS | ||
2 | bool | ||
3 | |||
4 | config CPM1 | 1 | config CPM1 |
5 | bool | 2 | bool |
6 | select CPM | 3 | select CPM |
@@ -13,7 +10,6 @@ choice | |||
13 | 10 | ||
14 | config MPC8XXFADS | 11 | config MPC8XXFADS |
15 | bool "FADS" | 12 | bool "FADS" |
16 | select FADS | ||
17 | 13 | ||
18 | config MPC86XADS | 14 | config MPC86XADS |
19 | bool "MPC86XADS" | 15 | bool "MPC86XADS" |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index c04b718307c8..08d60f183dad 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -58,6 +58,19 @@ | |||
58 | #define RIO_ISR_AACR 0x10120 | 58 | #define RIO_ISR_AACR 0x10120 |
59 | #define RIO_ISR_AACR_AA 0x1 /* Accept All ID */ | 59 | #define RIO_ISR_AACR_AA 0x1 /* Accept All ID */ |
60 | 60 | ||
61 | #define RIWTAR_TRAD_VAL_SHIFT 12 | ||
62 | #define RIWTAR_TRAD_MASK 0x00FFFFFF | ||
63 | #define RIWBAR_BADD_VAL_SHIFT 12 | ||
64 | #define RIWBAR_BADD_MASK 0x003FFFFF | ||
65 | #define RIWAR_ENABLE 0x80000000 | ||
66 | #define RIWAR_TGINT_LOCAL 0x00F00000 | ||
67 | #define RIWAR_RDTYP_NO_SNOOP 0x00040000 | ||
68 | #define RIWAR_RDTYP_SNOOP 0x00050000 | ||
69 | #define RIWAR_WRTYP_NO_SNOOP 0x00004000 | ||
70 | #define RIWAR_WRTYP_SNOOP 0x00005000 | ||
71 | #define RIWAR_WRTYP_ALLOC 0x00006000 | ||
72 | #define RIWAR_SIZE_MASK 0x0000003F | ||
73 | |||
61 | #define __fsl_read_rio_config(x, addr, err, op) \ | 74 | #define __fsl_read_rio_config(x, addr, err, op) \ |
62 | __asm__ __volatile__( \ | 75 | __asm__ __volatile__( \ |
63 | "1: "op" %1,0(%2)\n" \ | 76 | "1: "op" %1,0(%2)\n" \ |
@@ -266,6 +279,89 @@ fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid, | |||
266 | return 0; | 279 | return 0; |
267 | } | 280 | } |
268 | 281 | ||
282 | static void fsl_rio_inbound_mem_init(struct rio_priv *priv) | ||
283 | { | ||
284 | int i; | ||
285 | |||
286 | /* close inbound windows */ | ||
287 | for (i = 0; i < RIO_INB_ATMU_COUNT; i++) | ||
288 | out_be32(&priv->inb_atmu_regs[i].riwar, 0); | ||
289 | } | ||
290 | |||
291 | int fsl_map_inb_mem(struct rio_mport *mport, dma_addr_t lstart, | ||
292 | u64 rstart, u32 size, u32 flags) | ||
293 | { | ||
294 | struct rio_priv *priv = mport->priv; | ||
295 | u32 base_size; | ||
296 | unsigned int base_size_log; | ||
297 | u64 win_start, win_end; | ||
298 | u32 riwar; | ||
299 | int i; | ||
300 | |||
301 | if ((size & (size - 1)) != 0) | ||
302 | return -EINVAL; | ||
303 | |||
304 | base_size_log = ilog2(size); | ||
305 | base_size = 1 << base_size_log; | ||
306 | |||
307 | /* check if addresses are aligned with the window size */ | ||
308 | if (lstart & (base_size - 1)) | ||
309 | return -EINVAL; | ||
310 | if (rstart & (base_size - 1)) | ||
311 | return -EINVAL; | ||
312 | |||
313 | /* check for conflicting ranges */ | ||
314 | for (i = 0; i < RIO_INB_ATMU_COUNT; i++) { | ||
315 | riwar = in_be32(&priv->inb_atmu_regs[i].riwar); | ||
316 | if ((riwar & RIWAR_ENABLE) == 0) | ||
317 | continue; | ||
318 | win_start = ((u64)(in_be32(&priv->inb_atmu_regs[i].riwbar) & RIWBAR_BADD_MASK)) | ||
319 | << RIWBAR_BADD_VAL_SHIFT; | ||
320 | win_end = win_start + ((1 << ((riwar & RIWAR_SIZE_MASK) + 1)) - 1); | ||
321 | if (rstart < win_end && (rstart + size) > win_start) | ||
322 | return -EINVAL; | ||
323 | } | ||
324 | |||
325 | /* find unused atmu */ | ||
326 | for (i = 0; i < RIO_INB_ATMU_COUNT; i++) { | ||
327 | riwar = in_be32(&priv->inb_atmu_regs[i].riwar); | ||
328 | if ((riwar & RIWAR_ENABLE) == 0) | ||
329 | break; | ||
330 | } | ||
331 | if (i >= RIO_INB_ATMU_COUNT) | ||
332 | return -ENOMEM; | ||
333 | |||
334 | out_be32(&priv->inb_atmu_regs[i].riwtar, lstart >> RIWTAR_TRAD_VAL_SHIFT); | ||
335 | out_be32(&priv->inb_atmu_regs[i].riwbar, rstart >> RIWBAR_BADD_VAL_SHIFT); | ||
336 | out_be32(&priv->inb_atmu_regs[i].riwar, RIWAR_ENABLE | RIWAR_TGINT_LOCAL | | ||
337 | RIWAR_RDTYP_SNOOP | RIWAR_WRTYP_SNOOP | (base_size_log - 1)); | ||
338 | |||
339 | return 0; | ||
340 | } | ||
341 | |||
342 | void fsl_unmap_inb_mem(struct rio_mport *mport, dma_addr_t lstart) | ||
343 | { | ||
344 | u32 win_start_shift, base_start_shift; | ||
345 | struct rio_priv *priv = mport->priv; | ||
346 | u32 riwar, riwtar; | ||
347 | int i; | ||
348 | |||
349 | /* skip default window */ | ||
350 | base_start_shift = lstart >> RIWTAR_TRAD_VAL_SHIFT; | ||
351 | for (i = 0; i < RIO_INB_ATMU_COUNT; i++) { | ||
352 | riwar = in_be32(&priv->inb_atmu_regs[i].riwar); | ||
353 | if ((riwar & RIWAR_ENABLE) == 0) | ||
354 | continue; | ||
355 | |||
356 | riwtar = in_be32(&priv->inb_atmu_regs[i].riwtar); | ||
357 | win_start_shift = riwtar & RIWTAR_TRAD_MASK; | ||
358 | if (win_start_shift == base_start_shift) { | ||
359 | out_be32(&priv->inb_atmu_regs[i].riwar, riwar & ~RIWAR_ENABLE); | ||
360 | return; | ||
361 | } | ||
362 | } | ||
363 | } | ||
364 | |||
269 | void fsl_rio_port_error_handler(int offset) | 365 | void fsl_rio_port_error_handler(int offset) |
270 | { | 366 | { |
271 | /*XXX: Error recovery is not implemented, we just clear errors */ | 367 | /*XXX: Error recovery is not implemented, we just clear errors */ |
@@ -389,6 +485,8 @@ int fsl_rio_setup(struct platform_device *dev) | |||
389 | ops->add_outb_message = fsl_add_outb_message; | 485 | ops->add_outb_message = fsl_add_outb_message; |
390 | ops->add_inb_buffer = fsl_add_inb_buffer; | 486 | ops->add_inb_buffer = fsl_add_inb_buffer; |
391 | ops->get_inb_message = fsl_get_inb_message; | 487 | ops->get_inb_message = fsl_get_inb_message; |
488 | ops->map_inb = fsl_map_inb_mem; | ||
489 | ops->unmap_inb = fsl_unmap_inb_mem; | ||
392 | 490 | ||
393 | rmu_node = of_parse_phandle(dev->dev.of_node, "fsl,srio-rmu-handle", 0); | 491 | rmu_node = of_parse_phandle(dev->dev.of_node, "fsl,srio-rmu-handle", 0); |
394 | if (!rmu_node) { | 492 | if (!rmu_node) { |
@@ -602,6 +700,11 @@ int fsl_rio_setup(struct platform_device *dev) | |||
602 | RIO_ATMU_REGS_PORT2_OFFSET)); | 700 | RIO_ATMU_REGS_PORT2_OFFSET)); |
603 | 701 | ||
604 | priv->maint_atmu_regs = priv->atmu_regs + 1; | 702 | priv->maint_atmu_regs = priv->atmu_regs + 1; |
703 | priv->inb_atmu_regs = (struct rio_inb_atmu_regs __iomem *) | ||
704 | (priv->regs_win + | ||
705 | ((i == 0) ? RIO_INB_ATMU_REGS_PORT1_OFFSET : | ||
706 | RIO_INB_ATMU_REGS_PORT2_OFFSET)); | ||
707 | |||
605 | 708 | ||
606 | /* Set to receive any dist ID for serial RapidIO controller. */ | 709 | /* Set to receive any dist ID for serial RapidIO controller. */ |
607 | if (port->phy_type == RIO_PHY_SERIAL) | 710 | if (port->phy_type == RIO_PHY_SERIAL) |
@@ -620,6 +723,7 @@ int fsl_rio_setup(struct platform_device *dev) | |||
620 | rio_law_start = range_start; | 723 | rio_law_start = range_start; |
621 | 724 | ||
622 | fsl_rio_setup_rmu(port, rmu_np[i]); | 725 | fsl_rio_setup_rmu(port, rmu_np[i]); |
726 | fsl_rio_inbound_mem_init(priv); | ||
623 | 727 | ||
624 | dbell->mport[i] = port; | 728 | dbell->mport[i] = port; |
625 | 729 | ||
diff --git a/arch/powerpc/sysdev/fsl_rio.h b/arch/powerpc/sysdev/fsl_rio.h index ae8e27405a0d..d53407a34f32 100644 --- a/arch/powerpc/sysdev/fsl_rio.h +++ b/arch/powerpc/sysdev/fsl_rio.h | |||
@@ -50,9 +50,12 @@ | |||
50 | #define RIO_S_DBELL_REGS_OFFSET 0x13400 | 50 | #define RIO_S_DBELL_REGS_OFFSET 0x13400 |
51 | #define RIO_S_PW_REGS_OFFSET 0x134e0 | 51 | #define RIO_S_PW_REGS_OFFSET 0x134e0 |
52 | #define RIO_ATMU_REGS_DBELL_OFFSET 0x10C40 | 52 | #define RIO_ATMU_REGS_DBELL_OFFSET 0x10C40 |
53 | #define RIO_INB_ATMU_REGS_PORT1_OFFSET 0x10d60 | ||
54 | #define RIO_INB_ATMU_REGS_PORT2_OFFSET 0x10f60 | ||
53 | 55 | ||
54 | #define MAX_MSG_UNIT_NUM 2 | 56 | #define MAX_MSG_UNIT_NUM 2 |
55 | #define MAX_PORT_NUM 4 | 57 | #define MAX_PORT_NUM 4 |
58 | #define RIO_INB_ATMU_COUNT 4 | ||
56 | 59 | ||
57 | struct rio_atmu_regs { | 60 | struct rio_atmu_regs { |
58 | u32 rowtar; | 61 | u32 rowtar; |
@@ -63,6 +66,15 @@ struct rio_atmu_regs { | |||
63 | u32 pad2[3]; | 66 | u32 pad2[3]; |
64 | }; | 67 | }; |
65 | 68 | ||
69 | struct rio_inb_atmu_regs { | ||
70 | u32 riwtar; | ||
71 | u32 pad1; | ||
72 | u32 riwbar; | ||
73 | u32 pad2; | ||
74 | u32 riwar; | ||
75 | u32 pad3[3]; | ||
76 | }; | ||
77 | |||
66 | struct rio_dbell_ring { | 78 | struct rio_dbell_ring { |
67 | void *virt; | 79 | void *virt; |
68 | dma_addr_t phys; | 80 | dma_addr_t phys; |
@@ -99,6 +111,7 @@ struct rio_priv { | |||
99 | void __iomem *regs_win; | 111 | void __iomem *regs_win; |
100 | struct rio_atmu_regs __iomem *atmu_regs; | 112 | struct rio_atmu_regs __iomem *atmu_regs; |
101 | struct rio_atmu_regs __iomem *maint_atmu_regs; | 113 | struct rio_atmu_regs __iomem *maint_atmu_regs; |
114 | struct rio_inb_atmu_regs __iomem *inb_atmu_regs; | ||
102 | void __iomem *maint_win; | 115 | void __iomem *maint_win; |
103 | void *rmm_handle; /* RapidIO message manager(unit) Handle */ | 116 | void *rmm_handle; /* RapidIO message manager(unit) Handle */ |
104 | }; | 117 | }; |