From: lyz Date: Wed, 14 Aug 2013 08:21:42 +0000 (+0800) Subject: usb: gadget: support full-speed isoc transfer X-Git-Tag: firefly_0821_release~6726^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c9b65eb167e9b59102a1fef8387d2229dccadbf;p=firefly-linux-kernel-4.4.55.git usb: gadget: support full-speed isoc transfer --- diff --git a/drivers/usb/dwc_otg/dwc_otg_cil.c b/drivers/usb/dwc_otg/dwc_otg_cil.c index f14534394a4c..f1e39436f553 100755 --- a/drivers/usb/dwc_otg/dwc_otg_cil.c +++ b/drivers/usb/dwc_otg/dwc_otg_cil.c @@ -2240,7 +2240,10 @@ void dwc_otg_ep_start_transfer(dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) (_ep->xfer_len - 1 + _ep->maxpacket) / _ep->maxpacket; } - + if (_ep->type == DWC_OTG_EP_TYPE_ISOC) + { + deptsiz.b.mc = 1; + } dwc_write_reg32(&in_regs->dieptsiz, deptsiz.d32); /* Write the DMA register */ @@ -2279,7 +2282,19 @@ void dwc_otg_ep_start_transfer(dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) } } } - + if (_ep->type == DWC_OTG_EP_TYPE_ISOC) + { + dsts_data_t dsts = {.d32 = 0 }; + dsts.d32 = dwc_read_reg32(&_core_if->dev_if->dev_global_regs->dsts); + if (dsts.b.soffn & 0x1) + { + depctl.b.setd0pid = 1; + } + else + { + depctl.b.setd1pid = 1; + } + } /* EP enable, IN data in FIFO */ depctl.b.cnak = 1; depctl.b.epena = 1;