mtd: nand: Make flags for bad block marker position more granular
To be able to check and set bad block markers in the first and second page of a block independently of each other, we create separate flags for both cases. Previously NAND_BBM_SECONDPAGE meant, that both, the first and the second page were used. With this patch NAND_BBM_FIRSTPAGE stands for using the first page and NAND_BBM_SECONDPAGE for using the second page. This patch is only for preparation of subsequent changes and does not implement the logic to actually handle both flags separately. 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>
This commit is contained in:

committed by
Miquel Raynal

parent
c902467cda
commit
bb5925480b
@@ -690,7 +690,7 @@ static int hynix_nand_init(struct nand_chip *chip)
|
||||
if (!nand_is_slc(chip))
|
||||
chip->options |= NAND_BBM_LASTPAGE;
|
||||
else
|
||||
chip->options |= NAND_BBM_SECONDPAGE;
|
||||
chip->options |= NAND_BBM_FIRSTPAGE | NAND_BBM_SECONDPAGE;
|
||||
|
||||
hynix = kzalloc(sizeof(*hynix), GFP_KERNEL);
|
||||
if (!hynix)
|
||||
|
Reference in New Issue
Block a user