Skip to content

Commit 8046112

Browse files
guillaumelecerfDavid Woodhouse
authored andcommitted
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 <[email protected]> Signed-off-by: Guillaume LECERF <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
1 parent 1e804ce commit 8046112

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/mtd/chips/cfi_cmdset_0002.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,10 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
489489

490490
return cfi_amdstd_setup(mtd);
491491
}
492+
struct mtd_info *cfi_cmdset_0006(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0002")));
492493
struct mtd_info *cfi_cmdset_0701(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0002")));
493494
EXPORT_SYMBOL_GPL(cfi_cmdset_0002);
495+
EXPORT_SYMBOL_GPL(cfi_cmdset_0006);
494496
EXPORT_SYMBOL_GPL(cfi_cmdset_0701);
495497

496498
static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
@@ -2042,4 +2044,5 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd)
20422044
MODULE_LICENSE("GPL");
20432045
MODULE_AUTHOR("Crossnet Co. <[email protected]> et al.");
20442046
MODULE_DESCRIPTION("MTD chip driver for AMD/Fujitsu flash chips");
2047+
MODULE_ALIAS("cfi_cmdset_0006");
20452048
MODULE_ALIAS("cfi_cmdset_0701");

drivers/mtd/chips/gen_probe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
249249
#ifdef CONFIG_MTD_CFI_AMDSTD
250250
case P_ID_AMD_STD:
251251
case P_ID_SST_OLD:
252+
case P_ID_WINBOND:
252253
return cfi_cmdset_0002(map, primary);
253254
#endif
254255
#ifdef CONFIG_MTD_CFI_STAA

0 commit comments

Comments
 (0)