]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
mtd: vf610_nfc: implement OOB only read
authorStefan Agner <stefan@agner.ch>
Fri, 8 May 2015 17:07:09 +0000 (19:07 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:43:29 +0000 (22:43 +0200)
commite2c5e0ef035ffa37a806b4021284d672842c2138
tree2012d7a64c7a9c38ea393b8982232a956e51a75e
parent231dc41614c5f9cb8deb2e5d31a1e9254750e9d4
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.

Signed-off-by: Stefan Agner <stefan@agner.ch>
drivers/mtd/nand/vf610_nfc.c