summaryrefslogtreecommitdiff
path: root/drivers/uio
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2024-02-02 02:33:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-08 00:52:59 +0300
commit7722151e4651c973c18df0c18c015edcc7b43b25 (patch)
tree647580ae6f55e20a260e19651ee6765bedcdf971 /drivers/uio
parentbfe78793b264f9e7a809f755f8ef5cb9bb163827 (diff)
downloadlinux-7722151e4651c973c18df0c18c015edcc7b43b25.tar.xz
uio_pruss: UIO_MEM_DMA_COHERENT conversion
Conversion of this driver to use UIO_MEM_DMA_COHERENT for dma_alloc_coherent memory instead of UIO_MEM_PHYS. Signed-off-by: Chris Leech <cleech@redhat.com> Link: https://lore.kernel.org/r/20240201233400.3394996-4-cleech@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio_pruss.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c
index 77e2dc404885..72b33f7d4c40 100644
--- a/drivers/uio/uio_pruss.c
+++ b/drivers/uio/uio_pruss.c
@@ -191,9 +191,11 @@ static int pruss_probe(struct platform_device *pdev)
p->mem[1].size = sram_pool_sz;
p->mem[1].memtype = UIO_MEM_PHYS;
- p->mem[2].addr = gdev->ddr_paddr;
+ p->mem[2].addr = (phys_addr_t) gdev->ddr_vaddr;
+ p->mem[2].dma_addr = gdev->ddr_paddr;
p->mem[2].size = extram_pool_sz;
- p->mem[2].memtype = UIO_MEM_PHYS;
+ p->mem[2].memtype = UIO_MEM_DMA_COHERENT;
+ p->mem[2].dma_device = dev;
p->name = devm_kasprintf(dev, GFP_KERNEL, "pruss_evt%d", cnt);
p->version = DRV_VERSION;