Commit 8b208b3b authored by Russell King's avatar Russell King Committed by Rabeeh Khoury

Add patch to fix broken PCIe with u-boot

u-boot fails to fixup the PCIe nodes on the rev1 LX2160A due to the
code not testing for the correct ID.  Add the correct ID.
Signed-off-by: default avatarRussell King <rmk@armlinux.org.uk>
parent 2f0507b0
From 04f824bd1210fbc6db08560dda9cd14318f859d9 Mon Sep 17 00:00:00 2001
From: Russell King <rmk@armlinux.org.uk>
Date: Tue, 5 May 2020 01:01:01 +0300
Subject: [PATCH] pci: fix layerscape
On the LX2160A rev 1, SVR_SOC_VER() returns 0x873610, and this causes
the wrong PCIe fdt fixup code to be called, resulting in all PCIe
devices remaining disabled in the DT passed to the kernel. Fix this
by detecting the ID and using the correct gen4 layerscape PCIe code.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
---
drivers/pci/pcie_layerscape_fixup_common.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pcie_layerscape_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
index b6179798b3..0327930ddb 100644
--- a/drivers/pci/pcie_layerscape_fixup_common.c
+++ b/drivers/pci/pcie_layerscape_fixup_common.c
@@ -18,8 +18,9 @@ void ft_pci_setup(void *blob, bd_t *bd)
uint svr;
svr = SVR_SOC_VER(get_svr());
-
- if (svr == SVR_LX2160A && IS_SVR_REV(get_svr(), 1, 0))
+ /* Rev 1 LX2160A have svr = 0x873610 */
+ if ((svr == SVR_LX2160A || svr == (SVR_LX2160A | 0x10)) &&
+ IS_SVR_REV(get_svr(), 1, 0))
ft_pci_setup_ls_gen4(blob, bd);
else
#endif /* CONFIG_PCIE_LAYERSCAPE_GEN4 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment