mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: mxc_nand: clear NAND_BBT_CREATE flag
@ 2024-05-03 10:15 Sascha Hauer
  2024-05-07  7:31 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2024-05-03 10:15 UTC (permalink / raw)
  To: Barebox List

On i.MX NAND the factory bad block markers are not at the place the NAND
core expects them to be, so the core also can't properly generate a bad
block table. Clear the NAND_BBT_CREATE flag to prevent the core from
doing so. This preserves the behaviour we had previously with the
barebox driver which was lost when we replaced it with the Kernel
driver.

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

diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index 2774b6bb4f..c6533b20fc 100644
--- a/drivers/mtd/nand/raw/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
@@ -1167,7 +1167,7 @@ static uint8_t bbt_pattern[] = { 'B', 'b', 't', '0' };
 static uint8_t mirror_pattern[] = { '1', 't', 'b', 'B' };
 
 static struct nand_bbt_descr bbt_main_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_WRITE
 	    | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
 	.offs = 0,
 	.len = 4,
@@ -1177,7 +1177,7 @@ static struct nand_bbt_descr bbt_main_descr = {
 };
 
 static struct nand_bbt_descr bbt_mirror_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_WRITE
 	    | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
 	.offs = 0,
 	.len = 4,
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: nand: mxc_nand: clear NAND_BBT_CREATE flag
  2024-05-03 10:15 [PATCH] mtd: nand: mxc_nand: clear NAND_BBT_CREATE flag Sascha Hauer
@ 2024-05-07  7:31 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-05-07  7:31 UTC (permalink / raw)
  To: Barebox List, Sascha Hauer


On Fri, 03 May 2024 12:15:09 +0200, Sascha Hauer wrote:
> On i.MX NAND the factory bad block markers are not at the place the NAND
> core expects them to be, so the core also can't properly generate a bad
> block table. Clear the NAND_BBT_CREATE flag to prevent the core from
> doing so. This preserves the behaviour we had previously with the
> barebox driver which was lost when we replaced it with the Kernel
> driver.
> 
> [...]

Applied, thanks!

[1/1] mtd: nand: mxc_nand: clear NAND_BBT_CREATE flag
      https://git.pengutronix.de/cgit/barebox/commit/?id=f4cc035245c6 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-07  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03 10:15 [PATCH] mtd: nand: mxc_nand: clear NAND_BBT_CREATE flag Sascha Hauer
2024-05-07  7:31 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox