mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Reilly <marc@cpdesign.com.au>
To: barebox@lists.infradead.org
Subject: [PATCH 6/7] nand: Prevent drivers setting NAND_USE_FLASH_BBT if BBT config not enabled.
Date: Sun, 29 Jul 2012 17:41:53 +1000	[thread overview]
Message-ID: <1343547714-32740-7-git-send-email-marc@cpdesign.com.au> (raw)
In-Reply-To: <1343547714-32740-1-git-send-email-marc@cpdesign.com.au>

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@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;
 	}
diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index e75ffbc..67b056b 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -1142,7 +1142,7 @@ static int __init imxnd_probe(struct device_d *dev)
 		imx_nand_set_layout(0, 16);
 	}
 
-	if (pdata->flash_bbt) {
+	if (IS_ENABLED(CONFIG_NAND_BBT) && pdata->flash_bbt) {
 		this->bbt_td = &bbt_main_descr;
 		this->bbt_md = &bbt_mirror_descr;
 		/* update flash based bbt */
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c
index c629701..63a3aac 100644
--- a/drivers/mtd/nand/nand_s3c24xx.c
+++ b/drivers/mtd/nand/nand_s3c24xx.c
@@ -469,7 +469,7 @@ static int s3c24x0_nand_probe(struct device_d *dev)
 		chip->ecc.layout = &nand_hw_eccoob;
 	}
 
-	if (pdata->flash_bbt) {
+	if (IS_ENABLED(CONFIG_NAND_BBT) && pdata->flash_bbt) {
 		/* use a flash based bbt */
 		chip->options |= NAND_USE_FLASH_BBT;
 	}
-- 
1.7.7


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-07-29  7:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29  7:41 at24 eeprom driver (V2) and misc patches Marc Reilly
2012-07-29  7:41 ` [PATCH 1/7] imx35: 6-bit divider helper Marc Reilly
2012-07-29  7:41 ` [PATCH 2/7] imx35: mmc clock has 6 bit divider, not 3_3 Marc Reilly
2012-07-29  7:41 ` [PATCH 3/7] i2c: add platform_data for i2c_board_info Marc Reilly
2012-07-30  8:13   ` Uwe Kleine-König
2012-07-30  9:41   ` Sascha Hauer
2012-07-29  7:41 ` [PATCH 4/7] i2c: device id default to -1 for auto assignment Marc Reilly
2012-07-29  9:59   ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-29  7:41 ` [PATCH 5/7] nand: fix build error when BBT not enabled Marc Reilly
2012-07-29  9:58   ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-29 11:28     ` Marc Reilly
2012-07-29  7:41 ` Marc Reilly [this message]
2012-07-29 10:00   ` [PATCH 6/7] nand: Prevent drivers setting NAND_USE_FLASH_BBT if BBT config " Jean-Christophe PLAGNIOL-VILLARD
2012-07-29 11:30     ` Marc Reilly
2012-07-29  7:41 ` [PATCH 7/7] drivers/eeprom: at24: add I2C eeprom driver for 24c01/02 Marc Reilly
2012-07-30  8:25   ` Uwe Kleine-König
2012-07-30 10:36     ` Marc Reilly
2012-08-01  7:25       ` Uwe Kleine-König
2012-07-30  9:38 ` at24 eeprom driver (V2) and misc patches Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343547714-32740-7-git-send-email-marc@cpdesign.com.au \
    --to=marc@cpdesign.com.au \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox