diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mtd/nand.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index fbf3bba37272..01a7f3c71bd0 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -227,7 +227,10 @@ struct nand_onfi_params { | |||
| 227 | __le16 revision; | 227 | __le16 revision; |
| 228 | __le16 features; | 228 | __le16 features; |
| 229 | __le16 opt_cmd; | 229 | __le16 opt_cmd; |
| 230 | u8 reserved[22]; | 230 | u8 reserved0[2]; |
| 231 | __le16 ext_param_page_length; /* since ONFI 2.1 */ | ||
| 232 | u8 num_of_param_pages; /* since ONFI 2.1 */ | ||
| 233 | u8 reserved1[17]; | ||
| 231 | 234 | ||
| 232 | /* manufacturer information block */ | 235 | /* manufacturer information block */ |
| 233 | char manufacturer[12]; | 236 | char manufacturer[12]; |
| @@ -284,6 +287,40 @@ struct nand_onfi_params { | |||
| 284 | 287 | ||
| 285 | #define ONFI_CRC_BASE 0x4F4E | 288 | #define ONFI_CRC_BASE 0x4F4E |
| 286 | 289 | ||
| 290 | /* Extended ECC information Block Definition (since ONFI 2.1) */ | ||
| 291 | struct onfi_ext_ecc_info { | ||
| 292 | u8 ecc_bits; | ||
| 293 | u8 codeword_size; | ||
| 294 | __le16 bb_per_lun; | ||
| 295 | __le16 block_endurance; | ||
| 296 | u8 reserved[2]; | ||
| 297 | } __packed; | ||
| 298 | |||
| 299 | #define ONFI_SECTION_TYPE_0 0 /* Unused section. */ | ||
| 300 | #define ONFI_SECTION_TYPE_1 1 /* for additional sections. */ | ||
| 301 | #define ONFI_SECTION_TYPE_2 2 /* for ECC information. */ | ||
| 302 | struct onfi_ext_section { | ||
| 303 | u8 type; | ||
| 304 | u8 length; | ||
| 305 | } __packed; | ||
| 306 | |||
| 307 | #define ONFI_EXT_SECTION_MAX 8 | ||
| 308 | |||
| 309 | /* Extended Parameter Page Definition (since ONFI 2.1) */ | ||
| 310 | struct onfi_ext_param_page { | ||
| 311 | __le16 crc; | ||
| 312 | u8 sig[4]; /* 'E' 'P' 'P' 'S' */ | ||
| 313 | u8 reserved0[10]; | ||
| 314 | struct onfi_ext_section sections[ONFI_EXT_SECTION_MAX]; | ||
| 315 | |||
| 316 | /* | ||
| 317 | * The actual size of the Extended Parameter Page is in | ||
| 318 | * @ext_param_page_length of nand_onfi_params{}. | ||
| 319 | * The following are the variable length sections. | ||
| 320 | * So we do not add any fields below. Please see the ONFI spec. | ||
| 321 | */ | ||
| 322 | } __packed; | ||
| 323 | |||
| 287 | /** | 324 | /** |
| 288 | * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independent devices | 325 | * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independent devices |
| 289 | * @lock: protection lock | 326 | * @lock: protection lock |
