VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   35 Branches   59 Tags
author: Geert Uytterhoeven <geert@linux-m68k.org> 2021-06-29 16:04:44 +0200 committer: Emil Renner Berthing <kernel@esmil.dk> 2021-09-12 14:35:03 +0200 commit: f87bd0b12982fa45d15840d9c73642e0f4941864 parent: 47fe98e0517ca426caa90ca2023e47dabe2dc2c7
Commit Summary:
drivers/dma: dw-axi-dmac-starfive: Remove calls specific to ARM64 ACPI
Diffstat:
1 file changed, 2 insertions, 16 deletions
diff --git a/drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c b/drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c
index aee72c10d77f..06bc23c9e341 100644
--- a/drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c
+++ b/drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c
@@ -137,9 +137,6 @@ int dw_dma_async_do_memcpy(void *src, void *dst, size_t size)
 	dma_addr_t src_dma, dst_dma;
 	struct dma_async_tx_descriptor *desc;
 
-	const struct iommu_ops *iommu;
-	u64 dma_addr = 0, dma_size = 0;
-
 	dma_dev = kzalloc(sizeof(*dma_dev), GFP_KERNEL);
 	if(!dma_dev){
 		dev_err(dma_dev, "kmalloc error.\n");
@@ -149,12 +146,7 @@ int dw_dma_async_do_memcpy(void *src, void *dst, size_t size)
 	dma_dev->bus = NULL;
 	dma_dev->coherent_dma_mask = 0xffffffff;
 
-	iort_dma_setup(dma_dev, &dma_addr, &dma_size);
-	iommu = iort_iommu_configure_id(dma_dev, NULL);
-	if (PTR_ERR(iommu) == -EPROBE_DEFER)
-		return -EPROBE_DEFER;
-
-	arch_setup_dma_ops(dma_dev, dst_dma, dma_size, iommu, true);
+	arch_setup_dma_ops(dma_dev, dst_dma, 0, NULL, true);
 
 	if(_dma_async_alloc_buf(dma_dev, &src, &dst, size, &src_dma, &dst_dma)) {
 		dev_err(dma_dev, "Err alloc.\n");
@@ -207,9 +199,6 @@ int dw_dma_memcpy_raw(dma_addr_t src_dma, dma_addr_t dst_dma, size_t size)
 	struct device *dma_dev;
 	struct dma_async_tx_descriptor *desc;
 
-	const struct iommu_ops *iommu;
-	u64 dma_addr = 0, dma_size = 0;
-
 	dma_dev = kzalloc(sizeof(*dma_dev), GFP_KERNEL);
 	if(!dma_dev){
 		DMA_PRINTK("kmalloc error.\n");
@@ -219,12 +208,7 @@ int dw_dma_memcpy_raw(dma_addr_t src_dma, dma_addr_t dst_dma, size_t size)
 	dma_dev->bus = NULL;
 	dma_dev->coherent_dma_mask = 0xffffffff;
 
-	iort_dma_setup(dma_dev, &dma_addr, &dma_size);
-	iommu = iort_iommu_configure_id(dma_dev, NULL);
-	if (PTR_ERR(iommu) == -EPROBE_DEFER)
-		return -EPROBE_DEFER;
-
-	arch_setup_dma_ops(dma_dev, dst_dma, dma_size, iommu, true);
+	arch_setup_dma_ops(dma_dev, dst_dma, 0, NULL, true);
 
 	chan = _dma_get_channel(DMA_MEMCPY);
 	if(!chan){