linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function
@ 2017-10-13  8:26 Chunfeng Yun
  2017-10-13  8:26 ` [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Chunfeng Yun
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Chunfeng Yun @ 2017-10-13  8:26 UTC (permalink / raw)
  To: linux-arm-kernel

This patch uses the simpler dma_set_mask_and_coherent() instead of
doing these as separate steps

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/host/xhci-mtk.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 8fb6065..c197a6d 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platform_device *pdev)
 	}
 
 	/* Initialize dma_mask and coherent_dma_mask to 32-bits */
-	ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
+	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
 	if (ret)
 		goto disable_clk;
 
-	if (!dev->dma_mask)
-		dev->dma_mask = &dev->coherent_dma_mask;
-	else
-		dma_set_mask(dev, DMA_BIT_MASK(32));
-
 	hcd = usb_create_hcd(driver, dev, dev_name(dev));
 	if (!hcd) {
 		ret = -ENOMEM;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-10-22  3:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13  8:26 [PATCH v2 1/9] usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function Chunfeng Yun
2017-10-13  8:26 ` [PATCH v2 2/9] usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Chunfeng Yun
2017-10-13  8:26 ` [PATCH v2 3/9] usb: xhci-mtk: check clock stability of U3_MAC Chunfeng Yun
2017-10-13  8:26 ` [PATCH v2 4/9] usb: xhci-mtk: support option to disable usb3 ports Chunfeng Yun
2017-10-13  8:26 ` [PATCH v2 5/9] usb: xhci-mtk: remove dummy wakeup debounce clocks Chunfeng Yun
2017-10-13 13:49   ` Matthias Brugger
2017-10-13  8:26 ` [PATCH v2 6/9] usb: xhci-mtk: add optional mcu and dma bus clocks Chunfeng Yun
2017-10-13 13:55   ` Matthias Brugger
2017-10-13  8:26 ` [PATCH v2 7/9] usb: host: modify description for MTK xHCI config Chunfeng Yun
2017-10-13 10:32   ` Mathias Nyman
2017-10-16  3:25     ` Chunfeng Yun
2017-10-17 10:20     ` Greg Kroah-Hartman
2017-10-17 10:42       ` Mathias Nyman
2017-10-22  3:31         ` Chunfeng Yun
2017-10-13  8:26 ` [PATCH v2 8/9] dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports Chunfeng Yun
2017-10-13  8:26 ` [PATCH v2 9/9] dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones Chunfeng Yun
2017-10-13 13:56   ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).