Lines Matching full:pcie
3 * PCIe host controller driver for Freescale Layerscape SoCs
23 #include "pcie-designware.h"
56 static bool ls_pcie_is_bridge(struct ls_pcie *pcie) in ls_pcie_is_bridge() argument
58 struct dw_pcie *pci = pcie->pci; in ls_pcie_is_bridge()
68 static void ls_pcie_clear_multifunction(struct ls_pcie *pcie) in ls_pcie_clear_multifunction() argument
70 struct dw_pcie *pci = pcie->pci; in ls_pcie_clear_multifunction()
76 static void ls_pcie_drop_msg_tlp(struct ls_pcie *pcie) in ls_pcie_drop_msg_tlp() argument
79 struct dw_pcie *pci = pcie->pci; in ls_pcie_drop_msg_tlp()
86 static void ls_pcie_disable_outbound_atus(struct ls_pcie *pcie) in ls_pcie_disable_outbound_atus() argument
91 dw_pcie_disable_atu(pcie->pci, i, DW_PCIE_REGION_OUTBOUND); in ls_pcie_disable_outbound_atus()
97 struct ls_pcie *pcie = to_ls_pcie(pci); in ls1021_pcie_link_up() local
99 if (!pcie->scfg) in ls1021_pcie_link_up()
102 regmap_read(pcie->scfg, SCFG_PEXMSCPORTSR(pcie->index), &state); in ls1021_pcie_link_up()
113 struct ls_pcie *pcie = to_ls_pcie(pci); in ls_pcie_link_up() local
116 state = (ioread32(pcie->lut + pcie->drvdata->lut_dbg) >> in ls_pcie_link_up()
117 pcie->drvdata->ltssm_shift) & in ls_pcie_link_up()
127 static void ls_pcie_fix_error_response(struct ls_pcie *pcie) in ls_pcie_fix_error_response() argument
129 struct dw_pcie *pci = pcie->pci; in ls_pcie_fix_error_response()
137 struct ls_pcie *pcie = to_ls_pcie(pci); in ls_pcie_host_init() local
144 ls_pcie_disable_outbound_atus(pcie); in ls_pcie_host_init()
145 ls_pcie_fix_error_response(pcie); in ls_pcie_host_init()
148 ls_pcie_clear_multifunction(pcie); in ls_pcie_host_init()
151 ls_pcie_drop_msg_tlp(pcie); in ls_pcie_host_init()
161 struct ls_pcie *pcie = to_ls_pcie(pci); in ls1021_pcie_host_init() local
166 pcie->scfg = syscon_regmap_lookup_by_phandle(dev->of_node, in ls1021_pcie_host_init()
167 "fsl,pcie-scfg"); in ls1021_pcie_host_init()
168 if (IS_ERR(pcie->scfg)) { in ls1021_pcie_host_init()
169 ret = PTR_ERR(pcie->scfg); in ls1021_pcie_host_init()
171 pcie->scfg = NULL; in ls1021_pcie_host_init()
176 "fsl,pcie-scfg", index, 2)) { in ls1021_pcie_host_init()
177 pcie->scfg = NULL; in ls1021_pcie_host_init()
180 pcie->index = index[1]; in ls1021_pcie_host_init()
264 { .compatible = "fsl,ls1012a-pcie", .data = &ls1046_drvdata },
265 { .compatible = "fsl,ls1021a-pcie", .data = &ls1021_drvdata },
266 { .compatible = "fsl,ls1028a-pcie", .data = &ls2088_drvdata },
267 { .compatible = "fsl,ls1043a-pcie", .data = &ls1043_drvdata },
268 { .compatible = "fsl,ls1046a-pcie", .data = &ls1046_drvdata },
269 { .compatible = "fsl,ls2080a-pcie", .data = &ls2080_drvdata },
270 { .compatible = "fsl,ls2085a-pcie", .data = &ls2080_drvdata },
271 { .compatible = "fsl,ls2088a-pcie", .data = &ls2088_drvdata },
272 { .compatible = "fsl,ls1088a-pcie", .data = &ls2088_drvdata },
276 static int __init ls_add_pcie_port(struct ls_pcie *pcie) in ls_add_pcie_port() argument
278 struct dw_pcie *pci = pcie->pci; in ls_add_pcie_port()
283 pp->ops = pcie->drvdata->ops; in ls_add_pcie_port()
298 struct ls_pcie *pcie; in ls_pcie_probe() local
302 pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); in ls_pcie_probe()
303 if (!pcie) in ls_pcie_probe()
310 pcie->drvdata = of_device_get_match_data(dev); in ls_pcie_probe()
313 pci->ops = pcie->drvdata->dw_pcie_ops; in ls_pcie_probe()
315 pcie->pci = pci; in ls_pcie_probe()
322 pcie->lut = pci->dbi_base + pcie->drvdata->lut_offset; in ls_pcie_probe()
324 if (!ls_pcie_is_bridge(pcie)) in ls_pcie_probe()
327 platform_set_drvdata(pdev, pcie); in ls_pcie_probe()
329 ret = ls_add_pcie_port(pcie); in ls_pcie_probe()
338 .name = "layerscape-pcie",