mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-27 15:12:21 +00:00
ehci: cosmetic: Define the number of qt_buffers
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>
This commit is contained in:
parent
27e301e5b7
commit
cdeb916120
2 changed files with 8 additions and 7 deletions
|
@ -183,7 +183,7 @@ static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz)
|
||||||
flush_dcache_range(addr, ALIGN(addr + sz, ARCH_DMA_MINALIGN));
|
flush_dcache_range(addr, ALIGN(addr + sz, ARCH_DMA_MINALIGN));
|
||||||
|
|
||||||
idx = 0;
|
idx = 0;
|
||||||
while (idx < 5) {
|
while (idx < QT_BUFFER_CNT) {
|
||||||
td->qt_buffer[idx] = cpu_to_hc32(addr);
|
td->qt_buffer[idx] = cpu_to_hc32(addr);
|
||||||
td->qt_buffer_hi[idx] = 0;
|
td->qt_buffer_hi[idx] = 0;
|
||||||
next = (addr + 4096) & ~4095;
|
next = (addr + 4096) & ~4095;
|
||||||
|
@ -195,7 +195,7 @@ static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz)
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx == 5) {
|
if (idx == QT_BUFFER_CNT) {
|
||||||
printf("out of buffer pointers (%u bytes left)\n", sz);
|
printf("out of buffer pointers (%u bytes left)\n", sz);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,8 +175,9 @@ struct qTD {
|
||||||
#define QT_NEXT_TERMINATE 1
|
#define QT_NEXT_TERMINATE 1
|
||||||
uint32_t qt_altnext; /* see EHCI 3.5.2 */
|
uint32_t qt_altnext; /* see EHCI 3.5.2 */
|
||||||
uint32_t qt_token; /* see EHCI 3.5.3 */
|
uint32_t qt_token; /* see EHCI 3.5.3 */
|
||||||
uint32_t qt_buffer[5]; /* see EHCI 3.5.4 */
|
#define QT_BUFFER_CNT 5
|
||||||
uint32_t qt_buffer_hi[5]; /* Appendix B */
|
uint32_t qt_buffer[QT_BUFFER_CNT]; /* see EHCI 3.5.4 */
|
||||||
|
uint32_t qt_buffer_hi[QT_BUFFER_CNT]; /* Appendix B */
|
||||||
/* pad struct for 32 byte alignment */
|
/* pad struct for 32 byte alignment */
|
||||||
uint32_t unused[3];
|
uint32_t unused[3];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue