mtd: vf610_nfc: implement OOB only read
authorStefan Agner <stefan@agner.ch>
Thu, 2 Apr 2015 08:04:55 +0000 (10:04 +0200)
committerStefan Agner <stefan@agner.ch>
Tue, 14 Apr 2015 07:08:07 +0000 (09:08 +0200)
commit8966283036f0f240485e6602942ba85c916c05c5
tree575518fde30e26b8c2e91c7610157e5e99a146b9
parentd301314a5eb5da3d3c6c8d2ce56aa31026ede84c
mtd: vf610_nfc: implement OOB only read

Implement read of OOB area only. When using column and sector size
properties, only parts of the page can be read. However, this works
only when hardware ECC is disabled, otherwise the ECC engine would
ruin the data in the buffer. To allow OOB only reads, three points
had to be addressed:
- Set ECC mode per command.
- Handle NAND_CMD_READOOB seperate. Make sure column and sector
  size is correctly set up, while disabling ECC.
- Now, the OOB data end up at the beginning of the buffer. Remove
  the special handling of OOB (spareonly).

Especially bad block scans benefit from this change. On a 512MiB
SLC NAND device, the bad block scan took 1.5s less than before.
drivers/mtd/nand/vf610_nfc.c