Thread (1 message) 1 message, 1 author, 2025-01-20

Re: [PATCH v11 2/2] mtd: rawnand: Add Loongson-1 NAND Controller Driver

From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: 2025-01-20 12:54:19
Also in: linux-media, lkml

quoted
IIUC, yes and no. It is the remapped address of the physical address you
want to reach, not the physical address itself. The type is dma_addr_t
and not phys_addr_t and you can get a dma address out of a physical
address with a call to dma_map_resource(). The numerical value might be
the same if there is no IO-MMU involved, but the good practice is to
remap anyway.
Got it. I will keep dma_map_resource() as it is, which is called in
ls1x_nand_probe().

+       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand-dma");
+       host->dma_base = dma_map_resource(dev, res->start, resource_size(res),
+                                         DMA_BIDIRECTIONAL, 0);
+       if (dma_mapping_error(dev, host->dma_base))
+               return -ENXIO;
Looks correct.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help