dm: mmc: add more conditions to judge whether print the info

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I94f60c9102c8708d7fa84e729762bfe2956d4fd5
This commit is contained in:
Jason Zhu 2021-01-30 15:43:02 +08:00 committed by Jianhong Chen
parent cc7b616de8
commit 6221c090c7
1 changed files with 4 additions and 2 deletions

View File

@ -29,7 +29,8 @@ int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
ret = -ENOSYS;
mmmc_trace_after_send(mmc, cmd, ret);
if (ret)
if (ret && cmd->cmdidx != SD_CMD_SEND_IF_COND
&& cmd->cmdidx != MMC_CMD_APP_CMD)
printf("MMC error: The cmd index is %d, ret is %d\n", cmd->cmdidx, ret);
return ret;
@ -49,7 +50,8 @@ int dm_mmc_send_cmd_prepare(struct udevice *dev, struct mmc_cmd *cmd,
else
ret = -ENOSYS;
mmmc_trace_after_send(mmc, cmd, ret);
if (ret)
if (ret && cmd->cmdidx != SD_CMD_SEND_IF_COND
&& cmd->cmdidx != MMC_CMD_APP_CMD)
printf("MMC error: The cmd index is %d, ret is %d\n", cmd->cmdidx, ret);
return ret;