|
|
@@ -1073,6 +1073,13 @@ static void dwc2_hsotg_start_req(struct dwc2_hsotg *hsotg,
|
|
|
WARN_ON(1);
|
|
|
return;
|
|
|
}
|
|
|
+ } else if (using_dma(hsotg) && hs_ep->dir_in) {
|
|
|
+ unsigned char epnum;
|
|
|
+ for (epnum = 0; epnum < hsotg->num_of_eps; epnum++) {
|
|
|
+ u32 next = DXEPCTL_NEXTEP((epnum + 1) % 15);
|
|
|
+ u32 epinctl = dwc2_readl(hsotg, DIEPCTL(epnum));
|
|
|
+ dwc2_writel(hsotg, next | epinctl, DIEPCTL(epnum));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
dma_reg = dir_in ? DIEPDMA(index) : DOEPDMA(index);
|
|
|
@@ -4178,7 +4185,8 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep,
|
|
|
* if the hardware has dedicated fifos, we must give each IN EP
|
|
|
* a unique tx-fifo even if it is non-periodic.
|
|
|
*/
|
|
|
- if (dir_in && (hsotg->dedicated_fifos || ((desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT))) {
|
|
|
+ if (dir_in && (hsotg->dedicated_fifos || (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT
|
|
|
+ || (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_ISOC)) {
|
|
|
unsigned fifo_count = dwc2_hsotg_tx_fifo_count(hsotg);
|
|
|
u32 fifo_index = 0;
|
|
|
u32 fifo_size = UINT_MAX;
|
|
|
@@ -5089,7 +5097,7 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
|
|
|
dev_err(dev, "failed to allocate ctrl req\n");
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
-
|
|
|
+#if 0
|
|
|
/* initialise the endpoints now the core has been initialised */
|
|
|
for (epnum = 0; epnum < hsotg->num_of_eps; epnum++) {
|
|
|
if (hsotg->eps_in[epnum] && (epnum % 2))
|
|
|
@@ -5104,7 +5112,16 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
|
|
|
else if (epnum)
|
|
|
hsotg->eps_out[epnum] = NULL;
|
|
|
}
|
|
|
-
|
|
|
+#else
|
|
|
+ for (epnum = 0; epnum < hsotg->num_of_eps; epnum++) {
|
|
|
+ if (hsotg->eps_in[epnum])
|
|
|
+ dwc2_hsotg_initep(hsotg, hsotg->eps_in[epnum],
|
|
|
+ epnum, 1);
|
|
|
+ if (hsotg->eps_out[epnum])
|
|
|
+ dwc2_hsotg_initep(hsotg, hsotg->eps_out[epnum],
|
|
|
+ epnum, 0);
|
|
|
+ }
|
|
|
+#endif
|
|
|
dwc2_hsotg_dump(hsotg);
|
|
|
|
|
|
return 0;
|