diff options
author | David Lechner <dlechner@baylibre.com> | 2024-02-07 17:51:25 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-07 18:17:43 +0300 |
commit | abb4b46c43689dd1f4d80c41e49127ca0ede75b3 (patch) | |
tree | 97c20574a1bf7197b5ee6121eb621de8de68506c /Documentation/devicetree/bindings/spi | |
parent | 531860e12da76a444e0ecfd37a9d786e7986957a (diff) | |
download | linux-abb4b46c43689dd1f4d80c41e49127ca0ede75b3.tar.xz |
spi: axi-spi-engine: move msg finalization out of irq handler
As a general principal, it is best to do as little as possible in an
interrupt handler. This patch reworks the AXI SPI Engine driver to move
timer_delete_sync() and spi_finalize_current_message() out of the
interrupt handler. Instead, spi_finalize_current_message() is moved to
the transfer_one_message function (similar to nearly all other SPI
controllers). A completion is now used to wait for the sync interrupt
that indicates that the message is complete. The watchdog timer is no
longer needed since we can use the wait_for_completion_timeout()
function to wait for the message to complete with the same effect.
As a bonus, these changes also improve throughput of the SPI controller.
For example, this was tested on a ZynqMP with a 80MHz SCLK reading 4
byte samples from an ADC. The max measured throughput increased from
26k to 28k samples per second.
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240207-axi-spi-engine-round-2-1-v2-2-40c0b4e85352@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/spi')
0 files changed, 0 insertions, 0 deletions