Skip to content

Commit

Permalink
arch/arm64/imx9: Reset rx fifo in mode change
Browse files Browse the repository at this point in the history
Signed-off-by: Jouni Ukkonen <[email protected]>
  • Loading branch information
Jouni Ukkonen committed Nov 7, 2024
1 parent 27ee0b4 commit 3c83a72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm64/src/imx9/imx9_lpspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,10 @@ static void imx9_lpspi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode)
while ((imx9_lpspi_getreg32(priv, IMX9_LPSPI_RSR_OFFSET) &
LPSPI_RSR_RXEMPTY) != LPSPI_RSR_RXEMPTY)
{
/* Flush SPI read FIFO */
/* Reset SPI read FIFO */

imx9_lpspi_modifyreg32(priv, IMX9_LPSPI_CR_OFFSET, 0,
LPSPI_CR_RRF);

imx9_lpspi_getreg32(priv, IMX9_LPSPI_RSR_OFFSET);
}
Expand Down

0 comments on commit 3c83a72

Please sign in to comment.