aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-02-26 09:33:29 -0500
committerFelipe Balbi <balbi@ti.com>2013-03-18 05:16:39 -0400
commit7eaf8f2a7da6506df0e6edc4fdb22678f0eb3602 (patch)
treed6c3513ea000f0a8f934fba9ce26aef90c0962c1
parent4495afcf713adb5bdb16504052952bdd0d11f90a (diff)
usb: dwc3: omap: stop using nop-usb-xceiv
Now that we have drivers for omap-usb2 phy and omap-usb3 phy, stop using nop-usb-xceiv. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/dwc3/dwc3-omap.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 43a248219aae..3d343d92548a 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -52,7 +52,6 @@
52#include <linux/of_platform.h> 52#include <linux/of_platform.h>
53 53
54#include <linux/usb/otg.h> 54#include <linux/usb/otg.h>
55#include <linux/usb/nop-usb-xceiv.h>
56 55
57/* 56/*
58 * All these registers belong to OMAP's Wrapper around the 57 * All these registers belong to OMAP's Wrapper around the
@@ -117,8 +116,6 @@ struct dwc3_omap {
117 /* device lock */ 116 /* device lock */
118 spinlock_t lock; 117 spinlock_t lock;
119 118
120 struct platform_device *usb2_phy;
121 struct platform_device *usb3_phy;
122 struct device *dev; 119 struct device *dev;
123 120
124 int irq; 121 int irq;
@@ -193,60 +190,6 @@ void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
193} 190}
194EXPORT_SYMBOL_GPL(dwc3_omap_mailbox); 191EXPORT_SYMBOL_GPL(dwc3_omap_mailbox);
195 192
196static int dwc3_omap_register_phys(struct dwc3_omap *omap)
197{
198 struct nop_usb_xceiv_platform_data pdata;
199 struct platform_device *pdev;
200 int ret;
201
202 memset(&pdata, 0x00, sizeof(pdata));
203
204 pdev = platform_device_alloc("nop_usb_xceiv", PLATFORM_DEVID_AUTO);
205 if (!pdev)
206 return -ENOMEM;
207
208 omap->usb2_phy = pdev;
209 pdata.type = USB_PHY_TYPE_USB2;
210
211 ret = platform_device_add_data(omap->usb2_phy, &pdata, sizeof(pdata));
212 if (ret)
213 goto err1;
214
215 pdev = platform_device_alloc("nop_usb_xceiv", PLATFORM_DEVID_AUTO);
216 if (!pdev) {
217 ret = -ENOMEM;
218 goto err1;
219 }
220
221 omap->usb3_phy = pdev;
222 pdata.type = USB_PHY_TYPE_USB3;
223
224 ret = platform_device_add_data(omap->usb3_phy, &pdata, sizeof(pdata));
225 if (ret)
226 goto err2;
227
228 ret = platform_device_add(omap->usb2_phy);
229 if (ret)
230 goto err2;
231
232 ret = platform_device_add(omap->usb3_phy);
233 if (ret)
234 goto err3;
235
236 return 0;
237
238err3:
239 platform_device_del(omap->usb2_phy);
240
241err2:
242 platform_device_put(omap->usb3_phy);
243
244err1:
245 platform_device_put(omap->usb2_phy);
246
247 return ret;
248}
249
250static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap) 193static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
251{ 194{
252 struct dwc3_omap *omap = _omap; 195 struct dwc3_omap *omap = _omap;
@@ -356,12 +299,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)
356 return -ENOMEM; 299 return -ENOMEM;
357 } 300 }
358 301
359 ret = dwc3_omap_register_phys(omap);
360 if (ret) {
361 dev_err(dev, "couldn't register PHYs\n");
362 return ret;
363 }
364
365 context = devm_kzalloc(dev, resource_size(res), GFP_KERNEL); 302 context = devm_kzalloc(dev, resource_size(res), GFP_KERNEL);
366 if (!context) { 303 if (!context) {
367 dev_err(dev, "couldn't allocate dwc3 context memory\n"); 304 dev_err(dev, "couldn't allocate dwc3 context memory\n");
@@ -445,10 +382,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)
445 382
446static int dwc3_omap_remove(struct platform_device *pdev) 383static int dwc3_omap_remove(struct platform_device *pdev)
447{ 384{
448 struct dwc3_omap *omap = platform_get_drvdata(pdev);
449
450 platform_device_unregister(omap->usb2_phy);
451 platform_device_unregister(omap->usb3_phy);
452 pm_runtime_put_sync(&pdev->dev); 385 pm_runtime_put_sync(&pdev->dev);
453 pm_runtime_disable(&pdev->dev); 386 pm_runtime_disable(&pdev->dev);
454 device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core); 387 device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);