diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-09 19:27:40 -0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:17 +0200 |
commit | 9962b62f1be95c981c4d9307921f15e232f4d603 (patch) | |
tree | 21f94033a4cedc507b9fc0f820eff4a7d6098e3a /drivers/usb/dwc2/params.c | |
parent | 5fb6fdaf38f71ad15ae85b1c4b4d94e8865e7284 (diff) | |
download | linux-9962b62f1be95c981c4d9307921f15e232f4d603.tar.bz2 |
usb: dwc2: Deprecate g-use-dma binding
This is not needed as the gadget now fully supports DMA and it can
autodetect it. This was initially added because gadget DMA mode was only
partially implemented so could not be automatically enabled.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/params.c')
-rw-r--r-- | drivers/usb/dwc2/params.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 2eb79e8bee7f..74c3728f77d9 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -1086,6 +1086,19 @@ static void dwc2_set_param_tx_fifo_sizes(struct dwc2_hsotg *hsotg) } } +static void dwc2_set_gadget_dma(struct dwc2_hsotg *hsotg) +{ + struct dwc2_hw_params *hw = &hsotg->hw_params; + struct dwc2_core_params *p = &hsotg->params; + bool dma_capable = !(hw->arch == GHWCFG2_SLAVE_ONLY_ARCH); + + /* Buffer DMA */ + dwc2_set_param_bool(hsotg, &p->g_dma, + false, "gadget-dma", + true, false, + dma_capable); +} + /** * dwc2_set_parameters() - Set all core parameters. * @@ -1161,9 +1174,7 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, (hsotg->dr_mode == USB_DR_MODE_OTG)) { dev_dbg(hsotg->dev, "Setting peripheral device properties\n"); - dwc2_set_param_bool(hsotg, &p->g_dma, true, "g-use-dma", - false, false, - dma_capable); + dwc2_set_gadget_dma(hsotg); /* * The values for g_rx_fifo_size (2048) and |