diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2013-06-03 17:17:42 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-06-03 17:17:42 +0100 |
commit | e100f3be0cccc58692b3988ec2e35cd8b906ca05 (patch) | |
tree | f3a2981840c1519f8cd99a3cfeb8b8a0c99339a0 /hw/ssi | |
parent | b5cd9143e78da8ea9e17fa523aacbedd267aae54 (diff) |
xilinx_spips: Add automatic start support
SPI has a mode where it automatically starts based on tx fifo
occupancy. Implemented.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: f4e9accb5de87b526fff6ed937f63278db76533b.1369117359.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ssi')
-rw-r--r-- | hw/ssi/xilinx_spips.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index cf4c43e81d..0c04ec9486 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -451,7 +451,8 @@ static void xilinx_spips_write(void *opaque, hwaddr addr, } s->regs[addr] = (s->regs[addr] & ~mask) | (value & mask); no_reg_update: - if (man_start_com) { + if ((man_start_com && s->regs[R_CONFIG] & MAN_START_EN) || + (fifo8_is_empty(&s->tx_fifo) && s->regs[R_CONFIG] & MAN_START_EN)) { xilinx_spips_flush_txfifo(s); } xilinx_spips_update_ixr(s); |