mtd: introduce a macro for max NAND ID sequence length
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Apr 5 08:59:10 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=53552d22bfe1f83f69f18eddae2f1d96249440f3
Commit: 53552d22bfe1f83f69f18eddae2f1d96249440f3
Parent: ecb42fea59cf2d1e7160c5c7e707120e0e6714db
Author: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
AuthorDate: Thu Mar 14 09:57:23 2013 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 13:15:06 2013 +0100
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: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Acked-by: Huang Shijie <shijie8 at gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
include/linux/mtd/nand.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index d5903c0..0f78d19 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -546,6 +546,9 @@ struct nand_chip {
#define NAND_MFR_MACRONIX 0xc2
#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
* defined the chip, including the geometry (chip size, eraseblock size, page
@@ -593,7 +596,7 @@ struct nand_flash_dev {
uint8_t mfr_id;
uint8_t dev_id;
};
- uint8_t id[8];
+ uint8_t id[NAND_MAX_ID_LEN];
};
unsigned int pagesize;
unsigned int chipsize;
More information about the linux-mtd-cvs
mailing list