drivers/mmcsd: Change up_udelay to nxsig_usleep if delay >= 1ms

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-09-06 01:05:26 +08:00
parent 8df6a1de6a
commit ad864dcf8e
+4 -4
View File
@@ -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