Lines Matching +full:dts +full:- +full:node

1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright 2014-2015 Freescale Semiconductor, Inc.
27 if (pcie->next_lut_index < PCIE_LUT_ENTRY_COUNT) in ls_pcie_next_lut_index()
28 return pcie->next_lut_index++; in ls_pcie_next_lut_index()
30 return -ENOSPC; /* LUT is full */ in ls_pcie_next_lut_index()
33 /* returns the next available streamid for pcie, -errno if failed */
39 return -EINVAL; in ls_pcie_next_streamid()
47 if (pcie->big_endian) in lut_writel()
48 out_be32(pcie->lut + offset, value); in lut_writel()
50 out_le32(pcie->lut + offset, value); in lut_writel()
65 * An msi-map is a property to be added to the pci controller
66 * node. It is a table, where each entry consists of 4 fields
69 * msi-map = <[devid] [phandle-to-msi-ctrl] [stream-id] [count]
70 * [devid] [phandle-to-msi-ctrl] [stream-id] [count]>;
81 /* find pci controller node */ in fdt_pcie_set_msi_map_entry()
82 nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", in fdt_pcie_set_msi_map_entry()
83 pcie->dbi_res.start); in fdt_pcie_set_msi_map_entry()
85 #ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */ in fdt_pcie_set_msi_map_entry()
90 compat = "fsl,ls2088a-pcie"; in fdt_pcie_set_msi_map_entry()
95 compat, pcie->dbi_res.start); in fdt_pcie_set_msi_map_entry()
102 prop = (u32 *)fdt_getprop(blob, nodeoffset, "msi-parent", 0); in fdt_pcie_set_msi_map_entry()
104 debug("\n%s: ERROR: missing msi-parent: PCIe%d\n", in fdt_pcie_set_msi_map_entry()
105 __func__, pcie->idx); in fdt_pcie_set_msi_map_entry()
110 /* set one msi-map row */ in fdt_pcie_set_msi_map_entry()
111 fdt_appendprop_u32(blob, nodeoffset, "msi-map", devid); in fdt_pcie_set_msi_map_entry()
112 fdt_appendprop_u32(blob, nodeoffset, "msi-map", phandle); in fdt_pcie_set_msi_map_entry()
113 fdt_appendprop_u32(blob, nodeoffset, "msi-map", streamid); in fdt_pcie_set_msi_map_entry()
114 fdt_appendprop_u32(blob, nodeoffset, "msi-map", 1); in fdt_pcie_set_msi_map_entry()
118 * An iommu-map is a property to be added to the pci controller
119 * node. It is a table, where each entry consists of 4 fields
122 * iommu-map = <[devid] [phandle-to-iommu-ctrl] [stream-id] [count]
123 * [devid] [phandle-to-iommu-ctrl] [stream-id] [count]>;
135 /* find pci controller node */ in fdt_pcie_set_iommu_map_entry()
136 nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", in fdt_pcie_set_iommu_map_entry()
137 pcie->dbi_res.start); in fdt_pcie_set_iommu_map_entry()
139 #ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */ in fdt_pcie_set_iommu_map_entry()
144 compat = "fsl,ls2088a-pcie"; in fdt_pcie_set_iommu_map_entry()
150 compat, pcie->dbi_res.start); in fdt_pcie_set_iommu_map_entry()
157 prop = fdt_getprop_w(blob, nodeoffset, "iommu-map", &lenp); in fdt_pcie_set_iommu_map_entry()
159 debug("\n%s: ERROR: missing iommu-map: PCIe%d\n", in fdt_pcie_set_iommu_map_entry()
160 __func__, pcie->idx); in fdt_pcie_set_iommu_map_entry()
164 /* set iommu-map row */ in fdt_pcie_set_iommu_map_entry()
171 fdt_setprop_inplace(blob, nodeoffset, "iommu-map", in fdt_pcie_set_iommu_map_entry()
174 fdt_appendprop(blob, nodeoffset, "iommu-map", iommu_map, 16); in fdt_pcie_set_iommu_map_entry()
191 bus = bus->parent; in fdt_fixup_pcie()
207 bdf = dm_pci_get_bdf(dev) - PCI_BDF(bus->seq, 0, 0); in fdt_fixup_pcie()
211 /* update msi-map in device tree */ in fdt_fixup_pcie()
214 /* update iommu-map in device tree */ in fdt_fixup_pcie()
227 off = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", in ft_pcie_rc_fix()
228 pcie->dbi_res.start); in ft_pcie_rc_fix()
230 #ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */ in ft_pcie_rc_fix()
235 compat = "fsl,ls2088a-pcie"; in ft_pcie_rc_fix()
240 compat, pcie->dbi_res.start); in ft_pcie_rc_fix()
246 if (pcie->enabled && pcie->mode == PCI_HEADER_TYPE_BRIDGE) in ft_pcie_rc_fix()
256 off = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie-ep", in ft_pcie_ep_fix()
257 pcie->dbi_res.start); in ft_pcie_ep_fix()
261 if (pcie->enabled && pcie->mode == PCI_HEADER_TYPE_NORMAL) in ft_pcie_ep_fix()