From ad864dcf8ee70fbacc633c74e85b8bb19228f0d0 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 6 Sep 2021 01:05:26 +0800 Subject: [PATCH] drivers/mmcsd: Change up_udelay to nxsig_usleep if delay >= 1ms Signed-off-by: Xiang Xiao --- drivers/mmcsd/mmcsd_sdio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c index 2ef3e46a32c..ab40e75d419 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -362,12 +362,12 @@ static inline int mmcsd_sendcmd4(FAR struct mmcsd_state_s *priv) */ mmcsd_sendcmdpoll(priv, MMCSD_CMD4, CONFIG_MMCSD_DSR << 16); - up_udelay(MMCSD_DSR_DELAY); + nxsig_usleep(MMCSD_DSR_DELAY); /* Send it again to have more confidence */ mmcsd_sendcmdpoll(priv, MMCSD_CMD4, CONFIG_MMCSD_DSR << 16); - up_udelay(MMCSD_DSR_DELAY); + nxsig_usleep(MMCSD_DSR_DELAY); } #endif @@ -3032,7 +3032,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) /* Select high speed SD clocking (which may depend on the DSR setting) */ SDIO_CLOCK(priv->dev, CLOCK_SD_TRANSFER_1BIT); - up_udelay(MMCSD_CLK_DELAY); + nxsig_usleep(MMCSD_CLK_DELAY); /* Get the SD card Configuration Register (SCR). We need this now because * that configuration register contains the indication whether or not @@ -3111,7 +3111,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) /* Then send CMD0 just once is standard procedure */ mmcsd_sendcmdpoll(priv, MMCSD_CMD0, 0); - up_udelay(MMCSD_IDLE_DELAY); + nxsig_usleep(MMCSD_IDLE_DELAY); #ifdef CONFIG_MMCSD_MMCSUPPORT /* Send CMD1 which is supported only by MMC. if there is valid response