All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/5] mtd: nand: mxs_nand: allow to enable BBT support
Date: Wed, 11 Apr 2018 18:04:49 +0200	[thread overview]
Message-ID: <20180411160452.2087-3-stefan@agner.ch> (raw)
In-Reply-To: <20180411160452.2087-1-stefan@agner.ch>

From: Stefan Agner <stefan.agner@toradex.com>

Add config option which allows to enable on flash bad block table
support. This has the same effect as when using the device tree
property "nand-on-flash-bbt" in Linux.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---

Changes in v3: None
Changes in v2: None

 drivers/mtd/nand/mxs_nand.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 9338f1889d..867549e530 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -1172,6 +1172,10 @@ void board_nand_init(void)
 
 	memset(&fake_ecc_layout, 0, sizeof(fake_ecc_layout));
 
+#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT
+	nand->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB;
+#endif
+
 	nand_set_controller_data(nand, nand_info);
 	nand->options |= NAND_NO_SUBPAGE_WRITE;
 
-- 
2.17.0

  parent reply	other threads:[~2018-04-11 16:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 16:04 [U-Boot] [PATCH v3 0/5] mtd: nand: mxs_nand: improve ECC support Stefan Agner
2018-04-11 16:04 ` [U-Boot] [PATCH v3 1/5] mtd: nand: mxs_nand: use self init Stefan Agner
2018-04-11 16:04 ` Stefan Agner [this message]
2018-04-11 16:04 ` [U-Boot] [PATCH v3 3/5] mtd: nand: mxs_nand: use structure for BCH geometry Stefan Agner
2018-04-11 16:04 ` [U-Boot] [PATCH v3 4/5] mtd: nand: mxs_nand: report correct ECC parameters Stefan Agner
2018-04-11 16:04 ` [U-Boot] [PATCH v3 5/5] mtd: nand: mxs_nand: add minimal ECC support Stefan Agner
2018-04-27  7:31   ` Stefano Babic
2018-04-30  8:08     ` Stefan Agner
2018-05-30 14:51       ` Stefan Agner
2018-06-21 11:46         ` Stefan Agner
2018-06-21 15:22           ` Tom Rini
2018-06-21 16:39             ` Stefano Babic
2018-06-22  8:46               ` Stefano Babic
2018-06-22 11:36                 ` Stefan Agner

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=20180411160452.2087-3-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.