diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-10-31 22:25:40 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 11:48:26 +0200 |
commit | 3140e8cbfec18ecb9c9ef856933fdb98c09af1e8 (patch) | |
tree | c4aad9489eabb168e4bf3eaa5006194286a2a158 /drivers/usb/dwc3/gadget.c | |
parent | c2da2ff00606ae008f0e233bd29c3307d0c3ce85 (diff) |
usb: dwc3: use a helper function for operation mode setting
There are two where need to set operational mode:
- during initialization while we decide to run in host,device or DRD
mode
- at runtime via the debugfs interface.
This patch provides a new function which sets the operational mode and
moves its initialiation to the mode switch instead in the gadget code
itself.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index b84418e8877..fab4ee0082e 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1158,9 +1158,7 @@ static int dwc3_gadget_start(struct usb_gadget *g, reg = dwc3_readl(dwc->regs, DWC3_GCTL); 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); switch (DWC3_GHWPARAMS1_EN_PWROPT(dwc->hwparams.hwparams0)) { case DWC3_GHWPARAMS1_EN_PWROPT_CLK: |