diff options
author | Peter Mamonov <pmamonov@gmail.com> | 2020-02-27 20:26:46 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-05 14:27:21 +0100 |
commit | a171453d18b65359c6d35f4d0877145be9e896b7 (patch) | |
tree | 674f80da30eaae2b0b139d75187e08a450465c62 /Documentation/user | |
parent | c14498420db89723049c494e6e89b414acd75f76 (diff) | |
download | barebox-a171453d18b65359c6d35f4d0877145be9e896b7.tar.gz barebox-a171453d18b65359c6d35f4d0877145be9e896b7.tar.xz |
usb: host: ehci: distinguish DMA addresses
This patch adds translation from CPU to DMA addresses, which is required for
proper operation on certain architectures like MIPS.
This patch also fixes the bug introduced by 4350744bf5 "usb: ehci-hcd: port
periodic transactions implementation from the u-boot", which is still present
in the original U-Boot code:
td->qt_buffer[0] =
cpu_to_hc32((unsigned long)buffer + i * elementsize);
td->qt_buffer[1] =
cpu_to_hc32((td->qt_buffer[0] + 0x1000) & ~0xfff);
...
In case of a big-endian CPU 0x1000 is added to the byte-swapped value
`td->qt_buffer[0]`, the result is byte swapped once again and stored to
`td->qt_buffer[1]`. This results in erroneous values being stored in
`td->qt_buffer[1..4]`.
N.B.: This patch needs some testing on architectures different from MIPS.
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/user')
0 files changed, 0 insertions, 0 deletions