aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c34452a7304f..79a24fab13d1 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -50,6 +50,7 @@
50#include <linux/dma-mapping.h> 50#include <linux/dma-mapping.h>
51#include <linux/of.h> 51#include <linux/of.h>
52 52
53#include <linux/usb/otg.h>
53#include <linux/usb/ch9.h> 54#include <linux/usb/ch9.h>
54#include <linux/usb/gadget.h> 55#include <linux/usb/gadget.h>
55 56
@@ -136,6 +137,8 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc)
136 reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST; 137 reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
137 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); 138 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
138 139
140 usb_phy_init(dwc->usb2_phy);
141 usb_phy_init(dwc->usb3_phy);
139 mdelay(100); 142 mdelay(100);
140 143
141 /* Clear USB3 PHY reset */ 144 /* Clear USB3 PHY reset */
@@ -465,6 +468,18 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
465 return -ENOMEM; 468 return -ENOMEM;
466 } 469 }
467 470
471 dwc->usb2_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
472 if (IS_ERR_OR_NULL(dwc->usb2_phy)) {
473 dev_err(dev, "no usb2 phy configured\n");
474 return -EPROBE_DEFER;
475 }
476
477 dwc->usb3_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB3);
478 if (IS_ERR_OR_NULL(dwc->usb3_phy)) {
479 dev_err(dev, "no usb3 phy configured\n");
480 return -EPROBE_DEFER;
481 }
482
468 spin_lock_init(&dwc->lock); 483 spin_lock_init(&dwc->lock);
469 platform_set_drvdata(pdev, dwc); 484 platform_set_drvdata(pdev, dwc);
470 485