diff options
Diffstat (limited to 'include/linux/mtd/cfi.h')
-rw-r--r-- | include/linux/mtd/cfi.h | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index df89f4275232..d2118b0eac9a 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -1,6 +1,20 @@ | |||
1 | 1 | /* | |
2 | /* Common Flash Interface structures | 2 | * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> et al. |
3 | * See http://support.intel.com/design/flash/technote/index.htm | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
17 | * | ||
4 | */ | 18 | */ |
5 | 19 | ||
6 | #ifndef __MTD_CFI_H__ | 20 | #ifndef __MTD_CFI_H__ |
@@ -253,6 +267,7 @@ struct cfi_bri_query { | |||
253 | #define P_ID_MITSUBISHI_STD 0x0100 | 267 | #define P_ID_MITSUBISHI_STD 0x0100 |
254 | #define P_ID_MITSUBISHI_EXT 0x0101 | 268 | #define P_ID_MITSUBISHI_EXT 0x0101 |
255 | #define P_ID_SST_PAGE 0x0102 | 269 | #define P_ID_SST_PAGE 0x0102 |
270 | #define P_ID_SST_OLD 0x0701 | ||
256 | #define P_ID_INTEL_PERFORMANCE 0x0200 | 271 | #define P_ID_INTEL_PERFORMANCE 0x0200 |
257 | #define P_ID_INTEL_DATA 0x0210 | 272 | #define P_ID_INTEL_DATA 0x0210 |
258 | #define P_ID_RESERVED 0xffff | 273 | #define P_ID_RESERVED 0xffff |
@@ -297,7 +312,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, | |||
297 | * and 32bit devices on 16 bit busses | 312 | * and 32bit devices on 16 bit busses |
298 | * set the low bit of the alternating bit sequence of the address. | 313 | * set the low bit of the alternating bit sequence of the address. |
299 | */ | 314 | */ |
300 | if (((type * interleave) > bankwidth) && ((uint8_t)cmd_ofs == 0xaa)) | 315 | if (((type * interleave) > bankwidth) && ((cmd_ofs & 0xff) == 0xaa)) |
301 | addr |= (type >> 1)*interleave; | 316 | addr |= (type >> 1)*interleave; |
302 | 317 | ||
303 | return addr; | 318 | return addr; |
@@ -515,14 +530,25 @@ struct cfi_fixup { | |||
515 | void* param; | 530 | void* param; |
516 | }; | 531 | }; |
517 | 532 | ||
518 | #define CFI_MFR_ANY 0xffff | 533 | #define CFI_MFR_ANY 0xFFFF |
519 | #define CFI_ID_ANY 0xffff | 534 | #define CFI_ID_ANY 0xFFFF |
520 | 535 | #define CFI_MFR_CONTINUATION 0x007F | |
521 | #define CFI_MFR_AMD 0x0001 | 536 | |
522 | #define CFI_MFR_INTEL 0x0089 | 537 | #define CFI_MFR_AMD 0x0001 |
523 | #define CFI_MFR_ATMEL 0x001F | 538 | #define CFI_MFR_ATMEL 0x001F |
524 | #define CFI_MFR_SAMSUNG 0x00EC | 539 | #define CFI_MFR_EON 0x001C |
525 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | 540 | #define CFI_MFR_FUJITSU 0x0004 |
541 | #define CFI_MFR_HYUNDAI 0x00AD | ||
542 | #define CFI_MFR_INTEL 0x0089 | ||
543 | #define CFI_MFR_MACRONIX 0x00C2 | ||
544 | #define CFI_MFR_NEC 0x0010 | ||
545 | #define CFI_MFR_PMC 0x009D | ||
546 | #define CFI_MFR_SAMSUNG 0x00EC | ||
547 | #define CFI_MFR_SHARP 0x00B0 | ||
548 | #define CFI_MFR_SST 0x00BF | ||
549 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | ||
550 | #define CFI_MFR_TOSHIBA 0x0098 | ||
551 | #define CFI_MFR_WINBOND 0x00DA | ||
526 | 552 | ||
527 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); | 553 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); |
528 | 554 | ||