Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions arch/arm/src/samv7/sam_qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency)
#endif
uint32_t regval;

spiinfo("frequency=%d\n", frequency);
spiinfo("frequency=%"PRId32"\n", frequency);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRIu32 would be a better candidate for unsigned types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. I replaced it to be the same as so far, only to fix the warning. Let me modify that. It should be short patch again.

DEBUGASSERT(priv);

/* Check if the requested frequency is the same as the frequency
Expand Down Expand Up @@ -1179,14 +1179,14 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency)
/* Calculate the new actual frequency */

actual = SAM_QSPI_CLOCK / scbr;
spiinfo("SCBR=%d actual=%d\n", scbr, actual);
spiinfo("SCBR=%"PRId32" actual=%"PRId32"\n", scbr, actual);

/* Save the frequency setting */

priv->frequency = frequency;
priv->actual = actual;

spiinfo("Frequency %d->%d\n", frequency, actual);
spiinfo("Frequency %"PRId32"->%"PRId32"\n", frequency, actual);
return actual;
}

Expand Down Expand Up @@ -1252,7 +1252,7 @@ static void qspi_setmode(struct qspi_dev_s *dev, enum qspi_mode_e mode)
}

qspi_putreg(priv, regval, SAM_QSPI_SCR_OFFSET);
spiinfo("SCR=%08x\n", regval);
spiinfo("SCR=%08"PRIx32"\n", regval);

/* Save the mode so that subsequent re-configurations will be faster */

Expand Down Expand Up @@ -1295,7 +1295,7 @@ static void qspi_setbits(struct qspi_dev_s *dev, int nbits)
regval |= QSPI_MR_NBBITS(nbits);
qspi_putreg(priv, regval, SAM_QSPI_MR_OFFSET);

spiinfo("MR=%08x\n", regval);
spiinfo("MR=%08"PRIx32"\n", regval);

/* Save the selection so that subsequent re-configurations will be
* faster.
Expand Down Expand Up @@ -1548,7 +1548,8 @@ static int qspi_memory(struct qspi_dev_s *dev,
(unsigned long)meminfo->addr, meminfo->addrlen);
spiinfo(" %s Data:\n",
QSPIMEM_ISWRITE(meminfo->flags) ? "Write" : "Read");
spiinfo(" buffer/length: %p/%d\n", meminfo->buffer, meminfo->buflen);
spiinfo(" buffer/length: %p/%"PRId32"\n",
meminfo->buffer, meminfo->buflen);

#ifdef CONFIG_SAMV7_QSPI_DMA
/* Can we perform DMA? Should we perform DMA? */
Expand Down