spi: omap2-mcspi: Add FIFO support without DMA
authorVaishnav Achath <vaishnav.a@ti.com>
Fri, 13 Oct 2023 09:26:29 +0000 (14:56 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 23 Oct 2023 12:30:05 +0000 (13:30 +0100)
commit75223bbea840e125359fc63942b5f93462b474c6
tree776a5769f2c6f6ab595cffa526b559259a682718
parent692225015c82d3eece55a07d16cd24c4dc63a6a5
spi: omap2-mcspi: Add FIFO support without DMA

Currently, the built-in 64-byte FIFO on the MCSPI controller is not
enabled in PIO mode and is used only when DMA is enabled. Enable the
FIFO in PIO mode by default for transactions larger than the FIFO depth
and fallback only if FIFO is not available. When DMA is not enabled,
it is efficient to enable the RX FIFO almost full and TX FIFO almost
empty events after each FIFO fill instead of each word.

Update omap2_mcspi_set_fifo() to enable the events accordingly and
also rely on OMAP2_MCSPI_CHSTAT_RXS for the last transfer instead of the
FIFO events to handle the case when the transfer size is not a multiple
of FIFO depth.

See J721E Technical Reference Manual (SPRUI1C), section 12.1.5
for further details: http://www.ti.com/lit/pdf/spruil1

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Link: https://lore.kernel.org/r/20231013092629.19005-1-vaishnav.a@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c
This page took 0.044911 seconds and 4 git commands to generate.