mmcsd:add reset card to idle state (CMD0) support

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
This commit is contained in:
wanggang26 2024-10-14 16:08:45 +08:00 committed by Xiang Xiao
parent 863dcbbb45
commit 9ee4566b4d
1 changed files with 6 additions and 0 deletions

View File

@ -3365,6 +3365,12 @@ static int mmcsd_iocmd(FAR struct mmcsd_state_s *priv,
opcode = ic_ptr->opcode & MMCSD_CMDIDX_MASK;
switch (opcode)
{
case MMCSD_CMDIDX0: /* Reset card to idle state */
{
mmcsd_sendcmdpoll(priv, MMCSD_CMD0, ic_ptr->arg);
MMCSD_USLEEP(MMCSD_IDLE_DELAY);
}
break;
case MMCSD_CMDIDX2: /* Get cid reg data */
{
memcpy((FAR void *)(uintptr_t)ic_ptr->data_ptr,