diff options
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 10 | ||||
-rw-r--r-- | include/linux/mtd/cfi.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index f9c435a42670..94bb61e19047 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -322,6 +322,14 @@ static struct cfi_fixup fixup_table[] = { | |||
322 | }; | 322 | }; |
323 | 323 | ||
324 | 324 | ||
325 | static void cfi_fixup_major_minor(struct cfi_private *cfi, | ||
326 | struct cfi_pri_amdstd *extp) | ||
327 | { | ||
328 | if (cfi->mfr == CFI_MFR_SAMSUNG && cfi->id == 0x257e && | ||
329 | extp->MajorVersion == '0') | ||
330 | extp->MajorVersion = '1'; | ||
331 | } | ||
332 | |||
325 | struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | 333 | struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) |
326 | { | 334 | { |
327 | struct cfi_private *cfi = map->fldrv_priv; | 335 | struct cfi_private *cfi = map->fldrv_priv; |
@@ -363,6 +371,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | |||
363 | return NULL; | 371 | return NULL; |
364 | } | 372 | } |
365 | 373 | ||
374 | cfi_fixup_major_minor(cfi, extp); | ||
375 | |||
366 | if (extp->MajorVersion != '1' || | 376 | if (extp->MajorVersion != '1' || |
367 | (extp->MinorVersion < '0' || extp->MinorVersion > '4')) { | 377 | (extp->MinorVersion < '0' || extp->MinorVersion > '4')) { |
368 | printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query " | 378 | printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query " |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 00e2b575021f..88d3d8fbf9f2 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -520,6 +520,7 @@ struct cfi_fixup { | |||
520 | 520 | ||
521 | #define CFI_MFR_AMD 0x0001 | 521 | #define CFI_MFR_AMD 0x0001 |
522 | #define CFI_MFR_ATMEL 0x001F | 522 | #define CFI_MFR_ATMEL 0x001F |
523 | #define CFI_MFR_SAMSUNG 0x00EC | ||
523 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | 524 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ |
524 | 525 | ||
525 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); | 526 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); |