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>
这个提交包含在:
John Youn
2016-11-09 19:27:40 -08:00
提交者 Felipe Balbi
父节点 5fb6fdaf38
当前提交 9962b62f1b
修改 9 个文件,包含 18 行新增13 行删除

查看文件

@@ -418,9 +418,7 @@ enum dwc2_ep0_state {
* needed.
* 0 - No (default)
* 1 - Yes
* @g_dma: If true, enables dma usage on the device. This
* setting is not auto-detected. It must be
* explicitly enabled (default: false).
* @g_dma: Enables gadget dma usage (default: autodetect).
* @g_rx_fifo_size: The periodic rx fifo size for the device, in
* DWORDS from 16-32768 (default: 2048 if
* possible, otherwise autodetect).

查看文件

@@ -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

查看文件

@@ -67,7 +67,6 @@ static int dwc2_pci_quirks(struct pci_dev *pdev, struct platform_device *dwc2)
if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
pdev->device == PCI_PRODUCT_ID_HAPS_HSOTG) {
struct property_entry properties[] = {
PROPERTY_ENTRY_BOOL("g-use-dma"),
{ },
};