]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: microchip: Set inbound address translation for coherent or non-coherent mode
authorDaire McNamara <daire.mcnamara@microchip.com>
Fri, 11 Oct 2024 14:00:42 +0000 (15:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:04 +0000 (10:02 +0100)
commit765c5982bb44667ea85d21488d94c76d260fe604
tree49bd27e201b429d4e5b4f74df98c323bb81a5bfc
parent110751f28f53e58d7fac52f57e01bf058d4e4068
PCI: microchip: Set inbound address translation for coherent or non-coherent mode

[ Upstream commit 1390a33b3d04fdf6ba4e3e7082107a12027fc188 ]

On Microchip PolarFire SoC the PCIe Root Port can be behind one of three
general purpose Fabric Interface Controller (FIC) buses that encapsulates
an AXI-S bus. Depending on which FIC(s) the Root Port is connected through
to CPU space, and what address translation is done by that FIC, the Root
Port driver's inbound address translation may vary.

For all current supported designs and all future expected designs, inbound
address translation done by a FIC on PolarFire SoC varies depending on
whether PolarFire SoC is operating in coherent DMA mode or noncoherent DMA
mode.

The setup of the outbound address translation tables in the Root Port
driver only needs to handle these two cases.

Setup the inbound address translation tables to one of two address
translations, depending on whether the Root Port is being used with
coherent DMA or noncoherent DMA.

Link: https://lore.kernel.org/r/20241011140043.1250030-3-daire.mcnamara@microchip.com
Fixes: 6f15a9c9f941 ("PCI: microchip: Add Microchip PolarFire PCIe controller driver")
Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com>
[bhelgaas: adapt for ac7f53b7e728 ("PCI: microchip: Add support for using
either Root Port 1 or 2")]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/plda/pcie-microchip-host.c
drivers/pci/controller/plda/pcie-plda-host.c
drivers/pci/controller/plda/pcie-plda.h