mtd: spi-nor: add SPI NOR manufacturer IDs

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 6 10:59:23 PST 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=db4745edb282766f6532d4b0f643c2348e450e25
Commit:     db4745edb282766f6532d4b0f643c2348e450e25
Parent:     a8a16454edb364858a0a54e17acaeab329e7b47f
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Tue Sep 1 12:57:08 2015 -0700
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Oct 13 18:22:51 2015 -0700

    mtd: spi-nor: add SPI NOR manufacturer IDs
    
    These are often similar for CFI (parallel NOR) and for SPI NOR, but they
    aren't always the same, for various reasons (different namespaces,
    company acquisitions and renames, etc.). And some don't have CFI_MFR_*
    entries at all.
    
    So let's make a proper place to list the SPI NOR IDs, with all the SPI
    NOR specific assumptions and comments.
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 include/linux/mtd/spi-nor.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 768b900..88297ee 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -11,6 +11,21 @@
 #define __LINUX_MTD_SPI_NOR_H
 
 #include <linux/bitops.h>
+#include <linux/mtd/cfi.h>
+
+/*
+ * Manufacturer IDs
+ *
+ * The first byte returned from the flash after sending opcode SPINOR_OP_RDID.
+ * Sometimes these are the same as CFI IDs, but sometimes they aren't.
+ */
+#define SNOR_MFR_ATMEL		CFI_MFR_ATMEL
+#define SNOR_MFR_INTEL		CFI_MFR_INTEL
+#define SNOR_MFR_MICRON		CFI_MFR_ST /* ST Micro <--> Micron */
+#define SNOR_MFR_MACRONIX	CFI_MFR_MACRONIX
+#define SNOR_MFR_SPANSION	CFI_MFR_AMD
+#define SNOR_MFR_SST		CFI_MFR_SST
+#define SNOR_MFR_WINBOND	0xef
 
 /*
  * Note on opcode nomenclature: some opcodes have a format like



More information about the linux-mtd-cvs mailing list