qemu/hw/ssi
Trent Piepho 016d4b0127 imx_spi: Unset XCH when TX FIFO becomes empty
The current emulation will clear the XCH bit when a burst finishes.
This is not quite correct.  According to the i.MX7d referemce manual,
Rev 0.1, §10.1.7.3:

    This bit [XCH] is cleared automatically when all data in the TXFIFO
    and the shift register has been shifted out.

So XCH should be cleared when the FIFO empties, not on completion of a
burst.  The FIFO is 64 x 32 bits = 2048 bits, while the max burst size
is larger at 4096 bits.  So it's possible that the burst is not finished
after the TXFIFO empties.

Sending a large block (> 2048 bits) with the Linux driver will use a
burst that is larger than the TXFIFO.  After the TXFIFO has emptied XCH
does not become unset, as the burst is not yet finished.

What should happen after the TXFIFO empties is the driver will refill it
and set XCH.  The rising edge of XCH will trigger another transfer to
begin.  However, since the emulation does not set XCH to 0, there is no
rising edge and the next trasfer never begins.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Message-id: 20180731201056.29257-1-tpiepho@impinj.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-16 14:29:57 +01:00
..
aspeed_smc.c aspeed/smc: rename aspeed_smc_flash_send_addr() to aspeed_smc_flash_setup() 2018-06-26 17:50:39 +01:00
imx_spi.c imx_spi: Unset XCH when TX FIFO becomes empty 2018-08-16 14:29:57 +01:00
Makefile.objs msf2: Add Smartfusion2 SPI controller 2017-09-21 16:36:56 +01:00
mss-spi.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
omap_spi.c hw/ssi/omap_spi: Use qemu_log_mask(GUEST_ERROR) instead of fprintf 2018-06-26 17:50:40 +01:00
pl022.c hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
ssi.c ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
stm32f2xx_spi.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
xilinx_spi.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
xilinx_spips.c xilinx_spips: Make dma transactions as per dma_burst_size 2018-06-26 17:50:39 +01:00