diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-26 11:38:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-26 11:38:21 +0300 |
commit | 67102bd31b4e31abb0abbc390381212a2d65db72 (patch) | |
tree | 904754c940eb87b951cf877f09074a7d28bc2947 /drivers/usb/dwc3 | |
parent | ad5dbfc123e6ffbbde194e2a4603323e09f741ee (diff) | |
parent | f76349cf41451c5c42a99f18a9163377e4b364ff (diff) | |
download | linux-67102bd31b4e31abb0abbc390381212a2d65db72.tar.xz |
Merge 6.0-rc7 into usb-next
We need the USB fixes in here for other follow-on changes to be able to
be applied successfully.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 554e00584c97..c0051e250d61 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1775,12 +1775,6 @@ static int dwc3_probe(struct platform_device *pdev) dwc3_get_properties(dwc); - if (!dwc->sysdev_is_parent) { - ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64)); - if (ret) - return ret; - } - dwc->reset = devm_reset_control_array_get_optional_shared(dev); if (IS_ERR(dwc->reset)) { ret = PTR_ERR(dwc->reset); @@ -1860,6 +1854,13 @@ static int dwc3_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dwc); dwc3_cache_hwparams(dwc); + if (!dwc->sysdev_is_parent && + DWC3_GHWPARAMS0_AWIDTH(dwc->hwparams.hwparams0) == 64) { + ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64)); + if (ret) + goto disable_clks; + } + spin_lock_init(&dwc->lock); mutex_init(&dwc->mutex); |