Skip to content

Commit

Permalink
mmc: Align MMC_TRACE with tiny printf
Browse files Browse the repository at this point in the history
The tiny printf implementation only supports %x format specifier,
it does not support %X . Since it makes little difference whether
the debug output prints hex numbers in capitals or not, change it
to %x and make the MMC_TRACE output work with tiny printf too.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Simon Glass <[email protected]>
  • Loading branch information
Marek Vasut authored and trini committed Mar 25, 2019
1 parent 00717b0 commit 7d5ccb1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/mmc/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ __weak int board_mmc_getcd(struct mmc *mmc)
void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd)
{
printf("CMD_SEND:%d\n", cmd->cmdidx);
printf("\t\tARG\t\t\t 0x%08X\n", cmd->cmdarg);
printf("\t\tARG\t\t\t 0x%08x\n", cmd->cmdarg);
}

void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret)
Expand All @@ -83,21 +83,21 @@ void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret)
printf("\t\tMMC_RSP_NONE\n");
break;
case MMC_RSP_R1:
printf("\t\tMMC_RSP_R1,5,6,7 \t 0x%08X \n",
printf("\t\tMMC_RSP_R1,5,6,7 \t 0x%08x \n",
cmd->response[0]);
break;
case MMC_RSP_R1b:
printf("\t\tMMC_RSP_R1b\t\t 0x%08X \n",
printf("\t\tMMC_RSP_R1b\t\t 0x%08x \n",
cmd->response[0]);
break;
case MMC_RSP_R2:
printf("\t\tMMC_RSP_R2\t\t 0x%08X \n",
printf("\t\tMMC_RSP_R2\t\t 0x%08x \n",
cmd->response[0]);
printf("\t\t \t\t 0x%08X \n",
printf("\t\t \t\t 0x%08x \n",
cmd->response[1]);
printf("\t\t \t\t 0x%08X \n",
printf("\t\t \t\t 0x%08x \n",
cmd->response[2]);
printf("\t\t \t\t 0x%08X \n",
printf("\t\t \t\t 0x%08x \n",
cmd->response[3]);
printf("\n");
printf("\t\t\t\t\tDUMPING DATA\n");
Expand All @@ -107,12 +107,12 @@ void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret)
ptr = (u8 *)&cmd->response[i];
ptr += 3;
for (j = 0; j < 4; j++)
printf("%02X ", *ptr--);
printf("%02x ", *ptr--);
printf("\n");
}
break;
case MMC_RSP_R3:
printf("\t\tMMC_RSP_R3,4\t\t 0x%08X \n",
printf("\t\tMMC_RSP_R3,4\t\t 0x%08x \n",
cmd->response[0]);
break;
default:
Expand Down Expand Up @@ -226,7 +226,7 @@ int mmc_send_status(struct mmc *mmc, int timeout)

if (cmd.response[0] & MMC_STATUS_MASK) {
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
pr_err("Status Error: 0x%08X\n",
pr_err("Status Error: 0x%08x\n",
cmd.response[0]);
#endif
return -ECOMM;
Expand Down

0 comments on commit 7d5ccb1

Please sign in to comment.