diff options
author | Felipe Balbi <balbi@ti.com> | 2011-09-08 17:42:11 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-09-09 13:05:25 +0300 |
commit | 771f184ecebf34929a849eaa707aa463234254f7 (patch) | |
tree | 1b43e1e3a1e84f20a5612acf62f1df8c6f0be8fb /drivers/usb | |
parent | f78d32e79ea3218da34e78ccca4eb4de14f2512d (diff) | |
download | linux-771f184ecebf34929a849eaa707aa463234254f7.tar.gz linux-771f184ecebf34929a849eaa707aa463234254f7.tar.bz2 linux-771f184ecebf34929a849eaa707aa463234254f7.zip |
usb: dwc3: gadget: fix GCTL programming
ensure a few bits are cleared before enabling
what we need.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1de4d3f87569..6c64c7385314 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1150,13 +1150,10 @@ static int dwc3_gadget_start(struct usb_gadget *g, reg = dwc3_readl(dwc->regs, DWC3_GCTL); - /* - * REVISIT: power down scale might be different - * depending on PHY used, need to pass that via platform_data - */ - reg |= DWC3_GCTL_PWRDNSCALE(0x61a) - | DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_DEVICE); + reg &= ~DWC3_GCTL_SCALEDOWN(3); + reg &= ~DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_OTG); reg &= ~DWC3_GCTL_DISSCRAMBLE; + reg |= DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_DEVICE); /* * WORKAROUND: DWC3 revisions <1.90a have a bug |