diff options
author | Serge Semin <Sergey.Semin@baikalelectronics.ru> | 2020-10-08 02:54:58 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-10-08 23:00:12 +0100 |
commit | ddcc2733c1591c137f7ce60f24ba5401c295427f (patch) | |
tree | ffd8dfa5fda756cc396cd2f59db9d3a582d2d5ef /fs/fs_struct.c | |
parent | 8dedbeac8ab24d2da9271df2c8291971169846f2 (diff) |
spi: dw: Refactor IRQ-based SPI transfer procedure
Current IRQ-based SPI transfer execution procedure doesn't work well at
the final stage of the execution. If all the Tx data is sent out (written
to the Tx FIFO) but there is some data left to receive, the Tx FIFO Empty
IRQ will constantly happen until all of the requested inbound data is
received. Though for a short period of time, but it will make the system
less responsive. In order to fix that let's refactor the SPI transfer
execution procedure by taking the Rx FIFO Full IRQ into account. We'll read
and write SPI transfer data each time the IRQ happens as before. If all
the outbound data is sent out, we'll disable the Tx FIFO Empty IRQ. If
there is still some data to receive, we'll adjust the Rx FIFO Threshold
level, so the next IRQ would be raised at the moment of all incoming data
being available in the Rx FIFO.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20201007235511.4935-10-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'fs/fs_struct.c')
0 files changed, 0 insertions, 0 deletions