summaryrefslogtreecommitdiff
path: root/include/linux/mtd/mtd.h
diff options
context:
space:
mode:
authorScott Wood <oss@buserror.net>2016-05-30 13:57:58 -0500
committerScott Wood <oss@buserror.net>2016-06-03 20:27:48 -0500
commitceee07b65875bb01bef55cba06940ef7afc1afba (patch)
tree114c79852874d1970e91ff76f80835ce25038baa /include/linux/mtd/mtd.h
parent81c772521ff26054a3fe75efa87d8daeae83e9b4 (diff)
downloadu-boot-imx-ceee07b65875bb01bef55cba06940ef7afc1afba.zip
u-boot-imx-ceee07b65875bb01bef55cba06940ef7afc1afba.tar.gz
u-boot-imx-ceee07b65875bb01bef55cba06940ef7afc1afba.tar.bz2
mtd: nand: Sync with Linux v4.6
Updates the NAND code to match Linux v4.6. The previous sync was from Linux v4.1 in commit d3963721d93fafa. Note that none of the individual NAND drivers tracked Linux closely enough to be synced themselves, other than manually applying a few cross-tree changes. Signed-off-by: Scott Wood <oss@buserror.net> Tested-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r--include/linux/mtd/mtd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 9da77ec..cf20674 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -278,6 +278,11 @@ struct mtd_info {
int usecount;
};
+static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
+{
+ return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize;
+}
+
int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
#ifndef __UBOOT__
int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,