aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/nand.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 01a7f3c71bd0..bf4c566f0647 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -202,6 +202,10 @@ typedef enum {
202/* Keep gcc happy */ 202/* Keep gcc happy */
203struct nand_chip; 203struct nand_chip;
204 204
205/* ONFI features */
206#define ONFI_FEATURE_16_BIT_BUS (1 << 0)
207#define ONFI_FEATURE_EXT_PARAM_PAGE (1 << 7)
208
205/* ONFI timing mode, used in both asynchronous and synchronous mode */ 209/* ONFI timing mode, used in both asynchronous and synchronous mode */
206#define ONFI_TIMING_MODE_0 (1 << 0) 210#define ONFI_TIMING_MODE_0 (1 << 0)
207#define ONFI_TIMING_MODE_1 (1 << 1) 211#define ONFI_TIMING_MODE_1 (1 << 1)
@@ -756,6 +760,12 @@ struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
756 return chip->priv; 760 return chip->priv;
757} 761}
758 762
763/* return the supported features. */
764static inline int onfi_feature(struct nand_chip *chip)
765{
766 return chip->onfi_version ? le16_to_cpu(chip->onfi_params.features) : 0;
767}
768
759/* return the supported asynchronous timing mode. */ 769/* return the supported asynchronous timing mode. */
760static inline int onfi_get_async_timing_mode(struct nand_chip *chip) 770static inline int onfi_get_async_timing_mode(struct nand_chip *chip)
761{ 771{