Skip to content

Commit

Permalink
mmcsd_sdio:Limit the use of sleep in mmcsd.
Browse files Browse the repository at this point in the history
reference:apache#12971

Signed-off-by: chenrun1 <[email protected]>
  • Loading branch information
crafcat7 authored and xiaoxiang781216 committed Sep 6, 2024
1 parent 0e13ea9 commit 4435195
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions drivers/mmcsd/mmcsd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4435195

Please sign in to comment.