diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-10-10 03:41:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-11 19:53:42 -0400 |
commit | 57ae1605c0f511bca212787d28d79a3f82c0a7f9 (patch) | |
tree | 8ad15aa918a8859e5413a7f03914e433b0a67a60 | |
parent | a4b3f029c90c45e0e2dd961abdaff70b86dd7efa (diff) |
USB: ehci-s5p: Remove non-DT support
The non-DT for EXYNOS SoCs is not supported from v3.11.
Thus, there is no need to support non-DT for Exynos EHCI driver.
The 'include/linux/platform_data/usb-ehci-s5p.h' file has been
used for non-DT support. Thus, the 'usb-ehci-s5p.h' file can
be removed.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/ehci-s5p.c | 32 | ||||
-rw-r--r-- | include/linux/platform_data/usb-ehci-s5p.h | 21 |
2 files changed, 4 insertions, 49 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 7c3de95c7054..45e1ad3f56b2 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_gpio.h> | 21 | #include <linux/of_gpio.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
24 | #include <linux/usb/phy.h> | 23 | #include <linux/usb/phy.h> |
25 | #include <linux/usb/samsung_usb_phy.h> | 24 | #include <linux/usb/samsung_usb_phy.h> |
26 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
@@ -47,11 +46,8 @@ struct s5p_ehci_hcd { | |||
47 | struct clk *clk; | 46 | struct clk *clk; |
48 | struct usb_phy *phy; | 47 | struct usb_phy *phy; |
49 | struct usb_otg *otg; | 48 | struct usb_otg *otg; |
50 | struct s5p_ehci_platdata *pdata; | ||
51 | }; | 49 | }; |
52 | 50 | ||
53 | static struct s5p_ehci_platdata empty_platdata; | ||
54 | |||
55 | #define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv) | 51 | #define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv) |
56 | 52 | ||
57 | static void s5p_setup_vbus_gpio(struct platform_device *pdev) | 53 | static void s5p_setup_vbus_gpio(struct platform_device *pdev) |
@@ -75,7 +71,6 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev) | |||
75 | 71 | ||
76 | static int s5p_ehci_probe(struct platform_device *pdev) | 72 | static int s5p_ehci_probe(struct platform_device *pdev) |
77 | { | 73 | { |
78 | struct s5p_ehci_platdata *pdata = dev_get_platdata(&pdev->dev); | ||
79 | struct s5p_ehci_hcd *s5p_ehci; | 74 | struct s5p_ehci_hcd *s5p_ehci; |
80 | struct usb_hcd *hcd; | 75 | struct usb_hcd *hcd; |
81 | struct ehci_hcd *ehci; | 76 | struct ehci_hcd *ehci; |
@@ -105,21 +100,14 @@ static int s5p_ehci_probe(struct platform_device *pdev) | |||
105 | s5p_ehci = to_s5p_ehci(hcd); | 100 | s5p_ehci = to_s5p_ehci(hcd); |
106 | 101 | ||
107 | if (of_device_is_compatible(pdev->dev.of_node, | 102 | if (of_device_is_compatible(pdev->dev.of_node, |
108 | "samsung,exynos5440-ehci")) { | 103 | "samsung,exynos5440-ehci")) |
109 | s5p_ehci->pdata = &empty_platdata; | ||
110 | goto skip_phy; | 104 | goto skip_phy; |
111 | } | ||
112 | 105 | ||
113 | phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); | 106 | phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); |
114 | if (IS_ERR(phy)) { | 107 | if (IS_ERR(phy)) { |
115 | /* Fallback to pdata */ | 108 | usb_put_hcd(hcd); |
116 | if (!pdata) { | 109 | dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); |
117 | usb_put_hcd(hcd); | 110 | return -EPROBE_DEFER; |
118 | dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); | ||
119 | return -EPROBE_DEFER; | ||
120 | } else { | ||
121 | s5p_ehci->pdata = pdata; | ||
122 | } | ||
123 | } else { | 111 | } else { |
124 | s5p_ehci->phy = phy; | 112 | s5p_ehci->phy = phy; |
125 | s5p_ehci->otg = phy->otg; | 113 | s5p_ehci->otg = phy->otg; |
@@ -167,8 +155,6 @@ skip_phy: | |||
167 | 155 | ||
168 | if (s5p_ehci->phy) | 156 | if (s5p_ehci->phy) |
169 | usb_phy_init(s5p_ehci->phy); | 157 | usb_phy_init(s5p_ehci->phy); |
170 | else if (s5p_ehci->pdata->phy_init) | ||
171 | s5p_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST); | ||
172 | 158 | ||
173 | ehci = hcd_to_ehci(hcd); | 159 | ehci = hcd_to_ehci(hcd); |
174 | ehci->caps = hcd->regs; | 160 | ehci->caps = hcd->regs; |
@@ -189,8 +175,6 @@ skip_phy: | |||
189 | fail_add_hcd: | 175 | fail_add_hcd: |
190 | if (s5p_ehci->phy) | 176 | if (s5p_ehci->phy) |
191 | usb_phy_shutdown(s5p_ehci->phy); | 177 | usb_phy_shutdown(s5p_ehci->phy); |
192 | else if (s5p_ehci->pdata->phy_exit) | ||
193 | s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); | ||
194 | fail_io: | 178 | fail_io: |
195 | clk_disable_unprepare(s5p_ehci->clk); | 179 | clk_disable_unprepare(s5p_ehci->clk); |
196 | fail_clk: | 180 | fail_clk: |
@@ -210,8 +194,6 @@ static int s5p_ehci_remove(struct platform_device *pdev) | |||
210 | 194 | ||
211 | if (s5p_ehci->phy) | 195 | if (s5p_ehci->phy) |
212 | usb_phy_shutdown(s5p_ehci->phy); | 196 | usb_phy_shutdown(s5p_ehci->phy); |
213 | else if (s5p_ehci->pdata->phy_exit) | ||
214 | s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); | ||
215 | 197 | ||
216 | clk_disable_unprepare(s5p_ehci->clk); | 198 | clk_disable_unprepare(s5p_ehci->clk); |
217 | 199 | ||
@@ -225,7 +207,6 @@ static int s5p_ehci_suspend(struct device *dev) | |||
225 | { | 207 | { |
226 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 208 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
227 | struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); | 209 | struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); |
228 | struct platform_device *pdev = to_platform_device(dev); | ||
229 | 210 | ||
230 | bool do_wakeup = device_may_wakeup(dev); | 211 | bool do_wakeup = device_may_wakeup(dev); |
231 | int rc; | 212 | int rc; |
@@ -237,8 +218,6 @@ static int s5p_ehci_suspend(struct device *dev) | |||
237 | 218 | ||
238 | if (s5p_ehci->phy) | 219 | if (s5p_ehci->phy) |
239 | usb_phy_shutdown(s5p_ehci->phy); | 220 | usb_phy_shutdown(s5p_ehci->phy); |
240 | else if (s5p_ehci->pdata->phy_exit) | ||
241 | s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); | ||
242 | 221 | ||
243 | clk_disable_unprepare(s5p_ehci->clk); | 222 | clk_disable_unprepare(s5p_ehci->clk); |
244 | 223 | ||
@@ -249,7 +228,6 @@ static int s5p_ehci_resume(struct device *dev) | |||
249 | { | 228 | { |
250 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 229 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
251 | struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); | 230 | struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); |
252 | struct platform_device *pdev = to_platform_device(dev); | ||
253 | 231 | ||
254 | clk_prepare_enable(s5p_ehci->clk); | 232 | clk_prepare_enable(s5p_ehci->clk); |
255 | 233 | ||
@@ -258,8 +236,6 @@ static int s5p_ehci_resume(struct device *dev) | |||
258 | 236 | ||
259 | if (s5p_ehci->phy) | 237 | if (s5p_ehci->phy) |
260 | usb_phy_init(s5p_ehci->phy); | 238 | usb_phy_init(s5p_ehci->phy); |
261 | else if (s5p_ehci->pdata->phy_init) | ||
262 | s5p_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST); | ||
263 | 239 | ||
264 | /* DMA burst Enable */ | 240 | /* DMA burst Enable */ |
265 | writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); | 241 | writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); |
diff --git a/include/linux/platform_data/usb-ehci-s5p.h b/include/linux/platform_data/usb-ehci-s5p.h deleted file mode 100644 index 5f28cae18582..000000000000 --- a/include/linux/platform_data/usb-ehci-s5p.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Samsung Electronics Co.Ltd | ||
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | */ | ||
10 | |||
11 | #ifndef __PLAT_SAMSUNG_EHCI_H | ||
12 | #define __PLAT_SAMSUNG_EHCI_H __FILE__ | ||
13 | |||
14 | struct s5p_ehci_platdata { | ||
15 | int (*phy_init)(struct platform_device *pdev, int type); | ||
16 | int (*phy_exit)(struct platform_device *pdev, int type); | ||
17 | }; | ||
18 | |||
19 | extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd); | ||
20 | |||
21 | #endif /* __PLAT_SAMSUNG_EHCI_H */ | ||