u-boot/drivers/mtd
Pekon Gupta 47f7187754 mtd: nand: omap: fix ecc-layout for HAM1 ecc-scheme
As per OMAP3530 TRM referenced below [1]

For large-page NAND, ROM code expects following ecc-layout for HAM1 ecc-scheme
 - OOB[1] (offset of 1 *byte* from start of OOB) for x8 NAND device
 - OOB[2] (offset of 1 *word* from start of OOB) for x16 NAND device

Thus ecc-layout expected by ROM code for HAM1 ecc-scheme is:
 *for x8 NAND Device*
 +--------+---------+---------+---------+---------+---------+---------+
 | xxxx   | ECC[A0] | ECC[A1] | ECC[A2] | ECC[B0] | ECC[B1] | ECC[B2] | ...
 +--------+---------+---------+---------+---------+---------+---------+

 *for x16 NAND Device*
 +--------+--------+---------+---------+---------+---------+---------+---------+
 | xxxxx  | xxxxx  | ECC[A0] | ECC[A1] | ECC[A2] | ECC[B0] | ECC[B1] | ECC[B2] |
 +--------+--------+---------+---------+---------+---------+---------+---------+

This patch fixes ecc-layout *only* for HAM1, as required by ROM-code
For other ecc-schemes like (BCH8) ecc-layout is same for x8 or x16 devices.

[1] OMAP3530: http://www.ti.com/product/omap3530
    TRM: http://www.ti.com/litv/pdf/spruf98x
		Chapter-25: Initialization Sub-topic: Memory Booting
		Section: 25.4.7.4 NAND
		Figure 25-19. ECC Locations in NAND Spare Areas

Reported-by: Stefan Roese <sr@denx.de>
Signed-off-by: Pekon Gupta <pekon@ti.com>
2013-12-06 15:17:15 -05:00
..
nand mtd: nand: omap: fix ecc-layout for HAM1 ecc-scheme 2013-12-06 15:17:15 -05:00
onenand mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN 2013-10-09 12:52:04 -05:00
spi driver: mtd: sf_ops: claim bus while doing memcpy 2013-11-14 10:05:29 -05:00
ubi Coding Style cleanup: replace leading SPACEs by TABs 2013-10-14 16:06:54 -04:00
Makefile Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
at45.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cfi_flash.c Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash 2013-07-26 15:29:08 -04:00
cfi_mtd.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
dataflash.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ftsmc020.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
jedec_flash.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mtdconcat.c mtd: resync with Linux-3.7.1 2013-05-31 17:12:03 -05:00
mtdcore.c Coding Style cleanup: remove trailing empty lines 2013-10-14 16:06:54 -04:00
mtdpart.c mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN 2013-10-09 12:52:04 -05:00
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00
st_smi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00