mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: ukl@pengutronix.de
Subject: [PATCH 3/3] mtd: nand-imx: make sure the just created BBT is used
Date: Wed,  5 Feb 2020 14:35:21 +0100	[thread overview]
Message-ID: <20200205133521.29951-3-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20200205133521.29951-1-s.hauer@pengutronix.de>

When we create a new BBT we write it to the flash, but the currently
running barebox doesn't use it yet, only after a reboot the BBT is
actually used. Call nand_default_bbt() to make sure the current barebox
also used the newly created BBT.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/nand/nand_imx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index cb5b7ee151..d69a012f01 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -1205,6 +1205,10 @@ static int imxnd_create_bbt(struct mtd_info *mtd)
 	if (ret)
 		return ret;
 
+	ret = nand_default_bbt(mtd);
+	if (ret)
+		return ret;
+
 	ret = 0;
 out:
 	free(bbt);
-- 
2.25.0


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

      parent reply	other threads:[~2020-02-05 13:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 13:35 [PATCH 1/3] mtd: nand-imx: do not use blocks reserved for BBT Sascha Hauer
2020-02-05 13:35 ` [PATCH 2/3] mtd: nand-imx: Create BBT automatically when necessary Sascha Hauer
2020-02-05 13:35 ` Sascha Hauer [this message]

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=20200205133521.29951-3-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ukl@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox