mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
usb: gadget: fsl_udc: wmb ep_td struct when submitting to controller
Since these get allocated dmacoherent instead of noncacheable in armv7, we need to do wmb before handing them to hardware. Change-Id: I413eeb6da3bfeb754c4b475b19fe5823d83d3d04 Signed-off-by: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com>
This commit is contained in:
@@ -670,6 +670,9 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
|
||||
? (1 << (ep_index(ep) + 16))
|
||||
: (1 << (ep_index(ep)));
|
||||
|
||||
/* Flush all the dTD structs out to memory */
|
||||
wmb();
|
||||
|
||||
/* check if the pipe is empty */
|
||||
if (!(list_empty(&ep->queue))) {
|
||||
/* Add td to the end */
|
||||
@@ -677,6 +680,7 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
|
||||
lastreq = list_entry(ep->queue.prev, struct fsl_req, queue);
|
||||
lastreq->tail->next_td_ptr =
|
||||
cpu_to_le32(req->head->td_dma & DTD_ADDR_MASK);
|
||||
wmb();
|
||||
/* Read prime bit, if 1 goto done */
|
||||
if (fsl_readl(&dr_regs->endpointprime) & bitmask)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user