Commit 53552d22 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

mtd: introduce a macro for max NAND ID sequence length

Introduce a helpful macro for the maximum NAND ID sequence length instead of
using the "8" magic number.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: default avatarHuang Shijie <shijie8@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent ecb42fea
...@@ -546,6 +546,9 @@ struct nand_chip { ...@@ -546,6 +546,9 @@ struct nand_chip {
#define NAND_MFR_MACRONIX 0xc2 #define NAND_MFR_MACRONIX 0xc2
#define NAND_MFR_EON 0x92 #define NAND_MFR_EON 0x92
/* The maximum expected count of bytes in the NAND ID sequence */
#define NAND_MAX_ID_LEN 8
/* /*
* A helper for defining older NAND chips where the second ID byte fully * A helper for defining older NAND chips where the second ID byte fully
* defined the chip, including the geometry (chip size, eraseblock size, page * defined the chip, including the geometry (chip size, eraseblock size, page
...@@ -593,7 +596,7 @@ struct nand_flash_dev { ...@@ -593,7 +596,7 @@ struct nand_flash_dev {
uint8_t mfr_id; uint8_t mfr_id;
uint8_t dev_id; uint8_t dev_id;
}; };
uint8_t id[8]; uint8_t id[NAND_MAX_ID_LEN];
}; };
unsigned int pagesize; unsigned int pagesize;
unsigned int chipsize; unsigned int chipsize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment