linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] mtd: rawnand: Support bad block markers in first, second or last page
@ 2019-01-30 13:01 Schrempf Frieder
  2019-01-30 13:01 ` [PATCH v3 1/5] mtd: nand: Always store info about bad block markers in chip struct Schrempf Frieder
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-30 13:01 UTC (permalink / raw)
  To: bbrezillon, miquel.raynal, richard, linux-kernel
  Cc: linux-mtd, Schrempf Frieder

From: Frieder Schrempf <frieder.schrempf@kontron.de>

Currently supported bad block marker positions within the block are:
* in first page only
* in last page only
* in first or second page

After some cleanup and preparation in patch 1 and 2, we make it
possible to set NAND_BBM_FIRSTPAGE, NAND_BBM_SECONDPAGE and
NAND_BBM_LASTPAGE independently of each other (patch 3).

Some ESMT NANDs are known to have been shipped by the manufacturer
with bad block markers in the first or last page, instead of the
first or second page.

Also the datasheets for Cypress/Spansion/AMD NANDs claim that the
first, second *and* last page needs to be checked.

Therefore in patch 4 and 5 we set all three flags for
AMD/Spansion/Cypress and ESMT chips.
---
Changes in v3:
==============
* Fix bit offsets for new flags in nand_chip->options
* Move separation of flags for first and second page markers to a
  separate patch
* Fix cover letter
* Fix S-o-b tag
* Add R-b tags

Changes in v2:
==============
* Rebase on 5.0-rc1
* Add patch to move bad block marker position info to a common place and
  rename/prepare existing flags
* improve/rename function nand_bbm_get_next_page() to use new flags
---
Frieder Schrempf (5):
  mtd: nand: Always store info about bad block markers in chip struct
  mtd: nand: Make flags for bad block marker position more granular
  mtd: rawnand: Support bad block markers in first, second or last page
  mtd: rawnand: ESMT: Also use the last page for bad block markers
  mtd: rawnand: AMD: Also use the last page for bad block markers

 drivers/mtd/nand/onenand/onenand_base.c |  2 +-
 drivers/mtd/nand/onenand/onenand_bbt.c  |  2 +-
 drivers/mtd/nand/raw/internals.h        |  1 +
 drivers/mtd/nand/raw/nand_amd.c         |  8 +++-
 drivers/mtd/nand/raw/nand_base.c        | 64 +++++++++++++++++--------
 drivers/mtd/nand/raw/nand_bbt.c         | 28 +++++------
 drivers/mtd/nand/raw/nand_esmt.c        |  9 +++-
 drivers/mtd/nand/raw/nand_hynix.c       |  4 +-
 drivers/mtd/nand/raw/nand_macronix.c    |  2 +-
 drivers/mtd/nand/raw/nand_micron.c      |  2 +-
 drivers/mtd/nand/raw/nand_samsung.c     |  4 +-
 drivers/mtd/nand/raw/nand_toshiba.c     |  2 +-
 drivers/mtd/nand/raw/sh_flctl.c         |  4 +-
 include/linux/mtd/bbm.h                 | 14 +-----
 include/linux/mtd/rawnand.h             | 16 +++++++
 15 files changed, 100 insertions(+), 62 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2019-01-30 13:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 13:01 [PATCH v3 0/5] mtd: rawnand: Support bad block markers in first, second or last page Schrempf Frieder
2019-01-30 13:01 ` [PATCH v3 1/5] mtd: nand: Always store info about bad block markers in chip struct Schrempf Frieder
2019-01-30 13:28   ` Boris Brezillon
2019-01-30 13:37     ` Schrempf Frieder
2019-01-30 13:01 ` [PATCH v3 2/5] mtd: nand: Make flags for bad block marker position more granular Schrempf Frieder
2019-01-30 13:38   ` Boris Brezillon
2019-01-30 13:01 ` [PATCH v3 3/5] mtd: rawnand: Support bad block markers in first, second or last page Schrempf Frieder
2019-01-30 13:01 ` [PATCH v3 4/5] mtd: rawnand: ESMT: Also use the last page for bad block markers Schrempf Frieder
2019-01-30 13:01 ` [PATCH v3 5/5] mtd: rawnand: AMD: " Schrempf Frieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).