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

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

Freescale updates from Scott:

<<
Highlights include 32-bit booke relocatable support, e6500 hardware
tablewalk support, various e500 SPE fixes, some new/revived boards, and
e6500 deeper idle and altivec powerdown modes.
>>

+3155 -615
+13
Documentation/devicetree/bindings/video/ssd1289fb.txt
··· 1 + * Solomon SSD1289 Framebuffer Driver 2 + 3 + Required properties: 4 + - compatible: Should be "solomon,ssd1289fb". The only supported bus for 5 + now is lbc. 6 + - reg: Should contain address of the controller on the LBC bus. The detail 7 + was described in Documentation/devicetree/bindings/powerpc/fsl/lbc.txt 8 + 9 + Examples: 10 + display@2,0 { 11 + compatible = "solomon,ssd1289fb"; 12 + reg = <0x2 0x0000 0x0004>; 13 + };
+2 -3
arch/powerpc/Kconfig
··· 402 402 config CRASH_DUMP 403 403 bool "Build a kdump crash kernel" 404 404 depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP) 405 - select RELOCATABLE if PPC64 || 44x 406 - select DYNAMIC_MEMSTART if FSL_BOOKE 405 + select RELOCATABLE if PPC64 || 44x || FSL_BOOKE 407 406 help 408 407 Build a kernel suitable for use as a kdump capture kernel. 409 408 The same kernel binary can be used as production kernel and dump ··· 883 884 884 885 config RELOCATABLE 885 886 bool "Build a relocatable kernel" 886 - depends on ADVANCED_OPTIONS && FLATMEM && 44x 887 + depends on ADVANCED_OPTIONS && FLATMEM && (44x || FSL_BOOKE) 887 888 select NONSTATIC_KERNEL 888 889 help 889 890 This builds a kernel image that is capable of running at the
+4 -3
arch/powerpc/boot/Makefile
··· 71 71 uartlite.c mpc52xx-psc.c 72 72 src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c 73 73 src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c 74 - src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c 74 + src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c 75 75 src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c 76 - src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c 76 + src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c fsl-soc.c 77 77 78 78 src-plat-y := of.c epapr.c 79 79 src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \ ··· 95 95 src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \ 96 96 cuboot-c2k.c gamecube-head.S \ 97 97 gamecube.c wii-head.S wii.c holly.c \ 98 - prpmc2800.c 98 + prpmc2800.c fixed-head.S mvme5100.c 99 99 src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c 100 100 src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c 101 101 src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c epapr-wrapper.c ··· 286 286 image-$(CONFIG_PPC_C2K) += cuImage.c2k 287 287 image-$(CONFIG_GAMECUBE) += dtbImage.gamecube 288 288 image-$(CONFIG_WII) += dtbImage.wii 289 + image-$(CONFIG_MVME5100) += dtbImage.mvme5100 289 290 290 291 # Board port in arch/powerpc/platform/amigaone/Kconfig 291 292 image-$(CONFIG_AMIGAONE) += cuImage.amigaone
+82
arch/powerpc/boot/dts/fsl/elo3-dma-2.dtsi
··· 1 + /* 2 + * QorIQ Elo3 DMA device tree stub [ controller @ offset 0x102300 ] 3 + * 4 + * Copyright 2013 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 + dma2: dma@102300 { 36 + #address-cells = <1>; 37 + #size-cells = <1>; 38 + compatible = "fsl,elo3-dma"; 39 + reg = <0x102300 0x4>, 40 + <0x102600 0x4>; 41 + ranges = <0x0 0x102100 0x500>; 42 + dma-channel@0 { 43 + compatible = "fsl,eloplus-dma-channel"; 44 + reg = <0x0 0x80>; 45 + interrupts = <464 2 0 0>; 46 + }; 47 + dma-channel@80 { 48 + compatible = "fsl,eloplus-dma-channel"; 49 + reg = <0x80 0x80>; 50 + interrupts = <465 2 0 0>; 51 + }; 52 + dma-channel@100 { 53 + compatible = "fsl,eloplus-dma-channel"; 54 + reg = <0x100 0x80>; 55 + interrupts = <466 2 0 0>; 56 + }; 57 + dma-channel@180 { 58 + compatible = "fsl,eloplus-dma-channel"; 59 + reg = <0x180 0x80>; 60 + interrupts = <467 2 0 0>; 61 + }; 62 + dma-channel@300 { 63 + compatible = "fsl,eloplus-dma-channel"; 64 + reg = <0x300 0x80>; 65 + interrupts = <468 2 0 0>; 66 + }; 67 + dma-channel@380 { 68 + compatible = "fsl,eloplus-dma-channel"; 69 + reg = <0x380 0x80>; 70 + interrupts = <469 2 0 0>; 71 + }; 72 + dma-channel@400 { 73 + compatible = "fsl,eloplus-dma-channel"; 74 + reg = <0x400 0x80>; 75 + interrupts = <470 2 0 0>; 76 + }; 77 + dma-channel@480 { 78 + compatible = "fsl,eloplus-dma-channel"; 79 + reg = <0x480 0x80>; 80 + interrupts = <471 2 0 0>; 81 + }; 82 + };
+2 -1
arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
··· 36 36 #address-cells = <2>; 37 37 #size-cells = <1>; 38 38 compatible = "fsl,p1020-elbc", "fsl,elbc", "simple-bus"; 39 - interrupts = <19 2 0 0>; 39 + interrupts = <19 2 0 0>, 40 + <16 2 0 0>; 40 41 }; 41 42 42 43 /* controller at 0x9000 */
+2 -1
arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
··· 36 36 #address-cells = <2>; 37 37 #size-cells = <1>; 38 38 compatible = "fsl,p1021-elbc", "fsl,elbc", "simple-bus"; 39 - interrupts = <19 2 0 0>; 39 + interrupts = <19 2 0 0>, 40 + <16 2 0 0>; 40 41 }; 41 42 42 43 /* controller at 0x9000 */
+2 -1
arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
··· 40 40 * pin muxing when the DIU is enabled. 41 41 */ 42 42 compatible = "fsl,p1022-elbc", "fsl,elbc"; 43 - interrupts = <19 2 0 0>; 43 + interrupts = <19 2 0 0>, 44 + <16 2 0 0>; 44 45 }; 45 46 46 47 /* controller at 0x9000 */
+2 -1
arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
··· 36 36 #address-cells = <2>; 37 37 #size-cells = <1>; 38 38 compatible = "fsl,p1023-elbc", "fsl,elbc", "simple-bus"; 39 - interrupts = <19 2 0 0>; 39 + interrupts = <19 2 0 0>, 40 + <16 2 0 0>; 40 41 }; 41 42 42 43 /* controller at 0xa000 */
+185
arch/powerpc/boot/dts/mvme5100.dts
··· 1 + /* 2 + * Device Tree Source for Motorola/Emerson MVME5100. 3 + * 4 + * Copyright 2013 CSC Australia Pty. Ltd. 5 + * 6 + * This file is licensed under the terms of the GNU General Public 7 + * License version 2. This program is licensed "as is" without 8 + * any warranty of any kind, whether express or implied. 9 + */ 10 + 11 + /dts-v1/; 12 + 13 + / { 14 + model = "MVME5100"; 15 + compatible = "MVME5100"; 16 + #address-cells = <1>; 17 + #size-cells = <1>; 18 + 19 + aliases { 20 + serial0 = &serial0; 21 + pci0 = &pci0; 22 + }; 23 + 24 + cpus { 25 + #address-cells = <1>; 26 + #size-cells = <0>; 27 + 28 + PowerPC,7410 { 29 + device_type = "cpu"; 30 + reg = <0x0>; 31 + /* Following required by dtc but not used */ 32 + d-cache-line-size = <32>; 33 + i-cache-line-size = <32>; 34 + i-cache-size = <32768>; 35 + d-cache-size = <32768>; 36 + timebase-frequency = <25000000>; 37 + clock-frequency = <500000000>; 38 + bus-frequency = <100000000>; 39 + }; 40 + }; 41 + 42 + memory { 43 + device_type = "memory"; 44 + reg = <0x0 0x20000000>; 45 + }; 46 + 47 + hawk@fef80000 { 48 + #address-cells = <1>; 49 + #size-cells = <1>; 50 + compatible = "hawk-bridge", "simple-bus"; 51 + ranges = <0x0 0xfef80000 0x10000>; 52 + reg = <0xfef80000 0x10000>; 53 + 54 + serial0: serial@8000 { 55 + device_type = "serial"; 56 + compatible = "ns16550"; 57 + reg = <0x8000 0x80>; 58 + reg-shift = <4>; 59 + clock-frequency = <1843200>; 60 + current-speed = <9600>; 61 + interrupts = <1 1>; // IRQ1 Level Active Low. 62 + interrupt-parent = <&mpic>; 63 + }; 64 + 65 + serial1: serial@8200 { 66 + device_type = "serial"; 67 + compatible = "ns16550"; 68 + reg = <0x8200 0x80>; 69 + reg-shift = <4>; 70 + clock-frequency = <1843200>; 71 + current-speed = <9600>; 72 + interrupts = <1 1>; // IRQ1 Level Active Low. 73 + interrupt-parent = <&mpic>; 74 + }; 75 + 76 + mpic: interrupt-controller@f3f80000 { 77 + #interrupt-cells = <2>; 78 + #address-cells = <0>; 79 + device_type = "open-pic"; 80 + compatible = "chrp,open-pic"; 81 + interrupt-controller; 82 + reg = <0xf3f80000 0x40000>; 83 + }; 84 + }; 85 + 86 + pci0: pci@feff0000 { 87 + #address-cells = <3>; 88 + #size-cells = <2>; 89 + #interrupt-cells = <1>; 90 + device_type = "pci"; 91 + compatible = "hawk-pci"; 92 + reg = <0xfec00000 0x400000>; 93 + 8259-interrupt-acknowledge = <0xfeff0030>; 94 + ranges = <0x1000000 0x0 0x0 0xfe000000 0x0 0x800000 95 + 0x2000000 0x0 0x80000000 0x80000000 0x0 0x74000000>; 96 + bus-range = <0 255>; 97 + clock-frequency = <33333333>; 98 + interrupt-parent = <&mpic>; 99 + interrupt-map-mask = <0xf800 0x0 0x0 0x7>; 100 + interrupt-map = < 101 + 102 + /* 103 + * This definition (IDSEL 11) duplicates the 104 + * interrupts definition in the i8259 105 + * interrupt controller below. 106 + * 107 + * Do not change the interrupt sense/polarity from 108 + * 0x2 to anything else, doing so will cause endless 109 + * "spurious" i8259 interrupts to be fielded. 110 + */ 111 + // IDSEL 11 - iPMC712 PCI/ISA Bridge 112 + 0x5800 0x0 0x0 0x1 &mpic 0x0 0x2 113 + 0x5800 0x0 0x0 0x2 &mpic 0x0 0x2 114 + 0x5800 0x0 0x0 0x3 &mpic 0x0 0x2 115 + 0x5800 0x0 0x0 0x4 &mpic 0x0 0x2 116 + 117 + /* IDSEL 12 - Not Used */ 118 + 119 + /* IDSEL 13 - Universe VME Bridge */ 120 + 0x6800 0x0 0x0 0x1 &mpic 0x5 0x1 121 + 0x6800 0x0 0x0 0x2 &mpic 0x6 0x1 122 + 0x6800 0x0 0x0 0x3 &mpic 0x7 0x1 123 + 0x6800 0x0 0x0 0x4 &mpic 0x8 0x1 124 + 125 + /* IDSEL 14 - ENET 1 */ 126 + 0x7000 0x0 0x0 0x1 &mpic 0x2 0x1 127 + 128 + /* IDSEL 15 - Not Used */ 129 + 130 + /* IDSEL 16 - PMC Slot 1 */ 131 + 0x8000 0x0 0x0 0x1 &mpic 0x9 0x1 132 + 0x8000 0x0 0x0 0x2 &mpic 0xa 0x1 133 + 0x8000 0x0 0x0 0x3 &mpic 0xb 0x1 134 + 0x8000 0x0 0x0 0x4 &mpic 0xc 0x1 135 + 136 + /* IDSEL 17 - PMC Slot 2 */ 137 + 0x8800 0x0 0x0 0x1 &mpic 0xc 0x1 138 + 0x8800 0x0 0x0 0x2 &mpic 0x9 0x1 139 + 0x8800 0x0 0x0 0x3 &mpic 0xa 0x1 140 + 0x8800 0x0 0x0 0x4 &mpic 0xb 0x1 141 + 142 + /* IDSEL 18 - Not Used */ 143 + 144 + /* IDSEL 19 - ENET 2 */ 145 + 0x9800 0x0 0x0 0x1 &mpic 0xd 0x1 146 + 147 + /* IDSEL 20 - PMCSPAN (PCI-X) */ 148 + 0xa000 0x0 0x0 0x1 &mpic 0x9 0x1 149 + 0xa000 0x0 0x0 0x2 &mpic 0xa 0x1 150 + 0xa000 0x0 0x0 0x3 &mpic 0xb 0x1 151 + 0xa000 0x0 0x0 0x4 &mpic 0xc 0x1 152 + 153 + >; 154 + 155 + isa { 156 + #address-cells = <2>; 157 + #size-cells = <1>; 158 + #interrupt-cells = <2>; 159 + device_type = "isa"; 160 + compatible = "isa"; 161 + ranges = <0x00000001 0 0x01000000 0 0x00000000 0x00001000>; 162 + interrupt-parent = <&i8259>; 163 + 164 + i8259: interrupt-controller@20 { 165 + #interrupt-cells = <2>; 166 + #address-cells = <0>; 167 + interrupts = <0 2>; 168 + device_type = "interrupt-controller"; 169 + compatible = "chrp,iic"; 170 + interrupt-controller; 171 + reg = <1 0x00000020 0x00000002 172 + 1 0x000000a0 0x00000002 173 + 1 0x000004d0 0x00000002>; 174 + interrupt-parent = <&mpic>; 175 + }; 176 + 177 + }; 178 + 179 + }; 180 + 181 + chosen { 182 + linux,stdout-path = &serial0; 183 + }; 184 + 185 + };
+23
arch/powerpc/boot/dts/p1010rdb-pa.dts
··· 1 + /* 2 + * P1010 RDB Device Tree Source 3 + * 4 + * Copyright 2011 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/ "fsl/p1010si-pre.dtsi" 13 + 14 + / { 15 + model = "fsl,P1010RDB"; 16 + compatible = "fsl,P1010RDB"; 17 + 18 + /include/ "p1010rdb_32b.dtsi" 19 + }; 20 + 21 + /include/ "p1010rdb.dtsi" 22 + /include/ "p1010rdb-pa.dtsi" 23 + /include/ "fsl/p1010si-post.dtsi"
+85
arch/powerpc/boot/dts/p1010rdb-pa.dtsi
··· 1 + /* 2 + * P1010 RDB Device Tree Source stub (no addresses or top-level ranges) 3 + * 4 + * Copyright 2013 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 + &ifc_nand { 36 + partition@0 { 37 + /* This location must not be altered */ 38 + /* 1MB for u-boot Bootloader Image */ 39 + reg = <0x0 0x00100000>; 40 + label = "NAND U-Boot Image"; 41 + read-only; 42 + }; 43 + 44 + partition@100000 { 45 + /* 1MB for DTB Image */ 46 + reg = <0x00100000 0x00100000>; 47 + label = "NAND DTB Image"; 48 + }; 49 + 50 + partition@200000 { 51 + /* 4MB for Linux Kernel Image */ 52 + reg = <0x00200000 0x00400000>; 53 + label = "NAND Linux Kernel Image"; 54 + }; 55 + 56 + partition@600000 { 57 + /* 4MB for Compressed Root file System Image */ 58 + reg = <0x00600000 0x00400000>; 59 + label = "NAND Compressed RFS Image"; 60 + }; 61 + 62 + partition@a00000 { 63 + /* 15MB for JFFS2 based Root file System */ 64 + reg = <0x00a00000 0x00f00000>; 65 + label = "NAND JFFS2 Root File System"; 66 + }; 67 + 68 + partition@1900000 { 69 + /* 7MB for User Area */ 70 + reg = <0x01900000 0x00700000>; 71 + label = "NAND User area"; 72 + }; 73 + }; 74 + 75 + &phy0 { 76 + interrupts = <1 1 0 0>; 77 + }; 78 + 79 + &phy1 { 80 + interrupts = <2 1 0 0>; 81 + }; 82 + 83 + &phy2 { 84 + interrupts = <4 1 0 0>; 85 + };
+35
arch/powerpc/boot/dts/p1010rdb-pb.dts
··· 1 + /* 2 + * P1010 RDB Device Tree Source 3 + * 4 + * Copyright 2011 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/ "fsl/p1010si-pre.dtsi" 13 + 14 + / { 15 + model = "fsl,P1010RDB-PB"; 16 + compatible = "fsl,P1010RDB-PB"; 17 + 18 + /include/ "p1010rdb_32b.dtsi" 19 + }; 20 + 21 + /include/ "p1010rdb.dtsi" 22 + 23 + &phy0 { 24 + interrupts = <0 1 0 0>; 25 + }; 26 + 27 + &phy1 { 28 + interrupts = <2 1 0 0>; 29 + }; 30 + 31 + &phy2 { 32 + interrupts = <1 1 0 0>; 33 + }; 34 + 35 + /include/ "fsl/p1010si-post.dtsi"
+58
arch/powerpc/boot/dts/p1010rdb-pb_36b.dts
··· 1 + /* 2 + * P1010 RDB Device Tree Source (36-bit address map) 3 + * 4 + * Copyright 2011 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/p1010si-pre.dtsi" 36 + 37 + / { 38 + model = "fsl,P1010RDB-PB"; 39 + compatible = "fsl,P1010RDB-PB"; 40 + 41 + /include/ "p1010rdb_36b.dtsi" 42 + }; 43 + 44 + /include/ "p1010rdb.dtsi" 45 + 46 + &phy0 { 47 + interrupts = <0 1 0 0>; 48 + }; 49 + 50 + &phy1 { 51 + interrupts = <2 1 0 0>; 52 + }; 53 + 54 + &phy2 { 55 + interrupts = <1 1 0 0>; 56 + }; 57 + 58 + /include/ "fsl/p1010si-post.dtsi"
-66
arch/powerpc/boot/dts/p1010rdb.dts
··· 1 - /* 2 - * P1010 RDB Device Tree Source 3 - * 4 - * Copyright 2011 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/ "fsl/p1010si-pre.dtsi" 13 - 14 - / { 15 - model = "fsl,P1010RDB"; 16 - compatible = "fsl,P1010RDB"; 17 - 18 - memory { 19 - device_type = "memory"; 20 - }; 21 - 22 - board_ifc: ifc: ifc@ffe1e000 { 23 - /* NOR, NAND Flashes and CPLD on board */ 24 - ranges = <0x0 0x0 0x0 0xee000000 0x02000000 25 - 0x1 0x0 0x0 0xff800000 0x00010000 26 - 0x3 0x0 0x0 0xffb00000 0x00000020>; 27 - reg = <0x0 0xffe1e000 0 0x2000>; 28 - }; 29 - 30 - board_soc: soc: soc@ffe00000 { 31 - ranges = <0x0 0x0 0xffe00000 0x100000>; 32 - }; 33 - 34 - pci0: pcie@ffe09000 { 35 - reg = <0 0xffe09000 0 0x1000>; 36 - ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 37 - 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 38 - pcie@0 { 39 - ranges = <0x2000000 0x0 0xa0000000 40 - 0x2000000 0x0 0xa0000000 41 - 0x0 0x20000000 42 - 43 - 0x1000000 0x0 0x0 44 - 0x1000000 0x0 0x0 45 - 0x0 0x100000>; 46 - }; 47 - }; 48 - 49 - pci1: pcie@ffe0a000 { 50 - reg = <0 0xffe0a000 0 0x1000>; 51 - ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 52 - 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 53 - pcie@0 { 54 - ranges = <0x2000000 0x0 0x80000000 55 - 0x2000000 0x0 0x80000000 56 - 0x0 0x20000000 57 - 58 - 0x1000000 0x0 0x0 59 - 0x1000000 0x0 0x0 60 - 0x0 0x100000>; 61 - }; 62 - }; 63 - }; 64 - 65 - /include/ "p1010rdb.dtsi" 66 - /include/ "fsl/p1010si-post.dtsi"
+1 -42
arch/powerpc/boot/dts/p1010rdb.dtsi
··· 69 69 }; 70 70 }; 71 71 72 - nand@1,0 { 72 + ifc_nand: nand@1,0 { 73 73 #address-cells = <1>; 74 74 #size-cells = <1>; 75 75 compatible = "fsl,ifc-nand"; 76 76 reg = <0x1 0x0 0x10000>; 77 - 78 - partition@0 { 79 - /* This location must not be altered */ 80 - /* 1MB for u-boot Bootloader Image */ 81 - reg = <0x0 0x00100000>; 82 - label = "NAND U-Boot Image"; 83 - read-only; 84 - }; 85 - 86 - partition@100000 { 87 - /* 1MB for DTB Image */ 88 - reg = <0x00100000 0x00100000>; 89 - label = "NAND DTB Image"; 90 - }; 91 - 92 - partition@200000 { 93 - /* 4MB for Linux Kernel Image */ 94 - reg = <0x00200000 0x00400000>; 95 - label = "NAND Linux Kernel Image"; 96 - }; 97 - 98 - partition@600000 { 99 - /* 4MB for Compressed Root file System Image */ 100 - reg = <0x00600000 0x00400000>; 101 - label = "NAND Compressed RFS Image"; 102 - }; 103 - 104 - partition@a00000 { 105 - /* 15MB for JFFS2 based Root file System */ 106 - reg = <0x00a00000 0x00f00000>; 107 - label = "NAND JFFS2 Root File System"; 108 - }; 109 - 110 - partition@1900000 { 111 - /* 7MB for User Area */ 112 - reg = <0x01900000 0x00700000>; 113 - label = "NAND User area"; 114 - }; 115 77 }; 116 78 117 79 cpld@3,0 { ··· 155 193 156 194 mdio@24000 { 157 195 phy0: ethernet-phy@0 { 158 - interrupts = <3 1 0 0>; 159 196 reg = <0x1>; 160 197 }; 161 198 162 199 phy1: ethernet-phy@1 { 163 - interrupts = <2 1 0 0>; 164 200 reg = <0x0>; 165 201 }; 166 202 167 203 phy2: ethernet-phy@2 { 168 - interrupts = <2 1 0 0>; 169 204 reg = <0x2>; 170 205 }; 171 206
+79
arch/powerpc/boot/dts/p1010rdb_32b.dtsi
··· 1 + /* 2 + * P1010 RDB Device Tree Source stub (no addresses or top-level ranges) 3 + * 4 + * Copyright 2013 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 + memory { 36 + device_type = "memory"; 37 + }; 38 + 39 + board_ifc: ifc: ifc@ffe1e000 { 40 + /* NOR, NAND Flashes and CPLD on board */ 41 + ranges = <0x0 0x0 0x0 0xee000000 0x02000000 42 + 0x1 0x0 0x0 0xff800000 0x00010000 43 + 0x3 0x0 0x0 0xffb00000 0x00000020>; 44 + reg = <0x0 0xffe1e000 0 0x2000>; 45 + }; 46 + 47 + board_soc: soc: soc@ffe00000 { 48 + ranges = <0x0 0x0 0xffe00000 0x100000>; 49 + }; 50 + 51 + pci0: pcie@ffe09000 { 52 + reg = <0 0xffe09000 0 0x1000>; 53 + ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 54 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 55 + pcie@0 { 56 + ranges = <0x2000000 0x0 0xa0000000 57 + 0x2000000 0x0 0xa0000000 58 + 0x0 0x20000000 59 + 60 + 0x1000000 0x0 0x0 61 + 0x1000000 0x0 0x0 62 + 0x0 0x100000>; 63 + }; 64 + }; 65 + 66 + pci1: pcie@ffe0a000 { 67 + reg = <0 0xffe0a000 0 0x1000>; 68 + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 69 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 70 + pcie@0 { 71 + ranges = <0x2000000 0x0 0x80000000 72 + 0x2000000 0x0 0x80000000 73 + 0x0 0x20000000 74 + 75 + 0x1000000 0x0 0x0 76 + 0x1000000 0x0 0x0 77 + 0x0 0x100000>; 78 + }; 79 + };
+2 -45
arch/powerpc/boot/dts/p1010rdb_36b.dts arch/powerpc/boot/dts/p1010rdb-pa_36b.dts
··· 38 38 model = "fsl,P1010RDB"; 39 39 compatible = "fsl,P1010RDB"; 40 40 41 - memory { 42 - device_type = "memory"; 43 - }; 44 - 45 - board_ifc: ifc: ifc@fffe1e000 { 46 - /* NOR, NAND Flashes and CPLD on board */ 47 - ranges = <0x0 0x0 0xf 0xee000000 0x02000000 48 - 0x1 0x0 0xf 0xff800000 0x00010000 49 - 0x3 0x0 0xf 0xffb00000 0x00000020>; 50 - reg = <0xf 0xffe1e000 0 0x2000>; 51 - }; 52 - 53 - board_soc: soc: soc@fffe00000 { 54 - ranges = <0x0 0xf 0xffe00000 0x100000>; 55 - }; 56 - 57 - pci0: pcie@fffe09000 { 58 - reg = <0xf 0xffe09000 0 0x1000>; 59 - ranges = <0x2000000 0x0 0xc0000000 0xc 0x20000000 0x0 0x20000000 60 - 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x10000>; 61 - pcie@0 { 62 - ranges = <0x2000000 0x0 0xc0000000 63 - 0x2000000 0x0 0xc0000000 64 - 0x0 0x20000000 65 - 66 - 0x1000000 0x0 0x0 67 - 0x1000000 0x0 0x0 68 - 0x0 0x100000>; 69 - }; 70 - }; 71 - 72 - pci1: pcie@fffe0a000 { 73 - reg = <0xf 0xffe0a000 0 0x1000>; 74 - ranges = <0x2000000 0x0 0xc0000000 0xc 0x20000000 0x0 0x20000000 75 - 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x10000>; 76 - pcie@0 { 77 - ranges = <0x2000000 0x0 0xc0000000 78 - 0x2000000 0x0 0xc0000000 79 - 0x0 0x20000000 80 - 81 - 0x1000000 0x0 0x0 82 - 0x1000000 0x0 0x0 83 - 0x0 0x100000>; 84 - }; 85 - }; 41 + /include/ "p1010rdb_36b.dtsi" 86 42 }; 87 43 88 44 /include/ "p1010rdb.dtsi" 45 + /include/ "p1010rdb-pa.dtsi" 89 46 /include/ "fsl/p1010si-post.dtsi"
+79
arch/powerpc/boot/dts/p1010rdb_36b.dtsi
··· 1 + /* 2 + * P1010 RDB Device Tree Source stub (no addresses or top-level ranges) 3 + * 4 + * Copyright 2013 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 + memory { 36 + device_type = "memory"; 37 + }; 38 + 39 + board_ifc: ifc: ifc@fffe1e000 { 40 + /* NOR, NAND Flashes and CPLD on board */ 41 + ranges = <0x0 0x0 0xf 0xee000000 0x02000000 42 + 0x1 0x0 0xf 0xff800000 0x00010000 43 + 0x3 0x0 0xf 0xffb00000 0x00000020>; 44 + reg = <0xf 0xffe1e000 0 0x2000>; 45 + }; 46 + 47 + board_soc: soc: soc@fffe00000 { 48 + ranges = <0x0 0xf 0xffe00000 0x100000>; 49 + }; 50 + 51 + pci0: pcie@fffe09000 { 52 + reg = <0xf 0xffe09000 0 0x1000>; 53 + ranges = <0x2000000 0x0 0xc0000000 0xc 0x20000000 0x0 0x20000000 54 + 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x10000>; 55 + pcie@0 { 56 + ranges = <0x2000000 0x0 0xc0000000 57 + 0x2000000 0x0 0xc0000000 58 + 0x0 0x20000000 59 + 60 + 0x1000000 0x0 0x0 61 + 0x1000000 0x0 0x0 62 + 0x0 0x100000>; 63 + }; 64 + }; 65 + 66 + pci1: pcie@fffe0a000 { 67 + reg = <0xf 0xffe0a000 0 0x1000>; 68 + ranges = <0x2000000 0x0 0xc0000000 0xc 0x20000000 0x0 0x20000000 69 + 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x10000>; 70 + pcie@0 { 71 + ranges = <0x2000000 0x0 0xc0000000 72 + 0x2000000 0x0 0xc0000000 73 + 0x0 0x20000000 74 + 75 + 0x1000000 0x0 0x0 76 + 0x1000000 0x0 0x0 77 + 0x0 0x100000>; 78 + }; 79 + };
+2 -1
arch/powerpc/boot/dts/p1022ds.dtsi
··· 146 146 */ 147 147 }; 148 148 rtc@68 { 149 - compatible = "dallas,ds1339"; 149 + compatible = "dallas,ds3232"; 150 150 reg = <0x68>; 151 + interrupts = <0x1 0x1 0 0>; 151 152 }; 152 153 adt7461@4c { 153 154 compatible = "adi,adt7461";
+95
arch/powerpc/boot/dts/p1025twr.dts
··· 1 + /* 2 + * P1025 TWR Device Tree Source (32-bit address map) 3 + * 4 + * Copyright 2013 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/p1021si-pre.dtsi" 36 + / { 37 + model = "fsl,P1025"; 38 + compatible = "fsl,TWR-P1025"; 39 + 40 + memory { 41 + device_type = "memory"; 42 + }; 43 + 44 + lbc: localbus@ffe05000 { 45 + reg = <0 0xffe05000 0 0x1000>; 46 + 47 + /* NOR Flash and SSD1289 */ 48 + ranges = <0x0 0x0 0x0 0xec000000 0x04000000 49 + 0x2 0x0 0x0 0xe0000000 0x00020000>; 50 + }; 51 + 52 + soc: soc@ffe00000 { 53 + ranges = <0x0 0x0 0xffe00000 0x100000>; 54 + }; 55 + 56 + pci0: pcie@ffe09000 { 57 + ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 58 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 59 + reg = <0 0xffe09000 0 0x1000>; 60 + pcie@0 { 61 + ranges = <0x2000000 0x0 0xa0000000 62 + 0x2000000 0x0 0xa0000000 63 + 0x0 0x20000000 64 + 65 + 0x1000000 0x0 0x0 66 + 0x1000000 0x0 0x0 67 + 0x0 0x100000>; 68 + }; 69 + }; 70 + 71 + pci1: pcie@ffe0a000 { 72 + reg = <0 0xffe0a000 0 0x1000>; 73 + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 74 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 75 + pcie@0 { 76 + ranges = <0x2000000 0x0 0x80000000 77 + 0x2000000 0x0 0x80000000 78 + 0x0 0x20000000 79 + 80 + 0x1000000 0x0 0x0 81 + 0x1000000 0x0 0x0 82 + 0x0 0x100000>; 83 + }; 84 + }; 85 + 86 + qe: qe@ffe80000 { 87 + ranges = <0x0 0x0 0xffe80000 0x40000>; 88 + reg = <0 0xffe80000 0 0x480>; 89 + brg-frequency = <0>; 90 + bus-frequency = <0>; 91 + }; 92 + }; 93 + 94 + /include/ "p1025twr.dtsi" 95 + /include/ "fsl/p1021si-post.dtsi"
+280
arch/powerpc/boot/dts/p1025twr.dtsi
··· 1 + /* 2 + * P1025 TWR Device Tree Source stub (no addresses or top-level ranges) 3 + * 4 + * Copyright 2013 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 + aliases { 37 + ethernet3 = &enet3; 38 + ethernet4 = &enet4; 39 + }; 40 + }; 41 + 42 + &lbc { 43 + nor@0,0 { 44 + #address-cells = <1>; 45 + #size-cells = <1>; 46 + compatible = "cfi-flash"; 47 + reg = <0x0 0x0 0x4000000>; 48 + bank-width = <2>; 49 + device-width = <1>; 50 + 51 + partition@0 { 52 + /* This location must not be altered */ 53 + /* 256KB for Vitesse 7385 Switch firmware */ 54 + reg = <0x0 0x00040000>; 55 + label = "NOR Vitesse-7385 Firmware"; 56 + read-only; 57 + }; 58 + 59 + partition@40000 { 60 + /* 256KB for DTB Image */ 61 + reg = <0x00040000 0x00040000>; 62 + label = "NOR DTB Image"; 63 + }; 64 + 65 + partition@80000 { 66 + /* 5.5 MB for Linux Kernel Image */ 67 + reg = <0x00080000 0x00580000>; 68 + label = "NOR Linux Kernel Image"; 69 + }; 70 + 71 + partition@400000 { 72 + /* 56.75MB for Root file System */ 73 + reg = <0x00600000 0x038c0000>; 74 + label = "NOR Root File System"; 75 + }; 76 + 77 + partition@ec0000 { 78 + /* This location must not be altered */ 79 + /* 256KB for QE ucode firmware*/ 80 + reg = <0x03ec0000 0x00040000>; 81 + label = "NOR QE microcode firmware"; 82 + read-only; 83 + }; 84 + 85 + partition@f00000 { 86 + /* This location must not be altered */ 87 + /* 512KB for u-boot Bootloader Image */ 88 + /* 512KB for u-boot Environment Variables */ 89 + reg = <0x03f00000 0x00100000>; 90 + label = "NOR U-Boot Image"; 91 + read-only; 92 + }; 93 + }; 94 + 95 + /* CS2 for Display */ 96 + display@2,0 { 97 + compatible = "solomon,ssd1289fb"; 98 + reg = <0x2 0x0000 0x0004>; 99 + }; 100 + 101 + }; 102 + 103 + &soc { 104 + usb@22000 { 105 + phy_type = "ulpi"; 106 + }; 107 + 108 + mdio@24000 { 109 + phy0: ethernet-phy@2 { 110 + interrupt-parent = <&mpic>; 111 + interrupts = <1 1 0 0>; 112 + reg = <0x2>; 113 + }; 114 + 115 + phy1: ethernet-phy@1 { 116 + interrupt-parent = <&mpic>; 117 + interrupts = <2 1 0 0>; 118 + reg = <0x1>; 119 + }; 120 + 121 + tbi0: tbi-phy@11 { 122 + reg = <0x11>; 123 + device_type = "tbi-phy"; 124 + }; 125 + }; 126 + 127 + mdio@25000 { 128 + tbi1: tbi-phy@11 { 129 + reg = <0x11>; 130 + device_type = "tbi-phy"; 131 + }; 132 + }; 133 + 134 + mdio@26000 { 135 + tbi2: tbi-phy@11 { 136 + reg = <0x11>; 137 + device_type = "tbi-phy"; 138 + }; 139 + }; 140 + 141 + enet0: ethernet@b0000 { 142 + phy-handle = <&phy0>; 143 + phy-connection-type = "rgmii-id"; 144 + 145 + }; 146 + 147 + enet1: ethernet@b1000 { 148 + status = "disabled"; 149 + }; 150 + 151 + enet2: ethernet@b2000 { 152 + phy-handle = <&phy1>; 153 + phy-connection-type = "rgmii-id"; 154 + }; 155 + 156 + par_io@e0100 { 157 + #address-cells = <1>; 158 + #size-cells = <1>; 159 + reg = <0xe0100 0x60>; 160 + ranges = <0x0 0xe0100 0x60>; 161 + device_type = "par_io"; 162 + num-ports = <3>; 163 + pio1: ucc_pin@01 { 164 + pio-map = < 165 + /* port pin dir open_drain assignment has_irq */ 166 + 0x1 0x13 0x1 0x0 0x1 0x0 /* QE_MUX_MDC */ 167 + 0x1 0x14 0x3 0x0 0x1 0x0 /* QE_MUX_MDIO */ 168 + 0x0 0x17 0x2 0x0 0x2 0x0 /* CLK12 */ 169 + 0x0 0x18 0x2 0x0 0x1 0x0 /* CLK9 */ 170 + 0x0 0x7 0x1 0x0 0x2 0x0 /* ENET1_TXD0_SER1_TXD0 */ 171 + 0x0 0x9 0x1 0x0 0x2 0x0 /* ENET1_TXD1_SER1_TXD1 */ 172 + 0x0 0xb 0x1 0x0 0x2 0x0 /* ENET1_TXD2_SER1_TXD2 */ 173 + 0x0 0xc 0x1 0x0 0x2 0x0 /* ENET1_TXD3_SER1_TXD3 */ 174 + 0x0 0x6 0x2 0x0 0x2 0x0 /* ENET1_RXD0_SER1_RXD0 */ 175 + 0x0 0xa 0x2 0x0 0x2 0x0 /* ENET1_RXD1_SER1_RXD1 */ 176 + 0x0 0xe 0x2 0x0 0x2 0x0 /* ENET1_RXD2_SER1_RXD2 */ 177 + 0x0 0xf 0x2 0x0 0x2 0x0 /* ENET1_RXD3_SER1_RXD3 */ 178 + 0x0 0x5 0x1 0x0 0x2 0x0 /* ENET1_TX_EN_SER1_RTS_B */ 179 + 0x0 0xd 0x1 0x0 0x2 0x0 /* ENET1_TX_ER */ 180 + 0x0 0x4 0x2 0x0 0x2 0x0 /* ENET1_RX_DV_SER1_CTS_B */ 181 + 0x0 0x8 0x2 0x0 0x2 0x0 /* ENET1_RX_ER_SER1_CD_B */ 182 + 0x0 0x11 0x2 0x0 0x2 0x0 /* ENET1_CRS */ 183 + 0x0 0x10 0x2 0x0 0x2 0x0>; /* ENET1_COL */ 184 + }; 185 + 186 + pio2: ucc_pin@02 { 187 + pio-map = < 188 + /* port pin dir open_drain assignment has_irq */ 189 + 0x1 0x13 0x1 0x0 0x1 0x0 /* QE_MUX_MDC */ 190 + 0x1 0x14 0x3 0x0 0x1 0x0 /* QE_MUX_MDIO */ 191 + 0x1 0xb 0x2 0x0 0x1 0x0 /* CLK13 */ 192 + 0x1 0x7 0x1 0x0 0x2 0x0 /* ENET5_TXD0_SER5_TXD0 */ 193 + 0x1 0xa 0x1 0x0 0x2 0x0 /* ENET5_TXD1_SER5_TXD1 */ 194 + 0x1 0x6 0x2 0x0 0x2 0x0 /* ENET5_RXD0_SER5_RXD0 */ 195 + 0x1 0x9 0x2 0x0 0x2 0x0 /* ENET5_RXD1_SER5_RXD1 */ 196 + 0x1 0x5 0x1 0x0 0x2 0x0 /* ENET5_TX_EN_SER5_RTS_B */ 197 + 0x1 0x4 0x2 0x0 0x2 0x0 /* ENET5_RX_DV_SER5_CTS_B */ 198 + 0x1 0x8 0x2 0x0 0x2 0x0>; /* ENET5_RX_ER_SER5_CD_B */ 199 + }; 200 + 201 + pio3: ucc_pin@03 { 202 + pio-map = < 203 + /* port pin dir open_drain assignment has_irq */ 204 + 0x0 0x16 0x2 0x0 0x2 0x0 /* SER7_CD_B*/ 205 + 0x0 0x12 0x2 0x0 0x2 0x0 /* SER7_CTS_B*/ 206 + 0x0 0x13 0x1 0x0 0x2 0x0 /* SER7_RTS_B*/ 207 + 0x0 0x14 0x2 0x0 0x2 0x0 /* SER7_RXD0*/ 208 + 0x0 0x15 0x1 0x0 0x2 0x0>; /* SER7_TXD0*/ 209 + }; 210 + 211 + pio4: ucc_pin@04 { 212 + pio-map = < 213 + /* port pin dir open_drain assignment has_irq */ 214 + 0x1 0x0 0x2 0x0 0x2 0x0 /* SER3_CD_B*/ 215 + 0x0 0x1c 0x2 0x0 0x2 0x0 /* SER3_CTS_B*/ 216 + 0x0 0x1d 0x1 0x0 0x2 0x0 /* SER3_RTS_B*/ 217 + 0x0 0x1e 0x2 0x0 0x2 0x0 /* SER3_RXD0*/ 218 + 0x0 0x1f 0x1 0x0 0x2 0x0>; /* SER3_TXD0*/ 219 + }; 220 + }; 221 + }; 222 + 223 + &qe { 224 + enet3: ucc@2000 { 225 + device_type = "network"; 226 + compatible = "ucc_geth"; 227 + rx-clock-name = "clk12"; 228 + tx-clock-name = "clk9"; 229 + pio-handle = <&pio1>; 230 + phy-handle = <&qe_phy0>; 231 + phy-connection-type = "mii"; 232 + }; 233 + 234 + mdio@2120 { 235 + qe_phy0: ethernet-phy@18 { 236 + interrupt-parent = <&mpic>; 237 + interrupts = <4 1 0 0>; 238 + reg = <0x18>; 239 + device_type = "ethernet-phy"; 240 + }; 241 + qe_phy1: ethernet-phy@19 { 242 + interrupt-parent = <&mpic>; 243 + interrupts = <5 1 0 0>; 244 + reg = <0x19>; 245 + device_type = "ethernet-phy"; 246 + }; 247 + tbi-phy@11 { 248 + reg = <0x11>; 249 + device_type = "tbi-phy"; 250 + }; 251 + }; 252 + 253 + enet4: ucc@2400 { 254 + device_type = "network"; 255 + compatible = "ucc_geth"; 256 + rx-clock-name = "none"; 257 + tx-clock-name = "clk13"; 258 + pio-handle = <&pio2>; 259 + phy-handle = <&qe_phy1>; 260 + phy-connection-type = "rmii"; 261 + }; 262 + 263 + serial2: ucc@2600 { 264 + device_type = "serial"; 265 + compatible = "ucc_uart"; 266 + port-number = <0>; 267 + rx-clock-name = "brg6"; 268 + tx-clock-name = "brg6"; 269 + pio-handle = <&pio3>; 270 + }; 271 + 272 + serial3: ucc@2200 { 273 + device_type = "serial"; 274 + compatible = "ucc_uart"; 275 + port-number = <1>; 276 + rx-clock-name = "brg2"; 277 + tx-clock-name = "brg2"; 278 + pio-handle = <&pio4>; 279 + }; 280 + };
+27
arch/powerpc/boot/mvme5100.c
··· 1 + /* 2 + * Motorola/Emerson MVME5100 with PPCBug firmware. 3 + * 4 + * Author: Stephen Chivers <schivers@csc.com> 5 + * 6 + * Copyright 2013 CSC Australia Pty. Ltd. 7 + * 8 + * This program is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU General Public License 10 + * version 2 as published by the Free Software Foundation. 11 + * 12 + */ 13 + #include "types.h" 14 + #include "ops.h" 15 + #include "io.h" 16 + 17 + BSS_STACK(4096); 18 + 19 + void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) 20 + { 21 + u32 heapsize; 22 + 23 + heapsize = 0x8000000 - (u32)_end; /* 128M */ 24 + simple_alloc_init(_end, heapsize, 32, 64); 25 + fdt_init(_dtb_start); 26 + serial_console_init(); 27 + }
+4
arch/powerpc/boot/wrapper
··· 265 265 link_address='0x20000000' 266 266 pie=-pie 267 267 ;; 268 + mvme5100) 269 + platformo="$object/fixed-head.o $object/mvme5100.o" 270 + binary=y 271 + ;; 268 272 esac 269 273 270 274 vmz="$tmpdir/`basename \"$kernel\"`.$ext"
-188
arch/powerpc/configs/85xx/p1023_defconfig
··· 1 - CONFIG_PPC_85xx=y 2 - CONFIG_SMP=y 3 - CONFIG_NR_CPUS=2 4 - CONFIG_SYSVIPC=y 5 - CONFIG_POSIX_MQUEUE=y 6 - CONFIG_BSD_PROCESS_ACCT=y 7 - CONFIG_AUDIT=y 8 - CONFIG_NO_HZ=y 9 - CONFIG_HIGH_RES_TIMERS=y 10 - CONFIG_RCU_FANOUT=32 11 - CONFIG_IKCONFIG=y 12 - CONFIG_IKCONFIG_PROC=y 13 - CONFIG_LOG_BUF_SHIFT=14 14 - CONFIG_BLK_DEV_INITRD=y 15 - CONFIG_KALLSYMS_ALL=y 16 - CONFIG_EMBEDDED=y 17 - CONFIG_MODULES=y 18 - CONFIG_MODULE_UNLOAD=y 19 - CONFIG_MODULE_FORCE_UNLOAD=y 20 - CONFIG_MODVERSIONS=y 21 - # CONFIG_BLK_DEV_BSG is not set 22 - CONFIG_PARTITION_ADVANCED=y 23 - CONFIG_MAC_PARTITION=y 24 - CONFIG_PHYSICAL_START=0x00000000 25 - CONFIG_P1023_RDB=y 26 - CONFIG_P1023_RDS=y 27 - CONFIG_QUICC_ENGINE=y 28 - CONFIG_QE_GPIO=y 29 - CONFIG_CPM2=y 30 - CONFIG_HIGHMEM=y 31 - # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 32 - CONFIG_BINFMT_MISC=m 33 - CONFIG_MATH_EMULATION=y 34 - CONFIG_SWIOTLB=y 35 - CONFIG_PCI=y 36 - CONFIG_PCIEPORTBUS=y 37 - # CONFIG_PCIEAER is not set 38 - # CONFIG_PCIEASPM is not set 39 - CONFIG_PCI_MSI=y 40 - CONFIG_NET=y 41 - CONFIG_PACKET=y 42 - CONFIG_UNIX=y 43 - CONFIG_XFRM_USER=y 44 - CONFIG_NET_KEY=y 45 - CONFIG_INET=y 46 - CONFIG_IP_MULTICAST=y 47 - CONFIG_IP_ADVANCED_ROUTER=y 48 - CONFIG_IP_MULTIPLE_TABLES=y 49 - CONFIG_IP_ROUTE_MULTIPATH=y 50 - CONFIG_IP_ROUTE_VERBOSE=y 51 - CONFIG_IP_PNP=y 52 - CONFIG_IP_PNP_DHCP=y 53 - CONFIG_IP_PNP_BOOTP=y 54 - CONFIG_IP_PNP_RARP=y 55 - CONFIG_NET_IPIP=y 56 - CONFIG_IP_MROUTE=y 57 - CONFIG_IP_PIMSM_V1=y 58 - CONFIG_IP_PIMSM_V2=y 59 - CONFIG_ARPD=y 60 - CONFIG_INET_ESP=y 61 - # CONFIG_INET_XFRM_MODE_BEET is not set 62 - # CONFIG_INET_LRO is not set 63 - CONFIG_IPV6=y 64 - CONFIG_IP_SCTP=m 65 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 66 - CONFIG_DEVTMPFS=y 67 - CONFIG_DEVTMPFS_MOUNT=y 68 - CONFIG_MTD=y 69 - CONFIG_MTD_CMDLINE_PARTS=y 70 - CONFIG_MTD_CHAR=y 71 - CONFIG_MTD_BLOCK=y 72 - CONFIG_MTD_CFI=y 73 - CONFIG_MTD_CFI_AMDSTD=y 74 - CONFIG_MTD_PHYSMAP_OF=y 75 - CONFIG_MTD_NAND=y 76 - CONFIG_MTD_NAND_FSL_ELBC=y 77 - CONFIG_PROC_DEVICETREE=y 78 - CONFIG_BLK_DEV_LOOP=y 79 - CONFIG_BLK_DEV_RAM=y 80 - CONFIG_BLK_DEV_RAM_SIZE=131072 81 - CONFIG_EEPROM_AT24=y 82 - CONFIG_EEPROM_LEGACY=y 83 - CONFIG_BLK_DEV_SD=y 84 - CONFIG_CHR_DEV_ST=y 85 - CONFIG_BLK_DEV_SR=y 86 - CONFIG_CHR_DEV_SG=y 87 - CONFIG_SCSI_MULTI_LUN=y 88 - CONFIG_SCSI_LOGGING=y 89 - CONFIG_ATA=y 90 - CONFIG_SATA_FSL=y 91 - CONFIG_SATA_SIL24=y 92 - CONFIG_NETDEVICES=y 93 - CONFIG_DUMMY=y 94 - CONFIG_FS_ENET=y 95 - CONFIG_FSL_PQ_MDIO=y 96 - CONFIG_E1000E=y 97 - CONFIG_PHYLIB=y 98 - CONFIG_AT803X_PHY=y 99 - CONFIG_MARVELL_PHY=y 100 - CONFIG_DAVICOM_PHY=y 101 - CONFIG_CICADA_PHY=y 102 - CONFIG_VITESSE_PHY=y 103 - CONFIG_FIXED_PHY=y 104 - CONFIG_INPUT_FF_MEMLESS=m 105 - # CONFIG_INPUT_MOUSEDEV is not set 106 - # CONFIG_INPUT_KEYBOARD is not set 107 - # CONFIG_INPUT_MOUSE is not set 108 - CONFIG_SERIO_LIBPS2=y 109 - CONFIG_SERIAL_8250=y 110 - CONFIG_SERIAL_8250_CONSOLE=y 111 - CONFIG_SERIAL_8250_NR_UARTS=2 112 - CONFIG_SERIAL_8250_RUNTIME_UARTS=2 113 - CONFIG_SERIAL_8250_EXTENDED=y 114 - CONFIG_SERIAL_8250_MANY_PORTS=y 115 - CONFIG_SERIAL_8250_SHARE_IRQ=y 116 - CONFIG_SERIAL_8250_DETECT_IRQ=y 117 - CONFIG_SERIAL_8250_RSA=y 118 - CONFIG_HW_RANDOM=y 119 - CONFIG_NVRAM=y 120 - CONFIG_I2C=y 121 - CONFIG_I2C_CHARDEV=y 122 - CONFIG_I2C_CPM=m 123 - CONFIG_I2C_MPC=y 124 - CONFIG_GPIO_MPC8XXX=y 125 - # CONFIG_HWMON is not set 126 - CONFIG_VIDEO_OUTPUT_CONTROL=y 127 - CONFIG_SOUND=y 128 - CONFIG_SND=y 129 - CONFIG_SND_MIXER_OSS=y 130 - CONFIG_SND_PCM_OSS=y 131 - # CONFIG_SND_SUPPORT_OLD_API is not set 132 - CONFIG_USB=y 133 - CONFIG_USB_DEVICEFS=y 134 - CONFIG_USB_MON=y 135 - CONFIG_USB_EHCI_HCD=y 136 - CONFIG_USB_EHCI_FSL=y 137 - CONFIG_USB_STORAGE=y 138 - CONFIG_EDAC=y 139 - CONFIG_EDAC_MM_EDAC=y 140 - CONFIG_RTC_CLASS=y 141 - CONFIG_RTC_DRV_DS1307=y 142 - CONFIG_RTC_DRV_CMOS=y 143 - CONFIG_DMADEVICES=y 144 - CONFIG_FSL_DMA=y 145 - # CONFIG_NET_DMA is not set 146 - CONFIG_STAGING=y 147 - CONFIG_EXT2_FS=y 148 - CONFIG_EXT3_FS=y 149 - # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 150 - CONFIG_ISO9660_FS=m 151 - CONFIG_JOLIET=y 152 - CONFIG_ZISOFS=y 153 - CONFIG_UDF_FS=m 154 - CONFIG_MSDOS_FS=m 155 - CONFIG_VFAT_FS=y 156 - CONFIG_NTFS_FS=y 157 - CONFIG_PROC_KCORE=y 158 - CONFIG_TMPFS=y 159 - CONFIG_ADFS_FS=m 160 - CONFIG_AFFS_FS=m 161 - CONFIG_HFS_FS=m 162 - CONFIG_HFSPLUS_FS=m 163 - CONFIG_BEFS_FS=m 164 - CONFIG_BFS_FS=m 165 - CONFIG_EFS_FS=m 166 - CONFIG_CRAMFS=y 167 - CONFIG_VXFS_FS=m 168 - CONFIG_HPFS_FS=m 169 - CONFIG_QNX4FS_FS=m 170 - CONFIG_SYSV_FS=m 171 - CONFIG_UFS_FS=m 172 - CONFIG_NFS_FS=y 173 - CONFIG_NFS_V4=y 174 - CONFIG_ROOT_NFS=y 175 - CONFIG_NFSD=y 176 - CONFIG_CRC_T10DIF=y 177 - CONFIG_FRAME_WARN=8092 178 - CONFIG_DEBUG_FS=y 179 - CONFIG_DETECT_HUNG_TASK=y 180 - # CONFIG_DEBUG_BUGVERBOSE is not set 181 - CONFIG_DEBUG_INFO=y 182 - CONFIG_STRICT_DEVMEM=y 183 - CONFIG_CRYPTO_PCBC=m 184 - CONFIG_CRYPTO_SHA256=y 185 - CONFIG_CRYPTO_SHA512=y 186 - CONFIG_CRYPTO_AES=y 187 - # CONFIG_CRYPTO_ANSI_CPRNG is not set 188 - CONFIG_CRYPTO_DEV_FSL_CAAM=y
+1
arch/powerpc/configs/adder875_defconfig
··· 70 70 CONFIG_DETECT_HUNG_TASK=y 71 71 CONFIG_DEBUG_INFO=y 72 72 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 73 + CONFIG_CRC32_SLICEBY4=y
+1
arch/powerpc/configs/ep88xc_defconfig
··· 72 72 CONFIG_DETECT_HUNG_TASK=y 73 73 CONFIG_DEBUG_INFO=y 74 74 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 75 + CONFIG_CRC32_SLICEBY4=y
+3
arch/powerpc/configs/mpc85xx_defconfig
··· 31 31 CONFIG_P1010_RDB=y 32 32 CONFIG_P1022_DS=y 33 33 CONFIG_P1022_RDK=y 34 + CONFIG_P1023_RDB=y 34 35 CONFIG_P1023_RDS=y 35 36 CONFIG_SOCRATES=y 36 37 CONFIG_KSI8560=y ··· 114 113 CONFIG_BLK_DEV_NBD=y 115 114 CONFIG_BLK_DEV_RAM=y 116 115 CONFIG_BLK_DEV_RAM_SIZE=131072 116 + CONFIG_EEPROM_AT24=y 117 117 CONFIG_EEPROM_LEGACY=y 118 118 CONFIG_BLK_DEV_SD=y 119 119 CONFIG_CHR_DEV_ST=y ··· 213 211 CONFIG_EDAC_MM_EDAC=y 214 212 CONFIG_RTC_CLASS=y 215 213 CONFIG_RTC_DRV_CMOS=y 214 + CONFIG_RTC_DRV_DS1307=y 216 215 CONFIG_DMADEVICES=y 217 216 CONFIG_FSL_DMA=y 218 217 # CONFIG_NET_DMA is not set
+3
arch/powerpc/configs/mpc85xx_smp_defconfig
··· 34 34 CONFIG_P1010_RDB=y 35 35 CONFIG_P1022_DS=y 36 36 CONFIG_P1022_RDK=y 37 + CONFIG_P1023_RDB=y 37 38 CONFIG_P1023_RDS=y 38 39 CONFIG_SOCRATES=y 39 40 CONFIG_KSI8560=y ··· 117 116 CONFIG_BLK_DEV_NBD=y 118 117 CONFIG_BLK_DEV_RAM=y 119 118 CONFIG_BLK_DEV_RAM_SIZE=131072 119 + CONFIG_EEPROM_AT24=y 120 120 CONFIG_EEPROM_LEGACY=y 121 121 CONFIG_BLK_DEV_SD=y 122 122 CONFIG_CHR_DEV_ST=y ··· 214 212 CONFIG_EDAC_MM_EDAC=y 215 213 CONFIG_RTC_CLASS=y 216 214 CONFIG_RTC_DRV_CMOS=y 215 + CONFIG_RTC_DRV_DS1307=y 217 216 CONFIG_DMADEVICES=y 218 217 CONFIG_FSL_DMA=y 219 218 # CONFIG_NET_DMA is not set
+1
arch/powerpc/configs/mpc866_ads_defconfig
··· 55 55 CONFIG_CRC_CCITT=y 56 56 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 57 57 # CONFIG_CRYPTO_ANSI_CPRNG is not set 58 + CONFIG_CRC32_SLICEBY4=y
+1
arch/powerpc/configs/mpc885_ads_defconfig
··· 78 78 CONFIG_DETECT_HUNG_TASK=y 79 79 CONFIG_DEBUG_INFO=y 80 80 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 81 + CONFIG_CRC32_SLICEBY4=y
+144
arch/powerpc/configs/mvme5100_defconfig
··· 1 + CONFIG_SYSVIPC=y 2 + CONFIG_POSIX_MQUEUE=y 3 + CONFIG_NO_HZ=y 4 + CONFIG_HIGH_RES_TIMERS=y 5 + CONFIG_IKCONFIG=y 6 + CONFIG_IKCONFIG_PROC=y 7 + CONFIG_LOG_BUF_SHIFT=14 8 + # CONFIG_UTS_NS is not set 9 + # CONFIG_IPC_NS is not set 10 + # CONFIG_PID_NS is not set 11 + # CONFIG_NET_NS is not set 12 + CONFIG_CC_OPTIMIZE_FOR_SIZE=y 13 + # CONFIG_COMPAT_BRK is not set 14 + CONFIG_MODULES=y 15 + CONFIG_MODULE_UNLOAD=y 16 + # CONFIG_BLK_DEV_BSG is not set 17 + # CONFIG_PPC_CHRP is not set 18 + # CONFIG_PPC_PMAC is not set 19 + CONFIG_EMBEDDED6xx=y 20 + CONFIG_MVME5100=y 21 + CONFIG_KVM_GUEST=y 22 + CONFIG_HZ_100=y 23 + # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 24 + # CONFIG_COMPACTION is not set 25 + CONFIG_CMDLINE_BOOL=y 26 + CONFIG_CMDLINE="console=ttyS0,9600 ip=dhcp root=/dev/nfs" 27 + CONFIG_NET=y 28 + CONFIG_PACKET=y 29 + CONFIG_UNIX=y 30 + CONFIG_INET=y 31 + CONFIG_IP_MULTICAST=y 32 + CONFIG_IP_PNP=y 33 + CONFIG_IP_PNP_DHCP=y 34 + CONFIG_IP_PNP_BOOTP=y 35 + # CONFIG_INET_LRO is not set 36 + # CONFIG_IPV6 is not set 37 + CONFIG_NETFILTER=y 38 + CONFIG_NF_CONNTRACK=m 39 + CONFIG_NF_CT_PROTO_SCTP=m 40 + CONFIG_NF_CONNTRACK_AMANDA=m 41 + CONFIG_NF_CONNTRACK_FTP=m 42 + CONFIG_NF_CONNTRACK_H323=m 43 + CONFIG_NF_CONNTRACK_IRC=m 44 + CONFIG_NF_CONNTRACK_NETBIOS_NS=m 45 + CONFIG_NF_CONNTRACK_PPTP=m 46 + CONFIG_NF_CONNTRACK_SIP=m 47 + CONFIG_NF_CONNTRACK_TFTP=m 48 + CONFIG_NETFILTER_XT_MATCH_MAC=m 49 + CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m 50 + CONFIG_NETFILTER_XT_MATCH_STATE=m 51 + CONFIG_NF_CONNTRACK_IPV4=m 52 + CONFIG_IP_NF_IPTABLES=m 53 + CONFIG_IP_NF_FILTER=m 54 + CONFIG_IP_NF_TARGET_REJECT=m 55 + CONFIG_IP_NF_MANGLE=m 56 + CONFIG_IP_NF_TARGET_ECN=m 57 + CONFIG_IP_NF_TARGET_TTL=m 58 + CONFIG_IP_NF_RAW=m 59 + CONFIG_IP_NF_ARPTABLES=m 60 + CONFIG_IP_NF_ARPFILTER=m 61 + CONFIG_IP_NF_ARP_MANGLE=m 62 + CONFIG_LAPB=m 63 + CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 64 + CONFIG_PROC_DEVICETREE=y 65 + CONFIG_BLK_DEV_LOOP=y 66 + CONFIG_BLK_DEV_RAM=y 67 + CONFIG_BLK_DEV_RAM_COUNT=2 68 + CONFIG_BLK_DEV_RAM_SIZE=8192 69 + CONFIG_EEPROM_LEGACY=m 70 + CONFIG_NETDEVICES=y 71 + CONFIG_TUN=m 72 + # CONFIG_NET_VENDOR_3COM is not set 73 + CONFIG_E100=y 74 + # CONFIG_WLAN is not set 75 + # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 76 + # CONFIG_INPUT_KEYBOARD is not set 77 + # CONFIG_INPUT_MOUSE is not set 78 + # CONFIG_SERIO is not set 79 + CONFIG_SERIAL_8250=y 80 + CONFIG_SERIAL_8250_CONSOLE=y 81 + CONFIG_SERIAL_8250_NR_UARTS=10 82 + CONFIG_SERIAL_8250_EXTENDED=y 83 + CONFIG_SERIAL_8250_MANY_PORTS=y 84 + CONFIG_SERIAL_8250_SHARE_IRQ=y 85 + CONFIG_SERIAL_OF_PLATFORM=y 86 + CONFIG_HW_RANDOM=y 87 + CONFIG_I2C=y 88 + CONFIG_I2C_CHARDEV=y 89 + CONFIG_I2C_MPC=y 90 + # CONFIG_HWMON is not set 91 + CONFIG_VIDEO_OUTPUT_CONTROL=m 92 + # CONFIG_VGA_CONSOLE is not set 93 + # CONFIG_HID is not set 94 + # CONFIG_USB_SUPPORT is not set 95 + # CONFIG_IOMMU_SUPPORT is not set 96 + CONFIG_VME_BUS=m 97 + CONFIG_VME_CA91CX42=m 98 + CONFIG_EXT2_FS=m 99 + CONFIG_EXT3_FS=m 100 + # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 101 + CONFIG_XFS_FS=m 102 + CONFIG_ISO9660_FS=m 103 + CONFIG_JOLIET=y 104 + CONFIG_ZISOFS=y 105 + CONFIG_UDF_FS=m 106 + CONFIG_MSDOS_FS=m 107 + CONFIG_VFAT_FS=m 108 + CONFIG_PROC_KCORE=y 109 + CONFIG_TMPFS=y 110 + CONFIG_NFS_FS=y 111 + CONFIG_NFS_V3_ACL=y 112 + CONFIG_NFS_V4=y 113 + CONFIG_ROOT_NFS=y 114 + CONFIG_NFSD=m 115 + CONFIG_NFSD_V3=y 116 + CONFIG_CIFS=m 117 + CONFIG_NLS=y 118 + CONFIG_NLS_CODEPAGE_437=m 119 + CONFIG_NLS_CODEPAGE_932=m 120 + CONFIG_NLS_ISO8859_1=m 121 + CONFIG_NLS_UTF8=m 122 + CONFIG_CRC_CCITT=m 123 + CONFIG_CRC_T10DIF=y 124 + CONFIG_XZ_DEC=y 125 + CONFIG_XZ_DEC_X86=y 126 + CONFIG_XZ_DEC_IA64=y 127 + CONFIG_XZ_DEC_ARM=y 128 + CONFIG_XZ_DEC_ARMTHUMB=y 129 + CONFIG_XZ_DEC_SPARC=y 130 + CONFIG_MAGIC_SYSRQ=y 131 + CONFIG_DEBUG_KERNEL=y 132 + CONFIG_DETECT_HUNG_TASK=y 133 + CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=20 134 + CONFIG_CRYPTO_CBC=y 135 + CONFIG_CRYPTO_PCBC=m 136 + CONFIG_CRYPTO_MD5=y 137 + CONFIG_CRYPTO_MICHAEL_MIC=m 138 + CONFIG_CRYPTO_SHA1=m 139 + CONFIG_CRYPTO_BLOWFISH=m 140 + CONFIG_CRYPTO_DES=y 141 + CONFIG_CRYPTO_SERPENT=m 142 + CONFIG_CRYPTO_TWOFISH=m 143 + CONFIG_CRYPTO_DEFLATE=m 144 + # CONFIG_CRYPTO_ANSI_CPRNG is not set
+1
arch/powerpc/configs/tqm8xx_defconfig
··· 84 84 CONFIG_DETECT_HUNG_TASK=y 85 85 CONFIG_DEBUG_INFO=y 86 86 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 87 + CONFIG_CRC32_SLICEBY4=y
+1 -1
arch/powerpc/include/asm/fsl_lbc.h
··· 285 285 /* device info */ 286 286 struct device *dev; 287 287 struct fsl_lbc_regs __iomem *regs; 288 - int irq; 288 + int irq[2]; 289 289 wait_queue_head_t irq_wait; 290 290 spinlock_t lock; 291 291 void *nand;
+1
arch/powerpc/include/asm/kvm_asm.h
··· 74 74 #define BOOKE_INTERRUPT_GUEST_DBELL_CRIT 39 75 75 #define BOOKE_INTERRUPT_HV_SYSCALL 40 76 76 #define BOOKE_INTERRUPT_HV_PRIV 41 77 + #define BOOKE_INTERRUPT_LRAT_ERROR 42 77 78 78 79 /* book3s */ 79 80
+13
arch/powerpc/include/asm/mmu-book3e.h
··· 286 286 extern int mmu_linear_psize; 287 287 extern int mmu_vmemmap_psize; 288 288 289 + struct tlb_core_data { 290 + /* For software way selection, as on Freescale TLB1 */ 291 + u8 esel_next, esel_max, esel_first; 292 + 293 + /* Per-core spinlock for e6500 TLB handlers (no tlbsrx.) */ 294 + u8 lock; 295 + }; 296 + 289 297 #ifdef CONFIG_PPC64 290 298 extern unsigned long linear_map_top; 299 + extern int book3e_htw_mode; 300 + 301 + #define PPC_HTW_NONE 0 302 + #define PPC_HTW_IBM 1 303 + #define PPC_HTW_E6500 2 291 304 292 305 /* 293 306 * 64-bit booke platforms don't load the tlb in the tlb miss handler code.
+10 -9
arch/powerpc/include/asm/mmu.h
··· 180 180 #define MMU_PAGE_64K_AP 3 /* "Admixed pages" (hash64 only) */ 181 181 #define MMU_PAGE_256K 4 182 182 #define MMU_PAGE_1M 5 183 - #define MMU_PAGE_4M 6 184 - #define MMU_PAGE_8M 7 185 - #define MMU_PAGE_16M 8 186 - #define MMU_PAGE_64M 9 187 - #define MMU_PAGE_256M 10 188 - #define MMU_PAGE_1G 11 189 - #define MMU_PAGE_16G 12 190 - #define MMU_PAGE_64G 13 183 + #define MMU_PAGE_2M 6 184 + #define MMU_PAGE_4M 7 185 + #define MMU_PAGE_8M 8 186 + #define MMU_PAGE_16M 9 187 + #define MMU_PAGE_64M 10 188 + #define MMU_PAGE_256M 11 189 + #define MMU_PAGE_1G 12 190 + #define MMU_PAGE_16G 13 191 + #define MMU_PAGE_64G 14 191 192 192 - #define MMU_PAGE_COUNT 14 193 + #define MMU_PAGE_COUNT 15 193 194 194 195 #if defined(CONFIG_PPC_STD_MMU_64) 195 196 /* 64-bit classic hash table MMU */
+6
arch/powerpc/include/asm/paca.h
··· 112 112 /* Keep pgd in the same cacheline as the start of extlb */ 113 113 pgd_t *pgd __attribute__((aligned(0x80))); /* Current PGD */ 114 114 pgd_t *kernel_pgd; /* Kernel PGD */ 115 + 116 + /* Shared by all threads of a core -- points to tcd of first thread */ 117 + struct tlb_core_data *tcd_ptr; 118 + 115 119 /* We can have up to 3 levels of reentrancy in the TLB miss handler */ 116 120 u64 extlb[3][EX_TLB_SIZE / sizeof(u64)]; 117 121 u64 exmc[8]; /* used for machine checks */ ··· 126 122 void *mc_kstack; 127 123 void *crit_kstack; 128 124 void *dbg_kstack; 125 + 126 + struct tlb_core_data tcd; 129 127 #endif /* CONFIG_PPC_BOOK3E */ 130 128 131 129 mm_context_t context;
+13
arch/powerpc/include/asm/ppc_asm.h
··· 294 294 * you want to access various offsets within it). On ppc32 this is 295 295 * identical to LOAD_REG_IMMEDIATE. 296 296 * 297 + * LOAD_REG_ADDR_PIC(rn, name) 298 + * Loads the address of label 'name' into register 'run'. Use this when 299 + * the kernel doesn't run at the linked or relocated address. Please 300 + * note that this macro will clobber the lr register. 301 + * 297 302 * LOAD_REG_ADDRBASE(rn, name) 298 303 * ADDROFF(name) 299 304 * LOAD_REG_ADDRBASE loads part of the address of label 'name' into ··· 309 304 * LOAD_REG_ADDRBASE(rX, name) 310 305 * ld rY,ADDROFF(name)(rX) 311 306 */ 307 + 308 + /* Be careful, this will clobber the lr register. */ 309 + #define LOAD_REG_ADDR_PIC(reg, name) \ 310 + bl 0f; \ 311 + 0: mflr reg; \ 312 + addis reg,reg,(name - 0b)@ha; \ 313 + addi reg,reg,(name - 0b)@l; 314 + 312 315 #ifdef __powerpc64__ 313 316 #define LOAD_REG_IMMEDIATE(reg,expr) \ 314 317 lis reg,(expr)@highest; \
+5 -1
arch/powerpc/include/asm/processor.h
··· 256 256 unsigned long evr[32]; /* upper 32-bits of SPE regs */ 257 257 u64 acc; /* Accumulator */ 258 258 unsigned long spefscr; /* SPE & eFP status */ 259 + unsigned long spefscr_last; /* SPEFSCR value on last prctl 260 + call or trap return */ 259 261 int used_spe; /* set if process has used spe */ 260 262 #endif /* CONFIG_SPE */ 261 263 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM ··· 319 317 (_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack) 320 318 321 319 #ifdef CONFIG_SPE 322 - #define SPEFSCR_INIT .spefscr = SPEFSCR_FINVE | SPEFSCR_FDBZE | SPEFSCR_FUNFE | SPEFSCR_FOVFE, 320 + #define SPEFSCR_INIT \ 321 + .spefscr = SPEFSCR_FINVE | SPEFSCR_FDBZE | SPEFSCR_FUNFE | SPEFSCR_FOVFE, \ 322 + .spefscr_last = SPEFSCR_FINVE | SPEFSCR_FDBZE | SPEFSCR_FUNFE | SPEFSCR_FOVFE, 323 323 #else 324 324 #define SPEFSCR_INIT 325 325 #endif
+2
arch/powerpc/include/asm/reg.h
··· 1075 1075 #define PVR_8560 0x80200000 1076 1076 #define PVR_VER_E500V1 0x8020 1077 1077 #define PVR_VER_E500V2 0x8021 1078 + #define PVR_VER_E6500 0x8040 1079 + 1078 1080 /* 1079 1081 * For the 8xx processors, all of them report the same PVR family for 1080 1082 * the PowerPC core. The various versions of these processors must be
+10
arch/powerpc/include/asm/reg_booke.h
··· 101 101 #define SPRN_IVOR39 0x1B1 /* Interrupt Vector Offset Register 39 */ 102 102 #define SPRN_IVOR40 0x1B2 /* Interrupt Vector Offset Register 40 */ 103 103 #define SPRN_IVOR41 0x1B3 /* Interrupt Vector Offset Register 41 */ 104 + #define SPRN_IVOR42 0x1B4 /* Interrupt Vector Offset Register 42 */ 104 105 #define SPRN_GIVOR2 0x1B8 /* Guest IVOR2 */ 105 106 #define SPRN_GIVOR3 0x1B9 /* Guest IVOR3 */ 106 107 #define SPRN_GIVOR4 0x1BA /* Guest IVOR4 */ ··· 171 170 #define SPRN_L2CSR1 0x3FA /* L2 Data Cache Control and Status Register 1 */ 172 171 #define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */ 173 172 #define SPRN_ICCR 0x3FB /* Instruction Cache Cacheability Register */ 173 + #define SPRN_PWRMGTCR0 0x3FB /* Power management control register 0 */ 174 174 #define SPRN_SVR 0x3FF /* System Version Register */ 175 175 176 176 /* ··· 217 215 /* Bit definitions for CCR1. */ 218 216 #define CCR1_DPC 0x00000100 /* Disable L1 I-Cache/D-Cache parity checking */ 219 217 #define CCR1_TCS 0x00000080 /* Timer Clock Select */ 218 + 219 + /* Bit definitions for PWRMGTCR0. */ 220 + #define PWRMGTCR0_PW20_WAIT (1 << 14) /* PW20 state enable bit */ 221 + #define PWRMGTCR0_PW20_ENT_SHIFT 8 222 + #define PWRMGTCR0_PW20_ENT 0x3F00 223 + #define PWRMGTCR0_AV_IDLE_PD_EN (1 << 22) /* Altivec idle enable */ 224 + #define PWRMGTCR0_AV_IDLE_CNT_SHIFT 16 225 + #define PWRMGTCR0_AV_IDLE_CNT 0x3F0000 220 226 221 227 /* Bit definitions for the MCSR. */ 222 228 #define MCSR_MCS 0x80000000 /* Machine Check Summary */
+9
arch/powerpc/kernel/asm-offsets.c
··· 203 203 DEFINE(PACA_MC_STACK, offsetof(struct paca_struct, mc_kstack)); 204 204 DEFINE(PACA_CRIT_STACK, offsetof(struct paca_struct, crit_kstack)); 205 205 DEFINE(PACA_DBG_STACK, offsetof(struct paca_struct, dbg_kstack)); 206 + DEFINE(PACA_TCD_PTR, offsetof(struct paca_struct, tcd_ptr)); 207 + 208 + DEFINE(TCD_ESEL_NEXT, 209 + offsetof(struct tlb_core_data, esel_next)); 210 + DEFINE(TCD_ESEL_MAX, 211 + offsetof(struct tlb_core_data, esel_max)); 212 + DEFINE(TCD_ESEL_FIRST, 213 + offsetof(struct tlb_core_data, esel_first)); 214 + DEFINE(TCD_LOCK, offsetof(struct tlb_core_data, lock)); 206 215 #endif /* CONFIG_PPC_BOOK3E */ 207 216 208 217 #ifdef CONFIG_PPC_STD_MMU_64
+54
arch/powerpc/kernel/cpu_setup_fsl_booke.S
··· 53 53 isync 54 54 blr 55 55 56 + /* 57 + * FIXME - we haven't yet done testing to determine a reasonable default 58 + * value for PW20_WAIT_IDLE_BIT. 59 + */ 60 + #define PW20_WAIT_IDLE_BIT 50 /* 1ms, TB frequency is 41.66MHZ */ 61 + _GLOBAL(setup_pw20_idle) 62 + mfspr r3, SPRN_PWRMGTCR0 63 + 64 + /* Set PW20_WAIT bit, enable pw20 state*/ 65 + ori r3, r3, PWRMGTCR0_PW20_WAIT 66 + li r11, PW20_WAIT_IDLE_BIT 67 + 68 + /* Set Automatic PW20 Core Idle Count */ 69 + rlwimi r3, r11, PWRMGTCR0_PW20_ENT_SHIFT, PWRMGTCR0_PW20_ENT 70 + 71 + mtspr SPRN_PWRMGTCR0, r3 72 + 73 + blr 74 + 75 + /* 76 + * FIXME - we haven't yet done testing to determine a reasonable default 77 + * value for AV_WAIT_IDLE_BIT. 78 + */ 79 + #define AV_WAIT_IDLE_BIT 50 /* 1ms, TB frequency is 41.66MHZ */ 80 + _GLOBAL(setup_altivec_idle) 81 + mfspr r3, SPRN_PWRMGTCR0 82 + 83 + /* Enable Altivec Idle */ 84 + oris r3, r3, PWRMGTCR0_AV_IDLE_PD_EN@h 85 + li r11, AV_WAIT_IDLE_BIT 86 + 87 + /* Set Automatic AltiVec Idle Count */ 88 + rlwimi r3, r11, PWRMGTCR0_AV_IDLE_CNT_SHIFT, PWRMGTCR0_AV_IDLE_CNT 89 + 90 + mtspr SPRN_PWRMGTCR0, r3 91 + 92 + blr 93 + 56 94 _GLOBAL(__setup_cpu_e6500) 57 95 mflr r6 58 96 #ifdef CONFIG_PPC64 59 97 bl .setup_altivec_ivors 98 + /* Touch IVOR42 only if the CPU supports E.HV category */ 99 + mfspr r10,SPRN_MMUCFG 100 + rlwinm. r10,r10,0,MMUCFG_LPIDSIZE 101 + beq 1f 102 + bl .setup_lrat_ivor 103 + 1: 60 104 #endif 105 + bl setup_pw20_idle 106 + bl setup_altivec_idle 61 107 bl __setup_cpu_e5500 62 108 mtlr r6 63 109 blr ··· 165 119 _GLOBAL(__restore_cpu_e6500) 166 120 mflr r5 167 121 bl .setup_altivec_ivors 122 + /* Touch IVOR42 only if the CPU supports E.HV category */ 123 + mfspr r10,SPRN_MMUCFG 124 + rlwinm. r10,r10,0,MMUCFG_LPIDSIZE 125 + beq 1f 126 + bl .setup_lrat_ivor 127 + 1: 128 + bl .setup_pw20_idle 129 + bl .setup_altivec_idle 168 130 bl __restore_cpu_e5500 169 131 mtlr r5 170 132 blr
+19 -8
arch/powerpc/kernel/exceptions-64e.S
··· 308 308 EXCEPTION_STUB(0x2e0, guest_doorbell_crit) 309 309 EXCEPTION_STUB(0x300, hypercall) 310 310 EXCEPTION_STUB(0x320, ehpriv) 311 + EXCEPTION_STUB(0x340, lrat_error) 311 312 312 313 .globl interrupt_end_book3e 313 314 interrupt_end_book3e: ··· 678 677 bl .unknown_exception 679 678 b .ret_from_except 680 679 680 + /* LRAT Error interrupt */ 681 + START_EXCEPTION(lrat_error); 682 + NORMAL_EXCEPTION_PROLOG(0x340, BOOKE_INTERRUPT_LRAT_ERROR, 683 + PROLOG_ADDITION_NONE) 684 + EXCEPTION_COMMON(0x340, PACA_EXGEN, INTS_KEEP) 685 + addi r3,r1,STACK_FRAME_OVERHEAD 686 + bl .save_nvgprs 687 + INTS_RESTORE_HARD 688 + bl .unknown_exception 689 + b .ret_from_except 690 + 681 691 /* 682 692 * An interrupt came in while soft-disabled; We mark paca->irq_happened 683 693 * accordingly and if the interrupt is level sensitive, we hard disable ··· 871 859 BAD_STACK_TRAMPOLINE(0x300) 872 860 BAD_STACK_TRAMPOLINE(0x310) 873 861 BAD_STACK_TRAMPOLINE(0x320) 862 + BAD_STACK_TRAMPOLINE(0x340) 874 863 BAD_STACK_TRAMPOLINE(0x400) 875 864 BAD_STACK_TRAMPOLINE(0x500) 876 865 BAD_STACK_TRAMPOLINE(0x600) ··· 1068 1055 mtspr SPRN_MAS0,r3 1069 1056 tlbre 1070 1057 mfspr r6,SPRN_MAS1 1071 - rlwinm r6,r6,0,2,0 /* clear IPROT */ 1058 + rlwinm r6,r6,0,2,31 /* clear IPROT and VALID */ 1072 1059 mtspr SPRN_MAS1,r6 1073 1060 tlbwe 1074 - 1075 - /* Invalidate TLB1 */ 1076 - PPC_TLBILX_ALL(0,R0) 1077 1061 sync 1078 1062 isync 1079 1063 ··· 1124 1114 mtspr SPRN_MAS0,r4 1125 1115 tlbre 1126 1116 mfspr r5,SPRN_MAS1 1127 - rlwinm r5,r5,0,2,0 /* clear IPROT */ 1117 + rlwinm r5,r5,0,2,31 /* clear IPROT and VALID */ 1128 1118 mtspr SPRN_MAS1,r5 1129 1119 tlbwe 1130 - 1131 - /* Invalidate TLB1 */ 1132 - PPC_TLBILX_ALL(0,R0) 1133 1120 sync 1134 1121 isync 1135 1122 ··· 1420 1413 SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */ 1421 1414 SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */ 1422 1415 SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */ 1416 + blr 1417 + 1418 + _GLOBAL(setup_lrat_ivor) 1419 + SET_IVOR(42, 0x340) /* LRAT Error */ 1423 1420 blr
+2
arch/powerpc/kernel/fsl_booke_entry_mapping.S
··· 176 176 /* 7. Jump to KERNELBASE mapping */ 177 177 lis r6,(KERNELBASE & ~0xfff)@h 178 178 ori r6,r6,(KERNELBASE & ~0xfff)@l 179 + rlwinm r7,r25,0,0x03ffffff 180 + add r6,r7,r6 179 181 180 182 #elif defined(ENTRY_MAPPING_KEXEC_SETUP) 181 183 /*
+237 -31
arch/powerpc/kernel/head_fsl_booke.S
··· 65 65 nop 66 66 67 67 /* Translate device tree address to physical, save in r30/r31 */ 68 - mfmsr r16 69 - mfspr r17,SPRN_PID 70 - rlwinm r17,r17,16,0x3fff0000 /* turn PID into MAS6[SPID] */ 71 - rlwimi r17,r16,28,0x00000001 /* turn MSR[DS] into MAS6[SAS] */ 72 - mtspr SPRN_MAS6,r17 73 - 74 - tlbsx 0,r3 /* must succeed */ 75 - 76 - mfspr r16,SPRN_MAS1 77 - mfspr r20,SPRN_MAS3 78 - rlwinm r17,r16,25,0x1f /* r17 = log2(page size) */ 79 - li r18,1024 80 - slw r18,r18,r17 /* r18 = page size */ 81 - addi r18,r18,-1 82 - and r19,r3,r18 /* r19 = page offset */ 83 - andc r31,r20,r18 /* r31 = page base */ 84 - or r31,r31,r19 /* r31 = devtree phys addr */ 85 - mfspr r30,SPRN_MAS7 68 + bl get_phys_addr 69 + mr r30,r3 70 + mr r31,r4 86 71 87 72 li r25,0 /* phys kernel start (low) */ 88 73 li r24,0 /* CPU number */ 89 74 li r23,0 /* phys kernel start (high) */ 75 + 76 + #ifdef CONFIG_RELOCATABLE 77 + LOAD_REG_ADDR_PIC(r3, _stext) /* Get our current runtime base */ 78 + 79 + /* Translate _stext address to physical, save in r23/r25 */ 80 + bl get_phys_addr 81 + mr r23,r3 82 + mr r25,r4 83 + 84 + bl 0f 85 + 0: mflr r8 86 + addis r3,r8,(is_second_reloc - 0b)@ha 87 + lwz r19,(is_second_reloc - 0b)@l(r3) 88 + 89 + /* Check if this is the second relocation. */ 90 + cmpwi r19,1 91 + bne 1f 92 + 93 + /* 94 + * For the second relocation, we already get the real memstart_addr 95 + * from device tree. So we will map PAGE_OFFSET to memstart_addr, 96 + * then the virtual address of start kernel should be: 97 + * PAGE_OFFSET + (kernstart_addr - memstart_addr) 98 + * Since the offset between kernstart_addr and memstart_addr should 99 + * never be beyond 1G, so we can just use the lower 32bit of them 100 + * for the calculation. 101 + */ 102 + lis r3,PAGE_OFFSET@h 103 + 104 + addis r4,r8,(kernstart_addr - 0b)@ha 105 + addi r4,r4,(kernstart_addr - 0b)@l 106 + lwz r5,4(r4) 107 + 108 + addis r6,r8,(memstart_addr - 0b)@ha 109 + addi r6,r6,(memstart_addr - 0b)@l 110 + lwz r7,4(r6) 111 + 112 + subf r5,r7,r5 113 + add r3,r3,r5 114 + b 2f 115 + 116 + 1: 117 + /* 118 + * We have the runtime (virutal) address of our base. 119 + * We calculate our shift of offset from a 64M page. 120 + * We could map the 64M page we belong to at PAGE_OFFSET and 121 + * get going from there. 122 + */ 123 + lis r4,KERNELBASE@h 124 + ori r4,r4,KERNELBASE@l 125 + rlwinm r6,r25,0,0x3ffffff /* r6 = PHYS_START % 64M */ 126 + rlwinm r5,r4,0,0x3ffffff /* r5 = KERNELBASE % 64M */ 127 + subf r3,r5,r6 /* r3 = r6 - r5 */ 128 + add r3,r4,r3 /* Required Virtual Address */ 129 + 130 + 2: bl relocate 131 + 132 + /* 133 + * For the second relocation, we already set the right tlb entries 134 + * for the kernel space, so skip the code in fsl_booke_entry_mapping.S 135 + */ 136 + cmpwi r19,1 137 + beq set_ivor 138 + #endif 90 139 91 140 /* We try to not make any assumptions about how the boot loader 92 141 * setup or used the TLBs. We invalidate all mappings from the ··· 162 113 #include "fsl_booke_entry_mapping.S" 163 114 #undef ENTRY_MAPPING_BOOT_SETUP 164 115 116 + set_ivor: 165 117 /* Establish the interrupt vector offsets */ 166 118 SET_IVOR(0, CriticalInput); 167 119 SET_IVOR(1, MachineCheck); ··· 216 166 /* Check to see if we're the second processor, and jump 217 167 * to the secondary_start code if so 218 168 */ 219 - lis r24, boot_cpuid@h 220 - ori r24, r24, boot_cpuid@l 169 + LOAD_REG_ADDR_PIC(r24, boot_cpuid) 221 170 lwz r24, 0(r24) 222 171 cmpwi r24, -1 223 172 mfspr r24,SPRN_PIR ··· 245 196 stw r24, TI_CPU(r22) 246 197 247 198 bl early_init 199 + 200 + #ifdef CONFIG_RELOCATABLE 201 + mr r3,r30 202 + mr r4,r31 203 + #ifdef CONFIG_PHYS_64BIT 204 + mr r5,r23 205 + mr r6,r25 206 + #else 207 + mr r5,r25 208 + #endif 209 + bl relocate_init 210 + #endif 248 211 249 212 #ifdef CONFIG_DYNAMIC_MEMSTART 250 213 lis r3,kernstart_addr@ha ··· 917 856 #endif /* CONFIG_SPE */ 918 857 919 858 /* 859 + * Translate the effec addr in r3 to phys addr. The phys addr will be put 860 + * into r3(higher 32bit) and r4(lower 32bit) 861 + */ 862 + get_phys_addr: 863 + mfmsr r8 864 + mfspr r9,SPRN_PID 865 + rlwinm r9,r9,16,0x3fff0000 /* turn PID into MAS6[SPID] */ 866 + rlwimi r9,r8,28,0x00000001 /* turn MSR[DS] into MAS6[SAS] */ 867 + mtspr SPRN_MAS6,r9 868 + 869 + tlbsx 0,r3 /* must succeed */ 870 + 871 + mfspr r8,SPRN_MAS1 872 + mfspr r12,SPRN_MAS3 873 + rlwinm r9,r8,25,0x1f /* r9 = log2(page size) */ 874 + li r10,1024 875 + slw r10,r10,r9 /* r10 = page size */ 876 + addi r10,r10,-1 877 + and r11,r3,r10 /* r11 = page offset */ 878 + andc r4,r12,r10 /* r4 = page base */ 879 + or r4,r4,r11 /* r4 = devtree phys addr */ 880 + #ifdef CONFIG_PHYS_64BIT 881 + mfspr r3,SPRN_MAS7 882 + #endif 883 + blr 884 + 885 + /* 920 886 * Global functions 921 887 */ 922 888 ··· 1145 1057 /* When we get here, r24 needs to hold the CPU # */ 1146 1058 .globl __secondary_start 1147 1059 __secondary_start: 1060 + LOAD_REG_ADDR_PIC(r3, tlbcam_index) 1061 + lwz r3,0(r3) 1062 + mtctr r3 1063 + li r26,0 /* r26 safe? */ 1064 + 1065 + bl switch_to_as1 1066 + mr r27,r3 /* tlb entry */ 1067 + /* Load each CAM entry */ 1068 + 1: mr r3,r26 1069 + bl loadcam_entry 1070 + addi r26,r26,1 1071 + bdnz 1b 1072 + mr r3,r27 /* tlb entry */ 1073 + LOAD_REG_ADDR_PIC(r4, memstart_addr) 1074 + lwz r4,0(r4) 1075 + mr r5,r25 /* phys kernel start */ 1076 + rlwinm r5,r5,0,~0x3ffffff /* aligned 64M */ 1077 + subf r4,r5,r4 /* memstart_addr - phys kernel start */ 1078 + li r5,0 /* no device tree */ 1079 + li r6,0 /* not boot cpu */ 1080 + bl restore_to_as0 1081 + 1082 + 1148 1083 lis r3,__secondary_hold_acknowledge@h 1149 1084 ori r3,r3,__secondary_hold_acknowledge@l 1150 1085 stw r24,0(r3) ··· 1175 1064 li r3,0 1176 1065 mr r4,r24 /* Why? */ 1177 1066 bl call_setup_cpu 1178 - 1179 - lis r3,tlbcam_index@ha 1180 - lwz r3,tlbcam_index@l(r3) 1181 - mtctr r3 1182 - li r26,0 /* r26 safe? */ 1183 - 1184 - /* Load each CAM entry */ 1185 - 1: mr r3,r26 1186 - bl loadcam_entry 1187 - addi r26,r26,1 1188 - bdnz 1b 1189 1067 1190 1068 /* get current_thread_info and current */ 1191 1069 lis r1,secondary_ti@ha ··· 1209 1109 __secondary_hold_acknowledge: 1210 1110 .long -1 1211 1111 #endif 1112 + 1113 + /* 1114 + * Create a tlb entry with the same effective and physical address as 1115 + * the tlb entry used by the current running code. But set the TS to 1. 1116 + * Then switch to the address space 1. It will return with the r3 set to 1117 + * the ESEL of the new created tlb. 1118 + */ 1119 + _GLOBAL(switch_to_as1) 1120 + mflr r5 1121 + 1122 + /* Find a entry not used */ 1123 + mfspr r3,SPRN_TLB1CFG 1124 + andi. r3,r3,0xfff 1125 + mfspr r4,SPRN_PID 1126 + rlwinm r4,r4,16,0x3fff0000 /* turn PID into MAS6[SPID] */ 1127 + mtspr SPRN_MAS6,r4 1128 + 1: lis r4,0x1000 /* Set MAS0(TLBSEL) = 1 */ 1129 + addi r3,r3,-1 1130 + rlwimi r4,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 1131 + mtspr SPRN_MAS0,r4 1132 + tlbre 1133 + mfspr r4,SPRN_MAS1 1134 + andis. r4,r4,MAS1_VALID@h 1135 + bne 1b 1136 + 1137 + /* Get the tlb entry used by the current running code */ 1138 + bl 0f 1139 + 0: mflr r4 1140 + tlbsx 0,r4 1141 + 1142 + mfspr r4,SPRN_MAS1 1143 + ori r4,r4,MAS1_TS /* Set the TS = 1 */ 1144 + mtspr SPRN_MAS1,r4 1145 + 1146 + mfspr r4,SPRN_MAS0 1147 + rlwinm r4,r4,0,~MAS0_ESEL_MASK 1148 + rlwimi r4,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 1149 + mtspr SPRN_MAS0,r4 1150 + tlbwe 1151 + isync 1152 + sync 1153 + 1154 + mfmsr r4 1155 + ori r4,r4,MSR_IS | MSR_DS 1156 + mtspr SPRN_SRR0,r5 1157 + mtspr SPRN_SRR1,r4 1158 + sync 1159 + rfi 1160 + 1161 + /* 1162 + * Restore to the address space 0 and also invalidate the tlb entry created 1163 + * by switch_to_as1. 1164 + * r3 - the tlb entry which should be invalidated 1165 + * r4 - __pa(PAGE_OFFSET in AS1) - __pa(PAGE_OFFSET in AS0) 1166 + * r5 - device tree virtual address. If r4 is 0, r5 is ignored. 1167 + * r6 - boot cpu 1168 + */ 1169 + _GLOBAL(restore_to_as0) 1170 + mflr r0 1171 + 1172 + bl 0f 1173 + 0: mflr r9 1174 + addi r9,r9,1f - 0b 1175 + 1176 + /* 1177 + * We may map the PAGE_OFFSET in AS0 to a different physical address, 1178 + * so we need calculate the right jump and device tree address based 1179 + * on the offset passed by r4. 1180 + */ 1181 + add r9,r9,r4 1182 + add r5,r5,r4 1183 + add r0,r0,r4 1184 + 1185 + 2: mfmsr r7 1186 + li r8,(MSR_IS | MSR_DS) 1187 + andc r7,r7,r8 1188 + 1189 + mtspr SPRN_SRR0,r9 1190 + mtspr SPRN_SRR1,r7 1191 + sync 1192 + rfi 1193 + 1194 + /* Invalidate the temporary tlb entry for AS1 */ 1195 + 1: lis r9,0x1000 /* Set MAS0(TLBSEL) = 1 */ 1196 + rlwimi r9,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 1197 + mtspr SPRN_MAS0,r9 1198 + tlbre 1199 + mfspr r9,SPRN_MAS1 1200 + rlwinm r9,r9,0,2,31 /* Clear MAS1 Valid and IPPROT */ 1201 + mtspr SPRN_MAS1,r9 1202 + tlbwe 1203 + isync 1204 + 1205 + cmpwi r4,0 1206 + cmpwi cr1,r6,0 1207 + cror eq,4*cr1+eq,eq 1208 + bne 3f /* offset != 0 && is_boot_cpu */ 1209 + mtlr r0 1210 + blr 1211 + 1212 + /* 1213 + * The PAGE_OFFSET will map to a different physical address, 1214 + * jump to _start to do another relocation again. 1215 + */ 1216 + 3: mr r3,r5 1217 + bl _start 1212 1218 1213 1219 /* 1214 1220 * We put a few things here that have to be page-aligned. This stuff
+5
arch/powerpc/kernel/paca.c
··· 160 160 #ifdef CONFIG_PPC_STD_MMU_64 161 161 new_paca->slb_shadow_ptr = init_slb_shadow(cpu); 162 162 #endif /* CONFIG_PPC_STD_MMU_64 */ 163 + 164 + #ifdef CONFIG_PPC_BOOK3E 165 + /* For now -- if we have threads this will be adjusted later */ 166 + new_paca->tcd_ptr = &new_paca->tcd; 167 + #endif 163 168 } 164 169 165 170 /* Put the paca pointer into r13 and SPRG_PACA */
+28 -2
arch/powerpc/kernel/process.c
··· 1296 1296 if (val & PR_FP_EXC_SW_ENABLE) { 1297 1297 #ifdef CONFIG_SPE 1298 1298 if (cpu_has_feature(CPU_FTR_SPE)) { 1299 + /* 1300 + * When the sticky exception bits are set 1301 + * directly by userspace, it must call prctl 1302 + * with PR_GET_FPEXC (with PR_FP_EXC_SW_ENABLE 1303 + * in the existing prctl settings) or 1304 + * PR_SET_FPEXC (with PR_FP_EXC_SW_ENABLE in 1305 + * the bits being set). <fenv.h> functions 1306 + * saving and restoring the whole 1307 + * floating-point environment need to do so 1308 + * anyway to restore the prctl settings from 1309 + * the saved environment. 1310 + */ 1311 + tsk->thread.spefscr_last = mfspr(SPRN_SPEFSCR); 1299 1312 tsk->thread.fpexc_mode = val & 1300 1313 (PR_FP_EXC_SW_ENABLE | PR_FP_ALL_EXCEPT); 1301 1314 return 0; ··· 1340 1327 1341 1328 if (tsk->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) 1342 1329 #ifdef CONFIG_SPE 1343 - if (cpu_has_feature(CPU_FTR_SPE)) 1330 + if (cpu_has_feature(CPU_FTR_SPE)) { 1331 + /* 1332 + * When the sticky exception bits are set 1333 + * directly by userspace, it must call prctl 1334 + * with PR_GET_FPEXC (with PR_FP_EXC_SW_ENABLE 1335 + * in the existing prctl settings) or 1336 + * PR_SET_FPEXC (with PR_FP_EXC_SW_ENABLE in 1337 + * the bits being set). <fenv.h> functions 1338 + * saving and restoring the whole 1339 + * floating-point environment need to do so 1340 + * anyway to restore the prctl settings from 1341 + * the saved environment. 1342 + */ 1343 + tsk->thread.spefscr_last = mfspr(SPRN_SPEFSCR); 1344 1344 val = tsk->thread.fpexc_mode; 1345 - else 1345 + } else 1346 1346 return -EINVAL; 1347 1347 #else 1348 1348 return -EINVAL;
+40 -1
arch/powerpc/kernel/prom.c
··· 523 523 return early_init_dt_scan_memory(node, uname, depth, data); 524 524 } 525 525 526 + /* 527 + * For a relocatable kernel, we need to get the memstart_addr first, 528 + * then use it to calculate the virtual kernel start address. This has 529 + * to happen at a very early stage (before machine_init). In this case, 530 + * we just want to get the memstart_address and would not like to mess the 531 + * memblock at this stage. So introduce a variable to skip the memblock_add() 532 + * for this reason. 533 + */ 534 + #ifdef CONFIG_RELOCATABLE 535 + static int add_mem_to_memblock = 1; 536 + #else 537 + #define add_mem_to_memblock 1 538 + #endif 539 + 526 540 void __init early_init_dt_add_memory_arch(u64 base, u64 size) 527 541 { 528 542 #ifdef CONFIG_PPC64 ··· 557 543 } 558 544 559 545 /* Add the chunk to the MEMBLOCK list */ 560 - memblock_add(base, size); 546 + if (add_mem_to_memblock) 547 + memblock_add(base, size); 561 548 } 562 549 563 550 static void __init early_reserve_mem_dt(void) ··· 754 739 755 740 DBG(" <- early_init_devtree()\n"); 756 741 } 742 + 743 + #ifdef CONFIG_RELOCATABLE 744 + /* 745 + * This function run before early_init_devtree, so we have to init 746 + * initial_boot_params. 747 + */ 748 + void __init early_get_first_memblock_info(void *params, phys_addr_t *size) 749 + { 750 + /* Setup flat device-tree pointer */ 751 + initial_boot_params = params; 752 + 753 + /* 754 + * Scan the memory nodes and set add_mem_to_memblock to 0 to avoid 755 + * mess the memblock. 756 + */ 757 + add_mem_to_memblock = 0; 758 + of_scan_flat_dt(early_init_dt_scan_root, NULL); 759 + of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); 760 + add_mem_to_memblock = 1; 761 + 762 + if (size) 763 + *size = first_memblock_size; 764 + } 765 + #endif 757 766 758 767 /******* 759 768 *
+31
arch/powerpc/kernel/setup_64.c
··· 97 97 int icache_bsize; 98 98 int ucache_bsize; 99 99 100 + #if defined(CONFIG_PPC_BOOK3E) && defined(CONFIG_SMP) 101 + static void setup_tlb_core_data(void) 102 + { 103 + int cpu; 104 + 105 + for_each_possible_cpu(cpu) { 106 + int first = cpu_first_thread_sibling(cpu); 107 + 108 + paca[cpu].tcd_ptr = &paca[first].tcd; 109 + 110 + /* 111 + * If we have threads, we need either tlbsrx. 112 + * or e6500 tablewalk mode, or else TLB handlers 113 + * will be racy and could produce duplicate entries. 114 + */ 115 + if (smt_enabled_at_boot >= 2 && 116 + !mmu_has_feature(MMU_FTR_USE_TLBRSRV) && 117 + book3e_htw_mode != PPC_HTW_E6500) { 118 + /* Should we panic instead? */ 119 + WARN_ONCE("%s: unsupported MMU configuration -- expect problems\n", 120 + __func__); 121 + } 122 + } 123 + } 124 + #else 125 + static void setup_tlb_core_data(void) 126 + { 127 + } 128 + #endif 129 + 100 130 #ifdef CONFIG_SMP 101 131 102 132 static char *smt_enabled_cmdline; ··· 475 445 476 446 smp_setup_cpu_maps(); 477 447 check_smt_enabled(); 448 + setup_tlb_core_data(); 478 449 479 450 #ifdef CONFIG_SMP 480 451 /* Release secondary cpus out of their spinloops at 0x60 now that
+16 -16
arch/powerpc/kernel/swsusp_booke.S
··· 74 74 bne 1b 75 75 76 76 /* Save SPRGs */ 77 - mfsprg r4,0 77 + mfspr r4,SPRN_SPRG0 78 78 stw r4,SL_SPRG0(r11) 79 - mfsprg r4,1 79 + mfspr r4,SPRN_SPRG1 80 80 stw r4,SL_SPRG1(r11) 81 - mfsprg r4,2 81 + mfspr r4,SPRN_SPRG2 82 82 stw r4,SL_SPRG2(r11) 83 - mfsprg r4,3 83 + mfspr r4,SPRN_SPRG3 84 84 stw r4,SL_SPRG3(r11) 85 - mfsprg r4,4 85 + mfspr r4,SPRN_SPRG4 86 86 stw r4,SL_SPRG4(r11) 87 - mfsprg r4,5 87 + mfspr r4,SPRN_SPRG5 88 88 stw r4,SL_SPRG5(r11) 89 - mfsprg r4,6 89 + mfspr r4,SPRN_SPRG6 90 90 stw r4,SL_SPRG6(r11) 91 - mfsprg r4,7 91 + mfspr r4,SPRN_SPRG7 92 92 stw r4,SL_SPRG7(r11) 93 93 94 94 /* Call the low level suspend stuff (we should probably have made ··· 150 150 bl _tlbil_all 151 151 152 152 lwz r4,SL_SPRG0(r11) 153 - mtsprg 0,r4 153 + mtspr SPRN_SPRG0,r4 154 154 lwz r4,SL_SPRG1(r11) 155 - mtsprg 1,r4 155 + mtspr SPRN_SPRG1,r4 156 156 lwz r4,SL_SPRG2(r11) 157 - mtsprg 2,r4 157 + mtspr SPRN_SPRG2,r4 158 158 lwz r4,SL_SPRG3(r11) 159 - mtsprg 3,r4 159 + mtspr SPRN_SPRG3,r4 160 160 lwz r4,SL_SPRG4(r11) 161 - mtsprg 4,r4 161 + mtspr SPRN_SPRG4,r4 162 162 lwz r4,SL_SPRG5(r11) 163 - mtsprg 5,r4 163 + mtspr SPRN_SPRG5,r4 164 164 lwz r4,SL_SPRG6(r11) 165 - mtsprg 6,r4 165 + mtspr SPRN_SPRG6,r4 166 166 lwz r4,SL_SPRG7(r11) 167 - mtsprg 7,r4 167 + mtspr SPRN_SPRG7,r4 168 168 169 169 /* restore the MSR */ 170 170 lwz r3,SL_MSR(r11)
+316
arch/powerpc/kernel/sysfs.c
··· 86 86 87 87 #endif /* CONFIG_PPC64 */ 88 88 89 + #ifdef CONFIG_PPC_FSL_BOOK3E 90 + #define MAX_BIT 63 91 + 92 + static u64 pw20_wt; 93 + static u64 altivec_idle_wt; 94 + 95 + static unsigned int get_idle_ticks_bit(u64 ns) 96 + { 97 + u64 cycle; 98 + 99 + if (ns >= 10000) 100 + cycle = div_u64(ns + 500, 1000) * tb_ticks_per_usec; 101 + else 102 + cycle = div_u64(ns * tb_ticks_per_usec, 1000); 103 + 104 + if (!cycle) 105 + return 0; 106 + 107 + return ilog2(cycle); 108 + } 109 + 110 + static void do_show_pwrmgtcr0(void *val) 111 + { 112 + u32 *value = val; 113 + 114 + *value = mfspr(SPRN_PWRMGTCR0); 115 + } 116 + 117 + static ssize_t show_pw20_state(struct device *dev, 118 + struct device_attribute *attr, char *buf) 119 + { 120 + u32 value; 121 + unsigned int cpu = dev->id; 122 + 123 + smp_call_function_single(cpu, do_show_pwrmgtcr0, &value, 1); 124 + 125 + value &= PWRMGTCR0_PW20_WAIT; 126 + 127 + return sprintf(buf, "%u\n", value ? 1 : 0); 128 + } 129 + 130 + static void do_store_pw20_state(void *val) 131 + { 132 + u32 *value = val; 133 + u32 pw20_state; 134 + 135 + pw20_state = mfspr(SPRN_PWRMGTCR0); 136 + 137 + if (*value) 138 + pw20_state |= PWRMGTCR0_PW20_WAIT; 139 + else 140 + pw20_state &= ~PWRMGTCR0_PW20_WAIT; 141 + 142 + mtspr(SPRN_PWRMGTCR0, pw20_state); 143 + } 144 + 145 + static ssize_t store_pw20_state(struct device *dev, 146 + struct device_attribute *attr, 147 + const char *buf, size_t count) 148 + { 149 + u32 value; 150 + unsigned int cpu = dev->id; 151 + 152 + if (kstrtou32(buf, 0, &value)) 153 + return -EINVAL; 154 + 155 + if (value > 1) 156 + return -EINVAL; 157 + 158 + smp_call_function_single(cpu, do_store_pw20_state, &value, 1); 159 + 160 + return count; 161 + } 162 + 163 + static ssize_t show_pw20_wait_time(struct device *dev, 164 + struct device_attribute *attr, char *buf) 165 + { 166 + u32 value; 167 + u64 tb_cycle = 1; 168 + u64 time; 169 + 170 + unsigned int cpu = dev->id; 171 + 172 + if (!pw20_wt) { 173 + smp_call_function_single(cpu, do_show_pwrmgtcr0, &value, 1); 174 + value = (value & PWRMGTCR0_PW20_ENT) >> 175 + PWRMGTCR0_PW20_ENT_SHIFT; 176 + 177 + tb_cycle = (tb_cycle << (MAX_BIT - value + 1)); 178 + /* convert ms to ns */ 179 + if (tb_ticks_per_usec > 1000) { 180 + time = div_u64(tb_cycle, tb_ticks_per_usec / 1000); 181 + } else { 182 + u32 rem_us; 183 + 184 + time = div_u64_rem(tb_cycle, tb_ticks_per_usec, 185 + &rem_us); 186 + time = time * 1000 + rem_us * 1000 / tb_ticks_per_usec; 187 + } 188 + } else { 189 + time = pw20_wt; 190 + } 191 + 192 + return sprintf(buf, "%llu\n", time > 0 ? time : 0); 193 + } 194 + 195 + static void set_pw20_wait_entry_bit(void *val) 196 + { 197 + u32 *value = val; 198 + u32 pw20_idle; 199 + 200 + pw20_idle = mfspr(SPRN_PWRMGTCR0); 201 + 202 + /* Set Automatic PW20 Core Idle Count */ 203 + /* clear count */ 204 + pw20_idle &= ~PWRMGTCR0_PW20_ENT; 205 + 206 + /* set count */ 207 + pw20_idle |= ((MAX_BIT - *value) << PWRMGTCR0_PW20_ENT_SHIFT); 208 + 209 + mtspr(SPRN_PWRMGTCR0, pw20_idle); 210 + } 211 + 212 + static ssize_t store_pw20_wait_time(struct device *dev, 213 + struct device_attribute *attr, 214 + const char *buf, size_t count) 215 + { 216 + u32 entry_bit; 217 + u64 value; 218 + 219 + unsigned int cpu = dev->id; 220 + 221 + if (kstrtou64(buf, 0, &value)) 222 + return -EINVAL; 223 + 224 + if (!value) 225 + return -EINVAL; 226 + 227 + entry_bit = get_idle_ticks_bit(value); 228 + if (entry_bit > MAX_BIT) 229 + return -EINVAL; 230 + 231 + pw20_wt = value; 232 + 233 + smp_call_function_single(cpu, set_pw20_wait_entry_bit, 234 + &entry_bit, 1); 235 + 236 + return count; 237 + } 238 + 239 + static ssize_t show_altivec_idle(struct device *dev, 240 + struct device_attribute *attr, char *buf) 241 + { 242 + u32 value; 243 + unsigned int cpu = dev->id; 244 + 245 + smp_call_function_single(cpu, do_show_pwrmgtcr0, &value, 1); 246 + 247 + value &= PWRMGTCR0_AV_IDLE_PD_EN; 248 + 249 + return sprintf(buf, "%u\n", value ? 1 : 0); 250 + } 251 + 252 + static void do_store_altivec_idle(void *val) 253 + { 254 + u32 *value = val; 255 + u32 altivec_idle; 256 + 257 + altivec_idle = mfspr(SPRN_PWRMGTCR0); 258 + 259 + if (*value) 260 + altivec_idle |= PWRMGTCR0_AV_IDLE_PD_EN; 261 + else 262 + altivec_idle &= ~PWRMGTCR0_AV_IDLE_PD_EN; 263 + 264 + mtspr(SPRN_PWRMGTCR0, altivec_idle); 265 + } 266 + 267 + static ssize_t store_altivec_idle(struct device *dev, 268 + struct device_attribute *attr, 269 + const char *buf, size_t count) 270 + { 271 + u32 value; 272 + unsigned int cpu = dev->id; 273 + 274 + if (kstrtou32(buf, 0, &value)) 275 + return -EINVAL; 276 + 277 + if (value > 1) 278 + return -EINVAL; 279 + 280 + smp_call_function_single(cpu, do_store_altivec_idle, &value, 1); 281 + 282 + return count; 283 + } 284 + 285 + static ssize_t show_altivec_idle_wait_time(struct device *dev, 286 + struct device_attribute *attr, char *buf) 287 + { 288 + u32 value; 289 + u64 tb_cycle = 1; 290 + u64 time; 291 + 292 + unsigned int cpu = dev->id; 293 + 294 + if (!altivec_idle_wt) { 295 + smp_call_function_single(cpu, do_show_pwrmgtcr0, &value, 1); 296 + value = (value & PWRMGTCR0_AV_IDLE_CNT) >> 297 + PWRMGTCR0_AV_IDLE_CNT_SHIFT; 298 + 299 + tb_cycle = (tb_cycle << (MAX_BIT - value + 1)); 300 + /* convert ms to ns */ 301 + if (tb_ticks_per_usec > 1000) { 302 + time = div_u64(tb_cycle, tb_ticks_per_usec / 1000); 303 + } else { 304 + u32 rem_us; 305 + 306 + time = div_u64_rem(tb_cycle, tb_ticks_per_usec, 307 + &rem_us); 308 + time = time * 1000 + rem_us * 1000 / tb_ticks_per_usec; 309 + } 310 + } else { 311 + time = altivec_idle_wt; 312 + } 313 + 314 + return sprintf(buf, "%llu\n", time > 0 ? time : 0); 315 + } 316 + 317 + static void set_altivec_idle_wait_entry_bit(void *val) 318 + { 319 + u32 *value = val; 320 + u32 altivec_idle; 321 + 322 + altivec_idle = mfspr(SPRN_PWRMGTCR0); 323 + 324 + /* Set Automatic AltiVec Idle Count */ 325 + /* clear count */ 326 + altivec_idle &= ~PWRMGTCR0_AV_IDLE_CNT; 327 + 328 + /* set count */ 329 + altivec_idle |= ((MAX_BIT - *value) << PWRMGTCR0_AV_IDLE_CNT_SHIFT); 330 + 331 + mtspr(SPRN_PWRMGTCR0, altivec_idle); 332 + } 333 + 334 + static ssize_t store_altivec_idle_wait_time(struct device *dev, 335 + struct device_attribute *attr, 336 + const char *buf, size_t count) 337 + { 338 + u32 entry_bit; 339 + u64 value; 340 + 341 + unsigned int cpu = dev->id; 342 + 343 + if (kstrtou64(buf, 0, &value)) 344 + return -EINVAL; 345 + 346 + if (!value) 347 + return -EINVAL; 348 + 349 + entry_bit = get_idle_ticks_bit(value); 350 + if (entry_bit > MAX_BIT) 351 + return -EINVAL; 352 + 353 + altivec_idle_wt = value; 354 + 355 + smp_call_function_single(cpu, set_altivec_idle_wait_entry_bit, 356 + &entry_bit, 1); 357 + 358 + return count; 359 + } 360 + 361 + /* 362 + * Enable/Disable interface: 363 + * 0, disable. 1, enable. 364 + */ 365 + static DEVICE_ATTR(pw20_state, 0600, show_pw20_state, store_pw20_state); 366 + static DEVICE_ATTR(altivec_idle, 0600, show_altivec_idle, store_altivec_idle); 367 + 368 + /* 369 + * Set wait time interface:(Nanosecond) 370 + * Example: Base on TBfreq is 41MHZ. 371 + * 1~48(ns): TB[63] 372 + * 49~97(ns): TB[62] 373 + * 98~195(ns): TB[61] 374 + * 196~390(ns): TB[60] 375 + * 391~780(ns): TB[59] 376 + * 781~1560(ns): TB[58] 377 + * ... 378 + */ 379 + static DEVICE_ATTR(pw20_wait_time, 0600, 380 + show_pw20_wait_time, 381 + store_pw20_wait_time); 382 + static DEVICE_ATTR(altivec_idle_wait_time, 0600, 383 + show_altivec_idle_wait_time, 384 + store_altivec_idle_wait_time); 385 + #endif 386 + 89 387 /* 90 388 * Enabling PMCs will slow partition context switch times so we only do 91 389 * it the first time we write to the PMCs. ··· 723 425 device_create_file(s, &dev_attr_pir); 724 426 #endif /* CONFIG_PPC64 */ 725 427 428 + #ifdef CONFIG_PPC_FSL_BOOK3E 429 + if (PVR_VER(cur_cpu_spec->pvr_value) == PVR_VER_E6500) { 430 + device_create_file(s, &dev_attr_pw20_state); 431 + device_create_file(s, &dev_attr_pw20_wait_time); 432 + 433 + device_create_file(s, &dev_attr_altivec_idle); 434 + device_create_file(s, &dev_attr_altivec_idle_wait_time); 435 + } 436 + #endif 726 437 cacheinfo_cpu_online(cpu); 727 438 } 728 439 ··· 804 497 device_remove_file(s, &dev_attr_pir); 805 498 #endif /* CONFIG_PPC64 */ 806 499 500 + #ifdef CONFIG_PPC_FSL_BOOK3E 501 + if (PVR_VER(cur_cpu_spec->pvr_value) == PVR_VER_E6500) { 502 + device_remove_file(s, &dev_attr_pw20_state); 503 + device_remove_file(s, &dev_attr_pw20_wait_time); 504 + 505 + device_remove_file(s, &dev_attr_altivec_idle); 506 + device_remove_file(s, &dev_attr_altivec_idle_wait_time); 507 + } 508 + #endif 807 509 cacheinfo_cpu_offline(cpu); 808 510 } 809 511
+2
arch/powerpc/kvm/bookehv_interrupts.S
··· 319 319 SPRN_DSRR0, SPRN_DSRR1, 0 320 320 kvm_handler BOOKE_INTERRUPT_DEBUG, EX_PARAMS(CRIT), \ 321 321 SPRN_CSRR0, SPRN_CSRR1, 0 322 + kvm_handler BOOKE_INTERRUPT_LRAT_ERROR, EX_PARAMS(GEN), \ 323 + SPRN_SRR0, SPRN_SRR1, (NEED_EMU | NEED_DEAR | NEED_ESR) 322 324 #else 323 325 /* 324 326 * For input register values, see arch/powerpc/include/asm/kvm_booke_hv_asm.h
+239 -79
arch/powerpc/math-emu/math_efp.c
··· 20 20 */ 21 21 22 22 #include <linux/types.h> 23 + #include <linux/prctl.h> 23 24 24 25 #include <asm/uaccess.h> 25 26 #include <asm/reg.h> ··· 276 275 277 276 case EFSCTSF: 278 277 case EFSCTUF: 279 - if (!((vb.wp[1] >> 23) == 0xff && ((vb.wp[1] & 0x7fffff) > 0))) { 280 - /* NaN */ 281 - if (((vb.wp[1] >> 23) & 0xff) == 0) { 282 - /* denorm */ 283 - vc.wp[1] = 0x0; 284 - } else if ((vb.wp[1] >> 31) == 0) { 285 - /* positive normal */ 286 - vc.wp[1] = (func == EFSCTSF) ? 287 - 0x7fffffff : 0xffffffff; 288 - } else { /* negative normal */ 289 - vc.wp[1] = (func == EFSCTSF) ? 290 - 0x80000000 : 0x0; 291 - } 292 - } else { /* rB is NaN */ 293 - vc.wp[1] = 0x0; 278 + if (SB_c == FP_CLS_NAN) { 279 + vc.wp[1] = 0; 280 + FP_SET_EXCEPTION(FP_EX_INVALID); 281 + } else { 282 + SB_e += (func == EFSCTSF ? 31 : 32); 283 + FP_TO_INT_ROUND_S(vc.wp[1], SB, 32, 284 + (func == EFSCTSF)); 294 285 } 295 286 goto update_regs; 296 287 ··· 299 306 } 300 307 301 308 case EFSCTSI: 302 - case EFSCTSIZ: 303 309 case EFSCTUI: 304 - case EFSCTUIZ: 305 - if (func & 0x4) { 306 - _FP_ROUND(1, SB); 310 + if (SB_c == FP_CLS_NAN) { 311 + vc.wp[1] = 0; 312 + FP_SET_EXCEPTION(FP_EX_INVALID); 307 313 } else { 308 - _FP_ROUND_ZERO(1, SB); 314 + FP_TO_INT_ROUND_S(vc.wp[1], SB, 32, 315 + ((func & 0x3) != 0)); 309 316 } 310 - FP_TO_INT_S(vc.wp[1], SB, 32, 311 - (((func & 0x3) != 0) || SB_s)); 317 + goto update_regs; 318 + 319 + case EFSCTSIZ: 320 + case EFSCTUIZ: 321 + if (SB_c == FP_CLS_NAN) { 322 + vc.wp[1] = 0; 323 + FP_SET_EXCEPTION(FP_EX_INVALID); 324 + } else { 325 + FP_TO_INT_S(vc.wp[1], SB, 32, 326 + ((func & 0x3) != 0)); 327 + } 312 328 goto update_regs; 313 329 314 330 default: ··· 406 404 407 405 case EFDCTSF: 408 406 case EFDCTUF: 409 - if (!((vb.wp[0] >> 20) == 0x7ff && 410 - ((vb.wp[0] & 0xfffff) > 0 || (vb.wp[1] > 0)))) { 411 - /* not a NaN */ 412 - if (((vb.wp[0] >> 20) & 0x7ff) == 0) { 413 - /* denorm */ 414 - vc.wp[1] = 0x0; 415 - } else if ((vb.wp[0] >> 31) == 0) { 416 - /* positive normal */ 417 - vc.wp[1] = (func == EFDCTSF) ? 418 - 0x7fffffff : 0xffffffff; 419 - } else { /* negative normal */ 420 - vc.wp[1] = (func == EFDCTSF) ? 421 - 0x80000000 : 0x0; 422 - } 423 - } else { /* NaN */ 424 - vc.wp[1] = 0x0; 407 + if (DB_c == FP_CLS_NAN) { 408 + vc.wp[1] = 0; 409 + FP_SET_EXCEPTION(FP_EX_INVALID); 410 + } else { 411 + DB_e += (func == EFDCTSF ? 31 : 32); 412 + FP_TO_INT_ROUND_D(vc.wp[1], DB, 32, 413 + (func == EFDCTSF)); 425 414 } 426 415 goto update_regs; 427 416 ··· 430 437 431 438 case EFDCTUIDZ: 432 439 case EFDCTSIDZ: 433 - _FP_ROUND_ZERO(2, DB); 434 - FP_TO_INT_D(vc.dp[0], DB, 64, ((func & 0x1) == 0)); 440 + if (DB_c == FP_CLS_NAN) { 441 + vc.dp[0] = 0; 442 + FP_SET_EXCEPTION(FP_EX_INVALID); 443 + } else { 444 + FP_TO_INT_D(vc.dp[0], DB, 64, 445 + ((func & 0x1) == 0)); 446 + } 435 447 goto update_regs; 436 448 437 449 case EFDCTUI: 438 450 case EFDCTSI: 451 + if (DB_c == FP_CLS_NAN) { 452 + vc.wp[1] = 0; 453 + FP_SET_EXCEPTION(FP_EX_INVALID); 454 + } else { 455 + FP_TO_INT_ROUND_D(vc.wp[1], DB, 32, 456 + ((func & 0x3) != 0)); 457 + } 458 + goto update_regs; 459 + 439 460 case EFDCTUIZ: 440 461 case EFDCTSIZ: 441 - if (func & 0x4) { 442 - _FP_ROUND(2, DB); 462 + if (DB_c == FP_CLS_NAN) { 463 + vc.wp[1] = 0; 464 + FP_SET_EXCEPTION(FP_EX_INVALID); 443 465 } else { 444 - _FP_ROUND_ZERO(2, DB); 466 + FP_TO_INT_D(vc.wp[1], DB, 32, 467 + ((func & 0x3) != 0)); 445 468 } 446 - FP_TO_INT_D(vc.wp[1], DB, 32, 447 - (((func & 0x3) != 0) || DB_s)); 448 469 goto update_regs; 449 470 450 471 default: ··· 563 556 cmp = -1; 564 557 goto cmp_vs; 565 558 566 - case EVFSCTSF: 567 - __asm__ __volatile__ ("mtspr 512, %4\n" 568 - "efsctsf %0, %2\n" 569 - "efsctsf %1, %3\n" 570 - : "=r" (vc.wp[0]), "=r" (vc.wp[1]) 571 - : "r" (vb.wp[0]), "r" (vb.wp[1]), "r" (0)); 572 - goto update_regs; 573 - 574 559 case EVFSCTUF: 575 - __asm__ __volatile__ ("mtspr 512, %4\n" 576 - "efsctuf %0, %2\n" 577 - "efsctuf %1, %3\n" 578 - : "=r" (vc.wp[0]), "=r" (vc.wp[1]) 579 - : "r" (vb.wp[0]), "r" (vb.wp[1]), "r" (0)); 560 + case EVFSCTSF: 561 + if (SB0_c == FP_CLS_NAN) { 562 + vc.wp[0] = 0; 563 + FP_SET_EXCEPTION(FP_EX_INVALID); 564 + } else { 565 + SB0_e += (func == EVFSCTSF ? 31 : 32); 566 + FP_TO_INT_ROUND_S(vc.wp[0], SB0, 32, 567 + (func == EVFSCTSF)); 568 + } 569 + if (SB1_c == FP_CLS_NAN) { 570 + vc.wp[1] = 0; 571 + FP_SET_EXCEPTION(FP_EX_INVALID); 572 + } else { 573 + SB1_e += (func == EVFSCTSF ? 31 : 32); 574 + FP_TO_INT_ROUND_S(vc.wp[1], SB1, 32, 575 + (func == EVFSCTSF)); 576 + } 580 577 goto update_regs; 581 578 582 579 case EVFSCTUI: 583 580 case EVFSCTSI: 581 + if (SB0_c == FP_CLS_NAN) { 582 + vc.wp[0] = 0; 583 + FP_SET_EXCEPTION(FP_EX_INVALID); 584 + } else { 585 + FP_TO_INT_ROUND_S(vc.wp[0], SB0, 32, 586 + ((func & 0x3) != 0)); 587 + } 588 + if (SB1_c == FP_CLS_NAN) { 589 + vc.wp[1] = 0; 590 + FP_SET_EXCEPTION(FP_EX_INVALID); 591 + } else { 592 + FP_TO_INT_ROUND_S(vc.wp[1], SB1, 32, 593 + ((func & 0x3) != 0)); 594 + } 595 + goto update_regs; 596 + 584 597 case EVFSCTUIZ: 585 598 case EVFSCTSIZ: 586 - if (func & 0x4) { 587 - _FP_ROUND(1, SB0); 588 - _FP_ROUND(1, SB1); 599 + if (SB0_c == FP_CLS_NAN) { 600 + vc.wp[0] = 0; 601 + FP_SET_EXCEPTION(FP_EX_INVALID); 589 602 } else { 590 - _FP_ROUND_ZERO(1, SB0); 591 - _FP_ROUND_ZERO(1, SB1); 603 + FP_TO_INT_S(vc.wp[0], SB0, 32, 604 + ((func & 0x3) != 0)); 592 605 } 593 - FP_TO_INT_S(vc.wp[0], SB0, 32, 594 - (((func & 0x3) != 0) || SB0_s)); 595 - FP_TO_INT_S(vc.wp[1], SB1, 32, 596 - (((func & 0x3) != 0) || SB1_s)); 606 + if (SB1_c == FP_CLS_NAN) { 607 + vc.wp[1] = 0; 608 + FP_SET_EXCEPTION(FP_EX_INVALID); 609 + } else { 610 + FP_TO_INT_S(vc.wp[1], SB1, 32, 611 + ((func & 0x3) != 0)); 612 + } 597 613 goto update_regs; 598 614 599 615 default: ··· 660 630 regs->ccr |= (IR << ((7 - ((speinsn >> 23) & 0x7)) << 2)); 661 631 662 632 update_regs: 663 - __FPU_FPSCR &= ~FP_EX_MASK; 633 + /* 634 + * If the "invalid" exception sticky bit was set by the 635 + * processor for non-finite input, but was not set before the 636 + * instruction being emulated, clear it. Likewise for the 637 + * "underflow" bit, which may have been set by the processor 638 + * for exact underflow, not just inexact underflow when the 639 + * flag should be set for IEEE 754 semantics. Other sticky 640 + * exceptions will only be set by the processor when they are 641 + * correct according to IEEE 754 semantics, and we must not 642 + * clear sticky bits that were already set before the emulated 643 + * instruction as they represent the user-visible sticky 644 + * exception status. "inexact" traps to kernel are not 645 + * required for IEEE semantics and are not enabled by default, 646 + * so the "inexact" sticky bit may have been set by a previous 647 + * instruction without the kernel being aware of it. 648 + */ 649 + __FPU_FPSCR 650 + &= ~(FP_EX_INVALID | FP_EX_UNDERFLOW) | current->thread.spefscr_last; 664 651 __FPU_FPSCR |= (FP_CUR_EXCEPTIONS & FP_EX_MASK); 665 652 mtspr(SPRN_SPEFSCR, __FPU_FPSCR); 653 + current->thread.spefscr_last = __FPU_FPSCR; 666 654 667 655 current->thread.evr[fc] = vc.wp[0]; 668 656 regs->gpr[fc] = vc.wp[1]; ··· 692 644 pr_debug("va: %08x %08x\n", va.wp[0], va.wp[1]); 693 645 pr_debug("vb: %08x %08x\n", vb.wp[0], vb.wp[1]); 694 646 647 + if (current->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) { 648 + if ((FP_CUR_EXCEPTIONS & FP_EX_DIVZERO) 649 + && (current->thread.fpexc_mode & PR_FP_EXC_DIV)) 650 + return 1; 651 + if ((FP_CUR_EXCEPTIONS & FP_EX_OVERFLOW) 652 + && (current->thread.fpexc_mode & PR_FP_EXC_OVF)) 653 + return 1; 654 + if ((FP_CUR_EXCEPTIONS & FP_EX_UNDERFLOW) 655 + && (current->thread.fpexc_mode & PR_FP_EXC_UND)) 656 + return 1; 657 + if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) 658 + && (current->thread.fpexc_mode & PR_FP_EXC_RES)) 659 + return 1; 660 + if ((FP_CUR_EXCEPTIONS & FP_EX_INVALID) 661 + && (current->thread.fpexc_mode & PR_FP_EXC_INV)) 662 + return 1; 663 + } 695 664 return 0; 696 665 697 666 illegal: ··· 727 662 { 728 663 union dw_union fgpr; 729 664 int s_lo, s_hi; 730 - unsigned long speinsn, type, fc; 665 + int lo_inexact, hi_inexact; 666 + int fp_result; 667 + unsigned long speinsn, type, fb, fc, fptype, func; 731 668 732 669 if (get_user(speinsn, (unsigned int __user *) regs->nip)) 733 670 return -EFAULT; 734 671 if ((speinsn >> 26) != 4) 735 672 return -EINVAL; /* not an spe instruction */ 736 673 737 - type = insn_type(speinsn & 0x7ff); 674 + func = speinsn & 0x7ff; 675 + type = insn_type(func); 738 676 if (type == XCR) return -ENOSYS; 739 677 740 678 __FPU_FPSCR = mfspr(SPRN_SPEFSCR); 741 679 pr_debug("speinsn:%08lx spefscr:%08lx\n", speinsn, __FPU_FPSCR); 742 680 681 + fptype = (speinsn >> 5) & 0x7; 682 + 743 683 /* No need to round if the result is exact */ 744 - if (!(__FPU_FPSCR & FP_EX_INEXACT)) 684 + lo_inexact = __FPU_FPSCR & (SPEFSCR_FG | SPEFSCR_FX); 685 + hi_inexact = __FPU_FPSCR & (SPEFSCR_FGH | SPEFSCR_FXH); 686 + if (!(lo_inexact || (hi_inexact && fptype == VCT))) 745 687 return 0; 746 688 747 689 fc = (speinsn >> 21) & 0x1f; ··· 757 685 fgpr.wp[0] = current->thread.evr[fc]; 758 686 fgpr.wp[1] = regs->gpr[fc]; 759 687 688 + fb = (speinsn >> 11) & 0x1f; 689 + switch (func) { 690 + case EFSCTUIZ: 691 + case EFSCTSIZ: 692 + case EVFSCTUIZ: 693 + case EVFSCTSIZ: 694 + case EFDCTUIDZ: 695 + case EFDCTSIDZ: 696 + case EFDCTUIZ: 697 + case EFDCTSIZ: 698 + /* 699 + * These instructions always round to zero, 700 + * independent of the rounding mode. 701 + */ 702 + return 0; 703 + 704 + case EFSCTUI: 705 + case EFSCTUF: 706 + case EVFSCTUI: 707 + case EVFSCTUF: 708 + case EFDCTUI: 709 + case EFDCTUF: 710 + fp_result = 0; 711 + s_lo = 0; 712 + s_hi = 0; 713 + break; 714 + 715 + case EFSCTSI: 716 + case EFSCTSF: 717 + fp_result = 0; 718 + /* Recover the sign of a zero result if possible. */ 719 + if (fgpr.wp[1] == 0) 720 + s_lo = regs->gpr[fb] & SIGN_BIT_S; 721 + break; 722 + 723 + case EVFSCTSI: 724 + case EVFSCTSF: 725 + fp_result = 0; 726 + /* Recover the sign of a zero result if possible. */ 727 + if (fgpr.wp[1] == 0) 728 + s_lo = regs->gpr[fb] & SIGN_BIT_S; 729 + if (fgpr.wp[0] == 0) 730 + s_hi = current->thread.evr[fb] & SIGN_BIT_S; 731 + break; 732 + 733 + case EFDCTSI: 734 + case EFDCTSF: 735 + fp_result = 0; 736 + s_hi = s_lo; 737 + /* Recover the sign of a zero result if possible. */ 738 + if (fgpr.wp[1] == 0) 739 + s_hi = current->thread.evr[fb] & SIGN_BIT_S; 740 + break; 741 + 742 + default: 743 + fp_result = 1; 744 + break; 745 + } 746 + 760 747 pr_debug("round fgpr: %08x %08x\n", fgpr.wp[0], fgpr.wp[1]); 761 748 762 - switch ((speinsn >> 5) & 0x7) { 749 + switch (fptype) { 763 750 /* Since SPE instructions on E500 core can handle round to nearest 764 751 * and round toward zero with IEEE-754 complied, we just need 765 752 * to handle round toward +Inf and round toward -Inf by software. ··· 827 696 if ((FP_ROUNDMODE) == FP_RND_PINF) { 828 697 if (!s_lo) fgpr.wp[1]++; /* Z > 0, choose Z1 */ 829 698 } else { /* round to -Inf */ 830 - if (s_lo) fgpr.wp[1]++; /* Z < 0, choose Z2 */ 699 + if (s_lo) { 700 + if (fp_result) 701 + fgpr.wp[1]++; /* Z < 0, choose Z2 */ 702 + else 703 + fgpr.wp[1]--; /* Z < 0, choose Z2 */ 704 + } 831 705 } 832 706 break; 833 707 834 708 case DPFP: 835 709 if (FP_ROUNDMODE == FP_RND_PINF) { 836 - if (!s_hi) fgpr.dp[0]++; /* Z > 0, choose Z1 */ 710 + if (!s_hi) { 711 + if (fp_result) 712 + fgpr.dp[0]++; /* Z > 0, choose Z1 */ 713 + else 714 + fgpr.wp[1]++; /* Z > 0, choose Z1 */ 715 + } 837 716 } else { /* round to -Inf */ 838 - if (s_hi) fgpr.dp[0]++; /* Z < 0, choose Z2 */ 717 + if (s_hi) { 718 + if (fp_result) 719 + fgpr.dp[0]++; /* Z < 0, choose Z2 */ 720 + else 721 + fgpr.wp[1]--; /* Z < 0, choose Z2 */ 722 + } 839 723 } 840 724 break; 841 725 842 726 case VCT: 843 727 if (FP_ROUNDMODE == FP_RND_PINF) { 844 - if (!s_lo) fgpr.wp[1]++; /* Z_low > 0, choose Z1 */ 845 - if (!s_hi) fgpr.wp[0]++; /* Z_high word > 0, choose Z1 */ 728 + if (lo_inexact && !s_lo) 729 + fgpr.wp[1]++; /* Z_low > 0, choose Z1 */ 730 + if (hi_inexact && !s_hi) 731 + fgpr.wp[0]++; /* Z_high word > 0, choose Z1 */ 846 732 } else { /* round to -Inf */ 847 - if (s_lo) fgpr.wp[1]++; /* Z_low < 0, choose Z2 */ 848 - if (s_hi) fgpr.wp[0]++; /* Z_high < 0, choose Z2 */ 733 + if (lo_inexact && s_lo) { 734 + if (fp_result) 735 + fgpr.wp[1]++; /* Z_low < 0, choose Z2 */ 736 + else 737 + fgpr.wp[1]--; /* Z_low < 0, choose Z2 */ 738 + } 739 + if (hi_inexact && s_hi) { 740 + if (fp_result) 741 + fgpr.wp[0]++; /* Z_high < 0, choose Z2 */ 742 + else 743 + fgpr.wp[0]--; /* Z_high < 0, choose Z2 */ 744 + } 849 745 } 850 746 break; 851 747 ··· 885 727 886 728 pr_debug(" to fgpr: %08x %08x\n", fgpr.wp[0], fgpr.wp[1]); 887 729 730 + if (current->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) 731 + return (current->thread.fpexc_mode & PR_FP_EXC_RES) ? 1 : 0; 888 732 return 0; 889 733 } 890 734
+77 -3
arch/powerpc/mm/fsl_booke_mmu.c
··· 52 52 #include <asm/smp.h> 53 53 #include <asm/machdep.h> 54 54 #include <asm/setup.h> 55 + #include <asm/paca.h> 55 56 56 57 #include "mmu_decl.h" 57 58 ··· 172 171 return 1UL << camsize; 173 172 } 174 173 175 - unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx) 174 + static unsigned long map_mem_in_cams_addr(phys_addr_t phys, unsigned long virt, 175 + unsigned long ram, int max_cam_idx) 176 176 { 177 177 int i; 178 - unsigned long virt = PAGE_OFFSET; 179 - phys_addr_t phys = memstart_addr; 180 178 unsigned long amount_mapped = 0; 181 179 182 180 /* Calculate CAM values */ ··· 192 192 } 193 193 tlbcam_index = i; 194 194 195 + #ifdef CONFIG_PPC64 196 + get_paca()->tcd.esel_next = i; 197 + get_paca()->tcd.esel_max = mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY; 198 + get_paca()->tcd.esel_first = i; 199 + #endif 200 + 195 201 return amount_mapped; 202 + } 203 + 204 + unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx) 205 + { 206 + unsigned long virt = PAGE_OFFSET; 207 + phys_addr_t phys = memstart_addr; 208 + 209 + return map_mem_in_cams_addr(phys, virt, ram, max_cam_idx); 196 210 } 197 211 198 212 #ifdef CONFIG_PPC32 ··· 236 222 /* adjust lowmem size to __max_low_memory */ 237 223 ram = min((phys_addr_t)__max_low_memory, (phys_addr_t)total_lowmem); 238 224 225 + i = switch_to_as1(); 239 226 __max_low_memory = map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM); 227 + restore_to_as0(i, 0, 0, 1); 240 228 241 229 pr_info("Memory CAM mapping: "); 242 230 for (i = 0; i < tlbcam_index - 1; i++) ··· 257 241 /* 64M mapped initially according to head_fsl_booke.S */ 258 242 memblock_set_current_limit(min_t(u64, limit, 0x04000000)); 259 243 } 244 + 245 + #ifdef CONFIG_RELOCATABLE 246 + int __initdata is_second_reloc; 247 + notrace void __init relocate_init(u64 dt_ptr, phys_addr_t start) 248 + { 249 + unsigned long base = KERNELBASE; 250 + 251 + kernstart_addr = start; 252 + if (is_second_reloc) { 253 + virt_phys_offset = PAGE_OFFSET - memstart_addr; 254 + return; 255 + } 256 + 257 + /* 258 + * Relocatable kernel support based on processing of dynamic 259 + * relocation entries. Before we get the real memstart_addr, 260 + * We will compute the virt_phys_offset like this: 261 + * virt_phys_offset = stext.run - kernstart_addr 262 + * 263 + * stext.run = (KERNELBASE & ~0x3ffffff) + 264 + * (kernstart_addr & 0x3ffffff) 265 + * When we relocate, we have : 266 + * 267 + * (kernstart_addr & 0x3ffffff) = (stext.run & 0x3ffffff) 268 + * 269 + * hence: 270 + * virt_phys_offset = (KERNELBASE & ~0x3ffffff) - 271 + * (kernstart_addr & ~0x3ffffff) 272 + * 273 + */ 274 + start &= ~0x3ffffff; 275 + base &= ~0x3ffffff; 276 + virt_phys_offset = base - start; 277 + early_get_first_memblock_info(__va(dt_ptr), NULL); 278 + /* 279 + * We now get the memstart_addr, then we should check if this 280 + * address is the same as what the PAGE_OFFSET map to now. If 281 + * not we have to change the map of PAGE_OFFSET to memstart_addr 282 + * and do a second relocation. 283 + */ 284 + if (start != memstart_addr) { 285 + int n; 286 + long offset = start - memstart_addr; 287 + 288 + is_second_reloc = 1; 289 + n = switch_to_as1(); 290 + /* map a 64M area for the second relocation */ 291 + if (memstart_addr > start) 292 + map_mem_in_cams(0x4000000, CONFIG_LOWMEM_CAM_NUM); 293 + else 294 + map_mem_in_cams_addr(start, PAGE_OFFSET + offset, 295 + 0x4000000, CONFIG_LOWMEM_CAM_NUM); 296 + restore_to_as0(n, offset, __va(dt_ptr), 1); 297 + /* We should never reach here */ 298 + panic("Relocation error"); 299 + } 300 + } 301 + #endif 260 302 #endif
+43 -11
arch/powerpc/mm/hugetlbpage-book3e.c
··· 8 8 #include <linux/mm.h> 9 9 #include <linux/hugetlb.h> 10 10 11 + #ifdef CONFIG_PPC_FSL_BOOK3E 12 + #ifdef CONFIG_PPC64 13 + static inline int tlb1_next(void) 14 + { 15 + struct paca_struct *paca = get_paca(); 16 + struct tlb_core_data *tcd; 17 + int this, next; 18 + 19 + tcd = paca->tcd_ptr; 20 + this = tcd->esel_next; 21 + 22 + next = this + 1; 23 + if (next >= tcd->esel_max) 24 + next = tcd->esel_first; 25 + 26 + tcd->esel_next = next; 27 + return this; 28 + } 29 + #else 30 + static inline int tlb1_next(void) 31 + { 32 + int index, ncams; 33 + 34 + ncams = mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY; 35 + 36 + index = __get_cpu_var(next_tlbcam_idx); 37 + 38 + /* Just round-robin the entries and wrap when we hit the end */ 39 + if (unlikely(index == ncams - 1)) 40 + __get_cpu_var(next_tlbcam_idx) = tlbcam_index; 41 + else 42 + __get_cpu_var(next_tlbcam_idx)++; 43 + 44 + return index; 45 + } 46 + #endif /* !PPC64 */ 47 + #endif /* FSL */ 48 + 11 49 static inline int mmu_get_tsize(int psize) 12 50 { 13 51 return mmu_psize_defs[psize].enc; ··· 85 47 struct mm_struct *mm; 86 48 87 49 #ifdef CONFIG_PPC_FSL_BOOK3E 88 - int index, ncams; 50 + int index; 89 51 #endif 90 52 91 53 if (unlikely(is_kernel_addr(ea))) ··· 115 77 } 116 78 117 79 #ifdef CONFIG_PPC_FSL_BOOK3E 118 - ncams = mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY; 119 - 120 80 /* We have to use the CAM(TLB1) on FSL parts for hugepages */ 121 - index = __get_cpu_var(next_tlbcam_idx); 81 + index = tlb1_next(); 122 82 mtspr(SPRN_MAS0, MAS0_ESEL(index) | MAS0_TLBSEL(1)); 123 - 124 - /* Just round-robin the entries and wrap when we hit the end */ 125 - if (unlikely(index == ncams - 1)) 126 - __get_cpu_var(next_tlbcam_idx) = tlbcam_index; 127 - else 128 - __get_cpu_var(next_tlbcam_idx)++; 129 83 #endif 84 + 130 85 mas1 = MAS1_VALID | MAS1_TID(mm->context.id) | MAS1_TSIZE(tsize); 131 86 mas2 = ea & ~((1UL << shift) - 1); 132 87 mas2 |= (pte_val(pte) >> PTE_WIMGE_SHIFT) & MAS2_WIMGE_MASK; ··· 134 103 if (mmu_has_feature(MMU_FTR_USE_PAIRED_MAS)) { 135 104 mtspr(SPRN_MAS7_MAS3, mas7_3); 136 105 } else { 137 - mtspr(SPRN_MAS7, upper_32_bits(mas7_3)); 106 + if (mmu_has_feature(MMU_FTR_BIG_PHYS)) 107 + mtspr(SPRN_MAS7, upper_32_bits(mas7_3)); 138 108 mtspr(SPRN_MAS3, lower_32_bits(mas7_3)); 139 109 } 140 110
+6
arch/powerpc/mm/mem.c
··· 307 307 308 308 void __init mem_init(void) 309 309 { 310 + /* 311 + * book3s is limited to 16 page sizes due to encoding this in 312 + * a 4-bit field for slices. 313 + */ 314 + BUILD_BUG_ON(MMU_PAGE_COUNT > 16); 315 + 310 316 #ifdef CONFIG_SWIOTLB 311 317 swiotlb_init(0); 312 318 #endif
+2
arch/powerpc/mm/mmu_decl.h
··· 148 148 extern void MMU_init_hw(void); 149 149 extern unsigned long mmu_mapin_ram(unsigned long top); 150 150 extern void adjust_total_lowmem(void); 151 + extern int switch_to_as1(void); 152 + extern void restore_to_as0(int esel, int offset, void *dt_ptr, int bootcpu); 151 153 #endif 152 154 extern void loadcam_entry(unsigned int index); 153 155
+1
arch/powerpc/mm/pgtable_32.c
··· 299 299 set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, 300 300 __pgprot(flags))); 301 301 } 302 + smp_wmb(); 302 303 return err; 303 304 } 304 305
+12
arch/powerpc/mm/pgtable_64.c
··· 152 152 } 153 153 #endif /* !CONFIG_PPC_MMU_NOHASH */ 154 154 } 155 + 156 + #ifdef CONFIG_PPC_BOOK3E_64 157 + /* 158 + * With hardware tablewalk, a sync is needed to ensure that 159 + * subsequent accesses see the PTE we just wrote. Unlike userspace 160 + * mappings, we can't tolerate spurious faults, so make sure 161 + * the new PTE will be seen the first time. 162 + */ 163 + mb(); 164 + #else 165 + smp_wmb(); 166 + #endif 155 167 return 0; 156 168 } 157 169
+173 -1
arch/powerpc/mm/tlb_low_64e.S
··· 136 136 */ 137 137 PPC_TLBSRX_DOT(0,R16) 138 138 ldx r14,r14,r15 /* grab pgd entry */ 139 - beq normal_tlb_miss_done /* tlb exists already, bail */ 139 + beq tlb_miss_done_bolted /* tlb exists already, bail */ 140 140 MMU_FTR_SECTION_ELSE 141 141 ldx r14,r14,r15 /* grab pgd entry */ 142 142 ALT_MMU_FTR_SECTION_END_IFSET(MMU_FTR_USE_TLBRSRV) ··· 192 192 mtspr SPRN_MAS7_MAS3,r15 193 193 tlbwe 194 194 195 + tlb_miss_done_bolted: 195 196 TLB_MISS_STATS_X(MMSTAT_TLB_MISS_NORM_OK) 196 197 tlb_epilog_bolted 197 198 rfi ··· 239 238 oris r11,r11,_PAGE_ACCESSED@h 240 239 beq tlb_miss_common_bolted 241 240 b itlb_miss_kernel_bolted 241 + 242 + /* 243 + * TLB miss handling for e6500 and derivatives, using hardware tablewalk. 244 + * 245 + * Linear mapping is bolted: no virtual page table or nested TLB misses 246 + * Indirect entries in TLB1, hardware loads resulting direct entries 247 + * into TLB0 248 + * No HES or NV hint on TLB1, so we need to do software round-robin 249 + * No tlbsrx. so we need a spinlock, and we have to deal 250 + * with MAS-damage caused by tlbsx 251 + * 4K pages only 252 + */ 253 + 254 + START_EXCEPTION(instruction_tlb_miss_e6500) 255 + tlb_prolog_bolted BOOKE_INTERRUPT_ITLB_MISS SPRN_SRR0 256 + 257 + ld r11,PACA_TCD_PTR(r13) 258 + srdi. r15,r16,60 /* get region */ 259 + ori r16,r16,1 260 + 261 + TLB_MISS_STATS_SAVE_INFO_BOLTED 262 + bne tlb_miss_kernel_e6500 /* user/kernel test */ 263 + 264 + b tlb_miss_common_e6500 265 + 266 + START_EXCEPTION(data_tlb_miss_e6500) 267 + tlb_prolog_bolted BOOKE_INTERRUPT_DTLB_MISS SPRN_DEAR 268 + 269 + ld r11,PACA_TCD_PTR(r13) 270 + srdi. r15,r16,60 /* get region */ 271 + rldicr r16,r16,0,62 272 + 273 + TLB_MISS_STATS_SAVE_INFO_BOLTED 274 + bne tlb_miss_kernel_e6500 /* user vs kernel check */ 275 + 276 + /* 277 + * This is the guts of the TLB miss handler for e6500 and derivatives. 278 + * We are entered with: 279 + * 280 + * r16 = page of faulting address (low bit 0 if data, 1 if instruction) 281 + * r15 = crap (free to use) 282 + * r14 = page table base 283 + * r13 = PACA 284 + * r11 = tlb_per_core ptr 285 + * r10 = crap (free to use) 286 + */ 287 + tlb_miss_common_e6500: 288 + /* 289 + * Search if we already have an indirect entry for that virtual 290 + * address, and if we do, bail out. 291 + * 292 + * MAS6:IND should be already set based on MAS4 293 + */ 294 + addi r10,r11,TCD_LOCK 295 + 1: lbarx r15,0,r10 296 + cmpdi r15,0 297 + bne 2f 298 + li r15,1 299 + stbcx. r15,0,r10 300 + bne 1b 301 + .subsection 1 302 + 2: lbz r15,0(r10) 303 + cmpdi r15,0 304 + bne 2b 305 + b 1b 306 + .previous 307 + 308 + mfspr r15,SPRN_MAS2 309 + 310 + tlbsx 0,r16 311 + mfspr r10,SPRN_MAS1 312 + andis. r10,r10,MAS1_VALID@h 313 + bne tlb_miss_done_e6500 314 + 315 + /* Undo MAS-damage from the tlbsx */ 316 + mfspr r10,SPRN_MAS1 317 + oris r10,r10,MAS1_VALID@h 318 + mtspr SPRN_MAS1,r10 319 + mtspr SPRN_MAS2,r15 320 + 321 + /* Now, we need to walk the page tables. First check if we are in 322 + * range. 323 + */ 324 + rldicl. r10,r16,64-PGTABLE_EADDR_SIZE,PGTABLE_EADDR_SIZE+4 325 + bne- tlb_miss_fault_e6500 326 + 327 + rldicl r15,r16,64-PGDIR_SHIFT+3,64-PGD_INDEX_SIZE-3 328 + cmpldi cr0,r14,0 329 + clrrdi r15,r15,3 330 + beq- tlb_miss_fault_e6500 /* No PGDIR, bail */ 331 + ldx r14,r14,r15 /* grab pgd entry */ 332 + 333 + rldicl r15,r16,64-PUD_SHIFT+3,64-PUD_INDEX_SIZE-3 334 + clrrdi r15,r15,3 335 + cmpdi cr0,r14,0 336 + bge tlb_miss_fault_e6500 /* Bad pgd entry or hugepage; bail */ 337 + ldx r14,r14,r15 /* grab pud entry */ 338 + 339 + rldicl r15,r16,64-PMD_SHIFT+3,64-PMD_INDEX_SIZE-3 340 + clrrdi r15,r15,3 341 + cmpdi cr0,r14,0 342 + bge tlb_miss_fault_e6500 343 + ldx r14,r14,r15 /* Grab pmd entry */ 344 + 345 + mfspr r10,SPRN_MAS0 346 + cmpdi cr0,r14,0 347 + bge tlb_miss_fault_e6500 348 + 349 + /* Now we build the MAS for a 2M indirect page: 350 + * 351 + * MAS 0 : ESEL needs to be filled by software round-robin 352 + * MAS 1 : Fully set up 353 + * - PID already updated by caller if necessary 354 + * - TSIZE for now is base ind page size always 355 + * - TID already cleared if necessary 356 + * MAS 2 : Default not 2M-aligned, need to be redone 357 + * MAS 3+7 : Needs to be done 358 + */ 359 + 360 + ori r14,r14,(BOOK3E_PAGESZ_4K << MAS3_SPSIZE_SHIFT) 361 + mtspr SPRN_MAS7_MAS3,r14 362 + 363 + clrrdi r15,r16,21 /* make EA 2M-aligned */ 364 + mtspr SPRN_MAS2,r15 365 + 366 + lbz r15,TCD_ESEL_NEXT(r11) 367 + lbz r16,TCD_ESEL_MAX(r11) 368 + lbz r14,TCD_ESEL_FIRST(r11) 369 + rlwimi r10,r15,16,0x00ff0000 /* insert esel_next into MAS0 */ 370 + addi r15,r15,1 /* increment esel_next */ 371 + mtspr SPRN_MAS0,r10 372 + cmpw r15,r16 373 + iseleq r15,r14,r15 /* if next == last use first */ 374 + stb r15,TCD_ESEL_NEXT(r11) 375 + 376 + tlbwe 377 + 378 + tlb_miss_done_e6500: 379 + .macro tlb_unlock_e6500 380 + li r15,0 381 + isync 382 + stb r15,TCD_LOCK(r11) 383 + .endm 384 + 385 + tlb_unlock_e6500 386 + TLB_MISS_STATS_X(MMSTAT_TLB_MISS_NORM_OK) 387 + tlb_epilog_bolted 388 + rfi 389 + 390 + tlb_miss_kernel_e6500: 391 + mfspr r10,SPRN_MAS1 392 + ld r14,PACA_KERNELPGD(r13) 393 + cmpldi cr0,r15,8 /* Check for vmalloc region */ 394 + rlwinm r10,r10,0,16,1 /* Clear TID */ 395 + mtspr SPRN_MAS1,r10 396 + beq+ tlb_miss_common_e6500 397 + 398 + tlb_miss_fault_e6500: 399 + tlb_unlock_e6500 400 + /* We need to check if it was an instruction miss */ 401 + andi. r16,r16,1 402 + bne itlb_miss_fault_e6500 403 + dtlb_miss_fault_e6500: 404 + TLB_MISS_STATS_D(MMSTAT_TLB_MISS_NORM_FAULT) 405 + tlb_epilog_bolted 406 + b exc_data_storage_book3e 407 + itlb_miss_fault_e6500: 408 + TLB_MISS_STATS_I(MMSTAT_TLB_MISS_NORM_FAULT) 409 + tlb_epilog_bolted 410 + b exc_instruction_storage_book3e 411 + 242 412 243 413 /********************************************************************** 244 414 * *
+67 -26
arch/powerpc/mm/tlb_nohash.c
··· 43 43 #include <asm/tlb.h> 44 44 #include <asm/code-patching.h> 45 45 #include <asm/hugetlb.h> 46 + #include <asm/paca.h> 46 47 47 48 #include "mmu_decl.h" 48 49 ··· 58 57 [MMU_PAGE_4K] = { 59 58 .shift = 12, 60 59 .enc = BOOK3E_PAGESZ_4K, 60 + }, 61 + [MMU_PAGE_2M] = { 62 + .shift = 21, 63 + .enc = BOOK3E_PAGESZ_2M, 61 64 }, 62 65 [MMU_PAGE_4M] = { 63 66 .shift = 22, ··· 141 136 int mmu_linear_psize; /* Page size used for the linear mapping */ 142 137 int mmu_pte_psize; /* Page size used for PTE pages */ 143 138 int mmu_vmemmap_psize; /* Page size used for the virtual mem map */ 144 - int book3e_htw_enabled; /* Is HW tablewalk enabled ? */ 139 + int book3e_htw_mode; /* HW tablewalk? Value is PPC_HTW_* */ 145 140 unsigned long linear_map_top; /* Top of linear mapping */ 146 141 147 142 #endif /* CONFIG_PPC64 */ ··· 382 377 { 383 378 int tsize = mmu_psize_defs[mmu_pte_psize].enc; 384 379 385 - if (book3e_htw_enabled) { 380 + if (book3e_htw_mode != PPC_HTW_NONE) { 386 381 unsigned long start = address & PMD_MASK; 387 382 unsigned long end = address + PMD_SIZE; 388 383 unsigned long size = 1UL << mmu_psize_defs[mmu_pte_psize].shift; ··· 435 430 def = &mmu_psize_defs[psize]; 436 431 shift = def->shift; 437 432 438 - if (shift == 0) 433 + if (shift == 0 || shift & 1) 439 434 continue; 440 435 441 436 /* adjust to be in terms of 4^shift Kb */ ··· 445 440 def->flags |= MMU_PAGE_SIZE_DIRECT; 446 441 } 447 442 448 - goto no_indirect; 443 + goto out; 449 444 } 450 445 451 446 if (fsl_mmu && (mmucfg & MMUCFG_MAVN) == MMUCFG_MAVN_V2) { 452 - u32 tlb1ps = mfspr(SPRN_TLB1PS); 447 + u32 tlb1cfg, tlb1ps; 448 + 449 + tlb0cfg = mfspr(SPRN_TLB0CFG); 450 + tlb1cfg = mfspr(SPRN_TLB1CFG); 451 + tlb1ps = mfspr(SPRN_TLB1PS); 452 + eptcfg = mfspr(SPRN_EPTCFG); 453 + 454 + if ((tlb1cfg & TLBnCFG_IND) && (tlb0cfg & TLBnCFG_PT)) 455 + book3e_htw_mode = PPC_HTW_E6500; 456 + 457 + /* 458 + * We expect 4K subpage size and unrestricted indirect size. 459 + * The lack of a restriction on indirect size is a Freescale 460 + * extension, indicated by PSn = 0 but SPSn != 0. 461 + */ 462 + if (eptcfg != 2) 463 + book3e_htw_mode = PPC_HTW_NONE; 453 464 454 465 for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) { 455 466 struct mmu_psize_def *def = &mmu_psize_defs[psize]; 456 467 457 468 if (tlb1ps & (1U << (def->shift - 10))) { 458 469 def->flags |= MMU_PAGE_SIZE_DIRECT; 470 + 471 + if (book3e_htw_mode && psize == MMU_PAGE_2M) 472 + def->flags |= MMU_PAGE_SIZE_INDIRECT; 459 473 } 460 474 } 461 475 462 - goto no_indirect; 476 + goto out; 463 477 } 464 478 #endif 465 479 ··· 495 471 } 496 472 497 473 /* Indirect page sizes supported ? */ 498 - if ((tlb0cfg & TLBnCFG_IND) == 0) 499 - goto no_indirect; 474 + if ((tlb0cfg & TLBnCFG_IND) == 0 || 475 + (tlb0cfg & TLBnCFG_PT) == 0) 476 + goto out; 477 + 478 + book3e_htw_mode = PPC_HTW_IBM; 500 479 501 480 /* Now, we only deal with one IND page size for each 502 481 * direct size. Hopefully all implementations today are ··· 524 497 def->ind = ps + 10; 525 498 } 526 499 } 527 - no_indirect: 528 500 501 + out: 529 502 /* Cleanup array and print summary */ 530 503 pr_info("MMU: Supported page sizes\n"); 531 504 for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) { ··· 547 520 548 521 static void setup_mmu_htw(void) 549 522 { 550 - /* Check if HW tablewalk is present, and if yes, enable it by: 551 - * 552 - * - patching the TLB miss handlers to branch to the 553 - * one dedicates to it 554 - * 555 - * - setting the global book3e_htw_enabled 556 - */ 557 - unsigned int tlb0cfg = mfspr(SPRN_TLB0CFG); 523 + /* 524 + * If we want to use HW tablewalk, enable it by patching the TLB miss 525 + * handlers to branch to the one dedicated to it. 526 + */ 558 527 559 - if ((tlb0cfg & TLBnCFG_IND) && 560 - (tlb0cfg & TLBnCFG_PT)) { 528 + switch (book3e_htw_mode) { 529 + case PPC_HTW_IBM: 561 530 patch_exception(0x1c0, exc_data_tlb_miss_htw_book3e); 562 531 patch_exception(0x1e0, exc_instruction_tlb_miss_htw_book3e); 563 - book3e_htw_enabled = 1; 532 + break; 533 + case PPC_HTW_E6500: 534 + patch_exception(0x1c0, exc_data_tlb_miss_e6500_book3e); 535 + patch_exception(0x1e0, exc_instruction_tlb_miss_e6500_book3e); 536 + break; 564 537 } 565 538 pr_info("MMU: Book3E HW tablewalk %s\n", 566 - book3e_htw_enabled ? "enabled" : "not supported"); 539 + book3e_htw_mode != PPC_HTW_NONE ? "enabled" : "not supported"); 567 540 } 568 541 569 542 /* ··· 603 576 /* Set MAS4 based on page table setting */ 604 577 605 578 mas4 = 0x4 << MAS4_WIMGED_SHIFT; 606 - if (book3e_htw_enabled) { 607 - mas4 |= mas4 | MAS4_INDD; 579 + switch (book3e_htw_mode) { 580 + case PPC_HTW_E6500: 581 + mas4 |= MAS4_INDD; 582 + mas4 |= BOOK3E_PAGESZ_2M << MAS4_TSIZED_SHIFT; 583 + mas4 |= MAS4_TLBSELD(1); 584 + mmu_pte_psize = MMU_PAGE_2M; 585 + break; 586 + 587 + case PPC_HTW_IBM: 588 + mas4 |= MAS4_INDD; 608 589 #ifdef CONFIG_PPC_64K_PAGES 609 590 mas4 |= BOOK3E_PAGESZ_256M << MAS4_TSIZED_SHIFT; 610 591 mmu_pte_psize = MMU_PAGE_256M; ··· 620 585 mas4 |= BOOK3E_PAGESZ_1M << MAS4_TSIZED_SHIFT; 621 586 mmu_pte_psize = MMU_PAGE_1M; 622 587 #endif 623 - } else { 588 + break; 589 + 590 + case PPC_HTW_NONE: 624 591 #ifdef CONFIG_PPC_64K_PAGES 625 592 mas4 |= BOOK3E_PAGESZ_64K << MAS4_TSIZED_SHIFT; 626 593 #else 627 594 mas4 |= BOOK3E_PAGESZ_4K << MAS4_TSIZED_SHIFT; 628 595 #endif 629 596 mmu_pte_psize = mmu_virtual_psize; 597 + break; 630 598 } 631 599 mtspr(SPRN_MAS4, mas4); 632 600 ··· 649 611 /* limit memory so we dont have linear faults */ 650 612 memblock_enforce_memory_limit(linear_map_top); 651 613 652 - patch_exception(0x1c0, exc_data_tlb_miss_bolted_book3e); 653 - patch_exception(0x1e0, exc_instruction_tlb_miss_bolted_book3e); 614 + if (book3e_htw_mode == PPC_HTW_NONE) { 615 + patch_exception(0x1c0, exc_data_tlb_miss_bolted_book3e); 616 + patch_exception(0x1e0, 617 + exc_instruction_tlb_miss_bolted_book3e); 618 + } 654 619 } 655 620 #endif 656 621
+3 -1
arch/powerpc/mm/tlb_nohash_low.S
··· 402 402 * Load TLBCAM[index] entry in to the L2 CAM MMU 403 403 */ 404 404 _GLOBAL(loadcam_entry) 405 - LOAD_REG_ADDR(r4, TLBCAM) 405 + mflr r5 406 + LOAD_REG_ADDR_PIC(r4, TLBCAM) 407 + mtlr r5 406 408 mulli r5,r3,TLBCAM_SIZE 407 409 add r3,r5,r4 408 410 lwz r4,TLBCAM_MAS0(r3)
+6
arch/powerpc/platforms/85xx/Kconfig
··· 123 123 help 124 124 This option enables support for the P1023 RDS and RDB boards 125 125 126 + config TWR_P102x 127 + bool "Freescale TWR-P102x" 128 + select DEFAULT_UIMAGE 129 + help 130 + This option enables support for the TWR-P1025 board. 131 + 126 132 config SOCRATES 127 133 bool "Socrates" 128 134 select DEFAULT_UIMAGE
+1
arch/powerpc/platforms/85xx/Makefile
··· 18 18 obj-$(CONFIG_P1022_DS) += p1022_ds.o 19 19 obj-$(CONFIG_P1022_RDK) += p1022_rdk.o 20 20 obj-$(CONFIG_P1023_RDS) += p1023_rds.o 21 + obj-$(CONFIG_TWR_P102x) += twr_p102x.o 21 22 obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o 22 23 obj-$(CONFIG_STX_GP3) += stx_gp3.o 23 24 obj-$(CONFIG_TQM85xx) += tqm85xx.o
+38
arch/powerpc/platforms/85xx/common.c
··· 9 9 #include <linux/of_irq.h> 10 10 #include <linux/of_platform.h> 11 11 12 + #include <asm/qe.h> 12 13 #include <sysdev/cpm2_pic.h> 13 14 14 15 #include "mpc85xx.h" ··· 81 80 cpm2_pic_init(np); 82 81 of_node_put(np); 83 82 irq_set_chained_handler(irq, cpm2_cascade); 83 + } 84 + #endif 85 + 86 + #ifdef CONFIG_QUICC_ENGINE 87 + void __init mpc85xx_qe_init(void) 88 + { 89 + struct device_node *np; 90 + 91 + np = of_find_compatible_node(NULL, NULL, "fsl,qe"); 92 + if (!np) { 93 + np = of_find_node_by_name(NULL, "qe"); 94 + if (!np) { 95 + pr_err("%s: Could not find Quicc Engine node\n", 96 + __func__); 97 + return; 98 + } 99 + } 100 + 101 + if (!of_device_is_available(np)) { 102 + of_node_put(np); 103 + return; 104 + } 105 + 106 + qe_reset(); 107 + of_node_put(np); 108 + 109 + np = of_find_node_by_name(NULL, "par_io"); 110 + if (np) { 111 + struct device_node *ucc; 112 + 113 + par_io_init(np); 114 + of_node_put(np); 115 + 116 + for_each_node_by_name(ucc, "ucc") 117 + par_io_of_config(ucc); 118 + 119 + } 84 120 } 85 121 #endif
+6
arch/powerpc/platforms/85xx/mpc85xx.h
··· 8 8 static inline void __init mpc85xx_cpm2_pic_init(void) {} 9 9 #endif /* CONFIG_CPM2 */ 10 10 11 + #ifdef CONFIG_QUICC_ENGINE 12 + extern void mpc85xx_qe_init(void); 13 + #else 14 + static inline void __init mpc85xx_qe_init(void) {} 15 + #endif 16 + 11 17 #endif
+2 -27
arch/powerpc/platforms/85xx/mpc85xx_mds.c
··· 1 1 /* 2 - * Copyright (C) 2006-2010, 2012 Freescale Semiconductor, Inc. 2 + * Copyright (C) 2006-2010, 2012-2013 Freescale Semiconductor, Inc. 3 3 * All rights reserved. 4 4 * 5 5 * Author: Andy Fleming <afleming@freescale.com> ··· 238 238 { 239 239 struct device_node *np; 240 240 241 - np = of_find_compatible_node(NULL, NULL, "fsl,qe"); 242 - if (!np) { 243 - np = of_find_node_by_name(NULL, "qe"); 244 - if (!np) 245 - return; 246 - } 247 - 248 - if (!of_device_is_available(np)) { 249 - of_node_put(np); 250 - return; 251 - } 252 - 253 - qe_reset(); 254 - of_node_put(np); 255 - 256 - np = of_find_node_by_name(NULL, "par_io"); 257 - if (np) { 258 - struct device_node *ucc; 259 - 260 - par_io_init(np); 261 - of_node_put(np); 262 - 263 - for_each_node_by_name(ucc, "ucc") 264 - par_io_of_config(ucc); 265 - } 266 - 241 + mpc85xx_qe_init(); 267 242 mpc85xx_mds_reset_ucc_phys(); 268 243 269 244 if (machine_is(p1021_mds)) {
+2 -23
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
··· 1 1 /* 2 2 * MPC85xx RDB Board Setup 3 3 * 4 - * Copyright 2009,2012 Freescale Semiconductor Inc. 4 + * Copyright 2009,2012-2013 Freescale Semiconductor Inc. 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify it 7 7 * under the terms of the GNU General Public License as published by the ··· 98 98 fsl_pci_assign_primary(); 99 99 100 100 #ifdef CONFIG_QUICC_ENGINE 101 - np = of_find_compatible_node(NULL, NULL, "fsl,qe"); 102 - if (!np) { 103 - pr_err("%s: Could not find Quicc Engine node\n", __func__); 104 - goto qe_fail; 105 - } 106 - 107 - qe_reset(); 108 - of_node_put(np); 109 - 110 - np = of_find_node_by_name(NULL, "par_io"); 111 - if (np) { 112 - struct device_node *ucc; 113 - 114 - par_io_init(np); 115 - of_node_put(np); 116 - 117 - for_each_node_by_name(ucc, "ucc") 118 - par_io_of_config(ucc); 119 - 120 - } 101 + mpc85xx_qe_init(); 121 102 #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE) 122 103 if (machine_is(p1025_rdb)) { 123 104 ··· 129 148 130 149 } 131 150 #endif 132 - 133 - qe_fail: 134 151 #endif /* CONFIG_QUICC_ENGINE */ 135 152 136 153 printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n");
+11 -6
arch/powerpc/platforms/85xx/smp.c
··· 389 389 } 390 390 #endif /* CONFIG_KEXEC */ 391 391 392 - static void smp_85xx_setup_cpu(int cpu_nr) 392 + static void smp_85xx_basic_setup(int cpu_nr) 393 393 { 394 - if (smp_85xx_ops.probe == smp_mpic_probe) 395 - mpic_setup_this_cpu(); 396 - 397 394 if (cpu_has_feature(CPU_FTR_DBELL)) 398 395 doorbell_setup_this_cpu(); 396 + } 397 + 398 + static void smp_85xx_setup_cpu(int cpu_nr) 399 + { 400 + mpic_setup_this_cpu(); 401 + smp_85xx_basic_setup(cpu_nr); 399 402 } 400 403 401 404 static const struct of_device_id mpc85xx_smp_guts_ids[] = { ··· 415 412 { 416 413 struct device_node *np; 417 414 418 - smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; 419 415 420 416 np = of_find_node_by_type(NULL, "open-pic"); 421 417 if (np) { 422 418 smp_85xx_ops.probe = smp_mpic_probe; 419 + smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; 423 420 smp_85xx_ops.message_pass = smp_mpic_message_pass; 424 - } 421 + } else 422 + smp_85xx_ops.setup_cpu = smp_85xx_basic_setup; 425 423 426 424 if (cpu_has_feature(CPU_FTR_DBELL)) { 427 425 /* ··· 431 427 */ 432 428 smp_85xx_ops.message_pass = NULL; 433 429 smp_85xx_ops.cause_ipi = doorbell_cause_ipi; 430 + smp_85xx_ops.probe = NULL; 434 431 } 435 432 436 433 np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
+147
arch/powerpc/platforms/85xx/twr_p102x.c
··· 1 + /* 2 + * Copyright 2010-2011, 2013 Freescale Semiconductor, Inc. 3 + * 4 + * Author: Michael Johnston <michael.johnston@freescale.com> 5 + * 6 + * Description: 7 + * TWR-P102x Board Setup 8 + * 9 + * This program is free software; you can redistribute it and/or modify it 10 + * under the terms of the GNU General Public License as published by the 11 + * Free Software Foundation; either version 2 of the License, or (at your 12 + * option) any later version. 13 + */ 14 + 15 + #include <linux/kernel.h> 16 + #include <linux/init.h> 17 + #include <linux/errno.h> 18 + #include <linux/pci.h> 19 + #include <linux/of_platform.h> 20 + 21 + #include <asm/pci-bridge.h> 22 + #include <asm/udbg.h> 23 + #include <asm/mpic.h> 24 + #include <asm/qe.h> 25 + #include <asm/qe_ic.h> 26 + #include <asm/fsl_guts.h> 27 + 28 + #include <sysdev/fsl_soc.h> 29 + #include <sysdev/fsl_pci.h> 30 + #include "smp.h" 31 + 32 + #include "mpc85xx.h" 33 + 34 + static void __init twr_p1025_pic_init(void) 35 + { 36 + struct mpic *mpic; 37 + 38 + #ifdef CONFIG_QUICC_ENGINE 39 + struct device_node *np; 40 + #endif 41 + 42 + mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 43 + MPIC_SINGLE_DEST_CPU, 44 + 0, 256, " OpenPIC "); 45 + 46 + BUG_ON(mpic == NULL); 47 + mpic_init(mpic); 48 + 49 + #ifdef CONFIG_QUICC_ENGINE 50 + np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); 51 + if (np) { 52 + qe_ic_init(np, 0, qe_ic_cascade_low_mpic, 53 + qe_ic_cascade_high_mpic); 54 + of_node_put(np); 55 + } else 56 + pr_err("Could not find qe-ic node\n"); 57 + #endif 58 + } 59 + 60 + /* ************************************************************************ 61 + * 62 + * Setup the architecture 63 + * 64 + */ 65 + static void __init twr_p1025_setup_arch(void) 66 + { 67 + #ifdef CONFIG_QUICC_ENGINE 68 + struct device_node *np; 69 + #endif 70 + 71 + if (ppc_md.progress) 72 + ppc_md.progress("twr_p1025_setup_arch()", 0); 73 + 74 + mpc85xx_smp_init(); 75 + 76 + fsl_pci_assign_primary(); 77 + 78 + #ifdef CONFIG_QUICC_ENGINE 79 + mpc85xx_qe_init(); 80 + 81 + #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE) 82 + if (machine_is(twr_p1025)) { 83 + struct ccsr_guts __iomem *guts; 84 + 85 + np = of_find_compatible_node(NULL, NULL, "fsl,p1021-guts"); 86 + if (np) { 87 + guts = of_iomap(np, 0); 88 + if (!guts) 89 + pr_err("twr_p1025: could not map global utilities register\n"); 90 + else { 91 + /* P1025 has pins muxed for QE and other functions. To 92 + * enable QE UEC mode, we need to set bit QE0 for UCC1 93 + * in Eth mode, QE0 and QE3 for UCC5 in Eth mode, QE9 94 + * and QE12 for QE MII management signals in PMUXCR 95 + * register. 96 + * Set QE mux bits in PMUXCR */ 97 + setbits32(&guts->pmuxcr, MPC85xx_PMUXCR_QE(0) | 98 + MPC85xx_PMUXCR_QE(3) | 99 + MPC85xx_PMUXCR_QE(9) | 100 + MPC85xx_PMUXCR_QE(12)); 101 + iounmap(guts); 102 + 103 + #if defined(CONFIG_SERIAL_QE) 104 + /* On P1025TWR board, the UCC7 acted as UART port. 105 + * However, The UCC7's CTS pin is low level in default, 106 + * it will impact the transmission in full duplex 107 + * communication. So disable the Flow control pin PA18. 108 + * The UCC7 UART just can use RXD and TXD pins. 109 + */ 110 + par_io_config_pin(0, 18, 0, 0, 0, 0); 111 + #endif 112 + /* Drive PB29 to CPLD low - CPLD will then change 113 + * muxing from LBC to QE */ 114 + par_io_config_pin(1, 29, 1, 0, 0, 0); 115 + par_io_data_set(1, 29, 0); 116 + } 117 + of_node_put(np); 118 + } 119 + } 120 + #endif 121 + #endif /* CONFIG_QUICC_ENGINE */ 122 + 123 + pr_info("TWR-P1025 board from Freescale Semiconductor\n"); 124 + } 125 + 126 + machine_arch_initcall(twr_p1025, mpc85xx_common_publish_devices); 127 + 128 + static int __init twr_p1025_probe(void) 129 + { 130 + unsigned long root = of_get_flat_dt_root(); 131 + 132 + return of_flat_dt_is_compatible(root, "fsl,TWR-P1025"); 133 + } 134 + 135 + define_machine(twr_p1025) { 136 + .name = "TWR-P1025", 137 + .probe = twr_p1025_probe, 138 + .setup_arch = twr_p1025_setup_arch, 139 + .init_IRQ = twr_p1025_pic_init, 140 + #ifdef CONFIG_PCI 141 + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 142 + #endif 143 + .get_irq = mpic_get_irq, 144 + .restart = fsl_rstcr_restart, 145 + .calibrate_decr = generic_calibrate_decr, 146 + .progress = udbg_progress, 147 + };
+12 -1
arch/powerpc/platforms/embedded6xx/Kconfig
··· 67 67 This option enables support for the GE Fanuc C2K board (formerly 68 68 an SBS board). 69 69 70 + config MVME5100 71 + bool "Motorola/Emerson MVME5100" 72 + depends on EMBEDDED6xx 73 + select MPIC 74 + select PCI 75 + select PPC_INDIRECT_PCI 76 + select PPC_I8259 77 + select PPC_NATIVE 78 + help 79 + This option enables support for the Motorola (now Emerson) MVME5100 80 + board. 81 + 70 82 config TSI108_BRIDGE 71 83 bool 72 84 select PCI ··· 125 113 help 126 114 Select WII if configuring for the Nintendo Wii. 127 115 More information at: <http://gc-linux.sourceforge.net/> 128 -
+1
arch/powerpc/platforms/embedded6xx/Makefile
··· 11 11 obj-$(CONFIG_GAMECUBE_COMMON) += flipper-pic.o 12 12 obj-$(CONFIG_GAMECUBE) += gamecube.o 13 13 obj-$(CONFIG_WII) += wii.o hlwd-pic.o 14 + obj-$(CONFIG_MVME5100) += mvme5100.o
+221
arch/powerpc/platforms/embedded6xx/mvme5100.c
··· 1 + /* 2 + * Board setup routines for the Motorola/Emerson MVME5100. 3 + * 4 + * Copyright 2013 CSC Australia Pty. Ltd. 5 + * 6 + * Based on earlier code by: 7 + * 8 + * Matt Porter, MontaVista Software Inc. 9 + * Copyright 2001 MontaVista Software 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 + * Author: Stephen Chivers <schivers@csc.com> 17 + * 18 + */ 19 + 20 + #include <linux/of_platform.h> 21 + 22 + #include <asm/i8259.h> 23 + #include <asm/pci-bridge.h> 24 + #include <asm/mpic.h> 25 + #include <asm/prom.h> 26 + #include <mm/mmu_decl.h> 27 + #include <asm/udbg.h> 28 + 29 + #define HAWK_MPIC_SIZE 0x00040000U 30 + #define MVME5100_PCI_MEM_OFFSET 0x00000000 31 + 32 + /* Board register addresses. */ 33 + #define BOARD_STATUS_REG 0xfef88080 34 + #define BOARD_MODFAIL_REG 0xfef88090 35 + #define BOARD_MODRST_REG 0xfef880a0 36 + #define BOARD_TBEN_REG 0xfef880c0 37 + #define BOARD_SW_READ_REG 0xfef880e0 38 + #define BOARD_GEO_ADDR_REG 0xfef880e8 39 + #define BOARD_EXT_FEATURE1_REG 0xfef880f0 40 + #define BOARD_EXT_FEATURE2_REG 0xfef88100 41 + 42 + static phys_addr_t pci_membase; 43 + static u_char *restart; 44 + 45 + static void mvme5100_8259_cascade(unsigned int irq, struct irq_desc *desc) 46 + { 47 + struct irq_chip *chip = irq_desc_get_chip(desc); 48 + unsigned int cascade_irq = i8259_irq(); 49 + 50 + if (cascade_irq != NO_IRQ) 51 + generic_handle_irq(cascade_irq); 52 + 53 + chip->irq_eoi(&desc->irq_data); 54 + } 55 + 56 + static void __init mvme5100_pic_init(void) 57 + { 58 + struct mpic *mpic; 59 + struct device_node *np; 60 + struct device_node *cp = NULL; 61 + unsigned int cirq; 62 + unsigned long intack = 0; 63 + const u32 *prop = NULL; 64 + 65 + np = of_find_node_by_type(NULL, "open-pic"); 66 + if (!np) { 67 + pr_err("Could not find open-pic node\n"); 68 + return; 69 + } 70 + 71 + mpic = mpic_alloc(np, pci_membase, 0, 16, 256, " OpenPIC "); 72 + 73 + BUG_ON(mpic == NULL); 74 + of_node_put(np); 75 + 76 + mpic_assign_isu(mpic, 0, pci_membase + 0x10000); 77 + 78 + mpic_init(mpic); 79 + 80 + cp = of_find_compatible_node(NULL, NULL, "chrp,iic"); 81 + if (cp == NULL) { 82 + pr_warn("mvme5100_pic_init: couldn't find i8259\n"); 83 + return; 84 + } 85 + 86 + cirq = irq_of_parse_and_map(cp, 0); 87 + if (cirq == NO_IRQ) { 88 + pr_warn("mvme5100_pic_init: no cascade interrupt?\n"); 89 + return; 90 + } 91 + 92 + np = of_find_compatible_node(NULL, "pci", "mpc10x-pci"); 93 + if (np) { 94 + prop = of_get_property(np, "8259-interrupt-acknowledge", NULL); 95 + 96 + if (prop) 97 + intack = prop[0]; 98 + 99 + of_node_put(np); 100 + } 101 + 102 + if (intack) 103 + pr_debug("mvme5100_pic_init: PCI 8259 intack at 0x%016lx\n", 104 + intack); 105 + 106 + i8259_init(cp, intack); 107 + of_node_put(cp); 108 + irq_set_chained_handler(cirq, mvme5100_8259_cascade); 109 + } 110 + 111 + static int __init mvme5100_add_bridge(struct device_node *dev) 112 + { 113 + const int *bus_range; 114 + int len; 115 + struct pci_controller *hose; 116 + unsigned short devid; 117 + 118 + pr_info("Adding PCI host bridge %s\n", dev->full_name); 119 + 120 + bus_range = of_get_property(dev, "bus-range", &len); 121 + 122 + hose = pcibios_alloc_controller(dev); 123 + if (hose == NULL) 124 + return -ENOMEM; 125 + 126 + hose->first_busno = bus_range ? bus_range[0] : 0; 127 + hose->last_busno = bus_range ? bus_range[1] : 0xff; 128 + 129 + setup_indirect_pci(hose, 0xfe000cf8, 0xfe000cfc, 0); 130 + 131 + pci_process_bridge_OF_ranges(hose, dev, 1); 132 + 133 + early_read_config_word(hose, 0, 0, PCI_DEVICE_ID, &devid); 134 + 135 + if (devid != PCI_DEVICE_ID_MOTOROLA_HAWK) { 136 + pr_err("HAWK PHB not present?\n"); 137 + return 0; 138 + } 139 + 140 + early_read_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_1, &pci_membase); 141 + 142 + if (pci_membase == 0) { 143 + pr_err("HAWK PHB mibar not correctly set?\n"); 144 + return 0; 145 + } 146 + 147 + pr_info("mvme5100_pic_init: pci_membase: %x\n", pci_membase); 148 + 149 + return 0; 150 + } 151 + 152 + static struct of_device_id mvme5100_of_bus_ids[] __initdata = { 153 + { .compatible = "hawk-bridge", }, 154 + {}, 155 + }; 156 + 157 + /* 158 + * Setup the architecture 159 + */ 160 + static void __init mvme5100_setup_arch(void) 161 + { 162 + struct device_node *np; 163 + 164 + if (ppc_md.progress) 165 + ppc_md.progress("mvme5100_setup_arch()", 0); 166 + 167 + for_each_compatible_node(np, "pci", "hawk-pci") 168 + mvme5100_add_bridge(np); 169 + 170 + restart = ioremap(BOARD_MODRST_REG, 4); 171 + } 172 + 173 + 174 + static void mvme5100_show_cpuinfo(struct seq_file *m) 175 + { 176 + seq_puts(m, "Vendor\t\t: Motorola/Emerson\n"); 177 + seq_puts(m, "Machine\t\t: MVME5100\n"); 178 + } 179 + 180 + static void mvme5100_restart(char *cmd) 181 + { 182 + 183 + local_irq_disable(); 184 + mtmsr(mfmsr() | MSR_IP); 185 + 186 + out_8((u_char *) restart, 0x01); 187 + 188 + while (1) 189 + ; 190 + } 191 + 192 + /* 193 + * Called very early, device-tree isn't unflattened 194 + */ 195 + static int __init mvme5100_probe(void) 196 + { 197 + unsigned long root = of_get_flat_dt_root(); 198 + 199 + return of_flat_dt_is_compatible(root, "MVME5100"); 200 + } 201 + 202 + static int __init probe_of_platform_devices(void) 203 + { 204 + 205 + of_platform_bus_probe(NULL, mvme5100_of_bus_ids, NULL); 206 + return 0; 207 + } 208 + 209 + machine_device_initcall(mvme5100, probe_of_platform_devices); 210 + 211 + define_machine(mvme5100) { 212 + .name = "MVME5100", 213 + .probe = mvme5100_probe, 214 + .setup_arch = mvme5100_setup_arch, 215 + .init_IRQ = mvme5100_pic_init, 216 + .show_cpuinfo = mvme5100_show_cpuinfo, 217 + .get_irq = mpic_get_irq, 218 + .restart = mvme5100_restart, 219 + .calibrate_decr = generic_calibrate_decr, 220 + .progress = udbg_progress, 221 + };
+25 -6
arch/powerpc/sysdev/fsl_lbc.c
··· 214 214 struct fsl_lbc_ctrl *ctrl = data; 215 215 struct fsl_lbc_regs __iomem *lbc = ctrl->regs; 216 216 u32 status; 217 + unsigned long flags; 217 218 219 + spin_lock_irqsave(&fsl_lbc_lock, flags); 218 220 status = in_be32(&lbc->ltesr); 219 - if (!status) 221 + if (!status) { 222 + spin_unlock_irqrestore(&fsl_lbc_lock, flags); 220 223 return IRQ_NONE; 224 + } 221 225 222 226 out_be32(&lbc->ltesr, LTESR_CLEAR); 223 227 out_be32(&lbc->lteatr, 0); ··· 264 260 if (status & ~LTESR_MASK) 265 261 dev_err(ctrl->dev, "Unknown error: " 266 262 "LTESR 0x%08X\n", status); 263 + spin_unlock_irqrestore(&fsl_lbc_lock, flags); 267 264 return IRQ_HANDLED; 268 265 } 269 266 ··· 303 298 goto err; 304 299 } 305 300 306 - fsl_lbc_ctrl_dev->irq = irq_of_parse_and_map(dev->dev.of_node, 0); 307 - if (fsl_lbc_ctrl_dev->irq == NO_IRQ) { 301 + fsl_lbc_ctrl_dev->irq[0] = irq_of_parse_and_map(dev->dev.of_node, 0); 302 + if (!fsl_lbc_ctrl_dev->irq[0]) { 308 303 dev_err(&dev->dev, "failed to get irq resource\n"); 309 304 ret = -ENODEV; 310 305 goto err; ··· 316 311 if (ret < 0) 317 312 goto err; 318 313 319 - ret = request_irq(fsl_lbc_ctrl_dev->irq, fsl_lbc_ctrl_irq, 0, 314 + ret = request_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_irq, 0, 320 315 "fsl-lbc", fsl_lbc_ctrl_dev); 321 316 if (ret != 0) { 322 317 dev_err(&dev->dev, "failed to install irq (%d)\n", 323 - fsl_lbc_ctrl_dev->irq); 324 - ret = fsl_lbc_ctrl_dev->irq; 318 + fsl_lbc_ctrl_dev->irq[0]); 319 + ret = fsl_lbc_ctrl_dev->irq[0]; 325 320 goto err; 321 + } 322 + 323 + fsl_lbc_ctrl_dev->irq[1] = irq_of_parse_and_map(dev->dev.of_node, 1); 324 + if (fsl_lbc_ctrl_dev->irq[1]) { 325 + ret = request_irq(fsl_lbc_ctrl_dev->irq[1], fsl_lbc_ctrl_irq, 326 + IRQF_SHARED, "fsl-lbc-err", fsl_lbc_ctrl_dev); 327 + if (ret) { 328 + dev_err(&dev->dev, "failed to install irq (%d)\n", 329 + fsl_lbc_ctrl_dev->irq[1]); 330 + ret = fsl_lbc_ctrl_dev->irq[1]; 331 + goto err1; 332 + } 326 333 } 327 334 328 335 /* Enable interrupts for any detected events */ ··· 342 325 343 326 return 0; 344 327 328 + err1: 329 + free_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_dev); 345 330 err: 346 331 iounmap(fsl_lbc_ctrl_dev->regs); 347 332 kfree(fsl_lbc_ctrl_dev);
+2 -1
arch/powerpc/sysdev/fsl_pci.c
··· 454 454 } 455 455 } 456 456 457 - int __init fsl_add_bridge(struct platform_device *pdev, int is_primary) 457 + int fsl_add_bridge(struct platform_device *pdev, int is_primary) 458 458 { 459 459 int len; 460 460 struct pci_controller *hose; ··· 1035 1035 { .compatible = "fsl,mpc8548-pcie", }, 1036 1036 { .compatible = "fsl,mpc8610-pci", }, 1037 1037 { .compatible = "fsl,mpc8641-pcie", }, 1038 + { .compatible = "fsl,qoriq-pcie", }, 1038 1039 { .compatible = "fsl,qoriq-pcie-v2.1", }, 1039 1040 { .compatible = "fsl,qoriq-pcie-v2.2", }, 1040 1041 { .compatible = "fsl,qoriq-pcie-v2.3", },
+2 -4
arch/powerpc/sysdev/indirect_pci.c
··· 152 152 .write = indirect_write_config, 153 153 }; 154 154 155 - void __init 156 - setup_indirect_pci(struct pci_controller* hose, 157 - resource_size_t cfg_addr, 158 - resource_size_t cfg_data, u32 flags) 155 + void setup_indirect_pci(struct pci_controller *hose, resource_size_t cfg_addr, 156 + resource_size_t cfg_data, u32 flags) 159 157 { 160 158 resource_size_t base = cfg_addr & PAGE_MASK; 161 159 void __iomem *mbase;
+8 -2
arch/powerpc/sysdev/mpic_timer.c
··· 41 41 #define MPIC_TIMER_TCR_ROVR_OFFSET 24 42 42 43 43 #define TIMER_STOP 0x80000000 44 + #define GTCCR_TOG 0x80000000 44 45 #define TIMERS_PER_GROUP 4 45 46 #define MAX_TICKS (~0U >> 1) 46 47 #define MAX_TICKS_CASCADE (~0U) ··· 97 96 time->tv_sec = (__kernel_time_t)div_u64(ticks, priv->timerfreq); 98 97 tmp_sec = (u64)time->tv_sec * (u64)priv->timerfreq; 99 98 100 - time->tv_usec = (__kernel_suseconds_t) 101 - div_u64((ticks - tmp_sec) * 1000000, priv->timerfreq); 99 + time->tv_usec = 0; 100 + 101 + if (tmp_sec <= ticks) 102 + time->tv_usec = (__kernel_suseconds_t) 103 + div_u64((ticks - tmp_sec) * 1000000, priv->timerfreq); 102 104 103 105 return; 104 106 } ··· 331 327 casc_priv = priv->timer[handle->num].cascade_handle; 332 328 if (casc_priv) { 333 329 tmp_ticks = in_be32(&priv->regs[handle->num].gtccr); 330 + tmp_ticks &= ~GTCCR_TOG; 334 331 ticks = ((u64)tmp_ticks & UINT_MAX) * (u64)MAX_TICKS_CASCADE; 335 332 tmp_ticks = in_be32(&priv->regs[handle->num - 1].gtccr); 336 333 ticks += tmp_ticks; 337 334 } else { 338 335 ticks = in_be32(&priv->regs[handle->num].gtccr); 336 + ticks &= ~GTCCR_TOG; 339 337 } 340 338 341 339 convert_ticks_to_time(priv, ticks, time);
+1 -1
drivers/tty/Kconfig
··· 366 366 "Trace data router for MIPI P1149.7 cJTAG standard". 367 367 368 368 config PPC_EPAPR_HV_BYTECHAN 369 - tristate "ePAPR hypervisor byte channel driver" 369 + bool "ePAPR hypervisor byte channel driver" 370 370 depends on PPC 371 371 select EPAPR_PARAVIRT 372 372 help
+1
include/linux/of_fdt.h
··· 116 116 extern void unflatten_device_tree(void); 117 117 extern void unflatten_and_copy_device_tree(void); 118 118 extern void early_init_devtree(void *); 119 + extern void early_get_first_memblock_info(void *, phys_addr_t *); 119 120 #else /* CONFIG_OF_FLATTREE */ 120 121 static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } 121 122 static inline void unflatten_device_tree(void) {}
+7 -2
include/math-emu/op-common.h
··· 685 685 else \ 686 686 { \ 687 687 r = 0; \ 688 - if (X##_s) \ 688 + if (!X##_s) \ 689 689 r = ~r; \ 690 690 } \ 691 691 FP_SET_EXCEPTION(FP_EX_INVALID); \ ··· 743 743 } \ 744 744 else \ 745 745 { \ 746 + int _lz0, _lz1; \ 746 747 if (X##_e <= -_FP_WORKBITS - 1) \ 747 748 _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ 748 749 else \ 749 750 _FP_FRAC_SRS_##wc(X, _FP_FRACBITS_##fs - 1 - X##_e, \ 750 751 _FP_WFRACBITS_##fs); \ 752 + _FP_FRAC_CLZ_##wc(_lz0, X); \ 751 753 _FP_ROUND(wc, X); \ 754 + _FP_FRAC_CLZ_##wc(_lz1, X); \ 755 + if (_lz1 < _lz0) \ 756 + X##_e++; /* For overflow detection. */ \ 752 757 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ 753 758 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \ 754 759 } \ ··· 767 762 if (!rsigned) \ 768 763 { \ 769 764 r = 0; \ 770 - if (X##_s) \ 765 + if (!X##_s) \ 771 766 r = ~r; \ 772 767 } \ 773 768 else if (rsigned != 2) \