[PATCH v2] usb: musb: Fix use without CPPI 4.1 DMA controller on DA8xx

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

 



In commit 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@xxxxxxxxxx>
---
 drivers/usb/musb/da8xx.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 1c023c0091c4..4bdf704d078e 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);
 
-	ret = of_platform_populate(pdev->dev.of_node, NULL,
-				   da8xx_auxdata_lookup, &pdev->dev);
-	if (ret)
-		return ret;
+	if (IS_ENABLED(CONFIG_USB_TI_CPPI41_DMA)) {
+		ret = of_platform_populate(pdev->dev.of_node, NULL,
+					   da8xx_auxdata_lookup, &pdev->dev);
+		if (ret)
+			return ret;
+	}
 
 	memset(musb_resources, 0x00, sizeof(*musb_resources) *
 			ARRAY_SIZE(musb_resources));
-- 
2.28.0




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

  Powered by Linux