Lines Matching +full:cdns +full:- +full:pcie +full:- +full:host
1 // SPDX-License-Identifier: GPL-2.0
3 * Cadence PCIe platform driver.
14 #include "pcie-cadence.h"
19 * struct cdns_plat_pcie - private data for this PCIe platform driver
20 * @pcie: Cadence PCIe controller
21 * @is_rc: Set to 1 indicates the PCIe controller mode is Root Complex,
25 struct cdns_pcie *pcie; member
35 static u64 cdns_plat_cpu_addr_fixup(struct cdns_pcie *pcie, u64 cpu_addr) in cdns_plat_cpu_addr_fixup() argument
49 struct device *dev = &pdev->dev; in cdns_plat_pcie_probe()
59 return -EINVAL; in cdns_plat_pcie_probe()
61 data = (struct cdns_plat_pcie_of_data *)match->data; in cdns_plat_pcie_probe()
62 is_rc = data->is_rc; in cdns_plat_pcie_probe()
67 return -ENOMEM; in cdns_plat_pcie_probe()
72 return -ENODEV; in cdns_plat_pcie_probe()
76 return -ENOMEM; in cdns_plat_pcie_probe()
79 rc->pcie.dev = dev; in cdns_plat_pcie_probe()
80 rc->pcie.ops = &cdns_plat_ops; in cdns_plat_pcie_probe()
81 cdns_plat_pcie->pcie = &rc->pcie; in cdns_plat_pcie_probe()
82 cdns_plat_pcie->is_rc = is_rc; in cdns_plat_pcie_probe()
84 ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
101 return -ENODEV; in cdns_plat_pcie_probe()
105 return -ENOMEM; in cdns_plat_pcie_probe()
107 ep->pcie.dev = dev; in cdns_plat_pcie_probe()
108 ep->pcie.ops = &cdns_plat_ops; in cdns_plat_pcie_probe()
109 cdns_plat_pcie->pcie = &ep->pcie; in cdns_plat_pcie_probe()
110 cdns_plat_pcie->is_rc = is_rc; in cdns_plat_pcie_probe()
112 ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
134 cdns_pcie_disable_phy(cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
135 phy_count = cdns_plat_pcie->pcie->phy_count; in cdns_plat_pcie_probe()
136 while (phy_count--) in cdns_plat_pcie_probe()
137 device_link_del(cdns_plat_pcie->pcie->link[phy_count]); in cdns_plat_pcie_probe()
144 struct device *dev = &pdev->dev; in cdns_plat_pcie_shutdown()
145 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_plat_pcie_shutdown() local
154 cdns_pcie_disable_phy(pcie); in cdns_plat_pcie_shutdown()
167 .compatible = "cdns,cdns-pcie-host",
171 .compatible = "cdns,cdns-pcie-ep",
179 .name = "cdns-pcie",