[PATCH 12/13] mtd: nand: pxa3xx-nand: Increase data buffer size

Ezequiel Garcia
2013-07-29T23:25:40Z

Devices with 4 KiB pages (plus OOB data) can be detected, so we increase
the data buffer size. A better solution would be to allocate a buffer
depending on the detected page size, but that's not possible given
we need the buffer prior to the device detection.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index ccb8636..ed47f14 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -892,7 +892,7 @@ static int pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
* is: 2048 + 64 = 2112 bytes, allocate a page here for both the
* data buffer and the DMA descriptor
*/
-#define MAX_BUFF_SIZE PAGE_SIZE
+#define MAX_BUFF_SIZE (PAGE_SIZE*2)

#ifdef ARCH_HAS_DMA
static int pxa3xx_nand_init_buff(struct pxa3xx_nand_info *info)
--
1.8.1.5