From 4463f70a77f6aaea216b53e620171c37fb1d4eb3 Mon Sep 17 00:00:00 2001
From: Rodolfo Giometti <giometti@linux.it>
Date: Mon, 6 Jan 2014 16:18:49 +0100
Subject: [PATCH] mtd pxa3xx_nand.c: add support for 2048 bytes page size
layout
Tested-by: Michele Dionisio <michele@cynny.com>
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
---
drivers/mtd/nand/pxa3xx_nand.c | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -1360,6 +1360,16 @@ static int pxa_ecc_init(struct pxa3xx_nand_info *info,
* Required ECC: 4-bit correction per 512 bytes
* Select: 16-bit correction per 2048 bytes
*/
+ } else if (strength == 4 && ecc_stepsize == 512 && page_size == 2048) {
+ info->ecc_bch = 1;
+ info->chunk_size = 2048;
+ info->spare_size = 32;
+ info->ecc_size = 32;
+ ecc->mode = NAND_ECC_HW;
+ ecc->size = info->chunk_size;
+ ecc->strength = 16;
+ return 1;
+
} else if (strength == 4 && ecc_stepsize == 512 && page_size == 4096) {
info->ecc_bch = 1;
info->chunk_size = 2048;
--
1.8.1.2