Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: dw-edma-pcie: switch from 'pci_' to 'dma_' API

The wrappers in include/linux/pci-dma-compat.h should go away.

pci_set_dma_mask()/pci_set_consistent_dma_mask() should be
replaced with dma_set_mask()/dma_set_coherent_mask(),
and use dma_set_mask_and_coherent() for both.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1633663733-47199-2-git-send-email-wangqing@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Wang Qing and committed by
Vinod Koul
ecb8c88b 4c0eee50

+4 -13
+4 -13
drivers/dma/dw-edma/dw-edma-pcie.c
··· 186 186 pci_set_master(pdev); 187 187 188 188 /* DMA configuration */ 189 - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 189 + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 190 190 if (!err) { 191 - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 192 - if (err) { 193 - pci_err(pdev, "consistent DMA mask 64 set failed\n"); 194 - return err; 195 - } 191 + pci_err(pdev, "DMA mask 64 set failed\n"); 192 + return err; 196 193 } else { 197 194 pci_err(pdev, "DMA mask 64 set failed\n"); 198 195 199 - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); 196 + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 200 197 if (err) { 201 198 pci_err(pdev, "DMA mask 32 set failed\n"); 202 - return err; 203 - } 204 - 205 - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); 206 - if (err) { 207 - pci_err(pdev, "consistent DMA mask 32 set failed\n"); 208 199 return err; 209 200 } 210 201 }