summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2013-09-25 18:41:12 -0700
committerMarek Vasut <marex@denx.de>2013-10-20 23:42:39 +0200
commit5fc2e99732367e7048f8e29592ef2d7aa7d10d14 (patch)
treecc12dabd37aedc2d96c503eaedee6f217df7bbcd /drivers/usb
parent5a904430486102550f53a13f6fe63bb9657e55e1 (diff)
downloadu-boot-imx-5fc2e99732367e7048f8e29592ef2d7aa7d10d14.zip
u-boot-imx-5fc2e99732367e7048f8e29592ef2d7aa7d10d14.tar.gz
u-boot-imx-5fc2e99732367e7048f8e29592ef2d7aa7d10d14.tar.bz2
usb: gadget: mv_udc: flush item before head
Make sure the transfer descriptor is flushed before the queue is updated so that the controller will not see old information. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/mv_udc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
index 0a19dce..c56ccff 100644
--- a/drivers/usb/gadget/mv_udc.c
+++ b/drivers/usb/gadget/mv_udc.c
@@ -335,21 +335,20 @@ static int mv_ep_queue(struct usb_ep *ep,
item->info = INFO_BYTES(len) | INFO_IOC | INFO_ACTIVE;
item->page0 = (uint32_t)mv_ep->b_buf;
item->page1 = ((uint32_t)mv_ep->b_buf & 0xfffff000) + 0x1000;
+ mv_flush_qtd(num);
head->next = (unsigned) item;
head->info = 0;
DBG("ept%d %s queue len %x, buffer %p\n",
num, in ? "in" : "out", len, mv_ep->b_buf);
+ mv_flush_qh(num);
if (in)
bit = EPT_TX(num);
else
bit = EPT_RX(num);
- mv_flush_qh(num);
- mv_flush_qtd(num);
-
writel(bit, &udc->epprime);
return 0;