Commit 6d686145 authored by Eden Mikitas's avatar Eden Mikitas Committed by Peter Maydell
Browse files

hw/ssi/imx_spi: Removed unnecessary cast of rx data received from slave



When inserting the value retrieved (rx) from the spi slave, rx is pushed to
rx_fifo after being cast to uint8_t. rx_fifo is a fifo32, and the rx
register the driver uses is also 32 bit. This zeroes the 24 most
significant bits of rx. This proved problematic with devices that expect to
use the whole 32 bits of the rx register.

Signed-off-by: default avatarEden Mikitas <e.mikitas@gmail.com>
Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent 9c49c83e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ static void imx_spi_flush_txfifo(IMXSPIState *s)
        if (fifo32_is_full(&s->rx_fifo)) {
            s->regs[ECSPI_STATREG] |= ECSPI_STATREG_RO;
        } else {
            fifo32_push(&s->rx_fifo, (uint8_t)rx);
            fifo32_push(&s->rx_fifo, rx);
        }

        if (s->burst_length <= 0) {