mpfs/CoreSPI: Fix bug when waiting for last character to arrive
The logic for rx_fifo_empty is wrong, needs a loop for the retry to work
This commit is contained in:
parent
8d646fc49c
commit
fc5e8ff8f8
@ -781,8 +781,7 @@ static void mpfs_spi_unload_rx_fifo(struct mpfs_spi_priv_s *priv,
|
||||
|
||||
for (i = 0; i < nwords; i++)
|
||||
{
|
||||
rx_fifo_empty = getreg32(MPFS_SPI_STATUS) & MPFS_SPI_RXEMPTY;
|
||||
if (rx_fifo_empty)
|
||||
while ((rx_fifo_empty = getreg32(MPFS_SPI_STATUS) & MPFS_SPI_RXEMPTY))
|
||||
{
|
||||
/* Last RX character not ready yet, try again (once) */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user