mtd: rawnand: AMD: Also use the last page for bad block markers
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Wed, 17 Apr 2019 12:36:37 +0000 (12:36 +0000)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 18 Apr 2019 06:54:08 +0000 (08:54 +0200)
commit598dce7068179d49b78d116fcb74422beeb3efd7
treec265e019431f005c50fbb16dc1a61477de80890a
parent7a1894a955cc3bf0be0851421d6603c3b5c78323
mtd: rawnand: AMD: Also use the last page for bad block markers

According to the datasheet of some Cypress SLC NANDs, the bad
block markers can be in the first, second or last page of a block.
So let's check all three locations.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Boris Brezillon <bbrezillon@kernel.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nand_amd.c