diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2016-11-15 15:11:55 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 14:54:50 +0300 |
commit | 4be0080c18fb41a95ab47ba7caff8359582457f9 (patch) | |
tree | af10731e1f8fdcd6a8ed8feb7e79bafac542bc65 /drivers/usb/dwc2 | |
parent | 38e9002b85672352f8693c82192c8029586dd86d (diff) | |
download | linux-4be0080c18fb41a95ab47ba7caff8359582457f9.tar.xz |
usb: dwc2: fixes host_dma logic
This patch moves the the host_dma initialization
before dwc2_set_param_dma_desc_enable() and
dwc2_set_param_dma_desc_fs_enable(). The reason being
that both function need it.
Fixes: 1205489cee75bf39 ("usb: dwc2: Get host DMA device properties")
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/params.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 1bf3b0936d87..513556a59f38 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -1123,9 +1123,6 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, bool dma_capable = !(hw->arch == GHWCFG2_SLAVE_ONLY_ARCH); dwc2_set_param_otg_cap(hsotg, params->otg_cap); - dwc2_set_param_dma_desc_enable(hsotg, params->dma_desc_enable); - dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable); - if ((hsotg->dr_mode == USB_DR_MODE_HOST) || (hsotg->dr_mode == USB_DR_MODE_OTG)) { dev_dbg(hsotg->dev, "Setting HOST parameters\n"); @@ -1135,6 +1132,8 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, true, false, dma_capable); } + dwc2_set_param_dma_desc_enable(hsotg, params->dma_desc_enable); + dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable); dwc2_set_param_host_support_fs_ls_low_power(hsotg, params->host_support_fs_ls_low_power); |