ImmortalWrt/target/linux/bcm27xx/patches-5.15/950-0314-PCI-brcmstb-Restore-initial-fundamental-reset.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

36 lines
1.3 KiB
Diff

From e819152f96f67e20f1d7a00446cd9c0035850825 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 11 Nov 2020 17:08:33 +0000
Subject: [PATCH] PCI: brcmstb: Restore initial fundamental reset
[1] replaced a single reset function with a pointer to one of two
implementations, but also removed the call asserting the reset
at the start of brcm_pcie_setup. Doing so breaks Raspberry Pis with
VL805 XHCI controllers lacking dedicated SPI EEPROMs, which have been
used for USB booting but then need to be reset so that the kernel
can reconfigure them. The lack of a reset causes the firmware's loading
of the EEPROM image to RAM to fail, breaking USB for the kernel.
See: https://www.raspberrypi.org/forums/viewtopic.php?p=1758157#p1758157
Fixes: 04356ac30771 ("PCI: brcmstb: Add bcm7278 PERST# support")
[1] 04356ac30771 ("PCI: brcmstb: Add bcm7278 PERST# support")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/pci/controller/pcie-brcmstb.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -879,6 +879,8 @@ static int brcm_pcie_setup(struct brcm_p
/* Reset the bridge */
pcie->bridge_sw_init_set(pcie, 1);
+ pcie->perst_set(pcie, 1);
+
usleep_range(100, 200);
/* Take the bridge out of reset */