summaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
authorHuang Shijie <shijie8@gmail.com>2013-12-18 23:40:59 +0800
committerBrian Norris <computersforpeace@gmail.com>2014-01-27 21:55:02 -0800
commit06f216c83c25adadc231469d51ab133afdfe110a (patch)
tree8635f2d05abd664390fa94f39559e0e2a21e629d /mm/util.c
parent464e906737d6eba2fe63e913e0df4306423b4f61 (diff)
downloadop-kernel-dev-06f216c83c25adadc231469d51ab133afdfe110a.zip
op-kernel-dev-06f216c83c25adadc231469d51ab133afdfe110a.tar.gz
mtd: gpmi: allocate a proper buffer for non ECC read/write
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@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud