spi: spi_amd: Add PCI-based driver for AMD HID2 SPI controller
authorRaju Rangoju <Raju.Rangoju@amd.com>
Wed, 2 Apr 2025 12:15:14 +0000 (17:45 +0530)
committerMark Brown <broonie@kernel.org>
Sun, 6 Apr 2025 22:26:10 +0000 (23:26 +0100)
commitb644c2776652671256edcd7a8e71161e212b59ac
treeb404975970977b8a56133e8ec23ee3774e015f2b
parentf48d80503504257682e493dc17408f2f0b47bcfa
spi: spi_amd: Add PCI-based driver for AMD HID2 SPI controller

Register a new driver(spi_amd_pci) for the HID2 SPI controller using the
PCI ID of the LPC bridge device.

Add a new common probe function in spi_amd driver to encapsulate the
code required for registering the controller driver. This function will be
utilized by both the existing ACPI driver and the newly introduced
PCI-based driver for the HID2 SPI controller. The MMIO register base
address of the HID2 SPI controller can be obtained from the PCI LPC bridge
registers.

By implementing these changes, the DMA buffer will be correctly associated
with the LPC bridge device, preventing IO_PAGE_FAULT caused by IOMMU when
the LPC bridge attempts DMA operations on addresses owned by the HID2
SPI controller.

Co-developed-by: Krishnamoorthi M <krishnamoorthi.m@amd.com>
Signed-off-by: Krishnamoorthi M <krishnamoorthi.m@amd.com>
Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Link: https://patch.msgid.link/20250402121514.2941334-1-Raju.Rangoju@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
MAINTAINERS
drivers/spi/Makefile
drivers/spi/spi-amd-pci.c [new file with mode: 0644]
drivers/spi/spi-amd.c
drivers/spi/spi-amd.h [new file with mode: 0644]