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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 drivers/pci/controller/cadence/pcie-cadence-plat.c | 5 +++++
 1 file changed, 5 insertions(+)

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);
-- 
2.27.0






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux