From: Scott Wood Date: Wed, 13 Nov 2013 18:59:54 -0600 Subject: [U-Boot] [U-Boot, 1/5] MTD: nand: increase the max eccpos size to 448 to support 8k page nand In-Reply-To: <1382089595-5235-2-git-send-email-josh.wu@atmel.com> References: <1382089595-5235-2-git-send-email-josh.wu@atmel.com> Message-ID: <20131114005954.GA10934@home.buserror.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Oct 18, 2013 at 05:46:30PM +0800, Wu, Josh wrote: > For example, Micron MT29F64G08CBAAAWP has 8192 bytes page with 448 byte > oob. It needs 24bit ecc per page. > If 24bit error correction per 1024 bytes need extra 42 bytes in oob. > That means we need eccpos array size is 336 byte. > > Signed-off-by: Josh Wu > > --- > include/mtd/mtd-abi.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h > index d51c1ab..f6f7370 100644 > --- a/include/mtd/mtd-abi.h > +++ b/include/mtd/mtd-abi.h > @@ -156,13 +156,14 @@ struct nand_oobfree { > }; > > #define MTD_MAX_OOBFREE_ENTRIES 8 > +#define MTD_MAX_ECCPOS_ENTRIES_LARGE 448 > /* > * ECC layout control structure. Exported to userspace for > * diagnosis and to allow creation of raw images > */ > struct nand_ecclayout { > uint32_t eccbytes; > - uint32_t eccpos[128]; > + uint32_t eccpos[MTD_MAX_ECCPOS_ENTRIES_LARGE]; > uint32_t oobavail; > struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; > }; See http://patchwork.ozlabs.org/patch/280488/ -Scott