FROMLIST: spi: qup: Fix incorrect block transfers
This patch fixes a number of errors with the QUP block transfer mode.
Errors manifested themselves as input underruns, output overruns, and timed
out transactions.
The block mode does not require the priming that occurs in FIFO mode. At
the moment that the QUP is placed into the RUN state, the QUP will
immediately raise an interrupt if the request is a write. Therefore, there
is no need to prime the pump.
In addition, the block transfers require that whole blocks of data are
read/written at a time. The last block of data that completes a
transaction may contain less than a full blocks worth of data.
Each block of data results in an input/output service interrupt accompanied
with a input/output block flag set. Additional block reads/writes require
clearing of the service flag. It is ok to check for additional blocks of
data in the ISR, but you have to ack every block you transfer. Imbalanced
acks result in early return from complete transactions with pending
interrupts that still have to be ack'd. The next transaction can be
affected by these interrupts. Transactions are deemed complete when the
MAX_INPUT or MAX_OUTPUT flag are set.
Signed-off-by:
Andy Gross <agross@codeaurora.org>
Loading
Please sign in to comment