arch/arm/src/stm32/stm32_sdio.c: Fix syslog formats
This commit is contained in:
parent
b286902266
commit
2a045fa2a3
@ -24,6 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
@ -622,8 +623,8 @@ static inline void stm32_setclkcr(uint32_t clkcr)
|
||||
regval |= clkcr;
|
||||
putreg32(regval, STM32_SDIO_CLKCR);
|
||||
|
||||
mcinfo("CLKCR: %08x PWR: %08x\n",
|
||||
getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER));
|
||||
mcinfo("CLKCR: %08" PRIx32 " PWR: %08" PRIx32 "\n",
|
||||
getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -1659,7 +1660,7 @@ static void stm32_reset(FAR struct sdio_dev_s *dev)
|
||||
stm32_setpwrctrl(SDIO_POWER_PWRCTRL_ON);
|
||||
leave_critical_section(flags);
|
||||
|
||||
mcinfo("CLCKR: %08x POWER: %08x\n",
|
||||
mcinfo("CLCKR: %08" PRIx32 " POWER: %08" PRIx32 "\n",
|
||||
getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER));
|
||||
}
|
||||
|
||||
@ -1894,7 +1895,8 @@ static int stm32_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
cmdidx = (cmd & MMCSD_CMDIDX_MASK) >> MMCSD_CMDIDX_SHIFT;
|
||||
regval |= cmdidx | SDIO_CMD_CPSMEN;
|
||||
|
||||
mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval);
|
||||
mcinfo("cmd: %08" PRIx32 " arg: %08" PRIx32 " regval: %08" PRIx32 "\n",
|
||||
cmd, arg, regval);
|
||||
|
||||
/* Write the SDIO CMD */
|
||||
|
||||
@ -2174,8 +2176,9 @@ static int stm32_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
|
||||
{
|
||||
if (--timeout <= 0)
|
||||
{
|
||||
mcerr("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n",
|
||||
cmd, events, getreg32(STM32_SDIO_STA));
|
||||
mcerr("ERROR: Timeout cmd: %08" PRIx32 " events: %08" PRIx32
|
||||
" STA: %08" PRIx32 "\n",
|
||||
cmd, events, getreg32(STM32_SDIO_STA));
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
@ -2263,12 +2266,12 @@ static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
regval = getreg32(STM32_SDIO_STA);
|
||||
if ((regval & SDIO_STA_CTIMEOUT) != 0)
|
||||
{
|
||||
mcerr("ERROR: Command timeout: %08x\n", regval);
|
||||
mcerr("ERROR: Command timeout: %08" PRIx32 "\n", regval);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
else if ((regval & SDIO_STA_CCRCFAIL) != 0)
|
||||
{
|
||||
mcerr("ERROR: CRC failure: %08x\n", regval);
|
||||
mcerr("ERROR: CRC failure: %08" PRIx32 "\n", regval);
|
||||
ret = -EIO;
|
||||
}
|
||||
#ifdef CONFIG_DEBUG_MEMCARD_INFO
|
||||
@ -2280,7 +2283,8 @@ static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
if ((uint8_t)(respcmd & SDIO_RESPCMD_MASK) !=
|
||||
(cmd & MMCSD_CMDIDX_MASK))
|
||||
{
|
||||
mcerr("ERROR: RESCMD=%02x CMD=%08x\n", respcmd, cmd);
|
||||
mcerr("ERROR: RESCMD=%02" PRIx32 " CMD=%08" PRIx32 "\n",
|
||||
respcmd, cmd);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
}
|
||||
@ -2327,12 +2331,12 @@ static int stm32_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
regval = getreg32(STM32_SDIO_STA);
|
||||
if (regval & SDIO_STA_CTIMEOUT)
|
||||
{
|
||||
mcerr("ERROR: Timeout STA: %08x\n", regval);
|
||||
mcerr("ERROR: Timeout STA: %08" PRIx32 "\n", regval);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
else if (regval & SDIO_STA_CCRCFAIL)
|
||||
{
|
||||
mcerr("ERROR: CRC fail STA: %08x\n", regval);
|
||||
mcerr("ERROR: CRC fail STA: %08" PRIx32 "\n", regval);
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
@ -2386,7 +2390,7 @@ static int stm32_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
regval = getreg32(STM32_SDIO_STA);
|
||||
if (regval & SDIO_STA_CTIMEOUT)
|
||||
{
|
||||
mcerr("ERROR: Timeout STA: %08x\n", regval);
|
||||
mcerr("ERROR: Timeout STA: %08" PRIx32 "\n", regval);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user