mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] fix i.MX external NAND boot bad block handling
Date: Tue, 12 Mar 2013 10:29:53 +0100	[thread overview]
Message-ID: <1363080597-10510-1-git-send-email-s.hauer@pengutronix.de> (raw)

The i.MX external NAND boot code relied very much on all block
used for the bootloader are good. It has some bad block checking,
but unfortunately it tested for a bad block in each page of a
block and skipped this page instead of checking for a bad block
at the beginning of a block and skipping the whole block then.

The handling of 2k page NAND flashes has another problem with bad
blocks. We rely on a bad block table since we cannot properly keep
the BBM on flash. This also means that the external NAND boot code
cannot detect bad blocks. This series adds a barebox update handler
to generate a bad block table (well, as long as we consider a 32bit
bitmask a table ;) inside the initial 2k page.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      ARM: i.MX: external nand boot: check for bad blocks
      ARM: head: Add some space behind the image header
      ARM: i.MX: Add bbu handler for external NAND boot
      ARM: i.MX pcm043: register external nand boot handler

 arch/arm/boards/pcm043/pcm043.c           |   6 +
 arch/arm/include/asm/barebox-arm-head.h   |  10 ++
 arch/arm/mach-imx/Kconfig                 |   6 +
 arch/arm/mach-imx/Makefile                |   1 +
 arch/arm/mach-imx/external-nand-boot.c    |  59 +++++++--
 arch/arm/mach-imx/imx-bbu-external-nand.c | 204 ++++++++++++++++++++++++++++++
 arch/arm/mach-imx/include/mach/bbu.h      |  11 ++
 arch/arm/mach-imx/include/mach/imx-nand.h |   6 +
 8 files changed, 289 insertions(+), 14 deletions(-)
 create mode 100644 arch/arm/mach-imx/imx-bbu-external-nand.c

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

             reply	other threads:[~2013-03-12  9:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  9:29 Sascha Hauer [this message]
2013-03-12  9:29 ` [PATCH 1/4] ARM: i.MX: external nand boot: check for bad blocks Sascha Hauer
2013-03-12  9:29 ` [PATCH 2/4] ARM: head: Add some space behind the image header Sascha Hauer
2013-03-12  9:41   ` Juergen Beisert
2013-03-12  9:29 ` [PATCH 3/4] ARM: i.MX: Add bbu handler for external NAND boot Sascha Hauer
2013-03-12  9:48   ` Juergen Beisert
2013-03-12 10:05     ` Sascha Hauer
2013-03-12 10:08       ` Juergen Beisert
2013-03-12  9:29 ` [PATCH 4/4] ARM: i.MX pcm043: register external nand boot handler 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=1363080597-10510-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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