Skip to content

Commit 6a4123e

Browse files
David BrownellDavid Woodhouse
authored andcommitted
mtd: nand: davinci_nand, 4-bit ECC for smallpage
Minimal support for the 4-bit ECC engine found on DM355, DM365, DA830/OMAP-L137, and similar recent DaVinci-family chips. This is limited to small-page flash for now; there are some page layout issues for large page chips. Note that most boards using this engine (like the DM355 EVM) include 2GiB large page chips. Sanity tested on DM355 EVM after swapping the socketed NAND for a small-page one. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
1 parent 533a014 commit 6a4123e

File tree

2 files changed

+297
-15
lines changed

2 files changed

+297
-15
lines changed

arch/arm/mach-davinci/include/mach/nand.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ struct davinci_nand_pdata { /* platform_data */
6868

6969
/* none == NAND_ECC_NONE (strongly *not* advised!!)
7070
* soft == NAND_ECC_SOFT
71-
* 1-bit == NAND_ECC_HW
72-
* 4-bit == NAND_ECC_HW_SYNDROME (not on all chips)
71+
* else == NAND_ECC_HW, according to ecc_bits
72+
*
73+
* All DaVinci-family chips support 1-bit hardware ECC.
74+
* Newer ones also support 4-bit ECC, but are awkward
75+
* using it with large page chips.
7376
*/
7477
nand_ecc_modes_t ecc_mode;
78+
u8 ecc_bits;
7579

7680
/* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */
7781
unsigned options;

0 commit comments

Comments
 (0)