diff --git a/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c b/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c index 28acb2fe975..b808b7a27c7 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c +++ b/boards/arm/cxd56xx/common/src/cxd56_emmcdev.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include "cxd56_emmc.h" @@ -42,6 +43,10 @@ # define CONFIG_SFC_DEVNO 0 #endif +/* EMMC power-on time in ms */ + +#define EMMC_POWER_ON_WAIT_MSEC 10 + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -67,12 +72,19 @@ int board_emmc_initialize(void) return -ENODEV; } + if (POWER_EMMC != PMIC_NONE) + { + /* Wait time until eMMC device is turned power on */ + + nxsig_usleep(EMMC_POWER_ON_WAIT_MSEC * USEC_PER_MSEC); + } + /* Initialize the eMMC device */ ret = cxd56_emmcinitialize(); if (ret < 0) { - ferr("ERROR: Failed to initialize eMMC. %d\n ", ret); + ferr("ERROR: Failed to initialize eMMC. %d\n", ret); return -ENODEV; }