[PATCH 1/2] usb: dwc2: Option to disable dma descriptor mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dinh Nguyen <dinguyen@xxxxxxxxxx>

Even though the IP supports Descriptor DMA mode, it does not support SPLIT
transactions in this mode. Since the driver can get the Descriptor DMA mode
support from hardware, the driver in its currently form cannot fully support
LS/FS devices connected to a HS Hub when Descriptor DMA mode is enabled in the
driver. Thus, we give the option to disable Descriptor DMA from device tree.

Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxx>
---
 drivers/usb/dwc2/platform.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index eaba547..cb2133c 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -123,6 +123,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
 	struct resource *res;
 	int retval;
 	int irq;
+	u32 prop;
 
 	if (usb_disabled())
 		return -ENODEV;
@@ -135,6 +136,8 @@ static int dwc2_driver_probe(struct platform_device *dev)
 		dwc2_set_all_params(&defparams, -1);
 		params = &defparams;
 	}
+	if (!of_property_read_u32(dev->dev.of_node, "dma-desc-enable", &prop))
+		defparams.dma_desc_enable = prop;
 
 	hsotg = devm_kzalloc(&dev->dev, sizeof(*hsotg), GFP_KERNEL);
 	if (!hsotg)
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux