mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chips

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu May 20 12:59:01 EDT 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8046112818b70329e930b1d4557ef0876c1ad2bb
Commit:     8046112818b70329e930b1d4557ef0876c1ad2bb
Parent:     1e804cec7a05e9bc26a523b1b4d0322bd894d2bc
Author:     Guillaume LECERF <glecerf at gmail.com>
AuthorDate: Thu May 20 16:54:10 2010 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu May 20 16:57:00 2010 +0100

    mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chips
    
    Tested with W19L320SBT9C [1].
    
    [1] http://www.datasheetarchive.com/pdf-datasheets/Datasheets-40/DSA-795343.pdf
    
    [dwmw2: Fix MODULE_ALIAS and linkage]
    Signed-off-by: Obinou <obconseil at gmail.com>
    Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
    Acked-by: Florian Fainelli <florian at openwrt.org>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/chips/cfi_cmdset_0002.c |    3 +++
 drivers/mtd/chips/gen_probe.c       |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index cd905a1..d81079e 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -489,8 +489,10 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
 
 	return cfi_amdstd_setup(mtd);
 }
+struct mtd_info *cfi_cmdset_0006(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0002")));
 struct mtd_info *cfi_cmdset_0701(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0002")));
 EXPORT_SYMBOL_GPL(cfi_cmdset_0002);
+EXPORT_SYMBOL_GPL(cfi_cmdset_0006);
 EXPORT_SYMBOL_GPL(cfi_cmdset_0701);
 
 static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
@@ -2042,4 +2044,5 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd)
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Crossnet Co. <info at crossnet.co.jp> et al.");
 MODULE_DESCRIPTION("MTD chip driver for AMD/Fujitsu flash chips");
+MODULE_ALIAS("cfi_cmdset_0006");
 MODULE_ALIAS("cfi_cmdset_0701");
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index 75a8f9d..3b9a284 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -249,6 +249,7 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
 #ifdef CONFIG_MTD_CFI_AMDSTD
 	case P_ID_AMD_STD:
 	case P_ID_SST_OLD:
+	case P_ID_WINBOND:
 		return cfi_cmdset_0002(map, primary);
 #endif
 #ifdef CONFIG_MTD_CFI_STAA



More information about the linux-mtd-cvs mailing list