diff mbox series

usb: musb: Fix use without CPPI 4.1 DMA controller on DA8xx

Message ID 570852f0a8c9f1a778e666a26f55b9b9186182f0.1598882094.git.esben@geanix.com
State New
Headers show
Series usb: musb: Fix use without CPPI 4.1 DMA controller on DA8xx | expand

Commit Message

Esben Haabendal Aug. 31, 2020, 1:55 p.m. UTC
In d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to
DA8xx") use of musb on da8xx without CPPI 4.1 DMA was broken.

Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx")
Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/usb/musb/da8xx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 1c023c0091c4..48b8c5d5f0bc 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -467,7 +467,10 @@  da8xx_dma_controller_create(struct musb *musb, void __iomem *base)
 
 static const struct musb_platform_ops da8xx_ops = {
 	.quirks		= MUSB_INDEXED_EP | MUSB_PRESERVE_SESSION |
-			  MUSB_DMA_CPPI41 | MUSB_DA8XX,
+#ifdef CONFIG_USB_TI_CPPI41_DMA
+			  MUSB_DMA_CPPI41 |
+#endif
+			  MUSB_DA8XX,
 	.init		= da8xx_musb_init,
 	.exit		= da8xx_musb_exit,
 
@@ -553,10 +556,12 @@  static int da8xx_probe(struct platform_device *pdev)
 	}
 	platform_set_drvdata(pdev, glue);
 
+#ifdef CONFIG_USB_TI_CPPI41_DMA
 	ret = of_platform_populate(pdev->dev.of_node, NULL,
 				   da8xx_auxdata_lookup, &pdev->dev);
 	if (ret)
 		return ret;
+#endif
 
 	memset(musb_resources, 0x00, sizeof(*musb_resources) *
 			ARRAY_SIZE(musb_resources));