Skip to content

spi: axi-spi-engine: offload instruction optimization

David Lechner linux-spi lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20250331-adi-main-46863acfc540

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4spi: axi-spi-engine: wait for completion in setupdrivers/spi/spi-axi-spi-engine.c+10 -10 replies
2/4spi: axi-spi-engine: don't repeat mode config for offloaddrivers/spi/spi-axi-spi-engine.c+30 -33 replies
3/4spi: axi-spi-engine: optimize bits_per_word for offloaddrivers/spi/spi-axi-spi-engine.c+32 -00 replies
4/4spi: axi-spi-engine: omit SYNC from offload instructionsdrivers/spi/spi-axi-spi-engine.c+13 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] spi: axi-spi-engine: offload instruction optimization

In order to achieve a 4 MSPS rate on a 16-bit ADC with a 80 MHz SCLK using the SPI offload feature of the AXI SPI Engine, we need to shave off some time that is spent executing unnecessary instructions. There are a few one-time setup instructions that can be moved so that they execute only once when the SPI offload trigger is enabled rather than repeating each time the offload is triggered. Additionally, a recent change to the IP block allows dropping the SYNC instruction completely. With these changes, we are left with only the 3 instructions that are needed to to assert CS, transfer the data, and deassert CS. This makes 3 + 16 * 12.5 ns = 237.5 ns < 250 ns which is comfortably within the available time period.

---
David Lechner (4):
spi: axi-spi-engine: wait for completion in setup
spi: axi-spi-engine: don't repeat mode config for offload
spi: axi-spi-engine: optimize bits_per_word for offload
spi: axi-spi-engine: omit SYNC from offload instructions

 drivers/spi/spi-axi-spi-engine.c | 91 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 85 insertions(+), 6 deletions(-)

---
base-commit: aba9c2fee9598d797034ffd289b0da770d9119e8
change-id: 20250331-adi-main-46863acfc540

Best regards,

Signature · 1 line
David Lechner <[email protected]>