diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 20:07:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 20:07:21 -0400 |
commit | 42e3a58b028e0e51746f596a11abfec01cd1c5c4 (patch) | |
tree | b2dd1e8730359dc312519bcdaed9c52bae622990 /drivers/usb/phy | |
parent | 4fd48b45ffc4addd3c2963448b05417aa14abbf7 (diff) | |
parent | 00fe52deb45b1a5ef42b0aa82e632e2df012eddc (diff) |
Merge tag 'usb-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB driver updates from Greg KH:
"Here's the big USB (and PHY) driver patchset for 4.1-rc1.
Everything here has been in linux-next, and the full details are below
in the shortlog. Nothing major, just the normal round of new
drivers,api updates, and other changes, mostly in the USB gadget area,
as usual"
* tag 'usb-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (252 commits)
drivers/usb/core: devio.c: Removed an uneeded space before tab
usb: dwc2: host: sleep USB_RESUME_TIMEOUT during resume
usb: chipidea: debug: add low power mode check before print registers
usb: chipidea: udc: bypass pullup DP when gadget connect in OTG fsm mode
usb: core: hub: use new USB_RESUME_TIMEOUT
usb: isp1760: hcd: use new USB_RESUME_TIMEOUT
usb: dwc2: hcd: use new USB_RESUME_TIMEOUT
usb: host: sl811: use new USB_RESUME_TIMEOUT
usb: host: r8a66597: use new USB_RESUME_TIMEOUT
usb: host: oxu210hp: use new USB_RESUME_TIMEOUT
usb: host: fusbh200: use new USB_RESUME_TIMEOUT
usb: host: fotg210: use new USB_RESUME_TIMEOUT
usb: host: isp116x: use new USB_RESUME_TIMEOUT
usb: musb: use new USB_RESUME_TIMEOUT
usb: host: uhci: use new USB_RESUME_TIMEOUT
usb: host: ehci: use new USB_RESUME_TIMEOUT
usb: host: xhci: use new USB_RESUME_TIMEOUT
usb: define a generic USB_RESUME_TIMEOUT macro
usb: musb: dsps: fix build on i386 when COMPILE_TEST is set
ehci-hub: use USB_DT_HUB
...
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r-- | drivers/usb/phy/Kconfig | 4 | ||||
-rw-r--r-- | drivers/usb/phy/of.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy-ab8500-usb.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy-generic.c | 12 | ||||
-rw-r--r-- | drivers/usb/phy/phy-msm-usb.c | 18 | ||||
-rw-r--r-- | drivers/usb/phy/phy-rcar-gen2-usb.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy.c | 4 |
7 files changed, 15 insertions, 29 deletions
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 52d3d58252e1..2175678e674e 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig | |||
@@ -139,7 +139,7 @@ config USB_ISP1301 | |||
139 | 139 | ||
140 | config USB_MSM_OTG | 140 | config USB_MSM_OTG |
141 | tristate "Qualcomm on-chip USB OTG controller support" | 141 | tristate "Qualcomm on-chip USB OTG controller support" |
142 | depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM || COMPILE_TEST) | 142 | depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST) |
143 | depends on RESET_CONTROLLER | 143 | depends on RESET_CONTROLLER |
144 | select USB_PHY | 144 | select USB_PHY |
145 | help | 145 | help |
@@ -202,13 +202,13 @@ config USB_RCAR_GEN2_PHY | |||
202 | config USB_ULPI | 202 | config USB_ULPI |
203 | bool "Generic ULPI Transceiver Driver" | 203 | bool "Generic ULPI Transceiver Driver" |
204 | depends on ARM || ARM64 | 204 | depends on ARM || ARM64 |
205 | select USB_ULPI_VIEWPORT | ||
205 | help | 206 | help |
206 | Enable this to support ULPI connected USB OTG transceivers which | 207 | Enable this to support ULPI connected USB OTG transceivers which |
207 | are likely found on embedded boards. | 208 | are likely found on embedded boards. |
208 | 209 | ||
209 | config USB_ULPI_VIEWPORT | 210 | config USB_ULPI_VIEWPORT |
210 | bool | 211 | bool |
211 | depends on USB_ULPI | ||
212 | help | 212 | help |
213 | Provides read/write operations to the ULPI phy register set for | 213 | Provides read/write operations to the ULPI phy register set for |
214 | controllers with a viewport register (e.g. Chipidea/ARC controllers). | 214 | controllers with a viewport register (e.g. Chipidea/ARC controllers). |
diff --git a/drivers/usb/phy/of.c b/drivers/usb/phy/of.c index 7ea0154da9d5..66ffa82457a8 100644 --- a/drivers/usb/phy/of.c +++ b/drivers/usb/phy/of.c | |||
@@ -27,7 +27,7 @@ static const char *const usbphy_modes[] = { | |||
27 | * @np: Pointer to the given device_node | 27 | * @np: Pointer to the given device_node |
28 | * | 28 | * |
29 | * The function gets phy interface string from property 'phy_type', | 29 | * The function gets phy interface string from property 'phy_type', |
30 | * and returns the correspondig enum usb_phy_interface | 30 | * and returns the corresponding enum usb_phy_interface |
31 | */ | 31 | */ |
32 | enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) | 32 | enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) |
33 | { | 33 | { |
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index f5b3b928941b..7225d526df04 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c | |||
@@ -893,7 +893,7 @@ static int abx500_usb_link_status_update(struct ab8500_usb *ab) | |||
893 | 893 | ||
894 | /* | 894 | /* |
895 | * Disconnection Sequence: | 895 | * Disconnection Sequence: |
896 | * 1. Disconect Interrupt | 896 | * 1. Disconnect Interrupt |
897 | * 2. Disable regulators | 897 | * 2. Disable regulators |
898 | * 3. Disable AB clock | 898 | * 3. Disable AB clock |
899 | * 4. Disable the Phy | 899 | * 4. Disable the Phy |
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 70be50b734b2..deee68eafb72 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c | |||
@@ -62,14 +62,14 @@ static int nop_set_suspend(struct usb_phy *x, int suspend) | |||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | static void nop_reset_set(struct usb_phy_generic *nop, int asserted) | 65 | static void nop_reset(struct usb_phy_generic *nop) |
66 | { | 66 | { |
67 | if (!nop->gpiod_reset) | 67 | if (!nop->gpiod_reset) |
68 | return; | 68 | return; |
69 | 69 | ||
70 | gpiod_direction_output(nop->gpiod_reset, !asserted); | 70 | gpiod_set_value(nop->gpiod_reset, 1); |
71 | usleep_range(10000, 20000); | 71 | usleep_range(10000, 20000); |
72 | gpiod_set_value(nop->gpiod_reset, asserted); | 72 | gpiod_set_value(nop->gpiod_reset, 0); |
73 | } | 73 | } |
74 | 74 | ||
75 | /* interface to regulator framework */ | 75 | /* interface to regulator framework */ |
@@ -151,8 +151,7 @@ int usb_gen_phy_init(struct usb_phy *phy) | |||
151 | if (!IS_ERR(nop->clk)) | 151 | if (!IS_ERR(nop->clk)) |
152 | clk_prepare_enable(nop->clk); | 152 | clk_prepare_enable(nop->clk); |
153 | 153 | ||
154 | /* De-assert RESET */ | 154 | nop_reset(nop); |
155 | nop_reset_set(nop, 0); | ||
156 | 155 | ||
157 | return 0; | 156 | return 0; |
158 | } | 157 | } |
@@ -162,8 +161,7 @@ void usb_gen_phy_shutdown(struct usb_phy *phy) | |||
162 | { | 161 | { |
163 | struct usb_phy_generic *nop = dev_get_drvdata(phy->dev); | 162 | struct usb_phy_generic *nop = dev_get_drvdata(phy->dev); |
164 | 163 | ||
165 | /* Assert RESET */ | 164 | gpiod_set_value(nop->gpiod_reset, 1); |
166 | nop_reset_set(nop, 1); | ||
167 | 165 | ||
168 | if (!IS_ERR(nop->clk)) | 166 | if (!IS_ERR(nop->clk)) |
169 | clk_disable_unprepare(nop->clk); | 167 | clk_disable_unprepare(nop->clk); |
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 6ed67ea4ef7e..c9156beeadef 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c | |||
@@ -258,9 +258,7 @@ static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) | |||
258 | { | 258 | { |
259 | int ret; | 259 | int ret; |
260 | 260 | ||
261 | if (motg->pdata->link_clk_reset) | 261 | if (assert) |
262 | ret = motg->pdata->link_clk_reset(motg->clk, assert); | ||
263 | else if (assert) | ||
264 | ret = reset_control_assert(motg->link_rst); | 262 | ret = reset_control_assert(motg->link_rst); |
265 | else | 263 | else |
266 | ret = reset_control_deassert(motg->link_rst); | 264 | ret = reset_control_deassert(motg->link_rst); |
@@ -276,9 +274,7 @@ static int msm_otg_phy_clk_reset(struct msm_otg *motg) | |||
276 | { | 274 | { |
277 | int ret = 0; | 275 | int ret = 0; |
278 | 276 | ||
279 | if (motg->pdata->phy_clk_reset) | 277 | if (motg->phy_rst) |
280 | ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk); | ||
281 | else if (motg->phy_rst) | ||
282 | ret = reset_control_reset(motg->phy_rst); | 278 | ret = reset_control_reset(motg->phy_rst); |
283 | 279 | ||
284 | if (ret) | 280 | if (ret) |
@@ -1546,16 +1542,6 @@ static int msm_otg_probe(struct platform_device *pdev) | |||
1546 | phy = &motg->phy; | 1542 | phy = &motg->phy; |
1547 | phy->dev = &pdev->dev; | 1543 | phy->dev = &pdev->dev; |
1548 | 1544 | ||
1549 | if (motg->pdata->phy_clk_reset) { | ||
1550 | motg->phy_reset_clk = devm_clk_get(&pdev->dev, | ||
1551 | np ? "phy" : "usb_phy_clk"); | ||
1552 | |||
1553 | if (IS_ERR(motg->phy_reset_clk)) { | ||
1554 | dev_err(&pdev->dev, "failed to get usb_phy_clk\n"); | ||
1555 | return PTR_ERR(motg->phy_reset_clk); | ||
1556 | } | ||
1557 | } | ||
1558 | |||
1559 | motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk"); | 1545 | motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk"); |
1560 | if (IS_ERR(motg->clk)) { | 1546 | if (IS_ERR(motg->clk)) { |
1561 | dev_err(&pdev->dev, "failed to get usb_hs_clk\n"); | 1547 | dev_err(&pdev->dev, "failed to get usb_hs_clk\n"); |
diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c b/drivers/usb/phy/phy-rcar-gen2-usb.c index f83808413ba2..f81800b6562a 100644 --- a/drivers/usb/phy/phy-rcar-gen2-usb.c +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c | |||
@@ -47,7 +47,7 @@ struct rcar_gen2_usb_phy_priv { | |||
47 | 47 | ||
48 | /* USB General status register */ | 48 | /* USB General status register */ |
49 | #define USBHS_UGSTS_REG 0x88 | 49 | #define USBHS_UGSTS_REG 0x88 |
50 | #define USBHS_UGSTS_LOCK (3 << 8) | 50 | #define USBHS_UGSTS_LOCK (1 << 8) |
51 | 51 | ||
52 | /* Enable USBHS internal phy */ | 52 | /* Enable USBHS internal phy */ |
53 | static int __rcar_gen2_usbhs_phy_enable(void __iomem *base) | 53 | static int __rcar_gen2_usbhs_phy_enable(void __iomem *base) |
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 2f9735b35338..d1cd6b50f520 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c | |||
@@ -81,7 +81,9 @@ static void devm_usb_phy_release(struct device *dev, void *res) | |||
81 | 81 | ||
82 | static int devm_usb_phy_match(struct device *dev, void *res, void *match_data) | 82 | static int devm_usb_phy_match(struct device *dev, void *res, void *match_data) |
83 | { | 83 | { |
84 | return res == match_data; | 84 | struct usb_phy **phy = res; |
85 | |||
86 | return *phy == match_data; | ||
85 | } | 87 | } |
86 | 88 | ||
87 | /** | 89 | /** |