Skip to content

Commit

Permalink
usb: dwc3: gadget: fix GCTL programming
Browse files Browse the repository at this point in the history
ensure a few bits are cleared before enabling
what we need.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Sep 9, 2011
1 parent f78d32e commit 771f184
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 771f184

Please sign in to comment.