diff options
author | Paul Cercueil <paul@crapouillou.net> | 2019-03-19 15:54:03 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2019-04-08 10:21:07 +0200 |
commit | e84950691bf7aec716ae671a8b6e82322df6d54a (patch) | |
tree | f52c7e5892d667e0832e897c031c2ac0a6f82860 /drivers/mtd | |
parent | 2a73858364aae7103d0ad786634303a69d28471b (diff) | |
download | linux-e84950691bf7aec716ae671a8b6e82322df6d54a.tar.bz2 |
mtd: rawnand: ingenic: Move BBTs out of ECC area
The generic layout for BBT markers will most likely overlap with our
ECC bytes in the OOB, so move the BBT markers outside the OOB area.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/ingenic/ingenic_nand.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand.c b/drivers/mtd/nand/raw/ingenic/ingenic_nand.c index d32d68ef0dc7..ad0c905a03ba 100644 --- a/drivers/mtd/nand/raw/ingenic/ingenic_nand.c +++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand.c @@ -282,6 +282,13 @@ static int ingenic_nand_attach_chip(struct nand_chip *chip) return -EINVAL; } + /* + * The generic layout for BBT markers will most likely overlap with our + * ECC bytes in the OOB, so move the BBT markers outside the OOB area. + */ + if (chip->bbt_options & NAND_BBT_USE_FLASH) + chip->bbt_options |= NAND_BBT_NO_OOB; + /* For legacy reasons we use a different layout on the qi,lb60 board. */ if (of_machine_is_compatible("qi,lb60")) mtd_set_ooblayout(mtd, &qi_lb60_ooblayout_ops); |