mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-25 16:41:34 +00:00
pci: layerscape: Fixup device tree node for ls2088a
LS2088A and its variants have different PCIe node than LS2080A. The compatible string is updated accordingly. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
parent
3d8553f0a3
commit
0aaa1a90b3
1 changed files with 24 additions and 11 deletions
|
@ -72,19 +72,26 @@ static void fdt_pcie_set_msi_map_entry(void *blob, struct ls_pcie *pcie,
|
||||||
u32 *prop;
|
u32 *prop;
|
||||||
u32 phandle;
|
u32 phandle;
|
||||||
int nodeoffset;
|
int nodeoffset;
|
||||||
|
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)
|
||||||
|
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 MSI controller */
|
/* get phandle to MSI controller */
|
||||||
|
@ -146,19 +153,25 @@ static void fdt_fixup_pcie(void *blob)
|
||||||
static void ft_pcie_ls_setup(void *blob, struct ls_pcie *pcie)
|
static void ft_pcie_ls_setup(void *blob, struct ls_pcie *pcie)
|
||||||
{
|
{
|
||||||
int off;
|
int off;
|
||||||
|
uint svr;
|
||||||
|
char *compat = NULL;
|
||||||
|
|
||||||
off = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie",
|
off = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie",
|
||||||
pcie->dbi_res.start);
|
pcie->dbi_res.start);
|
||||||
if (off < 0) {
|
if (off < 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 */
|
||||||
off = fdt_node_offset_by_compat_reg(blob,
|
svr = (get_svr() >> SVR_VAR_PER_SHIFT) & 0xFFFFFE;
|
||||||
CONFIG_FSL_PCIE_COMPAT,
|
if (svr == SVR_LS2088A || svr == SVR_LS2084A ||
|
||||||
pcie->dbi_res.start);
|
svr == SVR_LS2048A || svr == SVR_LS2044A)
|
||||||
|
compat = "fsl,ls2088a-pcie";
|
||||||
|
else
|
||||||
|
compat = CONFIG_FSL_PCIE_COMPAT;
|
||||||
|
if (compat)
|
||||||
|
off = fdt_node_offset_by_compat_reg(blob,
|
||||||
|
compat, pcie->dbi_res.start);
|
||||||
|
#endif
|
||||||
if (off < 0)
|
if (off < 0)
|
||||||
return;
|
return;
|
||||||
#else
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pcie->enabled)
|
if (pcie->enabled)
|
||||||
|
|
Loading…
Add table
Reference in a new issue