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] nand bad block erase and i.MX bbt tool
Date: Mon,  4 Mar 2013 11:13:44 +0100	[thread overview]
Message-ID: <1362392034-1908-1-git-send-email-s.hauer@pengutronix.de> (raw)

This series contains some NAND related updates.

First an option is introduced to allow erasing bad blocks. While
this is a dangerous operation it is needed during development or
when some foreign flash driver has touched the NAND. The option
is hidden behind a Kconfig option and must be enabled explicitly
with a device parameter.

Second the BBT (bad block table) type is exposed via a device
parameter. This is useful to get information about the bbt.

Last not least the i.MX NAND driver no longer silently creates
a BBT on 2k NAND flashes. This does not work properly because
the Controller uses a non standard NAND layout and will not
detect the factory bad block markers properly on a virgin
NAND flash. We work around this by adding a command which creates
a BBT on demand using the correct information. Whether this
command needs to be executed can be detected with the bbt device
parameter.

Sascha

The following changes since commit 94e71b843f6456abacc2fe76a5c375a461fabdf7:

  libubi: Use global mtd_all_ff function (2013-03-04 10:54:46 +0100)

are available in the git repository at:

  none 

for you to fetch changes up to c3afd8676888d93d831bd4a8e71f1560ee5616c4:

  mtd: nand: Add command to generate a flash BBT (2013-03-04 11:06:23 +0100)

----------------------------------------------------------------
Sascha Hauer (10):
      mtd: nand: register nand flashes with nand specific function
      mtd: Add parameter to allow erasing bad blocks
      mtd nand: introduce bbm.h
      nand command: use loff_t for block offset
      nand command: use enumeration for command instead of bitmask
      nand command: check for <dev> directly after option parsing
      mtd: nand: replace NAND_USE_FLASH_BBT with NAND_BBT_USE_FLASH
      mtd nand i.MX: remove unused code
      mtd: nand: Add bbt parameter
      mtd: nand: Add command to generate a flash BBT

 commands/nand.c                   |   48 ++++----
 drivers/mtd/core.c                |    6 +-
 drivers/mtd/mtdraw.c              |    6 +-
 drivers/mtd/nand/Kconfig          |   14 +++
 drivers/mtd/nand/Makefile         |    1 +
 drivers/mtd/nand/atmel_nand.c     |    4 +-
 drivers/mtd/nand/nand_base.c      |   50 +++++++++
 drivers/mtd/nand/nand_bbt.c       |    4 +-
 drivers/mtd/nand/nand_imx.c       |   30 +++--
 drivers/mtd/nand/nand_imx_bbm.c   |  220 +++++++++++++++++++++++++++++++++++++
 drivers/mtd/nand/nand_mxs.c       |    2 +-
 drivers/mtd/nand/nand_omap_gpmc.c |    2 +-
 drivers/mtd/nand/nand_s3c24xx.c   |    4 +-
 drivers/mtd/nand/nand_write.c     |    5 +-
 drivers/mtd/nand/nomadik_nand.c   |    2 +-
 include/linux/mtd/bbm.h           |   92 ++++++++++++++++
 include/linux/mtd/mtd.h           |    3 +
 include/linux/mtd/nand.h          |   86 ++-------------
 18 files changed, 456 insertions(+), 123 deletions(-)
 create mode 100644 drivers/mtd/nand/nand_imx_bbm.c
 create mode 100644 include/linux/mtd/bbm.h

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

             reply	other threads:[~2013-03-04 10:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 10:13 Sascha Hauer [this message]
2013-03-04 10:13 ` [PATCH 01/10] mtd: nand: register nand flashes with nand specific function Sascha Hauer
2013-03-04 10:13 ` [PATCH 02/10] mtd: Add parameter to allow erasing bad blocks Sascha Hauer
2013-03-04 10:13 ` [PATCH 03/10] mtd nand: introduce bbm.h Sascha Hauer
2013-03-04 10:13 ` [PATCH 04/10] nand command: use loff_t for block offset Sascha Hauer
2013-03-04 10:13 ` [PATCH 05/10] nand command: use enumeration for command instead of bitmask Sascha Hauer
2013-03-04 21:25   ` Alexander Aring
2013-03-04 10:13 ` [PATCH 06/10] nand command: check for <dev> directly after option parsing Sascha Hauer
2013-03-04 10:13 ` [PATCH 07/10] mtd: nand: replace NAND_USE_FLASH_BBT with NAND_BBT_USE_FLASH Sascha Hauer
2013-03-04 10:13 ` [PATCH 08/10] mtd nand i.MX: remove unused code Sascha Hauer
2013-03-04 10:13 ` [PATCH 09/10] mtd: nand: Add bbt parameter Sascha Hauer
2013-03-04 20:42   ` Juergen Beisert
2013-03-05 10:48     ` Sascha Hauer
2013-03-04 10:13 ` [PATCH 10/10] mtd: nand: Add command to generate a flash BBT Sascha Hauer
2013-03-04 20:43   ` Juergen Beisert
2013-03-05 10:49     ` 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=1362392034-1908-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