| db191346 | 10-Aug-2012 |
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> |
ehci: Optimize qTD allocations
Relax the qTD transfer alignment constraints in order to need less qTDs for buffers that are aligned to 512 bytes but not to pages.
Signed-off-by: Benoît Thébaudeau <
ehci: Optimize qTD allocations
Relax the qTD transfer alignment constraints in order to need less qTDs for buffers that are aligned to 512 bytes but not to pages.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
show more ...
|
| 5cec214e | 10-Aug-2012 |
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> |
ehci-hcd: Boost transfer speed
This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid software and transfer splitting overhead so as to make transfers as fast as possible.
T
ehci-hcd: Boost transfer speed
This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid software and transfer splitting overhead so as to make transfers as fast as possible.
The only drawback is a call to memalign. However, this is fast compared to the transfer timings, and the heap size to allocate is small, e.g. 128 kiB in the worst case for a transfer length of 65535 packets of 512 bytes.
Tested on i.MX25, i.MX35 and i.MX51. In my test conditions, the speed gain was very significant (several times faster), which is really appreciable when accessing large files.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
show more ...
|
| 14eb79b7 | 10-Aug-2012 |
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> |
ehci: cosmetic: Define used constants
Make some light cosmetic code cleanup by the way.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Ya
ehci: cosmetic: Define used constants
Make some light cosmetic code cleanup by the way.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
show more ...
|
| 189a6956 | 15-Jul-2012 |
Ilya Yanok <ilya.yanok@cogentembedded.com> |
ehci-hcd: fix external buffer cache handling
Buffer coming from upper layers should be cacheline aligned/padded to perform safe cache operations. For now we don't do bounce buffering so getting unal
ehci-hcd: fix external buffer cache handling
Buffer coming from upper layers should be cacheline aligned/padded to perform safe cache operations. For now we don't do bounce buffering so getting unaligned buffer is an upper layer error. We can't check if the buffer is properly padded with current interface so just assume it is (consider changing with in the future). The following changes are done:
1. Remove useless length alignment check. We get actual transfer length not the size of the underlying buffer so it's perfectly valid for it to be unaligned. 2. Move flush_dcache_range() out of while loop or it will flush too much. 3. Don't try to fix buffer address before calling invalidate: if it's unaligned it's an error anyway so let cache subsystem cry about that. 4. Fix end buffer address to be cacheline aligned assuming upper layer reserved enough space. This is potentially dangerous operation so upper layers should be careful about that.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
show more ...
|
| 71c5de4f | 15-Jul-2012 |
Tom Rini <trini@ti.com> |
ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
The USB spec says that 32 bytes is the minimum required alignment. However on some platforms we have a larger minimum re
ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
The USB spec says that 32 bytes is the minimum required alignment. However on some platforms we have a larger minimum requirement for cache coherency. In those cases, use that value rather than the USB spec minimum. We add a cpp check to <usb.h> to define USB_DMA_MINALIGN and make use of it in ehci-hcd.c and musb_core.h. We cannot use MAX() here as we are not allowed to have tests inside of align(...).
Signed-off-by: Tom Rini <trini@ti.com> [marek.vasut]: introduce some crazy macro voodoo Signed-off-by: Marek Vasut <marex@denx.de> [ilya.yanok]: moved external buffer fixes to separate patch, we use {ALLOC,DEFINE}_ALIGN_BUFFER macros with alignment of USB_DMA_MINALIGN for qh_list, qh and qtd structures to make sure they are proper aligned for both controller and cache operations. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
show more ...
|
| c7701af5 | 15-Jul-2012 |
Ilya Yanok <ilya.yanok@cogentembedded.com> |
ehci-hcd: program asynclistaddr before every transfer
Move or_asynclistaddr programming to ehci_submit_async() function to make sure queue head is properly programmed before every transfer. This sol
ehci-hcd: program asynclistaddr before every transfer
Move or_asynclistaddr programming to ehci_submit_async() function to make sure queue head is properly programmed before every transfer. This solves the problem with changing qh address.
Also remove unneeded qh_list->qh_link reprogramming at the end of transfer.
Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
show more ...
|
| 81f40345 | 28-Jun-2012 |
Andreas Bießmann <andreas.devel@googlemail.com> |
ehci-atmel: fix compiler warning
Commit 7a101e946cba55e32d3d1265e30456c810046da3 introduced following warning: ---8<--- ehci-atmel.c: In function 'ehci_hcd_init': ehci-atmel.c:49:2: warning: suggest
ehci-atmel: fix compiler warning
Commit 7a101e946cba55e32d3d1265e30456c810046da3 introduced following warning: ---8<--- ehci-atmel.c: In function 'ehci_hcd_init': ehci-atmel.c:49:2: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] ehci-atmel.c: In function 'ehci_hcd_stop': ehci-atmel.c:79:2: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] --->8---
This patch fixes it.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> cc: Bo Shen <voice.shen@atmel.com> cc: Marek Vasut <marex@denx.de>
show more ...
|
| 41b1f0ac | 09-Apr-2012 |
Marek Vasut <marex@denx.de> |
USB: Document the QH and qTD antics in EHCI-HCD
The construction of QH and qTD lists in ehci_submit_async() call is cryptic business, add at least a bit of comments so if someone is reading it, he c
USB: Document the QH and qTD antics in EHCI-HCD
The construction of QH and qTD lists in ehci_submit_async() call is cryptic business, add at least a bit of comments so if someone is reading it, he can at least reference the intel ehci manual (ehci-r10.pdf).
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
show more ...
|