diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2017-04-18 08:32:26 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:26 (GMT) |
commit | 41dc74435b8ee1f5b9e4fa21101783bb0940a842 (patch) | |
tree | 43e108fedaad4a7040a3fa794ec5894529494e7e | |
parent | 349b4154d03133d282f839a812f2c349ead9cdb9 (diff) | |
download | linux-41dc74435b8ee1f5b9e4fa21101783bb0940a842.tar.xz |
usb: dwc3: initiated xhci probe problem in arm64 4.4 kernel due to DMA setup
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
-rw-r--r-- | drivers/usb/dwc3/host.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 626d87d..1505384 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -17,6 +17,8 @@ #include <linux/platform_device.h> +#include <linux/of_device.h> + #include "core.h" int dwc3_host_init(struct dwc3 *dwc) @@ -73,9 +75,12 @@ int dwc3_host_init(struct dwc3 *dwc) return -ENOMEM; } - dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); + if (IS_ENABLED(CONFIG_OF) && dwc->dev->of_node) + of_dma_configure(&xhci->dev, dwc->dev->of_node); + else + dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); - xhci->dev.parent = dwc->dev; + xhci->dev.parent = dwc->dev; xhci->dev.dma_mask = dwc->dev->dma_mask; xhci->dev.dma_parms = dwc->dev->dma_parms; |