Writing to NAND using DMA
ben-linux at fluff.org
Mon Nov 10 09:05:49 EST 2008
On Wed, Nov 05, 2008 at 04:49:58PM +0530, Gaurav Singh wrote:
> I am working on an ST Nomadik board with ST 1 GB NAND chip. Have
> written a board specific driver and trying to use DMA and JFFS2
> filesystem to write data to the NAND .
> I have allocated a nand_buffer structure using dma_alloc_coherent and
> am using this buffer for reading data.
> In case of write however I see that the JFFS2 filesystem has allocated
> a wbuf for writing (using kmalloc). Now I have an option of copying
> this buffer into a dma able buffer of my own but I feel there should
> be a better solution.
> What is your view ? Should JFFS2 provide a dma able buffer to write a
> NAND page ?
This discussion came up at CELF, I belive that there is a move to try
and make the mtd interface take only DMA-safe memory since it is not
only JFFS2 that may be using the NAND driver.
Ben (ben at fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
More information about the linux-mtd