mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
usb: dwc3: gadget: Handle DEV_TXF_FLUSH_BYPASS capability
DWC_usb32 IP introduces a new behavior when handling NoStream event for IN endpoints. If the controller is capable of DEV_TXF_FLUSH_BYPASS, then the driver does not need to force to restart stream for IN endpoints. The controller will generate ERDY and restart the stream periodically. Acked-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/65c3070c666cd6b8beeee62d7f8e3e704ebf2d32.1619134559.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
16710380d3
commit
ddae7979cd
2 changed files with 12 additions and 1 deletions
|
@ -379,6 +379,9 @@
|
||||||
#define DWC3_GHWPARAMS7_RAM1_DEPTH(n) ((n) & 0xffff)
|
#define DWC3_GHWPARAMS7_RAM1_DEPTH(n) ((n) & 0xffff)
|
||||||
#define DWC3_GHWPARAMS7_RAM2_DEPTH(n) (((n) >> 16) & 0xffff)
|
#define DWC3_GHWPARAMS7_RAM2_DEPTH(n) (((n) >> 16) & 0xffff)
|
||||||
|
|
||||||
|
/* Global HWPARAMS9 Register */
|
||||||
|
#define DWC3_GHWPARAMS9_DEV_TXF_FLUSH_BYPASS BIT(0)
|
||||||
|
|
||||||
/* Global Frame Length Adjustment Register */
|
/* Global Frame Length Adjustment Register */
|
||||||
#define DWC3_GFLADJ_30MHZ_SDBND_SEL BIT(7)
|
#define DWC3_GFLADJ_30MHZ_SDBND_SEL BIT(7)
|
||||||
#define DWC3_GFLADJ_30MHZ_MASK 0x3f
|
#define DWC3_GFLADJ_30MHZ_MASK 0x3f
|
||||||
|
|
|
@ -730,8 +730,16 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action)
|
||||||
* All stream eps will reinitiate stream on NoStream
|
* All stream eps will reinitiate stream on NoStream
|
||||||
* rejection until we can determine that the host can
|
* rejection until we can determine that the host can
|
||||||
* prime after the first transfer.
|
* prime after the first transfer.
|
||||||
|
*
|
||||||
|
* However, if the controller is capable of
|
||||||
|
* TXF_FLUSH_BYPASS, then IN direction endpoints will
|
||||||
|
* automatically restart the stream without the driver
|
||||||
|
* initiation.
|
||||||
*/
|
*/
|
||||||
dep->flags |= DWC3_EP_FORCE_RESTART_STREAM;
|
if (!dep->direction ||
|
||||||
|
!(dwc->hwparams.hwparams9 &
|
||||||
|
DWC3_GHWPARAMS9_DEV_TXF_FLUSH_BYPASS))
|
||||||
|
dep->flags |= DWC3_EP_FORCE_RESTART_STREAM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue