Commit f9ed3661 authored by William Wu's avatar William Wu Committed by Treehugger Robot
Browse files

UPSTREAM: usb: dwc3: core: leave default DMA if the controller does not support 64-bit DMA



On some DWC3 controllers (e.g. Rockchip SoCs), the DWC3 core
doesn't support 64-bit DMA address width. In this case, this
driver should use the default 32-bit mask. Otherwise, the DWC3
controller will break if it runs on above 4GB physical memory
environment.

This patch reads the DWC_USB3_AWIDTH bits of GHWPARAMS0 which
used for the DMA address width, and only configure 64-bit DMA
mask if the DWC_USB3_AWIDTH is 64.

Bug: 254441685
Fixes: 45d39448 ("usb: dwc3: support 64 bit DMA in platform driver")
Cc: stable <stable@kernel.org>
Reviewed-by: default avatarSven Peter <sven@svenpeter.dev>
Signed-off-by: default avatarWilliam Wu <william.wu@rock-chips.com>
Link: https://lore.kernel.org/r/20220901083446.3799754-1-william.wu@rock-chips.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 91062e66)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I0557881e11288edea471635911bc32e19445136a
parent 90e54784
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment