summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-09-05 14:28:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-06 14:42:06 +0200
commit665a276f479b525802498d462a7bb7e45a72d5d1 (patch)
tree9a077fa4f710a41fb7212deb082870701fe2263f /include
parentd0f44fabd962fd7f93d123c8b6f5d648b9bd89c1 (diff)
downloadbarebox-665a276f479b525802498d462a7bb7e45a72d5d1.tar.gz
barebox-665a276f479b525802498d462a7bb7e45a72d5d1.tar.xz
mtd: nand: Only call ONFI get/set features on supported chips
Older versions of the ONFI spec do not support get/set features, so do not call these commands when they are not available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/nand.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 27538c3f42..88a8fe9756 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -222,6 +222,9 @@ struct nand_chip;
/* ONFI subfeature parameters length */
#define ONFI_SUBFEATURE_PARAM_LEN 4
+/* ONFI optional commands SET/GET FEATURES supported? */
+#define ONFI_OPT_CMD_SET_GET_FEATURES (1 << 2)
+
struct nand_onfi_params {
/* rev info and features block */
/* 'O' 'N' 'F' 'I' */