mtd: nand: rockchip: avoid initializing nand driver twice

Change-Id: Id643cbdaf3df1b57ef16a52004c2192944d1f289
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2019-08-22 17:01:49 +08:00 committed by Jianhong Chen
parent 24c72b14cb
commit 6c65ad505d
1 changed files with 6 additions and 0 deletions

View File

@ -254,9 +254,15 @@ static void read_flash_id(struct rk_nand *rknand, uint8_t *id)
void board_nand_init(void)
{
const void *blob = gd->fdt_blob;
static int initialized;
fdt_addr_t regs;
int node;
if (initialized)
return;
initialized = 1;
if (g_rk_nand)
return;