1
0
Fork 0
forked from nuttx/nuttx-update

mmcsd_sdio:Limit the use of sleep in mmcsd.

reference:https://github.com/apache/nuttx/pull/12971

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2024-08-21 13:23:47 +08:00 committed by Xiang Xiao
parent 0e13ea9ed1
commit 44351959ee

View file

@ -98,18 +98,22 @@
#define MMCSD_CAPACITY(b, s) ((s) >= 10 ? (b) << ((s) - 10) : (b) >> (10 - (s)))
#define MMCSD_USLEEP(usec) \
do \
{ \
if (up_interrupt_context()) \
{ \
up_udelay(usec); \
} \
else \
{ \
nxsig_usleep(usec); \
} \
} while (0)
#ifdef CONFIG_BOARD_COREDUMP_BLKDEV
# define MMCSD_USLEEP(usec) \
do \
{ \
if (up_interrupt_context()) \
{ \
up_udelay(usec); \
} \
else \
{ \
nxsig_usleep(usec); \
} \
} while (0)
#else
# define MMCSD_USLEEP(usec) nxsig_usleep(usec)
#endif
/****************************************************************************
* Private Types