Skip to content
Snippets Groups Projects
Commit 4b97a824 authored by Bharat Bhushan's avatar Bharat Bhushan Committed by York Sun
Browse files

pci: layerscape: Fixup iommu-map for LS208xA


Commit 0aaa1a90 added support for LS208xA devices but fixing
iommu-map property is missing. This patch adds support for
fixing iommu-map.

Signed-off-by: default avatarBharat Bhushan <Bharat.Bhushan@nxp.com>
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
[YS: revised commit message]
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent 77dc01bd
No related branches found
No related tags found
No related merge requests found
...@@ -130,19 +130,28 @@ static void fdt_pcie_set_iommu_map_entry(void *blob, struct ls_pcie *pcie, ...@@ -130,19 +130,28 @@ static void fdt_pcie_set_iommu_map_entry(void *blob, struct ls_pcie *pcie,
u32 iommu_map[4]; u32 iommu_map[4];
int nodeoffset; int nodeoffset;
int lenp; int lenp;
uint svr;
char *compat = NULL;
/* find pci controller node */ /* find pci controller node */
nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie", nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie",
pcie->dbi_res.start); pcie->dbi_res.start);
if (nodeoffset < 0) { if (nodeoffset < 0) {
#ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */ #ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */
nodeoffset = fdt_node_offset_by_compat_reg(blob, svr = (get_svr() >> SVR_VAR_PER_SHIFT) & 0xFFFFFE;
CONFIG_FSL_PCIE_COMPAT, pcie->dbi_res.start); if (svr == SVR_LS2088A || svr == SVR_LS2084A ||
svr == SVR_LS2048A || svr == SVR_LS2044A ||
svr == SVR_LS2081A || svr == SVR_LS2041A)
compat = "fsl,ls2088a-pcie";
else
compat = CONFIG_FSL_PCIE_COMPAT;
if (compat)
nodeoffset = fdt_node_offset_by_compat_reg(blob,
compat, pcie->dbi_res.start);
#endif
if (nodeoffset < 0) if (nodeoffset < 0)
return; return;
#else
return;
#endif
} }
/* get phandle to iommu controller */ /* get phandle to iommu controller */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment