diff options
| author | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-11-05 09:53:43 -0500 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-11-30 04:51:26 -0500 |
| commit | b2ef1a2bb2eb49cd7c75b22f1ea40ead0bdfdb8a (patch) | |
| tree | 5f28a7fc1225eb6226770ceaade014090f420197 | |
| parent | 8dbaea4bfcecacaf496a3e2ae92867baedbcab8e (diff) | |
mtd: move manufacturer to the common cfi.h header file
This patch moves the MANUFACTURER_ST and MANUFACTURER_INTEL to the
include/linux/mtd/cfi.h header file and renames them to CFI_MFR_ST and
CFI_MFR_INTEL. CFI_MFR_ST was already present there.
All references in drivers/mtd/chips/cfi_cmdset_0001.c are updated to reflect
this.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 20 | ||||
| -rw-r--r-- | include/linux/mtd/cfi.h | 9 |
2 files changed, 15 insertions, 14 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 94be67e880a7..5fbf29e1e64f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
| @@ -43,11 +43,11 @@ | |||
| 43 | // debugging, turns off buffer write mode if set to 1 | 43 | // debugging, turns off buffer write mode if set to 1 |
| 44 | #define FORCE_WORD_WRITE 0 | 44 | #define FORCE_WORD_WRITE 0 |
| 45 | 45 | ||
| 46 | #define MANUFACTURER_INTEL 0x0089 | 46 | /* Intel chips */ |
| 47 | #define I82802AB 0x00ad | 47 | #define I82802AB 0x00ad |
| 48 | #define I82802AC 0x00ac | 48 | #define I82802AC 0x00ac |
| 49 | #define PF38F4476 0x881c | 49 | #define PF38F4476 0x881c |
| 50 | #define MANUFACTURER_ST 0x0020 | 50 | /* STMicroelectronics chips */ |
| 51 | #define M50LPW080 0x002F | 51 | #define M50LPW080 0x002F |
| 52 | #define M50FLW080A 0x0080 | 52 | #define M50FLW080A 0x0080 |
| 53 | #define M50FLW080B 0x0081 | 53 | #define M50FLW080B 0x0081 |
| @@ -308,16 +308,16 @@ static struct cfi_fixup cfi_fixup_table[] = { | |||
| 308 | #endif | 308 | #endif |
| 309 | { CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL }, | 309 | { CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL }, |
| 310 | { CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL }, | 310 | { CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL }, |
| 311 | { MANUFACTURER_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock, NULL, }, | 311 | { CFI_MFR_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock, NULL, }, |
| 312 | { 0, 0, NULL, NULL } | 312 | { 0, 0, NULL, NULL } |
| 313 | }; | 313 | }; |
| 314 | 314 | ||
| 315 | static struct cfi_fixup jedec_fixup_table[] = { | 315 | static struct cfi_fixup jedec_fixup_table[] = { |
| 316 | { MANUFACTURER_INTEL, I82802AB, fixup_use_fwh_lock, NULL, }, | 316 | { CFI_MFR_INTEL, I82802AB, fixup_use_fwh_lock, NULL, }, |
| 317 | { MANUFACTURER_INTEL, I82802AC, fixup_use_fwh_lock, NULL, }, | 317 | { CFI_MFR_INTEL, I82802AC, fixup_use_fwh_lock, NULL, }, |
| 318 | { MANUFACTURER_ST, M50LPW080, fixup_use_fwh_lock, NULL, }, | 318 | { CFI_MFR_ST, M50LPW080, fixup_use_fwh_lock, NULL, }, |
| 319 | { MANUFACTURER_ST, M50FLW080A, fixup_use_fwh_lock, NULL, }, | 319 | { CFI_MFR_ST, M50FLW080A, fixup_use_fwh_lock, NULL, }, |
| 320 | { MANUFACTURER_ST, M50FLW080B, fixup_use_fwh_lock, NULL, }, | 320 | { CFI_MFR_ST, M50FLW080B, fixup_use_fwh_lock, NULL, }, |
| 321 | { 0, 0, NULL, NULL } | 321 | { 0, 0, NULL, NULL } |
| 322 | }; | 322 | }; |
| 323 | static struct cfi_fixup fixup_table[] = { | 323 | static struct cfi_fixup fixup_table[] = { |
| @@ -333,7 +333,7 @@ static struct cfi_fixup fixup_table[] = { | |||
| 333 | static void cfi_fixup_major_minor(struct cfi_private *cfi, | 333 | static void cfi_fixup_major_minor(struct cfi_private *cfi, |
| 334 | struct cfi_pri_intelext *extp) | 334 | struct cfi_pri_intelext *extp) |
| 335 | { | 335 | { |
| 336 | if (cfi->mfr == MANUFACTURER_INTEL && | 336 | if (cfi->mfr == CFI_MFR_INTEL && |
| 337 | cfi->id == PF38F4476 && extp->MinorVersion == '3') | 337 | cfi->id == PF38F4476 && extp->MinorVersion == '3') |
| 338 | extp->MinorVersion = '1'; | 338 | extp->MinorVersion = '1'; |
| 339 | } | 339 | } |
| @@ -2249,7 +2249,7 @@ static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len, | |||
| 2249 | 2249 | ||
| 2250 | /* Some chips have OTP located in the _top_ partition only. | 2250 | /* Some chips have OTP located in the _top_ partition only. |
| 2251 | For example: Intel 28F256L18T (T means top-parameter device) */ | 2251 | For example: Intel 28F256L18T (T means top-parameter device) */ |
| 2252 | if (cfi->mfr == MANUFACTURER_INTEL) { | 2252 | if (cfi->mfr == CFI_MFR_INTEL) { |
| 2253 | switch (cfi->id) { | 2253 | switch (cfi->id) { |
| 2254 | case 0x880b: | 2254 | case 0x880b: |
| 2255 | case 0x880c: | 2255 | case 0x880c: |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 88d3d8fbf9f2..df89f4275232 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
| @@ -518,10 +518,11 @@ 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_ATMEL 0x001F | 522 | #define CFI_MFR_INTEL 0x0089 |
| 523 | #define CFI_MFR_SAMSUNG 0x00EC | 523 | #define CFI_MFR_ATMEL 0x001F |
| 524 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | 524 | #define CFI_MFR_SAMSUNG 0x00EC |
| 525 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | ||
| 525 | 526 | ||
| 526 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); | 527 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); |
| 527 | 528 | ||
