diff options
58 files changed, 236 insertions, 180 deletions
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt index 7a33f22c815a..7a198a30408a 100644 --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt | |||
| @@ -95,6 +95,7 @@ usb: usb@47400000 { | |||
| 95 | reg = <0x47401300 0x100>; | 95 | reg = <0x47401300 0x100>; |
| 96 | reg-names = "phy"; | 96 | reg-names = "phy"; |
| 97 | ti,ctrl_mod = <&ctrl_mod>; | 97 | ti,ctrl_mod = <&ctrl_mod>; |
| 98 | #phy-cells = <0>; | ||
| 98 | }; | 99 | }; |
| 99 | 100 | ||
| 100 | usb0: usb@47401000 { | 101 | usb0: usb@47401000 { |
| @@ -141,6 +142,7 @@ usb: usb@47400000 { | |||
| 141 | reg = <0x47401b00 0x100>; | 142 | reg = <0x47401b00 0x100>; |
| 142 | reg-names = "phy"; | 143 | reg-names = "phy"; |
| 143 | ti,ctrl_mod = <&ctrl_mod>; | 144 | ti,ctrl_mod = <&ctrl_mod>; |
| 145 | #phy-cells = <0>; | ||
| 144 | }; | 146 | }; |
| 145 | 147 | ||
| 146 | usb1: usb@47401800 { | 148 | usb1: usb@47401800 { |
diff --git a/MAINTAINERS b/MAINTAINERS index aa71ab52fd76..cbb89bb82d77 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -2046,7 +2046,7 @@ F: arch/arm/boot/dts/uniphier* | |||
| 2046 | F: arch/arm/include/asm/hardware/cache-uniphier.h | 2046 | F: arch/arm/include/asm/hardware/cache-uniphier.h |
| 2047 | F: arch/arm/mach-uniphier/ | 2047 | F: arch/arm/mach-uniphier/ |
| 2048 | F: arch/arm/mm/cache-uniphier.c | 2048 | F: arch/arm/mm/cache-uniphier.c |
| 2049 | F: arch/arm64/boot/dts/socionext/ | 2049 | F: arch/arm64/boot/dts/socionext/uniphier* |
| 2050 | F: drivers/bus/uniphier-system-bus.c | 2050 | F: drivers/bus/uniphier-system-bus.c |
| 2051 | F: drivers/clk/uniphier/ | 2051 | F: drivers/clk/uniphier/ |
| 2052 | F: drivers/gpio/gpio-uniphier.c | 2052 | F: drivers/gpio/gpio-uniphier.c |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 1b81c4e75772..d37f95025807 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
| @@ -630,6 +630,7 @@ | |||
| 630 | reg-names = "phy"; | 630 | reg-names = "phy"; |
| 631 | status = "disabled"; | 631 | status = "disabled"; |
| 632 | ti,ctrl_mod = <&usb_ctrl_mod>; | 632 | ti,ctrl_mod = <&usb_ctrl_mod>; |
| 633 | #phy-cells = <0>; | ||
| 633 | }; | 634 | }; |
| 634 | 635 | ||
| 635 | usb0: usb@47401000 { | 636 | usb0: usb@47401000 { |
| @@ -678,6 +679,7 @@ | |||
| 678 | reg-names = "phy"; | 679 | reg-names = "phy"; |
| 679 | status = "disabled"; | 680 | status = "disabled"; |
| 680 | ti,ctrl_mod = <&usb_ctrl_mod>; | 681 | ti,ctrl_mod = <&usb_ctrl_mod>; |
| 682 | #phy-cells = <0>; | ||
| 681 | }; | 683 | }; |
| 682 | 684 | ||
| 683 | usb1: usb@47401800 { | 685 | usb1: usb@47401800 { |
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index e5b061469bf8..4714a59fd86d 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi | |||
| @@ -927,7 +927,8 @@ | |||
| 927 | reg = <0x48038000 0x2000>, | 927 | reg = <0x48038000 0x2000>, |
| 928 | <0x46000000 0x400000>; | 928 | <0x46000000 0x400000>; |
| 929 | reg-names = "mpu", "dat"; | 929 | reg-names = "mpu", "dat"; |
| 930 | interrupts = <80>, <81>; | 930 | interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, |
| 931 | <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; | ||
| 931 | interrupt-names = "tx", "rx"; | 932 | interrupt-names = "tx", "rx"; |
| 932 | status = "disabled"; | 933 | status = "disabled"; |
| 933 | dmas = <&edma 8 2>, | 934 | dmas = <&edma 8 2>, |
| @@ -941,7 +942,8 @@ | |||
| 941 | reg = <0x4803C000 0x2000>, | 942 | reg = <0x4803C000 0x2000>, |
| 942 | <0x46400000 0x400000>; | 943 | <0x46400000 0x400000>; |
| 943 | reg-names = "mpu", "dat"; | 944 | reg-names = "mpu", "dat"; |
| 944 | interrupts = <82>, <83>; | 945 | interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>, |
| 946 | <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; | ||
| 945 | interrupt-names = "tx", "rx"; | 947 | interrupt-names = "tx", "rx"; |
| 946 | status = "disabled"; | 948 | status = "disabled"; |
| 947 | dmas = <&edma 10 2>, | 949 | dmas = <&edma 10 2>, |
diff --git a/arch/arm/boot/dts/am437x-cm-t43.dts b/arch/arm/boot/dts/am437x-cm-t43.dts index 9e92d480576b..3b9a94c274a7 100644 --- a/arch/arm/boot/dts/am437x-cm-t43.dts +++ b/arch/arm/boot/dts/am437x-cm-t43.dts | |||
| @@ -301,8 +301,8 @@ | |||
| 301 | status = "okay"; | 301 | status = "okay"; |
| 302 | pinctrl-names = "default"; | 302 | pinctrl-names = "default"; |
| 303 | pinctrl-0 = <&spi0_pins>; | 303 | pinctrl-0 = <&spi0_pins>; |
| 304 | dmas = <&edma 16 | 304 | dmas = <&edma 16 0 |
| 305 | &edma 17>; | 305 | &edma 17 0>; |
| 306 | dma-names = "tx0", "rx0"; | 306 | dma-names = "tx0", "rx0"; |
| 307 | 307 | ||
| 308 | flash: w25q64cvzpig@0 { | 308 | flash: w25q64cvzpig@0 { |
diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts index 25d2d720dc0e..678aa023335d 100644 --- a/arch/arm/boot/dts/armada-385-db-ap.dts +++ b/arch/arm/boot/dts/armada-385-db-ap.dts | |||
| @@ -236,6 +236,7 @@ | |||
| 236 | usb3_phy: usb3_phy { | 236 | usb3_phy: usb3_phy { |
| 237 | compatible = "usb-nop-xceiv"; | 237 | compatible = "usb-nop-xceiv"; |
| 238 | vcc-supply = <®_xhci0_vbus>; | 238 | vcc-supply = <®_xhci0_vbus>; |
| 239 | #phy-cells = <0>; | ||
| 239 | }; | 240 | }; |
| 240 | 241 | ||
| 241 | reg_xhci0_vbus: xhci0-vbus { | 242 | reg_xhci0_vbus: xhci0-vbus { |
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi index e1f355ffc8f7..434dc9aaa5e4 100644 --- a/arch/arm/boot/dts/armada-385-linksys.dtsi +++ b/arch/arm/boot/dts/armada-385-linksys.dtsi | |||
| @@ -66,6 +66,7 @@ | |||
| 66 | usb3_1_phy: usb3_1-phy { | 66 | usb3_1_phy: usb3_1-phy { |
| 67 | compatible = "usb-nop-xceiv"; | 67 | compatible = "usb-nop-xceiv"; |
| 68 | vcc-supply = <&usb3_1_vbus>; | 68 | vcc-supply = <&usb3_1_vbus>; |
| 69 | #phy-cells = <0>; | ||
| 69 | }; | 70 | }; |
| 70 | 71 | ||
| 71 | usb3_1_vbus: usb3_1-vbus { | 72 | usb3_1_vbus: usb3_1-vbus { |
diff --git a/arch/arm/boot/dts/armada-385-synology-ds116.dts b/arch/arm/boot/dts/armada-385-synology-ds116.dts index 36ad571e76f3..0a3552ebda3b 100644 --- a/arch/arm/boot/dts/armada-385-synology-ds116.dts +++ b/arch/arm/boot/dts/armada-385-synology-ds116.dts | |||
| @@ -191,11 +191,13 @@ | |||
| 191 | usb3_0_phy: usb3_0_phy { | 191 | usb3_0_phy: usb3_0_phy { |
| 192 | compatible = "usb-nop-xceiv"; | 192 | compatible = "usb-nop-xceiv"; |
| 193 | vcc-supply = <®_usb3_0_vbus>; | 193 | vcc-supply = <®_usb3_0_vbus>; |
| 194 | #phy-cells = <0>; | ||
| 194 | }; | 195 | }; |
| 195 | 196 | ||
| 196 | usb3_1_phy: usb3_1_phy { | 197 | usb3_1_phy: usb3_1_phy { |
| 197 | compatible = "usb-nop-xceiv"; | 198 | compatible = "usb-nop-xceiv"; |
| 198 | vcc-supply = <®_usb3_1_vbus>; | 199 | vcc-supply = <®_usb3_1_vbus>; |
| 200 | #phy-cells = <0>; | ||
| 199 | }; | 201 | }; |
| 200 | 202 | ||
| 201 | reg_usb3_0_vbus: usb3-vbus0 { | 203 | reg_usb3_0_vbus: usb3-vbus0 { |
diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts index f503955dbd3b..51b4ee6df130 100644 --- a/arch/arm/boot/dts/armada-388-gp.dts +++ b/arch/arm/boot/dts/armada-388-gp.dts | |||
| @@ -276,11 +276,13 @@ | |||
| 276 | usb2_1_phy: usb2_1_phy { | 276 | usb2_1_phy: usb2_1_phy { |
| 277 | compatible = "usb-nop-xceiv"; | 277 | compatible = "usb-nop-xceiv"; |
| 278 | vcc-supply = <®_usb2_1_vbus>; | 278 | vcc-supply = <®_usb2_1_vbus>; |
| 279 | #phy-cells = <0>; | ||
| 279 | }; | 280 | }; |
| 280 | 281 | ||
| 281 | usb3_phy: usb3_phy { | 282 | usb3_phy: usb3_phy { |
| 282 | compatible = "usb-nop-xceiv"; | 283 | compatible = "usb-nop-xceiv"; |
| 283 | vcc-supply = <®_usb3_vbus>; | 284 | vcc-supply = <®_usb3_vbus>; |
| 285 | #phy-cells = <0>; | ||
| 284 | }; | 286 | }; |
| 285 | 287 | ||
| 286 | reg_usb3_vbus: usb3-vbus { | 288 | reg_usb3_vbus: usb3-vbus { |
diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi index 528b9e3bc1da..dcc55aa84583 100644 --- a/arch/arm/boot/dts/bcm-nsp.dtsi +++ b/arch/arm/boot/dts/bcm-nsp.dtsi | |||
| @@ -85,7 +85,7 @@ | |||
| 85 | timer@20200 { | 85 | timer@20200 { |
| 86 | compatible = "arm,cortex-a9-global-timer"; | 86 | compatible = "arm,cortex-a9-global-timer"; |
| 87 | reg = <0x20200 0x100>; | 87 | reg = <0x20200 0x100>; |
| 88 | interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; | 88 | interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; |
| 89 | clocks = <&periph_clk>; | 89 | clocks = <&periph_clk>; |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| @@ -93,7 +93,7 @@ | |||
| 93 | compatible = "arm,cortex-a9-twd-timer"; | 93 | compatible = "arm,cortex-a9-twd-timer"; |
| 94 | reg = <0x20600 0x20>; | 94 | reg = <0x20600 0x20>; |
| 95 | interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | | 95 | interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | |
| 96 | IRQ_TYPE_LEVEL_HIGH)>; | 96 | IRQ_TYPE_EDGE_RISING)>; |
| 97 | clocks = <&periph_clk>; | 97 | clocks = <&periph_clk>; |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 013431e3d7c3..dcde93c85c2d 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi | |||
| @@ -639,5 +639,6 @@ | |||
| 639 | 639 | ||
| 640 | usbphy: phy { | 640 | usbphy: phy { |
| 641 | compatible = "usb-nop-xceiv"; | 641 | compatible = "usb-nop-xceiv"; |
| 642 | #phy-cells = <0>; | ||
| 642 | }; | 643 | }; |
| 643 | }; | 644 | }; |
diff --git a/arch/arm/boot/dts/bcm958623hr.dts b/arch/arm/boot/dts/bcm958623hr.dts index 3bc50849d013..b8bde13de90a 100644 --- a/arch/arm/boot/dts/bcm958623hr.dts +++ b/arch/arm/boot/dts/bcm958623hr.dts | |||
| @@ -141,10 +141,6 @@ | |||
| 141 | status = "okay"; | 141 | status = "okay"; |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | &sata { | ||
| 145 | status = "okay"; | ||
| 146 | }; | ||
| 147 | |||
| 148 | &qspi { | 144 | &qspi { |
| 149 | bspi-sel = <0>; | 145 | bspi-sel = <0>; |
| 150 | flash: m25p80@0 { | 146 | flash: m25p80@0 { |
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts index d94d14b3c745..6a44b8021702 100644 --- a/arch/arm/boot/dts/bcm958625hr.dts +++ b/arch/arm/boot/dts/bcm958625hr.dts | |||
| @@ -177,10 +177,6 @@ | |||
| 177 | status = "okay"; | 177 | status = "okay"; |
| 178 | }; | 178 | }; |
| 179 | 179 | ||
| 180 | &sata { | ||
| 181 | status = "okay"; | ||
| 182 | }; | ||
| 183 | |||
| 184 | &srab { | 180 | &srab { |
| 185 | compatible = "brcm,bcm58625-srab", "brcm,nsp-srab"; | 181 | compatible = "brcm,bcm58625-srab", "brcm,nsp-srab"; |
| 186 | status = "okay"; | 182 | status = "okay"; |
diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm/boot/dts/dm814x.dtsi index 9708157f5daf..b7a11c1168d1 100644 --- a/arch/arm/boot/dts/dm814x.dtsi +++ b/arch/arm/boot/dts/dm814x.dtsi | |||
| @@ -75,6 +75,7 @@ | |||
| 75 | reg = <0x47401300 0x100>; | 75 | reg = <0x47401300 0x100>; |
| 76 | reg-names = "phy"; | 76 | reg-names = "phy"; |
| 77 | ti,ctrl_mod = <&usb_ctrl_mod>; | 77 | ti,ctrl_mod = <&usb_ctrl_mod>; |
| 78 | #phy-cells = <0>; | ||
| 78 | }; | 79 | }; |
| 79 | 80 | ||
| 80 | usb0: usb@47401000 { | 81 | usb0: usb@47401000 { |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index 589a67c5f796..84f17f7abb71 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
| @@ -433,15 +433,6 @@ | |||
| 433 | clock-names = "ipg", "per"; | 433 | clock-names = "ipg", "per"; |
| 434 | }; | 434 | }; |
| 435 | 435 | ||
| 436 | srtc: srtc@53fa4000 { | ||
| 437 | compatible = "fsl,imx53-rtc", "fsl,imx25-rtc"; | ||
| 438 | reg = <0x53fa4000 0x4000>; | ||
| 439 | interrupts = <24>; | ||
| 440 | interrupt-parent = <&tzic>; | ||
| 441 | clocks = <&clks IMX5_CLK_SRTC_GATE>; | ||
| 442 | clock-names = "ipg"; | ||
| 443 | }; | ||
| 444 | |||
| 445 | iomuxc: iomuxc@53fa8000 { | 436 | iomuxc: iomuxc@53fa8000 { |
| 446 | compatible = "fsl,imx53-iomuxc"; | 437 | compatible = "fsl,imx53-iomuxc"; |
| 447 | reg = <0x53fa8000 0x4000>; | 438 | reg = <0x53fa8000 0x4000>; |
diff --git a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts index 38faa90007d7..2fa5eb4bd402 100644 --- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts +++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts | |||
| @@ -72,7 +72,8 @@ | |||
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | &gpmc { | 74 | &gpmc { |
| 75 | ranges = <1 0 0x08000000 0x1000000>; /* CS1: 16MB for LAN9221 */ | 75 | ranges = <0 0 0x30000000 0x1000000 /* CS0: 16MB for NAND */ |
| 76 | 1 0 0x2c000000 0x1000000>; /* CS1: 16MB for LAN9221 */ | ||
| 76 | 77 | ||
| 77 | ethernet@gpmc { | 78 | ethernet@gpmc { |
| 78 | pinctrl-names = "default"; | 79 | pinctrl-names = "default"; |
diff --git a/arch/arm/boot/dts/logicpd-som-lv.dtsi b/arch/arm/boot/dts/logicpd-som-lv.dtsi index 26cce4d18405..29cb804d10cc 100644 --- a/arch/arm/boot/dts/logicpd-som-lv.dtsi +++ b/arch/arm/boot/dts/logicpd-som-lv.dtsi | |||
| @@ -33,11 +33,12 @@ | |||
| 33 | hsusb2_phy: hsusb2_phy { | 33 | hsusb2_phy: hsusb2_phy { |
| 34 | compatible = "usb-nop-xceiv"; | 34 | compatible = "usb-nop-xceiv"; |
| 35 | reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */ | 35 | reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */ |
| 36 | #phy-cells = <0>; | ||
| 36 | }; | 37 | }; |
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | &gpmc { | 40 | &gpmc { |
| 40 | ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */ | 41 | ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */ |
| 41 | 42 | ||
| 42 | nand@0,0 { | 43 | nand@0,0 { |
| 43 | compatible = "ti,omap2-nand"; | 44 | compatible = "ti,omap2-nand"; |
| @@ -121,7 +122,7 @@ | |||
| 121 | 122 | ||
| 122 | &mmc3 { | 123 | &mmc3 { |
| 123 | interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>; | 124 | interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>; |
| 124 | pinctrl-0 = <&mmc3_pins>; | 125 | pinctrl-0 = <&mmc3_pins &wl127x_gpio>; |
| 125 | pinctrl-names = "default"; | 126 | pinctrl-names = "default"; |
| 126 | vmmc-supply = <&wl12xx_vmmc>; | 127 | vmmc-supply = <&wl12xx_vmmc>; |
| 127 | non-removable; | 128 | non-removable; |
| @@ -132,8 +133,8 @@ | |||
| 132 | wlcore: wlcore@2 { | 133 | wlcore: wlcore@2 { |
| 133 | compatible = "ti,wl1273"; | 134 | compatible = "ti,wl1273"; |
| 134 | reg = <2>; | 135 | reg = <2>; |
| 135 | interrupt-parent = <&gpio5>; | 136 | interrupt-parent = <&gpio1>; |
| 136 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */ | 137 | interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 2 */ |
| 137 | ref-clock-frequency = <26000000>; | 138 | ref-clock-frequency = <26000000>; |
| 138 | }; | 139 | }; |
| 139 | }; | 140 | }; |
| @@ -157,8 +158,6 @@ | |||
| 157 | OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */ | 158 | OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */ |
| 158 | OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */ | 159 | OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */ |
| 159 | OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */ | 160 | OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */ |
| 160 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */ | ||
| 161 | OMAP3_CORE1_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ | ||
| 162 | OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */ | 161 | OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */ |
| 163 | OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */ | 162 | OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */ |
| 164 | >; | 163 | >; |
| @@ -228,6 +227,12 @@ | |||
| 228 | OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4) /* sys_boot2.gpio_4 */ | 227 | OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4) /* sys_boot2.gpio_4 */ |
| 229 | >; | 228 | >; |
| 230 | }; | 229 | }; |
| 230 | wl127x_gpio: pinmux_wl127x_gpio_pin { | ||
| 231 | pinctrl-single,pins = < | ||
| 232 | OMAP3_WKUP_IOPAD(0x2a0c, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */ | ||
| 233 | OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ | ||
| 234 | >; | ||
| 235 | }; | ||
| 231 | }; | 236 | }; |
| 232 | 237 | ||
| 233 | &omap3_pmx_core2 { | 238 | &omap3_pmx_core2 { |
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 683b96a8f73e..0349fcc9dc26 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts | |||
| @@ -90,6 +90,7 @@ | |||
| 90 | compatible = "usb-nop-xceiv"; | 90 | compatible = "usb-nop-xceiv"; |
| 91 | reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ | 91 | reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ |
| 92 | vcc-supply = <&hsusb2_power>; | 92 | vcc-supply = <&hsusb2_power>; |
| 93 | #phy-cells = <0>; | ||
| 93 | }; | 94 | }; |
| 94 | 95 | ||
| 95 | tfp410: encoder0 { | 96 | tfp410: encoder0 { |
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index 4d2eaf843fa9..3ca8991a6c3e 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | compatible = "usb-nop-xceiv"; | 64 | compatible = "usb-nop-xceiv"; |
| 65 | reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ | 65 | reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ |
| 66 | vcc-supply = <&hsusb2_power>; | 66 | vcc-supply = <&hsusb2_power>; |
| 67 | #phy-cells = <0>; | ||
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| 69 | sound { | 70 | sound { |
diff --git a/arch/arm/boot/dts/omap3-cm-t3x.dtsi b/arch/arm/boot/dts/omap3-cm-t3x.dtsi index 31d5ebf38892..ab6003fe5a43 100644 --- a/arch/arm/boot/dts/omap3-cm-t3x.dtsi +++ b/arch/arm/boot/dts/omap3-cm-t3x.dtsi | |||
| @@ -43,12 +43,14 @@ | |||
| 43 | hsusb1_phy: hsusb1_phy { | 43 | hsusb1_phy: hsusb1_phy { |
| 44 | compatible = "usb-nop-xceiv"; | 44 | compatible = "usb-nop-xceiv"; |
| 45 | vcc-supply = <&hsusb1_power>; | 45 | vcc-supply = <&hsusb1_power>; |
| 46 | #phy-cells = <0>; | ||
| 46 | }; | 47 | }; |
| 47 | 48 | ||
| 48 | /* HS USB Host PHY on PORT 2 */ | 49 | /* HS USB Host PHY on PORT 2 */ |
| 49 | hsusb2_phy: hsusb2_phy { | 50 | hsusb2_phy: hsusb2_phy { |
| 50 | compatible = "usb-nop-xceiv"; | 51 | compatible = "usb-nop-xceiv"; |
| 51 | vcc-supply = <&hsusb2_power>; | 52 | vcc-supply = <&hsusb2_power>; |
| 53 | #phy-cells = <0>; | ||
| 52 | }; | 54 | }; |
| 53 | 55 | ||
| 54 | ads7846reg: ads7846-reg { | 56 | ads7846reg: ads7846-reg { |
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi b/arch/arm/boot/dts/omap3-evm-common.dtsi index dbc3f030a16c..ee64191e41ca 100644 --- a/arch/arm/boot/dts/omap3-evm-common.dtsi +++ b/arch/arm/boot/dts/omap3-evm-common.dtsi | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | compatible = "usb-nop-xceiv"; | 29 | compatible = "usb-nop-xceiv"; |
| 30 | reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; /* gpio_21 */ | 30 | reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; /* gpio_21 */ |
| 31 | vcc-supply = <&hsusb2_power>; | 31 | vcc-supply = <&hsusb2_power>; |
| 32 | #phy-cells = <0>; | ||
| 32 | }; | 33 | }; |
| 33 | 34 | ||
| 34 | leds { | 35 | leds { |
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi index 4504908c23fe..3dc56fb156b7 100644 --- a/arch/arm/boot/dts/omap3-gta04.dtsi +++ b/arch/arm/boot/dts/omap3-gta04.dtsi | |||
| @@ -120,6 +120,7 @@ | |||
| 120 | hsusb2_phy: hsusb2_phy { | 120 | hsusb2_phy: hsusb2_phy { |
| 121 | compatible = "usb-nop-xceiv"; | 121 | compatible = "usb-nop-xceiv"; |
| 122 | reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; | 122 | reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; |
| 123 | #phy-cells = <0>; | ||
| 123 | }; | 124 | }; |
| 124 | 125 | ||
| 125 | tv0: connector { | 126 | tv0: connector { |
diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi index 667f96245729..ecbec23af49f 100644 --- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi +++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi | |||
| @@ -58,6 +58,7 @@ | |||
| 58 | compatible = "usb-nop-xceiv"; | 58 | compatible = "usb-nop-xceiv"; |
| 59 | reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */ | 59 | reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */ |
| 60 | vcc-supply = <&hsusb1_power>; | 60 | vcc-supply = <&hsusb1_power>; |
| 61 | #phy-cells = <0>; | ||
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 63 | tfp410: encoder { | 64 | tfp410: encoder { |
diff --git a/arch/arm/boot/dts/omap3-igep0030-common.dtsi b/arch/arm/boot/dts/omap3-igep0030-common.dtsi index e94d9427450c..443f71707437 100644 --- a/arch/arm/boot/dts/omap3-igep0030-common.dtsi +++ b/arch/arm/boot/dts/omap3-igep0030-common.dtsi | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | hsusb2_phy: hsusb2_phy { | 37 | hsusb2_phy: hsusb2_phy { |
| 38 | compatible = "usb-nop-xceiv"; | 38 | compatible = "usb-nop-xceiv"; |
| 39 | reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* gpio_54 */ | 39 | reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* gpio_54 */ |
| 40 | #phy-cells = <0>; | ||
| 40 | }; | 41 | }; |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi index 343a36d8031d..7ada1e93e166 100644 --- a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi +++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | hsusb1_phy: hsusb1_phy { | 51 | hsusb1_phy: hsusb1_phy { |
| 52 | compatible = "usb-nop-xceiv"; | 52 | compatible = "usb-nop-xceiv"; |
| 53 | vcc-supply = <®_vcc3>; | 53 | vcc-supply = <®_vcc3>; |
| 54 | #phy-cells = <0>; | ||
| 54 | }; | 55 | }; |
| 55 | }; | 56 | }; |
| 56 | 57 | ||
diff --git a/arch/arm/boot/dts/omap3-overo-base.dtsi b/arch/arm/boot/dts/omap3-overo-base.dtsi index f25e158e7163..ac141fcd1742 100644 --- a/arch/arm/boot/dts/omap3-overo-base.dtsi +++ b/arch/arm/boot/dts/omap3-overo-base.dtsi | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | compatible = "usb-nop-xceiv"; | 51 | compatible = "usb-nop-xceiv"; |
| 52 | reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; /* gpio_183 */ | 52 | reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; /* gpio_183 */ |
| 53 | vcc-supply = <&hsusb2_power>; | 53 | vcc-supply = <&hsusb2_power>; |
| 54 | #phy-cells = <0>; | ||
| 54 | }; | 55 | }; |
| 55 | 56 | ||
| 56 | /* Regulator to trigger the nPoweron signal of the Wifi module */ | 57 | /* Regulator to trigger the nPoweron signal of the Wifi module */ |
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi index 53e007abdc71..cd53dc6c0051 100644 --- a/arch/arm/boot/dts/omap3-pandora-common.dtsi +++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi | |||
| @@ -205,6 +205,7 @@ | |||
| 205 | compatible = "usb-nop-xceiv"; | 205 | compatible = "usb-nop-xceiv"; |
| 206 | reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */ | 206 | reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */ |
| 207 | vcc-supply = <&vaux2>; | 207 | vcc-supply = <&vaux2>; |
| 208 | #phy-cells = <0>; | ||
| 208 | }; | 209 | }; |
| 209 | 210 | ||
| 210 | /* HS USB Host VBUS supply | 211 | /* HS USB Host VBUS supply |
diff --git a/arch/arm/boot/dts/omap3-tao3530.dtsi b/arch/arm/boot/dts/omap3-tao3530.dtsi index 9a601d15247b..6f5bd027b717 100644 --- a/arch/arm/boot/dts/omap3-tao3530.dtsi +++ b/arch/arm/boot/dts/omap3-tao3530.dtsi | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | compatible = "usb-nop-xceiv"; | 46 | compatible = "usb-nop-xceiv"; |
| 47 | reset-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* gpio_162 */ | 47 | reset-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* gpio_162 */ |
| 48 | vcc-supply = <&hsusb2_power>; | 48 | vcc-supply = <&hsusb2_power>; |
| 49 | #phy-cells = <0>; | ||
| 49 | }; | 50 | }; |
| 50 | 51 | ||
| 51 | sound { | 52 | sound { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 90b5c7148feb..bb33935df7b0 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
| @@ -715,6 +715,7 @@ | |||
| 715 | compatible = "ti,ohci-omap3"; | 715 | compatible = "ti,ohci-omap3"; |
| 716 | reg = <0x48064400 0x400>; | 716 | reg = <0x48064400 0x400>; |
| 717 | interrupts = <76>; | 717 | interrupts = <76>; |
| 718 | remote-wakeup-connected; | ||
| 718 | }; | 719 | }; |
| 719 | 720 | ||
| 720 | usbhsehci: ehci@48064800 { | 721 | usbhsehci: ehci@48064800 { |
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts index 8b93d37310f2..24a463f8641f 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts | |||
| @@ -73,6 +73,7 @@ | |||
| 73 | /* HS USB Host PHY on PORT 1 */ | 73 | /* HS USB Host PHY on PORT 1 */ |
| 74 | hsusb1_phy: hsusb1_phy { | 74 | hsusb1_phy: hsusb1_phy { |
| 75 | compatible = "usb-nop-xceiv"; | 75 | compatible = "usb-nop-xceiv"; |
| 76 | #phy-cells = <0>; | ||
| 76 | }; | 77 | }; |
| 77 | 78 | ||
| 78 | /* LCD regulator from sw5 source */ | 79 | /* LCD regulator from sw5 source */ |
diff --git a/arch/arm/boot/dts/omap4-duovero.dtsi b/arch/arm/boot/dts/omap4-duovero.dtsi index 6e6810c258eb..eb123b24c8e3 100644 --- a/arch/arm/boot/dts/omap4-duovero.dtsi +++ b/arch/arm/boot/dts/omap4-duovero.dtsi | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | hsusb1_phy: hsusb1_phy { | 43 | hsusb1_phy: hsusb1_phy { |
| 44 | compatible = "usb-nop-xceiv"; | 44 | compatible = "usb-nop-xceiv"; |
| 45 | reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ | 45 | reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ |
| 46 | #phy-cells = <0>; | ||
| 46 | 47 | ||
| 47 | pinctrl-names = "default"; | 48 | pinctrl-names = "default"; |
| 48 | pinctrl-0 = <&hsusb1phy_pins>; | 49 | pinctrl-0 = <&hsusb1phy_pins>; |
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 22c1eee9b07a..5501d1b4e6cd 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi | |||
| @@ -89,6 +89,7 @@ | |||
| 89 | hsusb1_phy: hsusb1_phy { | 89 | hsusb1_phy: hsusb1_phy { |
| 90 | compatible = "usb-nop-xceiv"; | 90 | compatible = "usb-nop-xceiv"; |
| 91 | reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ | 91 | reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ |
| 92 | #phy-cells = <0>; | ||
| 92 | vcc-supply = <&hsusb1_power>; | 93 | vcc-supply = <&hsusb1_power>; |
| 93 | clocks = <&auxclk3_ck>; | 94 | clocks = <&auxclk3_ck>; |
| 94 | clock-names = "main_clk"; | 95 | clock-names = "main_clk"; |
diff --git a/arch/arm/boot/dts/omap4-var-som-om44.dtsi b/arch/arm/boot/dts/omap4-var-som-om44.dtsi index 6500bfc8d130..10fce28ceb5b 100644 --- a/arch/arm/boot/dts/omap4-var-som-om44.dtsi +++ b/arch/arm/boot/dts/omap4-var-som-om44.dtsi | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | 44 | ||
| 45 | reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */ | 45 | reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */ |
| 46 | vcc-supply = <&vbat>; | 46 | vcc-supply = <&vbat>; |
| 47 | #phy-cells = <0>; | ||
| 47 | 48 | ||
| 48 | clocks = <&auxclk3_ck>; | 49 | clocks = <&auxclk3_ck>; |
| 49 | clock-names = "main_clk"; | 50 | clock-names = "main_clk"; |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 1dc5a76b3c71..3bba7128b8f3 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
| @@ -1081,14 +1081,13 @@ | |||
| 1081 | usbhsohci: ohci@4a064800 { | 1081 | usbhsohci: ohci@4a064800 { |
| 1082 | compatible = "ti,ohci-omap3"; | 1082 | compatible = "ti,ohci-omap3"; |
| 1083 | reg = <0x4a064800 0x400>; | 1083 | reg = <0x4a064800 0x400>; |
| 1084 | interrupt-parent = <&gic>; | ||
| 1085 | interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; | 1084 | interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; |
| 1085 | remote-wakeup-connected; | ||
| 1086 | }; | 1086 | }; |
| 1087 | 1087 | ||
| 1088 | usbhsehci: ehci@4a064c00 { | 1088 | usbhsehci: ehci@4a064c00 { |
| 1089 | compatible = "ti,ehci-omap"; | 1089 | compatible = "ti,ehci-omap"; |
| 1090 | reg = <0x4a064c00 0x400>; | 1090 | reg = <0x4a064c00 0x400>; |
| 1091 | interrupt-parent = <&gic>; | ||
| 1092 | interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; | 1091 | interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; |
| 1093 | }; | 1092 | }; |
| 1094 | }; | 1093 | }; |
diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi index 575ecffb0e9e..1b20838bb9a4 100644 --- a/arch/arm/boot/dts/omap5-board-common.dtsi +++ b/arch/arm/boot/dts/omap5-board-common.dtsi | |||
| @@ -73,12 +73,14 @@ | |||
| 73 | clocks = <&auxclk1_ck>; | 73 | clocks = <&auxclk1_ck>; |
| 74 | clock-names = "main_clk"; | 74 | clock-names = "main_clk"; |
| 75 | clock-frequency = <19200000>; | 75 | clock-frequency = <19200000>; |
| 76 | #phy-cells = <0>; | ||
| 76 | }; | 77 | }; |
| 77 | 78 | ||
| 78 | /* HS USB Host PHY on PORT 3 */ | 79 | /* HS USB Host PHY on PORT 3 */ |
| 79 | hsusb3_phy: hsusb3_phy { | 80 | hsusb3_phy: hsusb3_phy { |
| 80 | compatible = "usb-nop-xceiv"; | 81 | compatible = "usb-nop-xceiv"; |
| 81 | reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */ | 82 | reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */ |
| 83 | #phy-cells = <0>; | ||
| 82 | }; | 84 | }; |
| 83 | 85 | ||
| 84 | tpd12s015: encoder { | 86 | tpd12s015: encoder { |
diff --git a/arch/arm/boot/dts/omap5-cm-t54.dts b/arch/arm/boot/dts/omap5-cm-t54.dts index 5b172a04b6f1..5e21fb430a65 100644 --- a/arch/arm/boot/dts/omap5-cm-t54.dts +++ b/arch/arm/boot/dts/omap5-cm-t54.dts | |||
| @@ -63,12 +63,14 @@ | |||
| 63 | hsusb2_phy: hsusb2_phy { | 63 | hsusb2_phy: hsusb2_phy { |
| 64 | compatible = "usb-nop-xceiv"; | 64 | compatible = "usb-nop-xceiv"; |
| 65 | reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */ | 65 | reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */ |
| 66 | #phy-cells = <0>; | ||
| 66 | }; | 67 | }; |
| 67 | 68 | ||
| 68 | /* HS USB Host PHY on PORT 3 */ | 69 | /* HS USB Host PHY on PORT 3 */ |
| 69 | hsusb3_phy: hsusb3_phy { | 70 | hsusb3_phy: hsusb3_phy { |
| 70 | compatible = "usb-nop-xceiv"; | 71 | compatible = "usb-nop-xceiv"; |
| 71 | reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */ | 72 | reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */ |
| 73 | #phy-cells = <0>; | ||
| 72 | }; | 74 | }; |
| 73 | 75 | ||
| 74 | leds { | 76 | leds { |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index 4cd0005e462f..51a7fb3d7b9a 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
| @@ -940,6 +940,7 @@ | |||
| 940 | compatible = "ti,ohci-omap3"; | 940 | compatible = "ti,ohci-omap3"; |
| 941 | reg = <0x4a064800 0x400>; | 941 | reg = <0x4a064800 0x400>; |
| 942 | interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; | 942 | interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; |
| 943 | remote-wakeup-connected; | ||
| 943 | }; | 944 | }; |
| 944 | 945 | ||
| 945 | usbhsehci: ehci@4a064c00 { | 946 | usbhsehci: ehci@4a064c00 { |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 2f017fee4009..62baabd757b6 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
| @@ -1201,6 +1201,7 @@ | |||
| 1201 | clock-names = "extal", "usb_extal"; | 1201 | clock-names = "extal", "usb_extal"; |
| 1202 | #clock-cells = <2>; | 1202 | #clock-cells = <2>; |
| 1203 | #power-domain-cells = <0>; | 1203 | #power-domain-cells = <0>; |
| 1204 | #reset-cells = <1>; | ||
| 1204 | }; | 1205 | }; |
| 1205 | 1206 | ||
| 1206 | prr: chipid@ff000044 { | 1207 | prr: chipid@ff000044 { |
diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi index 131f65b0426e..3d080e07374c 100644 --- a/arch/arm/boot/dts/r8a7792.dtsi +++ b/arch/arm/boot/dts/r8a7792.dtsi | |||
| @@ -829,6 +829,7 @@ | |||
| 829 | clock-names = "extal"; | 829 | clock-names = "extal"; |
| 830 | #clock-cells = <2>; | 830 | #clock-cells = <2>; |
| 831 | #power-domain-cells = <0>; | 831 | #power-domain-cells = <0>; |
| 832 | #reset-cells = <1>; | ||
| 832 | }; | 833 | }; |
| 833 | }; | 834 | }; |
| 834 | 835 | ||
diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi index 58eae569b4e0..0cd1035de1a4 100644 --- a/arch/arm/boot/dts/r8a7793.dtsi +++ b/arch/arm/boot/dts/r8a7793.dtsi | |||
| @@ -1088,6 +1088,7 @@ | |||
| 1088 | clock-names = "extal", "usb_extal"; | 1088 | clock-names = "extal", "usb_extal"; |
| 1089 | #clock-cells = <2>; | 1089 | #clock-cells = <2>; |
| 1090 | #power-domain-cells = <0>; | 1090 | #power-domain-cells = <0>; |
| 1091 | #reset-cells = <1>; | ||
| 1091 | }; | 1092 | }; |
| 1092 | 1093 | ||
| 1093 | rst: reset-controller@e6160000 { | 1094 | rst: reset-controller@e6160000 { |
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index 905e50c9b524..5643976c1356 100644 --- a/arch/arm/boot/dts/r8a7794.dtsi +++ b/arch/arm/boot/dts/r8a7794.dtsi | |||
| @@ -1099,6 +1099,7 @@ | |||
| 1099 | clock-names = "extal", "usb_extal"; | 1099 | clock-names = "extal", "usb_extal"; |
| 1100 | #clock-cells = <2>; | 1100 | #clock-cells = <2>; |
| 1101 | #power-domain-cells = <0>; | 1101 | #power-domain-cells = <0>; |
| 1102 | #reset-cells = <1>; | ||
| 1102 | }; | 1103 | }; |
| 1103 | 1104 | ||
| 1104 | rst: reset-controller@e6160000 { | 1105 | rst: reset-controller@e6160000 { |
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts index 02a6227c717c..fbb3758ca2e3 100644 --- a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts +++ b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | |||
| @@ -359,7 +359,7 @@ | |||
| 359 | }; | 359 | }; |
| 360 | 360 | ||
| 361 | &i2c1 { | 361 | &i2c1 { |
| 362 | at24mac602@0 { | 362 | at24mac602@50 { |
| 363 | compatible = "atmel,24c02"; | 363 | compatible = "atmel,24c02"; |
| 364 | reg = <0x50>; | 364 | reg = <0x50>; |
| 365 | read-only; | 365 | read-only; |
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c index d555791cf349..83c6fa74cc31 100644 --- a/arch/arm/mach-omap2/cm_common.c +++ b/arch/arm/mach-omap2/cm_common.c | |||
| @@ -68,14 +68,17 @@ void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2) | |||
| 68 | int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, | 68 | int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, |
| 69 | u8 *idlest_reg_id) | 69 | u8 *idlest_reg_id) |
| 70 | { | 70 | { |
| 71 | int ret; | ||
| 71 | if (!cm_ll_data->split_idlest_reg) { | 72 | if (!cm_ll_data->split_idlest_reg) { |
| 72 | WARN_ONCE(1, "cm: %s: no low-level function defined\n", | 73 | WARN_ONCE(1, "cm: %s: no low-level function defined\n", |
| 73 | __func__); | 74 | __func__); |
| 74 | return -EINVAL; | 75 | return -EINVAL; |
| 75 | } | 76 | } |
| 76 | 77 | ||
| 77 | return cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, | 78 | ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, |
| 78 | idlest_reg_id); | 79 | idlest_reg_id); |
| 80 | *prcm_inst -= cm_base.offset; | ||
| 81 | return ret; | ||
| 79 | } | 82 | } |
| 80 | 83 | ||
| 81 | /** | 84 | /** |
| @@ -337,6 +340,7 @@ int __init omap2_cm_base_init(void) | |||
| 337 | if (mem) { | 340 | if (mem) { |
| 338 | mem->pa = res.start + data->offset; | 341 | mem->pa = res.start + data->offset; |
| 339 | mem->va = data->mem + data->offset; | 342 | mem->va = data->mem + data->offset; |
| 343 | mem->offset = data->offset; | ||
| 340 | } | 344 | } |
| 341 | 345 | ||
| 342 | data->np = np; | 346 | data->np = np; |
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c index 5ac122e88f67..9ff92050053c 100644 --- a/arch/arm/mach-omap2/omap-secure.c +++ b/arch/arm/mach-omap2/omap-secure.c | |||
| @@ -73,6 +73,25 @@ phys_addr_t omap_secure_ram_mempool_base(void) | |||
| 73 | return omap_secure_memblock_base; | 73 | return omap_secure_memblock_base; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | u32 omap3_save_secure_ram(void __iomem *addr, int size) | ||
| 77 | { | ||
| 78 | u32 ret; | ||
| 79 | u32 param[5]; | ||
| 80 | |||
| 81 | if (size != OMAP3_SAVE_SECURE_RAM_SZ) | ||
| 82 | return OMAP3_SAVE_SECURE_RAM_SZ; | ||
| 83 | |||
| 84 | param[0] = 4; /* Number of arguments */ | ||
| 85 | param[1] = __pa(addr); /* Physical address for saving */ | ||
| 86 | param[2] = 0; | ||
| 87 | param[3] = 1; | ||
| 88 | param[4] = 1; | ||
| 89 | |||
| 90 | ret = save_secure_ram_context(__pa(param)); | ||
| 91 | |||
| 92 | return ret; | ||
| 93 | } | ||
| 94 | |||
| 76 | /** | 95 | /** |
| 77 | * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls | 96 | * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls |
| 78 | * @idx: The PPA API index | 97 | * @idx: The PPA API index |
diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h index bae263fba640..c509cde71f93 100644 --- a/arch/arm/mach-omap2/omap-secure.h +++ b/arch/arm/mach-omap2/omap-secure.h | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | /* Maximum Secure memory storage size */ | 31 | /* Maximum Secure memory storage size */ |
| 32 | #define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K) | 32 | #define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K) |
| 33 | 33 | ||
| 34 | #define OMAP3_SAVE_SECURE_RAM_SZ 0x803F | ||
| 35 | |||
| 34 | /* Secure low power HAL API index */ | 36 | /* Secure low power HAL API index */ |
| 35 | #define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a | 37 | #define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a |
| 36 | #define OMAP4_HAL_SAVEHW_INDEX 0x1b | 38 | #define OMAP4_HAL_SAVEHW_INDEX 0x1b |
| @@ -65,6 +67,8 @@ extern u32 omap_smc2(u32 id, u32 falg, u32 pargs); | |||
| 65 | extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs); | 67 | extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs); |
| 66 | extern phys_addr_t omap_secure_ram_mempool_base(void); | 68 | extern phys_addr_t omap_secure_ram_mempool_base(void); |
| 67 | extern int omap_secure_ram_reserve_memblock(void); | 69 | extern int omap_secure_ram_reserve_memblock(void); |
| 70 | extern u32 save_secure_ram_context(u32 args_pa); | ||
| 71 | extern u32 omap3_save_secure_ram(void __iomem *save_regs, int size); | ||
| 68 | 72 | ||
| 69 | extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, | 73 | extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, |
| 70 | u32 arg1, u32 arg2, u32 arg3, u32 arg4); | 74 | u32 arg1, u32 arg2, u32 arg3, u32 arg4); |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index d45cbfdb4be6..f0388058b7da 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
| @@ -391,10 +391,8 @@ omap_device_copy_resources(struct omap_hwmod *oh, | |||
| 391 | const char *name; | 391 | const char *name; |
| 392 | int error, irq = 0; | 392 | int error, irq = 0; |
| 393 | 393 | ||
| 394 | if (!oh || !oh->od || !oh->od->pdev) { | 394 | if (!oh || !oh->od || !oh->od->pdev) |
| 395 | error = -EINVAL; | 395 | return -EINVAL; |
| 396 | goto error; | ||
| 397 | } | ||
| 398 | 396 | ||
| 399 | np = oh->od->pdev->dev.of_node; | 397 | np = oh->od->pdev->dev.of_node; |
| 400 | if (!np) { | 398 | if (!np) { |
| @@ -516,8 +514,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name, | |||
| 516 | goto odbs_exit1; | 514 | goto odbs_exit1; |
| 517 | 515 | ||
| 518 | od = omap_device_alloc(pdev, &oh, 1); | 516 | od = omap_device_alloc(pdev, &oh, 1); |
| 519 | if (IS_ERR(od)) | 517 | if (IS_ERR(od)) { |
| 518 | ret = PTR_ERR(od); | ||
| 520 | goto odbs_exit1; | 519 | goto odbs_exit1; |
| 520 | } | ||
| 521 | 521 | ||
| 522 | ret = platform_device_add_data(pdev, pdata, pdata_len); | 522 | ret = platform_device_add_data(pdev, pdata, pdata_len); |
| 523 | if (ret) | 523 | if (ret) |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index d2106ae4410a..52c9d585b44d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -1646,6 +1646,7 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = { | |||
| 1646 | .main_clk = "mmchs3_fck", | 1646 | .main_clk = "mmchs3_fck", |
| 1647 | .prcm = { | 1647 | .prcm = { |
| 1648 | .omap2 = { | 1648 | .omap2 = { |
| 1649 | .module_offs = CORE_MOD, | ||
| 1649 | .prcm_reg_id = 1, | 1650 | .prcm_reg_id = 1, |
| 1650 | .module_bit = OMAP3430_EN_MMC3_SHIFT, | 1651 | .module_bit = OMAP3430_EN_MMC3_SHIFT, |
| 1651 | .idlest_reg_id = 1, | 1652 | .idlest_reg_id = 1, |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index b668719b9b25..8e30772cfe32 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
| @@ -81,10 +81,6 @@ extern unsigned int omap3_do_wfi_sz; | |||
| 81 | /* ... and its pointer from SRAM after copy */ | 81 | /* ... and its pointer from SRAM after copy */ |
| 82 | extern void (*omap3_do_wfi_sram)(void); | 82 | extern void (*omap3_do_wfi_sram)(void); |
| 83 | 83 | ||
| 84 | /* save_secure_ram_context function pointer and size, for copy to SRAM */ | ||
| 85 | extern int save_secure_ram_context(u32 *addr); | ||
| 86 | extern unsigned int save_secure_ram_context_sz; | ||
| 87 | |||
| 88 | extern void omap3_save_scratchpad_contents(void); | 84 | extern void omap3_save_scratchpad_contents(void); |
| 89 | 85 | ||
| 90 | #define PM_RTA_ERRATUM_i608 (1 << 0) | 86 | #define PM_RTA_ERRATUM_i608 (1 << 0) |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 841ba19d64a6..36c55547137c 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #include "prm3xxx.h" | 48 | #include "prm3xxx.h" |
| 49 | #include "pm.h" | 49 | #include "pm.h" |
| 50 | #include "sdrc.h" | 50 | #include "sdrc.h" |
| 51 | #include "omap-secure.h" | ||
| 51 | #include "sram.h" | 52 | #include "sram.h" |
| 52 | #include "control.h" | 53 | #include "control.h" |
| 53 | #include "vc.h" | 54 | #include "vc.h" |
| @@ -66,7 +67,6 @@ struct power_state { | |||
| 66 | 67 | ||
| 67 | static LIST_HEAD(pwrst_list); | 68 | static LIST_HEAD(pwrst_list); |
| 68 | 69 | ||
| 69 | static int (*_omap_save_secure_sram)(u32 *addr); | ||
| 70 | void (*omap3_do_wfi_sram)(void); | 70 | void (*omap3_do_wfi_sram)(void); |
| 71 | 71 | ||
| 72 | static struct powerdomain *mpu_pwrdm, *neon_pwrdm; | 72 | static struct powerdomain *mpu_pwrdm, *neon_pwrdm; |
| @@ -121,8 +121,8 @@ static void omap3_save_secure_ram_context(void) | |||
| 121 | * will hang the system. | 121 | * will hang the system. |
| 122 | */ | 122 | */ |
| 123 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); | 123 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); |
| 124 | ret = _omap_save_secure_sram((u32 *)(unsigned long) | 124 | ret = omap3_save_secure_ram(omap3_secure_ram_storage, |
| 125 | __pa(omap3_secure_ram_storage)); | 125 | OMAP3_SAVE_SECURE_RAM_SZ); |
| 126 | pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); | 126 | pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); |
| 127 | /* Following is for error tracking, it should not happen */ | 127 | /* Following is for error tracking, it should not happen */ |
| 128 | if (ret) { | 128 | if (ret) { |
| @@ -434,15 +434,10 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
| 434 | * | 434 | * |
| 435 | * The minimum set of functions is pushed to SRAM for execution: | 435 | * The minimum set of functions is pushed to SRAM for execution: |
| 436 | * - omap3_do_wfi for erratum i581 WA, | 436 | * - omap3_do_wfi for erratum i581 WA, |
| 437 | * - save_secure_ram_context for security extensions. | ||
| 438 | */ | 437 | */ |
| 439 | void omap_push_sram_idle(void) | 438 | void omap_push_sram_idle(void) |
| 440 | { | 439 | { |
| 441 | omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz); | 440 | omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz); |
| 442 | |||
| 443 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) | ||
| 444 | _omap_save_secure_sram = omap_sram_push(save_secure_ram_context, | ||
| 445 | save_secure_ram_context_sz); | ||
| 446 | } | 441 | } |
| 447 | 442 | ||
| 448 | static void __init pm_errata_configure(void) | 443 | static void __init pm_errata_configure(void) |
| @@ -553,7 +548,7 @@ int __init omap3_pm_init(void) | |||
| 553 | clkdm_add_wkdep(neon_clkdm, mpu_clkdm); | 548 | clkdm_add_wkdep(neon_clkdm, mpu_clkdm); |
| 554 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { | 549 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { |
| 555 | omap3_secure_ram_storage = | 550 | omap3_secure_ram_storage = |
| 556 | kmalloc(0x803F, GFP_KERNEL); | 551 | kmalloc(OMAP3_SAVE_SECURE_RAM_SZ, GFP_KERNEL); |
| 557 | if (!omap3_secure_ram_storage) | 552 | if (!omap3_secure_ram_storage) |
| 558 | pr_err("Memory allocation failed when allocating for secure sram context\n"); | 553 | pr_err("Memory allocation failed when allocating for secure sram context\n"); |
| 559 | 554 | ||
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index 0592b23902c6..0977da0dab76 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
| @@ -528,6 +528,7 @@ struct omap_prcm_irq_setup { | |||
| 528 | struct omap_domain_base { | 528 | struct omap_domain_base { |
| 529 | u32 pa; | 529 | u32 pa; |
| 530 | void __iomem *va; | 530 | void __iomem *va; |
| 531 | s16 offset; | ||
| 531 | }; | 532 | }; |
| 532 | 533 | ||
| 533 | /** | 534 | /** |
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c index d2c5bcabdbeb..ebaf80d72a10 100644 --- a/arch/arm/mach-omap2/prm33xx.c +++ b/arch/arm/mach-omap2/prm33xx.c | |||
| @@ -176,17 +176,6 @@ static int am33xx_pwrdm_read_pwrst(struct powerdomain *pwrdm) | |||
| 176 | return v; | 176 | return v; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | static int am33xx_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) | ||
| 180 | { | ||
| 181 | u32 v; | ||
| 182 | |||
| 183 | v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); | ||
| 184 | v &= AM33XX_LASTPOWERSTATEENTERED_MASK; | ||
| 185 | v >>= AM33XX_LASTPOWERSTATEENTERED_SHIFT; | ||
| 186 | |||
| 187 | return v; | ||
| 188 | } | ||
| 189 | |||
| 190 | static int am33xx_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) | 179 | static int am33xx_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) |
| 191 | { | 180 | { |
| 192 | am33xx_prm_rmw_reg_bits(AM33XX_LOWPOWERSTATECHANGE_MASK, | 181 | am33xx_prm_rmw_reg_bits(AM33XX_LOWPOWERSTATECHANGE_MASK, |
| @@ -357,7 +346,6 @@ struct pwrdm_ops am33xx_pwrdm_operations = { | |||
| 357 | .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, | 346 | .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, |
| 358 | .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, | 347 | .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, |
| 359 | .pwrdm_read_pwrst = am33xx_pwrdm_read_pwrst, | 348 | .pwrdm_read_pwrst = am33xx_pwrdm_read_pwrst, |
| 360 | .pwrdm_read_prev_pwrst = am33xx_pwrdm_read_prev_pwrst, | ||
| 361 | .pwrdm_set_logic_retst = am33xx_pwrdm_set_logic_retst, | 349 | .pwrdm_set_logic_retst = am33xx_pwrdm_set_logic_retst, |
| 362 | .pwrdm_read_logic_pwrst = am33xx_pwrdm_read_logic_pwrst, | 350 | .pwrdm_read_logic_pwrst = am33xx_pwrdm_read_logic_pwrst, |
| 363 | .pwrdm_read_logic_retst = am33xx_pwrdm_read_logic_retst, | 351 | .pwrdm_read_logic_retst = am33xx_pwrdm_read_logic_retst, |
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index fa5fd24f524c..22daf4efed68 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
| @@ -93,20 +93,13 @@ ENTRY(enable_omap3630_toggle_l2_on_restore) | |||
| 93 | ENDPROC(enable_omap3630_toggle_l2_on_restore) | 93 | ENDPROC(enable_omap3630_toggle_l2_on_restore) |
| 94 | 94 | ||
| 95 | /* | 95 | /* |
| 96 | * Function to call rom code to save secure ram context. This gets | 96 | * Function to call rom code to save secure ram context. |
| 97 | * relocated to SRAM, so it can be all in .data section. Otherwise | 97 | * |
| 98 | * we need to initialize api_params separately. | 98 | * r0 = physical address of the parameters |
| 99 | */ | 99 | */ |
| 100 | .data | ||
| 101 | .align 3 | ||
| 102 | ENTRY(save_secure_ram_context) | 100 | ENTRY(save_secure_ram_context) |
| 103 | stmfd sp!, {r4 - r11, lr} @ save registers on stack | 101 | stmfd sp!, {r4 - r11, lr} @ save registers on stack |
| 104 | adr r3, api_params @ r3 points to parameters | 102 | mov r3, r0 @ physical address of parameters |
| 105 | str r0, [r3,#0x4] @ r0 has sdram address | ||
| 106 | ldr r12, high_mask | ||
| 107 | and r3, r3, r12 | ||
| 108 | ldr r12, sram_phy_addr_mask | ||
| 109 | orr r3, r3, r12 | ||
| 110 | mov r0, #25 @ set service ID for PPA | 103 | mov r0, #25 @ set service ID for PPA |
| 111 | mov r12, r0 @ copy secure service ID in r12 | 104 | mov r12, r0 @ copy secure service ID in r12 |
| 112 | mov r1, #0 @ set task id for ROM code in r1 | 105 | mov r1, #0 @ set task id for ROM code in r1 |
| @@ -120,18 +113,7 @@ ENTRY(save_secure_ram_context) | |||
| 120 | nop | 113 | nop |
| 121 | nop | 114 | nop |
| 122 | ldmfd sp!, {r4 - r11, pc} | 115 | ldmfd sp!, {r4 - r11, pc} |
| 123 | .align | ||
| 124 | sram_phy_addr_mask: | ||
| 125 | .word SRAM_BASE_P | ||
| 126 | high_mask: | ||
| 127 | .word 0xffff | ||
| 128 | api_params: | ||
| 129 | .word 0x4, 0x0, 0x0, 0x1, 0x1 | ||
| 130 | ENDPROC(save_secure_ram_context) | 116 | ENDPROC(save_secure_ram_context) |
| 131 | ENTRY(save_secure_ram_context_sz) | ||
| 132 | .word . - save_secure_ram_context | ||
| 133 | |||
| 134 | .text | ||
| 135 | 117 | ||
| 136 | /* | 118 | /* |
| 137 | * ====================== | 119 | * ====================== |
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile index d7c22d51bc50..4aa50b9b26bc 100644 --- a/arch/arm64/boot/dts/Makefile +++ b/arch/arm64/boot/dts/Makefile | |||
| @@ -12,6 +12,7 @@ subdir-y += cavium | |||
| 12 | subdir-y += exynos | 12 | subdir-y += exynos |
| 13 | subdir-y += freescale | 13 | subdir-y += freescale |
| 14 | subdir-y += hisilicon | 14 | subdir-y += hisilicon |
| 15 | subdir-y += lg | ||
| 15 | subdir-y += marvell | 16 | subdir-y += marvell |
| 16 | subdir-y += mediatek | 17 | subdir-y += mediatek |
| 17 | subdir-y += nvidia | 18 | subdir-y += nvidia |
| @@ -22,5 +23,4 @@ subdir-y += rockchip | |||
| 22 | subdir-y += socionext | 23 | subdir-y += socionext |
| 23 | subdir-y += sprd | 24 | subdir-y += sprd |
| 24 | subdir-y += xilinx | 25 | subdir-y += xilinx |
| 25 | subdir-y += lg | ||
| 26 | subdir-y += zte | 26 | subdir-y += zte |
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts index dd7193acc7df..6bdefb26b329 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | ðsc { | 42 | ðsc { |
| 43 | interrupt-parent = <&gpio>; | ||
| 44 | interrupts = <0 8>; | 43 | interrupts = <0 8>; |
| 45 | }; | 44 | }; |
| 46 | 45 | ||
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts index d99e3731358c..254d6795c67e 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | ðsc { | 42 | ðsc { |
| 43 | interrupt-parent = <&gpio>; | ||
| 44 | interrupts = <0 8>; | 43 | interrupts = <0 8>; |
| 45 | }; | 44 | }; |
| 46 | 45 | ||
diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts index 864feeb35180..f9f06fcfb94a 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | |||
| @@ -38,8 +38,7 @@ | |||
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | ðsc { | 40 | ðsc { |
| 41 | interrupt-parent = <&gpio>; | 41 | interrupts = <4 8>; |
| 42 | interrupts = <0 8>; | ||
| 43 | }; | 42 | }; |
| 44 | 43 | ||
| 45 | &serial0 { | 44 | &serial0 { |
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index dfb373c8ba2a..7da9f1b83ebe 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 29 | 29 | ||
| 30 | #include <linux/bitmap.h> | 30 | #include <linux/bitmap.h> |
| 31 | #include <linux/bitfield.h> | ||
| 32 | #include <linux/device.h> | 31 | #include <linux/device.h> |
| 33 | #include <linux/err.h> | 32 | #include <linux/err.h> |
| 34 | #include <linux/export.h> | 33 | #include <linux/export.h> |
| @@ -73,13 +72,21 @@ | |||
| 73 | 72 | ||
| 74 | #define MAX_DVFS_DOMAINS 8 | 73 | #define MAX_DVFS_DOMAINS 8 |
| 75 | #define MAX_DVFS_OPPS 16 | 74 | #define MAX_DVFS_OPPS 16 |
| 76 | 75 | #define DVFS_LATENCY(hdr) (le32_to_cpu(hdr) >> 16) | |
| 77 | #define PROTO_REV_MAJOR_MASK GENMASK(31, 16) | 76 | #define DVFS_OPP_COUNT(hdr) ((le32_to_cpu(hdr) >> 8) & 0xff) |
| 78 | #define PROTO_REV_MINOR_MASK GENMASK(15, 0) | 77 | |
| 79 | 78 | #define PROTOCOL_REV_MINOR_BITS 16 | |
| 80 | #define FW_REV_MAJOR_MASK GENMASK(31, 24) | 79 | #define PROTOCOL_REV_MINOR_MASK ((1U << PROTOCOL_REV_MINOR_BITS) - 1) |
| 81 | #define FW_REV_MINOR_MASK GENMASK(23, 16) | 80 | #define PROTOCOL_REV_MAJOR(x) ((x) >> PROTOCOL_REV_MINOR_BITS) |
| 82 | #define FW_REV_PATCH_MASK GENMASK(15, 0) | 81 | #define PROTOCOL_REV_MINOR(x) ((x) & PROTOCOL_REV_MINOR_MASK) |
| 82 | |||
| 83 | #define FW_REV_MAJOR_BITS 24 | ||
| 84 | #define FW_REV_MINOR_BITS 16 | ||
| 85 | #define FW_REV_PATCH_MASK ((1U << FW_REV_MINOR_BITS) - 1) | ||
| 86 | #define FW_REV_MINOR_MASK ((1U << FW_REV_MAJOR_BITS) - 1) | ||
| 87 | #define FW_REV_MAJOR(x) ((x) >> FW_REV_MAJOR_BITS) | ||
| 88 | #define FW_REV_MINOR(x) (((x) & FW_REV_MINOR_MASK) >> FW_REV_MINOR_BITS) | ||
| 89 | #define FW_REV_PATCH(x) ((x) & FW_REV_PATCH_MASK) | ||
| 83 | 90 | ||
| 84 | #define MAX_RX_TIMEOUT (msecs_to_jiffies(30)) | 91 | #define MAX_RX_TIMEOUT (msecs_to_jiffies(30)) |
| 85 | 92 | ||
| @@ -304,6 +311,10 @@ struct clk_get_info { | |||
| 304 | u8 name[20]; | 311 | u8 name[20]; |
| 305 | } __packed; | 312 | } __packed; |
| 306 | 313 | ||
| 314 | struct clk_get_value { | ||
| 315 | __le32 rate; | ||
| 316 | } __packed; | ||
| 317 | |||
| 307 | struct clk_set_value { | 318 | struct clk_set_value { |
| 308 | __le16 id; | 319 | __le16 id; |
| 309 | __le16 reserved; | 320 | __le16 reserved; |
| @@ -317,9 +328,7 @@ struct legacy_clk_set_value { | |||
| 317 | } __packed; | 328 | } __packed; |
| 318 | 329 | ||
| 319 | struct dvfs_info { | 330 | struct dvfs_info { |
| 320 | u8 domain; | 331 | __le32 header; |
| 321 | u8 opp_count; | ||
| 322 | __le16 latency; | ||
| 323 | struct { | 332 | struct { |
| 324 | __le32 freq; | 333 | __le32 freq; |
| 325 | __le32 m_volt; | 334 | __le32 m_volt; |
| @@ -342,6 +351,11 @@ struct _scpi_sensor_info { | |||
| 342 | char name[20]; | 351 | char name[20]; |
| 343 | }; | 352 | }; |
| 344 | 353 | ||
| 354 | struct sensor_value { | ||
| 355 | __le32 lo_val; | ||
| 356 | __le32 hi_val; | ||
| 357 | } __packed; | ||
| 358 | |||
| 345 | struct dev_pstate_set { | 359 | struct dev_pstate_set { |
| 346 | __le16 dev_id; | 360 | __le16 dev_id; |
| 347 | u8 pstate; | 361 | u8 pstate; |
| @@ -405,20 +419,19 @@ static void scpi_process_cmd(struct scpi_chan *ch, u32 cmd) | |||
| 405 | unsigned int len; | 419 | unsigned int len; |
| 406 | 420 | ||
| 407 | if (scpi_info->is_legacy) { | 421 | if (scpi_info->is_legacy) { |
| 408 | struct legacy_scpi_shared_mem __iomem *mem = | 422 | struct legacy_scpi_shared_mem *mem = ch->rx_payload; |
| 409 | ch->rx_payload; | ||
| 410 | 423 | ||
| 411 | /* RX Length is not replied by the legacy Firmware */ | 424 | /* RX Length is not replied by the legacy Firmware */ |
| 412 | len = match->rx_len; | 425 | len = match->rx_len; |
| 413 | 426 | ||
| 414 | match->status = ioread32(&mem->status); | 427 | match->status = le32_to_cpu(mem->status); |
| 415 | memcpy_fromio(match->rx_buf, mem->payload, len); | 428 | memcpy_fromio(match->rx_buf, mem->payload, len); |
| 416 | } else { | 429 | } else { |
| 417 | struct scpi_shared_mem __iomem *mem = ch->rx_payload; | 430 | struct scpi_shared_mem *mem = ch->rx_payload; |
| 418 | 431 | ||
| 419 | len = min(match->rx_len, CMD_SIZE(cmd)); | 432 | len = min(match->rx_len, CMD_SIZE(cmd)); |
| 420 | 433 | ||
| 421 | match->status = ioread32(&mem->status); | 434 | match->status = le32_to_cpu(mem->status); |
| 422 | memcpy_fromio(match->rx_buf, mem->payload, len); | 435 | memcpy_fromio(match->rx_buf, mem->payload, len); |
| 423 | } | 436 | } |
| 424 | 437 | ||
| @@ -432,11 +445,11 @@ static void scpi_process_cmd(struct scpi_chan *ch, u32 cmd) | |||
| 432 | static void scpi_handle_remote_msg(struct mbox_client *c, void *msg) | 445 | static void scpi_handle_remote_msg(struct mbox_client *c, void *msg) |
| 433 | { | 446 | { |
| 434 | struct scpi_chan *ch = container_of(c, struct scpi_chan, cl); | 447 | struct scpi_chan *ch = container_of(c, struct scpi_chan, cl); |
| 435 | struct scpi_shared_mem __iomem *mem = ch->rx_payload; | 448 | struct scpi_shared_mem *mem = ch->rx_payload; |
| 436 | u32 cmd = 0; | 449 | u32 cmd = 0; |
| 437 | 450 | ||
| 438 | if (!scpi_info->is_legacy) | 451 | if (!scpi_info->is_legacy) |
| 439 | cmd = ioread32(&mem->command); | 452 | cmd = le32_to_cpu(mem->command); |
| 440 | 453 | ||
| 441 | scpi_process_cmd(ch, cmd); | 454 | scpi_process_cmd(ch, cmd); |
| 442 | } | 455 | } |
| @@ -446,7 +459,7 @@ static void scpi_tx_prepare(struct mbox_client *c, void *msg) | |||
| 446 | unsigned long flags; | 459 | unsigned long flags; |
| 447 | struct scpi_xfer *t = msg; | 460 | struct scpi_xfer *t = msg; |
| 448 | struct scpi_chan *ch = container_of(c, struct scpi_chan, cl); | 461 | struct scpi_chan *ch = container_of(c, struct scpi_chan, cl); |
| 449 | struct scpi_shared_mem __iomem *mem = ch->tx_payload; | 462 | struct scpi_shared_mem *mem = (struct scpi_shared_mem *)ch->tx_payload; |
| 450 | 463 | ||
| 451 | if (t->tx_buf) { | 464 | if (t->tx_buf) { |
| 452 | if (scpi_info->is_legacy) | 465 | if (scpi_info->is_legacy) |
| @@ -465,7 +478,7 @@ static void scpi_tx_prepare(struct mbox_client *c, void *msg) | |||
| 465 | } | 478 | } |
| 466 | 479 | ||
| 467 | if (!scpi_info->is_legacy) | 480 | if (!scpi_info->is_legacy) |
| 468 | iowrite32(t->cmd, &mem->command); | 481 | mem->command = cpu_to_le32(t->cmd); |
| 469 | } | 482 | } |
| 470 | 483 | ||
| 471 | static struct scpi_xfer *get_scpi_xfer(struct scpi_chan *ch) | 484 | static struct scpi_xfer *get_scpi_xfer(struct scpi_chan *ch) |
| @@ -570,13 +583,13 @@ scpi_clk_get_range(u16 clk_id, unsigned long *min, unsigned long *max) | |||
| 570 | static unsigned long scpi_clk_get_val(u16 clk_id) | 583 | static unsigned long scpi_clk_get_val(u16 clk_id) |
| 571 | { | 584 | { |
| 572 | int ret; | 585 | int ret; |
| 573 | __le32 rate; | 586 | struct clk_get_value clk; |
| 574 | __le16 le_clk_id = cpu_to_le16(clk_id); | 587 | __le16 le_clk_id = cpu_to_le16(clk_id); |
| 575 | 588 | ||
| 576 | ret = scpi_send_message(CMD_GET_CLOCK_VALUE, &le_clk_id, | 589 | ret = scpi_send_message(CMD_GET_CLOCK_VALUE, &le_clk_id, |
| 577 | sizeof(le_clk_id), &rate, sizeof(rate)); | 590 | sizeof(le_clk_id), &clk, sizeof(clk)); |
| 578 | 591 | ||
| 579 | return ret ? ret : le32_to_cpu(rate); | 592 | return ret ? ret : le32_to_cpu(clk.rate); |
| 580 | } | 593 | } |
| 581 | 594 | ||
| 582 | static int scpi_clk_set_val(u16 clk_id, unsigned long rate) | 595 | static int scpi_clk_set_val(u16 clk_id, unsigned long rate) |
| @@ -632,34 +645,34 @@ static int opp_cmp_func(const void *opp1, const void *opp2) | |||
| 632 | 645 | ||
| 633 | static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain) | 646 | static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain) |
| 634 | { | 647 | { |
| 635 | if (domain >= MAX_DVFS_DOMAINS) | ||
| 636 | return ERR_PTR(-EINVAL); | ||
| 637 | |||
| 638 | return scpi_info->dvfs[domain] ?: ERR_PTR(-EINVAL); | ||
| 639 | } | ||
| 640 | |||
| 641 | static int scpi_dvfs_populate_info(struct device *dev, u8 domain) | ||
| 642 | { | ||
| 643 | struct scpi_dvfs_info *info; | 648 | struct scpi_dvfs_info *info; |
| 644 | struct scpi_opp *opp; | 649 | struct scpi_opp *opp; |
| 645 | struct dvfs_info buf; | 650 | struct dvfs_info buf; |
| 646 | int ret, i; | 651 | int ret, i; |
| 647 | 652 | ||
| 653 | if (domain >= MAX_DVFS_DOMAINS) | ||
| 654 | return ERR_PTR(-EINVAL); | ||
| 655 | |||
| 656 | if (scpi_info->dvfs[domain]) /* data already populated */ | ||
| 657 | return scpi_info->dvfs[domain]; | ||
| 658 | |||
| 648 | ret = scpi_send_message(CMD_GET_DVFS_INFO, &domain, sizeof(domain), | 659 | ret = scpi_send_message(CMD_GET_DVFS_INFO, &domain, sizeof(domain), |
| 649 | &buf, sizeof(buf)); | 660 | &buf, sizeof(buf)); |
| 650 | if (ret) | 661 | if (ret) |
| 651 | return ret; | 662 | return ERR_PTR(ret); |
| 652 | 663 | ||
| 653 | info = devm_kmalloc(dev, sizeof(*info), GFP_KERNEL); | 664 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
| 654 | if (!info) | 665 | if (!info) |
| 655 | return -ENOMEM; | 666 | return ERR_PTR(-ENOMEM); |
| 656 | 667 | ||
| 657 | info->count = buf.opp_count; | 668 | info->count = DVFS_OPP_COUNT(buf.header); |
| 658 | info->latency = le16_to_cpu(buf.latency) * 1000; /* uS to nS */ | 669 | info->latency = DVFS_LATENCY(buf.header) * 1000; /* uS to nS */ |
| 659 | 670 | ||
| 660 | info->opps = devm_kcalloc(dev, info->count, sizeof(*opp), GFP_KERNEL); | 671 | info->opps = kcalloc(info->count, sizeof(*opp), GFP_KERNEL); |
| 661 | if (!info->opps) | 672 | if (!info->opps) { |
| 662 | return -ENOMEM; | 673 | kfree(info); |
| 674 | return ERR_PTR(-ENOMEM); | ||
| 675 | } | ||
| 663 | 676 | ||
| 664 | for (i = 0, opp = info->opps; i < info->count; i++, opp++) { | 677 | for (i = 0, opp = info->opps; i < info->count; i++, opp++) { |
| 665 | opp->freq = le32_to_cpu(buf.opps[i].freq); | 678 | opp->freq = le32_to_cpu(buf.opps[i].freq); |
| @@ -669,15 +682,7 @@ static int scpi_dvfs_populate_info(struct device *dev, u8 domain) | |||
| 669 | sort(info->opps, info->count, sizeof(*opp), opp_cmp_func, NULL); | 682 | sort(info->opps, info->count, sizeof(*opp), opp_cmp_func, NULL); |
| 670 | 683 | ||
| 671 | scpi_info->dvfs[domain] = info; | 684 | scpi_info->dvfs[domain] = info; |
| 672 | return 0; | 685 | return info; |
| 673 | } | ||
| 674 | |||
| 675 | static void scpi_dvfs_populate(struct device *dev) | ||
| 676 | { | ||
| 677 | int domain; | ||
| 678 | |||
| 679 | for (domain = 0; domain < MAX_DVFS_DOMAINS; domain++) | ||
| 680 | scpi_dvfs_populate_info(dev, domain); | ||
| 681 | } | 686 | } |
| 682 | 687 | ||
| 683 | static int scpi_dev_domain_id(struct device *dev) | 688 | static int scpi_dev_domain_id(struct device *dev) |
| @@ -708,6 +713,9 @@ static int scpi_dvfs_get_transition_latency(struct device *dev) | |||
| 708 | if (IS_ERR(info)) | 713 | if (IS_ERR(info)) |
| 709 | return PTR_ERR(info); | 714 | return PTR_ERR(info); |
| 710 | 715 | ||
| 716 | if (!info->latency) | ||
| 717 | return 0; | ||
| 718 | |||
| 711 | return info->latency; | 719 | return info->latency; |
| 712 | } | 720 | } |
| 713 | 721 | ||
| @@ -768,19 +776,20 @@ static int scpi_sensor_get_info(u16 sensor_id, struct scpi_sensor_info *info) | |||
| 768 | static int scpi_sensor_get_value(u16 sensor, u64 *val) | 776 | static int scpi_sensor_get_value(u16 sensor, u64 *val) |
| 769 | { | 777 | { |
| 770 | __le16 id = cpu_to_le16(sensor); | 778 | __le16 id = cpu_to_le16(sensor); |
| 771 | __le64 value; | 779 | struct sensor_value buf; |
| 772 | int ret; | 780 | int ret; |
| 773 | 781 | ||
| 774 | ret = scpi_send_message(CMD_SENSOR_VALUE, &id, sizeof(id), | 782 | ret = scpi_send_message(CMD_SENSOR_VALUE, &id, sizeof(id), |
| 775 | &value, sizeof(value)); | 783 | &buf, sizeof(buf)); |
| 776 | if (ret) | 784 | if (ret) |
| 777 | return ret; | 785 | return ret; |
| 778 | 786 | ||
| 779 | if (scpi_info->is_legacy) | 787 | if (scpi_info->is_legacy) |
| 780 | /* only 32-bits supported, upper 32 bits can be junk */ | 788 | /* only 32-bits supported, hi_val can be junk */ |
| 781 | *val = le32_to_cpup((__le32 *)&value); | 789 | *val = le32_to_cpu(buf.lo_val); |
| 782 | else | 790 | else |
| 783 | *val = le64_to_cpu(value); | 791 | *val = (u64)le32_to_cpu(buf.hi_val) << 32 | |
| 792 | le32_to_cpu(buf.lo_val); | ||
| 784 | 793 | ||
| 785 | return 0; | 794 | return 0; |
| 786 | } | 795 | } |
| @@ -853,19 +862,23 @@ static int scpi_init_versions(struct scpi_drvinfo *info) | |||
| 853 | static ssize_t protocol_version_show(struct device *dev, | 862 | static ssize_t protocol_version_show(struct device *dev, |
| 854 | struct device_attribute *attr, char *buf) | 863 | struct device_attribute *attr, char *buf) |
| 855 | { | 864 | { |
| 856 | return sprintf(buf, "%lu.%lu\n", | 865 | struct scpi_drvinfo *scpi_info = dev_get_drvdata(dev); |
| 857 | FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), | 866 | |
| 858 | FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version)); | 867 | return sprintf(buf, "%d.%d\n", |
| 868 | PROTOCOL_REV_MAJOR(scpi_info->protocol_version), | ||
| 869 | PROTOCOL_REV_MINOR(scpi_info->protocol_version)); | ||
| 859 | } | 870 | } |
| 860 | static DEVICE_ATTR_RO(protocol_version); | 871 | static DEVICE_ATTR_RO(protocol_version); |
| 861 | 872 | ||
| 862 | static ssize_t firmware_version_show(struct device *dev, | 873 | static ssize_t firmware_version_show(struct device *dev, |
| 863 | struct device_attribute *attr, char *buf) | 874 | struct device_attribute *attr, char *buf) |
| 864 | { | 875 | { |
| 865 | return sprintf(buf, "%lu.%lu.%lu\n", | 876 | struct scpi_drvinfo *scpi_info = dev_get_drvdata(dev); |
| 866 | FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), | 877 | |
| 867 | FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), | 878 | return sprintf(buf, "%d.%d.%d\n", |
| 868 | FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version)); | 879 | FW_REV_MAJOR(scpi_info->firmware_version), |
| 880 | FW_REV_MINOR(scpi_info->firmware_version), | ||
| 881 | FW_REV_PATCH(scpi_info->firmware_version)); | ||
| 869 | } | 882 | } |
| 870 | static DEVICE_ATTR_RO(firmware_version); | 883 | static DEVICE_ATTR_RO(firmware_version); |
| 871 | 884 | ||
| @@ -876,13 +889,39 @@ static struct attribute *versions_attrs[] = { | |||
| 876 | }; | 889 | }; |
| 877 | ATTRIBUTE_GROUPS(versions); | 890 | ATTRIBUTE_GROUPS(versions); |
| 878 | 891 | ||
| 879 | static void scpi_free_channels(void *data) | 892 | static void |
| 893 | scpi_free_channels(struct device *dev, struct scpi_chan *pchan, int count) | ||
| 880 | { | 894 | { |
| 881 | struct scpi_drvinfo *info = data; | ||
| 882 | int i; | 895 | int i; |
| 883 | 896 | ||
| 884 | for (i = 0; i < info->num_chans; i++) | 897 | for (i = 0; i < count && pchan->chan; i++, pchan++) { |
| 885 | mbox_free_channel(info->channels[i].chan); | 898 | mbox_free_channel(pchan->chan); |
| 899 | devm_kfree(dev, pchan->xfers); | ||
| 900 | devm_iounmap(dev, pchan->rx_payload); | ||
| 901 | } | ||
| 902 | } | ||
| 903 | |||
| 904 | static int scpi_remove(struct platform_device *pdev) | ||
| 905 | { | ||
| 906 | int i; | ||
| 907 | struct device *dev = &pdev->dev; | ||
| 908 | struct scpi_drvinfo *info = platform_get_drvdata(pdev); | ||
| 909 | |||
| 910 | scpi_info = NULL; /* stop exporting SCPI ops through get_scpi_ops */ | ||
| 911 | |||
| 912 | of_platform_depopulate(dev); | ||
| 913 | sysfs_remove_groups(&dev->kobj, versions_groups); | ||
| 914 | scpi_free_channels(dev, info->channels, info->num_chans); | ||
| 915 | platform_set_drvdata(pdev, NULL); | ||
| 916 | |||
| 917 | for (i = 0; i < MAX_DVFS_DOMAINS && info->dvfs[i]; i++) { | ||
| 918 | kfree(info->dvfs[i]->opps); | ||
| 919 | kfree(info->dvfs[i]); | ||
| 920 | } | ||
| 921 | devm_kfree(dev, info->channels); | ||
| 922 | devm_kfree(dev, info); | ||
| 923 | |||
| 924 | return 0; | ||
| 886 | } | 925 | } |
| 887 | 926 | ||
| 888 | #define MAX_SCPI_XFERS 10 | 927 | #define MAX_SCPI_XFERS 10 |
| @@ -913,6 +952,7 @@ static int scpi_probe(struct platform_device *pdev) | |||
| 913 | { | 952 | { |
| 914 | int count, idx, ret; | 953 | int count, idx, ret; |
| 915 | struct resource res; | 954 | struct resource res; |
| 955 | struct scpi_chan *scpi_chan; | ||
| 916 | struct device *dev = &pdev->dev; | 956 | struct device *dev = &pdev->dev; |
| 917 | struct device_node *np = dev->of_node; | 957 | struct device_node *np = dev->of_node; |
| 918 | 958 | ||
| @@ -929,19 +969,13 @@ static int scpi_probe(struct platform_device *pdev) | |||
| 929 | return -ENODEV; | 969 | return -ENODEV; |
| 930 | } | 970 | } |
| 931 | 971 | ||
| 932 | scpi_info->channels = devm_kcalloc(dev, count, sizeof(struct scpi_chan), | 972 | scpi_chan = devm_kcalloc(dev, count, sizeof(*scpi_chan), GFP_KERNEL); |
| 933 | GFP_KERNEL); | 973 | if (!scpi_chan) |
| 934 | if (!scpi_info->channels) | ||
| 935 | return -ENOMEM; | 974 | return -ENOMEM; |
| 936 | 975 | ||
| 937 | ret = devm_add_action(dev, scpi_free_channels, scpi_info); | 976 | for (idx = 0; idx < count; idx++) { |
| 938 | if (ret) | ||
| 939 | return ret; | ||
| 940 | |||
| 941 | for (; scpi_info->num_chans < count; scpi_info->num_chans++) { | ||
| 942 | resource_size_t size; | 977 | resource_size_t size; |
| 943 | int idx = scpi_info->num_chans; | 978 | struct scpi_chan *pchan = scpi_chan + idx; |
| 944 | struct scpi_chan *pchan = scpi_info->channels + idx; | ||
| 945 | struct mbox_client *cl = &pchan->cl; | 979 | struct mbox_client *cl = &pchan->cl; |
| 946 | struct device_node *shmem = of_parse_phandle(np, "shmem", idx); | 980 | struct device_node *shmem = of_parse_phandle(np, "shmem", idx); |
| 947 | 981 | ||
| @@ -949,14 +983,15 @@ static int scpi_probe(struct platform_device *pdev) | |||
| 949 | of_node_put(shmem); | 983 | of_node_put(shmem); |
| 950 | if (ret) { | 984 | if (ret) { |
| 951 | dev_err(dev, "failed to get SCPI payload mem resource\n"); | 985 | dev_err(dev, "failed to get SCPI payload mem resource\n"); |
| 952 | return ret; | 986 | goto err; |
| 953 | } | 987 | } |
| 954 | 988 | ||
| 955 | size = resource_size(&res); | 989 | size = resource_size(&res); |
| 956 | pchan->rx_payload = devm_ioremap(dev, res.start, size); | 990 | pchan->rx_payload = devm_ioremap(dev, res.start, size); |
| 957 | if (!pchan->rx_payload) { | 991 | if (!pchan->rx_payload) { |
| 958 | dev_err(dev, "failed to ioremap SCPI payload\n"); | 992 | dev_err(dev, "failed to ioremap SCPI payload\n"); |
| 959 | return -EADDRNOTAVAIL; | 993 | ret = -EADDRNOTAVAIL; |
| 994 | goto err; | ||
| 960 | } | 995 | } |
| 961 | pchan->tx_payload = pchan->rx_payload + (size >> 1); | 996 | pchan->tx_payload = pchan->rx_payload + (size >> 1); |
| 962 | 997 | ||
| @@ -982,11 +1017,17 @@ static int scpi_probe(struct platform_device *pdev) | |||
| 982 | dev_err(dev, "failed to get channel%d err %d\n", | 1017 | dev_err(dev, "failed to get channel%d err %d\n", |
| 983 | idx, ret); | 1018 | idx, ret); |
| 984 | } | 1019 | } |
| 1020 | err: | ||
| 1021 | scpi_free_channels(dev, scpi_chan, idx); | ||
| 1022 | scpi_info = NULL; | ||
| 985 | return ret; | 1023 | return ret; |
| 986 | } | 1024 | } |
| 987 | 1025 | ||
| 1026 | scpi_info->channels = scpi_chan; | ||
| 1027 | scpi_info->num_chans = count; | ||
| 988 | scpi_info->commands = scpi_std_commands; | 1028 | scpi_info->commands = scpi_std_commands; |
| 989 | scpi_info->scpi_ops = &scpi_ops; | 1029 | |
| 1030 | platform_set_drvdata(pdev, scpi_info); | ||
| 990 | 1031 | ||
| 991 | if (scpi_info->is_legacy) { | 1032 | if (scpi_info->is_legacy) { |
| 992 | /* Replace with legacy variants */ | 1033 | /* Replace with legacy variants */ |
| @@ -1002,23 +1043,23 @@ static int scpi_probe(struct platform_device *pdev) | |||
| 1002 | ret = scpi_init_versions(scpi_info); | 1043 | ret = scpi_init_versions(scpi_info); |
| 1003 | if (ret) { | 1044 | if (ret) { |
| 1004 | dev_err(dev, "incorrect or no SCP firmware found\n"); | 1045 | dev_err(dev, "incorrect or no SCP firmware found\n"); |
| 1046 | scpi_remove(pdev); | ||
| 1005 | return ret; | 1047 | return ret; |
| 1006 | } | 1048 | } |
| 1007 | 1049 | ||
| 1008 | scpi_dvfs_populate(dev); | 1050 | _dev_info(dev, "SCP Protocol %d.%d Firmware %d.%d.%d version\n", |
| 1009 | 1051 | PROTOCOL_REV_MAJOR(scpi_info->protocol_version), | |
| 1010 | _dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n", | 1052 | PROTOCOL_REV_MINOR(scpi_info->protocol_version), |
| 1011 | FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), | 1053 | FW_REV_MAJOR(scpi_info->firmware_version), |
| 1012 | FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version), | 1054 | FW_REV_MINOR(scpi_info->firmware_version), |
| 1013 | FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), | 1055 | FW_REV_PATCH(scpi_info->firmware_version)); |
| 1014 | FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), | 1056 | scpi_info->scpi_ops = &scpi_ops; |
| 1015 | FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version)); | ||
| 1016 | 1057 | ||
| 1017 | ret = devm_device_add_groups(dev, versions_groups); | 1058 | ret = sysfs_create_groups(&dev->kobj, versions_groups); |
| 1018 | if (ret) | 1059 | if (ret) |
| 1019 | dev_err(dev, "unable to create sysfs version group\n"); | 1060 | dev_err(dev, "unable to create sysfs version group\n"); |
| 1020 | 1061 | ||
| 1021 | return devm_of_platform_populate(dev); | 1062 | return of_platform_populate(dev->of_node, NULL, NULL, dev); |
| 1022 | } | 1063 | } |
| 1023 | 1064 | ||
| 1024 | static const struct of_device_id scpi_of_match[] = { | 1065 | static const struct of_device_id scpi_of_match[] = { |
| @@ -1035,6 +1076,7 @@ static struct platform_driver scpi_driver = { | |||
| 1035 | .of_match_table = scpi_of_match, | 1076 | .of_match_table = scpi_of_match, |
| 1036 | }, | 1077 | }, |
| 1037 | .probe = scpi_probe, | 1078 | .probe = scpi_probe, |
| 1079 | .remove = scpi_remove, | ||
| 1038 | }; | 1080 | }; |
| 1039 | module_platform_driver(scpi_driver); | 1081 | module_platform_driver(scpi_driver); |
| 1040 | 1082 | ||
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 7952357df9c8..edb6e4e9ef3a 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c | |||
| @@ -590,7 +590,6 @@ static int __init optee_driver_init(void) | |||
| 590 | return -ENODEV; | 590 | return -ENODEV; |
| 591 | 591 | ||
| 592 | np = of_find_matching_node(fw_np, optee_match); | 592 | np = of_find_matching_node(fw_np, optee_match); |
| 593 | of_node_put(fw_np); | ||
| 594 | if (!np) | 593 | if (!np) |
| 595 | return -ENODEV; | 594 | return -ENODEV; |
| 596 | 595 | ||
