summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>2017-03-17 08:12:31 (GMT)
committerYork Sun <york.sun@nxp.com>2017-03-28 17:39:33 (GMT)
commit203db38a94a424bb1ab6a91e85148e8a8ea795d0 (patch)
tree153ab525078515afbf835638ee4bc2afb807cc0a /drivers/mtd
parentd72158c045eacf5022b052bdc56a32bc98c89034 (diff)
downloadu-boot-203db38a94a424bb1ab6a91e85148e8a8ea795d0.tar.xz
mtd: nand: remove nand size print from nand_init function
Add nand_size() function to move the nand size print into initr_nand(). Remove nand size print from nand_init() to allow other function to call nand_init() without printing nand size. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/nand.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 3ea2dcf..168bac6 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -131,6 +131,11 @@ static void create_mtd_concat(void)
}
#endif
+unsigned long nand_size(void)
+{
+ return total_nand_size;
+}
+
void nand_init(void)
{
static int initialized;
@@ -152,8 +157,6 @@ void nand_init(void)
nand_init_chip(i);
#endif
- printf("%lu MiB\n", total_nand_size / 1024);
-
#ifdef CONFIG_SYS_NAND_SELECT_DEVICE
/*
* Select the chip in the board/cpu specific driver