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