spi: mchp-pci1xxxx: Add support for DMA in SPI
authorThangaraj Samynathan <thangaraj.s@microchip.com>
Wed, 7 Feb 2024 08:06:20 +0000 (13:36 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 8 Feb 2024 16:34:52 +0000 (16:34 +0000)
commit3e7cfd6ad29a7483ce3addebb4fba87d6409c71c
treebf69c1ed6aef7fe1bf20b603957fa73e7588dc09
parentabb4b46c43689dd1f4d80c41e49127ca0ede75b3
spi: mchp-pci1xxxx: Add support for DMA in SPI

In PCI1xxxx C0, support for DMA in PCIe endpoint is added
to enhance the SPI performance. With this support, the
performance is improved from 6Mbps to 17Mbps with 20Mhz clock.
- DMA Supports two Channels, 0 and 1
- SPI Instance 0 uses chan 0 and SPI Instance 1 uses chan 1
- DMA can be used only if SPI is mapped to PF0 in the multi
function endpoint and the MSI interrupt is supported
- MSI interrupt of one of the SPI instance is assigned to the DMA
and both channels 0 and 1 share the same irq, the MSI address and
MSI Data of the irq is obtained and stored in DMA registers to
generate interrupt

Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Link: https://lore.kernel.org/r/20240207080621.30742-2-thangaraj.s@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pci1xxxx.c