init:
/* chip is struct nand_chip, and is now provided by the driver. */
- mtd = &chip.mtd;
+ mtd = nand_to_mtd(&chip);
/*
* Fill in appropriate values if this driver uses these fields,
/*
* devnum is the device number to be used in nand commands
- * and in mtd->name. Must be less than CONFIG_SYS_NAND_MAX_DEVICE.
+ * and in mtd->name. Must be less than CONFIG_SYS_MAX_NAND_DEVICE.
*/
if (nand_register(devnum, mtd))
error out
And fetching device parameters flashed on device, by parsing
ONFI parameter page.
- CONFIG_BCH
- Enables software based BCH ECC algorithm present in lib/bch.c
- This is used by SoC platforms which do not have built-in ELM
- hardware engine required for BCH ECC correction.
-
-
Platform specific options
=========================
CONFIG_NAND_OMAP_GPMC
However, for 4K pagesize NAND
NAND_PAGESIZE = 4096
- NAND_OOBSIZE = 64
+ NAND_OOBSIZE = 224
ECC_BYTES = 26
2 + (4096 / 512) * 26 = 210 < NAND_OOBSIZE
Thus BCH16 can be supported on 4K page NAND.