mtd: OneNAND: add support for OneNAND manufactured by Numonyx

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Jun 5 14:59:11 EDT 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ee8f37688966ab1438d0cf42e0cb7c6595d9592c
Commit:     ee8f37688966ab1438d0cf42e0cb7c6595d9592c
Parent:     1e42d142e65ebdef38fb399b421d04e092ad1c6e
Author:     Adrian Hunter <adrian.hunter at nokia.com>
AuthorDate: Tue May 5 11:04:19 2009 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jun 5 17:49:25 2009 +0100

    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.
    
    Signed-off-by: Adrian Hunter <adrian.hunter at nokia.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/onenand/onenand_base.c |    3 ++-
 include/linux/mtd/onenand.h        |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 30d6999..2346857 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -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);
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 9aa2a91..0fa3ac4 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -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



More information about the linux-mtd-cvs mailing list