aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mtd/nand.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 63b319a6f98c..9a1b74c85044 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -551,9 +551,9 @@ struct nand_chip {
551 * defined the chip, including the geometry (chip size, eraseblock size, page 551 * defined the chip, including the geometry (chip size, eraseblock size, page
552 * size). 552 * size).
553 */ 553 */
554#define LEGACY_ID_NAND(nm, devid, pagesz, chipsz, erasesz, opts) \ 554#define LEGACY_ID_NAND(nm, devid, pagesz, chipsz, erasesz, opts) \
555 { .name = (nm), .dev_id = (devid), .pagesize = (pagesz), \ 555 { .name = (nm), {{ .dev_id = (devid) }}, .pagesize = (pagesz), \
556 .chipsize = (chipsz), .erasesize = (erasesz), \ 556 .chipsize = (chipsz), .erasesize = (erasesz), \
557 .options = (opts) } 557 .options = (opts) }
558 558
559/* 559/*
@@ -566,14 +566,19 @@ struct nand_chip {
566 * buswidth), and the page size, eraseblock size, and OOB size could vary while 566 * buswidth), and the page size, eraseblock size, and OOB size could vary while
567 * using the same device ID. 567 * using the same device ID.
568 */ 568 */
569#define EXTENDED_ID_NAND(nm, devid, chipsz, opts) \ 569#define EXTENDED_ID_NAND(nm, devid, chipsz, opts) \
570 { .name = (nm), .dev_id = (devid), .chipsize = (chipsz), \ 570 { .name = (nm), {{ .dev_id = (devid) }}, .chipsize = (chipsz), \
571 .options = (opts) } 571 .options = (opts) }
572 572
573/** 573/**
574 * struct nand_flash_dev - NAND Flash Device ID Structure 574 * struct nand_flash_dev - NAND Flash Device ID Structure
575 * @name: a human-readable name of the NAND chip 575 * @name: a human-readable name of the NAND chip
576 * @dev_id: the device ID (the second byte of the full chip ID array) 576 * @dev_id: the device ID (the second byte of the full chip ID array)
577 * @mfr_id: manufecturer ID part of the full chip ID array (refers the same
578 * memory address as @id[0])
579 * @dev_id: device ID part of the full chip ID array (refers the same memory
580 * address as @id[1])
581 * @id: full device ID array
577 * @pagesize: size of the NAND page in bytes; if 0, then the real page size (as 582 * @pagesize: size of the NAND page in bytes; if 0, then the real page size (as
578 * well as the eraseblock size) is determined from the extended NAND 583 * well as the eraseblock size) is determined from the extended NAND
579 * chip ID array) 584 * chip ID array)
@@ -583,7 +588,13 @@ struct nand_chip {
583 */ 588 */
584struct nand_flash_dev { 589struct nand_flash_dev {
585 char *name; 590 char *name;
586 int dev_id; 591 union {
592 struct {
593 uint8_t mfr_id;
594 uint8_t dev_id;
595 };
596 uint8_t id[8];
597 };
587 unsigned long pagesize; 598 unsigned long pagesize;
588 unsigned long chipsize; 599 unsigned long chipsize;
589 unsigned long erasesize; 600 unsigned long erasesize;