]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd/atmel_nand: add on_flash_bbt to enable the use of On Flash BBT
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Thu, 29 Dec 2011 06:59:54 +0000 (14:59 +0800)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Thu, 15 Mar 2012 15:27:21 +0000 (23:27 +0800)
This will allow to enable it from the board.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/atmel_nand.c
include/linux/platform_data/atmel.h

index fb87b03f1a25d231c037a3bc43470c7c1303a184..045d174b8277ad02c67f76acd035887dec71c05c 100644 (file)
@@ -562,7 +562,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
                }
        }
 
-       if (on_flash_bbt) {
+       if (host->board->on_flash_bbt || on_flash_bbt) {
                printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
                nand_chip->bbt_options |= NAND_BBT_USE_FLASH;
        }
index 7b8a445f2b41e70f96f5c6997da46f04119a55c6..d056263545b118b09854cc9e5702a682ebc23886 100644 (file)
@@ -19,6 +19,7 @@ struct atmel_nand_data {
        u8              cle;                    /* address line number connected to CLE */
        u8              bus_width_16;           /* buswidth is 16 bit */
        u8              ecc_mode;               /* ecc mode */
+       u8              on_flash_bbt;           /* bbt on flash */
        struct mtd_partition *parts;
        unsigned int    num_parts;
 };