[PATCH 6/7] nand: Prevent drivers setting NAND_USE_FLASH_BBT if BBT config not enabled.
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Sun Jul 29 06:00:36 EDT 2012
On 17:41 Sun 29 Jul , Marc Reilly wrote:
> This prevents drivers from setting the options flags to use the flash
> bab block table when the BBT is not enabled in config.
>
> Signed-off-by: Marc Reilly <marc at cpdesign.com.au>
> ---
> drivers/mtd/nand/atmel_nand.c | 2 +-
> drivers/mtd/nand/nand_imx.c | 2 +-
> drivers/mtd/nand/nand_s3c24xx.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index 96624a1..cc62df9 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -407,7 +407,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
> }
> }
>
> - if (host->board->on_flash_bbt) {
> + if (IS_ENABLED(CONFIG_NAND_BBT) && host->board->on_flash_bbt) {
> printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
> nand_chip->options |= NAND_USE_FLASH_BBT;
driver pass this info to the nand framework which is supposed to handle this
by itself
Best Regards,
J.
More information about the barebox
mailing list