Skip to contentSkip to conversation

MTD: OneNAND: Add support for OneNAND manufactured by Numonyx

PATCH In review Adrian Hunter 3 participants 3 messages May 5, 2009 – May 15, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MTD: OneNAND: Add support for OneNAND manufactured by Numonyx

Quoted 1 line

From e400da3456896505edbf7c39a14668c2c718ace4 Mon Sep 17 00:00:00 2001

From: Adrian Hunter <[email protected]>
Date: Tue, 5 May 2009 11:04:19 +0300
Subject: [PATCH] MTD: OneNAND: Add support for OneNAND manufactured by Numonyx

In addition to adding the Numonyx manufacturer code, this patch also ensures 'sync. write' is disabled when reading identification data - something that the Numonyx chip objects to, but the Samsung chip seems to ignore.

---

drivers/mtd/onenand/onenand_base.c |    3 ++-
include/linux/mtd/onenand.h        |    1 +
2 files changed, 3 insertions(+), 1 deletions(-)
drivers/mtd/onenand/onenand_base.c +0 -0
index 524af9a..f6cfadb 100644
@@ -2576,6 +2576,7 @@ static void onenand_print_device_info(int device, int version)
 

static const struct onenand_manufacturers onenand_manuf_ids[] = {
{ONENAND_MFR_SAMSUNG, "Samsung"},
+ {ONENAND_MFR_NUMONYX, "Numonyx"},
};

/**
@@ -2621,7 +2622,7 @@ static int onenand_probe(struct mtd_info *mtd)

	/* Save system configuration 1 */
	syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1);
	/* Clear Sync. Burst Read mode to read BootRAM */

- this->write_word((syscfg & ~ONENAND_SYS_CFG1_SYNC_READ), this->base + ONENAND_REG_SYS_CFG1);
+ this->write_word((syscfg & ~ONENAND_SYS_CFG1_SYNC_READ & ~ONENAND_SYS_CFG1_SYNC_WRITE), this->base + ONENAND_REG_SYS_CFG1);

	/* Send the command for reading device ID from BootRAM */
	this->write_word(ONENAND_CMD_READID, this->base + ONENAND_BOOTRAM);
include/linux/mtd/onenand.h +0 -0
index 9aa2a91..0fa3ac4 100644
@@ -176,6 +176,7 @@ struct onenand_chip {
 * OneNAND Flash Manufacturer ID Codes
 */

#define ONENAND_MFR_SAMSUNG 0xec
+#define ONENAND_MFR_NUMONYX 0x20

/**
* struct onenand_manufacturers - NAND Flash Manufacturer ID Structure

Signature · 1 line
1.5.6.3
Acked-by on v1 1/1
#1 lore raw

Hi,

Good I heard the Numonyx also make a OneNAND chips.

Quoted 57 lines · Adrian Hunter

From e400da3456896505edbf7c39a14668c2c718ace4 Mon Sep 17 00:00:00 2001
From: Adrian Hunter <[email protected]>
Date: Tue, 5 May 2009 11:04:19 +0300
Subject: [PATCH] MTD: OneNAND: Add support for OneNAND manufactured by Numonyx

In addition to adding the Numonyx manufacturer code, this patch also ensures 'sync. write' is disabled when reading identification data - something that the Numonyx chip objects to, but the Samsung chip seems to ignore.

---
drivers/mtd/onenand/onenand_base.c |    3 ++-
include/linux/mtd/onenand.h        |    1 +

2 files changed, 3 insertions(+), 1 deletions(-)
drivers/mtd/onenand/onenand_base.c +1 -0
index 524af9a..f6cfadb 100644
@@ -2576,6 +2576,7 @@ static void onenand_print_device_info(int device, int
 version)
 
 static const struct onenand_manufacturers onenand_manuf_ids[] = {
        {ONENAND_MFR_SAMSUNG, "Samsung"},
+       {ONENAND_MFR_NUMONYX, "Numonyx"},
 };
 

/**

drivers/mtd/onenand/onenand_base.c +2 -1
@@ -2621,7 +2622,7 @@ static int onenand_probe(struct mtd_info *mtd)
        /* Save system configuration 1 */
        syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1);
        /* Clear Sync. Burst Read mode to read BootRAM */
-       this->write_word((syscfg & ~ONENAND_SYS_CFG1_SYNC_READ), this->base
+ ONENAND_REG_SYS_CFG1);
+       this->write_word((syscfg & ~ONENAND_SYS_CFG1_SYNC_READ &
 ~ONENAND_SYS_CFG1_SYNC_WRITE), this->base + ONENAND_REG_SYS_CFG1);
 

       /* Send the command for reading device ID from BootRAM */ this->write_word(ONENAND_CMD_READID, this->base + ONENAND_BOOTRAM);

include/linux/mtd/onenand.h +1 -1
index 9aa2a91..0fa3ac4 100644
@@ -176,6 +176,7 @@ struct onenand_chip {
  * OneNAND Flash Manufacturer ID Codes
  */
 #define ONENAND_MFR_SAMSUNG     0xec
+#define ONENAND_MFR_NUMONYX    0x20
 
 /**
  * struct onenand_manufacturers - NAND Flash Manufacturer ID Structure
--

1.5.6.3

#2 lore raw
In reply to Adrian Hunter
Quoted 11 lines · Adrian Hunter
Quoted 1 line

From e400da3456896505edbf7c39a14668c2c718ace4 Mon Sep 17 00:00:00 2001

From: Adrian Hunter <[email protected]>
Date: Tue, 5 May 2009 11:04:19 +0300
Subject: [PATCH] MTD: OneNAND: Add support for OneNAND manufactured by Numonyx

In addition to adding the Numonyx manufacturer code, this patch also ensures 'sync. write' is disabled when reading identification data - something that the Numonyx chip objects to, but the Samsung chip seems to ignore.

Pushed this to l2-mtd-2.6.git.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)