Skip to content
Commit 00881bc7 authored by Mark Kettenis's avatar Mark Kettenis Committed by Tom Rini
Browse files

usb: xhci: Implement DMA mapping



An XHCI controller that sits behind an IOMMU needs to map and unmap
its memory buffers to do DMA.  Implement this by inroducing new
xhci_dma_map() and xhci_dma_unmap() helper functions.  The
xhci_dma_map() function replaces the existing xhci_virt_to_bus()
function in the sense that it returns the bus address in the case
of simple address translation in the absence of an IOMMU.  The
xhci_bus_to_virt() function is eliminated by storing the CPU
address of the allocated scratchpad memory in struct xhci_ctrl.

Signed-off-by: default avatarMark Kettenis <kettenis@openbsd.org>
Reviewed-by: default avatarMarek Vasut <marex@denx.de>
parent 2ed97c10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment