From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] 
On Behalf Of Felipe Balbi
Sent: Thursday, September 25, 2014 7:51 AM

> On Thu, Sep 25, 2014 at 03:21:46PM +0800, Huang Rui wrote:
> > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> > index 0fcc0a3..8277065 100644
> > --- a/drivers/usb/dwc3/gadget.c
> > +++ b/drivers/usb/dwc3/gadget.c
> > @@ -2635,6 +2635,7 @@ static irqreturn_t dwc3_interrupt(int irq, void *_dwc)
> >   */
> >  int dwc3_gadget_init(struct dwc3 *dwc)
> >  {
> > +   u32                                     reg;
> >     int                                     ret;
> >
> >     dwc->ctrl_req = dma_alloc_coherent(dwc->dev, sizeof(*dwc->ctrl_req),
> > @@ -2689,6 +2690,13 @@ int dwc3_gadget_init(struct dwc3 *dwc)
> >     if (ret)
> >             goto err4;
> >
> > +   if (dwc->quirks & DWC3_AMD_NL_PLAT) {
> > +           reg = dwc3_readl(dwc->regs, DWC3_DCTL);
> > +           reg |= DWC3_DCTL_LPM_ERRATA(0xf);
> 
> weird, why would Synopsys put this here ? It seems like this is only
> useful when LPM Errata is enabled and that's, apparently, a host-side
> thing.
> 
> Paul, can you comment ?

These bits contribute to how the device responds to an LPM transaction
from the host. If DCFG.LPMCap=1, they set the BESL value above which
the core will send a NYET. If DCFG.LPMCap=0, they have no effect. So
it's definitely a device-side thing, but only if the core is configured
with LPM Errata support enabled.

-- 
Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to