From: Scott Wood Date: Thu, 5 Sep 2013 14:01:08 -0500 Subject: [U-Boot] [PATCH v1 1/2] nand, davinci: add special UBL ecc position In-Reply-To: <1378358045-748-2-git-send-email-hs@denx.de> References: <1378358045-748-1-git-send-email-hs@denx.de> <1378358045-748-2-git-send-email-hs@denx.de> Message-ID: <1378407668.12204.108.camel@snotra.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 Thu, 2013-09-05 at 07:14 +0200, Heiko Schocher wrote: > enable the RBL/UBL ECC layout through > CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC define > > see for more info: > http://processors.wiki.ti.com/index.php/DM365_Nand_ECC_layout > > Signed-off-by: Heiko Schocher > Cc: Tom Rini > Cc: Scott Wood > --- > drivers/mtd/nand/davinci_nand.c | 10 ++++++++++ > 1 Datei ge?ndert, 10 Zeilen hinzugef?gt(+) > > diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c > index d8bb5d3..9f5bd85 100644 > --- a/drivers/mtd/nand/davinci_nand.c > +++ b/drivers/mtd/nand/davinci_nand.c > @@ -267,6 +267,15 @@ static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = { > #if defined(CONFIG_SYS_NAND_PAGE_2K) > .eccbytes = 40, > .eccpos = { > +#ifdef CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC > + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, > + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, > + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, > + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, > + }, > + .oobfree = { > + {2, 4}, {16, 6}, {32, 6}, {48, 6}, > +#else > 24, 25, 26, 27, 28, > 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, > 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, > @@ -275,6 +284,7 @@ static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = { > }, > .oobfree = { > {.offset = 2, .length = 22, }, > +#endif /* #ifdef CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC */ > }, > #elif defined(CONFIG_SYS_NAND_PAGE_4K) > .eccbytes = 80, The if/else/endif is located awkwardly relative to the braces... I think it would be more readable if the conditional section started with ".eccpos =" and ended with "},". -Scott