public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] usb: ci_udc: Support larger packets
@ 2014-04-24 23:52 Stephen Warren
  2014-04-24 23:52 ` [U-Boot] [PATCH 2/5] usb: ci_udc: set ep->req.actual after transfer Stephen Warren
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Stephen Warren @ 2014-04-24 23:52 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

ci_ep_queue() currently only fills in the page0/page1 fields in the
queue item. If the buffer is larger than 4KiB (unaligned) or 8KiB
(page-aligned), then this prevents the HW from knowing where to write
the balance of the data.

Fix this by initializing all 5 pageN pointers, which allows up to
16KiB (potentially non-page-aligned) buffers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/usb/gadget/ci_udc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 14b1e9b8bf11..815ce7b262ca 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -350,6 +350,9 @@ static int ci_ep_queue(struct usb_ep *ep,
 	item->info = INFO_BYTES(len) | INFO_IOC | INFO_ACTIVE;
 	item->page0 = (uint32_t)ci_ep->b_buf;
 	item->page1 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x1000;
+	item->page2 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x2000;
+	item->page3 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x3000;
+	item->page4 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x4000;
 	ci_flush_qtd(num);
 
 	head->next = (unsigned) item;
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-28  5:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 23:52 [U-Boot] [PATCH 1/5] usb: ci_udc: Support larger packets Stephen Warren
2014-04-24 23:52 ` [U-Boot] [PATCH 2/5] usb: ci_udc: set ep->req.actual after transfer Stephen Warren
2014-04-24 23:52 ` [U-Boot] [PATCH 3/5] usb: ci_udc: make PHY initialization conditional Stephen Warren
2014-04-24 23:52 ` [U-Boot] [PATCH 4/5] usb: ci_udc: support variants with hostpc register Stephen Warren
2014-04-24 23:52 ` [U-Boot] [PATCH 5/5] usb: ums: use only 1 buffer for CI_UDC Stephen Warren
2014-04-28  5:34 ` [U-Boot] [PATCH 1/5] usb: ci_udc: Support larger packets Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox