mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mtd: rawnand: ESMT: Also use the last page for bad block markers
It is known that some ESMT SLC NANDs have been shipped with the factory bad block markers in the first or last page of the block, instead of the first or second page. To be on the safe side, let's check all three locations. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
This commit is contained in:
parent
f90da7818b
commit
7a1894a955
1 changed files with 8 additions and 1 deletions
|
|
@ -36,7 +36,14 @@ static void esmt_nand_decode_id(struct nand_chip *chip)
|
|||
static int esmt_nand_init(struct nand_chip *chip)
|
||||
{
|
||||
if (nand_is_slc(chip))
|
||||
chip->options |= NAND_BBM_FIRSTPAGE | NAND_BBM_SECONDPAGE;
|
||||
/*
|
||||
* It is known that some ESMT SLC NANDs have been shipped
|
||||
* with the factory bad block markers in the first or last page
|
||||
* of the block, instead of the first or second page. To be on
|
||||
* the safe side, let's check all three locations.
|
||||
*/
|
||||
chip->options |= NAND_BBM_FIRSTPAGE | NAND_BBM_SECONDPAGE |
|
||||
NAND_BBM_LASTPAGE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue