Skip to content

Commit 7722151

Browse files
cleechgregkh
authored andcommitted
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>
1 parent bfe7879 commit 7722151

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/uio/uio_pruss.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,11 @@ static int pruss_probe(struct platform_device *pdev)
191191
p->mem[1].size = sram_pool_sz;
192192
p->mem[1].memtype = UIO_MEM_PHYS;
193193

194-
p->mem[2].addr = gdev->ddr_paddr;
194+
p->mem[2].addr = (phys_addr_t) gdev->ddr_vaddr;
195+
p->mem[2].dma_addr = gdev->ddr_paddr;
195196
p->mem[2].size = extram_pool_sz;
196-
p->mem[2].memtype = UIO_MEM_PHYS;
197+
p->mem[2].memtype = UIO_MEM_DMA_COHERENT;
198+
p->mem[2].dma_device = dev;
197199

198200
p->name = devm_kasprintf(dev, GFP_KERNEL, "pruss_evt%d", cnt);
199201
p->version = DRV_VERSION;

0 commit comments

Comments
 (0)