aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-12-29 01:59:54 -0500
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-03-15 11:27:21 -0400
commit3dcb7ea137c882580d4d421077e9097ef099a3a9 (patch)
treee40bb4b858e6bbea72239751713789422403d0bc
parentbf4289cba02b8cf770ecd7959ca70839f0dd9d3c (diff)
mtd/atmel_nand: add on_flash_bbt to enable the use of On Flash BBT
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>
-rw-r--r--drivers/mtd/nand/atmel_nand.c2
-rw-r--r--include/linux/platform_data/atmel.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index fb87b03f1a25..045d174b8277 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -562,7 +562,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
562 } 562 }
563 } 563 }
564 564
565 if (on_flash_bbt) { 565 if (host->board->on_flash_bbt || on_flash_bbt) {
566 printk(KERN_INFO "atmel_nand: Use On Flash BBT\n"); 566 printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
567 nand_chip->bbt_options |= NAND_BBT_USE_FLASH; 567 nand_chip->bbt_options |= NAND_BBT_USE_FLASH;
568 } 568 }
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
index 7b8a445f2b41..d056263545b1 100644
--- a/include/linux/platform_data/atmel.h
+++ b/include/linux/platform_data/atmel.h
@@ -19,6 +19,7 @@ struct atmel_nand_data {
19 u8 cle; /* address line number connected to CLE */ 19 u8 cle; /* address line number connected to CLE */
20 u8 bus_width_16; /* buswidth is 16 bit */ 20 u8 bus_width_16; /* buswidth is 16 bit */
21 u8 ecc_mode; /* ecc mode */ 21 u8 ecc_mode; /* ecc mode */
22 u8 on_flash_bbt; /* bbt on flash */
22 struct mtd_partition *parts; 23 struct mtd_partition *parts;
23 unsigned int num_parts; 24 unsigned int num_parts;
24}; 25};