Skip to content
Commit 91226334 authored by Quanyang Wang's avatar Quanyang Wang Committed by Bruce Ashfield
Browse files

axxia: don't set dev->dma_ops for dma-coherent device



Axm55xx which supports LPAE has a physical memory range that is larger
than 4G. And the USB controller only supports 32-bit DMA mask. This
means if block subsystem passes an address beyond 4G to USB for a DMA
operation, it will result failure unless calling swiotlb to provide the
bounce buffering functionality.

Since from the commit ad3c7b18 ("arm: use swiotlb for bounce buffering
on LPAE configs"), arm can use swiotlb to handle the case above. In arm's
arch_setup_dma_ops, a NULL pointer will be assigned to dev->dma_ops when
CONFIG_LPAE is enabled and all DMA operations will call dma_direct_map_page
which will call swiotlb_map by checking the return value of dma_capable().

But in axxia code, axxia_bus_notifier set dma-coherent device's dma_ops to
be the function arm_coherent_dma_ops forcely and this will result swiotlb
to be ineffective. Remove axxia_buf_notifier and let swiotlb take over
control.

Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
parent 6f603708
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment