Lines Matching +full:msi +full:- +full:map

3  * Copyright 2014-2015 Freescale Semiconductor, Inc.
6 * SPDX-License-Identifier: GPL-2.0+
28 if (pcie->next_lut_index < PCIE_LUT_ENTRY_COUNT) in ls_pcie_next_lut_index()
29 return pcie->next_lut_index++; in ls_pcie_next_lut_index()
31 return -ENOSPC; /* LUT is full */ in ls_pcie_next_lut_index()
34 /* returns the next available streamid for pcie, -errno if failed */
40 return -EINVAL; in ls_pcie_next_streamid()
48 if (pcie->big_endian) in lut_writel()
49 out_be32(pcie->lut + offset, value); in lut_writel()
51 out_le32(pcie->lut + offset, value); in lut_writel()
66 * An msi-map is a property to be added to the pci controller
70 * msi-map = <[devid] [phandle-to-msi-ctrl] [stream-id] [count]
71 * [devid] [phandle-to-msi-ctrl] [stream-id] [count]>;
83 nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", in fdt_pcie_set_msi_map_entry()
84 pcie->dbi_res.start); in fdt_pcie_set_msi_map_entry()
91 compat = "fsl,ls2088a-pcie"; in fdt_pcie_set_msi_map_entry()
96 compat, pcie->dbi_res.start); in fdt_pcie_set_msi_map_entry()
102 /* get phandle to MSI controller */ in fdt_pcie_set_msi_map_entry()
103 prop = (u32 *)fdt_getprop(blob, nodeoffset, "msi-parent", 0); in fdt_pcie_set_msi_map_entry()
105 debug("\n%s: ERROR: missing msi-parent: PCIe%d\n", in fdt_pcie_set_msi_map_entry()
106 __func__, pcie->idx); in fdt_pcie_set_msi_map_entry()
111 /* set one msi-map row */ in fdt_pcie_set_msi_map_entry()
112 fdt_appendprop_u32(blob, nodeoffset, "msi-map", devid); in fdt_pcie_set_msi_map_entry()
113 fdt_appendprop_u32(blob, nodeoffset, "msi-map", phandle); in fdt_pcie_set_msi_map_entry()
114 fdt_appendprop_u32(blob, nodeoffset, "msi-map", streamid); in fdt_pcie_set_msi_map_entry()
115 fdt_appendprop_u32(blob, nodeoffset, "msi-map", 1); in fdt_pcie_set_msi_map_entry()
119 * An iommu-map is a property to be added to the pci controller
123 * iommu-map = <[devid] [phandle-to-iommu-ctrl] [stream-id] [count]
124 * [devid] [phandle-to-iommu-ctrl] [stream-id] [count]>;
135 nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", in fdt_pcie_set_iommu_map_entry()
136 pcie->dbi_res.start); in fdt_pcie_set_iommu_map_entry()
140 CONFIG_FSL_PCIE_COMPAT, pcie->dbi_res.start); in fdt_pcie_set_iommu_map_entry()
149 prop = fdt_getprop_w(blob, nodeoffset, "iommu-map", &lenp); in fdt_pcie_set_iommu_map_entry()
151 debug("\n%s: ERROR: missing iommu-map: PCIe%d\n", in fdt_pcie_set_iommu_map_entry()
152 __func__, pcie->idx); in fdt_pcie_set_iommu_map_entry()
156 /* set iommu-map row */ in fdt_pcie_set_iommu_map_entry()
163 fdt_setprop_inplace(blob, nodeoffset, "iommu-map", in fdt_pcie_set_iommu_map_entry()
166 fdt_appendprop(blob, nodeoffset, "iommu-map", iommu_map, 16); in fdt_pcie_set_iommu_map_entry()
183 bus = bus->parent; in fdt_fixup_pcie()
199 bdf = dm_pci_get_bdf(dev) - PCI_BDF(bus->seq, 0, 0); in fdt_fixup_pcie()
200 /* map PCI b.d.f to streamID in LUT */ in fdt_fixup_pcie()
203 /* update msi-map in device tree */ in fdt_fixup_pcie()
206 /* update iommu-map in device tree */ in fdt_fixup_pcie()
219 off = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", in ft_pcie_ls_setup()
220 pcie->dbi_res.start); in ft_pcie_ls_setup()
227 compat = "fsl,ls2088a-pcie"; in ft_pcie_ls_setup()
232 compat, pcie->dbi_res.start); in ft_pcie_ls_setup()
238 if (pcie->enabled) in ft_pcie_ls_setup()