aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/nand_samsung.c
diff options
context:
space:
mode:
authorFrieder Schrempf <frieder.schrempf@kontron.de>2019-04-17 12:36:36 +0000
committerMiquel Raynal <miquel.raynal@bootlin.com>2019-04-18 08:54:07 +0200
commitbb5925480b13f52ad2e29ab20695c7f27e10f382 (patch)
tree91fad795e040981f555c78465790ea55055342d9 /drivers/mtd/nand/raw/nand_samsung.c
parentmtd: nand: Cleanup flags and fields for bad block marker position (diff)
downloadlinux-dev-bb5925480b13f52ad2e29ab20695c7f27e10f382.tar.xz
linux-dev-bb5925480b13f52ad2e29ab20695c7f27e10f382.zip
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>
Diffstat (limited to 'drivers/mtd/nand/raw/nand_samsung.c')
-rw-r--r--drivers/mtd/nand/raw/nand_samsung.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/nand_samsung.c b/drivers/mtd/nand/raw/nand_samsung.c
index f4db72329b7b..5552ce20ede0 100644
--- a/drivers/mtd/nand/raw/nand_samsung.c
+++ b/drivers/mtd/nand/raw/nand_samsung.c
@@ -133,7 +133,7 @@ static int samsung_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;
return 0;
}