diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2013-05-27 05:42:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 08:34:29 -0400 |
commit | e6b0166f2106e087a197c528eb1e465071f5225b (patch) | |
tree | 817fd6569d5fec300500a5aa32ea6312d91f1ab8 /drivers/usb/host/ehci-s5p.c | |
parent | 715cf92aeb061c47f7170d0d7899311b7597bc66 (diff) |
usb: ehci-s5p: skip phy setup for Exynos5440 based platforms
Exynos5440 does not require any explict USB phy configuration. So skip
the USB phy configuration for Exynos5440 based platforms.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Ackked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-s5p.c')
-rw-r--r-- | drivers/usb/host/ehci-s5p.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 379037f51a2f..7cc26e621aa7 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c | |||
@@ -50,6 +50,8 @@ struct s5p_ehci_hcd { | |||
50 | struct s5p_ehci_platdata *pdata; | 50 | struct s5p_ehci_platdata *pdata; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct s5p_ehci_platdata empty_platdata; | ||
54 | |||
53 | #define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv) | 55 | #define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv) |
54 | 56 | ||
55 | static void s5p_setup_vbus_gpio(struct platform_device *pdev) | 57 | static void s5p_setup_vbus_gpio(struct platform_device *pdev) |
@@ -101,6 +103,13 @@ static int s5p_ehci_probe(struct platform_device *pdev) | |||
101 | return -ENOMEM; | 103 | return -ENOMEM; |
102 | } | 104 | } |
103 | s5p_ehci = to_s5p_ehci(hcd); | 105 | s5p_ehci = to_s5p_ehci(hcd); |
106 | |||
107 | if (of_device_is_compatible(pdev->dev.of_node, | ||
108 | "samsung,exynos5440-ehci")) { | ||
109 | s5p_ehci->pdata = &empty_platdata; | ||
110 | goto skip_phy; | ||
111 | } | ||
112 | |||
104 | phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); | 113 | phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); |
105 | if (IS_ERR(phy)) { | 114 | if (IS_ERR(phy)) { |
106 | /* Fallback to pdata */ | 115 | /* Fallback to pdata */ |
@@ -116,6 +125,8 @@ static int s5p_ehci_probe(struct platform_device *pdev) | |||
116 | s5p_ehci->otg = phy->otg; | 125 | s5p_ehci->otg = phy->otg; |
117 | } | 126 | } |
118 | 127 | ||
128 | skip_phy: | ||
129 | |||
119 | s5p_ehci->clk = devm_clk_get(&pdev->dev, "usbhost"); | 130 | s5p_ehci->clk = devm_clk_get(&pdev->dev, "usbhost"); |
120 | 131 | ||
121 | if (IS_ERR(s5p_ehci->clk)) { | 132 | if (IS_ERR(s5p_ehci->clk)) { |
@@ -277,6 +288,7 @@ static const struct dev_pm_ops s5p_ehci_pm_ops = { | |||
277 | #ifdef CONFIG_OF | 288 | #ifdef CONFIG_OF |
278 | static const struct of_device_id exynos_ehci_match[] = { | 289 | static const struct of_device_id exynos_ehci_match[] = { |
279 | { .compatible = "samsung,exynos4210-ehci" }, | 290 | { .compatible = "samsung,exynos4210-ehci" }, |
291 | { .compatible = "samsung,exynos5440-ehci" }, | ||
280 | {}, | 292 | {}, |
281 | }; | 293 | }; |
282 | MODULE_DEVICE_TABLE(of, exynos_ehci_match); | 294 | MODULE_DEVICE_TABLE(of, exynos_ehci_match); |