Commit da78fb541494ac778a0fe66cc02e2fea33e228d9
Committed by
Andreas Bießmann
1 parent
55ebd0c1ca
Exists in
v2017.01-smarct4x
and in
37 other branches
ARM: at91: atmel_nand: Support flash based BBT
Add support for on-flash bad block table. This makes U-Boot handle an existing BBT correctly. Signed-off-by: David Dueck <davidcdueck@googlemail.com> Reviewed-by: Boris BREZILLON <boris.brezillon@free-electrons.com> CC: Boris BREZILLON <boris.brezillon@free-electrons.com> CC: Josh Wu <josh.wu@atmel.com> CC: Andreas Bießmann <andreas.devel@googlemail.com> CC: Scott Wood <scottwood@freescale.com> Acked-by: Josh Wu <josh.wu@atmel.com>
Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff
drivers/mtd/nand/atmel_nand.c
... | ... | @@ -1456,6 +1456,9 @@ |
1456 | 1456 | nand->dev_ready = at91_nand_wait_ready; |
1457 | 1457 | #endif |
1458 | 1458 | nand->chip_delay = 20; |
1459 | +#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT | |
1460 | + nand->bbt_options |= NAND_BBT_USE_FLASH; | |
1461 | +#endif | |
1459 | 1462 | |
1460 | 1463 | #ifdef CONFIG_ATMEL_NAND_HWECC |
1461 | 1464 | #ifdef CONFIG_ATMEL_NAND_HW_PMECC |
... | ... | @@ -1522,6 +1525,9 @@ |
1522 | 1525 | nand->dev_ready = at91_nand_ready; |
1523 | 1526 | #endif |
1524 | 1527 | nand->chip_delay = 75; |
1528 | +#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT | |
1529 | + nand->bbt_options |= NAND_BBT_USE_FLASH; | |
1530 | +#endif | |
1525 | 1531 | |
1526 | 1532 | ret = nand_scan_ident(mtd, CONFIG_SYS_NAND_MAX_CHIPS, NULL); |
1527 | 1533 | if (ret) |