summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/hw.h
diff options
context:
space:
mode:
authorVahram Aharonyan <vahrama@synopsys.com>2016-11-15 06:16:41 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-18 14:54:47 +0300
commit540ccba08599d9d99696eb7ea85d61e4b1586ec9 (patch)
treec1041565a0831776d52bf6b85d90693eaddbe076 /drivers/usb/dwc2/hw.h
parentf4736701cf9660cbac1261b447617ea7eeebe648 (diff)
downloadlinux-540ccba08599d9d99696eb7ea85d61e4b1586ec9.tar.xz
usb: dwc2: gadget: Start and complete DDMA isoc transfers
For DDMA mode in case of isochronous transfers completion performed differently than other transfer types. This is because each usb request was mapped to one descriptor in the chain and SW gets xfercomplete interrupt on all descriptors. The endpoint remains enabled until HW processes last descriptor with "L" bit set or BNA interrupt gets asserted for IN and OUT endpoints correspondingly. Add function dwc2_gadget_complete_isoc_request_ddma() - completes one isochronous request taken from endpoint's queue. Add function dwc2_gadget_start_next_isoc_ddma() - tries to restart isochronous endpoint if requests are pending. Check for EPENA. If the endpoint was disabled, try to restart it after programming descriptor chain prepared by SW earlier, switch SW to fill the other half of chain. Add function dwc2_gadget_fill_isoc_desc() - initializes DMA descriptor for isochronous transfer based on the received request data and endpoint characteristics. Added function dwc2_gadget_start_isoc_ddma() - prepare DMA chain for isochronous transfer in DDMA, programs corresponding DMA address to DEPDMA, enables the endpoint. This function is called once SW decides to start isochronous IN or OUT transfer depend on reception of NAK or OUTTknEPdis interrupts indicating first isochronous token arrival from host. Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/hw.h')
0 files changed, 0 insertions, 0 deletions