Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branch 'kumar/next' into next

+2422 -1025
+6 -3
Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
··· 12 12 - #size-cells : Either one or two, depending on how large each chipselect 13 13 can be. 14 14 - reg : Offset and length of the register set for the device 15 - - interrupts : IFC has two interrupts. The first one is the "common" 16 - interrupt(CM_EVTER_STAT), and second is the NAND interrupt 17 - (NAND_EVTER_STAT). 15 + - interrupts: IFC may have one or two interrupts. If two interrupt 16 + specifiers are present, the first is the "common" 17 + interrupt (CM_EVTER_STAT), and the second is the NAND 18 + interrupt (NAND_EVTER_STAT). If there is only one, 19 + that interrupt reports both types of event. 20 + 18 21 19 22 - ranges : Each range corresponds to a single chipselect, and covers 20 23 the entire access window as configured.
+4 -2
arch/powerpc/Kconfig
··· 215 215 config ARCH_SUSPEND_POSSIBLE 216 216 def_bool y 217 217 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ 218 - (PPC_85xx && !SMP) || PPC_86xx || PPC_PSERIES || 44x || 40x 218 + (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \ 219 + || 44x || 40x 219 220 220 221 config PPC_DCR_NATIVE 221 222 bool ··· 329 328 330 329 config HOTPLUG_CPU 331 330 bool "Support for enabling/disabling CPUs" 332 - depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV) 331 + depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || \ 332 + PPC_PMAC || PPC_POWERNV || (PPC_85xx && !PPC_E500MC)) 333 333 ---help--- 334 334 Say Y here to be able to disable and re-enable individual 335 335 CPUs at runtime on SMP machines.
+58
arch/powerpc/boot/dts/fsl/e500mc_power_isa.dtsi
··· 1 + /* 2 + * e500mc Power ISA Device Tree Source (include) 3 + * 4 + * Copyright 2012 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 + / { 36 + cpus { 37 + power-isa-version = "2.06"; 38 + power-isa-b; // Base 39 + power-isa-e; // Embedded 40 + power-isa-atb; // Alternate Time Base 41 + power-isa-cs; // Cache Specification 42 + power-isa-ds; // Decorated Storage 43 + power-isa-e.ed; // Embedded.Enhanced Debug 44 + power-isa-e.pd; // Embedded.External PID 45 + power-isa-e.hv; // Embedded.Hypervisor 46 + power-isa-e.le; // Embedded.Little-Endian 47 + power-isa-e.pm; // Embedded.Performance Monitor 48 + power-isa-e.pc; // Embedded.Processor Control 49 + power-isa-ecl; // Embedded Cache Locking 50 + power-isa-exp; // External Proxy 51 + power-isa-fp; // Floating Point 52 + power-isa-fp.r; // Floating Point.Record 53 + power-isa-mmc; // Memory Coherence 54 + power-isa-scpm; // Store Conditional Page Mobility 55 + power-isa-wt; // Wait 56 + mmu-type = "power-embedded"; 57 + }; 58 + };
+52
arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi
··· 1 + /* 2 + * e500v2 Power ISA Device Tree Source (include) 3 + * 4 + * Copyright 2012 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 + / { 36 + cpus { 37 + power-isa-version = "2.03"; 38 + power-isa-b; // Base 39 + power-isa-e; // Embedded 40 + power-isa-atb; // Alternate Time Base 41 + power-isa-cs; // Cache Specification 42 + power-isa-e.le; // Embedded.Little-Endian 43 + power-isa-e.pm; // Embedded.Performance Monitor 44 + power-isa-ecl; // Embedded Cache Locking 45 + power-isa-mmc; // Memory Coherence 46 + power-isa-sp; // Signal Processing Engine 47 + power-isa-sp.fd; // SPE.Embedded Float Scalar Double 48 + power-isa-sp.fs; // SPE.Embedded Float Scalar Single 49 + power-isa-sp.fv; // SPE.Embedded Float Vector 50 + mmu-type = "power-embedded"; 51 + }; 52 + };
+59
arch/powerpc/boot/dts/fsl/e5500_power_isa.dtsi
··· 1 + /* 2 + * e5500 Power ISA Device Tree Source (include) 3 + * 4 + * Copyright 2012 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 + / { 36 + cpus { 37 + power-isa-version = "2.06"; 38 + power-isa-b; // Base 39 + power-isa-e; // Embedded 40 + power-isa-atb; // Alternate Time Base 41 + power-isa-cs; // Cache Specification 42 + power-isa-ds; // Decorated Storage 43 + power-isa-e.ed; // Embedded.Enhanced Debug 44 + power-isa-e.pd; // Embedded.External PID 45 + power-isa-e.hv; // Embedded.Hypervisor 46 + power-isa-e.le; // Embedded.Little-Endian 47 + power-isa-e.pm; // Embedded.Performance Monitor 48 + power-isa-e.pc; // Embedded.Processor Control 49 + power-isa-ecl; // Embedded Cache Locking 50 + power-isa-exp; // External Proxy 51 + power-isa-fp; // Floating Point 52 + power-isa-fp.r; // Floating Point.Record 53 + power-isa-mmc; // Memory Coherence 54 + power-isa-scpm; // Store Conditional Page Mobility 55 + power-isa-wt; // Wait 56 + power-isa-64; // 64-bit 57 + mmu-type = "power-embedded"; 58 + }; 59 + };
+3
arch/powerpc/boot/dts/fsl/mpc8536si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,MPC8536"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/mpc8544si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,MPC8544"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,MPC8548"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/mpc8568si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,MPC8568"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/mpc8569si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,MPC8569"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/mpc8572si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,MPC8572"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p1010si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P1010"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p1020si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P1020"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p1021si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P1021"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p1022si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P1022"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p1023si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P1023"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p2020si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500v2_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P2020"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500mc_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P2041"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500mc_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P3041"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e500mc_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P4080"; 38 41 #address-cells = <2>;
+3
arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
··· 33 33 */ 34 34 35 35 /dts-v1/; 36 + 37 + /include/ "e5500_power_isa.dtsi" 38 + 36 39 / { 37 40 compatible = "fsl,P5020"; 38 41 #address-cells = <2>;
+320
arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
··· 1 + /* 2 + * P5040 Silicon/SoC Device Tree Source (post include) 3 + * 4 + * Copyright 2012 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 + &lbc { 36 + compatible = "fsl,p5040-elbc", "fsl,elbc", "simple-bus"; 37 + interrupts = <25 2 0 0>; 38 + #address-cells = <2>; 39 + #size-cells = <1>; 40 + }; 41 + 42 + /* controller at 0x200000 */ 43 + &pci0 { 44 + compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4"; 45 + device_type = "pci"; 46 + #size-cells = <2>; 47 + #address-cells = <3>; 48 + bus-range = <0x0 0xff>; 49 + clock-frequency = <33333333>; 50 + interrupts = <16 2 1 15>; 51 + pcie@0 { 52 + reg = <0 0 0 0 0>; 53 + #interrupt-cells = <1>; 54 + #size-cells = <2>; 55 + #address-cells = <3>; 56 + device_type = "pci"; 57 + interrupts = <16 2 1 15>; 58 + interrupt-map-mask = <0xf800 0 0 7>; 59 + interrupt-map = < 60 + /* IDSEL 0x0 */ 61 + 0000 0 0 1 &mpic 40 1 0 0 62 + 0000 0 0 2 &mpic 1 1 0 0 63 + 0000 0 0 3 &mpic 2 1 0 0 64 + 0000 0 0 4 &mpic 3 1 0 0 65 + >; 66 + }; 67 + }; 68 + 69 + /* controller at 0x201000 */ 70 + &pci1 { 71 + compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4"; 72 + device_type = "pci"; 73 + #size-cells = <2>; 74 + #address-cells = <3>; 75 + bus-range = <0 0xff>; 76 + clock-frequency = <33333333>; 77 + interrupts = <16 2 1 14>; 78 + pcie@0 { 79 + reg = <0 0 0 0 0>; 80 + #interrupt-cells = <1>; 81 + #size-cells = <2>; 82 + #address-cells = <3>; 83 + device_type = "pci"; 84 + interrupts = <16 2 1 14>; 85 + interrupt-map-mask = <0xf800 0 0 7>; 86 + interrupt-map = < 87 + /* IDSEL 0x0 */ 88 + 0000 0 0 1 &mpic 41 1 0 0 89 + 0000 0 0 2 &mpic 5 1 0 0 90 + 0000 0 0 3 &mpic 6 1 0 0 91 + 0000 0 0 4 &mpic 7 1 0 0 92 + >; 93 + }; 94 + }; 95 + 96 + /* controller at 0x202000 */ 97 + &pci2 { 98 + compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4"; 99 + device_type = "pci"; 100 + #size-cells = <2>; 101 + #address-cells = <3>; 102 + bus-range = <0x0 0xff>; 103 + clock-frequency = <33333333>; 104 + interrupts = <16 2 1 13>; 105 + pcie@0 { 106 + reg = <0 0 0 0 0>; 107 + #interrupt-cells = <1>; 108 + #size-cells = <2>; 109 + #address-cells = <3>; 110 + device_type = "pci"; 111 + interrupts = <16 2 1 13>; 112 + interrupt-map-mask = <0xf800 0 0 7>; 113 + interrupt-map = < 114 + /* IDSEL 0x0 */ 115 + 0000 0 0 1 &mpic 42 1 0 0 116 + 0000 0 0 2 &mpic 9 1 0 0 117 + 0000 0 0 3 &mpic 10 1 0 0 118 + 0000 0 0 4 &mpic 11 1 0 0 119 + >; 120 + }; 121 + }; 122 + 123 + &dcsr { 124 + #address-cells = <1>; 125 + #size-cells = <1>; 126 + compatible = "fsl,dcsr", "simple-bus"; 127 + 128 + dcsr-epu@0 { 129 + compatible = "fsl,dcsr-epu"; 130 + interrupts = <52 2 0 0 131 + 84 2 0 0 132 + 85 2 0 0>; 133 + reg = <0x0 0x1000>; 134 + }; 135 + dcsr-npc { 136 + compatible = "fsl,dcsr-npc"; 137 + reg = <0x1000 0x1000 0x1000000 0x8000>; 138 + }; 139 + dcsr-nxc@2000 { 140 + compatible = "fsl,dcsr-nxc"; 141 + reg = <0x2000 0x1000>; 142 + }; 143 + dcsr-corenet { 144 + compatible = "fsl,dcsr-corenet"; 145 + reg = <0x8000 0x1000 0xB0000 0x1000>; 146 + }; 147 + dcsr-dpaa@9000 { 148 + compatible = "fsl,p5040-dcsr-dpaa", "fsl,dcsr-dpaa"; 149 + reg = <0x9000 0x1000>; 150 + }; 151 + dcsr-ocn@11000 { 152 + compatible = "fsl,p5040-dcsr-ocn", "fsl,dcsr-ocn"; 153 + reg = <0x11000 0x1000>; 154 + }; 155 + dcsr-ddr@12000 { 156 + compatible = "fsl,dcsr-ddr"; 157 + dev-handle = <&ddr1>; 158 + reg = <0x12000 0x1000>; 159 + }; 160 + dcsr-ddr@13000 { 161 + compatible = "fsl,dcsr-ddr"; 162 + dev-handle = <&ddr2>; 163 + reg = <0x13000 0x1000>; 164 + }; 165 + dcsr-nal@18000 { 166 + compatible = "fsl,p5040-dcsr-nal", "fsl,dcsr-nal"; 167 + reg = <0x18000 0x1000>; 168 + }; 169 + dcsr-rcpm@22000 { 170 + compatible = "fsl,p5040-dcsr-rcpm", "fsl,dcsr-rcpm"; 171 + reg = <0x22000 0x1000>; 172 + }; 173 + dcsr-cpu-sb-proxy@40000 { 174 + compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy"; 175 + cpu-handle = <&cpu0>; 176 + reg = <0x40000 0x1000>; 177 + }; 178 + dcsr-cpu-sb-proxy@41000 { 179 + compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy"; 180 + cpu-handle = <&cpu1>; 181 + reg = <0x41000 0x1000>; 182 + }; 183 + dcsr-cpu-sb-proxy@42000 { 184 + compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy"; 185 + cpu-handle = <&cpu2>; 186 + reg = <0x42000 0x1000>; 187 + }; 188 + dcsr-cpu-sb-proxy@43000 { 189 + compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy"; 190 + cpu-handle = <&cpu3>; 191 + reg = <0x43000 0x1000>; 192 + }; 193 + }; 194 + 195 + &soc { 196 + #address-cells = <1>; 197 + #size-cells = <1>; 198 + device_type = "soc"; 199 + compatible = "simple-bus"; 200 + 201 + soc-sram-error { 202 + compatible = "fsl,soc-sram-error"; 203 + interrupts = <16 2 1 29>; 204 + }; 205 + 206 + corenet-law@0 { 207 + compatible = "fsl,corenet-law"; 208 + reg = <0x0 0x1000>; 209 + fsl,num-laws = <32>; 210 + }; 211 + 212 + ddr1: memory-controller@8000 { 213 + compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller"; 214 + reg = <0x8000 0x1000>; 215 + interrupts = <16 2 1 23>; 216 + }; 217 + 218 + ddr2: memory-controller@9000 { 219 + compatible = "fsl,qoriq-memory-controller-v4.5","fsl,qoriq-memory-controller"; 220 + reg = <0x9000 0x1000>; 221 + interrupts = <16 2 1 22>; 222 + }; 223 + 224 + cpc: l3-cache-controller@10000 { 225 + compatible = "fsl,p5040-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache"; 226 + reg = <0x10000 0x1000 227 + 0x11000 0x1000>; 228 + interrupts = <16 2 1 27 229 + 16 2 1 26>; 230 + }; 231 + 232 + corenet-cf@18000 { 233 + compatible = "fsl,corenet-cf"; 234 + reg = <0x18000 0x1000>; 235 + interrupts = <16 2 1 31>; 236 + fsl,ccf-num-csdids = <32>; 237 + fsl,ccf-num-snoopids = <32>; 238 + }; 239 + 240 + iommu@20000 { 241 + compatible = "fsl,pamu-v1.0", "fsl,pamu"; 242 + reg = <0x20000 0x5000>; 243 + interrupts = < 244 + 24 2 0 0 245 + 16 2 1 30>; 246 + }; 247 + 248 + /include/ "qoriq-mpic.dtsi" 249 + 250 + guts: global-utilities@e0000 { 251 + compatible = "fsl,p5040-device-config", "fsl,qoriq-device-config-1.0"; 252 + reg = <0xe0000 0xe00>; 253 + fsl,has-rstcr; 254 + #sleep-cells = <1>; 255 + fsl,liodn-bits = <12>; 256 + }; 257 + 258 + pins: global-utilities@e0e00 { 259 + compatible = "fsl,p5040-pin-control", "fsl,qoriq-pin-control-1.0"; 260 + reg = <0xe0e00 0x200>; 261 + #sleep-cells = <2>; 262 + }; 263 + 264 + clockgen: global-utilities@e1000 { 265 + compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0"; 266 + reg = <0xe1000 0x1000>; 267 + clock-frequency = <0>; 268 + }; 269 + 270 + rcpm: global-utilities@e2000 { 271 + compatible = "fsl,p5040-rcpm", "fsl,qoriq-rcpm-1.0"; 272 + reg = <0xe2000 0x1000>; 273 + #sleep-cells = <1>; 274 + }; 275 + 276 + sfp: sfp@e8000 { 277 + compatible = "fsl,p5040-sfp", "fsl,qoriq-sfp-1.0"; 278 + reg = <0xe8000 0x1000>; 279 + }; 280 + 281 + serdes: serdes@ea000 { 282 + compatible = "fsl,p5040-serdes"; 283 + reg = <0xea000 0x1000>; 284 + }; 285 + 286 + /include/ "qoriq-dma-0.dtsi" 287 + /include/ "qoriq-dma-1.dtsi" 288 + /include/ "qoriq-espi-0.dtsi" 289 + spi@110000 { 290 + fsl,espi-num-chipselects = <4>; 291 + }; 292 + 293 + /include/ "qoriq-esdhc-0.dtsi" 294 + sdhc@114000 { 295 + sdhci,auto-cmd12; 296 + }; 297 + 298 + /include/ "qoriq-i2c-0.dtsi" 299 + /include/ "qoriq-i2c-1.dtsi" 300 + /include/ "qoriq-duart-0.dtsi" 301 + /include/ "qoriq-duart-1.dtsi" 302 + /include/ "qoriq-gpio-0.dtsi" 303 + /include/ "qoriq-usb2-mph-0.dtsi" 304 + usb0: usb@210000 { 305 + compatible = "fsl-usb2-mph-v1.6", "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph"; 306 + phy_type = "utmi"; 307 + port0; 308 + }; 309 + 310 + /include/ "qoriq-usb2-dr-0.dtsi" 311 + usb1: usb@211000 { 312 + compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr"; 313 + dr_mode = "host"; 314 + phy_type = "utmi"; 315 + }; 316 + 317 + /include/ "qoriq-sata2-0.dtsi" 318 + /include/ "qoriq-sata2-1.dtsi" 319 + /include/ "qoriq-sec5.2-0.dtsi" 320 + };
+114
arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
··· 1 + /* 2 + * P5040 Silicon/SoC Device Tree Source (pre include) 3 + * 4 + * Copyright 2012 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 + /dts-v1/; 36 + 37 + /include/ "e5500_power_isa.dtsi" 38 + 39 + / { 40 + compatible = "fsl,P5040"; 41 + #address-cells = <2>; 42 + #size-cells = <2>; 43 + interrupt-parent = <&mpic>; 44 + 45 + aliases { 46 + ccsr = &soc; 47 + dcsr = &dcsr; 48 + 49 + serial0 = &serial0; 50 + serial1 = &serial1; 51 + serial2 = &serial2; 52 + serial3 = &serial3; 53 + pci0 = &pci0; 54 + pci1 = &pci1; 55 + pci2 = &pci2; 56 + usb0 = &usb0; 57 + usb1 = &usb1; 58 + dma0 = &dma0; 59 + dma1 = &dma1; 60 + sdhc = &sdhc; 61 + msi0 = &msi0; 62 + msi1 = &msi1; 63 + msi2 = &msi2; 64 + 65 + crypto = &crypto; 66 + sec_jr0 = &sec_jr0; 67 + sec_jr1 = &sec_jr1; 68 + sec_jr2 = &sec_jr2; 69 + sec_jr3 = &sec_jr3; 70 + rtic_a = &rtic_a; 71 + rtic_b = &rtic_b; 72 + rtic_c = &rtic_c; 73 + rtic_d = &rtic_d; 74 + sec_mon = &sec_mon; 75 + }; 76 + 77 + cpus { 78 + #address-cells = <1>; 79 + #size-cells = <0>; 80 + 81 + cpu0: PowerPC,e5500@0 { 82 + device_type = "cpu"; 83 + reg = <0>; 84 + next-level-cache = <&L2_0>; 85 + L2_0: l2-cache { 86 + next-level-cache = <&cpc>; 87 + }; 88 + }; 89 + cpu1: PowerPC,e5500@1 { 90 + device_type = "cpu"; 91 + reg = <1>; 92 + next-level-cache = <&L2_1>; 93 + L2_1: l2-cache { 94 + next-level-cache = <&cpc>; 95 + }; 96 + }; 97 + cpu2: PowerPC,e5500@2 { 98 + device_type = "cpu"; 99 + reg = <2>; 100 + next-level-cache = <&L2_2>; 101 + L2_2: l2-cache { 102 + next-level-cache = <&cpc>; 103 + }; 104 + }; 105 + cpu3: PowerPC,e5500@3 { 106 + device_type = "cpu"; 107 + reg = <3>; 108 + next-level-cache = <&L2_3>; 109 + L2_3: l2-cache { 110 + next-level-cache = <&cpc>; 111 + }; 112 + }; 113 + }; 114 + };
+118
arch/powerpc/boot/dts/fsl/qoriq-sec5.2-0.dtsi
··· 1 + /* 2 + * QorIQ Sec/Crypto 5.2 device tree stub [ controller @ offset 0x300000 ] 3 + * 4 + * Copyright 2011-2012 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 + crypto: crypto@300000 { 36 + compatible = "fsl,sec-v5.2", "fsl,sec-v5.0", "fsl,sec-v4.0"; 37 + #address-cells = <1>; 38 + #size-cells = <1>; 39 + reg = <0x300000 0x10000>; 40 + ranges = <0 0x300000 0x10000>; 41 + interrupts = <92 2 0 0>; 42 + 43 + sec_jr0: jr@1000 { 44 + compatible = "fsl,sec-v5.2-job-ring", 45 + "fsl,sec-v5.0-job-ring", 46 + "fsl,sec-v4.0-job-ring"; 47 + reg = <0x1000 0x1000>; 48 + interrupts = <88 2 0 0>; 49 + }; 50 + 51 + sec_jr1: jr@2000 { 52 + compatible = "fsl,sec-v5.2-job-ring", 53 + "fsl,sec-v5.0-job-ring", 54 + "fsl,sec-v4.0-job-ring"; 55 + reg = <0x2000 0x1000>; 56 + interrupts = <89 2 0 0>; 57 + }; 58 + 59 + sec_jr2: jr@3000 { 60 + compatible = "fsl,sec-v5.2-job-ring", 61 + "fsl,sec-v5.0-job-ring", 62 + "fsl,sec-v4.0-job-ring"; 63 + reg = <0x3000 0x1000>; 64 + interrupts = <90 2 0 0>; 65 + }; 66 + 67 + sec_jr3: jr@4000 { 68 + compatible = "fsl,sec-v5.2-job-ring", 69 + "fsl,sec-v5.0-job-ring", 70 + "fsl,sec-v4.0-job-ring"; 71 + reg = <0x4000 0x1000>; 72 + interrupts = <91 2 0 0>; 73 + }; 74 + 75 + rtic@6000 { 76 + compatible = "fsl,sec-v5.2-rtic", 77 + "fsl,sec-v5.0-rtic", 78 + "fsl,sec-v4.0-rtic"; 79 + #address-cells = <1>; 80 + #size-cells = <1>; 81 + reg = <0x6000 0x100>; 82 + ranges = <0x0 0x6100 0xe00>; 83 + 84 + rtic_a: rtic-a@0 { 85 + compatible = "fsl,sec-v5.2-rtic-memory", 86 + "fsl,sec-v5.0-rtic-memory", 87 + "fsl,sec-v4.0-rtic-memory"; 88 + reg = <0x00 0x20 0x100 0x80>; 89 + }; 90 + 91 + rtic_b: rtic-b@20 { 92 + compatible = "fsl,sec-v5.2-rtic-memory", 93 + "fsl,sec-v5.0-rtic-memory", 94 + "fsl,sec-v4.0-rtic-memory"; 95 + reg = <0x20 0x20 0x200 0x80>; 96 + }; 97 + 98 + rtic_c: rtic-c@40 { 99 + compatible = "fsl,sec-v5.2-rtic-memory", 100 + "fsl,sec-v5.0-rtic-memory", 101 + "fsl,sec-v4.0-rtic-memory"; 102 + reg = <0x40 0x20 0x300 0x80>; 103 + }; 104 + 105 + rtic_d: rtic-d@60 { 106 + compatible = "fsl,sec-v5.2-rtic-memory", 107 + "fsl,sec-v5.0-rtic-memory", 108 + "fsl,sec-v4.0-rtic-memory"; 109 + reg = <0x60 0x20 0x500 0x80>; 110 + }; 111 + }; 112 + }; 113 + 114 + sec_mon: sec_mon@314000 { 115 + compatible = "fsl,sec-v5.2-mon", "fsl,sec-v5.0-mon", "fsl,sec-v4.0-mon"; 116 + reg = <0x314000 0x1000>; 117 + interrupts = <93 2 0 0>; 118 + };
+4
arch/powerpc/boot/dts/mpc8536ds.dtsi
··· 132 132 reg = <0x68>; 133 133 interrupts = <0 0x1 0 0>; 134 134 }; 135 + adt7461@4c { 136 + compatible = "adi,adt7461"; 137 + reg = <0x4c>; 138 + }; 135 139 }; 136 140 137 141 spi@7000 {
+2
arch/powerpc/boot/dts/mpc8540ads.dts
··· 11 11 12 12 /dts-v1/; 13 13 14 + /include/ "fsl/e500v2_power_isa.dtsi" 15 + 14 16 / { 15 17 model = "MPC8540ADS"; 16 18 compatible = "MPC8540ADS", "MPC85xxADS";
+2
arch/powerpc/boot/dts/mpc8541cds.dts
··· 11 11 12 12 /dts-v1/; 13 13 14 + /include/ "fsl/e500v2_power_isa.dtsi" 15 + 14 16 / { 15 17 model = "MPC8541CDS"; 16 18 compatible = "MPC8541CDS", "MPC85xxCDS";
+3 -1
arch/powerpc/boot/dts/mpc8544ds.dts
··· 20 20 reg = <0 0 0 0>; // Filled by U-Boot 21 21 }; 22 22 23 - lbc: localbus@e0005000 { 23 + board_lbc: lbc: localbus@e0005000 { 24 24 reg = <0 0xe0005000 0 0x1000>; 25 + 26 + ranges = <0x0 0x0 0x0 0xff800000 0x800000>; 25 27 }; 26 28 27 29 board_soc: soc: soc8544@e0000000 {
+39
arch/powerpc/boot/dts/mpc8544ds.dtsi
··· 32 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 33 */ 34 34 35 + &board_lbc { 36 + nor@0,0 { 37 + #address-cells = <1>; 38 + #size-cells = <1>; 39 + compatible = "cfi-flash"; 40 + reg = <0x0 0x0 0x800000>; 41 + bank-width = <2>; 42 + device-width = <1>; 43 + 44 + partition@0 { 45 + reg = <0x0 0x10000>; 46 + label = "dtb-nor"; 47 + }; 48 + 49 + partition@20000 { 50 + reg = <0x20000 0x30000>; 51 + label = "diagnostic-nor"; 52 + read-only; 53 + }; 54 + 55 + partition@200000 { 56 + reg = <0x200000 0x200000>; 57 + label = "dink-nor"; 58 + read-only; 59 + }; 60 + 61 + partition@400000 { 62 + reg = <0x400000 0x380000>; 63 + label = "kernel-nor"; 64 + }; 65 + 66 + partition@780000 { 67 + reg = <0x780000 0x80000>; 68 + label = "u-boot-nor"; 69 + read-only; 70 + }; 71 + }; 72 + }; 73 + 35 74 &board_soc { 36 75 enet0: ethernet@24000 { 37 76 phy-handle = <&phy0>;
+2
arch/powerpc/boot/dts/mpc8555cds.dts
··· 11 11 12 12 /dts-v1/; 13 13 14 + /include/ "fsl/e500v2_power_isa.dtsi" 15 + 14 16 / { 15 17 model = "MPC8555CDS"; 16 18 compatible = "MPC8555CDS", "MPC85xxCDS";
+2
arch/powerpc/boot/dts/mpc8560ads.dts
··· 11 11 12 12 /dts-v1/; 13 13 14 + /include/ "fsl/e500v2_power_isa.dtsi" 15 + 14 16 / { 15 17 model = "MPC8560ADS"; 16 18 compatible = "MPC8560ADS", "MPC85xxADS";
-63
arch/powerpc/boot/dts/p1020rdb_camp_core0.dts
··· 1 - /* 2 - * P1020 RDB Core0 Device Tree Source in CAMP mode. 3 - * 4 - * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache 5 - * can be shared, all the other devices must be assigned to one core only. 6 - * This dts file allows core0 to have memory, l2, i2c, spi, gpio, tdm, dma, usb, 7 - * eth1, eth2, sdhc, crypto, global-util, message, pci0, pci1, msi. 8 - * 9 - * Please note to add "-b 0" for core0's dts compiling. 10 - * 11 - * Copyright 2011 Freescale Semiconductor Inc. 12 - * 13 - * This program is free software; you can redistribute it and/or modify it 14 - * under the terms of the GNU General Public License as published by the 15 - * Free Software Foundation; either version 2 of the License, or (at your 16 - * option) any later version. 17 - */ 18 - 19 - /include/ "p1020rdb.dts" 20 - 21 - / { 22 - model = "fsl,P1020RDB"; 23 - compatible = "fsl,P1020RDB", "fsl,MPC85XXRDB-CAMP"; 24 - 25 - aliases { 26 - ethernet1 = &enet1; 27 - ethernet2 = &enet2; 28 - serial0 = &serial0; 29 - pci0 = &pci0; 30 - pci1 = &pci1; 31 - }; 32 - 33 - cpus { 34 - PowerPC,P1020@1 { 35 - status = "disabled"; 36 - }; 37 - }; 38 - 39 - memory { 40 - device_type = "memory"; 41 - }; 42 - 43 - localbus@ffe05000 { 44 - status = "disabled"; 45 - }; 46 - 47 - soc@ffe00000 { 48 - serial1: serial@4600 { 49 - status = "disabled"; 50 - }; 51 - 52 - enet0: ethernet@b0000 { 53 - status = "disabled"; 54 - }; 55 - 56 - mpic: pic@40000 { 57 - protected-sources = < 58 - 42 29 30 34 /* serial1, enet0-queue-group0 */ 59 - 17 18 24 45 /* enet0-queue-group1, crypto */ 60 - >; 61 - }; 62 - }; 63 - };
-141
arch/powerpc/boot/dts/p1020rdb_camp_core1.dts
··· 1 - /* 2 - * P1020 RDB Core1 Device Tree Source in CAMP mode. 3 - * 4 - * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache 5 - * can be shared, all the other devices must be assigned to one core only. 6 - * This dts allows core1 to have l2, eth0, crypto. 7 - * 8 - * Please note to add "-b 1" for core1's dts compiling. 9 - * 10 - * Copyright 2011 Freescale Semiconductor Inc. 11 - * 12 - * This program is free software; you can redistribute it and/or modify it 13 - * under the terms of the GNU General Public License as published by the 14 - * Free Software Foundation; either version 2 of the License, or (at your 15 - * option) any later version. 16 - */ 17 - 18 - /include/ "p1020rdb.dts" 19 - 20 - / { 21 - model = "fsl,P1020RDB"; 22 - compatible = "fsl,P1020RDB", "fsl,MPC85XXRDB-CAMP"; 23 - 24 - aliases { 25 - ethernet0 = &enet0; 26 - serial0 = &serial1; 27 - }; 28 - 29 - cpus { 30 - PowerPC,P1020@0 { 31 - status = "disabled"; 32 - }; 33 - }; 34 - 35 - memory { 36 - device_type = "memory"; 37 - }; 38 - 39 - localbus@ffe05000 { 40 - status = "disabled"; 41 - }; 42 - 43 - soc@ffe00000 { 44 - ecm-law@0 { 45 - status = "disabled"; 46 - }; 47 - 48 - ecm@1000 { 49 - status = "disabled"; 50 - }; 51 - 52 - memory-controller@2000 { 53 - status = "disabled"; 54 - }; 55 - 56 - i2c@3000 { 57 - status = "disabled"; 58 - }; 59 - 60 - i2c@3100 { 61 - status = "disabled"; 62 - }; 63 - 64 - serial0: serial@4500 { 65 - status = "disabled"; 66 - }; 67 - 68 - spi@7000 { 69 - status = "disabled"; 70 - }; 71 - 72 - gpio: gpio-controller@f000 { 73 - status = "disabled"; 74 - }; 75 - 76 - dma@21300 { 77 - status = "disabled"; 78 - }; 79 - 80 - mdio@24000 { 81 - status = "disabled"; 82 - }; 83 - 84 - mdio@25000 { 85 - status = "disabled"; 86 - }; 87 - 88 - enet1: ethernet@b1000 { 89 - status = "disabled"; 90 - }; 91 - 92 - enet2: ethernet@b2000 { 93 - status = "disabled"; 94 - }; 95 - 96 - usb@22000 { 97 - status = "disabled"; 98 - }; 99 - 100 - sdhci@2e000 { 101 - status = "disabled"; 102 - }; 103 - 104 - mpic: pic@40000 { 105 - protected-sources = < 106 - 16 /* ecm, mem, L2, pci0, pci1 */ 107 - 43 42 59 /* i2c, serial0, spi */ 108 - 47 63 62 /* gpio, tdm */ 109 - 20 21 22 23 /* dma */ 110 - 03 02 /* mdio */ 111 - 35 36 40 /* enet1-queue-group0 */ 112 - 51 52 67 /* enet1-queue-group1 */ 113 - 31 32 33 /* enet2-queue-group0 */ 114 - 25 26 27 /* enet2-queue-group1 */ 115 - 28 72 58 /* usb, sdhci, crypto */ 116 - 0xb0 0xb1 0xb2 /* message */ 117 - 0xb3 0xb4 0xb5 118 - 0xb6 0xb7 119 - 0xe0 0xe1 0xe2 /* msi */ 120 - 0xe3 0xe4 0xe5 121 - 0xe6 0xe7 /* sdhci, crypto , pci */ 122 - >; 123 - }; 124 - 125 - msi@41600 { 126 - status = "disabled"; 127 - }; 128 - 129 - global-utilities@e0000 { //global utilities block 130 - status = "disabled"; 131 - }; 132 - }; 133 - 134 - pci0: pcie@ffe09000 { 135 - status = "disabled"; 136 - }; 137 - 138 - pci1: pcie@ffe0a000 { 139 - status = "disabled"; 140 - }; 141 - };
+4
arch/powerpc/boot/dts/p1022ds.dtsi
··· 149 149 compatible = "dallas,ds1339"; 150 150 reg = <0x68>; 151 151 }; 152 + adt7461@4c { 153 + compatible = "adi,adt7461"; 154 + reg = <0x4c>; 155 + }; 152 156 }; 153 157 154 158 spi@7000 {
+188
arch/powerpc/boot/dts/p1022rdk.dts
··· 1 + /* 2 + * P1022 RDK 32-bit Physical Address Map Device Tree Source 3 + * 4 + * Copyright 2012 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 + /include/ "fsl/p1022si-pre.dtsi" 36 + / { 37 + model = "fsl,P1022RDK"; 38 + compatible = "fsl,P1022RDK"; 39 + 40 + memory { 41 + device_type = "memory"; 42 + }; 43 + 44 + board_lbc: lbc: localbus@ffe05000 { 45 + /* The P1022 RDK does not have any localbus devices */ 46 + status = "disabled"; 47 + }; 48 + 49 + board_soc: soc: soc@ffe00000 { 50 + ranges = <0x0 0x0 0xffe00000 0x100000>; 51 + 52 + i2c@3100 { 53 + wm8960:codec@1a { 54 + compatible = "wlf,wm8960"; 55 + reg = <0x1a>; 56 + /* MCLK source is a stand-alone oscillator */ 57 + clock-frequency = <12288000>; 58 + }; 59 + rtc@68 { 60 + compatible = "stm,m41t62"; 61 + reg = <0x68>; 62 + }; 63 + adt7461@4c{ 64 + compatible = "adi,adt7461"; 65 + reg = <0x4c>; 66 + }; 67 + zl6100@21{ 68 + compatible = "isil,zl6100"; 69 + reg = <0x21>; 70 + }; 71 + zl6100@24{ 72 + compatible = "isil,zl6100"; 73 + reg = <0x24>; 74 + }; 75 + zl6100@26{ 76 + compatible = "isil,zl6100"; 77 + reg = <0x26>; 78 + }; 79 + zl6100@29{ 80 + compatible = "isil,zl6100"; 81 + reg = <0x29>; 82 + }; 83 + }; 84 + 85 + spi@7000 { 86 + flash@0 { 87 + #address-cells = <1>; 88 + #size-cells = <1>; 89 + compatible = "spansion,m25p80"; 90 + reg = <0>; 91 + spi-max-frequency = <1000000>; 92 + partition@0 { 93 + label = "full-spi-flash"; 94 + reg = <0x00000000 0x00100000>; 95 + }; 96 + }; 97 + }; 98 + 99 + ssi@15000 { 100 + fsl,mode = "i2s-slave"; 101 + codec-handle = <&wm8960>; 102 + }; 103 + 104 + usb@22000 { 105 + phy_type = "ulpi"; 106 + }; 107 + 108 + usb@23000 { 109 + phy_type = "ulpi"; 110 + }; 111 + 112 + mdio@24000 { 113 + phy0: ethernet-phy@0 { 114 + interrupts = <3 1 0 0>; 115 + reg = <0x1>; 116 + }; 117 + phy1: ethernet-phy@1 { 118 + interrupts = <9 1 0 0>; 119 + reg = <0x2>; 120 + }; 121 + }; 122 + 123 + mdio@25000 { 124 + tbi0: tbi-phy@11 { 125 + reg = <0x11>; 126 + device_type = "tbi-phy"; 127 + }; 128 + }; 129 + 130 + ethernet@b0000 { 131 + phy-handle = <&phy0>; 132 + phy-connection-type = "rgmii-id"; 133 + }; 134 + 135 + ethernet@b1000 { 136 + phy-handle = <&phy1>; 137 + tbi-handle = <&tbi0>; 138 + phy-connection-type = "sgmii"; 139 + }; 140 + }; 141 + 142 + pci0: pcie@ffe09000 { 143 + ranges = <0x2000000 0x0 0xe0000000 0 0xa0000000 0x0 0x20000000 144 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 145 + reg = <0x0 0xffe09000 0 0x1000>; 146 + pcie@0 { 147 + ranges = <0x2000000 0x0 0xe0000000 148 + 0x2000000 0x0 0xe0000000 149 + 0x0 0x20000000 150 + 151 + 0x1000000 0x0 0x0 152 + 0x1000000 0x0 0x0 153 + 0x0 0x100000>; 154 + }; 155 + }; 156 + 157 + pci1: pcie@ffe0a000 { 158 + ranges = <0x2000000 0x0 0xe0000000 0 0xc0000000 0x0 0x20000000 159 + 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; 160 + reg = <0 0xffe0a000 0 0x1000>; 161 + pcie@0 { 162 + ranges = <0x2000000 0x0 0xe0000000 163 + 0x2000000 0x0 0xe0000000 164 + 0x0 0x20000000 165 + 166 + 0x1000000 0x0 0x0 167 + 0x1000000 0x0 0x0 168 + 0x0 0x100000>; 169 + }; 170 + }; 171 + 172 + pci2: pcie@ffe0b000 { 173 + ranges = <0x2000000 0x0 0xe0000000 0 0x80000000 0x0 0x20000000 174 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 175 + reg = <0 0xffe0b000 0 0x1000>; 176 + pcie@0 { 177 + ranges = <0x2000000 0x0 0xe0000000 178 + 0x2000000 0x0 0xe0000000 179 + 0x0 0x20000000 180 + 181 + 0x1000000 0x0 0x0 182 + 0x1000000 0x0 0x0 183 + 0x0 0x100000>; 184 + }; 185 + }; 186 + }; 187 + 188 + /include/ "fsl/p1022si-post.dtsi"
-67
arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
··· 1 - /* 2 - * P2020 RDB Core0 Device Tree Source in CAMP mode. 3 - * 4 - * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache 5 - * can be shared, all the other devices must be assigned to one core only. 6 - * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, 7 - * eth1, eth2, sdhc, crypto, global-util, pci0. 8 - * 9 - * Copyright 2009-2011 Freescale Semiconductor Inc. 10 - * 11 - * This program is free software; you can redistribute it and/or modify it 12 - * under the terms of the GNU General Public License as published by the 13 - * Free Software Foundation; either version 2 of the License, or (at your 14 - * option) any later version. 15 - */ 16 - 17 - /include/ "p2020rdb.dts" 18 - 19 - / { 20 - model = "fsl,P2020RDB"; 21 - compatible = "fsl,P2020RDB", "fsl,MPC85XXRDB-CAMP"; 22 - 23 - cpus { 24 - PowerPC,P2020@1 { 25 - status = "disabled"; 26 - }; 27 - }; 28 - 29 - localbus@ffe05000 { 30 - status = "disabled"; 31 - }; 32 - 33 - soc@ffe00000 { 34 - serial1: serial@4600 { 35 - status = "disabled"; 36 - }; 37 - 38 - dma@c300 { 39 - status = "disabled"; 40 - }; 41 - 42 - enet0: ethernet@24000 { 43 - status = "disabled"; 44 - }; 45 - 46 - mpic: pic@40000 { 47 - protected-sources = < 48 - 42 76 77 78 79 /* serial1 , dma2 */ 49 - 29 30 34 26 /* enet0, pci1 */ 50 - 0xe0 0xe1 0xe2 0xe3 /* msi */ 51 - 0xe4 0xe5 0xe6 0xe7 52 - >; 53 - }; 54 - 55 - msi@41600 { 56 - status = "disabled"; 57 - }; 58 - }; 59 - 60 - pci0: pcie@ffe08000 { 61 - status = "disabled"; 62 - }; 63 - 64 - pci2: pcie@ffe0a000 { 65 - status = "disabled"; 66 - }; 67 - };
-125
arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
··· 1 - /* 2 - * P2020 RDB Core1 Device Tree Source in CAMP mode. 3 - * 4 - * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache 5 - * can be shared, all the other devices must be assigned to one core only. 6 - * This dts allows core1 to have l2, dma2, eth0, pci1, msi. 7 - * 8 - * Please note to add "-b 1" for core1's dts compiling. 9 - * 10 - * Copyright 2009-2011 Freescale Semiconductor Inc. 11 - * 12 - * This program is free software; you can redistribute it and/or modify it 13 - * under the terms of the GNU General Public License as published by the 14 - * Free Software Foundation; either version 2 of the License, or (at your 15 - * option) any later version. 16 - */ 17 - 18 - /include/ "p2020rdb.dts" 19 - 20 - / { 21 - model = "fsl,P2020RDB"; 22 - compatible = "fsl,P2020RDB", "fsl,MPC85XXRDB-CAMP"; 23 - 24 - cpus { 25 - PowerPC,P2020@0 { 26 - status = "disabled"; 27 - }; 28 - }; 29 - 30 - localbus@ffe05000 { 31 - status = "disabled"; 32 - }; 33 - 34 - soc@ffe00000 { 35 - ecm-law@0 { 36 - status = "disabled"; 37 - }; 38 - 39 - ecm@1000 { 40 - status = "disabled"; 41 - }; 42 - 43 - memory-controller@2000 { 44 - status = "disabled"; 45 - }; 46 - 47 - i2c@3000 { 48 - status = "disabled"; 49 - }; 50 - 51 - i2c@3100 { 52 - status = "disabled"; 53 - }; 54 - 55 - serial0: serial@4500 { 56 - status = "disabled"; 57 - }; 58 - 59 - spi@7000 { 60 - status = "disabled"; 61 - }; 62 - 63 - gpio: gpio-controller@f000 { 64 - status = "disabled"; 65 - }; 66 - 67 - dma@21300 { 68 - status = "disabled"; 69 - }; 70 - 71 - usb@22000 { 72 - status = "disabled"; 73 - }; 74 - 75 - mdio@24520 { 76 - status = "disabled"; 77 - }; 78 - 79 - mdio@25520 { 80 - status = "disabled"; 81 - }; 82 - 83 - mdio@26520 { 84 - status = "disabled"; 85 - }; 86 - 87 - enet1: ethernet@25000 { 88 - status = "disabled"; 89 - }; 90 - 91 - enet2: ethernet@26000 { 92 - status = "disabled"; 93 - }; 94 - 95 - sdhci@2e000 { 96 - status = "disabled"; 97 - }; 98 - 99 - crypto@30000 { 100 - status = "disabled"; 101 - }; 102 - 103 - mpic: pic@40000 { 104 - protected-sources = < 105 - 17 18 43 42 59 47 /*ecm, mem, i2c, serial0, spi,gpio */ 106 - 16 20 21 22 23 28 /* L2, dma1, USB */ 107 - 03 35 36 40 31 32 33 /* mdio, enet1, enet2 */ 108 - 72 45 58 25 /* sdhci, crypto , pci */ 109 - >; 110 - }; 111 - 112 - global-utilities@e0000 { //global utilities block 113 - status = "disabled"; 114 - }; 115 - 116 - }; 117 - 118 - pci0: pcie@ffe08000 { 119 - status = "disabled"; 120 - }; 121 - 122 - pci1: pcie@ffe09000 { 123 - status = "disabled"; 124 - }; 125 - };
+4
arch/powerpc/boot/dts/p2041rdb.dts
··· 94 94 compatible = "pericom,pt7c4338"; 95 95 reg = <0x68>; 96 96 }; 97 + adt7461@4c { 98 + compatible = "adi,adt7461"; 99 + reg = <0x4c>; 100 + }; 97 101 }; 98 102 99 103 i2c@118100 {
+4
arch/powerpc/boot/dts/p3041ds.dts
··· 98 98 reg = <0x68>; 99 99 interrupts = <0x1 0x1 0 0>; 100 100 }; 101 + adt7461@4c { 102 + compatible = "adi,adt7461"; 103 + reg = <0x4c>; 104 + }; 101 105 }; 102 106 }; 103 107
+4
arch/powerpc/boot/dts/p4080ds.dts
··· 96 96 reg = <0x68>; 97 97 interrupts = <0x1 0x1 0 0>; 98 98 }; 99 + adt7461@4c { 100 + compatible = "adi,adt7461"; 101 + reg = <0x4c>; 102 + }; 99 103 }; 100 104 101 105 usb0: usb@210000 {
+4
arch/powerpc/boot/dts/p5020ds.dts
··· 98 98 reg = <0x68>; 99 99 interrupts = <0x1 0x1 0 0>; 100 100 }; 101 + adt7461@4c { 102 + compatible = "adi,adt7461"; 103 + reg = <0x4c>; 104 + }; 101 105 }; 102 106 }; 103 107
+207
arch/powerpc/boot/dts/p5040ds.dts
··· 1 + /* 2 + * P5040DS Device Tree Source 3 + * 4 + * Copyright 2012 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 + /include/ "fsl/p5040si-pre.dtsi" 36 + 37 + / { 38 + model = "fsl,P5040DS"; 39 + compatible = "fsl,P5040DS"; 40 + #address-cells = <2>; 41 + #size-cells = <2>; 42 + interrupt-parent = <&mpic>; 43 + 44 + memory { 45 + device_type = "memory"; 46 + }; 47 + 48 + dcsr: dcsr@f00000000 { 49 + ranges = <0x00000000 0xf 0x00000000 0x01008000>; 50 + }; 51 + 52 + soc: soc@ffe000000 { 53 + ranges = <0x00000000 0xf 0xfe000000 0x1000000>; 54 + reg = <0xf 0xfe000000 0 0x00001000>; 55 + spi@110000 { 56 + flash@0 { 57 + #address-cells = <1>; 58 + #size-cells = <1>; 59 + compatible = "spansion,s25sl12801"; 60 + reg = <0>; 61 + spi-max-frequency = <40000000>; /* input clock */ 62 + partition@u-boot { 63 + label = "u-boot"; 64 + reg = <0x00000000 0x00100000>; 65 + }; 66 + partition@kernel { 67 + label = "kernel"; 68 + reg = <0x00100000 0x00500000>; 69 + }; 70 + partition@dtb { 71 + label = "dtb"; 72 + reg = <0x00600000 0x00100000>; 73 + }; 74 + partition@fs { 75 + label = "file system"; 76 + reg = <0x00700000 0x00900000>; 77 + }; 78 + }; 79 + }; 80 + 81 + i2c@118100 { 82 + eeprom@51 { 83 + compatible = "at24,24c256"; 84 + reg = <0x51>; 85 + }; 86 + eeprom@52 { 87 + compatible = "at24,24c256"; 88 + reg = <0x52>; 89 + }; 90 + }; 91 + 92 + i2c@119100 { 93 + rtc@68 { 94 + compatible = "dallas,ds3232"; 95 + reg = <0x68>; 96 + interrupts = <0x1 0x1 0 0>; 97 + }; 98 + adt7461@4c { 99 + compatible = "adi,adt7461"; 100 + reg = <0x4c>; 101 + }; 102 + }; 103 + }; 104 + 105 + lbc: localbus@ffe124000 { 106 + reg = <0xf 0xfe124000 0 0x1000>; 107 + ranges = <0 0 0xf 0xe8000000 0x08000000 108 + 2 0 0xf 0xffa00000 0x00040000 109 + 3 0 0xf 0xffdf0000 0x00008000>; 110 + 111 + flash@0,0 { 112 + compatible = "cfi-flash"; 113 + reg = <0 0 0x08000000>; 114 + bank-width = <2>; 115 + device-width = <2>; 116 + }; 117 + 118 + nand@2,0 { 119 + #address-cells = <1>; 120 + #size-cells = <1>; 121 + compatible = "fsl,elbc-fcm-nand"; 122 + reg = <0x2 0x0 0x40000>; 123 + 124 + partition@0 { 125 + label = "NAND U-Boot Image"; 126 + reg = <0x0 0x02000000>; 127 + }; 128 + 129 + partition@2000000 { 130 + label = "NAND Root File System"; 131 + reg = <0x02000000 0x10000000>; 132 + }; 133 + 134 + partition@12000000 { 135 + label = "NAND Compressed RFS Image"; 136 + reg = <0x12000000 0x08000000>; 137 + }; 138 + 139 + partition@1a000000 { 140 + label = "NAND Linux Kernel Image"; 141 + reg = <0x1a000000 0x04000000>; 142 + }; 143 + 144 + partition@1e000000 { 145 + label = "NAND DTB Image"; 146 + reg = <0x1e000000 0x01000000>; 147 + }; 148 + 149 + partition@1f000000 { 150 + label = "NAND Writable User area"; 151 + reg = <0x1f000000 0x01000000>; 152 + }; 153 + }; 154 + 155 + board-control@3,0 { 156 + compatible = "fsl,p5040ds-fpga", "fsl,fpga-ngpixis"; 157 + reg = <3 0 0x40>; 158 + }; 159 + }; 160 + 161 + pci0: pcie@ffe200000 { 162 + reg = <0xf 0xfe200000 0 0x1000>; 163 + ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000 164 + 0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>; 165 + pcie@0 { 166 + ranges = <0x02000000 0 0xe0000000 167 + 0x02000000 0 0xe0000000 168 + 0 0x20000000 169 + 170 + 0x01000000 0 0x00000000 171 + 0x01000000 0 0x00000000 172 + 0 0x00010000>; 173 + }; 174 + }; 175 + 176 + pci1: pcie@ffe201000 { 177 + reg = <0xf 0xfe201000 0 0x1000>; 178 + ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000 179 + 0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>; 180 + pcie@0 { 181 + ranges = <0x02000000 0 0xe0000000 182 + 0x02000000 0 0xe0000000 183 + 0 0x20000000 184 + 185 + 0x01000000 0 0x00000000 186 + 0x01000000 0 0x00000000 187 + 0 0x00010000>; 188 + }; 189 + }; 190 + 191 + pci2: pcie@ffe202000 { 192 + reg = <0xf 0xfe202000 0 0x1000>; 193 + ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000 194 + 0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>; 195 + pcie@0 { 196 + ranges = <0x02000000 0 0xe0000000 197 + 0x02000000 0 0xe0000000 198 + 0 0x20000000 199 + 200 + 0x01000000 0 0x00000000 201 + 0x01000000 0 0x00000000 202 + 0 0x00010000>; 203 + }; 204 + }; 205 + }; 206 + 207 + /include/ "fsl/p5040si-post.dtsi"
+1
arch/powerpc/configs/corenet32_smp_defconfig
··· 27 27 CONFIG_P3041_DS=y 28 28 CONFIG_P4080_DS=y 29 29 CONFIG_P5020_DS=y 30 + CONFIG_P5040_DS=y 30 31 CONFIG_HIGHMEM=y 31 32 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 32 33 CONFIG_BINFMT_MISC=m
+1
arch/powerpc/configs/corenet64_smp_defconfig
··· 23 23 CONFIG_PARTITION_ADVANCED=y 24 24 CONFIG_MAC_PARTITION=y 25 25 CONFIG_P5020_DS=y 26 + CONFIG_P5040_DS=y 26 27 # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set 27 28 CONFIG_BINFMT_MISC=m 28 29 CONFIG_IRQ_ALL_CPUS=y
+1
arch/powerpc/configs/mpc85xx_defconfig
··· 30 30 CONFIG_MPC85xx_RDB=y 31 31 CONFIG_P1010_RDB=y 32 32 CONFIG_P1022_DS=y 33 + CONFIG_P1022_RDK=y 33 34 CONFIG_P1023_RDS=y 34 35 CONFIG_SOCRATES=y 35 36 CONFIG_KSI8560=y
+1
arch/powerpc/configs/mpc85xx_smp_defconfig
··· 32 32 CONFIG_MPC85xx_RDB=y 33 33 CONFIG_P1010_RDB=y 34 34 CONFIG_P1022_DS=y 35 + CONFIG_P1022_RDK=y 35 36 CONFIG_P1023_RDS=y 36 37 CONFIG_SOCRATES=y 37 38 CONFIG_KSI8560=y
+2
arch/powerpc/include/asm/cacheflush.h
··· 30 30 #define flush_dcache_mmap_lock(mapping) do { } while (0) 31 31 #define flush_dcache_mmap_unlock(mapping) do { } while (0) 32 32 33 + extern void __flush_disable_L1(void); 34 + 33 35 extern void __flush_icache_range(unsigned long, unsigned long); 34 36 static inline void flush_icache_range(unsigned long start, unsigned long stop) 35 37 {
+2
arch/powerpc/include/asm/fsl_guts.h
··· 48 48 __be32 dmuxcr; /* 0x.0068 - DMA Mux Control Register */ 49 49 u8 res06c[0x70 - 0x6c]; 50 50 __be32 devdisr; /* 0x.0070 - Device Disable Control */ 51 + #define CCSR_GUTS_DEVDISR_TB1 0x00001000 52 + #define CCSR_GUTS_DEVDISR_TB0 0x00004000 51 53 __be32 devdisr2; /* 0x.0074 - Device Disable Control 2 */ 52 54 u8 res078[0x7c - 0x78]; 53 55 __be32 pmjcr; /* 0x.007c - 4 Power Management Jog Control Register */
+8 -6
arch/powerpc/include/asm/fsl_ifc.h
··· 768 768 */ 769 769 struct fsl_ifc_regs { 770 770 __be32 ifc_rev; 771 - u32 res1[0x3]; 771 + u32 res1[0x2]; 772 772 struct { 773 + __be32 cspr_ext; 773 774 __be32 cspr; 774 - u32 res2[0x2]; 775 + u32 res2; 775 776 } cspr_cs[FSL_IFC_BANK_COUNT]; 776 - u32 res3[0x18]; 777 + u32 res3[0x19]; 777 778 struct { 778 779 __be32 amask; 779 780 u32 res4[0x2]; 780 781 } amask_cs[FSL_IFC_BANK_COUNT]; 781 - u32 res5[0x18]; 782 + u32 res5[0x17]; 782 783 struct { 784 + __be32 csor_ext; 783 785 __be32 csor; 784 - u32 res6[0x2]; 786 + u32 res6; 785 787 } csor_cs[FSL_IFC_BANK_COUNT]; 786 - u32 res7[0x18]; 788 + u32 res7[0x19]; 787 789 struct { 788 790 __be32 ftim[4]; 789 791 u32 res8[0x8];
+19
arch/powerpc/include/asm/mpic.h
··· 63 63 */ 64 64 #define MPIC_TIMER_BASE 0x01100 65 65 #define MPIC_TIMER_STRIDE 0x40 66 + #define MPIC_TIMER_GROUP_STRIDE 0x1000 66 67 67 68 #define MPIC_TIMER_CURRENT_CNT 0x00000 68 69 #define MPIC_TIMER_BASE_CNT 0x00010 ··· 111 110 #define MPIC_VECPRI_SENSE_MASK 0x00400000 112 111 #define MPIC_IRQ_DESTINATION 0x00010 113 112 113 + #define MPIC_FSL_BRR1 0x00000 114 + #define MPIC_FSL_BRR1_VER 0x0000ffff 115 + 114 116 #define MPIC_MAX_IRQ_SOURCES 2048 115 117 #define MPIC_MAX_CPUS 32 116 118 #define MPIC_MAX_ISU 32 119 + 120 + #define MPIC_MAX_ERR 32 121 + #define MPIC_FSL_ERR_INT 16 117 122 118 123 /* 119 124 * Tsi108 implementation of MPIC has many differences from the original one ··· 273 266 struct irq_chip hc_ipi; 274 267 #endif 275 268 struct irq_chip hc_tm; 269 + struct irq_chip hc_err; 276 270 const char *name; 277 271 /* Flags */ 278 272 unsigned int flags; ··· 287 279 /* vector numbers used for internal sources (ipi/timers) */ 288 280 unsigned int ipi_vecs[4]; 289 281 unsigned int timer_vecs[8]; 282 + /* vector numbers used for FSL MPIC error interrupts */ 283 + unsigned int err_int_vecs[MPIC_MAX_ERR]; 290 284 291 285 /* Spurious vector to program into unused sources */ 292 286 unsigned int spurious_vec; ··· 306 296 phys_addr_t paddr; 307 297 308 298 /* The various ioremap'ed bases */ 299 + struct mpic_reg_bank thiscpuregs; 309 300 struct mpic_reg_bank gregs; 310 301 struct mpic_reg_bank tmregs; 311 302 struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS]; 312 303 struct mpic_reg_bank isus[MPIC_MAX_ISU]; 304 + 305 + /* ioremap'ed base for error interrupt registers */ 306 + u32 __iomem *err_regs; 313 307 314 308 /* Protected sources */ 315 309 unsigned long *protected; ··· 379 365 #define MPIC_NO_RESET 0x00004000 380 366 /* Freescale MPIC (compatible includes "fsl,mpic") */ 381 367 #define MPIC_FSL 0x00008000 368 + /* Freescale MPIC supports EIMR (error interrupt mask register). 369 + * This flag is set for MPIC version >= 4.1 (version determined 370 + * from the BRR1 register). 371 + */ 372 + #define MPIC_FSL_HAS_EIMR 0x00010000 382 373 383 374 /* MPIC HW modification ID */ 384 375 #define MPIC_REGSET_MASK 0xf0000000
+2
arch/powerpc/include/asm/smp.h
··· 65 65 void generic_cpu_die(unsigned int cpu); 66 66 void generic_mach_cpu_die(void); 67 67 void generic_set_cpu_dead(unsigned int cpu); 68 + void generic_set_cpu_up(unsigned int cpu); 68 69 int generic_check_cpu_restart(unsigned int cpu); 69 70 #endif 70 71 ··· 191 190 extern unsigned long __secondary_hold_acknowledge; 192 191 extern char __secondary_hold; 193 192 193 + extern void __early_start(void); 194 194 #endif /* __ASSEMBLY__ */ 195 195 196 196 #endif /* __KERNEL__ */
+6
arch/powerpc/include/asm/swiotlb.h
··· 22 22 23 23 extern void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev); 24 24 25 + #ifdef CONFIG_SWIOTLB 26 + void swiotlb_detect_4g(void); 27 + #else 28 + static inline void swiotlb_detect_4g(void) {} 29 + #endif 30 + 25 31 #endif /* __ASM_SWIOTLB_H */
+65 -9
arch/powerpc/kernel/cpu_setup_fsl_booke.S
··· 16 16 #include <asm/processor.h> 17 17 #include <asm/cputable.h> 18 18 #include <asm/ppc_asm.h> 19 + #include <asm/mmu-book3e.h> 20 + #include <asm/asm-offsets.h> 19 21 20 22 _GLOBAL(__e500_icache_setup) 21 23 mfspr r0, SPRN_L1CSR1 ··· 75 73 mtlr r4 76 74 blr 77 75 _GLOBAL(__setup_cpu_e500mc) 78 - mr r5, r4 79 - mflr r4 76 + _GLOBAL(__setup_cpu_e5500) 77 + mflr r5 80 78 bl __e500_icache_setup 81 79 bl __e500_dcache_setup 82 80 bl __setup_e500mc_ivors 83 - mtlr r4 81 + /* 82 + * We only want to touch IVOR38-41 if we're running on hardware 83 + * that supports category E.HV. The architectural way to determine 84 + * this is MMUCFG[LPIDSIZE]. 85 + */ 86 + mfspr r3, SPRN_MMUCFG 87 + rlwinm. r3, r3, 0, MMUCFG_LPIDSIZE 88 + beq 1f 89 + bl __setup_ehv_ivors 90 + b 2f 91 + 1: 92 + lwz r3, CPU_SPEC_FEATURES(r4) 93 + /* We need this check as cpu_setup is also called for 94 + * the secondary cores. So, if we have already cleared 95 + * the feature on the primary core, avoid doing it on the 96 + * secondary core. 97 + */ 98 + andis. r6, r3, CPU_FTR_EMB_HV@h 99 + beq 2f 100 + rlwinm r3, r3, 0, ~CPU_FTR_EMB_HV 101 + stw r3, CPU_SPEC_FEATURES(r4) 102 + 2: 103 + mtlr r5 84 104 blr 85 105 #endif 86 - /* Right now, restore and setup are the same thing */ 106 + 107 + #ifdef CONFIG_PPC_BOOK3E_64 87 108 _GLOBAL(__restore_cpu_e5500) 88 - _GLOBAL(__setup_cpu_e5500) 89 109 mflr r4 90 110 bl __e500_icache_setup 91 111 bl __e500_dcache_setup 92 - #ifdef CONFIG_PPC_BOOK3E_64 93 112 bl .__setup_base_ivors 94 113 bl .setup_perfmon_ivor 95 114 bl .setup_doorbell_ivors 115 + /* 116 + * We only want to touch IVOR38-41 if we're running on hardware 117 + * that supports category E.HV. The architectural way to determine 118 + * this is MMUCFG[LPIDSIZE]. 119 + */ 120 + mfspr r10,SPRN_MMUCFG 121 + rlwinm. r10,r10,0,MMUCFG_LPIDSIZE 122 + beq 1f 96 123 bl .setup_ehv_ivors 97 - #else 98 - bl __setup_e500mc_ivors 99 - #endif 124 + 1: 100 125 mtlr r4 101 126 blr 127 + 128 + _GLOBAL(__setup_cpu_e5500) 129 + mflr r5 130 + bl __e500_icache_setup 131 + bl __e500_dcache_setup 132 + bl .__setup_base_ivors 133 + bl .setup_perfmon_ivor 134 + bl .setup_doorbell_ivors 135 + /* 136 + * We only want to touch IVOR38-41 if we're running on hardware 137 + * that supports category E.HV. The architectural way to determine 138 + * this is MMUCFG[LPIDSIZE]. 139 + */ 140 + mfspr r10,SPRN_MMUCFG 141 + rlwinm. r10,r10,0,MMUCFG_LPIDSIZE 142 + beq 1f 143 + bl .setup_ehv_ivors 144 + b 2f 145 + 1: 146 + ld r10,CPU_SPEC_FEATURES(r4) 147 + LOAD_REG_IMMEDIATE(r9,CPU_FTR_EMB_HV) 148 + andc r10,r10,r9 149 + std r10,CPU_SPEC_FEATURES(r4) 150 + 2: 151 + mtlr r5 152 + blr 153 + #endif
+4
arch/powerpc/kernel/cputable.c
··· 2016 2016 .oprofile_cpu_type = "ppc/e500mc", 2017 2017 .oprofile_type = PPC_OPROFILE_FSL_EMB, 2018 2018 .cpu_setup = __setup_cpu_e5500, 2019 + #ifndef CONFIG_PPC32 2019 2020 .cpu_restore = __restore_cpu_e5500, 2021 + #endif 2020 2022 .machine_check = machine_check_e500mc, 2021 2023 .platform = "ppce5500", 2022 2024 }, ··· 2036 2034 .oprofile_cpu_type = "ppc/e6500", 2037 2035 .oprofile_type = PPC_OPROFILE_FSL_EMB, 2038 2036 .cpu_setup = __setup_cpu_e5500, 2037 + #ifndef CONFIG_PPC32 2039 2038 .cpu_restore = __restore_cpu_e5500, 2039 + #endif 2040 2040 .machine_check = machine_check_e500mc, 2041 2041 .platform = "ppce6500", 2042 2042 },
+20
arch/powerpc/kernel/dma-swiotlb.c
··· 105 105 &ppc_swiotlb_plat_bus_notifier); 106 106 return 0; 107 107 } 108 + 109 + void swiotlb_detect_4g(void) 110 + { 111 + if ((memblock_end_of_DRAM() - 1) > 0xffffffff) 112 + ppc_swiotlb_enable = 1; 113 + } 114 + 115 + static int __init swiotlb_late_init(void) 116 + { 117 + if (ppc_swiotlb_enable) { 118 + swiotlb_print_info(); 119 + set_pci_dma_ops(&swiotlb_dma_ops); 120 + ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 121 + } else { 122 + swiotlb_free(); 123 + } 124 + 125 + return 0; 126 + } 127 + subsys_initcall(swiotlb_late_init);
+2 -16
arch/powerpc/kernel/exceptions-64e.S
··· 1356 1356 _GLOBAL(setup_doorbell_ivors) 1357 1357 SET_IVOR(36, 0x280) /* Processor Doorbell */ 1358 1358 SET_IVOR(37, 0x2a0) /* Processor Doorbell Crit */ 1359 - 1360 - /* Check MMUCFG[LPIDSIZE] to determine if we have category E.HV */ 1361 - mfspr r10,SPRN_MMUCFG 1362 - rlwinm. r10,r10,0,MMUCFG_LPIDSIZE 1363 - beqlr 1364 - 1365 - SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */ 1366 - SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */ 1367 1359 blr 1368 1360 1369 1361 _GLOBAL(setup_ehv_ivors) 1370 - /* 1371 - * We may be running as a guest and lack E.HV even on a chip 1372 - * that normally has it. 1373 - */ 1374 - mfspr r10,SPRN_MMUCFG 1375 - rlwinm. r10,r10,0,MMUCFG_LPIDSIZE 1376 - beqlr 1377 - 1378 1362 SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */ 1379 1363 SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */ 1364 + SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */ 1365 + SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */ 1380 1366 blr
+32 -14
arch/powerpc/kernel/head_fsl_booke.S
··· 895 895 mtspr SPRN_IVOR36,r3 896 896 li r3,CriticalDoorbell@l 897 897 mtspr SPRN_IVOR37,r3 898 + sync 899 + blr 898 900 899 - /* 900 - * We only want to touch IVOR38-41 if we're running on hardware 901 - * that supports category E.HV. The architectural way to determine 902 - * this is MMUCFG[LPIDSIZE]. 903 - */ 904 - mfspr r3, SPRN_MMUCFG 905 - andis. r3, r3, MMUCFG_LPIDSIZE@h 906 - beq no_hv 901 + /* setup ehv ivors for */ 902 + _GLOBAL(__setup_ehv_ivors) 907 903 li r3,GuestDoorbell@l 908 904 mtspr SPRN_IVOR38,r3 909 905 li r3,CriticalGuestDoorbell@l ··· 908 912 mtspr SPRN_IVOR40,r3 909 913 li r3,Ehvpriv@l 910 914 mtspr SPRN_IVOR41,r3 911 - skip_hv_ivors: 912 915 sync 913 916 blr 914 - no_hv: 915 - lwz r3, CPU_SPEC_FEATURES(r5) 916 - rlwinm r3, r3, 0, ~CPU_FTR_EMB_HV 917 - stw r3, CPU_SPEC_FEATURES(r5) 918 - b skip_hv_ivors 919 917 920 918 #ifdef CONFIG_SPE 921 919 /* ··· 1029 1039 1030 1040 /* restore HID0 */ 1031 1041 mtspr SPRN_HID0,r8 1042 + isync 1043 + 1044 + blr 1045 + 1046 + /* Flush L1 d-cache, invalidate and disable d-cache and i-cache */ 1047 + _GLOBAL(__flush_disable_L1) 1048 + mflr r10 1049 + bl flush_dcache_L1 /* Flush L1 d-cache */ 1050 + mtlr r10 1051 + 1052 + mfspr r4, SPRN_L1CSR0 /* Invalidate and disable d-cache */ 1053 + li r5, 2 1054 + rlwimi r4, r5, 0, 3 1055 + 1056 + msync 1057 + isync 1058 + mtspr SPRN_L1CSR0, r4 1059 + isync 1060 + 1061 + 1: mfspr r4, SPRN_L1CSR0 /* Wait for the invalidate to finish */ 1062 + andi. r4, r4, 2 1063 + bne 1b 1064 + 1065 + mfspr r4, SPRN_L1CSR1 /* Invalidate and disable i-cache */ 1066 + li r5, 2 1067 + rlwimi r4, r5, 0, 3 1068 + 1069 + mtspr SPRN_L1CSR1, r4 1032 1070 isync 1033 1071 1034 1072 blr
+11 -1
arch/powerpc/kernel/smp.c
··· 102 102 * Ok it's not there, so it might be soft-unplugged, let's 103 103 * try to bring it back 104 104 */ 105 - per_cpu(cpu_state, nr) = CPU_UP_PREPARE; 105 + generic_set_cpu_up(nr); 106 106 smp_wmb(); 107 107 smp_send_reschedule(nr); 108 108 #endif /* CONFIG_HOTPLUG_CPU */ ··· 411 411 void generic_set_cpu_dead(unsigned int cpu) 412 412 { 413 413 per_cpu(cpu_state, cpu) = CPU_DEAD; 414 + } 415 + 416 + /* 417 + * The cpu_state should be set to CPU_UP_PREPARE in kick_cpu(), otherwise 418 + * the cpu_state is always CPU_DEAD after calling generic_set_cpu_dead(), 419 + * which makes the delay in generic_cpu_die() not happen. 420 + */ 421 + void generic_set_cpu_up(unsigned int cpu) 422 + { 423 + per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; 414 424 } 415 425 416 426 int generic_check_cpu_restart(unsigned int cpu)
+1 -2
arch/powerpc/mm/mem.c
··· 300 300 unsigned long reservedpages = 0, codesize, initsize, datasize, bsssize; 301 301 302 302 #ifdef CONFIG_SWIOTLB 303 - if (ppc_swiotlb_enable) 304 - swiotlb_init(1); 303 + swiotlb_init(0); 305 304 #endif 306 305 307 306 num_physpages = memblock_phys_mem_size() >> PAGE_SHIFT;
+2 -8
arch/powerpc/platforms/44x/currituck.c
··· 21 21 */ 22 22 23 23 #include <linux/init.h> 24 - #include <linux/memblock.h> 25 24 #include <linux/of.h> 26 25 #include <linux/of_platform.h> 27 26 #include <linux/rtc.h> ··· 158 159 159 160 /* No need to check the DMA config as we /know/ our windows are all of 160 161 * RAM. Lets hope that doesn't change */ 161 - #ifdef CONFIG_SWIOTLB 162 - if ((memblock_end_of_DRAM() - 1) > 0xffffffff) { 163 - ppc_swiotlb_enable = 1; 164 - set_pci_dma_ops(&swiotlb_dma_ops); 165 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 166 - } 167 - #endif 162 + swiotlb_detect_4g(); 163 + 168 164 ppc47x_smp_init(); 169 165 } 170 166
+21
arch/powerpc/platforms/85xx/Kconfig
··· 104 104 help 105 105 This option enables support for the Freescale P1022DS reference board. 106 106 107 + config P1022_RDK 108 + bool "Freescale / iVeia P1022 RDK" 109 + select DEFAULT_UIMAGE 110 + help 111 + This option enables support for the Freescale / iVeia P1022RDK 112 + reference board. 113 + 107 114 config P1023_RDS 108 115 bool "Freescale P1023 RDS" 109 116 select DEFAULT_UIMAGE ··· 260 253 select PPC_EPAPR_HV_PIC 261 254 help 262 255 This option enables support for the P5020 DS board 256 + 257 + config P5040_DS 258 + bool "Freescale P5040 DS" 259 + select DEFAULT_UIMAGE 260 + select E500 261 + select PPC_E500MC 262 + select PHYS_64BIT 263 + select SWIOTLB 264 + select ARCH_REQUIRE_GPIOLIB 265 + select GPIO_MPC8XXX 266 + select HAS_RAPIDIO 267 + select PPC_EPAPR_HV_PIC 268 + help 269 + This option enables support for the P5040 DS board 263 270 264 271 config PPC_QEMU_E500 265 272 bool "QEMU generic e500 platform"
+2
arch/powerpc/platforms/85xx/Makefile
··· 15 15 obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o 16 16 obj-$(CONFIG_P1010_RDB) += p1010rdb.o 17 17 obj-$(CONFIG_P1022_DS) += p1022_ds.o 18 + obj-$(CONFIG_P1022_RDK) += p1022_rdk.o 18 19 obj-$(CONFIG_P1023_RDS) += p1023_rds.o 19 20 obj-$(CONFIG_P2041_RDB) += p2041_rdb.o corenet_ds.o 20 21 obj-$(CONFIG_P3041_DS) += p3041_ds.o corenet_ds.o 21 22 obj-$(CONFIG_P4080_DS) += p4080_ds.o corenet_ds.o 22 23 obj-$(CONFIG_P5020_DS) += p5020_ds.o corenet_ds.o 24 + obj-$(CONFIG_P5040_DS) += p5040_ds.o corenet_ds.o 23 25 obj-$(CONFIG_STX_GP3) += stx_gp3.o 24 26 obj-$(CONFIG_TQM85xx) += tqm85xx.o 25 27 obj-$(CONFIG_SBC8548) += sbc8548.o
+10
arch/powerpc/platforms/85xx/common.c
··· 27 27 { .compatible = "fsl,mpc8548-guts", }, 28 28 /* Probably unnecessary? */ 29 29 { .compatible = "gpio-leds", }, 30 + /* For all PCI controllers */ 31 + { .compatible = "fsl,mpc8540-pci", }, 32 + { .compatible = "fsl,mpc8548-pcie", }, 33 + { .compatible = "fsl,p1022-pcie", }, 34 + { .compatible = "fsl,p1010-pcie", }, 35 + { .compatible = "fsl,p1023-pcie", }, 36 + { .compatible = "fsl,p4080-pcie", }, 37 + { .compatible = "fsl,qoriq-pcie-v2.4", }, 38 + { .compatible = "fsl,qoriq-pcie-v2.3", }, 39 + { .compatible = "fsl,qoriq-pcie-v2.2", }, 30 40 {}, 31 41 }; 32 42
+11 -27
arch/powerpc/platforms/85xx/corenet_ds.c
··· 16 16 #include <linux/kdev_t.h> 17 17 #include <linux/delay.h> 18 18 #include <linux/interrupt.h> 19 - #include <linux/memblock.h> 20 19 21 20 #include <asm/time.h> 22 21 #include <asm/machdep.h> ··· 51 52 */ 52 53 void __init corenet_ds_setup_arch(void) 53 54 { 54 - #ifdef CONFIG_PCI 55 - struct device_node *np; 56 - struct pci_controller *hose; 57 - #endif 58 - dma_addr_t max = 0xffffffff; 59 - 60 55 mpc85xx_smp_init(); 61 56 62 - #ifdef CONFIG_PCI 63 - for_each_node_by_type(np, "pci") { 64 - if (of_device_is_compatible(np, "fsl,p4080-pcie") || 65 - of_device_is_compatible(np, "fsl,qoriq-pcie-v2.2")) { 66 - fsl_add_bridge(np, 0); 67 - hose = pci_find_hose_for_OF_device(np); 68 - max = min(max, hose->dma_window_base_cur + 69 - hose->dma_window_size); 70 - } 71 - } 72 - 73 - #ifdef CONFIG_PPC64 57 + #if defined(CONFIG_PCI) && defined(CONFIG_PPC64) 74 58 pci_devs_phb_init(); 75 59 #endif 76 - #endif 77 60 78 - #ifdef CONFIG_SWIOTLB 79 - if ((memblock_end_of_DRAM() - 1) > max) { 80 - ppc_swiotlb_enable = 1; 81 - set_pci_dma_ops(&swiotlb_dma_ops); 82 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 83 - } 84 - #endif 61 + fsl_pci_assign_primary(); 62 + 63 + swiotlb_detect_4g(); 64 + 85 65 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); 86 66 } 87 67 ··· 76 98 }, 77 99 { 78 100 .compatible = "fsl,qoriq-pcie-v2.2", 101 + }, 102 + { 103 + .compatible = "fsl,qoriq-pcie-v2.3", 104 + }, 105 + { 106 + .compatible = "fsl,qoriq-pcie-v2.4", 79 107 }, 80 108 /* The following two are for the Freescale hypervisor */ 81 109 {
+21 -43
arch/powerpc/platforms/85xx/ge_imp3a.c
··· 22 22 #include <linux/seq_file.h> 23 23 #include <linux/interrupt.h> 24 24 #include <linux/of_platform.h> 25 - #include <linux/memblock.h> 26 25 27 26 #include <asm/time.h> 28 27 #include <asm/machdep.h> ··· 83 84 of_node_put(cascade_node); 84 85 } 85 86 87 + static void ge_imp3a_pci_assign_primary(void) 88 + { 86 89 #ifdef CONFIG_PCI 87 - static int primary_phb_addr; 88 - #endif /* CONFIG_PCI */ 90 + struct device_node *np; 91 + struct resource rsrc; 92 + 93 + for_each_node_by_type(np, "pci") { 94 + if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 95 + of_device_is_compatible(np, "fsl,mpc8548-pcie") || 96 + of_device_is_compatible(np, "fsl,p2020-pcie")) { 97 + of_address_to_resource(np, 0, &rsrc); 98 + if ((rsrc.start & 0xfffff) == 0x9000) 99 + fsl_pci_primary = np; 100 + } 101 + } 102 + #endif 103 + } 89 104 90 105 /* 91 106 * Setup the architecture ··· 107 94 static void __init ge_imp3a_setup_arch(void) 108 95 { 109 96 struct device_node *regs; 110 - #ifdef CONFIG_PCI 111 - struct device_node *np; 112 - struct pci_controller *hose; 113 - #endif 114 - dma_addr_t max = 0xffffffff; 115 97 116 98 if (ppc_md.progress) 117 99 ppc_md.progress("ge_imp3a_setup_arch()", 0); 118 100 119 - #ifdef CONFIG_PCI 120 - for_each_node_by_type(np, "pci") { 121 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 122 - of_device_is_compatible(np, "fsl,mpc8548-pcie") || 123 - of_device_is_compatible(np, "fsl,p2020-pcie")) { 124 - struct resource rsrc; 125 - of_address_to_resource(np, 0, &rsrc); 126 - if ((rsrc.start & 0xfffff) == primary_phb_addr) 127 - fsl_add_bridge(np, 1); 128 - else 129 - fsl_add_bridge(np, 0); 130 - 131 - hose = pci_find_hose_for_OF_device(np); 132 - max = min(max, hose->dma_window_base_cur + 133 - hose->dma_window_size); 134 - } 135 - } 136 - #endif 137 - 138 101 mpc85xx_smp_init(); 139 102 140 - #ifdef CONFIG_SWIOTLB 141 - if ((memblock_end_of_DRAM() - 1) > max) { 142 - ppc_swiotlb_enable = 1; 143 - set_pci_dma_ops(&swiotlb_dma_ops); 144 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 145 - } 146 - #endif 103 + ge_imp3a_pci_assign_primary(); 104 + 105 + swiotlb_detect_4g(); 147 106 148 107 /* Remap basic board registers */ 149 108 regs = of_find_compatible_node(NULL, NULL, "ge,imp3a-fpga-regs"); ··· 200 215 { 201 216 unsigned long root = of_get_flat_dt_root(); 202 217 203 - if (of_flat_dt_is_compatible(root, "ge,IMP3A")) { 204 - #ifdef CONFIG_PCI 205 - primary_phb_addr = 0x9000; 206 - #endif 207 - return 1; 208 - } 209 - 210 - return 0; 218 + return of_flat_dt_is_compatible(root, "ge,IMP3A"); 211 219 } 212 220 213 - machine_device_initcall(ge_imp3a, mpc85xx_common_publish_devices); 221 + machine_arch_initcall(ge_imp3a, mpc85xx_common_publish_devices); 214 222 215 223 machine_arch_initcall(ge_imp3a, swiotlb_setup_bus_notifier); 216 224
+3 -33
arch/powerpc/platforms/85xx/mpc8536_ds.c
··· 17 17 #include <linux/seq_file.h> 18 18 #include <linux/interrupt.h> 19 19 #include <linux/of_platform.h> 20 - #include <linux/memblock.h> 21 20 22 21 #include <asm/time.h> 23 22 #include <asm/machdep.h> ··· 45 46 */ 46 47 static void __init mpc8536_ds_setup_arch(void) 47 48 { 48 - #ifdef CONFIG_PCI 49 - struct device_node *np; 50 - struct pci_controller *hose; 51 - #endif 52 - dma_addr_t max = 0xffffffff; 53 - 54 49 if (ppc_md.progress) 55 50 ppc_md.progress("mpc8536_ds_setup_arch()", 0); 56 51 57 - #ifdef CONFIG_PCI 58 - for_each_node_by_type(np, "pci") { 59 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 60 - of_device_is_compatible(np, "fsl,mpc8548-pcie")) { 61 - struct resource rsrc; 62 - of_address_to_resource(np, 0, &rsrc); 63 - if ((rsrc.start & 0xfffff) == 0x8000) 64 - fsl_add_bridge(np, 1); 65 - else 66 - fsl_add_bridge(np, 0); 52 + fsl_pci_assign_primary(); 67 53 68 - hose = pci_find_hose_for_OF_device(np); 69 - max = min(max, hose->dma_window_base_cur + 70 - hose->dma_window_size); 71 - } 72 - } 73 - 74 - #endif 75 - 76 - #ifdef CONFIG_SWIOTLB 77 - if ((memblock_end_of_DRAM() - 1) > max) { 78 - ppc_swiotlb_enable = 1; 79 - set_pci_dma_ops(&swiotlb_dma_ops); 80 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 81 - } 82 - #endif 54 + swiotlb_detect_4g(); 83 55 84 56 printk("MPC8536 DS board from Freescale Semiconductor\n"); 85 57 } 86 58 87 - machine_device_initcall(mpc8536_ds, mpc85xx_common_publish_devices); 59 + machine_arch_initcall(mpc8536_ds, mpc85xx_common_publish_devices); 88 60 89 61 machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); 90 62
+3 -8
arch/powerpc/platforms/85xx/mpc85xx_ads.c
··· 137 137 138 138 static void __init mpc85xx_ads_setup_arch(void) 139 139 { 140 - #ifdef CONFIG_PCI 141 - struct device_node *np; 142 - #endif 143 - 144 140 if (ppc_md.progress) 145 141 ppc_md.progress("mpc85xx_ads_setup_arch()", 0); 146 142 ··· 146 150 #endif 147 151 148 152 #ifdef CONFIG_PCI 149 - for_each_compatible_node(np, "pci", "fsl,mpc8540-pci") 150 - fsl_add_bridge(np, 1); 151 - 152 153 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 153 154 #endif 155 + 156 + fsl_pci_assign_primary(); 154 157 } 155 158 156 159 static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) ··· 168 173 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 169 174 } 170 175 171 - machine_device_initcall(mpc85xx_ads, mpc85xx_common_publish_devices); 176 + machine_arch_initcall(mpc85xx_ads, mpc85xx_common_publish_devices); 172 177 173 178 /* 174 179 * Called very early, device-tree isn't unflattened
+31 -13
arch/powerpc/platforms/85xx/mpc85xx_cds.c
··· 276 276 277 277 #endif /* CONFIG_PPC_I8259 */ 278 278 279 + static void mpc85xx_cds_pci_assign_primary(void) 280 + { 281 + #ifdef CONFIG_PCI 282 + struct device_node *np; 283 + 284 + if (fsl_pci_primary) 285 + return; 286 + 287 + /* 288 + * MPC85xx_CDS has ISA bridge but unfortunately there is no 289 + * isa node in device tree. We now looking for i8259 node as 290 + * a workaround for such a broken device tree. This routine 291 + * is for complying to all device trees. 292 + */ 293 + np = of_find_node_by_name(NULL, "i8259"); 294 + while ((fsl_pci_primary = of_get_parent(np))) { 295 + of_node_put(np); 296 + np = fsl_pci_primary; 297 + 298 + if ((of_device_is_compatible(np, "fsl,mpc8540-pci") || 299 + of_device_is_compatible(np, "fsl,mpc8548-pcie")) && 300 + of_device_is_available(np)) 301 + return; 302 + } 303 + #endif 304 + } 305 + 279 306 /* 280 307 * Setup the architecture 281 308 */ ··· 336 309 } 337 310 338 311 #ifdef CONFIG_PCI 339 - for_each_node_by_type(np, "pci") { 340 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 341 - of_device_is_compatible(np, "fsl,mpc8548-pcie")) { 342 - struct resource rsrc; 343 - of_address_to_resource(np, 0, &rsrc); 344 - if ((rsrc.start & 0xfffff) == 0x8000) 345 - fsl_add_bridge(np, 1); 346 - else 347 - fsl_add_bridge(np, 0); 348 - } 349 - } 350 - 351 312 ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; 352 313 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 353 314 #endif 315 + 316 + mpc85xx_cds_pci_assign_primary(); 317 + fsl_pci_assign_primary(); 354 318 } 355 319 356 320 static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) ··· 373 355 return of_flat_dt_is_compatible(root, "MPC85xxCDS"); 374 356 } 375 357 376 - machine_device_initcall(mpc85xx_cds, mpc85xx_common_publish_devices); 358 + machine_arch_initcall(mpc85xx_cds, mpc85xx_common_publish_devices); 377 359 378 360 define_machine(mpc85xx_cds) { 379 361 .name = "MPC85xx CDS",
+7 -8
arch/powerpc/platforms/85xx/mpc85xx_ds.c
··· 20 20 #include <linux/seq_file.h> 21 21 #include <linux/interrupt.h> 22 22 #include <linux/of_platform.h> 23 - #include <linux/memblock.h> 24 23 25 24 #include <asm/time.h> 26 25 #include <asm/machdep.h> ··· 128 129 } 129 130 #endif /* CONFIG_PCI */ 130 131 131 - static void __init mpc85xx_ds_pci_init(void) 132 + static void __init mpc85xx_ds_uli_init(void) 132 133 { 133 134 #ifdef CONFIG_PCI 134 135 struct device_node *node; 135 - 136 - fsl_pci_init(); 137 136 138 137 /* See if we have a ULI under the primary */ 139 138 ··· 156 159 if (ppc_md.progress) 157 160 ppc_md.progress("mpc85xx_ds_setup_arch()", 0); 158 161 159 - mpc85xx_ds_pci_init(); 162 + swiotlb_detect_4g(); 163 + fsl_pci_assign_primary(); 164 + mpc85xx_ds_uli_init(); 160 165 mpc85xx_smp_init(); 161 166 162 167 printk("MPC85xx DS board from Freescale Semiconductor\n"); ··· 174 175 return !!of_flat_dt_is_compatible(root, "MPC8544DS"); 175 176 } 176 177 177 - machine_device_initcall(mpc8544_ds, mpc85xx_common_publish_devices); 178 - machine_device_initcall(mpc8572_ds, mpc85xx_common_publish_devices); 179 - machine_device_initcall(p2020_ds, mpc85xx_common_publish_devices); 178 + machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices); 179 + machine_arch_initcall(mpc8572_ds, mpc85xx_common_publish_devices); 180 + machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); 180 181 181 182 machine_arch_initcall(mpc8544_ds, swiotlb_setup_bus_notifier); 182 183 machine_arch_initcall(mpc8572_ds, swiotlb_setup_bus_notifier);
+6 -34
arch/powerpc/platforms/85xx/mpc85xx_mds.c
··· 327 327 328 328 static void __init mpc85xx_mds_setup_arch(void) 329 329 { 330 - #ifdef CONFIG_PCI 331 - struct pci_controller *hose; 332 - struct device_node *np; 333 - #endif 334 - dma_addr_t max = 0xffffffff; 335 - 336 330 if (ppc_md.progress) 337 331 ppc_md.progress("mpc85xx_mds_setup_arch()", 0); 338 - 339 - #ifdef CONFIG_PCI 340 - for_each_node_by_type(np, "pci") { 341 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 342 - of_device_is_compatible(np, "fsl,mpc8548-pcie")) { 343 - struct resource rsrc; 344 - of_address_to_resource(np, 0, &rsrc); 345 - if ((rsrc.start & 0xfffff) == 0x8000) 346 - fsl_add_bridge(np, 1); 347 - else 348 - fsl_add_bridge(np, 0); 349 - 350 - hose = pci_find_hose_for_OF_device(np); 351 - max = min(max, hose->dma_window_base_cur + 352 - hose->dma_window_size); 353 - } 354 - } 355 - #endif 356 332 357 333 mpc85xx_smp_init(); 358 334 359 335 mpc85xx_mds_qe_init(); 360 336 361 - #ifdef CONFIG_SWIOTLB 362 - if ((memblock_end_of_DRAM() - 1) > max) { 363 - ppc_swiotlb_enable = 1; 364 - set_pci_dma_ops(&swiotlb_dma_ops); 365 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 366 - } 367 - #endif 337 + fsl_pci_assign_primary(); 338 + 339 + swiotlb_detect_4g(); 368 340 } 369 341 370 342 ··· 381 409 return mpc85xx_common_publish_devices(); 382 410 } 383 411 384 - machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices); 385 - machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices); 386 - machine_device_initcall(p1021_mds, mpc85xx_common_publish_devices); 412 + machine_arch_initcall(mpc8568_mds, mpc85xx_publish_devices); 413 + machine_arch_initcall(mpc8569_mds, mpc85xx_publish_devices); 414 + machine_arch_initcall(p1021_mds, mpc85xx_common_publish_devices); 387 415 388 416 machine_arch_initcall(mpc8568_mds, swiotlb_setup_bus_notifier); 389 417 machine_arch_initcall(mpc8569_mds, swiotlb_setup_bus_notifier);
+12 -18
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
··· 86 86 */ 87 87 static void __init mpc85xx_rdb_setup_arch(void) 88 88 { 89 - #if defined(CONFIG_PCI) || defined(CONFIG_QUICC_ENGINE) 89 + #ifdef CONFIG_QUICC_ENGINE 90 90 struct device_node *np; 91 91 #endif 92 92 93 93 if (ppc_md.progress) 94 94 ppc_md.progress("mpc85xx_rdb_setup_arch()", 0); 95 95 96 - #ifdef CONFIG_PCI 97 - for_each_node_by_type(np, "pci") { 98 - if (of_device_is_compatible(np, "fsl,mpc8548-pcie")) 99 - fsl_add_bridge(np, 0); 100 - } 101 - 102 - #endif 103 - 104 96 mpc85xx_smp_init(); 97 + 98 + fsl_pci_assign_primary(); 105 99 106 100 #ifdef CONFIG_QUICC_ENGINE 107 101 np = of_find_compatible_node(NULL, NULL, "fsl,qe"); ··· 155 161 printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); 156 162 } 157 163 158 - machine_device_initcall(p2020_rdb, mpc85xx_common_publish_devices); 159 - machine_device_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); 160 - machine_device_initcall(p1020_mbg_pc, mpc85xx_common_publish_devices); 161 - machine_device_initcall(p1020_rdb, mpc85xx_common_publish_devices); 162 - machine_device_initcall(p1020_rdb_pc, mpc85xx_common_publish_devices); 163 - machine_device_initcall(p1020_utm_pc, mpc85xx_common_publish_devices); 164 - machine_device_initcall(p1021_rdb_pc, mpc85xx_common_publish_devices); 165 - machine_device_initcall(p1025_rdb, mpc85xx_common_publish_devices); 166 - machine_device_initcall(p1024_rdb, mpc85xx_common_publish_devices); 164 + machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); 165 + machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); 166 + machine_arch_initcall(p1020_mbg_pc, mpc85xx_common_publish_devices); 167 + machine_arch_initcall(p1020_rdb, mpc85xx_common_publish_devices); 168 + machine_arch_initcall(p1020_rdb_pc, mpc85xx_common_publish_devices); 169 + machine_arch_initcall(p1020_utm_pc, mpc85xx_common_publish_devices); 170 + machine_arch_initcall(p1021_rdb_pc, mpc85xx_common_publish_devices); 171 + machine_arch_initcall(p1025_rdb, mpc85xx_common_publish_devices); 172 + machine_arch_initcall(p1024_rdb, mpc85xx_common_publish_devices); 167 173 168 174 /* 169 175 * Called very early, device-tree isn't unflattened
+2 -12
arch/powerpc/platforms/85xx/p1010rdb.c
··· 46 46 */ 47 47 static void __init p1010_rdb_setup_arch(void) 48 48 { 49 - #ifdef CONFIG_PCI 50 - struct device_node *np; 51 - #endif 52 - 53 49 if (ppc_md.progress) 54 50 ppc_md.progress("p1010_rdb_setup_arch()", 0); 55 51 56 - #ifdef CONFIG_PCI 57 - for_each_node_by_type(np, "pci") { 58 - if (of_device_is_compatible(np, "fsl,p1010-pcie")) 59 - fsl_add_bridge(np, 0); 60 - } 61 - 62 - #endif 52 + fsl_pci_assign_primary(); 63 53 64 54 printk(KERN_INFO "P1010 RDB board from Freescale Semiconductor\n"); 65 55 } 66 56 67 - machine_device_initcall(p1010_rdb, mpc85xx_common_publish_devices); 57 + machine_arch_initcall(p1010_rdb, mpc85xx_common_publish_devices); 68 58 machine_arch_initcall(p1010_rdb, swiotlb_setup_bus_notifier); 69 59 70 60 /*
+4 -32
arch/powerpc/platforms/85xx/p1022_ds.c
··· 18 18 19 19 #include <linux/pci.h> 20 20 #include <linux/of_platform.h> 21 - #include <linux/memblock.h> 22 21 #include <asm/div64.h> 23 22 #include <asm/mpic.h> 24 23 #include <asm/swiotlb.h> ··· 506 507 */ 507 508 static void __init p1022_ds_setup_arch(void) 508 509 { 509 - #ifdef CONFIG_PCI 510 - struct device_node *np; 511 - #endif 512 - dma_addr_t max = 0xffffffff; 513 - 514 510 if (ppc_md.progress) 515 511 ppc_md.progress("p1022_ds_setup_arch()", 0); 516 - 517 - #ifdef CONFIG_PCI 518 - for_each_compatible_node(np, "pci", "fsl,p1022-pcie") { 519 - struct resource rsrc; 520 - struct pci_controller *hose; 521 - 522 - of_address_to_resource(np, 0, &rsrc); 523 - 524 - if ((rsrc.start & 0xfffff) == 0x8000) 525 - fsl_add_bridge(np, 1); 526 - else 527 - fsl_add_bridge(np, 0); 528 - 529 - hose = pci_find_hose_for_OF_device(np); 530 - max = min(max, hose->dma_window_base_cur + 531 - hose->dma_window_size); 532 - } 533 - #endif 534 512 535 513 #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 536 514 diu_ops.get_pixel_format = p1022ds_get_pixel_format; ··· 577 601 578 602 mpc85xx_smp_init(); 579 603 580 - #ifdef CONFIG_SWIOTLB 581 - if ((memblock_end_of_DRAM() - 1) > max) { 582 - ppc_swiotlb_enable = 1; 583 - set_pci_dma_ops(&swiotlb_dma_ops); 584 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 585 - } 586 - #endif 604 + fsl_pci_assign_primary(); 605 + 606 + swiotlb_detect_4g(); 587 607 588 608 pr_info("Freescale P1022 DS reference board\n"); 589 609 } 590 610 591 - machine_device_initcall(p1022_ds, mpc85xx_common_publish_devices); 611 + machine_arch_initcall(p1022_ds, mpc85xx_common_publish_devices); 592 612 593 613 machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier); 594 614
+167
arch/powerpc/platforms/85xx/p1022_rdk.c
··· 1 + /* 2 + * P1022 RDK board specific routines 3 + * 4 + * Copyright 2012 Freescale Semiconductor, Inc. 5 + * 6 + * Author: Timur Tabi <timur@freescale.com> 7 + * 8 + * Based on p1022_ds.c 9 + * 10 + * This file is licensed under the terms of the GNU General Public License 11 + * version 2. This program is licensed "as is" without any warranty of any 12 + * kind, whether express or implied. 13 + */ 14 + 15 + #include <linux/pci.h> 16 + #include <linux/of_platform.h> 17 + #include <asm/div64.h> 18 + #include <asm/mpic.h> 19 + #include <asm/swiotlb.h> 20 + 21 + #include <sysdev/fsl_soc.h> 22 + #include <sysdev/fsl_pci.h> 23 + #include <asm/udbg.h> 24 + #include <asm/fsl_guts.h> 25 + #include "smp.h" 26 + 27 + #include "mpc85xx.h" 28 + 29 + #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 30 + 31 + /* DIU Pixel Clock bits of the CLKDVDR Global Utilities register */ 32 + #define CLKDVDR_PXCKEN 0x80000000 33 + #define CLKDVDR_PXCKINV 0x10000000 34 + #define CLKDVDR_PXCKDLY 0x06000000 35 + #define CLKDVDR_PXCLK_MASK 0x00FF0000 36 + 37 + /** 38 + * p1022rdk_set_monitor_port: switch the output to a different monitor port 39 + */ 40 + static void p1022rdk_set_monitor_port(enum fsl_diu_monitor_port port) 41 + { 42 + if (port != FSL_DIU_PORT_DVI) { 43 + pr_err("p1022rdk: unsupported monitor port %i\n", port); 44 + return; 45 + } 46 + } 47 + 48 + /** 49 + * p1022rdk_set_pixel_clock: program the DIU's clock 50 + * 51 + * @pixclock: the wavelength, in picoseconds, of the clock 52 + */ 53 + void p1022rdk_set_pixel_clock(unsigned int pixclock) 54 + { 55 + struct device_node *guts_np = NULL; 56 + struct ccsr_guts __iomem *guts; 57 + unsigned long freq; 58 + u64 temp; 59 + u32 pxclk; 60 + 61 + /* Map the global utilities registers. */ 62 + guts_np = of_find_compatible_node(NULL, NULL, "fsl,p1022-guts"); 63 + if (!guts_np) { 64 + pr_err("p1022rdk: missing global utilties device node\n"); 65 + return; 66 + } 67 + 68 + guts = of_iomap(guts_np, 0); 69 + of_node_put(guts_np); 70 + if (!guts) { 71 + pr_err("p1022rdk: could not map global utilties device\n"); 72 + return; 73 + } 74 + 75 + /* Convert pixclock from a wavelength to a frequency */ 76 + temp = 1000000000000ULL; 77 + do_div(temp, pixclock); 78 + freq = temp; 79 + 80 + /* 81 + * 'pxclk' is the ratio of the platform clock to the pixel clock. 82 + * This number is programmed into the CLKDVDR register, and the valid 83 + * range of values is 2-255. 84 + */ 85 + pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); 86 + pxclk = clamp_t(u32, pxclk, 2, 255); 87 + 88 + /* Disable the pixel clock, and set it to non-inverted and no delay */ 89 + clrbits32(&guts->clkdvdr, 90 + CLKDVDR_PXCKEN | CLKDVDR_PXCKDLY | CLKDVDR_PXCLK_MASK); 91 + 92 + /* Enable the clock and set the pxclk */ 93 + setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16)); 94 + 95 + iounmap(guts); 96 + } 97 + 98 + /** 99 + * p1022rdk_valid_monitor_port: set the monitor port for sysfs 100 + */ 101 + enum fsl_diu_monitor_port 102 + p1022rdk_valid_monitor_port(enum fsl_diu_monitor_port port) 103 + { 104 + return FSL_DIU_PORT_DVI; 105 + } 106 + 107 + #endif 108 + 109 + void __init p1022_rdk_pic_init(void) 110 + { 111 + struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 112 + MPIC_SINGLE_DEST_CPU, 113 + 0, 256, " OpenPIC "); 114 + BUG_ON(mpic == NULL); 115 + mpic_init(mpic); 116 + } 117 + 118 + /* 119 + * Setup the architecture 120 + */ 121 + static void __init p1022_rdk_setup_arch(void) 122 + { 123 + if (ppc_md.progress) 124 + ppc_md.progress("p1022_rdk_setup_arch()", 0); 125 + 126 + #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 127 + diu_ops.set_monitor_port = p1022rdk_set_monitor_port; 128 + diu_ops.set_pixel_clock = p1022rdk_set_pixel_clock; 129 + diu_ops.valid_monitor_port = p1022rdk_valid_monitor_port; 130 + #endif 131 + 132 + mpc85xx_smp_init(); 133 + 134 + fsl_pci_assign_primary(); 135 + 136 + swiotlb_detect_4g(); 137 + 138 + pr_info("Freescale / iVeia P1022 RDK reference board\n"); 139 + } 140 + 141 + machine_arch_initcall(p1022_rdk, mpc85xx_common_publish_devices); 142 + 143 + machine_arch_initcall(p1022_rdk, swiotlb_setup_bus_notifier); 144 + 145 + /* 146 + * Called very early, device-tree isn't unflattened 147 + */ 148 + static int __init p1022_rdk_probe(void) 149 + { 150 + unsigned long root = of_get_flat_dt_root(); 151 + 152 + return of_flat_dt_is_compatible(root, "fsl,p1022rdk"); 153 + } 154 + 155 + define_machine(p1022_rdk) { 156 + .name = "P1022 RDK", 157 + .probe = p1022_rdk_probe, 158 + .setup_arch = p1022_rdk_setup_arch, 159 + .init_IRQ = p1022_rdk_pic_init, 160 + #ifdef CONFIG_PCI 161 + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 162 + #endif 163 + .get_irq = mpic_get_irq, 164 + .restart = fsl_rstcr_restart, 165 + .calibrate_decr = generic_calibrate_decr, 166 + .progress = udbg_progress, 167 + };
+3 -6
arch/powerpc/platforms/85xx/p1023_rds.c
··· 80 80 } 81 81 } 82 82 83 - #ifdef CONFIG_PCI 84 - for_each_compatible_node(np, "pci", "fsl,p1023-pcie") 85 - fsl_add_bridge(np, 0); 86 - #endif 87 - 88 83 mpc85xx_smp_init(); 84 + 85 + fsl_pci_assign_primary(); 89 86 } 90 87 91 - machine_device_initcall(p1023_rds, mpc85xx_common_publish_devices); 88 + machine_arch_initcall(p1023_rds, mpc85xx_common_publish_devices); 92 89 93 90 static void __init mpc85xx_rds_pic_init(void) 94 91 {
+1 -1
arch/powerpc/platforms/85xx/p2041_rdb.c
··· 80 80 .power_save = e500_idle, 81 81 }; 82 82 83 - machine_device_initcall(p2041_rdb, corenet_ds_publish_devices); 83 + machine_arch_initcall(p2041_rdb, corenet_ds_publish_devices); 84 84 85 85 #ifdef CONFIG_SWIOTLB 86 86 machine_arch_initcall(p2041_rdb, swiotlb_setup_bus_notifier);
+1 -1
arch/powerpc/platforms/85xx/p3041_ds.c
··· 82 82 .power_save = e500_idle, 83 83 }; 84 84 85 - machine_device_initcall(p3041_ds, corenet_ds_publish_devices); 85 + machine_arch_initcall(p3041_ds, corenet_ds_publish_devices); 86 86 87 87 #ifdef CONFIG_SWIOTLB 88 88 machine_arch_initcall(p3041_ds, swiotlb_setup_bus_notifier);
+1 -1
arch/powerpc/platforms/85xx/p4080_ds.c
··· 81 81 .power_save = e500_idle, 82 82 }; 83 83 84 - machine_device_initcall(p4080_ds, corenet_ds_publish_devices); 84 + machine_arch_initcall(p4080_ds, corenet_ds_publish_devices); 85 85 #ifdef CONFIG_SWIOTLB 86 86 machine_arch_initcall(p4080_ds, swiotlb_setup_bus_notifier); 87 87 #endif
+1 -1
arch/powerpc/platforms/85xx/p5020_ds.c
··· 91 91 #endif 92 92 }; 93 93 94 - machine_device_initcall(p5020_ds, corenet_ds_publish_devices); 94 + machine_arch_initcall(p5020_ds, corenet_ds_publish_devices); 95 95 96 96 #ifdef CONFIG_SWIOTLB 97 97 machine_arch_initcall(p5020_ds, swiotlb_setup_bus_notifier);
+89
arch/powerpc/platforms/85xx/p5040_ds.c
··· 1 + /* 2 + * P5040 DS Setup 3 + * 4 + * Copyright 2009-2010 Freescale Semiconductor Inc. 5 + * 6 + * This program is free software; you can redistribute it and/or modify it 7 + * under the terms of the GNU General Public License as published by the 8 + * Free Software Foundation; either version 2 of the License, or (at your 9 + * option) any later version. 10 + */ 11 + 12 + #include <linux/kernel.h> 13 + #include <linux/pci.h> 14 + 15 + #include <asm/machdep.h> 16 + #include <asm/udbg.h> 17 + #include <asm/mpic.h> 18 + 19 + #include <linux/of_fdt.h> 20 + 21 + #include <sysdev/fsl_soc.h> 22 + #include <sysdev/fsl_pci.h> 23 + #include <asm/ehv_pic.h> 24 + 25 + #include "corenet_ds.h" 26 + 27 + /* 28 + * Called very early, device-tree isn't unflattened 29 + */ 30 + static int __init p5040_ds_probe(void) 31 + { 32 + unsigned long root = of_get_flat_dt_root(); 33 + #ifdef CONFIG_SMP 34 + extern struct smp_ops_t smp_85xx_ops; 35 + #endif 36 + 37 + if (of_flat_dt_is_compatible(root, "fsl,P5040DS")) 38 + return 1; 39 + 40 + /* Check if we're running under the Freescale hypervisor */ 41 + if (of_flat_dt_is_compatible(root, "fsl,P5040DS-hv")) { 42 + ppc_md.init_IRQ = ehv_pic_init; 43 + ppc_md.get_irq = ehv_pic_get_irq; 44 + ppc_md.restart = fsl_hv_restart; 45 + ppc_md.power_off = fsl_hv_halt; 46 + ppc_md.halt = fsl_hv_halt; 47 + #ifdef CONFIG_SMP 48 + /* 49 + * Disable the timebase sync operations because we can't write 50 + * to the timebase registers under the hypervisor. 51 + */ 52 + smp_85xx_ops.give_timebase = NULL; 53 + smp_85xx_ops.take_timebase = NULL; 54 + #endif 55 + return 1; 56 + } 57 + 58 + return 0; 59 + } 60 + 61 + define_machine(p5040_ds) { 62 + .name = "P5040 DS", 63 + .probe = p5040_ds_probe, 64 + .setup_arch = corenet_ds_setup_arch, 65 + .init_IRQ = corenet_ds_pic_init, 66 + #ifdef CONFIG_PCI 67 + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 68 + #endif 69 + /* coreint doesn't play nice with lazy EE, use legacy mpic for now */ 70 + #ifdef CONFIG_PPC64 71 + .get_irq = mpic_get_irq, 72 + #else 73 + .get_irq = mpic_get_coreint_irq, 74 + #endif 75 + .restart = fsl_rstcr_restart, 76 + .calibrate_decr = generic_calibrate_decr, 77 + .progress = udbg_progress, 78 + #ifdef CONFIG_PPC64 79 + .power_save = book3e_idle, 80 + #else 81 + .power_save = e500_idle, 82 + #endif 83 + }; 84 + 85 + machine_arch_initcall(p5040_ds, corenet_ds_publish_devices); 86 + 87 + #ifdef CONFIG_SWIOTLB 88 + machine_arch_initcall(p5040_ds, swiotlb_setup_bus_notifier); 89 + #endif
+3 -2
arch/powerpc/platforms/85xx/qemu_e500.c
··· 41 41 { 42 42 ppc_md.progress("qemu_e500_setup_arch()", 0); 43 43 44 - fsl_pci_init(); 44 + fsl_pci_assign_primary(); 45 + swiotlb_detect_4g(); 45 46 mpc85xx_smp_init(); 46 47 } 47 48 ··· 56 55 return !!of_flat_dt_is_compatible(root, "fsl,qemu-e500"); 57 56 } 58 57 59 - machine_device_initcall(qemu_e500, mpc85xx_common_publish_devices); 58 + machine_arch_initcall(qemu_e500, mpc85xx_common_publish_devices); 60 59 61 60 define_machine(qemu_e500) { 62 61 .name = "QEMU e500",
+3 -18
arch/powerpc/platforms/85xx/sbc8548.c
··· 88 88 */ 89 89 static void __init sbc8548_setup_arch(void) 90 90 { 91 - #ifdef CONFIG_PCI 92 - struct device_node *np; 93 - #endif 94 - 95 91 if (ppc_md.progress) 96 92 ppc_md.progress("sbc8548_setup_arch()", 0); 97 93 98 - #ifdef CONFIG_PCI 99 - for_each_node_by_type(np, "pci") { 100 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 101 - of_device_is_compatible(np, "fsl,mpc8548-pcie")) { 102 - struct resource rsrc; 103 - of_address_to_resource(np, 0, &rsrc); 104 - if ((rsrc.start & 0xfffff) == 0x8000) 105 - fsl_add_bridge(np, 1); 106 - else 107 - fsl_add_bridge(np, 0); 108 - } 109 - } 110 - #endif 94 + fsl_pci_assign_primary(); 95 + 111 96 sbc_rev = sbc8548_hw_rev(); 112 97 } 113 98 ··· 113 128 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 114 129 } 115 130 116 - machine_device_initcall(sbc8548, mpc85xx_common_publish_devices); 131 + machine_arch_initcall(sbc8548, mpc85xx_common_publish_devices); 117 132 118 133 /* 119 134 * Called very early, device-tree isn't unflattened
+181 -35
arch/powerpc/platforms/85xx/smp.c
··· 2 2 * Author: Andy Fleming <afleming@freescale.com> 3 3 * Kumar Gala <galak@kernel.crashing.org> 4 4 * 5 - * Copyright 2006-2008, 2011 Freescale Semiconductor Inc. 5 + * Copyright 2006-2008, 2011-2012 Freescale Semiconductor Inc. 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify it 8 8 * under the terms of the GNU General Public License as published by the ··· 17 17 #include <linux/of.h> 18 18 #include <linux/kexec.h> 19 19 #include <linux/highmem.h> 20 + #include <linux/cpu.h> 20 21 21 22 #include <asm/machdep.h> 22 23 #include <asm/pgtable.h> ··· 25 24 #include <asm/mpic.h> 26 25 #include <asm/cacheflush.h> 27 26 #include <asm/dbell.h> 27 + #include <asm/fsl_guts.h> 28 28 29 29 #include <sysdev/fsl_soc.h> 30 30 #include <sysdev/mpic.h> 31 31 #include "smp.h" 32 32 33 - extern void __early_start(void); 33 + struct epapr_spin_table { 34 + u32 addr_h; 35 + u32 addr_l; 36 + u32 r3_h; 37 + u32 r3_l; 38 + u32 reserved; 39 + u32 pir; 40 + }; 34 41 35 - #define BOOT_ENTRY_ADDR_UPPER 0 36 - #define BOOT_ENTRY_ADDR_LOWER 1 37 - #define BOOT_ENTRY_R3_UPPER 2 38 - #define BOOT_ENTRY_R3_LOWER 3 39 - #define BOOT_ENTRY_RESV 4 40 - #define BOOT_ENTRY_PIR 5 41 - #define BOOT_ENTRY_R6_UPPER 6 42 - #define BOOT_ENTRY_R6_LOWER 7 43 - #define NUM_BOOT_ENTRY 8 44 - #define SIZE_BOOT_ENTRY (NUM_BOOT_ENTRY * sizeof(u32)) 42 + static struct ccsr_guts __iomem *guts; 43 + static u64 timebase; 44 + static int tb_req; 45 + static int tb_valid; 45 46 46 - static int __init 47 - smp_85xx_kick_cpu(int nr) 47 + static void mpc85xx_timebase_freeze(int freeze) 48 + { 49 + uint32_t mask; 50 + 51 + mask = CCSR_GUTS_DEVDISR_TB0 | CCSR_GUTS_DEVDISR_TB1; 52 + if (freeze) 53 + setbits32(&guts->devdisr, mask); 54 + else 55 + clrbits32(&guts->devdisr, mask); 56 + 57 + in_be32(&guts->devdisr); 58 + } 59 + 60 + static void mpc85xx_give_timebase(void) 61 + { 62 + unsigned long flags; 63 + 64 + local_irq_save(flags); 65 + 66 + while (!tb_req) 67 + barrier(); 68 + tb_req = 0; 69 + 70 + mpc85xx_timebase_freeze(1); 71 + timebase = get_tb(); 72 + mb(); 73 + tb_valid = 1; 74 + 75 + while (tb_valid) 76 + barrier(); 77 + 78 + mpc85xx_timebase_freeze(0); 79 + 80 + local_irq_restore(flags); 81 + } 82 + 83 + static void mpc85xx_take_timebase(void) 84 + { 85 + unsigned long flags; 86 + 87 + local_irq_save(flags); 88 + 89 + tb_req = 1; 90 + while (!tb_valid) 91 + barrier(); 92 + 93 + set_tb(timebase >> 32, timebase & 0xffffffff); 94 + isync(); 95 + tb_valid = 0; 96 + 97 + local_irq_restore(flags); 98 + } 99 + 100 + #ifdef CONFIG_HOTPLUG_CPU 101 + static void __cpuinit smp_85xx_mach_cpu_die(void) 102 + { 103 + unsigned int cpu = smp_processor_id(); 104 + u32 tmp; 105 + 106 + local_irq_disable(); 107 + idle_task_exit(); 108 + generic_set_cpu_dead(cpu); 109 + mb(); 110 + 111 + mtspr(SPRN_TCR, 0); 112 + 113 + __flush_disable_L1(); 114 + tmp = (mfspr(SPRN_HID0) & ~(HID0_DOZE|HID0_SLEEP)) | HID0_NAP; 115 + mtspr(SPRN_HID0, tmp); 116 + isync(); 117 + 118 + /* Enter NAP mode. */ 119 + tmp = mfmsr(); 120 + tmp |= MSR_WE; 121 + mb(); 122 + mtmsr(tmp); 123 + isync(); 124 + 125 + while (1) 126 + ; 127 + } 128 + #endif 129 + 130 + static int __cpuinit smp_85xx_kick_cpu(int nr) 48 131 { 49 132 unsigned long flags; 50 133 const u64 *cpu_rel_addr; 51 - __iomem u32 *bptr_vaddr; 134 + __iomem struct epapr_spin_table *spin_table; 52 135 struct device_node *np; 53 - int n = 0, hw_cpu = get_hard_smp_processor_id(nr); 136 + int hw_cpu = get_hard_smp_processor_id(nr); 54 137 int ioremappable; 138 + int ret = 0; 55 139 56 140 WARN_ON(nr < 0 || nr >= NR_CPUS); 57 141 WARN_ON(hw_cpu < 0 || hw_cpu >= NR_CPUS); ··· 161 75 162 76 /* Map the spin table */ 163 77 if (ioremappable) 164 - bptr_vaddr = ioremap(*cpu_rel_addr, SIZE_BOOT_ENTRY); 78 + spin_table = ioremap(*cpu_rel_addr, 79 + sizeof(struct epapr_spin_table)); 165 80 else 166 - bptr_vaddr = phys_to_virt(*cpu_rel_addr); 81 + spin_table = phys_to_virt(*cpu_rel_addr); 167 82 168 83 local_irq_save(flags); 169 - 170 - out_be32(bptr_vaddr + BOOT_ENTRY_PIR, hw_cpu); 171 84 #ifdef CONFIG_PPC32 172 - out_be32(bptr_vaddr + BOOT_ENTRY_ADDR_LOWER, __pa(__early_start)); 85 + #ifdef CONFIG_HOTPLUG_CPU 86 + /* Corresponding to generic_set_cpu_dead() */ 87 + generic_set_cpu_up(nr); 88 + 89 + if (system_state == SYSTEM_RUNNING) { 90 + out_be32(&spin_table->addr_l, 0); 91 + 92 + /* 93 + * We don't set the BPTR register here since it already points 94 + * to the boot page properly. 95 + */ 96 + mpic_reset_core(hw_cpu); 97 + 98 + /* wait until core is ready... */ 99 + if (!spin_event_timeout(in_be32(&spin_table->addr_l) == 1, 100 + 10000, 100)) { 101 + pr_err("%s: timeout waiting for core %d to reset\n", 102 + __func__, hw_cpu); 103 + ret = -ENOENT; 104 + goto out; 105 + } 106 + 107 + /* clear the acknowledge status */ 108 + __secondary_hold_acknowledge = -1; 109 + } 110 + #endif 111 + out_be32(&spin_table->pir, hw_cpu); 112 + out_be32(&spin_table->addr_l, __pa(__early_start)); 173 113 174 114 if (!ioremappable) 175 - flush_dcache_range((ulong)bptr_vaddr, 176 - (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY)); 115 + flush_dcache_range((ulong)spin_table, 116 + (ulong)spin_table + sizeof(struct epapr_spin_table)); 177 117 178 118 /* Wait a bit for the CPU to ack. */ 179 - while ((__secondary_hold_acknowledge != hw_cpu) && (++n < 1000)) 180 - mdelay(1); 119 + if (!spin_event_timeout(__secondary_hold_acknowledge == hw_cpu, 120 + 10000, 100)) { 121 + pr_err("%s: timeout waiting for core %d to ack\n", 122 + __func__, hw_cpu); 123 + ret = -ENOENT; 124 + goto out; 125 + } 126 + out: 181 127 #else 182 128 smp_generic_kick_cpu(nr); 183 129 184 - out_be64((u64 *)(bptr_vaddr + BOOT_ENTRY_ADDR_UPPER), 185 - __pa((u64)*((unsigned long long *) generic_secondary_smp_init))); 130 + out_be32(&spin_table->pir, hw_cpu); 131 + out_be64((u64 *)(&spin_table->addr_h), 132 + __pa((u64)*((unsigned long long *)generic_secondary_smp_init))); 186 133 187 134 if (!ioremappable) 188 - flush_dcache_range((ulong)bptr_vaddr, 189 - (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY)); 135 + flush_dcache_range((ulong)spin_table, 136 + (ulong)spin_table + sizeof(struct epapr_spin_table)); 190 137 #endif 191 138 192 139 local_irq_restore(flags); 193 140 194 141 if (ioremappable) 195 - iounmap(bptr_vaddr); 142 + iounmap(spin_table); 196 143 197 - pr_debug("waited %d msecs for CPU #%d.\n", n, nr); 198 - 199 - return 0; 144 + return ret; 200 145 } 201 146 202 147 struct smp_ops_t smp_85xx_ops = { 203 148 .kick_cpu = smp_85xx_kick_cpu, 149 + #ifdef CONFIG_HOTPLUG_CPU 150 + .cpu_disable = generic_cpu_disable, 151 + .cpu_die = generic_cpu_die, 152 + #endif 204 153 #ifdef CONFIG_KEXEC 205 154 .give_timebase = smp_generic_give_timebase, 206 155 .take_timebase = smp_generic_take_timebase, ··· 339 218 } 340 219 #endif /* CONFIG_KEXEC */ 341 220 342 - static void __init 343 - smp_85xx_setup_cpu(int cpu_nr) 221 + static void __cpuinit smp_85xx_setup_cpu(int cpu_nr) 344 222 { 345 223 if (smp_85xx_ops.probe == smp_mpic_probe) 346 224 mpic_setup_this_cpu(); ··· 347 227 if (cpu_has_feature(CPU_FTR_DBELL)) 348 228 doorbell_setup_this_cpu(); 349 229 } 230 + 231 + static const struct of_device_id mpc85xx_smp_guts_ids[] = { 232 + { .compatible = "fsl,mpc8572-guts", }, 233 + { .compatible = "fsl,p1020-guts", }, 234 + { .compatible = "fsl,p1021-guts", }, 235 + { .compatible = "fsl,p1022-guts", }, 236 + { .compatible = "fsl,p1023-guts", }, 237 + { .compatible = "fsl,p2020-guts", }, 238 + {}, 239 + }; 350 240 351 241 void __init mpc85xx_smp_init(void) 352 242 { ··· 377 247 */ 378 248 smp_85xx_ops.message_pass = NULL; 379 249 smp_85xx_ops.cause_ipi = doorbell_cause_ipi; 250 + } 251 + 252 + np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids); 253 + if (np) { 254 + guts = of_iomap(np, 0); 255 + of_node_put(np); 256 + if (!guts) { 257 + pr_err("%s: Could not map guts node address\n", 258 + __func__); 259 + return; 260 + } 261 + smp_85xx_ops.give_timebase = mpc85xx_give_timebase; 262 + smp_85xx_ops.take_timebase = mpc85xx_take_timebase; 263 + #ifdef CONFIG_HOTPLUG_CPU 264 + ppc_md.cpu_die = smp_85xx_mach_cpu_die; 265 + #endif 380 266 } 381 267 382 268 smp_ops = &smp_85xx_ops;
+2 -9
arch/powerpc/platforms/85xx/socrates.c
··· 66 66 */ 67 67 static void __init socrates_setup_arch(void) 68 68 { 69 - #ifdef CONFIG_PCI 70 - struct device_node *np; 71 - #endif 72 - 73 69 if (ppc_md.progress) 74 70 ppc_md.progress("socrates_setup_arch()", 0); 75 71 76 - #ifdef CONFIG_PCI 77 - for_each_compatible_node(np, "pci", "fsl,mpc8540-pci") 78 - fsl_add_bridge(np, 1); 79 - #endif 72 + fsl_pci_assign_primary(); 80 73 } 81 74 82 - machine_device_initcall(socrates, mpc85xx_common_publish_devices); 75 + machine_arch_initcall(socrates, mpc85xx_common_publish_devices); 83 76 84 77 /* 85 78 * Called very early, device-tree isn't unflattened
+3 -10
arch/powerpc/platforms/85xx/stx_gp3.c
··· 60 60 */ 61 61 static void __init stx_gp3_setup_arch(void) 62 62 { 63 - #ifdef CONFIG_PCI 64 - struct device_node *np; 65 - #endif 66 - 67 63 if (ppc_md.progress) 68 64 ppc_md.progress("stx_gp3_setup_arch()", 0); 69 65 66 + fsl_pci_assign_primary(); 67 + 70 68 #ifdef CONFIG_CPM2 71 69 cpm2_reset(); 72 - #endif 73 - 74 - #ifdef CONFIG_PCI 75 - for_each_compatible_node(np, "pci", "fsl,mpc8540-pci") 76 - fsl_add_bridge(np, 1); 77 70 #endif 78 71 } 79 72 ··· 86 93 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 87 94 } 88 95 89 - machine_device_initcall(stx_gp3, mpc85xx_common_publish_devices); 96 + machine_arch_initcall(stx_gp3, mpc85xx_common_publish_devices); 90 97 91 98 /* 92 99 * Called very early, device-tree isn't unflattened
+2 -19
arch/powerpc/platforms/85xx/tqm85xx.c
··· 59 59 */ 60 60 static void __init tqm85xx_setup_arch(void) 61 61 { 62 - #ifdef CONFIG_PCI 63 - struct device_node *np; 64 - #endif 65 - 66 62 if (ppc_md.progress) 67 63 ppc_md.progress("tqm85xx_setup_arch()", 0); 68 64 ··· 66 70 cpm2_reset(); 67 71 #endif 68 72 69 - #ifdef CONFIG_PCI 70 - for_each_node_by_type(np, "pci") { 71 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 72 - of_device_is_compatible(np, "fsl,mpc8548-pcie")) { 73 - struct resource rsrc; 74 - if (!of_address_to_resource(np, 0, &rsrc)) { 75 - if ((rsrc.start & 0xfffff) == 0x8000) 76 - fsl_add_bridge(np, 1); 77 - else 78 - fsl_add_bridge(np, 0); 79 - } 80 - } 81 - } 82 - #endif 73 + fsl_pci_assign_primary(); 83 74 } 84 75 85 76 static void tqm85xx_show_cpuinfo(struct seq_file *m) ··· 106 123 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520, 107 124 tqm85xx_ti1520_fixup); 108 125 109 - machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices); 126 + machine_arch_initcall(tqm85xx, mpc85xx_common_publish_devices); 110 127 111 128 static const char *board[] __initdata = { 112 129 "tqc,tqm8540",
+8 -48
arch/powerpc/platforms/85xx/xes_mpc85xx.c
··· 111 111 } 112 112 } 113 113 114 - #ifdef CONFIG_PCI 115 - static int primary_phb_addr; 116 - #endif 117 - 118 114 /* 119 115 * Setup the architecture 120 116 */ 121 117 static void __init xes_mpc85xx_setup_arch(void) 122 118 { 123 - #ifdef CONFIG_PCI 124 - struct device_node *np; 125 - #endif 126 119 struct device_node *root; 127 120 const char *model = "Unknown"; 128 121 ··· 130 137 131 138 xes_mpc85xx_fixups(); 132 139 133 - #ifdef CONFIG_PCI 134 - for_each_node_by_type(np, "pci") { 135 - if (of_device_is_compatible(np, "fsl,mpc8540-pci") || 136 - of_device_is_compatible(np, "fsl,mpc8548-pcie")) { 137 - struct resource rsrc; 138 - of_address_to_resource(np, 0, &rsrc); 139 - if ((rsrc.start & 0xfffff) == primary_phb_addr) 140 - fsl_add_bridge(np, 1); 141 - else 142 - fsl_add_bridge(np, 0); 143 - } 144 - } 145 - #endif 146 - 147 140 mpc85xx_smp_init(); 141 + 142 + fsl_pci_assign_primary(); 148 143 } 149 144 150 - machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices); 151 - machine_device_initcall(xes_mpc8548, mpc85xx_common_publish_devices); 152 - machine_device_initcall(xes_mpc8540, mpc85xx_common_publish_devices); 145 + machine_arch_initcall(xes_mpc8572, mpc85xx_common_publish_devices); 146 + machine_arch_initcall(xes_mpc8548, mpc85xx_common_publish_devices); 147 + machine_arch_initcall(xes_mpc8540, mpc85xx_common_publish_devices); 153 148 154 149 /* 155 150 * Called very early, device-tree isn't unflattened ··· 146 165 { 147 166 unsigned long root = of_get_flat_dt_root(); 148 167 149 - if (of_flat_dt_is_compatible(root, "xes,MPC8572")) { 150 - #ifdef CONFIG_PCI 151 - primary_phb_addr = 0x8000; 152 - #endif 153 - return 1; 154 - } else { 155 - return 0; 156 - } 168 + return of_flat_dt_is_compatible(root, "xes,MPC8572"); 157 169 } 158 170 159 171 static int __init xes_mpc8548_probe(void) 160 172 { 161 173 unsigned long root = of_get_flat_dt_root(); 162 174 163 - if (of_flat_dt_is_compatible(root, "xes,MPC8548")) { 164 - #ifdef CONFIG_PCI 165 - primary_phb_addr = 0xb000; 166 - #endif 167 - return 1; 168 - } else { 169 - return 0; 170 - } 175 + return of_flat_dt_is_compatible(root, "xes,MPC8548"); 171 176 } 172 177 173 178 static int __init xes_mpc8540_probe(void) 174 179 { 175 180 unsigned long root = of_get_flat_dt_root(); 176 181 177 - if (of_flat_dt_is_compatible(root, "xes,MPC8540")) { 178 - #ifdef CONFIG_PCI 179 - primary_phb_addr = 0xb000; 180 - #endif 181 - return 1; 182 - } else { 183 - return 0; 184 - } 182 + return of_flat_dt_is_compatible(root, "xes,MPC8540"); 185 183 } 186 184 187 185 define_machine(xes_mpc8572) {
+4 -8
arch/powerpc/platforms/86xx/gef_ppc9a.c
··· 73 73 static void __init gef_ppc9a_setup_arch(void) 74 74 { 75 75 struct device_node *regs; 76 - #ifdef CONFIG_PCI 77 - struct device_node *np; 78 - 79 - for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { 80 - fsl_add_bridge(np, 1); 81 - } 82 - #endif 83 76 84 77 printk(KERN_INFO "GE Intelligent Platforms PPC9A 6U VME SBC\n"); 85 78 86 79 #ifdef CONFIG_SMP 87 80 mpc86xx_smp_init(); 88 81 #endif 82 + 83 + fsl_pci_assign_primary(); 89 84 90 85 /* Remap basic board registers */ 91 86 regs = of_find_compatible_node(NULL, NULL, "gef,ppc9a-fpga-regs"); ··· 216 221 static __initdata struct of_device_id of_bus_ids[] = { 217 222 { .compatible = "simple-bus", }, 218 223 { .compatible = "gianfar", }, 224 + { .compatible = "fsl,mpc8641-pcie", }, 219 225 {}, 220 226 }; 221 227 ··· 227 231 228 232 return 0; 229 233 } 230 - machine_device_initcall(gef_ppc9a, declare_of_platform_devices); 234 + machine_arch_initcall(gef_ppc9a, declare_of_platform_devices); 231 235 232 236 define_machine(gef_ppc9a) { 233 237 .name = "GE PPC9A",
+4 -9
arch/powerpc/platforms/86xx/gef_sbc310.c
··· 73 73 static void __init gef_sbc310_setup_arch(void) 74 74 { 75 75 struct device_node *regs; 76 - #ifdef CONFIG_PCI 77 - struct device_node *np; 78 - 79 - for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { 80 - fsl_add_bridge(np, 1); 81 - } 82 - #endif 83 - 84 76 printk(KERN_INFO "GE Intelligent Platforms SBC310 6U VPX SBC\n"); 85 77 86 78 #ifdef CONFIG_SMP 87 79 mpc86xx_smp_init(); 88 80 #endif 81 + 82 + fsl_pci_assign_primary(); 89 83 90 84 /* Remap basic board registers */ 91 85 regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); ··· 203 209 static __initdata struct of_device_id of_bus_ids[] = { 204 210 { .compatible = "simple-bus", }, 205 211 { .compatible = "gianfar", }, 212 + { .compatible = "fsl,mpc8641-pcie", }, 206 213 {}, 207 214 }; 208 215 ··· 214 219 215 220 return 0; 216 221 } 217 - machine_device_initcall(gef_sbc310, declare_of_platform_devices); 222 + machine_arch_initcall(gef_sbc310, declare_of_platform_devices); 218 223 219 224 define_machine(gef_sbc310) { 220 225 .name = "GE SBC310",
+4 -8
arch/powerpc/platforms/86xx/gef_sbc610.c
··· 73 73 static void __init gef_sbc610_setup_arch(void) 74 74 { 75 75 struct device_node *regs; 76 - #ifdef CONFIG_PCI 77 - struct device_node *np; 78 - 79 - for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { 80 - fsl_add_bridge(np, 1); 81 - } 82 - #endif 83 76 84 77 printk(KERN_INFO "GE Intelligent Platforms SBC610 6U VPX SBC\n"); 85 78 86 79 #ifdef CONFIG_SMP 87 80 mpc86xx_smp_init(); 88 81 #endif 82 + 83 + fsl_pci_assign_primary(); 89 84 90 85 /* Remap basic board registers */ 91 86 regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); ··· 193 198 static __initdata struct of_device_id of_bus_ids[] = { 194 199 { .compatible = "simple-bus", }, 195 200 { .compatible = "gianfar", }, 201 + { .compatible = "fsl,mpc8641-pcie", }, 196 202 {}, 197 203 }; 198 204 ··· 204 208 205 209 return 0; 206 210 } 207 - machine_device_initcall(gef_sbc610, declare_of_platform_devices); 211 + machine_arch_initcall(gef_sbc610, declare_of_platform_devices); 208 212 209 213 define_machine(gef_sbc610) { 210 214 .name = "GE SBC610",
+6 -15
arch/powerpc/platforms/86xx/mpc8610_hpcd.c
··· 91 91 { .compatible = "simple-bus", }, 92 92 /* So that the DMA channel nodes can be probed individually: */ 93 93 { .compatible = "fsl,eloplus-dma", }, 94 + /* PCI controllers */ 95 + { .compatible = "fsl,mpc8610-pci", }, 96 + { .compatible = "fsl,mpc8641-pcie", }, 94 97 {} 95 98 }; 96 99 ··· 110 107 111 108 return 0; 112 109 } 113 - machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); 110 + machine_arch_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); 114 111 115 112 #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 116 113 ··· 281 278 static void __init mpc86xx_hpcd_setup_arch(void) 282 279 { 283 280 struct resource r; 284 - struct device_node *np; 285 281 unsigned char *pixis; 286 282 287 283 if (ppc_md.progress) 288 284 ppc_md.progress("mpc86xx_hpcd_setup_arch()", 0); 289 285 290 - #ifdef CONFIG_PCI 291 - for_each_node_by_type(np, "pci") { 292 - if (of_device_is_compatible(np, "fsl,mpc8610-pci") 293 - || of_device_is_compatible(np, "fsl,mpc8641-pcie")) { 294 - struct resource rsrc; 295 - of_address_to_resource(np, 0, &rsrc); 296 - if ((rsrc.start & 0xfffff) == 0xa000) 297 - fsl_add_bridge(np, 1); 298 - else 299 - fsl_add_bridge(np, 0); 300 - } 301 - } 302 - #endif 286 + fsl_pci_assign_primary(); 287 + 303 288 #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 304 289 diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format; 305 290 diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table;
+6 -36
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
··· 19 19 #include <linux/delay.h> 20 20 #include <linux/seq_file.h> 21 21 #include <linux/of_platform.h> 22 - #include <linux/memblock.h> 23 22 24 23 #include <asm/time.h> 25 24 #include <asm/machdep.h> ··· 50 51 static int mpc86xx_exclude_device(struct pci_controller *hose, 51 52 u_char bus, u_char devfn) 52 53 { 53 - struct device_node* node; 54 - struct resource rsrc; 55 - 56 - node = hose->dn; 57 - of_address_to_resource(node, 0, &rsrc); 58 - 59 - if ((rsrc.start & 0xfffff) == 0x8000) { 54 + if (hose->dn == fsl_pci_primary) 60 55 return uli_exclude_device(hose, bus, devfn); 61 - } 62 56 63 57 return PCIBIOS_SUCCESSFUL; 64 58 } ··· 61 69 static void __init 62 70 mpc86xx_hpcn_setup_arch(void) 63 71 { 64 - #ifdef CONFIG_PCI 65 - struct device_node *np; 66 - struct pci_controller *hose; 67 - #endif 68 - dma_addr_t max = 0xffffffff; 69 - 70 72 if (ppc_md.progress) 71 73 ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); 72 74 73 75 #ifdef CONFIG_PCI 74 - for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { 75 - struct resource rsrc; 76 - of_address_to_resource(np, 0, &rsrc); 77 - if ((rsrc.start & 0xfffff) == 0x8000) 78 - fsl_add_bridge(np, 1); 79 - else 80 - fsl_add_bridge(np, 0); 81 - hose = pci_find_hose_for_OF_device(np); 82 - max = min(max, hose->dma_window_base_cur + 83 - hose->dma_window_size); 84 - } 85 - 86 76 ppc_md.pci_exclude_device = mpc86xx_exclude_device; 87 - 88 77 #endif 89 78 90 79 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); ··· 74 101 mpc86xx_smp_init(); 75 102 #endif 76 103 77 - #ifdef CONFIG_SWIOTLB 78 - if ((memblock_end_of_DRAM() - 1) > max) { 79 - ppc_swiotlb_enable = 1; 80 - set_pci_dma_ops(&swiotlb_dma_ops); 81 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 82 - } 83 - #endif 104 + fsl_pci_assign_primary(); 105 + 106 + swiotlb_detect_4g(); 84 107 } 85 108 86 109 ··· 131 162 { .compatible = "simple-bus", }, 132 163 { .compatible = "fsl,srio", }, 133 164 { .compatible = "gianfar", }, 165 + { .compatible = "fsl,mpc8641-pcie", }, 134 166 {}, 135 167 }; 136 168 ··· 141 171 142 172 return 0; 143 173 } 144 - machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices); 174 + machine_arch_initcall(mpc86xx_hpcn, declare_of_platform_devices); 145 175 machine_arch_initcall(mpc86xx_hpcn, swiotlb_setup_bus_notifier); 146 176 147 177 define_machine(mpc86xx_hpcn) {
+4 -10
arch/powerpc/platforms/86xx/sbc8641d.c
··· 38 38 static void __init 39 39 sbc8641_setup_arch(void) 40 40 { 41 - #ifdef CONFIG_PCI 42 - struct device_node *np; 43 - #endif 44 - 45 41 if (ppc_md.progress) 46 42 ppc_md.progress("sbc8641_setup_arch()", 0); 47 - 48 - #ifdef CONFIG_PCI 49 - for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") 50 - fsl_add_bridge(np, 0); 51 - #endif 52 43 53 44 printk("SBC8641 board from Wind River\n"); 54 45 55 46 #ifdef CONFIG_SMP 56 47 mpc86xx_smp_init(); 57 48 #endif 49 + 50 + fsl_pci_assign_primary(); 58 51 } 59 52 60 53 ··· 95 102 static __initdata struct of_device_id of_bus_ids[] = { 96 103 { .compatible = "simple-bus", }, 97 104 { .compatible = "gianfar", }, 105 + { .compatible = "fsl,mpc8641-pcie", }, 98 106 {}, 99 107 }; 100 108 ··· 105 111 106 112 return 0; 107 113 } 108 - machine_device_initcall(sbc8641, declare_of_platform_devices); 114 + machine_arch_initcall(sbc8641, declare_of_platform_devices); 109 115 110 116 define_machine(sbc8641) { 111 117 .name = "SBC8641D",
+1 -1
arch/powerpc/sysdev/Makefile
··· 15 15 obj-$(CONFIG_PPC_PMI) += pmi.o 16 16 obj-$(CONFIG_U3_DART) += dart_iommu.o 17 17 obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 18 - obj-$(CONFIG_FSL_SOC) += fsl_soc.o 18 + obj-$(CONFIG_FSL_SOC) += fsl_soc.o fsl_mpic_err.o 19 19 obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y) 20 20 obj-$(CONFIG_FSL_PMC) += fsl_pmc.o 21 21 obj-$(CONFIG_FSL_LBC) += fsl_lbc.o
+10
arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
··· 193 193 { 194 194 .compatible = "fsl,mpc8548-l2-cache-controller", 195 195 }, 196 + { .compatible = "fsl,mpc8544-l2-cache-controller",}, 197 + { .compatible = "fsl,mpc8572-l2-cache-controller",}, 198 + { .compatible = "fsl,mpc8536-l2-cache-controller",}, 199 + { .compatible = "fsl,p1021-l2-cache-controller",}, 200 + { .compatible = "fsl,p1012-l2-cache-controller",}, 201 + { .compatible = "fsl,p1025-l2-cache-controller",}, 202 + { .compatible = "fsl,p1016-l2-cache-controller",}, 203 + { .compatible = "fsl,p1024-l2-cache-controller",}, 204 + { .compatible = "fsl,p1015-l2-cache-controller",}, 205 + { .compatible = "fsl,p1010-l2-cache-controller",}, 196 206 {}, 197 207 }; 198 208
+149
arch/powerpc/sysdev/fsl_mpic_err.c
··· 1 + /* 2 + * Copyright (C) 2012 Freescale Semiconductor, Inc. 3 + * 4 + * Author: Varun Sethi <varun.sethi@freescale.com> 5 + * 6 + * This program is free software; you can redistribute it and/or 7 + * modify it under the terms of the GNU General Public License 8 + * as published by the Free Software Foundation; version 2 of the 9 + * License. 10 + * 11 + */ 12 + 13 + #include <linux/irq.h> 14 + #include <linux/smp.h> 15 + #include <linux/interrupt.h> 16 + 17 + #include <asm/io.h> 18 + #include <asm/irq.h> 19 + #include <asm/mpic.h> 20 + 21 + #include "mpic.h" 22 + 23 + #define MPIC_ERR_INT_BASE 0x3900 24 + #define MPIC_ERR_INT_EISR 0x0000 25 + #define MPIC_ERR_INT_EIMR 0x0010 26 + 27 + static inline u32 mpic_fsl_err_read(u32 __iomem *base, unsigned int err_reg) 28 + { 29 + return in_be32(base + (err_reg >> 2)); 30 + } 31 + 32 + static inline void mpic_fsl_err_write(u32 __iomem *base, u32 value) 33 + { 34 + out_be32(base + (MPIC_ERR_INT_EIMR >> 2), value); 35 + } 36 + 37 + static void fsl_mpic_mask_err(struct irq_data *d) 38 + { 39 + u32 eimr; 40 + struct mpic *mpic = irq_data_get_irq_chip_data(d); 41 + unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0]; 42 + 43 + eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR); 44 + eimr |= (1 << (31 - src)); 45 + mpic_fsl_err_write(mpic->err_regs, eimr); 46 + } 47 + 48 + static void fsl_mpic_unmask_err(struct irq_data *d) 49 + { 50 + u32 eimr; 51 + struct mpic *mpic = irq_data_get_irq_chip_data(d); 52 + unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0]; 53 + 54 + eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR); 55 + eimr &= ~(1 << (31 - src)); 56 + mpic_fsl_err_write(mpic->err_regs, eimr); 57 + } 58 + 59 + static struct irq_chip fsl_mpic_err_chip = { 60 + .irq_disable = fsl_mpic_mask_err, 61 + .irq_mask = fsl_mpic_mask_err, 62 + .irq_unmask = fsl_mpic_unmask_err, 63 + }; 64 + 65 + int mpic_setup_error_int(struct mpic *mpic, int intvec) 66 + { 67 + int i; 68 + 69 + mpic->err_regs = ioremap(mpic->paddr + MPIC_ERR_INT_BASE, 0x1000); 70 + if (!mpic->err_regs) { 71 + pr_err("could not map mpic error registers\n"); 72 + return -ENOMEM; 73 + } 74 + mpic->hc_err = fsl_mpic_err_chip; 75 + mpic->hc_err.name = mpic->name; 76 + mpic->flags |= MPIC_FSL_HAS_EIMR; 77 + /* allocate interrupt vectors for error interrupts */ 78 + for (i = MPIC_MAX_ERR - 1; i >= 0; i--) 79 + mpic->err_int_vecs[i] = --intvec; 80 + 81 + return 0; 82 + } 83 + 84 + int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw) 85 + { 86 + if ((mpic->flags & MPIC_FSL_HAS_EIMR) && 87 + (hw >= mpic->err_int_vecs[0] && 88 + hw <= mpic->err_int_vecs[MPIC_MAX_ERR - 1])) { 89 + WARN_ON(mpic->flags & MPIC_SECONDARY); 90 + 91 + pr_debug("mpic: mapping as Error Interrupt\n"); 92 + irq_set_chip_data(virq, mpic); 93 + irq_set_chip_and_handler(virq, &mpic->hc_err, 94 + handle_level_irq); 95 + return 1; 96 + } 97 + 98 + return 0; 99 + } 100 + 101 + static irqreturn_t fsl_error_int_handler(int irq, void *data) 102 + { 103 + struct mpic *mpic = (struct mpic *) data; 104 + u32 eisr, eimr; 105 + int errint; 106 + unsigned int cascade_irq; 107 + 108 + eisr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EISR); 109 + eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR); 110 + 111 + if (!(eisr & ~eimr)) 112 + return IRQ_NONE; 113 + 114 + while (eisr) { 115 + errint = __builtin_clz(eisr); 116 + cascade_irq = irq_linear_revmap(mpic->irqhost, 117 + mpic->err_int_vecs[errint]); 118 + WARN_ON(cascade_irq == NO_IRQ); 119 + if (cascade_irq != NO_IRQ) { 120 + generic_handle_irq(cascade_irq); 121 + } else { 122 + eimr |= 1 << (31 - errint); 123 + mpic_fsl_err_write(mpic->err_regs, eimr); 124 + } 125 + eisr &= ~(1 << (31 - errint)); 126 + } 127 + 128 + return IRQ_HANDLED; 129 + } 130 + 131 + void mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum) 132 + { 133 + unsigned int virq; 134 + int ret; 135 + 136 + virq = irq_create_mapping(mpic->irqhost, irqnum); 137 + if (virq == NO_IRQ) { 138 + pr_err("Error interrupt setup failed\n"); 139 + return; 140 + } 141 + 142 + /* Mask all error interrupts */ 143 + mpic_fsl_err_write(mpic->err_regs, ~0); 144 + 145 + ret = request_irq(virq, fsl_error_int_handler, IRQF_NO_THREAD, 146 + "mpic-error-int", mpic); 147 + if (ret) 148 + pr_err("Failed to register error interrupt handler\n"); 149 + }
+73 -49
arch/powerpc/sysdev/fsl_pci.c
··· 143 143 pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n", 144 144 (u64)rsrc->start, (u64)resource_size(rsrc)); 145 145 146 - if (of_device_is_compatible(hose->dn, "fsl,qoriq-pcie-v2.2")) { 147 - win_idx = 2; 148 - start_idx = 0; 149 - end_idx = 3; 150 - } 151 - 152 146 pci = ioremap(rsrc->start, resource_size(rsrc)); 153 147 if (!pci) { 154 148 dev_err(hose->parent, "Unable to map ATMU registers\n"); 155 149 return; 150 + } 151 + 152 + if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { 153 + if (in_be32(&pci->block_rev1) >= PCIE_IP_REV_2_2) { 154 + win_idx = 2; 155 + start_idx = 0; 156 + end_idx = 3; 157 + } 156 158 } 157 159 158 160 /* Disable all windows (except powar0 since it's ignored) */ ··· 820 818 { .compatible = "fsl,p1010-pcie", }, 821 819 { .compatible = "fsl,p1023-pcie", }, 822 820 { .compatible = "fsl,p4080-pcie", }, 821 + { .compatible = "fsl,qoriq-pcie-v2.4", }, 823 822 { .compatible = "fsl,qoriq-pcie-v2.3", }, 824 823 { .compatible = "fsl,qoriq-pcie-v2.2", }, 825 824 {}, ··· 828 825 829 826 struct device_node *fsl_pci_primary; 830 827 831 - void __devinit fsl_pci_init(void) 828 + void fsl_pci_assign_primary(void) 829 + { 830 + struct device_node *np; 831 + 832 + /* Callers can specify the primary bus using other means. */ 833 + if (fsl_pci_primary) 834 + return; 835 + 836 + /* If a PCI host bridge contains an ISA node, it's primary. */ 837 + np = of_find_node_by_type(NULL, "isa"); 838 + while ((fsl_pci_primary = of_get_parent(np))) { 839 + of_node_put(np); 840 + np = fsl_pci_primary; 841 + 842 + if (of_match_node(pci_ids, np) && of_device_is_available(np)) 843 + return; 844 + } 845 + 846 + /* 847 + * If there's no PCI host bridge with ISA, arbitrarily 848 + * designate one as primary. This can go away once 849 + * various bugs with primary-less systems are fixed. 850 + */ 851 + for_each_matching_node(np, pci_ids) { 852 + if (of_device_is_available(np)) { 853 + fsl_pci_primary = np; 854 + of_node_put(np); 855 + return; 856 + } 857 + } 858 + } 859 + 860 + static int __devinit fsl_pci_probe(struct platform_device *pdev) 832 861 { 833 862 int ret; 834 863 struct device_node *node; 835 864 struct pci_controller *hose; 836 - dma_addr_t max = 0xffffffff; 837 865 838 - /* Callers can specify the primary bus using other means. */ 839 - if (!fsl_pci_primary) { 840 - /* If a PCI host bridge contains an ISA node, it's primary. */ 841 - node = of_find_node_by_type(NULL, "isa"); 842 - while ((fsl_pci_primary = of_get_parent(node))) { 843 - of_node_put(node); 844 - node = fsl_pci_primary; 845 - 846 - if (of_match_node(pci_ids, node)) 847 - break; 848 - } 849 - } 850 - 851 - node = NULL; 852 - for_each_node_by_type(node, "pci") { 853 - if (of_match_node(pci_ids, node)) { 854 - /* 855 - * If there's no PCI host bridge with ISA, arbitrarily 856 - * designate one as primary. This can go away once 857 - * various bugs with primary-less systems are fixed. 858 - */ 859 - if (!fsl_pci_primary) 860 - fsl_pci_primary = node; 861 - 862 - ret = fsl_add_bridge(node, fsl_pci_primary == node); 863 - if (ret == 0) { 864 - hose = pci_find_hose_for_OF_device(node); 865 - max = min(max, hose->dma_window_base_cur + 866 - hose->dma_window_size); 867 - } 868 - } 869 - } 866 + node = pdev->dev.of_node; 867 + ret = fsl_add_bridge(node, fsl_pci_primary == node); 870 868 871 869 #ifdef CONFIG_SWIOTLB 872 - /* 873 - * if we couldn't map all of DRAM via the dma windows 874 - * we need SWIOTLB to handle buffers located outside of 875 - * dma capable memory region 876 - */ 877 - if (memblock_end_of_DRAM() - 1 > max) { 878 - ppc_swiotlb_enable = 1; 879 - set_pci_dma_ops(&swiotlb_dma_ops); 880 - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; 870 + if (ret == 0) { 871 + hose = pci_find_hose_for_OF_device(pdev->dev.of_node); 872 + 873 + /* 874 + * if we couldn't map all of DRAM via the dma windows 875 + * we need SWIOTLB to handle buffers located outside of 876 + * dma capable memory region 877 + */ 878 + if (memblock_end_of_DRAM() - 1 > hose->dma_window_base_cur + 879 + hose->dma_window_size) 880 + ppc_swiotlb_enable = 1; 881 881 } 882 882 #endif 883 + 884 + mpc85xx_pci_err_probe(pdev); 885 + 886 + return 0; 883 887 } 888 + 889 + static struct platform_driver fsl_pci_driver = { 890 + .driver = { 891 + .name = "fsl-pci", 892 + .of_match_table = pci_ids, 893 + }, 894 + .probe = fsl_pci_probe, 895 + }; 896 + 897 + static int __init fsl_pci_init(void) 898 + { 899 + return platform_driver_register(&fsl_pci_driver); 900 + } 901 + arch_initcall(fsl_pci_init); 884 902 #endif
+16 -4
arch/powerpc/sysdev/fsl_pci.h
··· 16 16 17 17 #define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */ 18 18 #define PCIE_LTSSM_L0 0x16 /* L0 state */ 19 + #define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block version Rev2.2 */ 19 20 #define PIWAR_EN 0x80000000 /* Enable */ 20 21 #define PIWAR_PF 0x20000000 /* prefetch */ 21 22 #define PIWAR_TGI_LOCAL 0x00f00000 /* target - local memory */ ··· 58 57 __be32 pex_pme_mes_disr; /* 0x.024 - PCIE PME and message disable register */ 59 58 __be32 pex_pme_mes_ier; /* 0x.028 - PCIE PME and message interrupt enable register */ 60 59 __be32 pex_pmcr; /* 0x.02c - PCIE power management command register */ 61 - u8 res3[3024]; 60 + u8 res3[3016]; 61 + __be32 block_rev1; /* 0x.bf8 - PCIE Block Revision register 1 */ 62 + __be32 block_rev2; /* 0x.bfc - PCIE Block Revision register 2 */ 62 63 63 64 /* PCI/PCI Express outbound window 0-4 64 65 * Window 0 is the default window and is the only window enabled upon reset. ··· 98 95 99 96 extern struct device_node *fsl_pci_primary; 100 97 101 - #ifdef CONFIG_FSL_PCI 102 - void fsl_pci_init(void); 98 + #ifdef CONFIG_PCI 99 + void fsl_pci_assign_primary(void); 103 100 #else 104 - static inline void fsl_pci_init(void) {} 101 + static inline void fsl_pci_assign_primary(void) {} 102 + #endif 103 + 104 + #ifdef CONFIG_EDAC_MPC85XX 105 + int mpc85xx_pci_err_probe(struct platform_device *op); 106 + #else 107 + static inline int mpc85xx_pci_err_probe(struct platform_device *op) 108 + { 109 + return -ENOTSUPP; 110 + } 105 111 #endif 106 112 107 113 #endif /* __POWERPC_FSL_PCI_H */
+85 -17
arch/powerpc/sysdev/mpic.c
··· 6 6 * with various broken implementations of this HW. 7 7 * 8 8 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. 9 - * Copyright 2010-2011 Freescale Semiconductor, Inc. 9 + * Copyright 2010-2012 Freescale Semiconductor, Inc. 10 10 * 11 11 * This file is subject to the terms and conditions of the GNU General Public 12 12 * License. See the file COPYING in the main directory of this archive ··· 221 221 _mpic_write(mpic->reg_type, &mpic->gregs, offset, value); 222 222 } 223 223 224 + static inline unsigned int mpic_tm_offset(struct mpic *mpic, unsigned int tm) 225 + { 226 + return (tm >> 2) * MPIC_TIMER_GROUP_STRIDE + 227 + (tm & 3) * MPIC_INFO(TIMER_STRIDE); 228 + } 229 + 224 230 static inline u32 _mpic_tm_read(struct mpic *mpic, unsigned int tm) 225 231 { 226 - unsigned int offset = MPIC_INFO(TIMER_VECTOR_PRI) + 227 - ((tm & 3) * MPIC_INFO(TIMER_STRIDE)); 228 - 229 - if (tm >= 4) 230 - offset += 0x1000 / 4; 232 + unsigned int offset = mpic_tm_offset(mpic, tm) + 233 + MPIC_INFO(TIMER_VECTOR_PRI); 231 234 232 235 return _mpic_read(mpic->reg_type, &mpic->tmregs, offset); 233 236 } 234 237 235 238 static inline void _mpic_tm_write(struct mpic *mpic, unsigned int tm, u32 value) 236 239 { 237 - unsigned int offset = MPIC_INFO(TIMER_VECTOR_PRI) + 238 - ((tm & 3) * MPIC_INFO(TIMER_STRIDE)); 239 - 240 - if (tm >= 4) 241 - offset += 0x1000 / 4; 240 + unsigned int offset = mpic_tm_offset(mpic, tm) + 241 + MPIC_INFO(TIMER_VECTOR_PRI); 242 242 243 243 _mpic_write(mpic->reg_type, &mpic->tmregs, offset, value); 244 244 } ··· 1026 1026 return 0; 1027 1027 } 1028 1028 1029 + if (mpic_map_error_int(mpic, virq, hw)) 1030 + return 0; 1031 + 1029 1032 if (hw >= mpic->num_sources) 1030 1033 return -EINVAL; 1031 1034 ··· 1088 1085 */ 1089 1086 switch (intspec[2]) { 1090 1087 case 0: 1091 - case 1: /* no EISR/EIMR support for now, treat as shared IRQ */ 1088 + break; 1089 + case 1: 1090 + if (!(mpic->flags & MPIC_FSL_HAS_EIMR)) 1091 + break; 1092 + 1093 + if (intspec[3] >= ARRAY_SIZE(mpic->err_int_vecs)) 1094 + return -EINVAL; 1095 + 1096 + *out_hwirq = mpic->err_int_vecs[intspec[3]]; 1097 + 1092 1098 break; 1093 1099 case 2: 1094 1100 if (intspec[0] >= ARRAY_SIZE(mpic->ipi_vecs)) ··· 1313 1301 mpic_map(mpic, mpic->paddr, &mpic->gregs, MPIC_INFO(GREG_BASE), 0x1000); 1314 1302 mpic_map(mpic, mpic->paddr, &mpic->tmregs, MPIC_INFO(TIMER_BASE), 0x1000); 1315 1303 1304 + if (mpic->flags & MPIC_FSL) { 1305 + u32 brr1, version; 1306 + int ret; 1307 + 1308 + /* 1309 + * Yes, Freescale really did put global registers in the 1310 + * magic per-cpu area -- and they don't even show up in the 1311 + * non-magic per-cpu copies that this driver normally uses. 1312 + */ 1313 + mpic_map(mpic, mpic->paddr, &mpic->thiscpuregs, 1314 + MPIC_CPU_THISBASE, 0x1000); 1315 + 1316 + brr1 = _mpic_read(mpic->reg_type, &mpic->thiscpuregs, 1317 + MPIC_FSL_BRR1); 1318 + version = brr1 & MPIC_FSL_BRR1_VER; 1319 + 1320 + /* Error interrupt mask register (EIMR) is required for 1321 + * handling individual device error interrupts. EIMR 1322 + * was added in MPIC version 4.1. 1323 + * 1324 + * Over here we reserve vector number space for error 1325 + * interrupt vectors. This space is stolen from the 1326 + * global vector number space, as in case of ipis 1327 + * and timer interrupts. 1328 + * 1329 + * Available vector space = intvec_top - 12, where 12 1330 + * is the number of vectors which have been consumed by 1331 + * ipis and timer interrupts. 1332 + */ 1333 + if (version >= 0x401) { 1334 + ret = mpic_setup_error_int(mpic, intvec_top - 12); 1335 + if (ret) 1336 + return NULL; 1337 + } 1338 + } 1339 + 1316 1340 /* Reset */ 1317 1341 1318 1342 /* When using a device-node, reset requests are only honored if the MPIC ··· 1488 1440 void __init mpic_init(struct mpic *mpic) 1489 1441 { 1490 1442 int i, cpu; 1443 + int num_timers = 4; 1491 1444 1492 1445 BUG_ON(mpic->num_sources == 0); 1493 1446 ··· 1497 1448 /* Set current processor priority to max */ 1498 1449 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf); 1499 1450 1451 + if (mpic->flags & MPIC_FSL) { 1452 + u32 brr1 = _mpic_read(mpic->reg_type, &mpic->thiscpuregs, 1453 + MPIC_FSL_BRR1); 1454 + u32 version = brr1 & MPIC_FSL_BRR1_VER; 1455 + 1456 + /* 1457 + * Timer group B is present at the latest in MPIC 3.1 (e.g. 1458 + * mpc8536). It is not present in MPIC 2.0 (e.g. mpc8544). 1459 + * I don't know about the status of intermediate versions (or 1460 + * whether they even exist). 1461 + */ 1462 + if (version >= 0x0301) 1463 + num_timers = 8; 1464 + } 1465 + 1466 + /* FSL mpic error interrupt intialization */ 1467 + if (mpic->flags & MPIC_FSL_HAS_EIMR) 1468 + mpic_err_int_init(mpic, MPIC_FSL_ERR_INT); 1469 + 1500 1470 /* Initialize timers to our reserved vectors and mask them for now */ 1501 - for (i = 0; i < 4; i++) { 1471 + for (i = 0; i < num_timers; i++) { 1472 + unsigned int offset = mpic_tm_offset(mpic, i); 1473 + 1502 1474 mpic_write(mpic->tmregs, 1503 - i * MPIC_INFO(TIMER_STRIDE) + 1504 - MPIC_INFO(TIMER_DESTINATION), 1475 + offset + MPIC_INFO(TIMER_DESTINATION), 1505 1476 1 << hard_smp_processor_id()); 1506 1477 mpic_write(mpic->tmregs, 1507 - i * MPIC_INFO(TIMER_STRIDE) + 1508 - MPIC_INFO(TIMER_VECTOR_PRI), 1478 + offset + MPIC_INFO(TIMER_VECTOR_PRI), 1509 1479 MPIC_VECPRI_MASK | 1510 1480 (9 << MPIC_VECPRI_PRIORITY_SHIFT) | 1511 1481 (mpic->timer_vecs[0] + i));
+22
arch/powerpc/sysdev/mpic.h
··· 40 40 const struct cpumask *cpumask, bool force); 41 41 extern void mpic_reset_core(int cpu); 42 42 43 + #ifdef CONFIG_FSL_SOC 44 + extern int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw); 45 + extern void mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum); 46 + extern int mpic_setup_error_int(struct mpic *mpic, int intvec); 47 + #else 48 + static inline int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw) 49 + { 50 + return 0; 51 + } 52 + 53 + 54 + static inline void mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum) 55 + { 56 + return; 57 + } 58 + 59 + static inline int mpic_setup_error_int(struct mpic *mpic, int intvec) 60 + { 61 + return -1; 62 + } 63 + #endif 64 + 43 65 #endif /* _POWERPC_SYSDEV_MPIC_H */
+12 -31
drivers/edac/mpc85xx_edac.c
··· 212 212 return IRQ_HANDLED; 213 213 } 214 214 215 - static int __devinit mpc85xx_pci_err_probe(struct platform_device *op) 215 + int __devinit mpc85xx_pci_err_probe(struct platform_device *op) 216 216 { 217 217 struct edac_pci_ctl_info *pci; 218 218 struct mpc85xx_pci_pdata *pdata; ··· 225 225 pci = edac_pci_alloc_ctl_info(sizeof(*pdata), "mpc85xx_pci_err"); 226 226 if (!pci) 227 227 return -ENOMEM; 228 + 229 + /* make sure error reporting method is sane */ 230 + switch (edac_op_state) { 231 + case EDAC_OPSTATE_POLL: 232 + case EDAC_OPSTATE_INT: 233 + break; 234 + default: 235 + edac_op_state = EDAC_OPSTATE_INT; 236 + break; 237 + } 228 238 229 239 pdata = pci->pvt_info; 230 240 pdata->name = "mpc85xx_pci_err"; ··· 325 315 devres_release_group(&op->dev, mpc85xx_pci_err_probe); 326 316 return res; 327 317 } 318 + EXPORT_SYMBOL(mpc85xx_pci_err_probe); 328 319 329 320 static int mpc85xx_pci_err_remove(struct platform_device *op) 330 321 { ··· 348 337 349 338 return 0; 350 339 } 351 - 352 - static struct of_device_id mpc85xx_pci_err_of_match[] = { 353 - { 354 - .compatible = "fsl,mpc8540-pcix", 355 - }, 356 - { 357 - .compatible = "fsl,mpc8540-pci", 358 - }, 359 - {}, 360 - }; 361 - MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match); 362 - 363 - static struct platform_driver mpc85xx_pci_err_driver = { 364 - .probe = mpc85xx_pci_err_probe, 365 - .remove = __devexit_p(mpc85xx_pci_err_remove), 366 - .driver = { 367 - .name = "mpc85xx_pci_err", 368 - .owner = THIS_MODULE, 369 - .of_match_table = mpc85xx_pci_err_of_match, 370 - }, 371 - }; 372 340 373 341 #endif /* CONFIG_PCI */ 374 342 ··· 1200 1210 if (res) 1201 1211 printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n"); 1202 1212 1203 - #ifdef CONFIG_PCI 1204 - res = platform_driver_register(&mpc85xx_pci_err_driver); 1205 - if (res) 1206 - printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n"); 1207 - #endif 1208 - 1209 1213 #ifdef CONFIG_FSL_SOC_BOOKE 1210 1214 pvr = mfspr(SPRN_PVR); 1211 1215 ··· 1235 1251 (PVR_VER(pvr) == PVR_VER_E500V2)) { 1236 1252 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); 1237 1253 } 1238 - #endif 1239 - #ifdef CONFIG_PCI 1240 - platform_driver_unregister(&mpc85xx_pci_err_driver); 1241 1254 #endif 1242 1255 platform_driver_unregister(&mpc85xx_l2_err_driver); 1243 1256 platform_driver_unregister(&mpc85xx_mc_err_driver);