···1212- #size-cells : Either one or two, depending on how large each chipselect1313 can be.1414- reg : Offset and length of the register set for the device1515-- interrupts : IFC has two interrupts. The first one is the "common"1616- interrupt(CM_EVTER_STAT), and second is the NAND interrupt1717- (NAND_EVTER_STAT).1515+- interrupts: IFC may have one or two interrupts. If two interrupt1616+ specifiers are present, the first is the "common"1717+ interrupt (CM_EVTER_STAT), and the second is the NAND1818+ interrupt (NAND_EVTER_STAT). If there is only one,1919+ that interrupt reports both types of event.2020+18211922- ranges : Each range corresponds to a single chipselect, and covers2023 the entire access window as configured.
+4-2
arch/powerpc/Kconfig
···215215config ARCH_SUSPEND_POSSIBLE216216 def_bool y217217 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \218218- (PPC_85xx && !SMP) || PPC_86xx || PPC_PSERIES || 44x || 40x218218+ (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \219219+ || 44x || 40x219220220221config PPC_DCR_NATIVE221222 bool···329328330329config HOTPLUG_CPU331330 bool "Support for enabling/disabling CPUs"332332- depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV)331331+ depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || \332332+ PPC_PMAC || PPC_POWERNV || (PPC_85xx && !PPC_E500MC))333333 ---help---334334 Say Y here to be able to disable and re-enable individual335335 CPUs at runtime on SMP machines.
+58
arch/powerpc/boot/dts/fsl/e500mc_power_isa.dtsi
···11+/*22+ * e500mc Power ISA Device Tree Source (include)33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY2424+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED2525+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE2626+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY2727+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES2828+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;2929+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND3030+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT3131+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS3232+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3333+ */3434+3535+/ {3636+ cpus {3737+ power-isa-version = "2.06";3838+ power-isa-b; // Base3939+ power-isa-e; // Embedded4040+ power-isa-atb; // Alternate Time Base4141+ power-isa-cs; // Cache Specification4242+ power-isa-ds; // Decorated Storage4343+ power-isa-e.ed; // Embedded.Enhanced Debug4444+ power-isa-e.pd; // Embedded.External PID4545+ power-isa-e.hv; // Embedded.Hypervisor4646+ power-isa-e.le; // Embedded.Little-Endian4747+ power-isa-e.pm; // Embedded.Performance Monitor4848+ power-isa-e.pc; // Embedded.Processor Control4949+ power-isa-ecl; // Embedded Cache Locking5050+ power-isa-exp; // External Proxy5151+ power-isa-fp; // Floating Point5252+ power-isa-fp.r; // Floating Point.Record5353+ power-isa-mmc; // Memory Coherence5454+ power-isa-scpm; // Store Conditional Page Mobility5555+ power-isa-wt; // Wait5656+ mmu-type = "power-embedded";5757+ };5858+};
+52
arch/powerpc/boot/dts/fsl/e500v2_power_isa.dtsi
···11+/*22+ * e500v2 Power ISA Device Tree Source (include)33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY2424+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED2525+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE2626+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY2727+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES2828+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;2929+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND3030+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT3131+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS3232+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3333+ */3434+3535+/ {3636+ cpus {3737+ power-isa-version = "2.03";3838+ power-isa-b; // Base3939+ power-isa-e; // Embedded4040+ power-isa-atb; // Alternate Time Base4141+ power-isa-cs; // Cache Specification4242+ power-isa-e.le; // Embedded.Little-Endian4343+ power-isa-e.pm; // Embedded.Performance Monitor4444+ power-isa-ecl; // Embedded Cache Locking4545+ power-isa-mmc; // Memory Coherence4646+ power-isa-sp; // Signal Processing Engine4747+ power-isa-sp.fd; // SPE.Embedded Float Scalar Double4848+ power-isa-sp.fs; // SPE.Embedded Float Scalar Single4949+ power-isa-sp.fv; // SPE.Embedded Float Vector5050+ mmu-type = "power-embedded";5151+ };5252+};
+59
arch/powerpc/boot/dts/fsl/e5500_power_isa.dtsi
···11+/*22+ * e5500 Power ISA Device Tree Source (include)33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY2424+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED2525+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE2626+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY2727+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES2828+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;2929+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND3030+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT3131+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS3232+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3333+ */3434+3535+/ {3636+ cpus {3737+ power-isa-version = "2.06";3838+ power-isa-b; // Base3939+ power-isa-e; // Embedded4040+ power-isa-atb; // Alternate Time Base4141+ power-isa-cs; // Cache Specification4242+ power-isa-ds; // Decorated Storage4343+ power-isa-e.ed; // Embedded.Enhanced Debug4444+ power-isa-e.pd; // Embedded.External PID4545+ power-isa-e.hv; // Embedded.Hypervisor4646+ power-isa-e.le; // Embedded.Little-Endian4747+ power-isa-e.pm; // Embedded.Performance Monitor4848+ power-isa-e.pc; // Embedded.Processor Control4949+ power-isa-ecl; // Embedded Cache Locking5050+ power-isa-exp; // External Proxy5151+ power-isa-fp; // Floating Point5252+ power-isa-fp.r; // Floating Point.Record5353+ power-isa-mmc; // Memory Coherence5454+ power-isa-scpm; // Store Conditional Page Mobility5555+ power-isa-wt; // Wait5656+ power-isa-64; // 64-bit5757+ mmu-type = "power-embedded";5858+ };5959+};
···11+/*22+ * P5040 Silicon/SoC Device Tree Source (post include)33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * This software is provided by Freescale Semiconductor "as is" and any2424+ * express or implied warranties, including, but not limited to, the implied2525+ * warranties of merchantability and fitness for a particular purpose are2626+ * disclaimed. In no event shall Freescale Semiconductor be liable for any2727+ * direct, indirect, incidental, special, exemplary, or consequential damages2828+ * (including, but not limited to, procurement of substitute goods or services;2929+ * loss of use, data, or profits; or business interruption) however caused and3030+ * on any theory of liability, whether in contract, strict liability, or tort3131+ * (including negligence or otherwise) arising in any way out of the use of this3232+ * software, even if advised of the possibility of such damage.3333+ */3434+3535+&lbc {3636+ compatible = "fsl,p5040-elbc", "fsl,elbc", "simple-bus";3737+ interrupts = <25 2 0 0>;3838+ #address-cells = <2>;3939+ #size-cells = <1>;4040+};4141+4242+/* controller at 0x200000 */4343+&pci0 {4444+ compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4";4545+ device_type = "pci";4646+ #size-cells = <2>;4747+ #address-cells = <3>;4848+ bus-range = <0x0 0xff>;4949+ clock-frequency = <33333333>;5050+ interrupts = <16 2 1 15>;5151+ pcie@0 {5252+ reg = <0 0 0 0 0>;5353+ #interrupt-cells = <1>;5454+ #size-cells = <2>;5555+ #address-cells = <3>;5656+ device_type = "pci";5757+ interrupts = <16 2 1 15>;5858+ interrupt-map-mask = <0xf800 0 0 7>;5959+ interrupt-map = <6060+ /* IDSEL 0x0 */6161+ 0000 0 0 1 &mpic 40 1 0 06262+ 0000 0 0 2 &mpic 1 1 0 06363+ 0000 0 0 3 &mpic 2 1 0 06464+ 0000 0 0 4 &mpic 3 1 0 06565+ >;6666+ };6767+};6868+6969+/* controller at 0x201000 */7070+&pci1 {7171+ compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4";7272+ device_type = "pci";7373+ #size-cells = <2>;7474+ #address-cells = <3>;7575+ bus-range = <0 0xff>;7676+ clock-frequency = <33333333>;7777+ interrupts = <16 2 1 14>;7878+ pcie@0 {7979+ reg = <0 0 0 0 0>;8080+ #interrupt-cells = <1>;8181+ #size-cells = <2>;8282+ #address-cells = <3>;8383+ device_type = "pci";8484+ interrupts = <16 2 1 14>;8585+ interrupt-map-mask = <0xf800 0 0 7>;8686+ interrupt-map = <8787+ /* IDSEL 0x0 */8888+ 0000 0 0 1 &mpic 41 1 0 08989+ 0000 0 0 2 &mpic 5 1 0 09090+ 0000 0 0 3 &mpic 6 1 0 09191+ 0000 0 0 4 &mpic 7 1 0 09292+ >;9393+ };9494+};9595+9696+/* controller at 0x202000 */9797+&pci2 {9898+ compatible = "fsl,p5040-pcie", "fsl,qoriq-pcie-v2.4";9999+ device_type = "pci";100100+ #size-cells = <2>;101101+ #address-cells = <3>;102102+ bus-range = <0x0 0xff>;103103+ clock-frequency = <33333333>;104104+ interrupts = <16 2 1 13>;105105+ pcie@0 {106106+ reg = <0 0 0 0 0>;107107+ #interrupt-cells = <1>;108108+ #size-cells = <2>;109109+ #address-cells = <3>;110110+ device_type = "pci";111111+ interrupts = <16 2 1 13>;112112+ interrupt-map-mask = <0xf800 0 0 7>;113113+ interrupt-map = <114114+ /* IDSEL 0x0 */115115+ 0000 0 0 1 &mpic 42 1 0 0116116+ 0000 0 0 2 &mpic 9 1 0 0117117+ 0000 0 0 3 &mpic 10 1 0 0118118+ 0000 0 0 4 &mpic 11 1 0 0119119+ >;120120+ };121121+};122122+123123+&dcsr {124124+ #address-cells = <1>;125125+ #size-cells = <1>;126126+ compatible = "fsl,dcsr", "simple-bus";127127+128128+ dcsr-epu@0 {129129+ compatible = "fsl,dcsr-epu";130130+ interrupts = <52 2 0 0131131+ 84 2 0 0132132+ 85 2 0 0>;133133+ reg = <0x0 0x1000>;134134+ };135135+ dcsr-npc {136136+ compatible = "fsl,dcsr-npc";137137+ reg = <0x1000 0x1000 0x1000000 0x8000>;138138+ };139139+ dcsr-nxc@2000 {140140+ compatible = "fsl,dcsr-nxc";141141+ reg = <0x2000 0x1000>;142142+ };143143+ dcsr-corenet {144144+ compatible = "fsl,dcsr-corenet";145145+ reg = <0x8000 0x1000 0xB0000 0x1000>;146146+ };147147+ dcsr-dpaa@9000 {148148+ compatible = "fsl,p5040-dcsr-dpaa", "fsl,dcsr-dpaa";149149+ reg = <0x9000 0x1000>;150150+ };151151+ dcsr-ocn@11000 {152152+ compatible = "fsl,p5040-dcsr-ocn", "fsl,dcsr-ocn";153153+ reg = <0x11000 0x1000>;154154+ };155155+ dcsr-ddr@12000 {156156+ compatible = "fsl,dcsr-ddr";157157+ dev-handle = <&ddr1>;158158+ reg = <0x12000 0x1000>;159159+ };160160+ dcsr-ddr@13000 {161161+ compatible = "fsl,dcsr-ddr";162162+ dev-handle = <&ddr2>;163163+ reg = <0x13000 0x1000>;164164+ };165165+ dcsr-nal@18000 {166166+ compatible = "fsl,p5040-dcsr-nal", "fsl,dcsr-nal";167167+ reg = <0x18000 0x1000>;168168+ };169169+ dcsr-rcpm@22000 {170170+ compatible = "fsl,p5040-dcsr-rcpm", "fsl,dcsr-rcpm";171171+ reg = <0x22000 0x1000>;172172+ };173173+ dcsr-cpu-sb-proxy@40000 {174174+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";175175+ cpu-handle = <&cpu0>;176176+ reg = <0x40000 0x1000>;177177+ };178178+ dcsr-cpu-sb-proxy@41000 {179179+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";180180+ cpu-handle = <&cpu1>;181181+ reg = <0x41000 0x1000>;182182+ };183183+ dcsr-cpu-sb-proxy@42000 {184184+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";185185+ cpu-handle = <&cpu2>;186186+ reg = <0x42000 0x1000>;187187+ };188188+ dcsr-cpu-sb-proxy@43000 {189189+ compatible = "fsl,dcsr-e5500-sb-proxy", "fsl,dcsr-cpu-sb-proxy";190190+ cpu-handle = <&cpu3>;191191+ reg = <0x43000 0x1000>;192192+ };193193+};194194+195195+&soc {196196+ #address-cells = <1>;197197+ #size-cells = <1>;198198+ device_type = "soc";199199+ compatible = "simple-bus";200200+201201+ soc-sram-error {202202+ compatible = "fsl,soc-sram-error";203203+ interrupts = <16 2 1 29>;204204+ };205205+206206+ corenet-law@0 {207207+ compatible = "fsl,corenet-law";208208+ reg = <0x0 0x1000>;209209+ fsl,num-laws = <32>;210210+ };211211+212212+ ddr1: memory-controller@8000 {213213+ compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";214214+ reg = <0x8000 0x1000>;215215+ interrupts = <16 2 1 23>;216216+ };217217+218218+ ddr2: memory-controller@9000 {219219+ compatible = "fsl,qoriq-memory-controller-v4.5","fsl,qoriq-memory-controller";220220+ reg = <0x9000 0x1000>;221221+ interrupts = <16 2 1 22>;222222+ };223223+224224+ cpc: l3-cache-controller@10000 {225225+ compatible = "fsl,p5040-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache";226226+ reg = <0x10000 0x1000227227+ 0x11000 0x1000>;228228+ interrupts = <16 2 1 27229229+ 16 2 1 26>;230230+ };231231+232232+ corenet-cf@18000 {233233+ compatible = "fsl,corenet-cf";234234+ reg = <0x18000 0x1000>;235235+ interrupts = <16 2 1 31>;236236+ fsl,ccf-num-csdids = <32>;237237+ fsl,ccf-num-snoopids = <32>;238238+ };239239+240240+ iommu@20000 {241241+ compatible = "fsl,pamu-v1.0", "fsl,pamu";242242+ reg = <0x20000 0x5000>;243243+ interrupts = <244244+ 24 2 0 0245245+ 16 2 1 30>;246246+ };247247+248248+/include/ "qoriq-mpic.dtsi"249249+250250+ guts: global-utilities@e0000 {251251+ compatible = "fsl,p5040-device-config", "fsl,qoriq-device-config-1.0";252252+ reg = <0xe0000 0xe00>;253253+ fsl,has-rstcr;254254+ #sleep-cells = <1>;255255+ fsl,liodn-bits = <12>;256256+ };257257+258258+ pins: global-utilities@e0e00 {259259+ compatible = "fsl,p5040-pin-control", "fsl,qoriq-pin-control-1.0";260260+ reg = <0xe0e00 0x200>;261261+ #sleep-cells = <2>;262262+ };263263+264264+ clockgen: global-utilities@e1000 {265265+ compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0";266266+ reg = <0xe1000 0x1000>;267267+ clock-frequency = <0>;268268+ };269269+270270+ rcpm: global-utilities@e2000 {271271+ compatible = "fsl,p5040-rcpm", "fsl,qoriq-rcpm-1.0";272272+ reg = <0xe2000 0x1000>;273273+ #sleep-cells = <1>;274274+ };275275+276276+ sfp: sfp@e8000 {277277+ compatible = "fsl,p5040-sfp", "fsl,qoriq-sfp-1.0";278278+ reg = <0xe8000 0x1000>;279279+ };280280+281281+ serdes: serdes@ea000 {282282+ compatible = "fsl,p5040-serdes";283283+ reg = <0xea000 0x1000>;284284+ };285285+286286+/include/ "qoriq-dma-0.dtsi"287287+/include/ "qoriq-dma-1.dtsi"288288+/include/ "qoriq-espi-0.dtsi"289289+ spi@110000 {290290+ fsl,espi-num-chipselects = <4>;291291+ };292292+293293+/include/ "qoriq-esdhc-0.dtsi"294294+ sdhc@114000 {295295+ sdhci,auto-cmd12;296296+ };297297+298298+/include/ "qoriq-i2c-0.dtsi"299299+/include/ "qoriq-i2c-1.dtsi"300300+/include/ "qoriq-duart-0.dtsi"301301+/include/ "qoriq-duart-1.dtsi"302302+/include/ "qoriq-gpio-0.dtsi"303303+/include/ "qoriq-usb2-mph-0.dtsi"304304+ usb0: usb@210000 {305305+ compatible = "fsl-usb2-mph-v1.6", "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph";306306+ phy_type = "utmi";307307+ port0;308308+ };309309+310310+/include/ "qoriq-usb2-dr-0.dtsi"311311+ usb1: usb@211000 {312312+ compatible = "fsl-usb2-dr-v1.6", "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr";313313+ dr_mode = "host";314314+ phy_type = "utmi";315315+ };316316+317317+/include/ "qoriq-sata2-0.dtsi"318318+/include/ "qoriq-sata2-1.dtsi"319319+/include/ "qoriq-sec5.2-0.dtsi"320320+};
+114
arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
···11+/*22+ * P5040 Silicon/SoC Device Tree Source (pre include)33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * This software is provided by Freescale Semiconductor "as is" and any2424+ * express or implied warranties, including, but not limited to, the implied2525+ * warranties of merchantability and fitness for a particular purpose are2626+ * disclaimed. In no event shall Freescale Semiconductor be liable for any2727+ * direct, indirect, incidental, special, exemplary, or consequential damages2828+ * (including, but not limited to, procurement of substitute goods or services;2929+ * loss of use, data, or profits; or business interruption) however caused and3030+ * on any theory of liability, whether in contract, strict liability, or tort3131+ * (including negligence or otherwise) arising in any way out of the use of this3232+ * software, even if advised of the possibility of such damage.3333+ */3434+3535+/dts-v1/;3636+3737+/include/ "e5500_power_isa.dtsi"3838+3939+/ {4040+ compatible = "fsl,P5040";4141+ #address-cells = <2>;4242+ #size-cells = <2>;4343+ interrupt-parent = <&mpic>;4444+4545+ aliases {4646+ ccsr = &soc;4747+ dcsr = &dcsr;4848+4949+ serial0 = &serial0;5050+ serial1 = &serial1;5151+ serial2 = &serial2;5252+ serial3 = &serial3;5353+ pci0 = &pci0;5454+ pci1 = &pci1;5555+ pci2 = &pci2;5656+ usb0 = &usb0;5757+ usb1 = &usb1;5858+ dma0 = &dma0;5959+ dma1 = &dma1;6060+ sdhc = &sdhc;6161+ msi0 = &msi0;6262+ msi1 = &msi1;6363+ msi2 = &msi2;6464+6565+ crypto = &crypto;6666+ sec_jr0 = &sec_jr0;6767+ sec_jr1 = &sec_jr1;6868+ sec_jr2 = &sec_jr2;6969+ sec_jr3 = &sec_jr3;7070+ rtic_a = &rtic_a;7171+ rtic_b = &rtic_b;7272+ rtic_c = &rtic_c;7373+ rtic_d = &rtic_d;7474+ sec_mon = &sec_mon;7575+ };7676+7777+ cpus {7878+ #address-cells = <1>;7979+ #size-cells = <0>;8080+8181+ cpu0: PowerPC,e5500@0 {8282+ device_type = "cpu";8383+ reg = <0>;8484+ next-level-cache = <&L2_0>;8585+ L2_0: l2-cache {8686+ next-level-cache = <&cpc>;8787+ };8888+ };8989+ cpu1: PowerPC,e5500@1 {9090+ device_type = "cpu";9191+ reg = <1>;9292+ next-level-cache = <&L2_1>;9393+ L2_1: l2-cache {9494+ next-level-cache = <&cpc>;9595+ };9696+ };9797+ cpu2: PowerPC,e5500@2 {9898+ device_type = "cpu";9999+ reg = <2>;100100+ next-level-cache = <&L2_2>;101101+ L2_2: l2-cache {102102+ next-level-cache = <&cpc>;103103+ };104104+ };105105+ cpu3: PowerPC,e5500@3 {106106+ device_type = "cpu";107107+ reg = <3>;108108+ next-level-cache = <&L2_3>;109109+ L2_3: l2-cache {110110+ next-level-cache = <&cpc>;111111+ };112112+ };113113+ };114114+};
+118
arch/powerpc/boot/dts/fsl/qoriq-sec5.2-0.dtsi
···11+/*22+ * QorIQ Sec/Crypto 5.2 device tree stub [ controller @ offset 0x300000 ]33+ *44+ * Copyright 2011-2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY2424+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED2525+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE2626+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY2727+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES2828+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;2929+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND3030+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT3131+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS3232+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3333+ */3434+3535+crypto: crypto@300000 {3636+ compatible = "fsl,sec-v5.2", "fsl,sec-v5.0", "fsl,sec-v4.0";3737+ #address-cells = <1>;3838+ #size-cells = <1>;3939+ reg = <0x300000 0x10000>;4040+ ranges = <0 0x300000 0x10000>;4141+ interrupts = <92 2 0 0>;4242+4343+ sec_jr0: jr@1000 {4444+ compatible = "fsl,sec-v5.2-job-ring",4545+ "fsl,sec-v5.0-job-ring",4646+ "fsl,sec-v4.0-job-ring";4747+ reg = <0x1000 0x1000>;4848+ interrupts = <88 2 0 0>;4949+ };5050+5151+ sec_jr1: jr@2000 {5252+ compatible = "fsl,sec-v5.2-job-ring",5353+ "fsl,sec-v5.0-job-ring",5454+ "fsl,sec-v4.0-job-ring";5555+ reg = <0x2000 0x1000>;5656+ interrupts = <89 2 0 0>;5757+ };5858+5959+ sec_jr2: jr@3000 {6060+ compatible = "fsl,sec-v5.2-job-ring",6161+ "fsl,sec-v5.0-job-ring",6262+ "fsl,sec-v4.0-job-ring";6363+ reg = <0x3000 0x1000>;6464+ interrupts = <90 2 0 0>;6565+ };6666+6767+ sec_jr3: jr@4000 {6868+ compatible = "fsl,sec-v5.2-job-ring",6969+ "fsl,sec-v5.0-job-ring",7070+ "fsl,sec-v4.0-job-ring";7171+ reg = <0x4000 0x1000>;7272+ interrupts = <91 2 0 0>;7373+ };7474+7575+ rtic@6000 {7676+ compatible = "fsl,sec-v5.2-rtic",7777+ "fsl,sec-v5.0-rtic",7878+ "fsl,sec-v4.0-rtic";7979+ #address-cells = <1>;8080+ #size-cells = <1>;8181+ reg = <0x6000 0x100>;8282+ ranges = <0x0 0x6100 0xe00>;8383+8484+ rtic_a: rtic-a@0 {8585+ compatible = "fsl,sec-v5.2-rtic-memory",8686+ "fsl,sec-v5.0-rtic-memory",8787+ "fsl,sec-v4.0-rtic-memory";8888+ reg = <0x00 0x20 0x100 0x80>;8989+ };9090+9191+ rtic_b: rtic-b@20 {9292+ compatible = "fsl,sec-v5.2-rtic-memory",9393+ "fsl,sec-v5.0-rtic-memory",9494+ "fsl,sec-v4.0-rtic-memory";9595+ reg = <0x20 0x20 0x200 0x80>;9696+ };9797+9898+ rtic_c: rtic-c@40 {9999+ compatible = "fsl,sec-v5.2-rtic-memory",100100+ "fsl,sec-v5.0-rtic-memory",101101+ "fsl,sec-v4.0-rtic-memory";102102+ reg = <0x40 0x20 0x300 0x80>;103103+ };104104+105105+ rtic_d: rtic-d@60 {106106+ compatible = "fsl,sec-v5.2-rtic-memory",107107+ "fsl,sec-v5.0-rtic-memory",108108+ "fsl,sec-v4.0-rtic-memory";109109+ reg = <0x60 0x20 0x500 0x80>;110110+ };111111+ };112112+};113113+114114+sec_mon: sec_mon@314000 {115115+ compatible = "fsl,sec-v5.2-mon", "fsl,sec-v5.0-mon", "fsl,sec-v4.0-mon";116116+ reg = <0x314000 0x1000>;117117+ interrupts = <93 2 0 0>;118118+};
···11111212/dts-v1/;13131414+/include/ "fsl/e500v2_power_isa.dtsi"1515+1416/ {1517 model = "MPC8555CDS";1618 compatible = "MPC8555CDS", "MPC85xxCDS";
+2
arch/powerpc/boot/dts/mpc8560ads.dts
···11111212/dts-v1/;13131414+/include/ "fsl/e500v2_power_isa.dtsi"1515+1416/ {1517 model = "MPC8560ADS";1618 compatible = "MPC8560ADS", "MPC85xxADS";
-63
arch/powerpc/boot/dts/p1020rdb_camp_core0.dts
···11-/*22- * P1020 RDB Core0 Device Tree Source in CAMP mode.33- *44- * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache55- * can be shared, all the other devices must be assigned to one core only.66- * This dts file allows core0 to have memory, l2, i2c, spi, gpio, tdm, dma, usb,77- * eth1, eth2, sdhc, crypto, global-util, message, pci0, pci1, msi.88- *99- * Please note to add "-b 0" for core0's dts compiling.1010- *1111- * Copyright 2011 Freescale Semiconductor Inc.1212- *1313- * This program is free software; you can redistribute it and/or modify it1414- * under the terms of the GNU General Public License as published by the1515- * Free Software Foundation; either version 2 of the License, or (at your1616- * option) any later version.1717- */1818-1919-/include/ "p1020rdb.dts"2020-2121-/ {2222- model = "fsl,P1020RDB";2323- compatible = "fsl,P1020RDB", "fsl,MPC85XXRDB-CAMP";2424-2525- aliases {2626- ethernet1 = &enet1;2727- ethernet2 = &enet2;2828- serial0 = &serial0;2929- pci0 = &pci0;3030- pci1 = &pci1;3131- };3232-3333- cpus {3434- PowerPC,P1020@1 {3535- status = "disabled";3636- };3737- };3838-3939- memory {4040- device_type = "memory";4141- };4242-4343- localbus@ffe05000 {4444- status = "disabled";4545- };4646-4747- soc@ffe00000 {4848- serial1: serial@4600 {4949- status = "disabled";5050- };5151-5252- enet0: ethernet@b0000 {5353- status = "disabled";5454- };5555-5656- mpic: pic@40000 {5757- protected-sources = <5858- 42 29 30 34 /* serial1, enet0-queue-group0 */5959- 17 18 24 45 /* enet0-queue-group1, crypto */6060- >;6161- };6262- };6363-};
-141
arch/powerpc/boot/dts/p1020rdb_camp_core1.dts
···11-/*22- * P1020 RDB Core1 Device Tree Source in CAMP mode.33- *44- * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache55- * can be shared, all the other devices must be assigned to one core only.66- * This dts allows core1 to have l2, eth0, crypto.77- *88- * Please note to add "-b 1" for core1's dts compiling.99- *1010- * Copyright 2011 Freescale Semiconductor Inc.1111- *1212- * This program is free software; you can redistribute it and/or modify it1313- * under the terms of the GNU General Public License as published by the1414- * Free Software Foundation; either version 2 of the License, or (at your1515- * option) any later version.1616- */1717-1818-/include/ "p1020rdb.dts"1919-2020-/ {2121- model = "fsl,P1020RDB";2222- compatible = "fsl,P1020RDB", "fsl,MPC85XXRDB-CAMP";2323-2424- aliases {2525- ethernet0 = &enet0;2626- serial0 = &serial1;2727- };2828-2929- cpus {3030- PowerPC,P1020@0 {3131- status = "disabled";3232- };3333- };3434-3535- memory {3636- device_type = "memory";3737- };3838-3939- localbus@ffe05000 {4040- status = "disabled";4141- };4242-4343- soc@ffe00000 {4444- ecm-law@0 {4545- status = "disabled";4646- };4747-4848- ecm@1000 {4949- status = "disabled";5050- };5151-5252- memory-controller@2000 {5353- status = "disabled";5454- };5555-5656- i2c@3000 {5757- status = "disabled";5858- };5959-6060- i2c@3100 {6161- status = "disabled";6262- };6363-6464- serial0: serial@4500 {6565- status = "disabled";6666- };6767-6868- spi@7000 {6969- status = "disabled";7070- };7171-7272- gpio: gpio-controller@f000 {7373- status = "disabled";7474- };7575-7676- dma@21300 {7777- status = "disabled";7878- };7979-8080- mdio@24000 {8181- status = "disabled";8282- };8383-8484- mdio@25000 {8585- status = "disabled";8686- };8787-8888- enet1: ethernet@b1000 {8989- status = "disabled";9090- };9191-9292- enet2: ethernet@b2000 {9393- status = "disabled";9494- };9595-9696- usb@22000 {9797- status = "disabled";9898- };9999-100100- sdhci@2e000 {101101- status = "disabled";102102- };103103-104104- mpic: pic@40000 {105105- protected-sources = <106106- 16 /* ecm, mem, L2, pci0, pci1 */107107- 43 42 59 /* i2c, serial0, spi */108108- 47 63 62 /* gpio, tdm */109109- 20 21 22 23 /* dma */110110- 03 02 /* mdio */111111- 35 36 40 /* enet1-queue-group0 */112112- 51 52 67 /* enet1-queue-group1 */113113- 31 32 33 /* enet2-queue-group0 */114114- 25 26 27 /* enet2-queue-group1 */115115- 28 72 58 /* usb, sdhci, crypto */116116- 0xb0 0xb1 0xb2 /* message */117117- 0xb3 0xb4 0xb5118118- 0xb6 0xb7119119- 0xe0 0xe1 0xe2 /* msi */120120- 0xe3 0xe4 0xe5121121- 0xe6 0xe7 /* sdhci, crypto , pci */122122- >;123123- };124124-125125- msi@41600 {126126- status = "disabled";127127- };128128-129129- global-utilities@e0000 { //global utilities block130130- status = "disabled";131131- };132132- };133133-134134- pci0: pcie@ffe09000 {135135- status = "disabled";136136- };137137-138138- pci1: pcie@ffe0a000 {139139- status = "disabled";140140- };141141-};
···11+/*22+ * P1022 RDK 32-bit Physical Address Map Device Tree Source33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY2424+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED2525+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE2626+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY2727+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES2828+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;2929+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND3030+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT3131+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS3232+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3333+ */3434+3535+/include/ "fsl/p1022si-pre.dtsi"3636+/ {3737+ model = "fsl,P1022RDK";3838+ compatible = "fsl,P1022RDK";3939+4040+ memory {4141+ device_type = "memory";4242+ };4343+4444+ board_lbc: lbc: localbus@ffe05000 {4545+ /* The P1022 RDK does not have any localbus devices */4646+ status = "disabled";4747+ };4848+4949+ board_soc: soc: soc@ffe00000 {5050+ ranges = <0x0 0x0 0xffe00000 0x100000>;5151+5252+ i2c@3100 {5353+ wm8960:codec@1a {5454+ compatible = "wlf,wm8960";5555+ reg = <0x1a>;5656+ /* MCLK source is a stand-alone oscillator */5757+ clock-frequency = <12288000>;5858+ };5959+ rtc@68 {6060+ compatible = "stm,m41t62";6161+ reg = <0x68>;6262+ };6363+ adt7461@4c{6464+ compatible = "adi,adt7461";6565+ reg = <0x4c>;6666+ };6767+ zl6100@21{6868+ compatible = "isil,zl6100";6969+ reg = <0x21>;7070+ };7171+ zl6100@24{7272+ compatible = "isil,zl6100";7373+ reg = <0x24>;7474+ };7575+ zl6100@26{7676+ compatible = "isil,zl6100";7777+ reg = <0x26>;7878+ };7979+ zl6100@29{8080+ compatible = "isil,zl6100";8181+ reg = <0x29>;8282+ };8383+ };8484+8585+ spi@7000 {8686+ flash@0 {8787+ #address-cells = <1>;8888+ #size-cells = <1>;8989+ compatible = "spansion,m25p80";9090+ reg = <0>;9191+ spi-max-frequency = <1000000>;9292+ partition@0 {9393+ label = "full-spi-flash";9494+ reg = <0x00000000 0x00100000>;9595+ };9696+ };9797+ };9898+9999+ ssi@15000 {100100+ fsl,mode = "i2s-slave";101101+ codec-handle = <&wm8960>;102102+ };103103+104104+ usb@22000 {105105+ phy_type = "ulpi";106106+ };107107+108108+ usb@23000 {109109+ phy_type = "ulpi";110110+ };111111+112112+ mdio@24000 {113113+ phy0: ethernet-phy@0 {114114+ interrupts = <3 1 0 0>;115115+ reg = <0x1>;116116+ };117117+ phy1: ethernet-phy@1 {118118+ interrupts = <9 1 0 0>;119119+ reg = <0x2>;120120+ };121121+ };122122+123123+ mdio@25000 {124124+ tbi0: tbi-phy@11 {125125+ reg = <0x11>;126126+ device_type = "tbi-phy";127127+ };128128+ };129129+130130+ ethernet@b0000 {131131+ phy-handle = <&phy0>;132132+ phy-connection-type = "rgmii-id";133133+ };134134+135135+ ethernet@b1000 {136136+ phy-handle = <&phy1>;137137+ tbi-handle = <&tbi0>;138138+ phy-connection-type = "sgmii";139139+ };140140+ };141141+142142+ pci0: pcie@ffe09000 {143143+ ranges = <0x2000000 0x0 0xe0000000 0 0xa0000000 0x0 0x20000000144144+ 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;145145+ reg = <0x0 0xffe09000 0 0x1000>;146146+ pcie@0 {147147+ ranges = <0x2000000 0x0 0xe0000000148148+ 0x2000000 0x0 0xe0000000149149+ 0x0 0x20000000150150+151151+ 0x1000000 0x0 0x0152152+ 0x1000000 0x0 0x0153153+ 0x0 0x100000>;154154+ };155155+ };156156+157157+ pci1: pcie@ffe0a000 {158158+ ranges = <0x2000000 0x0 0xe0000000 0 0xc0000000 0x0 0x20000000159159+ 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;160160+ reg = <0 0xffe0a000 0 0x1000>;161161+ pcie@0 {162162+ ranges = <0x2000000 0x0 0xe0000000163163+ 0x2000000 0x0 0xe0000000164164+ 0x0 0x20000000165165+166166+ 0x1000000 0x0 0x0167167+ 0x1000000 0x0 0x0168168+ 0x0 0x100000>;169169+ };170170+ };171171+172172+ pci2: pcie@ffe0b000 {173173+ ranges = <0x2000000 0x0 0xe0000000 0 0x80000000 0x0 0x20000000174174+ 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;175175+ reg = <0 0xffe0b000 0 0x1000>;176176+ pcie@0 {177177+ ranges = <0x2000000 0x0 0xe0000000178178+ 0x2000000 0x0 0xe0000000179179+ 0x0 0x20000000180180+181181+ 0x1000000 0x0 0x0182182+ 0x1000000 0x0 0x0183183+ 0x0 0x100000>;184184+ };185185+ };186186+};187187+188188+/include/ "fsl/p1022si-post.dtsi"
-67
arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
···11-/*22- * P2020 RDB Core0 Device Tree Source in CAMP mode.33- *44- * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache55- * can be shared, all the other devices must be assigned to one core only.66- * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb,77- * eth1, eth2, sdhc, crypto, global-util, pci0.88- *99- * Copyright 2009-2011 Freescale Semiconductor Inc.1010- *1111- * This program is free software; you can redistribute it and/or modify it1212- * under the terms of the GNU General Public License as published by the1313- * Free Software Foundation; either version 2 of the License, or (at your1414- * option) any later version.1515- */1616-1717-/include/ "p2020rdb.dts"1818-1919-/ {2020- model = "fsl,P2020RDB";2121- compatible = "fsl,P2020RDB", "fsl,MPC85XXRDB-CAMP";2222-2323- cpus {2424- PowerPC,P2020@1 {2525- status = "disabled";2626- };2727- };2828-2929- localbus@ffe05000 {3030- status = "disabled";3131- };3232-3333- soc@ffe00000 {3434- serial1: serial@4600 {3535- status = "disabled";3636- };3737-3838- dma@c300 {3939- status = "disabled";4040- };4141-4242- enet0: ethernet@24000 {4343- status = "disabled";4444- };4545-4646- mpic: pic@40000 {4747- protected-sources = <4848- 42 76 77 78 79 /* serial1 , dma2 */4949- 29 30 34 26 /* enet0, pci1 */5050- 0xe0 0xe1 0xe2 0xe3 /* msi */5151- 0xe4 0xe5 0xe6 0xe75252- >;5353- };5454-5555- msi@41600 {5656- status = "disabled";5757- };5858- };5959-6060- pci0: pcie@ffe08000 {6161- status = "disabled";6262- };6363-6464- pci2: pcie@ffe0a000 {6565- status = "disabled";6666- };6767-};
-125
arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
···11-/*22- * P2020 RDB Core1 Device Tree Source in CAMP mode.33- *44- * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache55- * can be shared, all the other devices must be assigned to one core only.66- * This dts allows core1 to have l2, dma2, eth0, pci1, msi.77- *88- * Please note to add "-b 1" for core1's dts compiling.99- *1010- * Copyright 2009-2011 Freescale Semiconductor Inc.1111- *1212- * This program is free software; you can redistribute it and/or modify it1313- * under the terms of the GNU General Public License as published by the1414- * Free Software Foundation; either version 2 of the License, or (at your1515- * option) any later version.1616- */1717-1818-/include/ "p2020rdb.dts"1919-2020-/ {2121- model = "fsl,P2020RDB";2222- compatible = "fsl,P2020RDB", "fsl,MPC85XXRDB-CAMP";2323-2424- cpus {2525- PowerPC,P2020@0 {2626- status = "disabled";2727- };2828- };2929-3030- localbus@ffe05000 {3131- status = "disabled";3232- };3333-3434- soc@ffe00000 {3535- ecm-law@0 {3636- status = "disabled";3737- };3838-3939- ecm@1000 {4040- status = "disabled";4141- };4242-4343- memory-controller@2000 {4444- status = "disabled";4545- };4646-4747- i2c@3000 {4848- status = "disabled";4949- };5050-5151- i2c@3100 {5252- status = "disabled";5353- };5454-5555- serial0: serial@4500 {5656- status = "disabled";5757- };5858-5959- spi@7000 {6060- status = "disabled";6161- };6262-6363- gpio: gpio-controller@f000 {6464- status = "disabled";6565- };6666-6767- dma@21300 {6868- status = "disabled";6969- };7070-7171- usb@22000 {7272- status = "disabled";7373- };7474-7575- mdio@24520 {7676- status = "disabled";7777- };7878-7979- mdio@25520 {8080- status = "disabled";8181- };8282-8383- mdio@26520 {8484- status = "disabled";8585- };8686-8787- enet1: ethernet@25000 {8888- status = "disabled";8989- };9090-9191- enet2: ethernet@26000 {9292- status = "disabled";9393- };9494-9595- sdhci@2e000 {9696- status = "disabled";9797- };9898-9999- crypto@30000 {100100- status = "disabled";101101- };102102-103103- mpic: pic@40000 {104104- protected-sources = <105105- 17 18 43 42 59 47 /*ecm, mem, i2c, serial0, spi,gpio */106106- 16 20 21 22 23 28 /* L2, dma1, USB */107107- 03 35 36 40 31 32 33 /* mdio, enet1, enet2 */108108- 72 45 58 25 /* sdhci, crypto , pci */109109- >;110110- };111111-112112- global-utilities@e0000 { //global utilities block113113- status = "disabled";114114- };115115-116116- };117117-118118- pci0: pcie@ffe08000 {119119- status = "disabled";120120- };121121-122122- pci1: pcie@ffe09000 {123123- status = "disabled";124124- };125125-};
···11+/*22+ * P5040DS Device Tree Source33+ *44+ * Copyright 2012 Freescale Semiconductor Inc.55+ *66+ * Redistribution and use in source and binary forms, with or without77+ * modification, are permitted provided that the following conditions are met:88+ * * Redistributions of source code must retain the above copyright99+ * notice, this list of conditions and the following disclaimer.1010+ * * Redistributions in binary form must reproduce the above copyright1111+ * notice, this list of conditions and the following disclaimer in the1212+ * documentation and/or other materials provided with the distribution.1313+ * * Neither the name of Freescale Semiconductor nor the1414+ * names of its contributors may be used to endorse or promote products1515+ * derived from this software without specific prior written permission.1616+ *1717+ *1818+ * ALTERNATIVELY, this software may be distributed under the terms of the1919+ * GNU General Public License ("GPL") as published by the Free Software2020+ * Foundation, either version 2 of that License or (at your option) any2121+ * later version.2222+ *2323+ * This software is provided by Freescale Semiconductor "as is" and any2424+ * express or implied warranties, including, but not limited to, the implied2525+ * warranties of merchantability and fitness for a particular purpose are2626+ * disclaimed. In no event shall Freescale Semiconductor be liable for any2727+ * direct, indirect, incidental, special, exemplary, or consequential damages2828+ * (including, but not limited to, procurement of substitute goods or services;2929+ * loss of use, data, or profits; or business interruption) however caused and3030+ * on any theory of liability, whether in contract, strict liability, or tort3131+ * (including negligence or otherwise) arising in any way out of the use of this3232+ * software, even if advised of the possibility of such damage.3333+ */3434+3535+/include/ "fsl/p5040si-pre.dtsi"3636+3737+/ {3838+ model = "fsl,P5040DS";3939+ compatible = "fsl,P5040DS";4040+ #address-cells = <2>;4141+ #size-cells = <2>;4242+ interrupt-parent = <&mpic>;4343+4444+ memory {4545+ device_type = "memory";4646+ };4747+4848+ dcsr: dcsr@f00000000 {4949+ ranges = <0x00000000 0xf 0x00000000 0x01008000>;5050+ };5151+5252+ soc: soc@ffe000000 {5353+ ranges = <0x00000000 0xf 0xfe000000 0x1000000>;5454+ reg = <0xf 0xfe000000 0 0x00001000>;5555+ spi@110000 {5656+ flash@0 {5757+ #address-cells = <1>;5858+ #size-cells = <1>;5959+ compatible = "spansion,s25sl12801";6060+ reg = <0>;6161+ spi-max-frequency = <40000000>; /* input clock */6262+ partition@u-boot {6363+ label = "u-boot";6464+ reg = <0x00000000 0x00100000>;6565+ };6666+ partition@kernel {6767+ label = "kernel";6868+ reg = <0x00100000 0x00500000>;6969+ };7070+ partition@dtb {7171+ label = "dtb";7272+ reg = <0x00600000 0x00100000>;7373+ };7474+ partition@fs {7575+ label = "file system";7676+ reg = <0x00700000 0x00900000>;7777+ };7878+ };7979+ };8080+8181+ i2c@118100 {8282+ eeprom@51 {8383+ compatible = "at24,24c256";8484+ reg = <0x51>;8585+ };8686+ eeprom@52 {8787+ compatible = "at24,24c256";8888+ reg = <0x52>;8989+ };9090+ };9191+9292+ i2c@119100 {9393+ rtc@68 {9494+ compatible = "dallas,ds3232";9595+ reg = <0x68>;9696+ interrupts = <0x1 0x1 0 0>;9797+ };9898+ adt7461@4c {9999+ compatible = "adi,adt7461";100100+ reg = <0x4c>;101101+ };102102+ };103103+ };104104+105105+ lbc: localbus@ffe124000 {106106+ reg = <0xf 0xfe124000 0 0x1000>;107107+ ranges = <0 0 0xf 0xe8000000 0x08000000108108+ 2 0 0xf 0xffa00000 0x00040000109109+ 3 0 0xf 0xffdf0000 0x00008000>;110110+111111+ flash@0,0 {112112+ compatible = "cfi-flash";113113+ reg = <0 0 0x08000000>;114114+ bank-width = <2>;115115+ device-width = <2>;116116+ };117117+118118+ nand@2,0 {119119+ #address-cells = <1>;120120+ #size-cells = <1>;121121+ compatible = "fsl,elbc-fcm-nand";122122+ reg = <0x2 0x0 0x40000>;123123+124124+ partition@0 {125125+ label = "NAND U-Boot Image";126126+ reg = <0x0 0x02000000>;127127+ };128128+129129+ partition@2000000 {130130+ label = "NAND Root File System";131131+ reg = <0x02000000 0x10000000>;132132+ };133133+134134+ partition@12000000 {135135+ label = "NAND Compressed RFS Image";136136+ reg = <0x12000000 0x08000000>;137137+ };138138+139139+ partition@1a000000 {140140+ label = "NAND Linux Kernel Image";141141+ reg = <0x1a000000 0x04000000>;142142+ };143143+144144+ partition@1e000000 {145145+ label = "NAND DTB Image";146146+ reg = <0x1e000000 0x01000000>;147147+ };148148+149149+ partition@1f000000 {150150+ label = "NAND Writable User area";151151+ reg = <0x1f000000 0x01000000>;152152+ };153153+ };154154+155155+ board-control@3,0 {156156+ compatible = "fsl,p5040ds-fpga", "fsl,fpga-ngpixis";157157+ reg = <3 0 0x40>;158158+ };159159+ };160160+161161+ pci0: pcie@ffe200000 {162162+ reg = <0xf 0xfe200000 0 0x1000>;163163+ ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000164164+ 0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;165165+ pcie@0 {166166+ ranges = <0x02000000 0 0xe0000000167167+ 0x02000000 0 0xe0000000168168+ 0 0x20000000169169+170170+ 0x01000000 0 0x00000000171171+ 0x01000000 0 0x00000000172172+ 0 0x00010000>;173173+ };174174+ };175175+176176+ pci1: pcie@ffe201000 {177177+ reg = <0xf 0xfe201000 0 0x1000>;178178+ ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000179179+ 0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;180180+ pcie@0 {181181+ ranges = <0x02000000 0 0xe0000000182182+ 0x02000000 0 0xe0000000183183+ 0 0x20000000184184+185185+ 0x01000000 0 0x00000000186186+ 0x01000000 0 0x00000000187187+ 0 0x00010000>;188188+ };189189+ };190190+191191+ pci2: pcie@ffe202000 {192192+ reg = <0xf 0xfe202000 0 0x1000>;193193+ ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000194194+ 0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;195195+ pcie@0 {196196+ ranges = <0x02000000 0 0xe0000000197197+ 0x02000000 0 0xe0000000198198+ 0 0x20000000199199+200200+ 0x01000000 0 0x00000000201201+ 0x01000000 0 0x00000000202202+ 0 0x00010000>;203203+ };204204+ };205205+};206206+207207+/include/ "fsl/p5040si-post.dtsi"
+1
arch/powerpc/configs/corenet32_smp_defconfig
···2727CONFIG_P3041_DS=y2828CONFIG_P4080_DS=y2929CONFIG_P5020_DS=y3030+CONFIG_P5040_DS=y3031CONFIG_HIGHMEM=y3132# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set3233CONFIG_BINFMT_MISC=m
+1
arch/powerpc/configs/corenet64_smp_defconfig
···2323CONFIG_PARTITION_ADVANCED=y2424CONFIG_MAC_PARTITION=y2525CONFIG_P5020_DS=y2626+CONFIG_P5040_DS=y2627# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set2728CONFIG_BINFMT_MISC=m2829CONFIG_IRQ_ALL_CPUS=y
···3030#define flush_dcache_mmap_lock(mapping) do { } while (0)3131#define flush_dcache_mmap_unlock(mapping) do { } while (0)32323333+extern void __flush_disable_L1(void);3434+3335extern void __flush_icache_range(unsigned long, unsigned long);3436static inline void flush_icache_range(unsigned long start, unsigned long stop)3537{
+2
arch/powerpc/include/asm/fsl_guts.h
···4848 __be32 dmuxcr; /* 0x.0068 - DMA Mux Control Register */4949 u8 res06c[0x70 - 0x6c];5050 __be32 devdisr; /* 0x.0070 - Device Disable Control */5151+#define CCSR_GUTS_DEVDISR_TB1 0x000010005252+#define CCSR_GUTS_DEVDISR_TB0 0x000040005153 __be32 devdisr2; /* 0x.0074 - Device Disable Control 2 */5254 u8 res078[0x7c - 0x78];5355 __be32 pmjcr; /* 0x.007c - 4 Power Management Jog Control Register */
···1616#include <asm/processor.h>1717#include <asm/cputable.h>1818#include <asm/ppc_asm.h>1919+#include <asm/mmu-book3e.h>2020+#include <asm/asm-offsets.h>19212022_GLOBAL(__e500_icache_setup)2123 mfspr r0, SPRN_L1CSR1···7573 mtlr r47674 blr7775_GLOBAL(__setup_cpu_e500mc)7878- mr r5, r47979- mflr r47676+_GLOBAL(__setup_cpu_e5500)7777+ mflr r58078 bl __e500_icache_setup8179 bl __e500_dcache_setup8280 bl __setup_e500mc_ivors8383- mtlr r48181+ /*8282+ * We only want to touch IVOR38-41 if we're running on hardware8383+ * that supports category E.HV. The architectural way to determine8484+ * this is MMUCFG[LPIDSIZE].8585+ */8686+ mfspr r3, SPRN_MMUCFG8787+ rlwinm. r3, r3, 0, MMUCFG_LPIDSIZE8888+ beq 1f8989+ bl __setup_ehv_ivors9090+ b 2f9191+1:9292+ lwz r3, CPU_SPEC_FEATURES(r4)9393+ /* We need this check as cpu_setup is also called for9494+ * the secondary cores. So, if we have already cleared9595+ * the feature on the primary core, avoid doing it on the9696+ * secondary core.9797+ */9898+ andis. r6, r3, CPU_FTR_EMB_HV@h9999+ beq 2f100100+ rlwinm r3, r3, 0, ~CPU_FTR_EMB_HV101101+ stw r3, CPU_SPEC_FEATURES(r4)102102+2:103103+ mtlr r584104 blr85105#endif8686-/* Right now, restore and setup are the same thing */106106+107107+#ifdef CONFIG_PPC_BOOK3E_6487108_GLOBAL(__restore_cpu_e5500)8888-_GLOBAL(__setup_cpu_e5500)89109 mflr r490110 bl __e500_icache_setup91111 bl __e500_dcache_setup9292-#ifdef CONFIG_PPC_BOOK3E_6493112 bl .__setup_base_ivors94113 bl .setup_perfmon_ivor95114 bl .setup_doorbell_ivors115115+ /*116116+ * We only want to touch IVOR38-41 if we're running on hardware117117+ * that supports category E.HV. The architectural way to determine118118+ * this is MMUCFG[LPIDSIZE].119119+ */120120+ mfspr r10,SPRN_MMUCFG121121+ rlwinm. r10,r10,0,MMUCFG_LPIDSIZE122122+ beq 1f96123 bl .setup_ehv_ivors9797-#else9898- bl __setup_e500mc_ivors9999-#endif124124+1:100125 mtlr r4101126 blr127127+128128+_GLOBAL(__setup_cpu_e5500)129129+ mflr r5130130+ bl __e500_icache_setup131131+ bl __e500_dcache_setup132132+ bl .__setup_base_ivors133133+ bl .setup_perfmon_ivor134134+ bl .setup_doorbell_ivors135135+ /*136136+ * We only want to touch IVOR38-41 if we're running on hardware137137+ * that supports category E.HV. The architectural way to determine138138+ * this is MMUCFG[LPIDSIZE].139139+ */140140+ mfspr r10,SPRN_MMUCFG141141+ rlwinm. r10,r10,0,MMUCFG_LPIDSIZE142142+ beq 1f143143+ bl .setup_ehv_ivors144144+ b 2f145145+1:146146+ ld r10,CPU_SPEC_FEATURES(r4)147147+ LOAD_REG_IMMEDIATE(r9,CPU_FTR_EMB_HV)148148+ andc r10,r10,r9149149+ std r10,CPU_SPEC_FEATURES(r4)150150+2:151151+ mtlr r5152152+ blr153153+#endif
···13561356_GLOBAL(setup_doorbell_ivors)13571357 SET_IVOR(36, 0x280) /* Processor Doorbell */13581358 SET_IVOR(37, 0x2a0) /* Processor Doorbell Crit */13591359-13601360- /* Check MMUCFG[LPIDSIZE] to determine if we have category E.HV */13611361- mfspr r10,SPRN_MMUCFG13621362- rlwinm. r10,r10,0,MMUCFG_LPIDSIZE13631363- beqlr13641364-13651365- SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */13661366- SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */13671359 blr1368136013691361_GLOBAL(setup_ehv_ivors)13701370- /*13711371- * We may be running as a guest and lack E.HV even on a chip13721372- * that normally has it.13731373- */13741374- mfspr r10,SPRN_MMUCFG13751375- rlwinm. r10,r10,0,MMUCFG_LPIDSIZE13761376- beqlr13771377-13781362 SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */13791363 SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */13641364+ SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */13651365+ SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */13801366 blr
+32-14
arch/powerpc/kernel/head_fsl_booke.S
···895895 mtspr SPRN_IVOR36,r3896896 li r3,CriticalDoorbell@l897897 mtspr SPRN_IVOR37,r3898898+ sync899899+ blr898900899899- /*900900- * We only want to touch IVOR38-41 if we're running on hardware901901- * that supports category E.HV. The architectural way to determine902902- * this is MMUCFG[LPIDSIZE].903903- */904904- mfspr r3, SPRN_MMUCFG905905- andis. r3, r3, MMUCFG_LPIDSIZE@h906906- beq no_hv901901+/* setup ehv ivors for */902902+_GLOBAL(__setup_ehv_ivors)907903 li r3,GuestDoorbell@l908904 mtspr SPRN_IVOR38,r3909905 li r3,CriticalGuestDoorbell@l···908912 mtspr SPRN_IVOR40,r3909913 li r3,Ehvpriv@l910914 mtspr SPRN_IVOR41,r3911911-skip_hv_ivors:912915 sync913916 blr914914-no_hv:915915- lwz r3, CPU_SPEC_FEATURES(r5)916916- rlwinm r3, r3, 0, ~CPU_FTR_EMB_HV917917- stw r3, CPU_SPEC_FEATURES(r5)918918- b skip_hv_ivors919917920918#ifdef CONFIG_SPE921919/*···1029103910301040 /* restore HID0 */10311041 mtspr SPRN_HID0,r810421042+ isync10431043+10441044+ blr10451045+10461046+/* Flush L1 d-cache, invalidate and disable d-cache and i-cache */10471047+_GLOBAL(__flush_disable_L1)10481048+ mflr r1010491049+ bl flush_dcache_L1 /* Flush L1 d-cache */10501050+ mtlr r1010511051+10521052+ mfspr r4, SPRN_L1CSR0 /* Invalidate and disable d-cache */10531053+ li r5, 210541054+ rlwimi r4, r5, 0, 310551055+10561056+ msync10571057+ isync10581058+ mtspr SPRN_L1CSR0, r410591059+ isync10601060+10611061+1: mfspr r4, SPRN_L1CSR0 /* Wait for the invalidate to finish */10621062+ andi. r4, r4, 210631063+ bne 1b10641064+10651065+ mfspr r4, SPRN_L1CSR1 /* Invalidate and disable i-cache */10661066+ li r5, 210671067+ rlwimi r4, r5, 0, 310681068+10691069+ mtspr SPRN_L1CSR1, r410321070 isync1033107110341072 blr
+11-1
arch/powerpc/kernel/smp.c
···102102 * Ok it's not there, so it might be soft-unplugged, let's103103 * try to bring it back104104 */105105- per_cpu(cpu_state, nr) = CPU_UP_PREPARE;105105+ generic_set_cpu_up(nr);106106 smp_wmb();107107 smp_send_reschedule(nr);108108#endif /* CONFIG_HOTPLUG_CPU */···411411void generic_set_cpu_dead(unsigned int cpu)412412{413413 per_cpu(cpu_state, cpu) = CPU_DEAD;414414+}415415+416416+/*417417+ * The cpu_state should be set to CPU_UP_PREPARE in kick_cpu(), otherwise418418+ * the cpu_state is always CPU_DEAD after calling generic_set_cpu_dead(),419419+ * which makes the delay in generic_cpu_die() not happen.420420+ */421421+void generic_set_cpu_up(unsigned int cpu)422422+{423423+ per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;414424}415425416426int generic_check_cpu_restart(unsigned int cpu)
+1-2
arch/powerpc/mm/mem.c
···300300 unsigned long reservedpages = 0, codesize, initsize, datasize, bsssize;301301302302#ifdef CONFIG_SWIOTLB303303- if (ppc_swiotlb_enable)304304- swiotlb_init(1);303303+ swiotlb_init(0);305304#endif306305307306 num_physpages = memblock_phys_mem_size() >> PAGE_SHIFT;
+2-8
arch/powerpc/platforms/44x/currituck.c
···2121 */22222323#include <linux/init.h>2424-#include <linux/memblock.h>2524#include <linux/of.h>2625#include <linux/of_platform.h>2726#include <linux/rtc.h>···158159159160 /* No need to check the DMA config as we /know/ our windows are all of160161 * RAM. Lets hope that doesn't change */161161-#ifdef CONFIG_SWIOTLB162162- if ((memblock_end_of_DRAM() - 1) > 0xffffffff) {163163- ppc_swiotlb_enable = 1;164164- set_pci_dma_ops(&swiotlb_dma_ops);165165- ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;166166- }167167-#endif162162+ swiotlb_detect_4g();163163+168164 ppc47x_smp_init();169165}170166
+21
arch/powerpc/platforms/85xx/Kconfig
···104104 help105105 This option enables support for the Freescale P1022DS reference board.106106107107+config P1022_RDK108108+ bool "Freescale / iVeia P1022 RDK"109109+ select DEFAULT_UIMAGE110110+ help111111+ This option enables support for the Freescale / iVeia P1022RDK112112+ reference board.113113+107114config P1023_RDS108115 bool "Freescale P1023 RDS"109116 select DEFAULT_UIMAGE···260253 select PPC_EPAPR_HV_PIC261254 help262255 This option enables support for the P5020 DS board256256+257257+config P5040_DS258258+ bool "Freescale P5040 DS"259259+ select DEFAULT_UIMAGE260260+ select E500261261+ select PPC_E500MC262262+ select PHYS_64BIT263263+ select SWIOTLB264264+ select ARCH_REQUIRE_GPIOLIB265265+ select GPIO_MPC8XXX266266+ select HAS_RAPIDIO267267+ select PPC_EPAPR_HV_PIC268268+ help269269+ This option enables support for the P5040 DS board263270264271config PPC_QEMU_E500265272 bool "QEMU generic e500 platform"
···11+/*22+ * P1022 RDK board specific routines33+ *44+ * Copyright 2012 Freescale Semiconductor, Inc.55+ *66+ * Author: Timur Tabi <timur@freescale.com>77+ *88+ * Based on p1022_ds.c99+ *1010+ * This file is licensed under the terms of the GNU General Public License1111+ * version 2. This program is licensed "as is" without any warranty of any1212+ * kind, whether express or implied.1313+ */1414+1515+#include <linux/pci.h>1616+#include <linux/of_platform.h>1717+#include <asm/div64.h>1818+#include <asm/mpic.h>1919+#include <asm/swiotlb.h>2020+2121+#include <sysdev/fsl_soc.h>2222+#include <sysdev/fsl_pci.h>2323+#include <asm/udbg.h>2424+#include <asm/fsl_guts.h>2525+#include "smp.h"2626+2727+#include "mpc85xx.h"2828+2929+#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)3030+3131+/* DIU Pixel Clock bits of the CLKDVDR Global Utilities register */3232+#define CLKDVDR_PXCKEN 0x800000003333+#define CLKDVDR_PXCKINV 0x100000003434+#define CLKDVDR_PXCKDLY 0x060000003535+#define CLKDVDR_PXCLK_MASK 0x00FF00003636+3737+/**3838+ * p1022rdk_set_monitor_port: switch the output to a different monitor port3939+ */4040+static void p1022rdk_set_monitor_port(enum fsl_diu_monitor_port port)4141+{4242+ if (port != FSL_DIU_PORT_DVI) {4343+ pr_err("p1022rdk: unsupported monitor port %i\n", port);4444+ return;4545+ }4646+}4747+4848+/**4949+ * p1022rdk_set_pixel_clock: program the DIU's clock5050+ *5151+ * @pixclock: the wavelength, in picoseconds, of the clock5252+ */5353+void p1022rdk_set_pixel_clock(unsigned int pixclock)5454+{5555+ struct device_node *guts_np = NULL;5656+ struct ccsr_guts __iomem *guts;5757+ unsigned long freq;5858+ u64 temp;5959+ u32 pxclk;6060+6161+ /* Map the global utilities registers. */6262+ guts_np = of_find_compatible_node(NULL, NULL, "fsl,p1022-guts");6363+ if (!guts_np) {6464+ pr_err("p1022rdk: missing global utilties device node\n");6565+ return;6666+ }6767+6868+ guts = of_iomap(guts_np, 0);6969+ of_node_put(guts_np);7070+ if (!guts) {7171+ pr_err("p1022rdk: could not map global utilties device\n");7272+ return;7373+ }7474+7575+ /* Convert pixclock from a wavelength to a frequency */7676+ temp = 1000000000000ULL;7777+ do_div(temp, pixclock);7878+ freq = temp;7979+8080+ /*8181+ * 'pxclk' is the ratio of the platform clock to the pixel clock.8282+ * This number is programmed into the CLKDVDR register, and the valid8383+ * range of values is 2-255.8484+ */8585+ pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq);8686+ pxclk = clamp_t(u32, pxclk, 2, 255);8787+8888+ /* Disable the pixel clock, and set it to non-inverted and no delay */8989+ clrbits32(&guts->clkdvdr,9090+ CLKDVDR_PXCKEN | CLKDVDR_PXCKDLY | CLKDVDR_PXCLK_MASK);9191+9292+ /* Enable the clock and set the pxclk */9393+ setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16));9494+9595+ iounmap(guts);9696+}9797+9898+/**9999+ * p1022rdk_valid_monitor_port: set the monitor port for sysfs100100+ */101101+enum fsl_diu_monitor_port102102+p1022rdk_valid_monitor_port(enum fsl_diu_monitor_port port)103103+{104104+ return FSL_DIU_PORT_DVI;105105+}106106+107107+#endif108108+109109+void __init p1022_rdk_pic_init(void)110110+{111111+ struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |112112+ MPIC_SINGLE_DEST_CPU,113113+ 0, 256, " OpenPIC ");114114+ BUG_ON(mpic == NULL);115115+ mpic_init(mpic);116116+}117117+118118+/*119119+ * Setup the architecture120120+ */121121+static void __init p1022_rdk_setup_arch(void)122122+{123123+ if (ppc_md.progress)124124+ ppc_md.progress("p1022_rdk_setup_arch()", 0);125125+126126+#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)127127+ diu_ops.set_monitor_port = p1022rdk_set_monitor_port;128128+ diu_ops.set_pixel_clock = p1022rdk_set_pixel_clock;129129+ diu_ops.valid_monitor_port = p1022rdk_valid_monitor_port;130130+#endif131131+132132+ mpc85xx_smp_init();133133+134134+ fsl_pci_assign_primary();135135+136136+ swiotlb_detect_4g();137137+138138+ pr_info("Freescale / iVeia P1022 RDK reference board\n");139139+}140140+141141+machine_arch_initcall(p1022_rdk, mpc85xx_common_publish_devices);142142+143143+machine_arch_initcall(p1022_rdk, swiotlb_setup_bus_notifier);144144+145145+/*146146+ * Called very early, device-tree isn't unflattened147147+ */148148+static int __init p1022_rdk_probe(void)149149+{150150+ unsigned long root = of_get_flat_dt_root();151151+152152+ return of_flat_dt_is_compatible(root, "fsl,p1022rdk");153153+}154154+155155+define_machine(p1022_rdk) {156156+ .name = "P1022 RDK",157157+ .probe = p1022_rdk_probe,158158+ .setup_arch = p1022_rdk_setup_arch,159159+ .init_IRQ = p1022_rdk_pic_init,160160+#ifdef CONFIG_PCI161161+ .pcibios_fixup_bus = fsl_pcibios_fixup_bus,162162+#endif163163+ .get_irq = mpic_get_irq,164164+ .restart = fsl_rstcr_restart,165165+ .calibrate_decr = generic_calibrate_decr,166166+ .progress = udbg_progress,167167+};
···11+/*22+ * P5040 DS Setup33+ *44+ * Copyright 2009-2010 Freescale Semiconductor Inc.55+ *66+ * This program is free software; you can redistribute it and/or modify it77+ * under the terms of the GNU General Public License as published by the88+ * Free Software Foundation; either version 2 of the License, or (at your99+ * option) any later version.1010+ */1111+1212+#include <linux/kernel.h>1313+#include <linux/pci.h>1414+1515+#include <asm/machdep.h>1616+#include <asm/udbg.h>1717+#include <asm/mpic.h>1818+1919+#include <linux/of_fdt.h>2020+2121+#include <sysdev/fsl_soc.h>2222+#include <sysdev/fsl_pci.h>2323+#include <asm/ehv_pic.h>2424+2525+#include "corenet_ds.h"2626+2727+/*2828+ * Called very early, device-tree isn't unflattened2929+ */3030+static int __init p5040_ds_probe(void)3131+{3232+ unsigned long root = of_get_flat_dt_root();3333+#ifdef CONFIG_SMP3434+ extern struct smp_ops_t smp_85xx_ops;3535+#endif3636+3737+ if (of_flat_dt_is_compatible(root, "fsl,P5040DS"))3838+ return 1;3939+4040+ /* Check if we're running under the Freescale hypervisor */4141+ if (of_flat_dt_is_compatible(root, "fsl,P5040DS-hv")) {4242+ ppc_md.init_IRQ = ehv_pic_init;4343+ ppc_md.get_irq = ehv_pic_get_irq;4444+ ppc_md.restart = fsl_hv_restart;4545+ ppc_md.power_off = fsl_hv_halt;4646+ ppc_md.halt = fsl_hv_halt;4747+#ifdef CONFIG_SMP4848+ /*4949+ * Disable the timebase sync operations because we can't write5050+ * to the timebase registers under the hypervisor.5151+ */5252+ smp_85xx_ops.give_timebase = NULL;5353+ smp_85xx_ops.take_timebase = NULL;5454+#endif5555+ return 1;5656+ }5757+5858+ return 0;5959+}6060+6161+define_machine(p5040_ds) {6262+ .name = "P5040 DS",6363+ .probe = p5040_ds_probe,6464+ .setup_arch = corenet_ds_setup_arch,6565+ .init_IRQ = corenet_ds_pic_init,6666+#ifdef CONFIG_PCI6767+ .pcibios_fixup_bus = fsl_pcibios_fixup_bus,6868+#endif6969+/* coreint doesn't play nice with lazy EE, use legacy mpic for now */7070+#ifdef CONFIG_PPC647171+ .get_irq = mpic_get_irq,7272+#else7373+ .get_irq = mpic_get_coreint_irq,7474+#endif7575+ .restart = fsl_rstcr_restart,7676+ .calibrate_decr = generic_calibrate_decr,7777+ .progress = udbg_progress,7878+#ifdef CONFIG_PPC647979+ .power_save = book3e_idle,8080+#else8181+ .power_save = e500_idle,8282+#endif8383+};8484+8585+machine_arch_initcall(p5040_ds, corenet_ds_publish_devices);8686+8787+#ifdef CONFIG_SWIOTLB8888+machine_arch_initcall(p5040_ds, swiotlb_setup_bus_notifier);8989+#endif
···11+/*22+ * Copyright (C) 2012 Freescale Semiconductor, Inc.33+ *44+ * Author: Varun Sethi <varun.sethi@freescale.com>55+ *66+ * This program is free software; you can redistribute it and/or77+ * modify it under the terms of the GNU General Public License88+ * as published by the Free Software Foundation; version 2 of the99+ * License.1010+ *1111+ */1212+1313+#include <linux/irq.h>1414+#include <linux/smp.h>1515+#include <linux/interrupt.h>1616+1717+#include <asm/io.h>1818+#include <asm/irq.h>1919+#include <asm/mpic.h>2020+2121+#include "mpic.h"2222+2323+#define MPIC_ERR_INT_BASE 0x39002424+#define MPIC_ERR_INT_EISR 0x00002525+#define MPIC_ERR_INT_EIMR 0x00102626+2727+static inline u32 mpic_fsl_err_read(u32 __iomem *base, unsigned int err_reg)2828+{2929+ return in_be32(base + (err_reg >> 2));3030+}3131+3232+static inline void mpic_fsl_err_write(u32 __iomem *base, u32 value)3333+{3434+ out_be32(base + (MPIC_ERR_INT_EIMR >> 2), value);3535+}3636+3737+static void fsl_mpic_mask_err(struct irq_data *d)3838+{3939+ u32 eimr;4040+ struct mpic *mpic = irq_data_get_irq_chip_data(d);4141+ unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0];4242+4343+ eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR);4444+ eimr |= (1 << (31 - src));4545+ mpic_fsl_err_write(mpic->err_regs, eimr);4646+}4747+4848+static void fsl_mpic_unmask_err(struct irq_data *d)4949+{5050+ u32 eimr;5151+ struct mpic *mpic = irq_data_get_irq_chip_data(d);5252+ unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0];5353+5454+ eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR);5555+ eimr &= ~(1 << (31 - src));5656+ mpic_fsl_err_write(mpic->err_regs, eimr);5757+}5858+5959+static struct irq_chip fsl_mpic_err_chip = {6060+ .irq_disable = fsl_mpic_mask_err,6161+ .irq_mask = fsl_mpic_mask_err,6262+ .irq_unmask = fsl_mpic_unmask_err,6363+};6464+6565+int mpic_setup_error_int(struct mpic *mpic, int intvec)6666+{6767+ int i;6868+6969+ mpic->err_regs = ioremap(mpic->paddr + MPIC_ERR_INT_BASE, 0x1000);7070+ if (!mpic->err_regs) {7171+ pr_err("could not map mpic error registers\n");7272+ return -ENOMEM;7373+ }7474+ mpic->hc_err = fsl_mpic_err_chip;7575+ mpic->hc_err.name = mpic->name;7676+ mpic->flags |= MPIC_FSL_HAS_EIMR;7777+ /* allocate interrupt vectors for error interrupts */7878+ for (i = MPIC_MAX_ERR - 1; i >= 0; i--)7979+ mpic->err_int_vecs[i] = --intvec;8080+8181+ return 0;8282+}8383+8484+int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw)8585+{8686+ if ((mpic->flags & MPIC_FSL_HAS_EIMR) &&8787+ (hw >= mpic->err_int_vecs[0] &&8888+ hw <= mpic->err_int_vecs[MPIC_MAX_ERR - 1])) {8989+ WARN_ON(mpic->flags & MPIC_SECONDARY);9090+9191+ pr_debug("mpic: mapping as Error Interrupt\n");9292+ irq_set_chip_data(virq, mpic);9393+ irq_set_chip_and_handler(virq, &mpic->hc_err,9494+ handle_level_irq);9595+ return 1;9696+ }9797+9898+ return 0;9999+}100100+101101+static irqreturn_t fsl_error_int_handler(int irq, void *data)102102+{103103+ struct mpic *mpic = (struct mpic *) data;104104+ u32 eisr, eimr;105105+ int errint;106106+ unsigned int cascade_irq;107107+108108+ eisr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EISR);109109+ eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR);110110+111111+ if (!(eisr & ~eimr))112112+ return IRQ_NONE;113113+114114+ while (eisr) {115115+ errint = __builtin_clz(eisr);116116+ cascade_irq = irq_linear_revmap(mpic->irqhost,117117+ mpic->err_int_vecs[errint]);118118+ WARN_ON(cascade_irq == NO_IRQ);119119+ if (cascade_irq != NO_IRQ) {120120+ generic_handle_irq(cascade_irq);121121+ } else {122122+ eimr |= 1 << (31 - errint);123123+ mpic_fsl_err_write(mpic->err_regs, eimr);124124+ }125125+ eisr &= ~(1 << (31 - errint));126126+ }127127+128128+ return IRQ_HANDLED;129129+}130130+131131+void mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum)132132+{133133+ unsigned int virq;134134+ int ret;135135+136136+ virq = irq_create_mapping(mpic->irqhost, irqnum);137137+ if (virq == NO_IRQ) {138138+ pr_err("Error interrupt setup failed\n");139139+ return;140140+ }141141+142142+ /* Mask all error interrupts */143143+ mpic_fsl_err_write(mpic->err_regs, ~0);144144+145145+ ret = request_irq(virq, fsl_error_int_handler, IRQF_NO_THREAD,146146+ "mpic-error-int", mpic);147147+ if (ret)148148+ pr_err("Failed to register error interrupt handler\n");149149+}
+73-49
arch/powerpc/sysdev/fsl_pci.c
···143143 pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n",144144 (u64)rsrc->start, (u64)resource_size(rsrc));145145146146- if (of_device_is_compatible(hose->dn, "fsl,qoriq-pcie-v2.2")) {147147- win_idx = 2;148148- start_idx = 0;149149- end_idx = 3;150150- }151151-152146 pci = ioremap(rsrc->start, resource_size(rsrc));153147 if (!pci) {154148 dev_err(hose->parent, "Unable to map ATMU registers\n");155149 return;150150+ }151151+152152+ if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {153153+ if (in_be32(&pci->block_rev1) >= PCIE_IP_REV_2_2) {154154+ win_idx = 2;155155+ start_idx = 0;156156+ end_idx = 3;157157+ }156158 }157159158160 /* Disable all windows (except powar0 since it's ignored) */···820818 { .compatible = "fsl,p1010-pcie", },821819 { .compatible = "fsl,p1023-pcie", },822820 { .compatible = "fsl,p4080-pcie", },821821+ { .compatible = "fsl,qoriq-pcie-v2.4", },823822 { .compatible = "fsl,qoriq-pcie-v2.3", },824823 { .compatible = "fsl,qoriq-pcie-v2.2", },825824 {},···828825829826struct device_node *fsl_pci_primary;830827831831-void __devinit fsl_pci_init(void)828828+void fsl_pci_assign_primary(void)829829+{830830+ struct device_node *np;831831+832832+ /* Callers can specify the primary bus using other means. */833833+ if (fsl_pci_primary)834834+ return;835835+836836+ /* If a PCI host bridge contains an ISA node, it's primary. */837837+ np = of_find_node_by_type(NULL, "isa");838838+ while ((fsl_pci_primary = of_get_parent(np))) {839839+ of_node_put(np);840840+ np = fsl_pci_primary;841841+842842+ if (of_match_node(pci_ids, np) && of_device_is_available(np))843843+ return;844844+ }845845+846846+ /*847847+ * If there's no PCI host bridge with ISA, arbitrarily848848+ * designate one as primary. This can go away once849849+ * various bugs with primary-less systems are fixed.850850+ */851851+ for_each_matching_node(np, pci_ids) {852852+ if (of_device_is_available(np)) {853853+ fsl_pci_primary = np;854854+ of_node_put(np);855855+ return;856856+ }857857+ }858858+}859859+860860+static int __devinit fsl_pci_probe(struct platform_device *pdev)832861{833862 int ret;834863 struct device_node *node;835864 struct pci_controller *hose;836836- dma_addr_t max = 0xffffffff;837865838838- /* Callers can specify the primary bus using other means. */839839- if (!fsl_pci_primary) {840840- /* If a PCI host bridge contains an ISA node, it's primary. */841841- node = of_find_node_by_type(NULL, "isa");842842- while ((fsl_pci_primary = of_get_parent(node))) {843843- of_node_put(node);844844- node = fsl_pci_primary;845845-846846- if (of_match_node(pci_ids, node))847847- break;848848- }849849- }850850-851851- node = NULL;852852- for_each_node_by_type(node, "pci") {853853- if (of_match_node(pci_ids, node)) {854854- /*855855- * If there's no PCI host bridge with ISA, arbitrarily856856- * designate one as primary. This can go away once857857- * various bugs with primary-less systems are fixed.858858- */859859- if (!fsl_pci_primary)860860- fsl_pci_primary = node;861861-862862- ret = fsl_add_bridge(node, fsl_pci_primary == node);863863- if (ret == 0) {864864- hose = pci_find_hose_for_OF_device(node);865865- max = min(max, hose->dma_window_base_cur +866866- hose->dma_window_size);867867- }868868- }869869- }866866+ node = pdev->dev.of_node;867867+ ret = fsl_add_bridge(node, fsl_pci_primary == node);870868871869#ifdef CONFIG_SWIOTLB872872- /*873873- * if we couldn't map all of DRAM via the dma windows874874- * we need SWIOTLB to handle buffers located outside of875875- * dma capable memory region876876- */877877- if (memblock_end_of_DRAM() - 1 > max) {878878- ppc_swiotlb_enable = 1;879879- set_pci_dma_ops(&swiotlb_dma_ops);880880- ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;870870+ if (ret == 0) {871871+ hose = pci_find_hose_for_OF_device(pdev->dev.of_node);872872+873873+ /*874874+ * if we couldn't map all of DRAM via the dma windows875875+ * we need SWIOTLB to handle buffers located outside of876876+ * dma capable memory region877877+ */878878+ if (memblock_end_of_DRAM() - 1 > hose->dma_window_base_cur +879879+ hose->dma_window_size)880880+ ppc_swiotlb_enable = 1;881881 }882882#endif883883+884884+ mpc85xx_pci_err_probe(pdev);885885+886886+ return 0;883887}888888+889889+static struct platform_driver fsl_pci_driver = {890890+ .driver = {891891+ .name = "fsl-pci",892892+ .of_match_table = pci_ids,893893+ },894894+ .probe = fsl_pci_probe,895895+};896896+897897+static int __init fsl_pci_init(void)898898+{899899+ return platform_driver_register(&fsl_pci_driver);900900+}901901+arch_initcall(fsl_pci_init);884902#endif
+16-4
arch/powerpc/sysdev/fsl_pci.h
···16161717#define PCIE_LTSSM 0x0404 /* PCIE Link Training and Status */1818#define PCIE_LTSSM_L0 0x16 /* L0 state */1919+#define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block version Rev2.2 */1920#define PIWAR_EN 0x80000000 /* Enable */2021#define PIWAR_PF 0x20000000 /* prefetch */2122#define PIWAR_TGI_LOCAL 0x00f00000 /* target - local memory */···5857 __be32 pex_pme_mes_disr; /* 0x.024 - PCIE PME and message disable register */5958 __be32 pex_pme_mes_ier; /* 0x.028 - PCIE PME and message interrupt enable register */6059 __be32 pex_pmcr; /* 0x.02c - PCIE power management command register */6161- u8 res3[3024];6060+ u8 res3[3016];6161+ __be32 block_rev1; /* 0x.bf8 - PCIE Block Revision register 1 */6262+ __be32 block_rev2; /* 0x.bfc - PCIE Block Revision register 2 */62636364/* PCI/PCI Express outbound window 0-46465 * Window 0 is the default window and is the only window enabled upon reset.···98959996extern struct device_node *fsl_pci_primary;10097101101-#ifdef CONFIG_FSL_PCI102102-void fsl_pci_init(void);9898+#ifdef CONFIG_PCI9999+void fsl_pci_assign_primary(void);103100#else104104-static inline void fsl_pci_init(void) {}101101+static inline void fsl_pci_assign_primary(void) {}102102+#endif103103+104104+#ifdef CONFIG_EDAC_MPC85XX105105+int mpc85xx_pci_err_probe(struct platform_device *op);106106+#else107107+static inline int mpc85xx_pci_err_probe(struct platform_device *op)108108+{109109+ return -ENOTSUPP;110110+}105111#endif106112107113#endif /* __POWERPC_FSL_PCI_H */
+85-17
arch/powerpc/sysdev/mpic.c
···66 * with various broken implementations of this HW.77 *88 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.99- * Copyright 2010-2011 Freescale Semiconductor, Inc.99+ * Copyright 2010-2012 Freescale Semiconductor, Inc.1010 *1111 * This file is subject to the terms and conditions of the GNU General Public1212 * License. See the file COPYING in the main directory of this archive···221221 _mpic_write(mpic->reg_type, &mpic->gregs, offset, value);222222}223223224224+static inline unsigned int mpic_tm_offset(struct mpic *mpic, unsigned int tm)225225+{226226+ return (tm >> 2) * MPIC_TIMER_GROUP_STRIDE +227227+ (tm & 3) * MPIC_INFO(TIMER_STRIDE);228228+}229229+224230static inline u32 _mpic_tm_read(struct mpic *mpic, unsigned int tm)225231{226226- unsigned int offset = MPIC_INFO(TIMER_VECTOR_PRI) +227227- ((tm & 3) * MPIC_INFO(TIMER_STRIDE));228228-229229- if (tm >= 4)230230- offset += 0x1000 / 4;232232+ unsigned int offset = mpic_tm_offset(mpic, tm) +233233+ MPIC_INFO(TIMER_VECTOR_PRI);231234232235 return _mpic_read(mpic->reg_type, &mpic->tmregs, offset);233236}234237235238static inline void _mpic_tm_write(struct mpic *mpic, unsigned int tm, u32 value)236239{237237- unsigned int offset = MPIC_INFO(TIMER_VECTOR_PRI) +238238- ((tm & 3) * MPIC_INFO(TIMER_STRIDE));239239-240240- if (tm >= 4)241241- offset += 0x1000 / 4;240240+ unsigned int offset = mpic_tm_offset(mpic, tm) +241241+ MPIC_INFO(TIMER_VECTOR_PRI);242242243243 _mpic_write(mpic->reg_type, &mpic->tmregs, offset, value);244244}···10261026 return 0;10271027 }1028102810291029+ if (mpic_map_error_int(mpic, virq, hw))10301030+ return 0;10311031+10291032 if (hw >= mpic->num_sources)10301033 return -EINVAL;10311034···10881085 */10891086 switch (intspec[2]) {10901087 case 0:10911091- case 1: /* no EISR/EIMR support for now, treat as shared IRQ */10881088+ break;10891089+ case 1:10901090+ if (!(mpic->flags & MPIC_FSL_HAS_EIMR))10911091+ break;10921092+10931093+ if (intspec[3] >= ARRAY_SIZE(mpic->err_int_vecs))10941094+ return -EINVAL;10951095+10961096+ *out_hwirq = mpic->err_int_vecs[intspec[3]];10971097+10921098 break;10931099 case 2:10941100 if (intspec[0] >= ARRAY_SIZE(mpic->ipi_vecs))···13131301 mpic_map(mpic, mpic->paddr, &mpic->gregs, MPIC_INFO(GREG_BASE), 0x1000);13141302 mpic_map(mpic, mpic->paddr, &mpic->tmregs, MPIC_INFO(TIMER_BASE), 0x1000);1315130313041304+ if (mpic->flags & MPIC_FSL) {13051305+ u32 brr1, version;13061306+ int ret;13071307+13081308+ /*13091309+ * Yes, Freescale really did put global registers in the13101310+ * magic per-cpu area -- and they don't even show up in the13111311+ * non-magic per-cpu copies that this driver normally uses.13121312+ */13131313+ mpic_map(mpic, mpic->paddr, &mpic->thiscpuregs,13141314+ MPIC_CPU_THISBASE, 0x1000);13151315+13161316+ brr1 = _mpic_read(mpic->reg_type, &mpic->thiscpuregs,13171317+ MPIC_FSL_BRR1);13181318+ version = brr1 & MPIC_FSL_BRR1_VER;13191319+13201320+ /* Error interrupt mask register (EIMR) is required for13211321+ * handling individual device error interrupts. EIMR13221322+ * was added in MPIC version 4.1.13231323+ *13241324+ * Over here we reserve vector number space for error13251325+ * interrupt vectors. This space is stolen from the13261326+ * global vector number space, as in case of ipis13271327+ * and timer interrupts.13281328+ *13291329+ * Available vector space = intvec_top - 12, where 1213301330+ * is the number of vectors which have been consumed by13311331+ * ipis and timer interrupts.13321332+ */13331333+ if (version >= 0x401) {13341334+ ret = mpic_setup_error_int(mpic, intvec_top - 12);13351335+ if (ret)13361336+ return NULL;13371337+ }13381338+ }13391339+13161340 /* Reset */1317134113181342 /* When using a device-node, reset requests are only honored if the MPIC···14881440void __init mpic_init(struct mpic *mpic)14891441{14901442 int i, cpu;14431443+ int num_timers = 4;1491144414921445 BUG_ON(mpic->num_sources == 0);14931446···14971448 /* Set current processor priority to max */14981449 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf);1499145014511451+ if (mpic->flags & MPIC_FSL) {14521452+ u32 brr1 = _mpic_read(mpic->reg_type, &mpic->thiscpuregs,14531453+ MPIC_FSL_BRR1);14541454+ u32 version = brr1 & MPIC_FSL_BRR1_VER;14551455+14561456+ /*14571457+ * Timer group B is present at the latest in MPIC 3.1 (e.g.14581458+ * mpc8536). It is not present in MPIC 2.0 (e.g. mpc8544).14591459+ * I don't know about the status of intermediate versions (or14601460+ * whether they even exist).14611461+ */14621462+ if (version >= 0x0301)14631463+ num_timers = 8;14641464+ }14651465+14661466+ /* FSL mpic error interrupt intialization */14671467+ if (mpic->flags & MPIC_FSL_HAS_EIMR)14681468+ mpic_err_int_init(mpic, MPIC_FSL_ERR_INT);14691469+15001470 /* Initialize timers to our reserved vectors and mask them for now */15011501- for (i = 0; i < 4; i++) {14711471+ for (i = 0; i < num_timers; i++) {14721472+ unsigned int offset = mpic_tm_offset(mpic, i);14731473+15021474 mpic_write(mpic->tmregs,15031503- i * MPIC_INFO(TIMER_STRIDE) +15041504- MPIC_INFO(TIMER_DESTINATION),14751475+ offset + MPIC_INFO(TIMER_DESTINATION),15051476 1 << hard_smp_processor_id());15061477 mpic_write(mpic->tmregs,15071507- i * MPIC_INFO(TIMER_STRIDE) +15081508- MPIC_INFO(TIMER_VECTOR_PRI),14781478+ offset + MPIC_INFO(TIMER_VECTOR_PRI),15091479 MPIC_VECPRI_MASK |15101480 (9 << MPIC_VECPRI_PRIORITY_SHIFT) |15111481 (mpic->timer_vecs[0] + i));
+22
arch/powerpc/sysdev/mpic.h
···4040 const struct cpumask *cpumask, bool force);4141extern void mpic_reset_core(int cpu);42424343+#ifdef CONFIG_FSL_SOC4444+extern int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw);4545+extern void mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum);4646+extern int mpic_setup_error_int(struct mpic *mpic, int intvec);4747+#else4848+static inline int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw)4949+{5050+ return 0;5151+}5252+5353+5454+static inline void mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum)5555+{5656+ return;5757+}5858+5959+static inline int mpic_setup_error_int(struct mpic *mpic, int intvec)6060+{6161+ return -1;6262+}6363+#endif6464+4365#endif /* _POWERPC_SYSDEV_MPIC_H */