Lines Matching +full:pcie +full:- +full:ob +full:- +full:axi +full:- +full:offset

1 // SPDX-License-Identifier: GPL-2.0
20 #include "pcie-iproc.h"
24 .compatible = "brcm,iproc-pcie",
27 .compatible = "brcm,iproc-pcie-paxb-v2",
30 .compatible = "brcm,iproc-pcie-paxc",
33 .compatible = "brcm,iproc-pcie-paxc-v2",
42 struct device *dev = &pdev->dev; in iproc_pltfm_pcie_probe()
43 struct iproc_pcie *pcie; in iproc_pltfm_pcie_probe() local
44 struct device_node *np = dev->of_node; in iproc_pltfm_pcie_probe()
49 bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); in iproc_pltfm_pcie_probe()
51 return -ENOMEM; in iproc_pltfm_pcie_probe()
53 pcie = pci_host_bridge_priv(bridge); in iproc_pltfm_pcie_probe()
55 pcie->dev = dev; in iproc_pltfm_pcie_probe()
56 pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); in iproc_pltfm_pcie_probe()
64 pcie->base = devm_pci_remap_cfgspace(dev, reg.start, in iproc_pltfm_pcie_probe()
66 if (!pcie->base) { in iproc_pltfm_pcie_probe()
68 return -ENOMEM; in iproc_pltfm_pcie_probe()
70 pcie->base_addr = reg.start; in iproc_pltfm_pcie_probe()
72 if (of_property_read_bool(np, "brcm,pcie-ob")) { in iproc_pltfm_pcie_probe()
75 ret = of_property_read_u32(np, "brcm,pcie-ob-axi-offset", in iproc_pltfm_pcie_probe()
79 "missing brcm,pcie-ob-axi-offset property\n"); in iproc_pltfm_pcie_probe()
82 pcie->ob.axi_offset = val; in iproc_pltfm_pcie_probe()
83 pcie->need_ob_cfg = true; in iproc_pltfm_pcie_probe()
87 * DT nodes are not used by all platforms that use the iProc PCIe in iproc_pltfm_pcie_probe()
89 * configuration, "dma-ranges" would have been present in DT in iproc_pltfm_pcie_probe()
91 pcie->need_ib_cfg = of_property_read_bool(np, "dma-ranges"); in iproc_pltfm_pcie_probe()
94 pcie->phy = devm_phy_optional_get(dev, "pcie-phy"); in iproc_pltfm_pcie_probe()
95 if (IS_ERR(pcie->phy)) in iproc_pltfm_pcie_probe()
96 return PTR_ERR(pcie->phy); in iproc_pltfm_pcie_probe()
99 switch (pcie->type) { in iproc_pltfm_pcie_probe()
102 pcie->map_irq = NULL; in iproc_pltfm_pcie_probe()
108 ret = iproc_pcie_setup(pcie, &bridge->windows); in iproc_pltfm_pcie_probe()
110 dev_err(dev, "PCIe controller setup failed\n"); in iproc_pltfm_pcie_probe()
114 platform_set_drvdata(pdev, pcie); in iproc_pltfm_pcie_probe()
120 struct iproc_pcie *pcie = platform_get_drvdata(pdev); in iproc_pltfm_pcie_remove() local
122 return iproc_pcie_remove(pcie); in iproc_pltfm_pcie_remove()
127 struct iproc_pcie *pcie = platform_get_drvdata(pdev); in iproc_pltfm_pcie_shutdown() local
129 iproc_pcie_shutdown(pcie); in iproc_pltfm_pcie_shutdown()
134 .name = "iproc-pcie",
144 MODULE_DESCRIPTION("Broadcom iPROC PCIe platform driver");