From: Robert Baldyga Date: Mon, 23 Feb 2015 14:58:30 +0000 (+0100) Subject: dwc3: core: fix SUSPHY problem X-Git-Tag: submit/tizen/20150416.081342~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87bbcd31e16586d5923ea96485a8cd59f2e918db;p=platform%2Fkernel%2Flinux-exynos.git dwc3: core: fix SUSPHY problem This is needed for OTG mode. Without this change endpoint enabling in gadget mode fails after role switching. Signed-off-by: Robert Baldyga --- diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 5c7a849b2e1c..a10583a23297 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -113,6 +113,14 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc) reg &= ~DWC3_GCTL_CORESOFTRESET; dwc3_writel(dwc->regs, DWC3_GCTL, reg); + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); + reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); + + reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); + reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); + return 0; }