diff options
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 14 | ||||
-rw-r--r-- | include/linux/mtd/cfi.h | 12 |
2 files changed, 12 insertions, 14 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 1ebdcdd72d84..ea2a7f66ddf9 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -43,10 +43,6 @@ | |||
43 | 43 | ||
44 | #define MAX_WORD_RETRIES 3 | 44 | #define MAX_WORD_RETRIES 3 |
45 | 45 | ||
46 | #define MANUFACTURER_AMD 0x0001 | ||
47 | #define MANUFACTURER_ATMEL 0x001F | ||
48 | #define MANUFACTURER_MACRONIX 0x00C2 | ||
49 | #define MANUFACTURER_SST 0x00BF | ||
50 | #define SST49LF004B 0x0060 | 46 | #define SST49LF004B 0x0060 |
51 | #define SST49LF040B 0x0050 | 47 | #define SST49LF040B 0x0050 |
52 | #define SST49LF008A 0x005a | 48 | #define SST49LF008A 0x005a |
@@ -168,7 +164,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd, void* param) | |||
168 | * This reduces the risk of false detection due to | 164 | * This reduces the risk of false detection due to |
169 | * the 8-bit device ID. | 165 | * the 8-bit device ID. |
170 | */ | 166 | */ |
171 | (cfi->mfr == MANUFACTURER_MACRONIX)) { | 167 | (cfi->mfr == CFI_MFR_MACRONIX)) { |
172 | DEBUG(MTD_DEBUG_LEVEL1, | 168 | DEBUG(MTD_DEBUG_LEVEL1, |
173 | "%s: Macronix MX29LV400C with bottom boot block" | 169 | "%s: Macronix MX29LV400C with bottom boot block" |
174 | " detected\n", map->name); | 170 | " detected\n", map->name); |
@@ -286,7 +282,7 @@ static struct cfi_fixup cfi_fixup_table[] = { | |||
286 | { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, | 282 | { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, |
287 | #ifdef AMD_BOOTLOC_BUG | 283 | #ifdef AMD_BOOTLOC_BUG |
288 | { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, | 284 | { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, |
289 | { MANUFACTURER_MACRONIX, CFI_ID_ANY, fixup_amd_bootblock, NULL }, | 285 | { CFI_MFR_MACRONIX, CFI_ID_ANY, fixup_amd_bootblock, NULL }, |
290 | #endif | 286 | #endif |
291 | { CFI_MFR_AMD, 0x0050, fixup_use_secsi, NULL, }, | 287 | { CFI_MFR_AMD, 0x0050, fixup_use_secsi, NULL, }, |
292 | { CFI_MFR_AMD, 0x0053, fixup_use_secsi, NULL, }, | 288 | { CFI_MFR_AMD, 0x0053, fixup_use_secsi, NULL, }, |
@@ -304,9 +300,9 @@ static struct cfi_fixup cfi_fixup_table[] = { | |||
304 | { 0, 0, NULL, NULL } | 300 | { 0, 0, NULL, NULL } |
305 | }; | 301 | }; |
306 | static struct cfi_fixup jedec_fixup_table[] = { | 302 | static struct cfi_fixup jedec_fixup_table[] = { |
307 | { MANUFACTURER_SST, SST49LF004B, fixup_use_fwh_lock, NULL, }, | 303 | { CFI_MFR_SST, SST49LF004B, fixup_use_fwh_lock, NULL, }, |
308 | { MANUFACTURER_SST, SST49LF040B, fixup_use_fwh_lock, NULL, }, | 304 | { CFI_MFR_SST, SST49LF040B, fixup_use_fwh_lock, NULL, }, |
309 | { MANUFACTURER_SST, SST49LF008A, fixup_use_fwh_lock, NULL, }, | 305 | { CFI_MFR_SST, SST49LF008A, fixup_use_fwh_lock, NULL, }, |
310 | { 0, 0, NULL, NULL } | 306 | { 0, 0, NULL, NULL } |
311 | }; | 307 | }; |
312 | 308 | ||
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index a4eefc5810dc..cee05b1e62b1 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -518,11 +518,13 @@ struct cfi_fixup { | |||
518 | #define CFI_MFR_ANY 0xffff | 518 | #define CFI_MFR_ANY 0xffff |
519 | #define CFI_ID_ANY 0xffff | 519 | #define CFI_ID_ANY 0xffff |
520 | 520 | ||
521 | #define CFI_MFR_AMD 0x0001 | 521 | #define CFI_MFR_AMD 0x0001 |
522 | #define CFI_MFR_INTEL 0x0089 | 522 | #define CFI_MFR_ATMEL 0x001F |
523 | #define CFI_MFR_ATMEL 0x001F | 523 | #define CFI_MFR_INTEL 0x0089 |
524 | #define CFI_MFR_SAMSUNG 0x00EC | 524 | #define CFI_MFR_MACRONIX 0x00C2 |
525 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | 525 | #define CFI_MFR_SAMSUNG 0x00EC |
526 | #define CFI_MFR_SST 0x00BF | ||
527 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | ||
526 | 528 | ||
527 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); | 529 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); |
528 | 530 | ||