Skip to content

mtd: nand: improve NAND ID detection

Brian Norris linux-mtd 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mtd: nand: remove unnecessary variabledrivers/mtd/nand/nand_base.c+1 -30 replies
2/9mtd: nand: remove redundant ID readdrivers/mtd/nand/nand_base.c+2 -80 replies
3/9mtd: nand: split BB marker options decoding into its own functiondrivers/mtd/nand/nand_base.c+39 -270 replies
4/9mtd: nand: split extended ID decoding into its own functiondrivers/mtd/nand/nand_base.c+67 -550 replies
5/9mtd: nand: split simple ID decode into its own functiondrivers/mtd/nand/nand_base.c+31 -200 replies
6/9mtd: nand: add generic READ ID length calculation functionsdrivers/mtd/nand/nand_base.c+65 -70 replies
7/9mtd: nand: increase max OOB size to 640include/linux/mtd/nand.h+1 -10 replies
8/9mtd: nand: decode Hynix MLC, 6-byte ID lengthdrivers/mtd/nand/nand_base.c+44 -10 replies
9/9mtd: nand: detect Samsung K9GBG08U0A, K9GAG08U0F IDdrivers/mtd/nand/nand_base.c+11 -53 replies

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by.

PatchMarek Vasut
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] mtd: nand: improve NAND ID detection

Hi all,

I've been working on some changes to nand_base.c's nand_get_flash_type() routine for improving its structure and readability as well as to detect some new chips. Generally, this patch series does the following:

(1) split several of the big blocks of detection code into separate functions, each designated with different tasks
(2) add support for several "new" Hynix and Samsung NAND, which have new decoding tables
(3) provide a better baseline on which I or others can make future changes (esp., the "generic READ ID length calculation" is useful for detecting other patterns that will determine BB marker options)

I have tested this patch series for regressions against a few chips:

Samsung K9GAG08U0D
Samsung K9LBG08U0E
Hynix H27U8G8G5D
Micron MT29F32G08CBACA

Additionally, I used a test harness for nand_get_flash_type() provided Angus Clark to test for both regressions and proper fixes (contact Angus if you need the suite; I'm not sure I have permission to redistribute). The test uses some data from:

http://www.linux-mtd.infradead.org/nand-data/nanddata.html

I do not have actual samples of most of the new Samsung and Hynix but have largely relied on datasheets and support from others who have these chips. Any testing -- with either old or new chips -- is appreciated.

Thanks,
Brian

Brian Norris (9):
mtd: nand: remove unnecessary variable
mtd: nand: remove redundant ID read
mtd: nand: split BB marker options decoding into its own function
mtd: nand: split extended ID decoding into its own function
mtd: nand: split simple ID decode into its own function
mtd: nand: add generic READ ID length calculation functions
mtd: nand: increase max OOB size to 640
mtd: nand: decode Hynix MLC, 6-byte ID length
mtd: nand: detect Samsung K9GBG08U0A, K9GAG08U0F ID

 drivers/mtd/nand/nand_base.c | 360 +++++++++++++++++++++++++++++--------------
 include/linux/mtd/nand.h     |   2 +-
 2 files changed, 248 insertions(+), 114 deletions(-)
Signature · 1 line
1.7.11.3