Message ID | 1362494376-1588-2-git-send-email-dedekind1@gmail.com |
---|---|
State | New, archived |
Headers | show |
On Tue, 2013-03-05 at 16:39 +0200, Artem Bityutskiy wrote: > + * @dev_id: device ID part of the full chip ID array (refers the same memory > + * address as @id[0]) Here it should be @id[1] instead.
On Tue, Mar 5, 2013 at 10:49 PM, Artem Bityutskiy <dedekind1@gmail.com> wrote: > On Tue, 2013-03-05 at 16:39 +0200, Artem Bityutskiy wrote: >> + * @dev_id: device ID part of the full chip ID array (refers the same memory >> + * address as @id[0]) > > Here it should be @id[1] instead. > > this patch causes a compiler error. I tested the l2-mtd tree just now. thanks Huang Shijie
On Wed, 2013-03-06 at 16:00 +0800, Huang Shijie wrote: > On Tue, Mar 5, 2013 at 10:49 PM, Artem Bityutskiy <dedekind1@gmail.com> wrote: > > On Tue, 2013-03-05 at 16:39 +0200, Artem Bityutskiy wrote: > >> + * @dev_id: device ID part of the full chip ID array (refers the same memory > >> + * address as @id[0]) > > > > Here it should be @id[1] instead. > > > > > this patch causes a compiler error. Should be fine now, thanks!
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 7ecc6d8..370f4f0 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -567,6 +567,11 @@ struct nand_chip { * struct nand_flash_dev - NAND Flash Device ID Structure * @name: a human-readable name of the NAND chip * @dev_id: the device ID (the second byte of the full chip ID array) + * @mfr_id: manufecturer ID part of the full chip ID array (refers the same + * memory address as @id[0]) + * @dev_id: device ID part of the full chip ID array (refers the same memory + * address as @id[0]) + * @id: full device ID array * @pagesize: size of the NAND page in bytes; if 0, then the real page size (as * well as the eraseblock size) is determined from the extended NAND * chip ID array) @@ -576,7 +581,13 @@ struct nand_chip { */ struct nand_flash_dev { char *name; - int dev_id; + union { + struct { + uint8_t mfr_id; + uint8_t dev_id; + }; + uint8_t id[8]; + }; unsigned long pagesize; unsigned long chipsize; unsigned long erasesize;