mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] spi: axi-spi-engine: offload instruction optimization
@ 2025-04-28 20:58 David Lechner
  2025-04-28 20:58 ` [PATCH 1/4] spi: axi-spi-engine: wait for completion in setup David Lechner
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: David Lechner @ 2025-04-28 20:58 UTC (permalink / raw)
  To: Michael Hennerich, Nuno Sá, Mark Brown
  Cc: linux-spi, linux-kernel, David Lechner

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.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
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,
-- 
David Lechner <dlechner@baylibre.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-30 22:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-28 20:58 [PATCH 0/4] spi: axi-spi-engine: offload instruction optimization David Lechner
2025-04-28 20:58 ` [PATCH 1/4] spi: axi-spi-engine: wait for completion in setup David Lechner
2025-04-28 20:58 ` [PATCH 2/4] spi: axi-spi-engine: don't repeat mode config for offload David Lechner
2025-04-29  9:08   ` Nuno Sá
2025-04-29 15:24     ` David Lechner
2025-04-29 15:40       ` Nuno Sá
2025-04-28 20:58 ` [PATCH 3/4] spi: axi-spi-engine: optimize bits_per_word " David Lechner
2025-04-28 20:58 ` [PATCH 4/4] spi: axi-spi-engine: omit SYNC from offload instructions David Lechner
2025-04-30 22:52 ` [PATCH 0/4] spi: axi-spi-engine: offload instruction optimization Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®