diff --git a/core/drivers/pl022_spi.c b/core/drivers/pl022_spi.c index c7fc992a598..870cd3e622a 100644 --- a/core/drivers/pl022_spi.c +++ b/core/drivers/pl022_spi.c @@ -166,11 +166,10 @@ static enum spi_result pl022_txrx8(struct spi_chip *chip, uint8_t *wdat, /* Capture remaining rdat not read above */ if (rdat) { while ((j < num_pkts) && - (io_read8(pd->base + SSPSR) & SSPSR_BSY)) - if (io_read8(pd->base + SSPSR) & SSPSR_RNE) { - /* rx 1 packet */ - rdat[j++] = io_read8(pd->base + SSPDR); - } + (io_read8(pd->base + SSPSR) & SSPSR_RNE)) { + /* rx 1 packet */ + rdat[j++] = io_read8(pd->base + SSPDR); + } if (j < num_pkts) { EMSG("Packets requested %zu, received %zu", @@ -212,11 +211,10 @@ static enum spi_result pl022_txrx16(struct spi_chip *chip, uint16_t *wdat, /* Capture remaining rdat not read above */ if (rdat) { while ((j < num_pkts) && - (io_read8(pd->base + SSPSR) & SSPSR_BSY)) - if (io_read8(pd->base + SSPSR) & SSPSR_RNE) { - /* rx 1 packet */ - rdat[j++] = io_read8(pd->base + SSPDR); - } + (io_read8(pd->base + SSPSR) & SSPSR_RNE)) { + /* rx 1 packet */ + rdat[j++] = io_read8(pd->base + SSPDR); + } if (j < num_pkts) { EMSG("Packets requested %zu, received %zu",