]> git.baikalelectronics.ru Git - uboot.git/commit
xhci: translate virtual addresses into the bus's address space
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tue, 12 Jan 2021 12:55:28 +0000 (13:55 +0100)
committerMatthias Brugger <mbrugger@suse.com>
Thu, 18 Feb 2021 10:56:26 +0000 (11:56 +0100)
commitdd66043c3c22136dc43c7cce9834ca6b25b00885
tree9af29e23ffb041f64c9ea866ec39c25f08a58688
parente59004c5cb0f6bd8f5a99017a31239c496a7c06f
xhci: translate virtual addresses into the bus's address space

So far we've been content with passing physical addresses when
configuring memory addresses into XHCI controllers, but not all
platforms have buses with transparent mappings. Specifically the
Raspberry Pi 4 might introduce an offset to memory accesses incoming
from its PCIe port.

Introduce xhci_virt_to_bus() and xhci_bus_to_virt() to cater with these
limitations, and make sure we don't break non DM users.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
[mb: fix compilation for 32 bit]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
fix from nicolas
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
include/usb/xhci.h