From e90a5d44dd39ef2d8d6852697c44584f3ff79029 Mon Sep 17 00:00:00 2001 From: Simon Polette Date: Wed, 27 May 2009 18:19:39 +0300 Subject: [PATCH] --- yaml --- r: 153799 b: refs/heads/master c: f4fa697c26bcd9e942de26bad970f4de1da5a49b h: refs/heads/master i: 153797: 40b9ab7fa5d885b7079e01d1106b9d8294bd0ea5 153795: 7e6c680445b6a9a5bb7e3dbf1241865614fefbbd 153791: 569472329a1b96083985242815871a2071dc83eb v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/atmel_nand.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 7fca21b178c4..c93198fc34cb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bd3fd62ecc99c709739cb969be76f44903a4043b +refs/heads/master: f4fa697c26bcd9e942de26bad970f4de1da5a49b diff --git a/trunk/drivers/mtd/nand/atmel_nand.c b/trunk/drivers/mtd/nand/atmel_nand.c index 47a33cec3793..2802992b39da 100644 --- a/trunk/drivers/mtd/nand/atmel_nand.c +++ b/trunk/drivers/mtd/nand/atmel_nand.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -47,6 +48,9 @@ #define no_ecc 0 #endif +static int on_flash_bbt = 0; +module_param(on_flash_bbt, int, 0); + /* Register access macros */ #define ecc_readl(add, reg) \ __raw_readl(add + ATMEL_ECC_##reg) @@ -459,12 +463,17 @@ static int __init atmel_nand_probe(struct platform_device *pdev) if (host->board->det_pin) { if (gpio_get_value(host->board->det_pin)) { - printk("No SmartMedia card inserted.\n"); + printk(KERN_INFO "No SmartMedia card inserted.\n"); res = ENXIO; goto err_no_card; } } + if (on_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;