diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-05-24 19:20:05 +0200 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-03-08 23:21:15 +0100 |
commit | 7f501f0a72036dc29ad9a53811474c393634b401 (patch) | |
tree | 279924b11173367a3b846329e9a4204f36127a40 /include/linux/mtd | |
parent | cbe435a182d15d82a10a6b56a96406d957ceb35c (diff) | |
download | op-kernel-dev-7f501f0a72036dc29ad9a53811474c393634b401.zip op-kernel-dev-7f501f0a72036dc29ad9a53811474c393634b401.tar.gz |
mtd: nand: Store nand ID in struct nand_chip
Store the NAND ID in struct nand_chip to avoid passing id_data and id_len
as function parameters.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/nand.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 9591e0f..e2c1135 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -465,6 +465,17 @@ struct nand_jedec_params { } __packed; /** + * struct nand_id - NAND id structure + * @data: buffer containing the id bytes. Currently 8 bytes large, but can + * be extended if required. + * @len: ID length. + */ +struct nand_id { + u8 data[8]; + int len; +}; + +/** * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independent devices * @lock: protection lock * @active: the mtd device which holds the controller currently @@ -793,6 +804,7 @@ nand_get_sdr_timings(const struct nand_data_interface *conf) * @pagebuf_bitflips: [INTERN] holds the bitflip count for the page which is * currently in data_buf. * @subpagesize: [INTERN] holds the subpagesize + * @id: [INTERN] holds NAND ID * @onfi_version: [INTERN] holds the chip ONFI version (BCD encoded), * non 0 if ONFI supported. * @jedec_version: [INTERN] holds the chip JEDEC version (BCD encoded), @@ -881,6 +893,7 @@ struct nand_chip { int badblockpos; int badblockbits; + struct nand_id id; int onfi_version; int jedec_version; union { |