PCI: altera: Add Agilex support
authorD M, Sharath Kumar <sharath.kumar.d.m@intel.com>
Fri, 21 Feb 2025 17:04:52 +0000 (11:04 -0600)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Thu, 6 Mar 2025 09:52:48 +0000 (09:52 +0000)
commit60f2ee5f1472972918de7eb14c8240de176f6b8d
tree07221759f79e8c5c23bc53f4a29445937f7b3bef
parent6843f38e16b96b072d0f576bf7cddde8cc5a103a
PCI: altera: Add Agilex support

Add PCIe Root Port controller support for the Agilex family of chips.

The Agilex PCIe Hard IP has three variants that are mostly software
compatible, except for a couple register offsets. The P-Tile variant
supports Gen3/Gen4 1x16. The F-Tile variant supports Gen3/Gen4 4x4,
4x8, and 4x16. The R-Tile variant improves on the F-Tile variant by
adding Gen5 support.

To simplify the implementation of pci_ops read/write functions,
ep_{read/write}_cfg() callbacks were added to struct altera_pci_ops
to easily distinguish between hardware variants.

Signed-off-by: D M, Sharath Kumar <sharath.kumar.d.m@intel.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250221170452.875419-3-matthew.gerlach@linux.intel.com
[kwilczynski: tidy code comments]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/controller/pcie-altera.c