Lines Matching +full:cdns +full:- +full:pcie +full:- +full:ep

1 // SPDX-License-Identifier: GPL-2.0
3 * Cadence PCIe platform driver.
13 #include "pcie-cadence.h"
18 * struct cdns_plat_pcie - private data for this PCIe platform driver
19 * @pcie: Cadence PCIe controller
22 struct cdns_pcie *pcie; member
31 static u64 cdns_plat_cpu_addr_fixup(struct cdns_pcie *pcie, u64 cpu_addr) in cdns_plat_cpu_addr_fixup() argument
44 struct device *dev = &pdev->dev; in cdns_plat_pcie_probe()
46 struct cdns_pcie_ep *ep; in cdns_plat_pcie_probe() local
54 return -EINVAL; in cdns_plat_pcie_probe()
56 is_rc = data->is_rc; in cdns_plat_pcie_probe()
61 return -ENOMEM; in cdns_plat_pcie_probe()
66 return -ENODEV; in cdns_plat_pcie_probe()
70 return -ENOMEM; in cdns_plat_pcie_probe()
73 rc->pcie.dev = dev; in cdns_plat_pcie_probe()
74 rc->pcie.ops = &cdns_plat_ops; in cdns_plat_pcie_probe()
75 cdns_plat_pcie->pcie = &rc->pcie; in cdns_plat_pcie_probe()
77 ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
94 return -ENODEV; in cdns_plat_pcie_probe()
96 ep = devm_kzalloc(dev, sizeof(*ep), GFP_KERNEL); in cdns_plat_pcie_probe()
97 if (!ep) in cdns_plat_pcie_probe()
98 return -ENOMEM; in cdns_plat_pcie_probe()
100 ep->pcie.dev = dev; in cdns_plat_pcie_probe()
101 ep->pcie.ops = &cdns_plat_ops; in cdns_plat_pcie_probe()
102 cdns_plat_pcie->pcie = &ep->pcie; in cdns_plat_pcie_probe()
104 ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
117 ret = cdns_pcie_ep_setup(ep); in cdns_plat_pcie_probe()
128 cdns_pcie_disable_phy(cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
129 phy_count = cdns_plat_pcie->pcie->phy_count; in cdns_plat_pcie_probe()
130 while (phy_count--) in cdns_plat_pcie_probe()
131 device_link_del(cdns_plat_pcie->pcie->link[phy_count]); in cdns_plat_pcie_probe()
138 struct device *dev = &pdev->dev; in cdns_plat_pcie_shutdown()
139 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_plat_pcie_shutdown() local
148 cdns_pcie_disable_phy(pcie); in cdns_plat_pcie_shutdown()
161 .compatible = "cdns,cdns-pcie-host",
165 .compatible = "cdns,cdns-pcie-ep",
173 .name = "cdns-pcie",