aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/drivers/pl022_spi.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/drivers/pl022_spi.c b/core/drivers/pl022_spi.c
index c7fc992a..870cd3e6 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",