dm: mmc: print the cmd index when sending cmd error occur

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I08aab678c5e539000fadccf4a8ad9e97e3693894
This commit is contained in:
Jason Zhu 2021-01-21 14:40:14 +08:00 committed by Jianhong Chen
parent a2a2f053f6
commit 327b5d5723
1 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,9 @@ int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
ret = -ENOSYS;
mmmc_trace_after_send(mmc, cmd, ret);
if (ret)
printf("MMC error: The cmd index is %d, ret is %d\n", cmd->cmdidx, ret);
return ret;
}
@ -46,6 +49,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)
printf("MMC error: The cmd index is %d, ret is %d\n", cmd->cmdidx, ret);
return ret;
}