• Home
  • Raw
  • Download

Lines Matching +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
20 * @is_rc: Set to 1 indicates the PCIe controller mode is Root Complex,
24 struct cdns_pcie *pcie; member
34 static u64 cdns_plat_cpu_addr_fixup(struct cdns_pcie *pcie, u64 cpu_addr) in cdns_plat_cpu_addr_fixup() argument
47 struct device *dev = &pdev->dev; in cdns_plat_pcie_probe()
49 struct cdns_pcie_ep *ep; in cdns_plat_pcie_probe() local
57 return -EINVAL; in cdns_plat_pcie_probe()
59 is_rc = data->is_rc; in cdns_plat_pcie_probe()
64 return -ENOMEM; in cdns_plat_pcie_probe()
69 return -ENODEV; in cdns_plat_pcie_probe()
73 return -ENOMEM; in cdns_plat_pcie_probe()
76 rc->pcie.dev = dev; in cdns_plat_pcie_probe()
77 rc->pcie.ops = &cdns_plat_ops; in cdns_plat_pcie_probe()
78 cdns_plat_pcie->pcie = &rc->pcie; in cdns_plat_pcie_probe()
79 cdns_plat_pcie->is_rc = is_rc; in cdns_plat_pcie_probe()
81 ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
98 return -ENODEV; in cdns_plat_pcie_probe()
100 ep = devm_kzalloc(dev, sizeof(*ep), GFP_KERNEL); in cdns_plat_pcie_probe()
101 if (!ep) in cdns_plat_pcie_probe()
102 return -ENOMEM; in cdns_plat_pcie_probe()
104 ep->pcie.dev = dev; in cdns_plat_pcie_probe()
105 ep->pcie.ops = &cdns_plat_ops; in cdns_plat_pcie_probe()
106 cdns_plat_pcie->pcie = &ep->pcie; in cdns_plat_pcie_probe()
107 cdns_plat_pcie->is_rc = is_rc; in cdns_plat_pcie_probe()
109 ret = cdns_pcie_init_phy(dev, cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
122 ret = cdns_pcie_ep_setup(ep); in cdns_plat_pcie_probe()
133 cdns_pcie_disable_phy(cdns_plat_pcie->pcie); in cdns_plat_pcie_probe()
134 phy_count = cdns_plat_pcie->pcie->phy_count; in cdns_plat_pcie_probe()
135 while (phy_count--) in cdns_plat_pcie_probe()
136 device_link_del(cdns_plat_pcie->pcie->link[phy_count]); in cdns_plat_pcie_probe()
143 struct device *dev = &pdev->dev; in cdns_plat_pcie_shutdown()
144 struct cdns_pcie *pcie = dev_get_drvdata(dev); in cdns_plat_pcie_shutdown() local
153 cdns_pcie_disable_phy(pcie); in cdns_plat_pcie_shutdown()
166 .compatible = "cdns,cdns-pcie-host",
170 .compatible = "cdns,cdns-pcie-ep",
178 .name = "cdns-pcie",