aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-13 19:11:38 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-13 19:11:38 -0400
commit1263965f298af611d4992165242202eb194db1c1 (patch)
tree625cbd9be60127a70619833e4e5f25a349d228da
parent5006d1aae813727cc77cc56cca9e90ef748650ce (diff)
parentc0da99d5f7b0349cb11f970b3283c0d57beb5ec9 (diff)
Merge commit 'kumar/kumar-next'
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/83xx-512x-pci.txt40
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/dma.txt13
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/ssi.txt20
-rw-r--r--arch/powerpc/boot/dts/gef_sbc610.dts41
-rw-r--r--arch/powerpc/boot/dts/mpc5121ads.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc8315erdb.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts6
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts6
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc836x_rdk.dts15
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc8378_mds.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc8379_mds.dts10
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts3
-rw-r--r--arch/powerpc/boot/dts/mpc8536ds.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts4
-rw-r--r--arch/powerpc/boot/dts/sbc8349.dts3
-rw-r--r--arch/powerpc/configs/83xx/asp8347_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc8313_rdb_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc8315_rdb_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_mds_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_rdb_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itx_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_mds_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc836x_mds_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc836x_rdk_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_mds_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_rdb_defconfig2
-rw-r--r--arch/powerpc/configs/83xx/sbc834x_defconfig2
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc610_defconfig5
-rw-r--r--arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig2
-rw-r--r--arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig2
-rw-r--r--arch/powerpc/configs/86xx/sbc8641d_defconfig2
-rw-r--r--arch/powerpc/configs/ep8248e_defconfig2
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig2
-rw-r--r--arch/powerpc/configs/mpc83xx_defconfig2
-rw-r--r--arch/powerpc/configs/pq2fads_defconfig2
-rw-r--r--arch/powerpc/include/asm/fsl_lbc.h48
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S4
-rw-r--r--arch/powerpc/kernel/pci_32.c5
-rw-r--r--arch/powerpc/platforms/512x/Kconfig2
-rw-r--r--arch/powerpc/platforms/512x/mpc5121_ads.c10
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig5
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_mds.c8
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/86xx/Makefile2
-rw-r--r--arch/powerpc/platforms/86xx/gef_pic.c258
-rw-r--r--arch/powerpc/platforms/86xx/gef_pic.h11
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc610.c65
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c1
-rw-r--r--arch/powerpc/platforms/Kconfig12
-rw-r--r--arch/powerpc/sysdev/fsl_lbc.c53
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c58
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c38
-rw-r--r--arch/powerpc/sysdev/fsl_soc.h8
-rw-r--r--arch/powerpc/sysdev/qe_lib/Kconfig9
-rw-r--r--drivers/i2c/chips/Kconfig11
-rw-r--r--drivers/i2c/chips/Makefile1
-rw-r--r--drivers/i2c/chips/mcu_mpc8349emitx.c209
66 files changed, 900 insertions, 174 deletions
diff --git a/Documentation/powerpc/dts-bindings/fsl/83xx-512x-pci.txt b/Documentation/powerpc/dts-bindings/fsl/83xx-512x-pci.txt
new file mode 100644
index 000000000000..35a465362408
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/fsl/83xx-512x-pci.txt
@@ -0,0 +1,40 @@
1* Freescale 83xx and 512x PCI bridges
2
3Freescale 83xx and 512x SOCs include the same pci bridge core.
4
583xx/512x specific notes:
6- reg: should contain two address length tuples
7 The first is for the internal pci bridge registers
8 The second is for the pci config space access registers
9
10Example (MPC8313ERDB)
11 pci0: pci@e0008500 {
12 cell-index = <1>;
13 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14 interrupt-map = <
15 /* IDSEL 0x0E -mini PCI */
16 0x7000 0x0 0x0 0x1 &ipic 18 0x8
17 0x7000 0x0 0x0 0x2 &ipic 18 0x8
18 0x7000 0x0 0x0 0x3 &ipic 18 0x8
19 0x7000 0x0 0x0 0x4 &ipic 18 0x8
20
21 /* IDSEL 0x0F - PCI slot */
22 0x7800 0x0 0x0 0x1 &ipic 17 0x8
23 0x7800 0x0 0x0 0x2 &ipic 18 0x8
24 0x7800 0x0 0x0 0x3 &ipic 17 0x8
25 0x7800 0x0 0x0 0x4 &ipic 18 0x8>;
26 interrupt-parent = <&ipic>;
27 interrupts = <66 0x8>;
28 bus-range = <0x0 0x0>;
29 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
30 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
31 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
32 clock-frequency = <66666666>;
33 #interrupt-cells = <1>;
34 #size-cells = <2>;
35 #address-cells = <3>;
36 reg = <0xe0008500 0x100 /* internal registers */
37 0xe0008300 0x8>; /* config space access registers */
38 compatible = "fsl,mpc8349-pci";
39 device_type = "pci";
40 };
diff --git a/Documentation/powerpc/dts-bindings/fsl/dma.txt b/Documentation/powerpc/dts-bindings/fsl/dma.txt
index 86826df00e64..cc453110fc46 100644
--- a/Documentation/powerpc/dts-bindings/fsl/dma.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/dma.txt
@@ -20,7 +20,7 @@ Required properties:
20 - compatible : compatible list, contains 2 entries, first is 20 - compatible : compatible list, contains 2 entries, first is
21 "fsl,CHIP-dma-channel", where CHIP is the processor 21 "fsl,CHIP-dma-channel", where CHIP is the processor
22 (mpc8349, mpc8350, etc.) and the second is 22 (mpc8349, mpc8350, etc.) and the second is
23 "fsl,elo-dma-channel" 23 "fsl,elo-dma-channel". However, see note below.
24 - reg : <registers mapping for channel> 24 - reg : <registers mapping for channel>
25 - cell-index : dma channel index starts at 0. 25 - cell-index : dma channel index starts at 0.
26 26
@@ -82,7 +82,7 @@ Required properties:
82 - compatible : compatible list, contains 2 entries, first is 82 - compatible : compatible list, contains 2 entries, first is
83 "fsl,CHIP-dma-channel", where CHIP is the processor 83 "fsl,CHIP-dma-channel", where CHIP is the processor
84 (mpc8540, mpc8560, etc.) and the second is 84 (mpc8540, mpc8560, etc.) and the second is
85 "fsl,eloplus-dma-channel" 85 "fsl,eloplus-dma-channel". However, see note below.
86 - cell-index : dma channel index starts at 0. 86 - cell-index : dma channel index starts at 0.
87 - reg : <registers mapping for channel> 87 - reg : <registers mapping for channel>
88 - interrupts : <interrupt mapping for DMA channel IRQ> 88 - interrupts : <interrupt mapping for DMA channel IRQ>
@@ -125,3 +125,12 @@ Example:
125 interrupts = <17 2>; 125 interrupts = <17 2>;
126 }; 126 };
127 }; 127 };
128
129Note on DMA channel compatible properties: The compatible property must say
130"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel" to be used by the Elo DMA
131driver (fsldma). Any DMA channel used by fsldma cannot be used by another
132DMA driver, such as the SSI sound drivers for the MPC8610. Therefore, any DMA
133channel that should be used for another driver should not use
134"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel". For the SSI drivers, for
135example, the compatible property should be "fsl,ssi-dma-channel". See ssi.txt
136for more information.
diff --git a/Documentation/powerpc/dts-bindings/fsl/ssi.txt b/Documentation/powerpc/dts-bindings/fsl/ssi.txt
index 5d9841303cae..a2d963998a65 100644
--- a/Documentation/powerpc/dts-bindings/fsl/ssi.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/ssi.txt
@@ -24,12 +24,12 @@ Required properties:
24 "rj-master" - r.j., SSI is clock master 24 "rj-master" - r.j., SSI is clock master
25 "ac97-slave" - AC97 mode, SSI is clock slave 25 "ac97-slave" - AC97 mode, SSI is clock slave
26 "ac97-master" - AC97 mode, SSI is clock master 26 "ac97-master" - AC97 mode, SSI is clock master
27- fsl,playback-dma: phandle to a DMA node for the DMA channel to use for 27- fsl,playback-dma: phandle to a node for the DMA channel to use for
28 playback of audio. This is typically dictated by SOC 28 playback of audio. This is typically dictated by SOC
29 design. See the notes below. 29 design. See the notes below.
30- fsl,capture-dma: phandle to a DMA node for the DMA channel to use for 30- fsl,capture-dma: phandle to a node for the DMA channel to use for
31 capture (recording) of audio. This is typically dictated 31 capture (recording) of audio. This is typically dictated
32 by SOC design. See the notes below. 32 by SOC design. See the notes below.
33 33
34Optional properties: 34Optional properties:
35- codec-handle : phandle to a 'codec' node that defines an audio 35- codec-handle : phandle to a 'codec' node that defines an audio
@@ -51,3 +51,11 @@ playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for
51playback and DMA channel 3 for capture. The developer can choose which 51playback and DMA channel 3 for capture. The developer can choose which
52DMA controller to use, but the channels themselves are hard-wired. The 52DMA controller to use, but the channels themselves are hard-wired. The
53purpose of these two properties is to represent this hardware design. 53purpose of these two properties is to represent this hardware design.
54
55The device tree nodes for the DMA channels that are referenced by
56"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
57"fsl,ssi-dma-channel". The SOC-specific compatible string (e.g.
58"fsl,mpc8610-dma-channel") can remain. If these nodes are left as
59"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
60drivers (fsldma) will attempt to use them, and it will conflict with the
61sound drivers.
diff --git a/arch/powerpc/boot/dts/gef_sbc610.dts b/arch/powerpc/boot/dts/gef_sbc610.dts
index 80b79e4adc78..6ed608322ddc 100644
--- a/arch/powerpc/boot/dts/gef_sbc610.dts
+++ b/arch/powerpc/boot/dts/gef_sbc610.dts
@@ -67,6 +67,39 @@
67 reg = <0x0 0x40000000>; // set by uboot 67 reg = <0x0 0x40000000>; // set by uboot
68 }; 68 };
69 69
70 localbus@fef05000 {
71 #address-cells = <2>;
72 #size-cells = <1>;
73 compatible = "fsl,mpc8641-localbus", "simple-bus";
74 reg = <0xf8005000 0x1000>;
75 interrupts = <19 2>;
76 interrupt-parent = <&mpic>;
77
78 ranges = <0 0 0xff000000 0x01000000 // 16MB Boot flash
79 1 0 0xe8000000 0x08000000 // Paged Flash 0
80 2 0 0xe0000000 0x08000000 // Paged Flash 1
81 3 0 0xfc100000 0x00020000 // NVRAM
82 4 0 0xfc000000 0x00008000 // FPGA
83 5 0 0xfc008000 0x00008000 // AFIX FPGA
84 6 0 0xfd000000 0x00800000 // IO FPGA (8-bit)
85 7 0 0xfd800000 0x00800000>; // IO FPGA (32-bit)
86
87 fpga@4,0 {
88 compatible = "gef,fpga-regs";
89 reg = <0x4 0x0 0x40>;
90 };
91 gef_pic: pic@4,4000 {
92 #interrupt-cells = <1>;
93 interrupt-controller;
94 compatible = "gef,fpga-pic";
95 reg = <0x4 0x4000 0x20>;
96 interrupts = <0x8
97 0x9>;
98 interrupt-parent = <&mpic>;
99
100 };
101 };
102
70 soc@fef00000 { 103 soc@fef00000 {
71 #address-cells = <1>; 104 #address-cells = <1>;
72 #size-cells = <1>; 105 #size-cells = <1>;
@@ -150,13 +183,13 @@
150 reg = <0x24520 0x20>; 183 reg = <0x24520 0x20>;
151 184
152 phy0: ethernet-phy@0 { 185 phy0: ethernet-phy@0 {
153 interrupt-parent = <&mpic>; 186 interrupt-parent = <&gef_pic>;
154 interrupts = <0x0 0x1>; 187 interrupts = <0x9 0x4>;
155 reg = <1>; 188 reg = <1>;
156 }; 189 };
157 phy2: ethernet-phy@2 { 190 phy2: ethernet-phy@2 {
158 interrupt-parent = <&mpic>; 191 interrupt-parent = <&gef_pic>;
159 interrupts = <0x0 0x1>; 192 interrupts = <0x8 0x4>;
160 reg = <3>; 193 reg = <3>;
161 }; 194 };
162 }; 195 };
diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts b/arch/powerpc/boot/dts/mpc5121ads.dts
index 1f9036c317b4..c2b8dbfab79e 100644
--- a/arch/powerpc/boot/dts/mpc5121ads.dts
+++ b/arch/powerpc/boot/dts/mpc5121ads.dts
@@ -403,7 +403,8 @@
403 #interrupt-cells = <1>; 403 #interrupt-cells = <1>;
404 #size-cells = <2>; 404 #size-cells = <2>;
405 #address-cells = <3>; 405 #address-cells = <3>;
406 reg = <0x80008500 0x100>; 406 reg = <0x80008500 0x100 /* internal registers */
407 0x80008300 0x8>; /* config space access registers */
407 compatible = "fsl,mpc5121-pci"; 408 compatible = "fsl,mpc5121-pci";
408 device_type = "pci"; 409 device_type = "pci";
409 }; 410 };
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 539085591e04..747f27676332 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -363,7 +363,8 @@
363 #interrupt-cells = <1>; 363 #interrupt-cells = <1>;
364 #size-cells = <2>; 364 #size-cells = <2>;
365 #address-cells = <3>; 365 #address-cells = <3>;
366 reg = <0xe0008500 0x100>; 366 reg = <0xe0008500 0x100 /* internal registers */
367 0xe0008300 0x8>; /* config space access registers */
367 compatible = "fsl,mpc8349-pci"; 368 compatible = "fsl,mpc8349-pci";
368 device_type = "pci"; 369 device_type = "pci";
369 }; 370 };
diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
index 94c9b4107a1d..7449e54c1a90 100644
--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -318,7 +318,8 @@
318 #interrupt-cells = <1>; 318 #interrupt-cells = <1>;
319 #size-cells = <2>; 319 #size-cells = <2>;
320 #address-cells = <3>; 320 #address-cells = <3>;
321 reg = <0xe0008500 0x100>; 321 reg = <0xe0008500 0x100 /* internal registers */
322 0xe0008300 0x8>; /* config space access registers */
322 compatible = "fsl,mpc8349-pci"; 323 compatible = "fsl,mpc8349-pci";
323 device_type = "pci"; 324 device_type = "pci";
324 }; 325 };
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 015808ae1026..e4cc1768f241 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -423,7 +423,8 @@
423 #interrupt-cells = <1>; 423 #interrupt-cells = <1>;
424 #size-cells = <2>; 424 #size-cells = <2>;
425 #address-cells = <3>; 425 #address-cells = <3>;
426 reg = <0xe0008500 0x100>; 426 reg = <0xe0008500 0x100 /* internal registers */
427 0xe0008300 0x8>; /* config space access registers */
427 compatible = "fsl,mpc8349-pci"; 428 compatible = "fsl,mpc8349-pci";
428 device_type = "pci"; 429 device_type = "pci";
429 }; 430 };
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index b5b0ec2eb88f..226ff066652b 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -331,7 +331,8 @@
331 #interrupt-cells = <1>; 331 #interrupt-cells = <1>;
332 #size-cells = <2>; 332 #size-cells = <2>;
333 #address-cells = <3>; 333 #address-cells = <3>;
334 reg = <0xe0008500 0x100>; 334 reg = <0xe0008500 0x100 /* internal registers */
335 0xe0008300 0x8>; /* config space access registers */
335 compatible = "fsl,mpc8349-pci"; 336 compatible = "fsl,mpc8349-pci";
336 device_type = "pci"; 337 device_type = "pci";
337 }; 338 };
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 1327a61d0538..5cedf373a1d8 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -254,7 +254,8 @@
254 #interrupt-cells = <1>; 254 #interrupt-cells = <1>;
255 #size-cells = <2>; 255 #size-cells = <2>;
256 #address-cells = <3>; 256 #address-cells = <3>;
257 reg = <0xe0008500 0x100>; 257 reg = <0xe0008500 0x100 /* internal registers */
258 0xe0008300 0x8>; /* config space access registers */
258 compatible = "fsl,mpc8349-pci"; 259 compatible = "fsl,mpc8349-pci";
259 device_type = "pci"; 260 device_type = "pci";
260 }; 261 };
@@ -280,7 +281,8 @@
280 #interrupt-cells = <1>; 281 #interrupt-cells = <1>;
281 #size-cells = <2>; 282 #size-cells = <2>;
282 #address-cells = <3>; 283 #address-cells = <3>;
283 reg = <0xe0008600 0x100>; 284 reg = <0xe0008600 0x100 /* internal registers */
285 0xe0008380 0x8>; /* config space access registers */
284 compatible = "fsl,mpc8349-pci"; 286 compatible = "fsl,mpc8349-pci";
285 device_type = "pci"; 287 device_type = "pci";
286 }; 288 };
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index f70d3a0a6eb9..81ae1d3e9440 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -228,7 +228,8 @@
228 #interrupt-cells = <1>; 228 #interrupt-cells = <1>;
229 #size-cells = <2>; 229 #size-cells = <2>;
230 #address-cells = <3>; 230 #address-cells = <3>;
231 reg = <0xe0008600 0x100>; 231 reg = <0xe0008600 0x100 /* internal registers */
232 0xe0008380 0x8>; /* config space access registers */
232 compatible = "fsl,mpc8349-pci"; 233 compatible = "fsl,mpc8349-pci";
233 device_type = "pci"; 234 device_type = "pci";
234 }; 235 };
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index e29739eee35e..04bfde3ea605 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -315,7 +315,8 @@
315 #interrupt-cells = <1>; 315 #interrupt-cells = <1>;
316 #size-cells = <2>; 316 #size-cells = <2>;
317 #address-cells = <3>; 317 #address-cells = <3>;
318 reg = <0xe0008500 0x100>; 318 reg = <0xe0008500 0x100 /* internal registers */
319 0xe0008300 0x8>; /* config space access registers */
319 compatible = "fsl,mpc8349-pci"; 320 compatible = "fsl,mpc8349-pci";
320 device_type = "pci"; 321 device_type = "pci";
321 }; 322 };
@@ -376,7 +377,8 @@
376 #interrupt-cells = <1>; 377 #interrupt-cells = <1>;
377 #size-cells = <2>; 378 #size-cells = <2>;
378 #address-cells = <3>; 379 #address-cells = <3>;
379 reg = <0xe0008600 0x100>; 380 reg = <0xe0008600 0x100 /* internal registers */
381 0xe0008380 0x8>; /* config space access registers */
380 compatible = "fsl,mpc8349-pci"; 382 compatible = "fsl,mpc8349-pci";
381 device_type = "pci"; 383 device_type = "pci";
382 }; 384 };
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 49aec71916e5..66a12d2631fb 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -426,7 +426,8 @@
426 #interrupt-cells = <1>; 426 #interrupt-cells = <1>;
427 #size-cells = <2>; 427 #size-cells = <2>;
428 #address-cells = <3>; 428 #address-cells = <3>;
429 reg = <0xe0008500 0x100>; 429 reg = <0xe0008500 0x100 /* internal registers */
430 0xe0008300 0x8>; /* config space access registers */
430 compatible = "fsl,mpc8349-pci"; 431 compatible = "fsl,mpc8349-pci";
431 device_type = "pci"; 432 device_type = "pci";
432 }; 433 };
diff --git a/arch/powerpc/boot/dts/mpc836x_rdk.dts b/arch/powerpc/boot/dts/mpc836x_rdk.dts
index 69c9bd2acd82..decadf3d9e98 100644
--- a/arch/powerpc/boot/dts/mpc836x_rdk.dts
+++ b/arch/powerpc/boot/dts/mpc836x_rdk.dts
@@ -387,6 +387,18 @@
387 device-width = <1>; 387 device-width = <1>;
388 }; 388 };
389 389
390 upm@1,0 {
391 compatible = "fsl,upm-nand";
392 reg = <1 0 1>;
393 fsl,upm-addr-offset = <16>;
394 fsl,upm-cmd-offset = <8>;
395 gpios = <&qe_pio_e 18 0>;
396
397 flash {
398 compatible = "stm,nand512-a";
399 };
400 };
401
390 display@2,0 { 402 display@2,0 {
391 device_type = "display"; 403 device_type = "display";
392 compatible = "fujitsu,MB86277", "fujitsu,mint"; 404 compatible = "fujitsu,MB86277", "fujitsu,mint";
@@ -409,7 +421,8 @@
409 #interrupt-cells = <1>; 421 #interrupt-cells = <1>;
410 device_type = "pci"; 422 device_type = "pci";
411 compatible = "fsl,mpc8360-pci", "fsl,mpc8349-pci"; 423 compatible = "fsl,mpc8360-pci", "fsl,mpc8349-pci";
412 reg = <0xe0008500 0x100>; 424 reg = <0xe0008500 0x100 /* internal registers */
425 0xe0008300 0x8>; /* config space access registers */
413 ranges = <0x02000000 0 0x90000000 0x90000000 0 0x10000000 426 ranges = <0x02000000 0 0x90000000 0x90000000 0 0x10000000
414 0x42000000 0 0x80000000 0x80000000 0 0x10000000 427 0x42000000 0 0x80000000 0x80000000 0 0x10000000
415 0x01000000 0 0xe0300000 0xe0300000 0 0x00100000>; 428 0x01000000 0 0xe0300000 0xe0300000 0 0x00100000>;
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index 78f0f1124ffb..0484561bd2c0 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -136,6 +136,13 @@
136 interrupts = <14 0x8>; 136 interrupts = <14 0x8>;
137 interrupt-parent = <&ipic>; 137 interrupt-parent = <&ipic>;
138 dfsrr; 138 dfsrr;
139
140 rtc@68 {
141 compatible = "dallas,ds1374";
142 reg = <0x68>;
143 interrupts = <19 0x8>;
144 interrupt-parent = <&ipic>;
145 };
139 }; 146 };
140 147
141 i2c@3100 { 148 i2c@3100 {
@@ -378,7 +385,8 @@
378 #interrupt-cells = <1>; 385 #interrupt-cells = <1>;
379 #size-cells = <2>; 386 #size-cells = <2>;
380 #address-cells = <3>; 387 #address-cells = <3>;
381 reg = <0xe0008500 0x100>; 388 reg = <0xe0008500 0x100 /* internal registers */
389 0xe0008300 0x8>; /* config space access registers */
382 compatible = "fsl,mpc8349-pci"; 390 compatible = "fsl,mpc8349-pci";
383 device_type = "pci"; 391 device_type = "pci";
384 }; 392 };
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index d46327e8cb67..53191ba67aaa 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -319,7 +319,8 @@
319 #interrupt-cells = <1>; 319 #interrupt-cells = <1>;
320 #size-cells = <2>; 320 #size-cells = <2>;
321 #address-cells = <3>; 321 #address-cells = <3>;
322 reg = <0xe0008500 0x100>; 322 reg = <0xe0008500 0x100 /* internal registers */
323 0xe0008300 0x8>; /* config space access registers */
323 compatible = "fsl,mpc8349-pci"; 324 compatible = "fsl,mpc8349-pci";
324 device_type = "pci"; 325 device_type = "pci";
325 }; 326 };
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
index c44f30f2f086..67a08d2e2ff2 100644
--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -136,6 +136,13 @@
136 interrupts = <14 0x8>; 136 interrupts = <14 0x8>;
137 interrupt-parent = <&ipic>; 137 interrupt-parent = <&ipic>;
138 dfsrr; 138 dfsrr;
139
140 rtc@68 {
141 compatible = "dallas,ds1374";
142 reg = <0x68>;
143 interrupts = <19 0x8>;
144 interrupt-parent = <&ipic>;
145 };
139 }; 146 };
140 147
141 i2c@3100 { 148 i2c@3100 {
@@ -364,7 +371,8 @@
364 #interrupt-cells = <1>; 371 #interrupt-cells = <1>;
365 #size-cells = <2>; 372 #size-cells = <2>;
366 #address-cells = <3>; 373 #address-cells = <3>;
367 reg = <0xe0008500 0x100>; 374 reg = <0xe0008500 0x100 /* internal registers */
375 0xe0008300 0x8>; /* config space access registers */
368 compatible = "fsl,mpc8349-pci"; 376 compatible = "fsl,mpc8349-pci";
369 device_type = "pci"; 377 device_type = "pci";
370 }; 378 };
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index b3e3bd7d550d..4a09153d160c 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -305,7 +305,8 @@
305 #interrupt-cells = <1>; 305 #interrupt-cells = <1>;
306 #size-cells = <2>; 306 #size-cells = <2>;
307 #address-cells = <3>; 307 #address-cells = <3>;
308 reg = <0xe0008500 0x100>; 308 reg = <0xe0008500 0x100 /* internal registers */
309 0xe0008300 0x8>; /* config space access registers */
309 compatible = "fsl,mpc8349-pci"; 310 compatible = "fsl,mpc8349-pci";
310 device_type = "pci"; 311 device_type = "pci";
311 }; 312 };
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
index 653ed47c9a37..323370a2b5ff 100644
--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -136,6 +136,13 @@
136 interrupts = <14 0x8>; 136 interrupts = <14 0x8>;
137 interrupt-parent = <&ipic>; 137 interrupt-parent = <&ipic>;
138 dfsrr; 138 dfsrr;
139
140 rtc@68 {
141 compatible = "dallas,ds1374";
142 reg = <0x68>;
143 interrupts = <19 0x8>;
144 interrupt-parent = <&ipic>;
145 };
139 }; 146 };
140 147
141 i2c@3100 { 148 i2c@3100 {
@@ -392,7 +399,8 @@
392 #interrupt-cells = <1>; 399 #interrupt-cells = <1>;
393 #size-cells = <2>; 400 #size-cells = <2>;
394 #address-cells = <3>; 401 #address-cells = <3>;
395 reg = <0xe0008500 0x100>; 402 reg = <0xe0008500 0x100 /* internal registers */
403 0xe0008300 0x8>; /* config space access registers */
396 compatible = "fsl,mpc8349-pci"; 404 compatible = "fsl,mpc8349-pci";
397 device_type = "pci"; 405 device_type = "pci";
398 }; 406 };
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index 123c8df6f4f0..bbd884ac9dc0 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -333,7 +333,8 @@
333 #interrupt-cells = <1>; 333 #interrupt-cells = <1>;
334 #size-cells = <2>; 334 #size-cells = <2>;
335 #address-cells = <3>; 335 #address-cells = <3>;
336 reg = <0xe0008500 0x100>; 336 reg = <0xe0008500 0x100 /* internal registers */
337 0xe0008300 0x8>; /* config space access registers */
337 compatible = "fsl,mpc8349-pci"; 338 compatible = "fsl,mpc8349-pci";
338 device_type = "pci"; 339 device_type = "pci";
339 }; 340 };
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/mpc8536ds.dts
index 1505d6855eff..93fdd99901b6 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dts
+++ b/arch/powerpc/boot/dts/mpc8536ds.dts
@@ -91,6 +91,8 @@
91 rtc@68 { 91 rtc@68 {
92 compatible = "dallas,ds3232"; 92 compatible = "dallas,ds3232";
93 reg = <0x68>; 93 reg = <0x68>;
94 interrupts = <0 0x1>;
95 interrupt-parent = <&mpic>;
94 }; 96 };
95 }; 97 };
96 98
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 0f3a36e0ea6d..3f4c6102e4e1 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -237,7 +237,7 @@
237 237
238 dma00: dma-channel@0 { 238 dma00: dma-channel@0 {
239 compatible = "fsl,mpc8610-dma-channel", 239 compatible = "fsl,mpc8610-dma-channel",
240 "fsl,eloplus-dma-channel"; 240 "fsl,ssi-dma-channel";
241 cell-index = <0>; 241 cell-index = <0>;
242 reg = <0x0 0x80>; 242 reg = <0x0 0x80>;
243 interrupt-parent = <&mpic>; 243 interrupt-parent = <&mpic>;
@@ -245,7 +245,7 @@
245 }; 245 };
246 dma01: dma-channel@1 { 246 dma01: dma-channel@1 {
247 compatible = "fsl,mpc8610-dma-channel", 247 compatible = "fsl,mpc8610-dma-channel",
248 "fsl,eloplus-dma-channel"; 248 "fsl,ssi-dma-channel";
249 cell-index = <1>; 249 cell-index = <1>;
250 reg = <0x80 0x80>; 250 reg = <0x80 0x80>;
251 interrupt-parent = <&mpic>; 251 interrupt-parent = <&mpic>;
diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts
index c7f411f7a9a2..0f941f310e44 100644
--- a/arch/powerpc/boot/dts/sbc8349.dts
+++ b/arch/powerpc/boot/dts/sbc8349.dts
@@ -272,7 +272,8 @@
272 #interrupt-cells = <1>; 272 #interrupt-cells = <1>;
273 #size-cells = <2>; 273 #size-cells = <2>;
274 #address-cells = <3>; 274 #address-cells = <3>;
275 reg = <0xe0008500 0x100>; 275 reg = <0xe0008500 0x100 /* internal registers */
276 0xe0008300 0x8>; /* config space access registers */
276 compatible = "fsl,mpc8349-pci"; 277 compatible = "fsl,mpc8349-pci";
277 device_type = "pci"; 278 device_type = "pci";
278 }; 279 };
diff --git a/arch/powerpc/configs/83xx/asp8347_defconfig b/arch/powerpc/configs/83xx/asp8347_defconfig
index 6638f5a03a77..0b1fa20f745c 100644
--- a/arch/powerpc/configs/83xx/asp8347_defconfig
+++ b/arch/powerpc/configs/83xx/asp8347_defconfig
@@ -164,6 +164,8 @@ CONFIG_CLASSIC_RCU=y
164# 164#
165CONFIG_PPC_MULTIPLATFORM=y 165CONFIG_PPC_MULTIPLATFORM=y
166CONFIG_CLASSIC32=y 166CONFIG_CLASSIC32=y
167# CONFIG_PPC_CHRP is not set
168# CONFIG_PPC_PMAC is not set
167# CONFIG_MPC5121_ADS is not set 169# CONFIG_MPC5121_ADS is not set
168# CONFIG_MPC5121_GENERIC is not set 170# CONFIG_MPC5121_GENERIC is not set
169# CONFIG_PPC_MPC52xx is not set 171# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
index df125f30fae8..b7eae2bdf19c 100644
--- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
index 6e0e08cf0b0d..b0a27a67d8c7 100644
--- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
index d6e204a7b26b..ad825bcddd1f 100644
--- a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
index 1f3d3434b29f..38267501f44d 100644
--- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index 4686c2151d05..90aab340e7ff 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
index f11c25ecef76..7458a242d251 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
index ffe4b2ef9691..1a92798938cf 100644
--- a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
index 71445e31a304..03d8cede0272 100644
--- a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
@@ -163,6 +163,8 @@ CONFIG_CLASSIC_RCU=y
163# 163#
164CONFIG_PPC_MULTIPLATFORM=y 164CONFIG_PPC_MULTIPLATFORM=y
165CONFIG_CLASSIC32=y 165CONFIG_CLASSIC32=y
166# CONFIG_PPC_CHRP is not set
167# CONFIG_PPC_PMAC is not set
166# CONFIG_MPC5121_ADS is not set 168# CONFIG_MPC5121_ADS is not set
167# CONFIG_MPC5121_GENERIC is not set 169# CONFIG_MPC5121_GENERIC is not set
168# CONFIG_PPC_MPC52xx is not set 170# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
index 58486ccae461..cdf84177370a 100644
--- a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
@@ -164,6 +164,8 @@ CONFIG_CLASSIC_RCU=y
164# 164#
165CONFIG_PPC_MULTIPLATFORM=y 165CONFIG_PPC_MULTIPLATFORM=y
166CONFIG_CLASSIC32=y 166CONFIG_CLASSIC32=y
167# CONFIG_PPC_CHRP is not set
168# CONFIG_PPC_PMAC is not set
167# CONFIG_MPC5121_ADS is not set 169# CONFIG_MPC5121_ADS is not set
168# CONFIG_MPC5121_GENERIC is not set 170# CONFIG_MPC5121_GENERIC is not set
169# CONFIG_PPC_MPC52xx is not set 171# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
index 0171e2176454..97e02d7a5b09 100644
--- a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
@@ -164,6 +164,8 @@ CONFIG_CLASSIC_RCU=y
164# 164#
165CONFIG_PPC_MULTIPLATFORM=y 165CONFIG_PPC_MULTIPLATFORM=y
166CONFIG_CLASSIC32=y 166CONFIG_CLASSIC32=y
167# CONFIG_PPC_CHRP is not set
168# CONFIG_PPC_PMAC is not set
167# CONFIG_MPC5121_ADS is not set 169# CONFIG_MPC5121_ADS is not set
168# CONFIG_MPC5121_GENERIC is not set 170# CONFIG_MPC5121_GENERIC is not set
169# CONFIG_PPC_MPC52xx is not set 171# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
index d6b383bb3644..5ac33054ce2c 100644
--- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
@@ -164,6 +164,8 @@ CONFIG_CLASSIC_RCU=y
164# 164#
165CONFIG_PPC_MULTIPLATFORM=y 165CONFIG_PPC_MULTIPLATFORM=y
166CONFIG_CLASSIC32=y 166CONFIG_CLASSIC32=y
167# CONFIG_PPC_CHRP is not set
168# CONFIG_PPC_PMAC is not set
167# CONFIG_MPC5121_ADS is not set 169# CONFIG_MPC5121_ADS is not set
168# CONFIG_MPC5121_GENERIC is not set 170# CONFIG_MPC5121_GENERIC is not set
169# CONFIG_PPC_MPC52xx is not set 171# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/83xx/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig
index b8dd17bf040e..c359cc2a380e 100644
--- a/arch/powerpc/configs/83xx/sbc834x_defconfig
+++ b/arch/powerpc/configs/83xx/sbc834x_defconfig
@@ -162,6 +162,8 @@ CONFIG_CLASSIC_RCU=y
162# 162#
163CONFIG_PPC_MULTIPLATFORM=y 163CONFIG_PPC_MULTIPLATFORM=y
164CONFIG_CLASSIC32=y 164CONFIG_CLASSIC32=y
165# CONFIG_PPC_CHRP is not set
166# CONFIG_PPC_PMAC is not set
165# CONFIG_MPC5121_ADS is not set 167# CONFIG_MPC5121_ADS is not set
166# CONFIG_MPC5121_GENERIC is not set 168# CONFIG_MPC5121_GENERIC is not set
167# CONFIG_PPC_MPC52xx is not set 169# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
index f589489449da..312d7afbbe44 100644
--- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
@@ -156,7 +156,10 @@ CONFIG_CLASSIC_RCU=y
156# 156#
157# Platform support 157# Platform support
158# 158#
159# CONFIG_PPC_MULTIPLATFORM is not set 159CONFIG_PPC_MULTIPLATFORM=y
160CONFIG_CLASSIC32=y
161# CONFIG_PPC_CHRP is not set
162# CONFIG_PPC_PMAC is not set
160# CONFIG_PPC_82xx is not set 163# CONFIG_PPC_82xx is not set
161# CONFIG_PPC_83xx is not set 164# CONFIG_PPC_83xx is not set
162CONFIG_PPC_86xx=y 165CONFIG_PPC_86xx=y
diff --git a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
index 14116a80c7cd..c98c6ee44492 100644
--- a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
@@ -165,6 +165,8 @@ CONFIG_CLASSIC_RCU=y
165# 165#
166CONFIG_PPC_MULTIPLATFORM=y 166CONFIG_PPC_MULTIPLATFORM=y
167CONFIG_CLASSIC32=y 167CONFIG_CLASSIC32=y
168# CONFIG_PPC_CHRP is not set
169# CONFIG_PPC_PMAC is not set
168# CONFIG_MPC5121_ADS is not set 170# CONFIG_MPC5121_ADS is not set
169# CONFIG_MPC5121_GENERIC is not set 171# CONFIG_MPC5121_GENERIC is not set
170# CONFIG_PPC_MPC52xx is not set 172# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
index 07e369d9e485..444ddf98436d 100644
--- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
@@ -167,6 +167,8 @@ CONFIG_CLASSIC_RCU=y
167# 167#
168CONFIG_PPC_MULTIPLATFORM=y 168CONFIG_PPC_MULTIPLATFORM=y
169CONFIG_CLASSIC32=y 169CONFIG_CLASSIC32=y
170# CONFIG_PPC_CHRP is not set
171# CONFIG_PPC_PMAC is not set
170# CONFIG_MPC5121_ADS is not set 172# CONFIG_MPC5121_ADS is not set
171# CONFIG_MPC5121_GENERIC is not set 173# CONFIG_MPC5121_GENERIC is not set
172# CONFIG_PPC_MPC52xx is not set 174# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/86xx/sbc8641d_defconfig b/arch/powerpc/configs/86xx/sbc8641d_defconfig
index 3326303d3765..d900f8f376cf 100644
--- a/arch/powerpc/configs/86xx/sbc8641d_defconfig
+++ b/arch/powerpc/configs/86xx/sbc8641d_defconfig
@@ -166,6 +166,8 @@ CONFIG_CLASSIC_RCU=y
166# 166#
167CONFIG_PPC_MULTIPLATFORM=y 167CONFIG_PPC_MULTIPLATFORM=y
168CONFIG_CLASSIC32=y 168CONFIG_CLASSIC32=y
169# CONFIG_PPC_CHRP is not set
170# CONFIG_PPC_PMAC is not set
169# CONFIG_MPC5121_ADS is not set 171# CONFIG_MPC5121_ADS is not set
170# CONFIG_MPC5121_GENERIC is not set 172# CONFIG_MPC5121_GENERIC is not set
171# CONFIG_PPC_MPC52xx is not set 173# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig
index a63cd05ef200..cd691f770810 100644
--- a/arch/powerpc/configs/ep8248e_defconfig
+++ b/arch/powerpc/configs/ep8248e_defconfig
@@ -150,6 +150,8 @@ CONFIG_CLASSIC_RCU=y
150# 150#
151CONFIG_PPC_MULTIPLATFORM=y 151CONFIG_PPC_MULTIPLATFORM=y
152CONFIG_CLASSIC32=y 152CONFIG_CLASSIC32=y
153# CONFIG_PPC_CHRP is not set
154# CONFIG_PPC_PMAC is not set
153# CONFIG_MPC5121_ADS is not set 155# CONFIG_MPC5121_ADS is not set
154# CONFIG_MPC5121_GENERIC is not set 156# CONFIG_MPC5121_GENERIC is not set
155# CONFIG_PPC_MPC52xx is not set 157# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
index ddbca3e39ba4..ff6f7c475f47 100644
--- a/arch/powerpc/configs/mpc8272_ads_defconfig
+++ b/arch/powerpc/configs/mpc8272_ads_defconfig
@@ -151,6 +151,8 @@ CONFIG_CLASSIC_RCU=y
151# 151#
152CONFIG_PPC_MULTIPLATFORM=y 152CONFIG_PPC_MULTIPLATFORM=y
153CONFIG_CLASSIC32=y 153CONFIG_CLASSIC32=y
154# CONFIG_PPC_CHRP is not set
155# CONFIG_PPC_PMAC is not set
154# CONFIG_MPC5121_ADS is not set 156# CONFIG_MPC5121_ADS is not set
155# CONFIG_MPC5121_GENERIC is not set 157# CONFIG_MPC5121_GENERIC is not set
156# CONFIG_PPC_MPC52xx is not set 158# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 994a4e7257f1..991c9bda12a9 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -166,6 +166,8 @@ CONFIG_CLASSIC_RCU=y
166# 166#
167CONFIG_PPC_MULTIPLATFORM=y 167CONFIG_PPC_MULTIPLATFORM=y
168CONFIG_CLASSIC32=y 168CONFIG_CLASSIC32=y
169# CONFIG_PPC_CHRP is not set
170# CONFIG_PPC_PMAC is not set
169# CONFIG_MPC5121_ADS is not set 171# CONFIG_MPC5121_ADS is not set
170# CONFIG_MPC5121_GENERIC is not set 172# CONFIG_MPC5121_GENERIC is not set
171# CONFIG_PPC_MPC52xx is not set 173# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig
index e687cc0f2a95..7e17862c38b8 100644
--- a/arch/powerpc/configs/pq2fads_defconfig
+++ b/arch/powerpc/configs/pq2fads_defconfig
@@ -152,6 +152,8 @@ CONFIG_CLASSIC_RCU=y
152# 152#
153CONFIG_PPC_MULTIPLATFORM=y 153CONFIG_PPC_MULTIPLATFORM=y
154CONFIG_CLASSIC32=y 154CONFIG_CLASSIC32=y
155# CONFIG_PPC_CHRP is not set
156# CONFIG_PPC_PMAC is not set
155# CONFIG_MPC5121_ADS is not set 157# CONFIG_MPC5121_ADS is not set
156# CONFIG_MPC5121_GENERIC is not set 158# CONFIG_MPC5121_GENERIC is not set
157# CONFIG_PPC_MPC52xx is not set 159# CONFIG_PPC_MPC52xx is not set
diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h
index 303f5484c050..63a4f779f531 100644
--- a/arch/powerpc/include/asm/fsl_lbc.h
+++ b/arch/powerpc/include/asm/fsl_lbc.h
@@ -23,9 +23,9 @@
23#ifndef __ASM_FSL_LBC_H 23#ifndef __ASM_FSL_LBC_H
24#define __ASM_FSL_LBC_H 24#define __ASM_FSL_LBC_H
25 25
26#include <linux/compiler.h>
26#include <linux/types.h> 27#include <linux/types.h>
27#include <linux/spinlock.h> 28#include <linux/io.h>
28#include <asm/io.h>
29 29
30struct fsl_lbc_bank { 30struct fsl_lbc_bank {
31 __be32 br; /**< Base Register */ 31 __be32 br; /**< Base Register */
@@ -227,9 +227,6 @@ struct fsl_lbc_regs {
227 u8 res8[0xF00]; 227 u8 res8[0xF00];
228}; 228};
229 229
230extern struct fsl_lbc_regs __iomem *fsl_lbc_regs;
231extern spinlock_t fsl_lbc_lock;
232
233/* 230/*
234 * FSL UPM routines 231 * FSL UPM routines
235 */ 232 */
@@ -268,44 +265,7 @@ static inline void fsl_upm_end_pattern(struct fsl_upm *upm)
268 cpu_relax(); 265 cpu_relax();
269} 266}
270 267
271/** 268extern int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base,
272 * fsl_upm_run_pattern - actually run an UPM pattern 269 u32 mar);
273 * @upm: pointer to the fsl_upm structure obtained via fsl_upm_find
274 * @io_base: remapped pointer to where memory access should happen
275 * @mar: MAR register content during pattern execution
276 *
277 * This function triggers dummy write to the memory specified by the io_base,
278 * thus UPM pattern actually executed. Note that mar usage depends on the
279 * pre-programmed AMX bits in the UPM RAM.
280 */
281static inline int fsl_upm_run_pattern(struct fsl_upm *upm,
282 void __iomem *io_base, u32 mar)
283{
284 int ret = 0;
285 unsigned long flags;
286
287 spin_lock_irqsave(&fsl_lbc_lock, flags);
288
289 out_be32(&fsl_lbc_regs->mar, mar << (32 - upm->width));
290
291 switch (upm->width) {
292 case 8:
293 out_8(io_base, 0x0);
294 break;
295 case 16:
296 out_be16(io_base, 0x0);
297 break;
298 case 32:
299 out_be32(io_base, 0x0);
300 break;
301 default:
302 ret = -EINVAL;
303 break;
304 }
305
306 spin_unlock_irqrestore(&fsl_lbc_lock, flags);
307
308 return ret;
309}
310 270
311#endif /* __ASM_FSL_LBC_H */ 271#endif /* __ASM_FSL_LBC_H */
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 18c0093f9323..590304c24dad 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -656,10 +656,6 @@ interrupt_base:
656 656
657 bne 2f /* Bail if permission mismach */ 657 bne 2f /* Bail if permission mismach */
658 658
659#ifdef CONFIG_PTE_64BIT
660 lwz r13,0(r12)
661#endif
662
663 /* Jump to common TLB load point */ 659 /* Jump to common TLB load point */
664 b finish_tlb_load 660 b finish_tlb_load
665 661
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 174b77ee18ff..a848c6360bd1 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -54,11 +54,12 @@ LIST_HEAD(hose_list);
54static int pci_bus_count; 54static int pci_bus_count;
55 55
56static void 56static void
57fixup_hide_host_resource_fsl(struct pci_dev* dev) 57fixup_hide_host_resource_fsl(struct pci_dev *dev)
58{ 58{
59 int i, class = dev->class >> 8; 59 int i, class = dev->class >> 8;
60 60
61 if ((class == PCI_CLASS_PROCESSOR_POWERPC) && 61 if ((class == PCI_CLASS_PROCESSOR_POWERPC ||
62 class == PCI_CLASS_BRIDGE_OTHER) &&
62 (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) && 63 (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
63 (dev->bus->parent == NULL)) { 64 (dev->bus->parent == NULL)) {
64 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { 65 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index c62f893ede19..326852c78b8f 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -3,6 +3,8 @@ config PPC_MPC512x
3 select FSL_SOC 3 select FSL_SOC
4 select IPIC 4 select IPIC
5 select PPC_CLOCK 5 select PPC_CLOCK
6 select PPC_PCI_CHOICE
7 select FSL_PCI if PCI
6 8
7config PPC_MPC5121 9config PPC_MPC5121
8 bool 10 bool
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c
index 5ebf6939a697..441abc488851 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -22,16 +22,26 @@
22#include <asm/prom.h> 22#include <asm/prom.h>
23#include <asm/time.h> 23#include <asm/time.h>
24 24
25#include <sysdev/fsl_pci.h>
26
25#include "mpc512x.h" 27#include "mpc512x.h"
26#include "mpc5121_ads.h" 28#include "mpc5121_ads.h"
27 29
28static void __init mpc5121_ads_setup_arch(void) 30static void __init mpc5121_ads_setup_arch(void)
29{ 31{
32#ifdef CONFIG_PCI
33 struct device_node *np;
34#endif
30 printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n"); 35 printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n");
31 /* 36 /*
32 * cpld regs are needed early 37 * cpld regs are needed early
33 */ 38 */
34 mpc5121_ads_cpld_map(); 39 mpc5121_ads_cpld_map();
40
41#ifdef CONFIG_PCI
42 for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
43 mpc83xx_add_bridge(np);
44#endif
35} 45}
36 46
37static void __init mpc5121_ads_init_IRQ(void) 47static void __init mpc5121_ads_init_IRQ(void)
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 6159c5d4e5f1..83c664afc897 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -19,7 +19,6 @@ config MPC831x_RDB
19config MPC832x_MDS 19config MPC832x_MDS
20 bool "Freescale MPC832x MDS" 20 bool "Freescale MPC832x MDS"
21 select DEFAULT_UIMAGE 21 select DEFAULT_UIMAGE
22 select QUICC_ENGINE
23 select PPC_MPC832x 22 select PPC_MPC832x
24 help 23 help
25 This option enables support for the MPC832x MDS evaluation board. 24 This option enables support for the MPC832x MDS evaluation board.
@@ -27,7 +26,6 @@ config MPC832x_MDS
27config MPC832x_RDB 26config MPC832x_RDB
28 bool "Freescale MPC832x RDB" 27 bool "Freescale MPC832x RDB"
29 select DEFAULT_UIMAGE 28 select DEFAULT_UIMAGE
30 select QUICC_ENGINE
31 select PPC_MPC832x 29 select PPC_MPC832x
32 help 30 help
33 This option enables support for the MPC8323 RDB board. 31 This option enables support for the MPC8323 RDB board.
@@ -57,15 +55,12 @@ config MPC834x_ITX
57config MPC836x_MDS 55config MPC836x_MDS
58 bool "Freescale MPC836x MDS" 56 bool "Freescale MPC836x MDS"
59 select DEFAULT_UIMAGE 57 select DEFAULT_UIMAGE
60 select QUICC_ENGINE
61 help 58 help
62 This option enables support for the MPC836x MDS Processor Board. 59 This option enables support for the MPC836x MDS Processor Board.
63 60
64config MPC836x_RDK 61config MPC836x_RDK
65 bool "Freescale/Logic MPC836x RDK" 62 bool "Freescale/Logic MPC836x RDK"
66 select DEFAULT_UIMAGE 63 select DEFAULT_UIMAGE
67 select QUICC_ENGINE
68 select QE_GPIO
69 select FSL_GTM 64 select FSL_GTM
70 select FSL_LBC 65 select FSL_LBC
71 help 66 help
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index be62de23bead..8bb13c807142 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -85,8 +85,14 @@ static void __init mpc837x_mds_setup_arch(void)
85 ppc_md.progress("mpc837x_mds_setup_arch()", 0); 85 ppc_md.progress("mpc837x_mds_setup_arch()", 0);
86 86
87#ifdef CONFIG_PCI 87#ifdef CONFIG_PCI
88 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") 88 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
89 if (!of_device_is_available(np)) {
90 pr_warning("%s: disabled by the firmware.\n",
91 np->full_name);
92 continue;
93 }
89 mpc83xx_add_bridge(np); 94 mpc83xx_add_bridge(np);
95 }
90#endif 96#endif
91 mpc837xmds_usb_cfg(); 97 mpc837xmds_usb_cfg();
92} 98}
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 291675b0097a..b79dc710ed34 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -33,7 +33,6 @@ config MPC85xx_CDS
33config MPC85xx_MDS 33config MPC85xx_MDS
34 bool "Freescale MPC85xx MDS" 34 bool "Freescale MPC85xx MDS"
35 select DEFAULT_UIMAGE 35 select DEFAULT_UIMAGE
36 select QUICC_ENGINE
37 select PHYLIB 36 select PHYLIB
38 help 37 help
39 This option enables support for the MPC85xx MDS board 38 This option enables support for the MPC85xx MDS board
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
index cb9fc8f4360b..4a56ff619afd 100644
--- a/arch/powerpc/platforms/86xx/Makefile
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -7,4 +7,4 @@ obj-$(CONFIG_SMP) += mpc86xx_smp.o
7obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o 7obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o
8obj-$(CONFIG_SBC8641D) += sbc8641d.o 8obj-$(CONFIG_SBC8641D) += sbc8641d.o
9obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o 9obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o
10obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o 10obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o gef_pic.o
diff --git a/arch/powerpc/platforms/86xx/gef_pic.c b/arch/powerpc/platforms/86xx/gef_pic.c
new file mode 100644
index 000000000000..50d0a2b63809
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/gef_pic.c
@@ -0,0 +1,258 @@
1/*
2 * Interrupt handling for GE Fanuc's FPGA based PIC
3 *
4 * Author: Martyn Welch <martyn.welch@gefanuc.com>
5 *
6 * 2008 (c) GE Fanuc Intelligent Platforms Embedded Systems, Inc.
7 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 */
12
13#include <linux/stddef.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/irq.h>
17#include <linux/interrupt.h>
18#include <linux/spinlock.h>
19
20#include <asm/byteorder.h>
21#include <asm/io.h>
22#include <asm/prom.h>
23#include <asm/irq.h>
24
25#include "gef_pic.h"
26
27#define DEBUG
28#undef DEBUG
29
30#ifdef DEBUG
31#define DBG(fmt...) do { printk(KERN_DEBUG "gef_pic: " fmt); } while (0)
32#else
33#define DBG(fmt...) do { } while (0)
34#endif
35
36#define GEF_PIC_NUM_IRQS 32
37
38/* Interrupt Controller Interface Registers */
39#define GEF_PIC_INTR_STATUS 0x0000
40
41#define GEF_PIC_INTR_MASK(cpu) (0x0010 + (0x4 * cpu))
42#define GEF_PIC_CPU0_INTR_MASK GEF_PIC_INTR_MASK(0)
43#define GEF_PIC_CPU1_INTR_MASK GEF_PIC_INTR_MASK(1)
44
45#define GEF_PIC_MCP_MASK(cpu) (0x0018 + (0x4 * cpu))
46#define GEF_PIC_CPU0_MCP_MASK GEF_PIC_MCP_MASK(0)
47#define GEF_PIC_CPU1_MCP_MASK GEF_PIC_MCP_MASK(1)
48
49#define gef_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
50
51
52static DEFINE_SPINLOCK(gef_pic_lock);
53
54static void __iomem *gef_pic_irq_reg_base;
55static struct irq_host *gef_pic_irq_host;
56static int gef_pic_cascade_irq;
57
58/*
59 * Interrupt Controller Handling
60 *
61 * The interrupt controller handles interrupts for most on board interrupts,
62 * apart from PCI interrupts. For example on SBC610:
63 *
64 * 17:31 RO Reserved
65 * 16 RO PCI Express Doorbell 3 Status
66 * 15 RO PCI Express Doorbell 2 Status
67 * 14 RO PCI Express Doorbell 1 Status
68 * 13 RO PCI Express Doorbell 0 Status
69 * 12 RO Real Time Clock Interrupt Status
70 * 11 RO Temperature Interrupt Status
71 * 10 RO Temperature Critical Interrupt Status
72 * 9 RO Ethernet PHY1 Interrupt Status
73 * 8 RO Ethernet PHY3 Interrupt Status
74 * 7 RO PEX8548 Interrupt Status
75 * 6 RO Reserved
76 * 5 RO Watchdog 0 Interrupt Status
77 * 4 RO Watchdog 1 Interrupt Status
78 * 3 RO AXIS Message FIFO A Interrupt Status
79 * 2 RO AXIS Message FIFO B Interrupt Status
80 * 1 RO AXIS Message FIFO C Interrupt Status
81 * 0 RO AXIS Message FIFO D Interrupt Status
82 *
83 * Interrupts can be forwarded to one of two output lines. Nothing
84 * clever is done, so if the masks are incorrectly set, a single input
85 * interrupt could generate interrupts on both output lines!
86 *
87 * The dual lines are there to allow the chained interrupts to be easily
88 * passed into two different cores. We currently do not use this functionality
89 * in this driver.
90 *
91 * Controller can also be configured to generate Machine checks (MCP), again on
92 * two lines, to be attached to two different cores. It is suggested that these
93 * should be masked out.
94 */
95
96void gef_pic_cascade(unsigned int irq, struct irq_desc *desc)
97{
98 unsigned int cascade_irq;
99
100 /*
101 * See if we actually have an interrupt, call generic handling code if
102 * we do.
103 */
104 cascade_irq = gef_pic_get_irq();
105
106 if (cascade_irq != NO_IRQ)
107 generic_handle_irq(cascade_irq);
108
109 desc->chip->eoi(irq);
110
111}
112
113static void gef_pic_mask(unsigned int virq)
114{
115 unsigned long flags;
116 unsigned int hwirq;
117 u32 mask;
118
119 hwirq = gef_irq_to_hw(virq);
120
121 spin_lock_irqsave(&gef_pic_lock, flags);
122 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
123 mask &= ~(1 << hwirq);
124 out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask);
125 spin_unlock_irqrestore(&gef_pic_lock, flags);
126}
127
128static void gef_pic_mask_ack(unsigned int virq)
129{
130 /* Don't think we actually have to do anything to ack an interrupt,
131 * we just need to clear down the devices interrupt and it will go away
132 */
133 gef_pic_mask(virq);
134}
135
136static void gef_pic_unmask(unsigned int virq)
137{
138 unsigned long flags;
139 unsigned int hwirq;
140 u32 mask;
141
142 hwirq = gef_irq_to_hw(virq);
143
144 spin_lock_irqsave(&gef_pic_lock, flags);
145 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
146 mask |= (1 << hwirq);
147 out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask);
148 spin_unlock_irqrestore(&gef_pic_lock, flags);
149}
150
151static struct irq_chip gef_pic_chip = {
152 .typename = "gefp",
153 .mask = gef_pic_mask,
154 .mask_ack = gef_pic_mask_ack,
155 .unmask = gef_pic_unmask,
156};
157
158
159/* When an interrupt is being configured, this call allows some flexibilty
160 * in deciding which irq_chip structure is used
161 */
162static int gef_pic_host_map(struct irq_host *h, unsigned int virq,
163 irq_hw_number_t hwirq)
164{
165 /* All interrupts are LEVEL sensitive */
166 get_irq_desc(virq)->status |= IRQ_LEVEL;
167 set_irq_chip_and_handler(virq, &gef_pic_chip, handle_level_irq);
168
169 return 0;
170}
171
172static int gef_pic_host_xlate(struct irq_host *h, struct device_node *ct,
173 u32 *intspec, unsigned int intsize,
174 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
175{
176
177 *out_hwirq = intspec[0];
178 if (intsize > 1)
179 *out_flags = intspec[1];
180 else
181 *out_flags = IRQ_TYPE_LEVEL_HIGH;
182
183 return 0;
184}
185
186static struct irq_host_ops gef_pic_host_ops = {
187 .map = gef_pic_host_map,
188 .xlate = gef_pic_host_xlate,
189};
190
191
192/*
193 * Initialisation of PIC, this should be called in BSP
194 */
195void __init gef_pic_init(struct device_node *np)
196{
197 unsigned long flags;
198
199 /* Map the devices registers into memory */
200 gef_pic_irq_reg_base = of_iomap(np, 0);
201
202 spin_lock_irqsave(&gef_pic_lock, flags);
203
204 /* Initialise everything as masked. */
205 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_INTR_MASK, 0);
206 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_INTR_MASK, 0);
207
208 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_MCP_MASK, 0);
209 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_MCP_MASK, 0);
210
211 spin_unlock_irqrestore(&gef_pic_lock, flags);
212
213 /* Map controller */
214 gef_pic_cascade_irq = irq_of_parse_and_map(np, 0);
215 if (gef_pic_cascade_irq == NO_IRQ) {
216 printk(KERN_ERR "SBC610: failed to map cascade interrupt");
217 return;
218 }
219
220 /* Setup an irq_host structure */
221 gef_pic_irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR,
222 GEF_PIC_NUM_IRQS,
223 &gef_pic_host_ops, NO_IRQ);
224 if (gef_pic_irq_host == NULL)
225 return;
226
227 /* Chain with parent controller */
228 set_irq_chained_handler(gef_pic_cascade_irq, gef_pic_cascade);
229}
230
231/*
232 * This is called when we receive an interrupt with apparently comes from this
233 * chip - check, returning the highest interrupt generated or return NO_IRQ
234 */
235unsigned int gef_pic_get_irq(void)
236{
237 u32 cause, mask, active;
238 unsigned int virq = NO_IRQ;
239 int hwirq;
240
241 cause = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_STATUS);
242
243 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
244
245 active = cause & mask;
246
247 if (active) {
248 for (hwirq = GEF_PIC_NUM_IRQS - 1; hwirq > -1; hwirq--) {
249 if (active & (0x1 << hwirq))
250 break;
251 }
252 virq = irq_linear_revmap(gef_pic_irq_host,
253 (irq_hw_number_t)hwirq);
254 }
255
256 return virq;
257}
258
diff --git a/arch/powerpc/platforms/86xx/gef_pic.h b/arch/powerpc/platforms/86xx/gef_pic.h
new file mode 100644
index 000000000000..6149916da3f4
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/gef_pic.h
@@ -0,0 +1,11 @@
1#ifndef __GEF_PIC_H__
2#define __GEF_PIC_H__
3
4#include <linux/init.h>
5
6void gef_pic_cascade(unsigned int, struct irq_desc *);
7unsigned int gef_pic_get_irq(void);
8void gef_pic_init(struct device_node *);
9
10#endif /* __GEF_PIC_H__ */
11
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index ee215002b1cf..821c45fac18b 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -39,6 +39,7 @@
39#include <sysdev/fsl_soc.h> 39#include <sysdev/fsl_soc.h>
40 40
41#include "mpc86xx.h" 41#include "mpc86xx.h"
42#include "gef_pic.h"
42 43
43#undef DEBUG 44#undef DEBUG
44 45
@@ -48,8 +49,31 @@
48#define DBG (fmt...) do { } while (0) 49#define DBG (fmt...) do { } while (0)
49#endif 50#endif
50 51
52void __iomem *sbc610_regs;
53
54static void __init gef_sbc610_init_irq(void)
55{
56 struct device_node *cascade_node = NULL;
57
58 mpc86xx_init_irq();
59
60 /*
61 * There is a simple interrupt handler in the main FPGA, this needs
62 * to be cascaded into the MPIC
63 */
64 cascade_node = of_find_compatible_node(NULL, NULL, "gef,fpga-pic");
65 if (!cascade_node) {
66 printk(KERN_WARNING "SBC610: No FPGA PIC\n");
67 return;
68 }
69
70 gef_pic_init(cascade_node);
71 of_node_put(cascade_node);
72}
73
51static void __init gef_sbc610_setup_arch(void) 74static void __init gef_sbc610_setup_arch(void)
52{ 75{
76 struct device_node *regs;
53#ifdef CONFIG_PCI 77#ifdef CONFIG_PCI
54 struct device_node *np; 78 struct device_node *np;
55 79
@@ -63,8 +87,43 @@ static void __init gef_sbc610_setup_arch(void)
63#ifdef CONFIG_SMP 87#ifdef CONFIG_SMP
64 mpc86xx_smp_init(); 88 mpc86xx_smp_init();
65#endif 89#endif
90
91 /* Remap basic board registers */
92 regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs");
93 if (regs) {
94 sbc610_regs = of_iomap(regs, 0);
95 if (sbc610_regs == NULL)
96 printk(KERN_WARNING "Unable to map board registers\n");
97 of_node_put(regs);
98 }
99}
100
101/* Return the PCB revision */
102static unsigned int gef_sbc610_get_pcb_rev(void)
103{
104 unsigned int reg;
105
106 reg = ioread32(sbc610_regs);
107 return (reg >> 8) & 0xff;
108}
109
110/* Return the board (software) revision */
111static unsigned int gef_sbc610_get_board_rev(void)
112{
113 unsigned int reg;
114
115 reg = ioread32(sbc610_regs);
116 return (reg >> 16) & 0xff;
66} 117}
67 118
119/* Return the FPGA revision */
120static unsigned int gef_sbc610_get_fpga_rev(void)
121{
122 unsigned int reg;
123
124 reg = ioread32(sbc610_regs);
125 return (reg >> 24) & 0xf;
126}
68 127
69static void gef_sbc610_show_cpuinfo(struct seq_file *m) 128static void gef_sbc610_show_cpuinfo(struct seq_file *m)
70{ 129{
@@ -73,6 +132,10 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
73 132
74 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n"); 133 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");
75 134
135 seq_printf(m, "Revision\t: %u%c\n", gef_sbc610_get_pcb_rev(),
136 ('A' + gef_sbc610_get_board_rev() - 1));
137 seq_printf(m, "FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev());
138
76 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 139 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
77 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); 140 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
78} 141}
@@ -145,7 +208,7 @@ define_machine(gef_sbc610) {
145 .name = "GE Fanuc SBC610", 208 .name = "GE Fanuc SBC610",
146 .probe = gef_sbc610_probe, 209 .probe = gef_sbc610_probe,
147 .setup_arch = gef_sbc610_setup_arch, 210 .setup_arch = gef_sbc610_setup_arch,
148 .init_IRQ = mpc86xx_init_irq, 211 .init_IRQ = gef_sbc610_init_irq,
149 .show_cpuinfo = gef_sbc610_show_cpuinfo, 212 .show_cpuinfo = gef_sbc610_show_cpuinfo,
150 .get_irq = mpic_get_irq, 213 .get_irq = mpic_get_irq,
151 .restart = fsl_rstcr_restart, 214 .restart = fsl_rstcr_restart,
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 5eedb710896e..e8d54ac5292c 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -238,7 +238,6 @@ static void __init mpc86xx_hpcd_setup_arch(void)
238 } 238 }
239#endif 239#endif
240#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 240#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
241 preallocate_diu_videomemory();
242 diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format; 241 diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format;
243 diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table; 242 diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table;
244 diu_ops.set_monitor_port = mpc8610hpcd_set_monitor_port; 243 diu_ops.set_monitor_port = mpc8610hpcd_set_monitor_port;
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 9578c45b04fe..47e956c871fe 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -239,7 +239,8 @@ config TAU_AVERAGE
239 If in doubt, say N here. 239 If in doubt, say N here.
240 240
241config QUICC_ENGINE 241config QUICC_ENGINE
242 bool 242 bool "Freescale QUICC Engine (QE) Support"
243 depends on FSL_SOC
243 select PPC_LIB_RHEAP 244 select PPC_LIB_RHEAP
244 select CRC32 245 select CRC32
245 help 246 help
@@ -248,6 +249,15 @@ config QUICC_ENGINE
248 Selecting this option means that you wish to build a kernel 249 Selecting this option means that you wish to build a kernel
249 for a machine with a QE coprocessor. 250 for a machine with a QE coprocessor.
250 251
252config QE_GPIO
253 bool "QE GPIO support"
254 depends on QUICC_ENGINE
255 select GENERIC_GPIO
256 select ARCH_REQUIRE_GPIOLIB
257 help
258 Say Y here if you're going to use hardware that connects to the
259 QE GPIOs.
260
251config CPM2 261config CPM2
252 bool "Enable support for the CPM2 (Communications Processor Module)" 262 bool "Enable support for the CPM2 (Communications Processor Module)"
253 depends on MPC85xx || 8260 263 depends on MPC85xx || 8260
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
index 422c8faef593..0494ee55920f 100644
--- a/arch/powerpc/sysdev/fsl_lbc.c
+++ b/arch/powerpc/sysdev/fsl_lbc.c
@@ -11,14 +11,19 @@
11 * (at your option) any later version. 11 * (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/init.h>
15#include <linux/module.h>
14#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/compiler.h>
18#include <linux/spinlock.h>
19#include <linux/types.h>
20#include <linux/io.h>
15#include <linux/of.h> 21#include <linux/of.h>
22#include <asm/prom.h>
16#include <asm/fsl_lbc.h> 23#include <asm/fsl_lbc.h>
17 24
18spinlock_t fsl_lbc_lock = __SPIN_LOCK_UNLOCKED(fsl_lbc_lock); 25static spinlock_t fsl_lbc_lock = __SPIN_LOCK_UNLOCKED(fsl_lbc_lock);
19 26static struct fsl_lbc_regs __iomem *fsl_lbc_regs;
20struct fsl_lbc_regs __iomem *fsl_lbc_regs;
21EXPORT_SYMBOL(fsl_lbc_regs);
22 27
23static char __initdata *compat_lbc[] = { 28static char __initdata *compat_lbc[] = {
24 "fsl,pq2-localbus", 29 "fsl,pq2-localbus",
@@ -127,3 +132,43 @@ int fsl_upm_find(phys_addr_t addr_base, struct fsl_upm *upm)
127 return 0; 132 return 0;
128} 133}
129EXPORT_SYMBOL(fsl_upm_find); 134EXPORT_SYMBOL(fsl_upm_find);
135
136/**
137 * fsl_upm_run_pattern - actually run an UPM pattern
138 * @upm: pointer to the fsl_upm structure obtained via fsl_upm_find
139 * @io_base: remapped pointer to where memory access should happen
140 * @mar: MAR register content during pattern execution
141 *
142 * This function triggers dummy write to the memory specified by the io_base,
143 * thus UPM pattern actually executed. Note that mar usage depends on the
144 * pre-programmed AMX bits in the UPM RAM.
145 */
146int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar)
147{
148 int ret = 0;
149 unsigned long flags;
150
151 spin_lock_irqsave(&fsl_lbc_lock, flags);
152
153 out_be32(&fsl_lbc_regs->mar, mar << (32 - upm->width));
154
155 switch (upm->width) {
156 case 8:
157 out_8(io_base, 0x0);
158 break;
159 case 16:
160 out_be16(io_base, 0x0);
161 break;
162 case 32:
163 out_be32(io_base, 0x0);
164 break;
165 default:
166 ret = -EINVAL;
167 break;
168 }
169
170 spin_unlock_irqrestore(&fsl_lbc_lock, flags);
171
172 return ret;
173}
174EXPORT_SYMBOL(fsl_upm_run_pattern);
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 61e6d77efa4f..5b264eb4b1f7 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC85xx/86xx PCI/PCIE support routing. 2 * MPC83xx/85xx/86xx PCI/PCIE support routing.
3 * 3 *
4 * Copyright 2007 Freescale Semiconductor, Inc 4 * Copyright 2007,2008 Freescale Semiconductor, Inc
5 * 5 *
6 * Initial author: Xianghua Xiao <x.xiao@freescale.com> 6 * Initial author: Xianghua Xiao <x.xiao@freescale.com>
7 * Recode: ZHANG WEI <wei.zhang@freescale.com> 7 * Recode: ZHANG WEI <wei.zhang@freescale.com>
@@ -251,20 +251,47 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
251DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header); 251DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
252#endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */ 252#endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
253 253
254#if defined(CONFIG_PPC_83xx) 254#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
255int __init mpc83xx_add_bridge(struct device_node *dev) 255int __init mpc83xx_add_bridge(struct device_node *dev)
256{ 256{
257 int len; 257 int len;
258 struct pci_controller *hose; 258 struct pci_controller *hose;
259 struct resource rsrc; 259 struct resource rsrc_reg;
260 struct resource rsrc_cfg;
260 const int *bus_range; 261 const int *bus_range;
261 int primary = 1, has_address = 0; 262 int primary;
262 phys_addr_t immr = get_immrbase();
263 263
264 pr_debug("Adding PCI host bridge %s\n", dev->full_name); 264 pr_debug("Adding PCI host bridge %s\n", dev->full_name);
265 265
266 /* Fetch host bridge registers address */ 266 /* Fetch host bridge registers address */
267 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 267 if (of_address_to_resource(dev, 0, &rsrc_reg)) {
268 printk(KERN_WARNING "Can't get pci register base!\n");
269 return -ENOMEM;
270 }
271
272 memset(&rsrc_cfg, 0, sizeof(rsrc_cfg));
273
274 if (of_address_to_resource(dev, 1, &rsrc_cfg)) {
275 printk(KERN_WARNING
276 "No pci config register base in dev tree, "
277 "using default\n");
278 /*
279 * MPC83xx supports up to two host controllers
280 * one at 0x8500 has config space registers at 0x8300
281 * one at 0x8600 has config space registers at 0x8380
282 */
283 if ((rsrc_reg.start & 0xfffff) == 0x8500)
284 rsrc_cfg.start = (rsrc_reg.start & 0xfff00000) + 0x8300;
285 else if ((rsrc_reg.start & 0xfffff) == 0x8600)
286 rsrc_cfg.start = (rsrc_reg.start & 0xfff00000) + 0x8380;
287 }
288 /*
289 * Controller at offset 0x8500 is primary
290 */
291 if ((rsrc_reg.start & 0xfffff) == 0x8500)
292 primary = 1;
293 else
294 primary = 0;
268 295
269 /* Get bus range if any */ 296 /* Get bus range if any */
270 bus_range = of_get_property(dev, "bus-range", &len); 297 bus_range = of_get_property(dev, "bus-range", &len);
@@ -281,22 +308,11 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
281 hose->first_busno = bus_range ? bus_range[0] : 0; 308 hose->first_busno = bus_range ? bus_range[0] : 0;
282 hose->last_busno = bus_range ? bus_range[1] : 0xff; 309 hose->last_busno = bus_range ? bus_range[1] : 0xff;
283 310
284 /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar 311 setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0);
285 * the other at 0x8600, we consider the 0x8500 the primary controller
286 */
287 /* PCI 1 */
288 if ((rsrc.start & 0xfffff) == 0x8500) {
289 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0);
290 }
291 /* PCI 2 */
292 if ((rsrc.start & 0xfffff) == 0x8600) {
293 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0);
294 primary = 0;
295 }
296 312
297 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " 313 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
298 "Firmware bus number: %d->%d\n", 314 "Firmware bus number: %d->%d\n",
299 (unsigned long long)rsrc.start, hose->first_busno, 315 (unsigned long long)rsrc_reg.start, hose->first_busno,
300 hose->last_busno); 316 hose->last_busno);
301 317
302 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 318 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index eeb07007c753..01b884b25696 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -720,42 +720,6 @@ void fsl_rstcr_restart(char *cmd)
720#endif 720#endif
721 721
722#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 722#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
723struct platform_diu_data_ops diu_ops = { 723struct platform_diu_data_ops diu_ops;
724 .diu_size = 1280 * 1024 * 4, /* default one 1280x1024 buffer */
725};
726EXPORT_SYMBOL(diu_ops); 724EXPORT_SYMBOL(diu_ops);
727
728int __init preallocate_diu_videomemory(void)
729{
730 pr_debug("diu_size=%lu\n", diu_ops.diu_size);
731
732 diu_ops.diu_mem = __alloc_bootmem(diu_ops.diu_size, 8, 0);
733 if (!diu_ops.diu_mem) {
734 printk(KERN_ERR "fsl-diu: cannot allocate %lu bytes\n",
735 diu_ops.diu_size);
736 return -ENOMEM;
737 }
738
739 pr_debug("diu_mem=%p\n", diu_ops.diu_mem);
740
741 rh_init(&diu_ops.diu_rh_info, 4096, ARRAY_SIZE(diu_ops.diu_rh_block),
742 diu_ops.diu_rh_block);
743 return rh_attach_region(&diu_ops.diu_rh_info,
744 (unsigned long) diu_ops.diu_mem,
745 diu_ops.diu_size);
746}
747
748static int __init early_parse_diufb(char *p)
749{
750 if (!p)
751 return 1;
752
753 diu_ops.diu_size = _ALIGN_UP(memparse(p, &p), 8);
754
755 pr_debug("diu_size=%lu\n", diu_ops.diu_size);
756
757 return 0;
758}
759early_param("diufb", early_parse_diufb);
760
761#endif 725#endif
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index 024299887352..60f7f227327c 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -20,14 +20,7 @@ extern int fsl_spi_init(struct spi_board_info *board_infos,
20extern void fsl_rstcr_restart(char *cmd); 20extern void fsl_rstcr_restart(char *cmd);
21 21
22#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 22#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
23#include <linux/bootmem.h>
24#include <asm/rheap.h>
25struct platform_diu_data_ops { 23struct platform_diu_data_ops {
26 rh_block_t diu_rh_block[16];
27 rh_info_t diu_rh_info;
28 unsigned long diu_size;
29 void *diu_mem;
30
31 unsigned int (*get_pixel_format) (unsigned int bits_per_pixel, 24 unsigned int (*get_pixel_format) (unsigned int bits_per_pixel,
32 int monitor_port); 25 int monitor_port);
33 void (*set_gamma_table) (int monitor_port, char *gamma_table_base); 26 void (*set_gamma_table) (int monitor_port, char *gamma_table_base);
@@ -38,7 +31,6 @@ struct platform_diu_data_ops {
38}; 31};
39 32
40extern struct platform_diu_data_ops diu_ops; 33extern struct platform_diu_data_ops diu_ops;
41int __init preallocate_diu_videomemory(void);
42#endif 34#endif
43 35
44#endif 36#endif
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig
index 1ce546462be5..76ffbc48d4b9 100644
--- a/arch/powerpc/sysdev/qe_lib/Kconfig
+++ b/arch/powerpc/sysdev/qe_lib/Kconfig
@@ -24,12 +24,3 @@ config QE_USB
24 bool 24 bool
25 help 25 help
26 QE USB Host Controller support 26 QE USB Host Controller support
27
28config QE_GPIO
29 bool "QE GPIO support"
30 depends on QUICC_ENGINE
31 select GENERIC_GPIO
32 select ARCH_REQUIRE_GPIOLIB
33 help
34 Say Y here if you're going to use hardware that connects to the
35 QE GPIOs.
diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
index a95cb9465d65..17356827b93d 100644
--- a/drivers/i2c/chips/Kconfig
+++ b/drivers/i2c/chips/Kconfig
@@ -172,4 +172,15 @@ config MENELAUS
172 and other features that are often used in portable devices like 172 and other features that are often used in portable devices like
173 cell phones and PDAs. 173 cell phones and PDAs.
174 174
175config MCU_MPC8349EMITX
176 tristate "MPC8349E-mITX MCU driver"
177 depends on I2C && PPC_83xx
178 select GENERIC_GPIO
179 select ARCH_REQUIRE_GPIOLIB
180 help
181 Say Y here to enable soft power-off functionality on the Freescale
182 boards with the MPC8349E-mITX-compatible MCU chips. This driver will
183 also register MCU GPIOs with the generic GPIO API, so you'll able
184 to use MCU pins as GPIOs.
185
175endmenu 186endmenu
diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
index 39e3e69ed125..ca520fa143d6 100644
--- a/drivers/i2c/chips/Makefile
+++ b/drivers/i2c/chips/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
21obj-$(CONFIG_TPS65010) += tps65010.o 21obj-$(CONFIG_TPS65010) += tps65010.o
22obj-$(CONFIG_MENELAUS) += menelaus.o 22obj-$(CONFIG_MENELAUS) += menelaus.o
23obj-$(CONFIG_SENSORS_TSL2550) += tsl2550.o 23obj-$(CONFIG_SENSORS_TSL2550) += tsl2550.o
24obj-$(CONFIG_MCU_MPC8349EMITX) += mcu_mpc8349emitx.o
24 25
25ifeq ($(CONFIG_I2C_DEBUG_CHIP),y) 26ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
26EXTRA_CFLAGS += -DDEBUG 27EXTRA_CFLAGS += -DDEBUG
diff --git a/drivers/i2c/chips/mcu_mpc8349emitx.c b/drivers/i2c/chips/mcu_mpc8349emitx.c
new file mode 100644
index 000000000000..82a9bcb858b6
--- /dev/null
+++ b/drivers/i2c/chips/mcu_mpc8349emitx.c
@@ -0,0 +1,209 @@
1/*
2 * Power Management and GPIO expander driver for MPC8349E-mITX-compatible MCU
3 *
4 * Copyright (c) 2008 MontaVista Software, Inc.
5 *
6 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#include <linux/init.h>
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/device.h>
18#include <linux/mutex.h>
19#include <linux/i2c.h>
20#include <linux/gpio.h>
21#include <linux/of.h>
22#include <linux/of_gpio.h>
23#include <asm/prom.h>
24#include <asm/machdep.h>
25
26/*
27 * I don't have specifications for the MCU firmware, I found this register
28 * and bits positions by the trial&error method.
29 */
30#define MCU_REG_CTRL 0x20
31#define MCU_CTRL_POFF 0x40
32
33#define MCU_NUM_GPIO 2
34
35struct mcu {
36 struct mutex lock;
37 struct device_node *np;
38 struct i2c_client *client;
39 struct of_gpio_chip of_gc;
40 u8 reg_ctrl;
41};
42
43static struct mcu *glob_mcu;
44
45static void mcu_power_off(void)
46{
47 struct mcu *mcu = glob_mcu;
48
49 pr_info("Sending power-off request to the MCU...\n");
50 mutex_lock(&mcu->lock);
51 i2c_smbus_write_byte_data(glob_mcu->client, MCU_REG_CTRL,
52 mcu->reg_ctrl | MCU_CTRL_POFF);
53 mutex_unlock(&mcu->lock);
54}
55
56static void mcu_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
57{
58 struct of_gpio_chip *of_gc = to_of_gpio_chip(gc);
59 struct mcu *mcu = container_of(of_gc, struct mcu, of_gc);
60 u8 bit = 1 << (4 + gpio);
61
62 mutex_lock(&mcu->lock);
63 if (val)
64 mcu->reg_ctrl &= ~bit;
65 else
66 mcu->reg_ctrl |= bit;
67
68 i2c_smbus_write_byte_data(mcu->client, MCU_REG_CTRL, mcu->reg_ctrl);
69 mutex_unlock(&mcu->lock);
70}
71
72static int mcu_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
73{
74 mcu_gpio_set(gc, gpio, val);
75 return 0;
76}
77
78static int mcu_gpiochip_add(struct mcu *mcu)
79{
80 struct device_node *np;
81 struct of_gpio_chip *of_gc = &mcu->of_gc;
82 struct gpio_chip *gc = &of_gc->gc;
83 int ret;
84
85 np = of_find_compatible_node(NULL, NULL, "fsl,mcu-mpc8349emitx");
86 if (!np)
87 return -ENODEV;
88
89 gc->owner = THIS_MODULE;
90 gc->label = np->full_name;
91 gc->can_sleep = 1;
92 gc->ngpio = MCU_NUM_GPIO;
93 gc->base = -1;
94 gc->set = mcu_gpio_set;
95 gc->direction_output = mcu_gpio_dir_out;
96 of_gc->gpio_cells = 2;
97 of_gc->xlate = of_gpio_simple_xlate;
98
99 np->data = of_gc;
100 mcu->np = np;
101
102 /*
103 * We don't want to lose the node, its ->data and ->full_name...
104 * So, if succeeded, we don't put the node here.
105 */
106 ret = gpiochip_add(gc);
107 if (ret)
108 of_node_put(np);
109 return ret;
110}
111
112static int mcu_gpiochip_remove(struct mcu *mcu)
113{
114 int ret;
115
116 ret = gpiochip_remove(&mcu->of_gc.gc);
117 if (ret)
118 return ret;
119 of_node_put(mcu->np);
120
121 return 0;
122}
123
124static int __devinit mcu_probe(struct i2c_client *client,
125 const struct i2c_device_id *id)
126{
127 struct mcu *mcu;
128 int ret;
129
130 mcu = kzalloc(sizeof(*mcu), GFP_KERNEL);
131 if (!mcu)
132 return -ENOMEM;
133
134 mutex_init(&mcu->lock);
135 mcu->client = client;
136 i2c_set_clientdata(client, mcu);
137
138 ret = i2c_smbus_read_byte_data(mcu->client, MCU_REG_CTRL);
139 if (ret < 0)
140 goto err;
141 mcu->reg_ctrl = ret;
142
143 ret = mcu_gpiochip_add(mcu);
144 if (ret)
145 goto err;
146
147 /* XXX: this is potentially racy, but there is no lock for ppc_md */
148 if (!ppc_md.power_off) {
149 glob_mcu = mcu;
150 ppc_md.power_off = mcu_power_off;
151 dev_info(&client->dev, "will provide power-off service\n");
152 }
153
154 return 0;
155err:
156 kfree(mcu);
157 return ret;
158}
159
160static int __devexit mcu_remove(struct i2c_client *client)
161{
162 struct mcu *mcu = i2c_get_clientdata(client);
163 int ret;
164
165 if (glob_mcu == mcu) {
166 ppc_md.power_off = NULL;
167 glob_mcu = NULL;
168 }
169
170 ret = mcu_gpiochip_remove(mcu);
171 if (ret)
172 return ret;
173 i2c_set_clientdata(client, NULL);
174 kfree(mcu);
175 return 0;
176}
177
178static const struct i2c_device_id mcu_ids[] = {
179 { "mcu-mpc8349emitx", },
180 {},
181};
182MODULE_DEVICE_TABLE(i2c, mcu_ids);
183
184static struct i2c_driver mcu_driver = {
185 .driver = {
186 .name = "mcu-mpc8349emitx",
187 .owner = THIS_MODULE,
188 },
189 .probe = mcu_probe,
190 .remove = __devexit_p(mcu_remove),
191 .id_table = mcu_ids,
192};
193
194static int __init mcu_init(void)
195{
196 return i2c_add_driver(&mcu_driver);
197}
198module_init(mcu_init);
199
200static void __exit mcu_exit(void)
201{
202 i2c_del_driver(&mcu_driver);
203}
204module_exit(mcu_exit);
205
206MODULE_DESCRIPTION("Power Management and GPIO expander driver for "
207 "MPC8349E-mITX-compatible MCU");
208MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
209MODULE_LICENSE("GPL");