[PATCH 1/2] mtd: gpmi: allocate a proper buffer for non ECC read/write

Brian Norris computersforpeace at gmail.com
Tue Jan 28 00:55:51 EST 2014


On Wed, Dec 18, 2013 at 11:40:59PM +0800, Huang Shijie wrote:
> The @data_buffer_dma buffer is used for non ECC read/write.
> 
> Currently, the length of the buffer is PAGE_SIZE, but the NAND chip may
> has 8K page or 16K page. So we have to extend it for the large page NAND
> chips.
> 
> The gpmi_alloc_dma_buffer will be called twice. The first time is to
> allocate a temporary buffer for scanning the NAND chip; The second time
> is to allocate a buffer to store the real page content.
> 
> This patch allocates a buffer of PAGE_SIZE size for scanning the NAND
> chip when gpmi_alloc_dma_buffer is called the first time, and allocates a
> buffer of the real NAND page size for the second time gpmi_alloc_dma_buffer
> is called.
> 
> Signed-off-by: Huang Shijie <shijie8 at gmail.com>

Pushed these two to l2-mtd.git/master, since they are bugfixes. I plan
to submit a pull request soon, so please holler ASAP if you object.

Brian



More information about the linux-mtd mailing list