diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2018-06-22 17:19:48 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2018-06-27 09:07:55 +0200 |
commit | dc0b69fa9f97df90cbcabf16a51d7eb88f26cd2d (patch) | |
tree | 879e22f9a8b6a87902ff43cf27af450cf0a1cc37 | |
parent | 5346c31e305a37d39f535cc0d5ae87d8b7e81230 (diff) |
mtd: nand: mxs_nand: allow to enable BBT support
Add config option which allows to enable on flash bad block table
support. This has the same effect as when using the device tree
property "nand-on-flash-bbt" in Linux.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r-- | drivers/mtd/nand/mxs_nand.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c index 14d3210017..2584608641 100644 --- a/drivers/mtd/nand/mxs_nand.c +++ b/drivers/mtd/nand/mxs_nand.c @@ -1213,6 +1213,10 @@ void board_nand_init(void) memset(&fake_ecc_layout, 0, sizeof(fake_ecc_layout)); +#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT + nand->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; +#endif + nand_set_controller_data(nand, nand_info); nand->options |= NAND_NO_SUBPAGE_WRITE; |