[PATCH v11 2/2] mtd: rawnand: Add Loongson-1 NAND Controller Driver
Miquel Raynal
miquel.raynal at bootlin.com
Mon Jan 20 00:10:04 PST 2025
>> >> Don't you need a dma_addr_t here instead? You shall remap the resource.
>> >>
>> > Sorry, I don't quite understand.
>> > 'dma_base' is already of type dma_addr_t.
>>
>> I didn't identify where the dma_base was remapped, but if that's already
>> done then we're good.
>
> Perhaps I misunderstand the usage of dma_map_resource(). dma_base is
> the physical address and will be written to the DMA controller
> register at last.
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.
Thanks,
Miquèl
More information about the linux-mtd
mailing list