summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorChris Packham2018-06-25 00:44:45 +0200
committerMiquel Raynal2018-07-02 09:02:22 +0200
commit872b71ff084ab125c68073d9e69acfd7095f2015 (patch)
treeca96ff0b1755563c5d1740a197051640f93b5335 /include/linux/mtd
parentmtd: rawnand: add manufacturer fixup for ONFI parameter page (diff)
downloadkernel-qcow2-linux-872b71ff084ab125c68073d9e69acfd7095f2015.tar.gz
kernel-qcow2-linux-872b71ff084ab125c68073d9e69acfd7095f2015.tar.xz
kernel-qcow2-linux-872b71ff084ab125c68073d9e69acfd7095f2015.zip
mtd: rawnand: add defines for ONFI version bits
Add defines for the ONFI version bits and use them in nand_flash_detect_onfi(). Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/rawnand.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index dc4538b58b84..fbac4741da52 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -237,6 +237,17 @@ enum nand_ecc_algo {
/* Keep gcc happy */
struct nand_chip;
+/* ONFI version bits */
+#define ONFI_VERSION_1_0 BIT(1)
+#define ONFI_VERSION_2_0 BIT(2)
+#define ONFI_VERSION_2_1 BIT(3)
+#define ONFI_VERSION_2_2 BIT(4)
+#define ONFI_VERSION_2_3 BIT(5)
+#define ONFI_VERSION_3_0 BIT(6)
+#define ONFI_VERSION_3_1 BIT(7)
+#define ONFI_VERSION_3_2 BIT(8)
+#define ONFI_VERSION_4_0 BIT(9)
+
/* ONFI features */
#define ONFI_FEATURE_16_BIT_BUS (1 << 0)
#define ONFI_FEATURE_EXT_PARAM_PAGE (1 << 7)