projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecb42fe
)
mtd: introduce a macro for max NAND ID sequence length
author
Artem Bityutskiy
<
[email protected]
>
Thu, 14 Mar 2013 07:57:23 +0000
(09:57 +0200)
committer
David Woodhouse
<
[email protected]
>
Fri, 5 Apr 2013 12:15:06 +0000
(13:15 +0100)
Introduce a helpful macro for the maximum NAND ID sequence length instead of
using the "8" magic number.
Signed-off-by: Artem Bityutskiy <
[email protected]
>
Acked-by: Huang Shijie <
[email protected]
>
Signed-off-by: David Woodhouse <
[email protected]
>
include/linux/mtd/nand.h
patch
|
blob
|
history
diff --git
a/include/linux/mtd/nand.h
b/include/linux/mtd/nand.h
index d5903c0a0fe74c6192b7b7fb9793065c1298bb34..0f78d19303c55625123d79ed93b481a138251b83 100644
(file)
--- 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;