mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
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:
+16
-12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user