mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Stefan Christ <s.christ@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: i.MX6: Fix bad block marker in imx6-bbu-nand handler
Date: Wed, 28 Jan 2015 10:14:25 +0100	[thread overview]
Message-ID: <20150128091425.GF12209@pengutronix.de> (raw)
In-Reply-To: <1422364499-31437-1-git-send-email-s.christ@phytec.de>

On Tue, Jan 27, 2015 at 02:14:59PM +0100, Stefan Christ wrote:
> The i.MX6 NAND update handler sets all bytes of OOB data to 0x00 in pages that
> contain the FCB structure currently.  So the first and second byte which is
> used as the manufacturers bad block marker is in the 'bad block' state. A scan
> for factory bad blocks will detect these blocks as bad while they are still ok.
> 
> The barebox issues a scan for factory bad blocks to rebuild the bad block table
> if the NAND is brand new or the last four blocks of flash are erased.
> 
> To fix this problem set the first two bytes of OOB data to 0xFF explicitly.
> 
> There is a potential chance that the bbu handler will mark a real bad block as
> factory good. That's not a problem for the ROM Loader, because the FCB is
> protected by a checksum and the hamming_13_8 encoding. Additionally the current
> implementation of the bbu handler does not check the bad block table or the
> factory bad block marker before writing the FCB at the first page of the first
> and second block.
> 
> Signed-off-by: Stefan Christ <s.christ@phytec.de>
> ---
>  arch/arm/mach-imx/imx6-bbu-nand.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2015-01-28  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 13:14 Stefan Christ
2015-01-28  9:14 ` 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=20150128091425.GF12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.christ@phytec.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