boards: spresense: Add eMMC power-on wait time

Add 10msec wait time before eMMC device is powered on.
This commit is contained in:
SPRESENSE 2023-03-01 14:29:24 +09:00 committed by Alin Jerpelea
parent 96da997b23
commit 56d43a4a1d

View File

@ -30,6 +30,7 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/board.h>
#include <nuttx/signal.h>
#include <nuttx/fs/fs.h>
#include <arch/board/board.h>
#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;
}