[PATCH v2] mtd: nand: Add support to use nand_base poi databuf as bounce buffer

Huang Shijie b32955 at freescale.com
Mon Apr 28 02:08:24 PDT 2014


On Fri, Apr 25, 2014 at 12:10:43PM -0400, Kamal Dasu wrote:
> Huang,
> 
> "In the gpmi driver, i do a memcpy for the highmem buffer passed from
> upper layer."
> 
> In other l2-mtd driver examples when the mapping fails those drivers
> are reverting to bouce buffering using kmall'd dma buffer and memcpy
> to highmem buffer. So the solutions have been implemented in the
> l2-mtd (lowest level nand controller) driver.
> 
> In contrast this in change in nand_base uses the generic mm api
> virt_addr_valid() to check if the passed address is in highmem, and if
> it is I am not trying to convert(map) it, rather using the kmalloc'd
> databuf in nand_base and memcpy to/from the highmem buffer. Also
I think your idea is good.  :)

If your patch can be merged to kernel, it mean the driver can always do the
DMA mapping sucessfully(Am i right?). And it makes the gpmi driver more simple.

See my comment in the orginal patch.

thanks
Huang Shijie





More information about the linux-mtd mailing list