public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/3] mtd: nand: add Macronix manufacturer
@ 2011-11-02 20:34 Brian Norris
  2011-11-02 20:34 ` [PATCH 2/3] mtd: nand: add 512 Mbit device code (Macronix) Brian Norris
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Brian Norris @ 2011-11-02 20:34 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Kevin Cernekee, Brian Norris, linux-mtd, David Woodhouse

Macronix is produing SLC NAND MX30LF1208AA, so add their manufacturer
code to the manufacturer lists.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/nand/nand_ids.c |    1 +
 include/linux/mtd/nand.h    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c
index 00cf1b0..56c688d 100644
--- a/drivers/mtd/nand/nand_ids.c
+++ b/drivers/mtd/nand/nand_ids.c
@@ -176,6 +176,7 @@ struct nand_manufacturers nand_manuf_ids[] = {
 	{NAND_MFR_HYNIX, "Hynix"},
 	{NAND_MFR_MICRON, "Micron"},
 	{NAND_MFR_AMD, "AMD"},
+	{NAND_MFR_MACRONIX, "Macronix"},
 	{0x0, "Unknown"}
 };
 
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 904131b..63b5a8b 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -555,6 +555,7 @@ struct nand_chip {
 #define NAND_MFR_HYNIX		0xad
 #define NAND_MFR_MICRON		0x2c
 #define NAND_MFR_AMD		0x01
+#define NAND_MFR_MACRONIX	0xc2
 
 /**
  * struct nand_flash_dev - NAND Flash Device ID Structure
-- 
1.7.5.4

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

* [PATCH 2/3] mtd: nand: add 512 Mbit device code (Macronix)
  2011-11-02 20:34 [PATCH 1/3] mtd: nand: add Macronix manufacturer Brian Norris
@ 2011-11-02 20:34 ` Brian Norris
  2011-11-02 20:34 ` [PATCH 3/3] mtd: nand: scan 1st and 2nd page for Macronix SLC Brian Norris
  2011-11-08 21:13 ` [PATCH 1/3] mtd: nand: add Macronix manufacturer Artem Bityutskiy
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2011-11-02 20:34 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Kevin Cernekee, Brian Norris, linux-mtd, David Woodhouse

Macronix MX30LF1208AA is a 512 Mbit NAND with device code 0xF0.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/nand/nand_ids.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c
index 56c688d..af4fe8c 100644
--- a/drivers/mtd/nand/nand_ids.c
+++ b/drivers/mtd/nand/nand_ids.c
@@ -73,11 +73,12 @@ struct nand_flash_dev nand_flash_ids[] = {
 #define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY | NAND_NO_AUTOINCR)
 #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16)
 
-	/*512 Megabit */
+	/* 512 Megabit */
 	{"NAND 64MiB 1,8V 8-bit",	0xA2, 0,  64, 0, LP_OPTIONS},
 	{"NAND 64MiB 1,8V 8-bit",	0xA0, 0,  64, 0, LP_OPTIONS},
 	{"NAND 64MiB 3,3V 8-bit",	0xF2, 0,  64, 0, LP_OPTIONS},
 	{"NAND 64MiB 3,3V 8-bit",	0xD0, 0,  64, 0, LP_OPTIONS},
+	{"NAND 64MiB 3,3V 8-bit",	0xF0, 0,  64, 0, LP_OPTIONS},
 	{"NAND 64MiB 1,8V 16-bit",	0xB2, 0,  64, 0, LP_OPTIONS16},
 	{"NAND 64MiB 1,8V 16-bit",	0xB0, 0,  64, 0, LP_OPTIONS16},
 	{"NAND 64MiB 3,3V 16-bit",	0xC2, 0,  64, 0, LP_OPTIONS16},
-- 
1.7.5.4

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

* [PATCH 3/3] mtd: nand: scan 1st and 2nd page for Macronix SLC
  2011-11-02 20:34 [PATCH 1/3] mtd: nand: add Macronix manufacturer Brian Norris
  2011-11-02 20:34 ` [PATCH 2/3] mtd: nand: add 512 Mbit device code (Macronix) Brian Norris
@ 2011-11-02 20:34 ` Brian Norris
  2011-11-08 21:13 ` [PATCH 1/3] mtd: nand: add Macronix manufacturer Artem Bityutskiy
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2011-11-02 20:34 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Kevin Cernekee, Brian Norris, linux-mtd, David Woodhouse

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/nand/nand_base.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 3ed9c5e..35b4565 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3132,8 +3132,8 @@ ident_done:
 	 * Bad block marker is stored in the last page of each block
 	 * on Samsung and Hynix MLC devices; stored in first two pages
 	 * of each block on Micron devices with 2KiB pages and on
-	 * SLC Samsung, Hynix, Toshiba and AMD/Spansion. All others scan
-	 * only the first page.
+	 * SLC Samsung, Hynix, Toshiba, AMD/Spansion, and Macronix.
+	 * All others scan only the first page.
 	 */
 	if ((chip->cellinfo & NAND_CI_CELLTYPE_MSK) &&
 			(*maf_id == NAND_MFR_SAMSUNG ||
@@ -3143,7 +3143,8 @@ ident_done:
 				(*maf_id == NAND_MFR_SAMSUNG ||
 				 *maf_id == NAND_MFR_HYNIX ||
 				 *maf_id == NAND_MFR_TOSHIBA ||
-				 *maf_id == NAND_MFR_AMD)) ||
+				 *maf_id == NAND_MFR_AMD ||
+				 *maf_id == NAND_MFR_MACRONIX)) ||
 			(mtd->writesize == 2048 &&
 			 *maf_id == NAND_MFR_MICRON))
 		chip->bbt_options |= NAND_BBT_SCAN2NDPAGE;
-- 
1.7.5.4

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

* Re: [PATCH 1/3] mtd: nand: add Macronix manufacturer
  2011-11-02 20:34 [PATCH 1/3] mtd: nand: add Macronix manufacturer Brian Norris
  2011-11-02 20:34 ` [PATCH 2/3] mtd: nand: add 512 Mbit device code (Macronix) Brian Norris
  2011-11-02 20:34 ` [PATCH 3/3] mtd: nand: scan 1st and 2nd page for Macronix SLC Brian Norris
@ 2011-11-08 21:13 ` Artem Bityutskiy
  2 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-11-08 21:13 UTC (permalink / raw)
  To: Brian Norris; +Cc: David Woodhouse, Kevin Cernekee, linux-mtd

On Wed, 2011-11-02 at 13:34 -0700, Brian Norris wrote:
> Macronix is produing SLC NAND MX30LF1208AA, so add their manufacturer
> code to the manufacturer lists.
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Pushed all 3 patches to l2-mtd-2.6.git, thanks!

Artem.

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

end of thread, other threads:[~2011-11-08 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-02 20:34 [PATCH 1/3] mtd: nand: add Macronix manufacturer Brian Norris
2011-11-02 20:34 ` [PATCH 2/3] mtd: nand: add 512 Mbit device code (Macronix) Brian Norris
2011-11-02 20:34 ` [PATCH 3/3] mtd: nand: scan 1st and 2nd page for Macronix SLC Brian Norris
2011-11-08 21:13 ` [PATCH 1/3] mtd: nand: add Macronix manufacturer Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox