Inspired by Simon Polette's kernel commit f4fa697c26bcd9e942de26bad970f4de1da5a49b. Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> --- Changes since V1: - better commit message arch/arm/mach-at91/include/mach/board.h | 1 + drivers/mtd/nand/atmel_nand.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 1ab05ad..34a3966 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h @@ -34,6 +34,7 @@ struct atmel_nand_data { u8 ale; /* address line number connected to ALE */ u8 cle; /* address line number connected to CLE */ u8 bus_width_16; /* buswidth is 16 bit */ + u8 flash_bbt; /* use a flash based bbt */ u8 ecc_mode; /* NAND_ECC_* */ }; diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index e8f85fc..85e4b24 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -436,6 +436,11 @@ static int __init atmel_nand_probe(struct device_d *dev) } } + if (host->board->flash_bbt) { + printk(KERN_INFO "atmel_nand: Use On Flash BBT\n"); + nand_chip->options |= NAND_USE_FLASH_BBT; + } + /* first scan to find the device and get the page size */ if (nand_scan_ident(mtd, 1)) { res = -ENXIO; -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox