mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-20 13:41:45 +00:00
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>
This commit is contained in:
parent
d72158c045
commit
203db38a94
3 changed files with 7 additions and 2 deletions
|
@ -426,6 +426,7 @@ static int initr_nand(void)
|
||||||
{
|
{
|
||||||
puts("NAND: ");
|
puts("NAND: ");
|
||||||
nand_init();
|
nand_init();
|
||||||
|
printf("%lu MiB\n", nand_size() / 1024);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -131,6 +131,11 @@ static void create_mtd_concat(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unsigned long nand_size(void)
|
||||||
|
{
|
||||||
|
return total_nand_size;
|
||||||
|
}
|
||||||
|
|
||||||
void nand_init(void)
|
void nand_init(void)
|
||||||
{
|
{
|
||||||
static int initialized;
|
static int initialized;
|
||||||
|
@ -152,8 +157,6 @@ void nand_init(void)
|
||||||
nand_init_chip(i);
|
nand_init_chip(i);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("%lu MiB\n", total_nand_size / 1024);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_NAND_SELECT_DEVICE
|
#ifdef CONFIG_SYS_NAND_SELECT_DEVICE
|
||||||
/*
|
/*
|
||||||
* Select the chip in the board/cpu specific driver
|
* Select the chip in the board/cpu specific driver
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void nand_init(void);
|
extern void nand_init(void);
|
||||||
|
unsigned long nand_size(void);
|
||||||
|
|
||||||
#include <linux/compat.h>
|
#include <linux/compat.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue