summaryrefslogtreecommitdiff
path: root/include/nand.h
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2017-06-27 00:12:51 (GMT)
committerTom Rini <trini@konsulko.com>2017-07-12 02:41:44 (GMT)
commitad92dff28c26b127391692e4d675a463ee4a4215 (patch)
treece21b53edc58c4fe55c24cac4e11fcef6bb94927 /include/nand.h
parent8d3a25685e4aac7070365a2b3c53c2c81b27930f (diff)
downloadu-boot-fsl-qoriq-ad92dff28c26b127391692e4d675a463ee4a4215.tar.xz
cmd: nand: abstract global variable usage for dm conversion
nand_info is used all over the file so abstract it with get_nand_dev_by_index() which will help for DM conversion. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Diffstat (limited to 'include/nand.h')
-rw-r--r--include/nand.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/nand.h b/include/nand.h
index bc5dd81..c8556e1 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -145,4 +145,13 @@ int spl_nand_erase_one(int block, int page);
/* platform specific init functions */
void sunxi_nand_init(void);
+/*
+ * get_nand_dev_by_index - Get the nand info based in index.
+ *
+ * @dev - index to the nand device.
+ *
+ * returns pointer to the nand device info structure or NULL on failure.
+ */
+struct mtd_info *get_nand_dev_by_index(int dev);
+
#endif /* _NAND_H_ */