aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/cafe_nand.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@collabora.com>2020-05-11 08:49:16 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-05-11 09:51:43 +0200
commit8420c68a16ce38794efa494c14ee73ecdc64b12f (patch)
tree72673a0dc40ebdbc9a686a4f46325bc5d534b358 /drivers/mtd/nand/raw/cafe_nand.c
parentmtd: rawnand: Add a NAND_NO_BBM_QUIRK flag (diff)
downloadlinux-dev-8420c68a16ce38794efa494c14ee73ecdc64b12f.tar.xz
linux-dev-8420c68a16ce38794efa494c14ee73ecdc64b12f.zip
mtd: rawnand: cafe: Set the NAND_NO_BBM_QUIRK flag
We have a dummy block_bad() implementation returning 0. Let's set the NAND_NO_BBM_QUIRK flag and let the core take care of that. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200511064917.6255-2-boris.brezillon@collabora.com
Diffstat (limited to 'drivers/mtd/nand/raw/cafe_nand.c')
-rw-r--r--drivers/mtd/nand/raw/cafe_nand.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
index 2d1c22dc88c1..2a0df13df5f3 100644
--- a/drivers/mtd/nand/raw/cafe_nand.c
+++ b/drivers/mtd/nand/raw/cafe_nand.c
@@ -546,11 +546,6 @@ static int cafe_nand_write_page_lowlevel(struct nand_chip *chip,
return nand_prog_page_end_op(chip);
}
-static int cafe_nand_block_bad(struct nand_chip *chip, loff_t ofs)
-{
- return 0;
-}
-
/* F_2[X]/(X**6+X+1) */
static unsigned short gf64_mul(u8 a, u8 b)
{
@@ -718,10 +713,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,
/* Enable the following for a flash based bad block table */
cafe->nand.bbt_options = NAND_BBT_USE_FLASH;
- if (skipbbt) {
- cafe->nand.options |= NAND_SKIP_BBTSCAN;
- cafe->nand.legacy.block_bad = cafe_nand_block_bad;
- }
+ if (skipbbt)
+ cafe->nand.options |= NAND_SKIP_BBTSCAN | NAND_NO_BBM_QUIRK;
if (numtimings && numtimings != 3) {
dev_warn(&cafe->pdev->dev, "%d timing register values ignored; precisely three are required\n", numtimings);