1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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>
This commit is contained in:
Mugunthan V N
2017-06-26 19:12:51 -05:00
committed by Tom Rini
parent 8d3a25685e
commit ad92dff28c
4 changed files with 65 additions and 41 deletions

View File

@@ -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_ */