aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-15 18:01:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-15 18:01:33 -0500
commit83660b734bbbae4f15c1a9b14d0514d74f79dfd4 (patch)
treea1545fb6a23ae103f4e8d8d91e65fa65f2ba1fed
parentca033390a537dacdc2127c66d62e7862ad15ffdb (diff)
parent31fd8f5b89f22a88940a9838dfd1564f3d440247 (diff)
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Kevin Hilman: "A collection of ARM SoC fixes for v3.14-rc1. Mostly a collection of Kconfig, device tree data and compilation fixes along with fix to drivers/phy that fixes a boot regression on some Marvell mvebu platforms" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: dma: mv_xor: Silence a bunch of LPAE-related warnings ARM: ux500: disable msp2 device tree node ARM: zynq: Reserve not DMAable space in front of the kernel ARM: multi_v7_defconfig: Select CONFIG_SOC_DRA7XX ARM: imx6: Initialize low-power mode early again ARM: pxa: fix various compilation problems ARM: pxa: fix compilation problem on AM300EPD board ARM: at91: add Atmel's SAMA5D3 Xplained board spi/atmel: document clock properties mmc: atmel-mci: document clock properties ARM: at91: enable USB host on at91sam9n12ek board ARM: at91/dt: fix sama5d3 ohci hclk clock reference ARM: at91/dt: sam9263: fix compatibility string for the I2C ata: sata_mv: Fix probe failures with optional phys drivers: phy: Add support for optional phys drivers: phy: Make NULL a valid phy reference ARM: fix HAVE_ARM_TWD selection for OMAP and shmobile ARM: moxart: move DMA_OF selection to driver ARM: hisi: fix kconfig warning on HAVE_ARM_TWD
-rw-r--r--Documentation/devicetree/bindings/mmc/atmel-hsmci.txt5
-rw-r--r--Documentation/devicetree/bindings/spi/spi_atmel.txt5
-rw-r--r--Documentation/phy.txt26
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/at91-sama5d3_xplained.dts229
-rw-r--r--arch/arm/boot/dts/at91sam9263.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9n12ek.dts4
-rw-r--r--arch/arm/boot/dts/sama5d3.dtsi2
-rw-r--r--arch/arm/boot/dts/ste-href.dtsi1
-rw-r--r--arch/arm/configs/multi_v7_defconfig1
-rw-r--r--arch/arm/mach-hisi/Kconfig2
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c3
-rw-r--r--arch/arm/mach-imx/clk-imx6sl.c3
-rw-r--r--arch/arm/mach-imx/pm-imx6q.c2
-rw-r--r--arch/arm/mach-moxart/Kconfig1
-rw-r--r--arch/arm/mach-omap2/Kconfig2
-rw-r--r--arch/arm/mach-pxa/am300epd.c1
-rw-r--r--arch/arm/mach-pxa/include/mach/balloon3.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/corgi.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/csb726.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/gumstix.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/idp.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/palmld.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmt5.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtc.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtx.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/pcm027.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/pcm990_baseboard.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/poodle.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/spitz.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/tosa.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/trizeps4.h2
-rw-r--r--arch/arm/mach-shmobile/Kconfig2
-rw-r--r--arch/arm/mach-zynq/common.c14
-rw-r--r--drivers/ata/sata_mv.c8
-rw-r--r--drivers/dma/Kconfig1
-rw-r--r--drivers/dma/mv_xor.c24
-rw-r--r--drivers/phy/phy-core.c62
-rw-r--r--include/linux/phy/phy.h14
39 files changed, 408 insertions, 33 deletions
diff --git a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt
index 0a85c70cd30a..07ad02075a93 100644
--- a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt
+++ b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt
@@ -13,6 +13,9 @@ Required properties:
13- #address-cells: should be one. The cell is the slot id. 13- #address-cells: should be one. The cell is the slot id.
14- #size-cells: should be zero. 14- #size-cells: should be zero.
15- at least one slot node 15- at least one slot node
16- clock-names: tuple listing input clock names.
17 Required elements: "mci_clk"
18- clocks: phandles to input clocks.
16 19
17The node contains child nodes for each slot that the platform uses 20The node contains child nodes for each slot that the platform uses
18 21
@@ -24,6 +27,8 @@ mmc0: mmc@f0008000 {
24 interrupts = <12 4>; 27 interrupts = <12 4>;
25 #address-cells = <1>; 28 #address-cells = <1>;
26 #size-cells = <0>; 29 #size-cells = <0>;
30 clock-names = "mci_clk";
31 clocks = <&mci0_clk>;
27 32
28 [ child node definitions...] 33 [ child node definitions...]
29}; 34};
diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt b/Documentation/devicetree/bindings/spi/spi_atmel.txt
index 07e04cdc0c9e..4f8184d069cb 100644
--- a/Documentation/devicetree/bindings/spi/spi_atmel.txt
+++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt
@@ -5,6 +5,9 @@ Required properties:
5- reg: Address and length of the register set for the device 5- reg: Address and length of the register set for the device
6- interrupts: Should contain spi interrupt 6- interrupts: Should contain spi interrupt
7- cs-gpios: chipselects 7- cs-gpios: chipselects
8- clock-names: tuple listing input clock names.
9 Required elements: "spi_clk"
10- clocks: phandles to input clocks.
8 11
9Example: 12Example:
10 13
@@ -14,6 +17,8 @@ spi1: spi@fffcc000 {
14 interrupts = <13 4 5>; 17 interrupts = <13 4 5>;
15 #address-cells = <1>; 18 #address-cells = <1>;
16 #size-cells = <0>; 19 #size-cells = <0>;
20 clocks = <&spi1_clk>;
21 clock-names = "spi_clk";
17 cs-gpios = <&pioB 3 0>; 22 cs-gpios = <&pioB 3 0>;
18 status = "okay"; 23 status = "okay";
19 24
diff --git a/Documentation/phy.txt b/Documentation/phy.txt
index 0103e4b15b0e..ebff6ee52441 100644
--- a/Documentation/phy.txt
+++ b/Documentation/phy.txt
@@ -75,14 +75,26 @@ Before the controller can make use of the PHY, it has to get a reference to
75it. This framework provides the following APIs to get a reference to the PHY. 75it. This framework provides the following APIs to get a reference to the PHY.
76 76
77struct phy *phy_get(struct device *dev, const char *string); 77struct phy *phy_get(struct device *dev, const char *string);
78struct phy *phy_optional_get(struct device *dev, const char *string);
78struct phy *devm_phy_get(struct device *dev, const char *string); 79struct phy *devm_phy_get(struct device *dev, const char *string);
79 80struct phy *devm_phy_optional_get(struct device *dev, const char *string);
80phy_get and devm_phy_get can be used to get the PHY. In the case of dt boot, 81
81the string arguments should contain the phy name as given in the dt data and 82phy_get, phy_optional_get, devm_phy_get and devm_phy_optional_get can
82in the case of non-dt boot, it should contain the label of the PHY. 83be used to get the PHY. In the case of dt boot, the string arguments
83The only difference between the two APIs is that devm_phy_get associates the 84should contain the phy name as given in the dt data and in the case of
84device with the PHY using devres on successful PHY get. On driver detach, 85non-dt boot, it should contain the label of the PHY. The two
85release function is invoked on the the devres data and devres data is freed. 86devm_phy_get associates the device with the PHY using devres on
87successful PHY get. On driver detach, release function is invoked on
88the the devres data and devres data is freed. phy_optional_get and
89devm_phy_optional_get should be used when the phy is optional. These
90two functions will never return -ENODEV, but instead returns NULL when
91the phy cannot be found.
92
93It should be noted that NULL is a valid phy reference. All phy
94consumer calls on the NULL phy become NOPs. That is the release calls,
95the phy_init() and phy_exit() calls, and phy_power_on() and
96phy_power_off() calls are all NOP when applied to a NULL phy. The NULL
97phy is useful in devices for handling optional phy devices.
86 98
875. Releasing a reference to the PHY 995. Releasing a reference to the PHY
88 100
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index b9d6a8b485e0..6d1e43d46187 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -38,6 +38,7 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb
38dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb 38dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb
39dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb 39dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb
40# sama5d3 40# sama5d3
41dtb-$(CONFIG_ARCH_AT91) += at91-sama5d3_xplained.dtb
41dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb 42dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb
42dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb 43dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb
43dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb 44dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
new file mode 100644
index 000000000000..ce1375595e5f
--- /dev/null
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -0,0 +1,229 @@
1/*
2 * at91-sama5d3_xplained.dts - Device Tree file for the SAMA5D3 Xplained board
3 *
4 * Copyright (C) 2014 Atmel,
5 * 2014 Nicolas Ferre <nicolas.ferre@atmel.com>
6 *
7 * Licensed under GPLv2 or later.
8 */
9/dts-v1/;
10#include "sama5d36.dtsi"
11
12/ {
13 model = "SAMA5D3 Xplained";
14 compatible = "atmel,sama5d3-xplained", "atmel,sama5d3", "atmel,sama5";
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory {
21 reg = <0x20000000 0x10000000>;
22 };
23
24 ahb {
25 apb {
26 mmc0: mmc@f0000000 {
27 pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
28 status = "okay";
29 slot@0 {
30 reg = <0>;
31 bus-width = <8>;
32 cd-gpios = <&pioE 0 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 spi0: spi@f0004000 {
37 cs-gpios = <&pioD 13 0>;
38 status = "okay";
39 };
40
41 can0: can@f000c000 {
42 status = "okay";
43 };
44
45 i2c0: i2c@f0014000 {
46 status = "okay";
47 };
48
49 i2c1: i2c@f0018000 {
50 status = "okay";
51 };
52
53 macb0: ethernet@f0028000 {
54 phy-mode = "rgmii";
55 status = "okay";
56 };
57
58 usart0: serial@f001c000 {
59 status = "okay";
60 };
61
62 usart1: serial@f0020000 {
63 pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
64 status = "okay";
65 };
66
67 uart0: serial@f0024000 {
68 status = "okay";
69 };
70
71 mmc1: mmc@f8000000 {
72 pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
73 status = "okay";
74 slot@0 {
75 reg = <0>;
76 bus-width = <4>;
77 cd-gpios = <&pioE 1 GPIO_ACTIVE_HIGH>;
78 };
79 };
80
81 spi1: spi@f8008000 {
82 cs-gpios = <&pioC 25 0>, <0>, <0>, <&pioD 16 0>;
83 status = "okay";
84 };
85
86 adc0: adc@f8018000 {
87 pinctrl-0 = <
88 &pinctrl_adc0_adtrg
89 &pinctrl_adc0_ad0
90 &pinctrl_adc0_ad1
91 &pinctrl_adc0_ad2
92 &pinctrl_adc0_ad3
93 &pinctrl_adc0_ad4
94 &pinctrl_adc0_ad5
95 &pinctrl_adc0_ad6
96 &pinctrl_adc0_ad7
97 &pinctrl_adc0_ad8
98 &pinctrl_adc0_ad9
99 >;
100 status = "okay";
101 };
102
103 i2c2: i2c@f801c000 {
104 dmas = <0>, <0>; /* Do not use DMA for i2c2 */
105 status = "okay";
106 };
107
108 macb1: ethernet@f802c000 {
109 phy-mode = "rmii";
110 status = "okay";
111 };
112
113 dbgu: serial@ffffee00 {
114 status = "okay";
115 };
116
117 pinctrl@fffff200 {
118 board {
119 pinctrl_mmc0_cd: mmc0_cd {
120 atmel,pins =
121 <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
122 };
123
124 pinctrl_mmc1_cd: mmc1_cd {
125 atmel,pins =
126 <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
127 };
128
129 pinctrl_usba_vbus: usba_vbus {
130 atmel,pins =
131 <AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PE9, conflicts with A9 */
132 };
133 };
134 };
135
136 pmc: pmc@fffffc00 {
137 main: mainck {
138 clock-frequency = <12000000>;
139 };
140 };
141 };
142
143 nand0: nand@60000000 {
144 nand-bus-width = <8>;
145 nand-ecc-mode = "hw";
146 atmel,has-pmecc;
147 atmel,pmecc-cap = <4>;
148 atmel,pmecc-sector-size = <512>;
149 nand-on-flash-bbt;
150 status = "okay";
151
152 at91bootstrap@0 {
153 label = "at91bootstrap";
154 reg = <0x0 0x40000>;
155 };
156
157 bootloader@40000 {
158 label = "bootloader";
159 reg = <0x40000 0x80000>;
160 };
161
162 bootloaderenv@c0000 {
163 label = "bootloader env";
164 reg = <0xc0000 0xc0000>;
165 };
166
167 dtb@180000 {
168 label = "device tree";
169 reg = <0x180000 0x80000>;
170 };
171
172 kernel@200000 {
173 label = "kernel";
174 reg = <0x200000 0x600000>;
175 };
176
177 rootfs@800000 {
178 label = "rootfs";
179 reg = <0x800000 0x0f800000>;
180 };
181 };
182
183 usb0: gadget@00500000 {
184 atmel,vbus-gpio = <&pioE 9 GPIO_ACTIVE_HIGH>; /* PE9, conflicts with A9 */
185 pinctrl-names = "default";
186 pinctrl-0 = <&pinctrl_usba_vbus>;
187 status = "okay";
188 };
189
190 usb1: ohci@00600000 {
191 num-ports = <3>;
192 atmel,vbus-gpio = <0
193 &pioE 3 GPIO_ACTIVE_LOW
194 &pioE 4 GPIO_ACTIVE_LOW
195 >;
196 status = "okay";
197 };
198
199 usb2: ehci@00700000 {
200 status = "okay";
201 };
202 };
203
204 gpio_keys {
205 compatible = "gpio-keys";
206
207 bp3 {
208 label = "PB_USER";
209 gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
210 linux,code = <0x104>;
211 gpio-key,wakeup;
212 };
213 };
214
215 leds {
216 compatible = "gpio-leds";
217
218 d2 {
219 label = "d2";
220 gpios = <&pioE 23 GPIO_ACTIVE_LOW>; /* PE23, conflicts with A23, CTS2 */
221 linux,default-trigger = "heartbeat";
222 };
223
224 d3 {
225 label = "d3";
226 gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
227 };
228 };
229};
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index 0042f73068b0..fece8665fb63 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -523,7 +523,7 @@
523 }; 523 };
524 524
525 i2c0: i2c@fff88000 { 525 i2c0: i2c@fff88000 {
526 compatible = "atmel,at91sam9263-i2c"; 526 compatible = "atmel,at91sam9260-i2c";
527 reg = <0xfff88000 0x100>; 527 reg = <0xfff88000 0x100>;
528 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>; 528 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>;
529 #address-cells = <1>; 529 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index e9487f6f0166..924a6a6ffd0f 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -124,6 +124,10 @@
124 nand-on-flash-bbt; 124 nand-on-flash-bbt;
125 status = "okay"; 125 status = "okay";
126 }; 126 };
127
128 usb0: ohci@00500000 {
129 status = "okay";
130 };
127 }; 131 };
128 132
129 leds { 133 leds {
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index 52447c17537a..3d5faf85f51b 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -1228,7 +1228,7 @@
1228 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 1228 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
1229 reg = <0x00600000 0x100000>; 1229 reg = <0x00600000 0x100000>;
1230 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; 1230 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
1231 clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, 1231 clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>,
1232 <&uhpck>; 1232 <&uhpck>;
1233 clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; 1233 clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
1234 status = "disabled"; 1234 status = "disabled";
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi
index 0c1e8d871ed1..6cb9b68e2188 100644
--- a/arch/arm/boot/dts/ste-href.dtsi
+++ b/arch/arm/boot/dts/ste-href.dtsi
@@ -188,7 +188,6 @@
188 msp2: msp@80117000 { 188 msp2: msp@80117000 {
189 pinctrl-names = "default"; 189 pinctrl-names = "default";
190 pinctrl-0 = <&msp2_default_mode>; 190 pinctrl-0 = <&msp2_default_mode>;
191 status = "okay";
192 }; 191 };
193 192
194 msp3: msp@80125000 { 193 msp3: msp@80125000 {
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 845bc745706b..ee6982976d66 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -29,6 +29,7 @@ CONFIG_ARCH_OMAP3=y
29CONFIG_ARCH_OMAP4=y 29CONFIG_ARCH_OMAP4=y
30CONFIG_SOC_OMAP5=y 30CONFIG_SOC_OMAP5=y
31CONFIG_SOC_AM33XX=y 31CONFIG_SOC_AM33XX=y
32CONFIG_SOC_DRA7XX=y
32CONFIG_SOC_AM43XX=y 33CONFIG_SOC_AM43XX=y
33CONFIG_ARCH_ROCKCHIP=y 34CONFIG_ARCH_ROCKCHIP=y
34CONFIG_ARCH_SOCFPGA=y 35CONFIG_ARCH_SOCFPGA=y
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 8f4649b301b2..1abae5f6a418 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -8,7 +8,7 @@ config ARCH_HI3xxx
8 select CLKSRC_OF 8 select CLKSRC_OF
9 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU 10 select HAVE_ARM_SCU
11 select HAVE_ARM_TWD 11 select HAVE_ARM_TWD if SMP
12 select HAVE_SMP 12 select HAVE_SMP
13 select PINCTRL 13 select PINCTRL
14 select PINCTRL_SINGLE 14 select PINCTRL_SINGLE
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index af2e582d2b74..4d677f442539 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -482,6 +482,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
482 if (IS_ENABLED(CONFIG_PCI_IMX6)) 482 if (IS_ENABLED(CONFIG_PCI_IMX6))
483 clk_set_parent(clk[lvds1_sel], clk[sata_ref]); 483 clk_set_parent(clk[lvds1_sel], clk[sata_ref]);
484 484
485 /* Set initial power mode */
486 imx6q_set_lpm(WAIT_CLOCKED);
487
485 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); 488 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
486 base = of_iomap(np, 0); 489 base = of_iomap(np, 0);
487 WARN_ON(!base); 490 WARN_ON(!base);
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
index 3781a1853998..4c86f3035205 100644
--- a/arch/arm/mach-imx/clk-imx6sl.c
+++ b/arch/arm/mach-imx/clk-imx6sl.c
@@ -266,6 +266,9 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
266 /* Audio-related clocks configuration */ 266 /* Audio-related clocks configuration */
267 clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]); 267 clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]);
268 268
269 /* Set initial power mode */
270 imx6q_set_lpm(WAIT_CLOCKED);
271
269 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); 272 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
270 base = of_iomap(np, 0); 273 base = of_iomap(np, 0);
271 WARN_ON(!base); 274 WARN_ON(!base);
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index 9d47adc078aa..7a9b98589db7 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -236,8 +236,6 @@ void __init imx6q_pm_init(void)
236 regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT, 236 regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT,
237 IMX6Q_GPR1_GINT); 237 IMX6Q_GPR1_GINT);
238 238
239 /* Set initial power mode */
240 imx6q_set_lpm(WAIT_CLOCKED);
241 239
242 suspend_set_ops(&imx6q_pm_ops); 240 suspend_set_ops(&imx6q_pm_ops);
243} 241}
diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig
index ba470d64493b..3795ae28a613 100644
--- a/arch/arm/mach-moxart/Kconfig
+++ b/arch/arm/mach-moxart/Kconfig
@@ -2,7 +2,6 @@ config ARCH_MOXART
2 bool "MOXA ART SoC" if ARCH_MULTI_V4T 2 bool "MOXA ART SoC" if ARCH_MULTI_V4T
3 select CPU_FA526 3 select CPU_FA526
4 select ARM_DMA_MEM_BUFFERABLE 4 select ARM_DMA_MEM_BUFFERABLE
5 select DMA_OF
6 select USE_OF 5 select USE_OF
7 select CLKSRC_OF 6 select CLKSRC_OF
8 select CLKSRC_MMIO 7 select CLKSRC_MMIO
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 653b489479e0..e2ce4f8366a7 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -54,7 +54,7 @@ config SOC_OMAP5
54 select ARM_GIC 54 select ARM_GIC
55 select CPU_V7 55 select CPU_V7
56 select HAVE_ARM_SCU if SMP 56 select HAVE_ARM_SCU if SMP
57 select HAVE_ARM_TWD if LOCAL_TIMERS 57 select HAVE_ARM_TWD if SMP
58 select HAVE_SMP 58 select HAVE_SMP
59 select HAVE_ARM_ARCH_TIMER 59 select HAVE_ARM_ARCH_TIMER
60 select ARM_ERRATA_798181 if SMP 60 select ARM_ERRATA_798181 if SMP
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c
index c9f309ae88c5..8b90c4f2d430 100644
--- a/arch/arm/mach-pxa/am300epd.c
+++ b/arch/arm/mach-pxa/am300epd.c
@@ -30,6 +30,7 @@
30 30
31#include <mach/gumstix.h> 31#include <mach/gumstix.h>
32#include <mach/mfp-pxa25x.h> 32#include <mach/mfp-pxa25x.h>
33#include <mach/irqs.h>
33#include <linux/platform_data/video-pxafb.h> 34#include <linux/platform_data/video-pxafb.h>
34 35
35#include "generic.h" 36#include "generic.h"
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h
index 954641e6c8b1..1b0825911e62 100644
--- a/arch/arm/mach-pxa/include/mach/balloon3.h
+++ b/arch/arm/mach-pxa/include/mach/balloon3.h
@@ -14,6 +14,8 @@
14#ifndef ASM_ARCH_BALLOON3_H 14#ifndef ASM_ARCH_BALLOON3_H
15#define ASM_ARCH_BALLOON3_H 15#define ASM_ARCH_BALLOON3_H
16 16
17#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */
18
17enum balloon3_features { 19enum balloon3_features {
18 BALLOON3_FEATURE_OHCI, 20 BALLOON3_FEATURE_OHCI,
19 BALLOON3_FEATURE_MMC, 21 BALLOON3_FEATURE_MMC,
diff --git a/arch/arm/mach-pxa/include/mach/corgi.h b/arch/arm/mach-pxa/include/mach/corgi.h
index f3c3493b468d..c030d955bbd7 100644
--- a/arch/arm/mach-pxa/include/mach/corgi.h
+++ b/arch/arm/mach-pxa/include/mach/corgi.h
@@ -13,6 +13,7 @@
13#ifndef __ASM_ARCH_CORGI_H 13#ifndef __ASM_ARCH_CORGI_H
14#define __ASM_ARCH_CORGI_H 1 14#define __ASM_ARCH_CORGI_H 1
15 15
16#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */
16 17
17/* 18/*
18 * Corgi (Non Standard) GPIO Definitions 19 * Corgi (Non Standard) GPIO Definitions
diff --git a/arch/arm/mach-pxa/include/mach/csb726.h b/arch/arm/mach-pxa/include/mach/csb726.h
index 2628e7b72116..00cfbbbf73f7 100644
--- a/arch/arm/mach-pxa/include/mach/csb726.h
+++ b/arch/arm/mach-pxa/include/mach/csb726.h
@@ -11,6 +11,8 @@
11#ifndef CSB726_H 11#ifndef CSB726_H
12#define CSB726_H 12#define CSB726_H
13 13
14#include "irqs.h" /* PXA_GPIO_TO_IRQ */
15
14#define CSB726_GPIO_IRQ_LAN 52 16#define CSB726_GPIO_IRQ_LAN 52
15#define CSB726_GPIO_IRQ_SM501 53 17#define CSB726_GPIO_IRQ_SM501 53
16#define CSB726_GPIO_MMC_DETECT 100 18#define CSB726_GPIO_MMC_DETECT 100
diff --git a/arch/arm/mach-pxa/include/mach/gumstix.h b/arch/arm/mach-pxa/include/mach/gumstix.h
index dba14b6503ad..f7df27bbb42e 100644
--- a/arch/arm/mach-pxa/include/mach/gumstix.h
+++ b/arch/arm/mach-pxa/include/mach/gumstix.h
@@ -6,6 +6,7 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9#include "irqs.h" /* PXA_GPIO_TO_IRQ */
9 10
10/* BTRESET - Reset line to Bluetooth module, active low signal. */ 11/* BTRESET - Reset line to Bluetooth module, active low signal. */
11#define GPIO_GUMSTIX_BTRESET 7 12#define GPIO_GUMSTIX_BTRESET 7
diff --git a/arch/arm/mach-pxa/include/mach/idp.h b/arch/arm/mach-pxa/include/mach/idp.h
index 22a96f87232b..7e63f4680271 100644
--- a/arch/arm/mach-pxa/include/mach/idp.h
+++ b/arch/arm/mach-pxa/include/mach/idp.h
@@ -23,6 +23,7 @@
23 * IDP hardware. 23 * IDP hardware.
24 */ 24 */
25 25
26#include "irqs.h" /* PXA_GPIO_TO_IRQ */
26 27
27#define IDP_FLASH_PHYS (PXA_CS0_PHYS) 28#define IDP_FLASH_PHYS (PXA_CS0_PHYS)
28#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) 29#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS)
diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/include/mach/palmld.h
index 2c4471336570..b184f296023b 100644
--- a/arch/arm/mach-pxa/include/mach/palmld.h
+++ b/arch/arm/mach-pxa/include/mach/palmld.h
@@ -13,6 +13,8 @@
13#ifndef _INCLUDE_PALMLD_H_ 13#ifndef _INCLUDE_PALMLD_H_
14#define _INCLUDE_PALMLD_H_ 14#define _INCLUDE_PALMLD_H_
15 15
16#include "irqs.h" /* PXA_GPIO_TO_IRQ */
17
16/** HERE ARE GPIOs **/ 18/** HERE ARE GPIOs **/
17 19
18/* GPIOs */ 20/* GPIOs */
diff --git a/arch/arm/mach-pxa/include/mach/palmt5.h b/arch/arm/mach-pxa/include/mach/palmt5.h
index 0bd4f036c72f..e342c5921405 100644
--- a/arch/arm/mach-pxa/include/mach/palmt5.h
+++ b/arch/arm/mach-pxa/include/mach/palmt5.h
@@ -15,6 +15,8 @@
15#ifndef _INCLUDE_PALMT5_H_ 15#ifndef _INCLUDE_PALMT5_H_
16#define _INCLUDE_PALMT5_H_ 16#define _INCLUDE_PALMT5_H_
17 17
18#include "irqs.h" /* PXA_GPIO_TO_IRQ */
19
18/** HERE ARE GPIOs **/ 20/** HERE ARE GPIOs **/
19 21
20/* GPIOs */ 22/* GPIOs */
diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/include/mach/palmtc.h
index c383a21680b6..81c727b3cfd2 100644
--- a/arch/arm/mach-pxa/include/mach/palmtc.h
+++ b/arch/arm/mach-pxa/include/mach/palmtc.h
@@ -16,6 +16,8 @@
16#ifndef _INCLUDE_PALMTC_H_ 16#ifndef _INCLUDE_PALMTC_H_
17#define _INCLUDE_PALMTC_H_ 17#define _INCLUDE_PALMTC_H_
18 18
19#include "irqs.h" /* PXA_GPIO_TO_IRQ */
20
19/** HERE ARE GPIOs **/ 21/** HERE ARE GPIOs **/
20 22
21/* GPIOs */ 23/* GPIOs */
diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h
index f2e530380253..92bc1f05300d 100644
--- a/arch/arm/mach-pxa/include/mach/palmtx.h
+++ b/arch/arm/mach-pxa/include/mach/palmtx.h
@@ -16,6 +16,8 @@
16#ifndef _INCLUDE_PALMTX_H_ 16#ifndef _INCLUDE_PALMTX_H_
17#define _INCLUDE_PALMTX_H_ 17#define _INCLUDE_PALMTX_H_
18 18
19#include "irqs.h" /* PXA_GPIO_TO_IRQ */
20
19/** HERE ARE GPIOs **/ 21/** HERE ARE GPIOs **/
20 22
21/* GPIOs */ 23/* GPIOs */
diff --git a/arch/arm/mach-pxa/include/mach/pcm027.h b/arch/arm/mach-pxa/include/mach/pcm027.h
index 6bf28de228bd..86ebd7b6c960 100644
--- a/arch/arm/mach-pxa/include/mach/pcm027.h
+++ b/arch/arm/mach-pxa/include/mach/pcm027.h
@@ -23,6 +23,8 @@
23 * Definitions of CPU card resources only 23 * Definitions of CPU card resources only
24 */ 24 */
25 25
26#include "irqs.h" /* PXA_GPIO_TO_IRQ */
27
26/* phyCORE-PXA270 (PCM027) Interrupts */ 28/* phyCORE-PXA270 (PCM027) Interrupts */
27#define PCM027_IRQ(x) (IRQ_BOARD_START + (x)) 29#define PCM027_IRQ(x) (IRQ_BOARD_START + (x))
28#define PCM027_BTDET_IRQ PCM027_IRQ(0) 30#define PCM027_BTDET_IRQ PCM027_IRQ(0)
diff --git a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h
index 0260aaa2fc17..7e544c14967e 100644
--- a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h
+++ b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h
@@ -20,6 +20,7 @@
20 */ 20 */
21 21
22#include <mach/pcm027.h> 22#include <mach/pcm027.h>
23#include "irqs.h" /* PXA_GPIO_TO_IRQ */
23 24
24/* 25/*
25 * definitions relevant only when the PCM-990 26 * definitions relevant only when the PCM-990
diff --git a/arch/arm/mach-pxa/include/mach/poodle.h b/arch/arm/mach-pxa/include/mach/poodle.h
index f32ff75dcca8..b56b19351a03 100644
--- a/arch/arm/mach-pxa/include/mach/poodle.h
+++ b/arch/arm/mach-pxa/include/mach/poodle.h
@@ -15,6 +15,8 @@
15#ifndef __ASM_ARCH_POODLE_H 15#ifndef __ASM_ARCH_POODLE_H
16#define __ASM_ARCH_POODLE_H 1 16#define __ASM_ARCH_POODLE_H 1
17 17
18#include "irqs.h" /* PXA_GPIO_TO_IRQ */
19
18/* 20/*
19 * GPIOs 21 * GPIOs
20 */ 22 */
diff --git a/arch/arm/mach-pxa/include/mach/spitz.h b/arch/arm/mach-pxa/include/mach/spitz.h
index 0bfe6507c95d..25c9f62e46aa 100644
--- a/arch/arm/mach-pxa/include/mach/spitz.h
+++ b/arch/arm/mach-pxa/include/mach/spitz.h
@@ -15,8 +15,8 @@
15#define __ASM_ARCH_SPITZ_H 1 15#define __ASM_ARCH_SPITZ_H 1
16#endif 16#endif
17 17
18#include "irqs.h" /* PXA_NR_BUILTIN_GPIO, PXA_GPIO_TO_IRQ */
18#include <linux/fb.h> 19#include <linux/fb.h>
19#include <linux/gpio.h>
20 20
21/* Spitz/Akita GPIOs */ 21/* Spitz/Akita GPIOs */
22 22
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h
index 2bb0e862598c..0497d95cef25 100644
--- a/arch/arm/mach-pxa/include/mach/tosa.h
+++ b/arch/arm/mach-pxa/include/mach/tosa.h
@@ -13,6 +13,8 @@
13#ifndef _ASM_ARCH_TOSA_H_ 13#ifndef _ASM_ARCH_TOSA_H_
14#define _ASM_ARCH_TOSA_H_ 1 14#define _ASM_ARCH_TOSA_H_ 1
15 15
16#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */
17
16/* TOSA Chip selects */ 18/* TOSA Chip selects */
17#define TOSA_LCDC_PHYS PXA_CS4_PHYS 19#define TOSA_LCDC_PHYS PXA_CS4_PHYS
18/* Internel Scoop */ 20/* Internel Scoop */
diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h
index d2ca01053f69..ae3ca013afab 100644
--- a/arch/arm/mach-pxa/include/mach/trizeps4.h
+++ b/arch/arm/mach-pxa/include/mach/trizeps4.h
@@ -10,6 +10,8 @@
10#ifndef _TRIPEPS4_H_ 10#ifndef _TRIPEPS4_H_
11#define _TRIPEPS4_H_ 11#define _TRIPEPS4_H_
12 12
13#include "irqs.h" /* PXA_GPIO_TO_IRQ */
14
13/* physical memory regions */ 15/* physical memory regions */
14#define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ 16#define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */
15#define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */ 17#define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 338640631e08..05fa505df585 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -8,7 +8,7 @@ config ARCH_SHMOBILE_MULTI
8 select CPU_V7 8 select CPU_V7
9 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP 10 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if LOCAL_TIMERS 11 select HAVE_ARM_TWD if SMP
12 select HAVE_SMP 12 select HAVE_SMP
13 select ARM_GIC 13 select ARM_GIC
14 select MIGHT_HAVE_CACHE_L2X0 14 select MIGHT_HAVE_CACHE_L2X0
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 1db2a5ca9ab8..8c09a8393fb6 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -25,6 +25,7 @@
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/of.h> 27#include <linux/of.h>
28#include <linux/memblock.h>
28#include <linux/irqchip.h> 29#include <linux/irqchip.h>
29#include <linux/irqchip/arm-gic.h> 30#include <linux/irqchip/arm-gic.h>
30 31
@@ -41,6 +42,18 @@
41 42
42void __iomem *zynq_scu_base; 43void __iomem *zynq_scu_base;
43 44
45/**
46 * zynq_memory_init - Initialize special memory
47 *
48 * We need to stop things allocating the low memory as DMA can't work in
49 * the 1st 512K of memory.
50 */
51static void __init zynq_memory_init(void)
52{
53 if (!__pa(PAGE_OFFSET))
54 memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
55}
56
44static struct platform_device zynq_cpuidle_device = { 57static struct platform_device zynq_cpuidle_device = {
45 .name = "cpuidle-zynq", 58 .name = "cpuidle-zynq",
46}; 59};
@@ -117,5 +130,6 @@ DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
117 .init_machine = zynq_init_machine, 130 .init_machine = zynq_init_machine,
118 .init_time = zynq_timer_init, 131 .init_time = zynq_timer_init,
119 .dt_compat = zynq_dt_match, 132 .dt_compat = zynq_dt_match,
133 .reserve = zynq_memory_init,
120 .restart = zynq_system_reset, 134 .restart = zynq_system_reset,
121MACHINE_END 135MACHINE_END
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 20a7517bd339..52b8181ddafd 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4126,12 +4126,14 @@ static int mv_platform_probe(struct platform_device *pdev)
4126 clk_prepare_enable(hpriv->port_clks[port]); 4126 clk_prepare_enable(hpriv->port_clks[port]);
4127 4127
4128 sprintf(port_number, "port%d", port); 4128 sprintf(port_number, "port%d", port);
4129 hpriv->port_phys[port] = devm_phy_get(&pdev->dev, port_number); 4129 hpriv->port_phys[port] = devm_phy_optional_get(&pdev->dev,
4130 port_number);
4130 if (IS_ERR(hpriv->port_phys[port])) { 4131 if (IS_ERR(hpriv->port_phys[port])) {
4131 rc = PTR_ERR(hpriv->port_phys[port]); 4132 rc = PTR_ERR(hpriv->port_phys[port]);
4132 hpriv->port_phys[port] = NULL; 4133 hpriv->port_phys[port] = NULL;
4133 if ((rc != -EPROBE_DEFER) && (rc != -ENODEV)) 4134 if (rc != -EPROBE_DEFER)
4134 dev_warn(&pdev->dev, "error getting phy"); 4135 dev_warn(&pdev->dev, "error getting phy %d",
4136 rc);
4135 goto err; 4137 goto err;
4136 } else 4138 } else
4137 phy_power_on(hpriv->port_phys[port]); 4139 phy_power_on(hpriv->port_phys[port]);
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 9bed1a2a67a1..605b016bcea4 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -346,6 +346,7 @@ config MOXART_DMA
346 tristate "MOXART DMA support" 346 tristate "MOXART DMA support"
347 depends on ARCH_MOXART 347 depends on ARCH_MOXART
348 select DMA_ENGINE 348 select DMA_ENGINE
349 select DMA_OF
349 select DMA_VIRTUAL_CHANNELS 350 select DMA_VIRTUAL_CHANNELS
350 help 351 help
351 Enable support for the MOXA ART SoC DMA controller. 352 Enable support for the MOXA ART SoC DMA controller.
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 53fb0c8365b0..766b68ed505c 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -497,8 +497,8 @@ mv_xor_tx_submit(struct dma_async_tx_descriptor *tx)
497 if (!mv_can_chain(grp_start)) 497 if (!mv_can_chain(grp_start))
498 goto submit_done; 498 goto submit_done;
499 499
500 dev_dbg(mv_chan_to_devp(mv_chan), "Append to last desc %x\n", 500 dev_dbg(mv_chan_to_devp(mv_chan), "Append to last desc %pa\n",
501 old_chain_tail->async_tx.phys); 501 &old_chain_tail->async_tx.phys);
502 502
503 /* fix up the hardware chain */ 503 /* fix up the hardware chain */
504 mv_desc_set_next_desc(old_chain_tail, grp_start->async_tx.phys); 504 mv_desc_set_next_desc(old_chain_tail, grp_start->async_tx.phys);
@@ -527,7 +527,8 @@ submit_done:
527/* returns the number of allocated descriptors */ 527/* returns the number of allocated descriptors */
528static int mv_xor_alloc_chan_resources(struct dma_chan *chan) 528static int mv_xor_alloc_chan_resources(struct dma_chan *chan)
529{ 529{
530 char *hw_desc; 530 void *virt_desc;
531 dma_addr_t dma_desc;
531 int idx; 532 int idx;
532 struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan); 533 struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
533 struct mv_xor_desc_slot *slot = NULL; 534 struct mv_xor_desc_slot *slot = NULL;
@@ -542,17 +543,16 @@ static int mv_xor_alloc_chan_resources(struct dma_chan *chan)
542 " %d descriptor slots", idx); 543 " %d descriptor slots", idx);
543 break; 544 break;
544 } 545 }
545 hw_desc = (char *) mv_chan->dma_desc_pool_virt; 546 virt_desc = mv_chan->dma_desc_pool_virt;
546 slot->hw_desc = (void *) &hw_desc[idx * MV_XOR_SLOT_SIZE]; 547 slot->hw_desc = virt_desc + idx * MV_XOR_SLOT_SIZE;
547 548
548 dma_async_tx_descriptor_init(&slot->async_tx, chan); 549 dma_async_tx_descriptor_init(&slot->async_tx, chan);
549 slot->async_tx.tx_submit = mv_xor_tx_submit; 550 slot->async_tx.tx_submit = mv_xor_tx_submit;
550 INIT_LIST_HEAD(&slot->chain_node); 551 INIT_LIST_HEAD(&slot->chain_node);
551 INIT_LIST_HEAD(&slot->slot_node); 552 INIT_LIST_HEAD(&slot->slot_node);
552 INIT_LIST_HEAD(&slot->tx_list); 553 INIT_LIST_HEAD(&slot->tx_list);
553 hw_desc = (char *) mv_chan->dma_desc_pool; 554 dma_desc = mv_chan->dma_desc_pool;
554 slot->async_tx.phys = 555 slot->async_tx.phys = dma_desc + idx * MV_XOR_SLOT_SIZE;
555 (dma_addr_t) &hw_desc[idx * MV_XOR_SLOT_SIZE];
556 slot->idx = idx++; 556 slot->idx = idx++;
557 557
558 spin_lock_bh(&mv_chan->lock); 558 spin_lock_bh(&mv_chan->lock);
@@ -582,8 +582,8 @@ mv_xor_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
582 int slot_cnt; 582 int slot_cnt;
583 583
584 dev_dbg(mv_chan_to_devp(mv_chan), 584 dev_dbg(mv_chan_to_devp(mv_chan),
585 "%s dest: %x src %x len: %u flags: %ld\n", 585 "%s dest: %pad src %pad len: %u flags: %ld\n",
586 __func__, dest, src, len, flags); 586 __func__, &dest, &src, len, flags);
587 if (unlikely(len < MV_XOR_MIN_BYTE_COUNT)) 587 if (unlikely(len < MV_XOR_MIN_BYTE_COUNT))
588 return NULL; 588 return NULL;
589 589
@@ -626,8 +626,8 @@ mv_xor_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
626 BUG_ON(len > MV_XOR_MAX_BYTE_COUNT); 626 BUG_ON(len > MV_XOR_MAX_BYTE_COUNT);
627 627
628 dev_dbg(mv_chan_to_devp(mv_chan), 628 dev_dbg(mv_chan_to_devp(mv_chan),
629 "%s src_cnt: %d len: dest %x %u flags: %ld\n", 629 "%s src_cnt: %d len: %u dest %pad flags: %ld\n",
630 __func__, src_cnt, len, dest, flags); 630 __func__, src_cnt, len, &dest, flags);
631 631
632 spin_lock_bh(&mv_chan->lock); 632 spin_lock_bh(&mv_chan->lock);
633 slot_cnt = mv_chan_xor_slot_count(len, src_cnt); 633 slot_cnt = mv_chan_xor_slot_count(len, src_cnt);
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 645c867c1257..5f5b0f4be5be 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -162,6 +162,9 @@ int phy_init(struct phy *phy)
162{ 162{
163 int ret; 163 int ret;
164 164
165 if (!phy)
166 return 0;
167
165 ret = phy_pm_runtime_get_sync(phy); 168 ret = phy_pm_runtime_get_sync(phy);
166 if (ret < 0 && ret != -ENOTSUPP) 169 if (ret < 0 && ret != -ENOTSUPP)
167 return ret; 170 return ret;
@@ -187,6 +190,9 @@ int phy_exit(struct phy *phy)
187{ 190{
188 int ret; 191 int ret;
189 192
193 if (!phy)
194 return 0;
195
190 ret = phy_pm_runtime_get_sync(phy); 196 ret = phy_pm_runtime_get_sync(phy);
191 if (ret < 0 && ret != -ENOTSUPP) 197 if (ret < 0 && ret != -ENOTSUPP)
192 return ret; 198 return ret;
@@ -212,6 +218,9 @@ int phy_power_on(struct phy *phy)
212{ 218{
213 int ret; 219 int ret;
214 220
221 if (!phy)
222 return 0;
223
215 ret = phy_pm_runtime_get_sync(phy); 224 ret = phy_pm_runtime_get_sync(phy);
216 if (ret < 0 && ret != -ENOTSUPP) 225 if (ret < 0 && ret != -ENOTSUPP)
217 return ret; 226 return ret;
@@ -240,6 +249,9 @@ int phy_power_off(struct phy *phy)
240{ 249{
241 int ret; 250 int ret;
242 251
252 if (!phy)
253 return 0;
254
243 mutex_lock(&phy->mutex); 255 mutex_lock(&phy->mutex);
244 if (phy->power_count == 1 && phy->ops->power_off) { 256 if (phy->power_count == 1 && phy->ops->power_off) {
245 ret = phy->ops->power_off(phy); 257 ret = phy->ops->power_off(phy);
@@ -308,7 +320,7 @@ err0:
308 */ 320 */
309void phy_put(struct phy *phy) 321void phy_put(struct phy *phy)
310{ 322{
311 if (IS_ERR(phy)) 323 if (!phy || IS_ERR(phy))
312 return; 324 return;
313 325
314 module_put(phy->ops->owner); 326 module_put(phy->ops->owner);
@@ -328,6 +340,9 @@ void devm_phy_put(struct device *dev, struct phy *phy)
328{ 340{
329 int r; 341 int r;
330 342
343 if (!phy)
344 return;
345
331 r = devres_destroy(dev, devm_phy_release, devm_phy_match, phy); 346 r = devres_destroy(dev, devm_phy_release, devm_phy_match, phy);
332 dev_WARN_ONCE(dev, r, "couldn't find PHY resource\n"); 347 dev_WARN_ONCE(dev, r, "couldn't find PHY resource\n");
333} 348}
@@ -411,6 +426,27 @@ struct phy *phy_get(struct device *dev, const char *string)
411EXPORT_SYMBOL_GPL(phy_get); 426EXPORT_SYMBOL_GPL(phy_get);
412 427
413/** 428/**
429 * phy_optional_get() - lookup and obtain a reference to an optional phy.
430 * @dev: device that requests this phy
431 * @string: the phy name as given in the dt data or the name of the controller
432 * port for non-dt case
433 *
434 * Returns the phy driver, after getting a refcount to it; or
435 * NULL if there is no such phy. The caller is responsible for
436 * calling phy_put() to release that count.
437 */
438struct phy *phy_optional_get(struct device *dev, const char *string)
439{
440 struct phy *phy = phy_get(dev, string);
441
442 if (PTR_ERR(phy) == -ENODEV)
443 phy = NULL;
444
445 return phy;
446}
447EXPORT_SYMBOL_GPL(phy_optional_get);
448
449/**
414 * devm_phy_get() - lookup and obtain a reference to a phy. 450 * devm_phy_get() - lookup and obtain a reference to a phy.
415 * @dev: device that requests this phy 451 * @dev: device that requests this phy
416 * @string: the phy name as given in the dt data or phy device name 452 * @string: the phy name as given in the dt data or phy device name
@@ -441,6 +477,30 @@ struct phy *devm_phy_get(struct device *dev, const char *string)
441EXPORT_SYMBOL_GPL(devm_phy_get); 477EXPORT_SYMBOL_GPL(devm_phy_get);
442 478
443/** 479/**
480 * devm_phy_optional_get() - lookup and obtain a reference to an optional phy.
481 * @dev: device that requests this phy
482 * @string: the phy name as given in the dt data or phy device name
483 * for non-dt case
484 *
485 * Gets the phy using phy_get(), and associates a device with it using
486 * devres. On driver detach, release function is invoked on the devres
487 * data, then, devres data is freed. This differs to devm_phy_get() in
488 * that if the phy does not exist, it is not considered an error and
489 * -ENODEV will not be returned. Instead the NULL phy is returned,
490 * which can be passed to all other phy consumer calls.
491 */
492struct phy *devm_phy_optional_get(struct device *dev, const char *string)
493{
494 struct phy *phy = devm_phy_get(dev, string);
495
496 if (PTR_ERR(phy) == -ENODEV)
497 phy = NULL;
498
499 return phy;
500}
501EXPORT_SYMBOL_GPL(devm_phy_optional_get);
502
503/**
444 * phy_create() - create a new phy 504 * phy_create() - create a new phy
445 * @dev: device that is creating the new phy 505 * @dev: device that is creating the new phy
446 * @ops: function pointers for performing phy operations 506 * @ops: function pointers for performing phy operations
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e273e5ac19c9..3f83459dbb20 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -146,7 +146,9 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width)
146 phy->attrs.bus_width = bus_width; 146 phy->attrs.bus_width = bus_width;
147} 147}
148struct phy *phy_get(struct device *dev, const char *string); 148struct phy *phy_get(struct device *dev, const char *string);
149struct phy *phy_optional_get(struct device *dev, const char *string);
149struct phy *devm_phy_get(struct device *dev, const char *string); 150struct phy *devm_phy_get(struct device *dev, const char *string);
151struct phy *devm_phy_optional_get(struct device *dev, const char *string);
150void phy_put(struct phy *phy); 152void phy_put(struct phy *phy);
151void devm_phy_put(struct device *dev, struct phy *phy); 153void devm_phy_put(struct device *dev, struct phy *phy);
152struct phy *of_phy_simple_xlate(struct device *dev, 154struct phy *of_phy_simple_xlate(struct device *dev,
@@ -232,11 +234,23 @@ static inline struct phy *phy_get(struct device *dev, const char *string)
232 return ERR_PTR(-ENOSYS); 234 return ERR_PTR(-ENOSYS);
233} 235}
234 236
237static inline struct phy *phy_optional_get(struct device *dev,
238 const char *string)
239{
240 return ERR_PTR(-ENOSYS);
241}
242
235static inline struct phy *devm_phy_get(struct device *dev, const char *string) 243static inline struct phy *devm_phy_get(struct device *dev, const char *string)
236{ 244{
237 return ERR_PTR(-ENOSYS); 245 return ERR_PTR(-ENOSYS);
238} 246}
239 247
248static inline struct phy *devm_phy_optional_get(struct device *dev,
249 const char *string)
250{
251 return ERR_PTR(-ENOSYS);
252}
253
240static inline void phy_put(struct phy *phy) 254static inline void phy_put(struct phy *phy)
241{ 255{
242} 256}