diff mbox series

[3/6] PCI: cadence: Add architecture information for PCIe controller

Message ID CH2PPF4D26F8E1C0E6114F6916AC384AEDAA2A42@CH2PPF4D26F8E1C.namprd07.prod.outlook.com (mailing list archive)
State New
Delegated to: Krzysztof WilczyƄski
Headers show
Series [1/6] dt-bindings: pci: cadence: Add property "hpa" for PCIe controllers | expand

Commit Message

Manikandan Karunakaran Pillai March 24, 2025, 9:09 a.m. UTC
Add "is_hpa" boolean varirable to struct cdns_pcie, to support presence
or absence of next generation - HPA(High performance architecture) PCIe
controllers

Signed-off-by: Manikandan K Pillai <mpillai@cadence.com>
---
 drivers/pci/controller/cadence/pcie-cadence-plat.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c
index 0456845dabb9..98ffd184be93 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-plat.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c
@@ -42,11 +42,13 @@  static int cdns_plat_pcie_probe(struct platform_device *pdev)
 	const struct cdns_plat_pcie_of_data *data;
 	struct cdns_plat_pcie *cdns_plat_pcie;
 	struct device *dev = &pdev->dev;
+	struct device_node *np = dev->of_node;
 	struct pci_host_bridge *bridge;
 	struct cdns_pcie_ep *ep;
 	struct cdns_pcie_rc *rc;
 	int phy_count;
 	bool is_rc;
+	bool is_hpa;
 	int ret;
 
 	data = of_device_get_match_data(dev);
@@ -55,6 +57,8 @@  static int cdns_plat_pcie_probe(struct platform_device *pdev)
 
 	is_rc = data->is_rc;
 
+	is_hpa = of_property_read_bool(np, "hpa");
+
 	pr_debug(" Started %s with is_rc: %d\n", __func__, is_rc);
 	cdns_plat_pcie = devm_kzalloc(dev, sizeof(*cdns_plat_pcie), GFP_KERNEL);
 	if (!cdns_plat_pcie)
@@ -72,6 +76,7 @@  static int cdns_plat_pcie_probe(struct platform_device *pdev)
 		rc = pci_host_bridge_priv(bridge);
 		rc->pcie.dev = dev;
 		rc->pcie.ops = &cdns_plat_ops;
+		rc->pcie.is_hpa = is_hpa;
 		cdns_plat_pcie->pcie = &rc->pcie;
 
 		ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie);