bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0314-PCI-brcmstb-Restore-initial-fundamental-reset.patch
1 From e819152f96f67e20f1d7a00446cd9c0035850825 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 11 Nov 2020 17:08:33 +0000
4 Subject: [PATCH] PCI: brcmstb: Restore initial fundamental reset
5
6 [1] replaced a single reset function with a pointer to one of two
7 implementations, but also removed the call asserting the reset
8 at the start of brcm_pcie_setup. Doing so breaks Raspberry Pis with
9 VL805 XHCI controllers lacking dedicated SPI EEPROMs, which have been
10 used for USB booting but then need to be reset so that the kernel
11 can reconfigure them. The lack of a reset causes the firmware's loading
12 of the EEPROM image to RAM to fail, breaking USB for the kernel.
13
14 See: https://www.raspberrypi.org/forums/viewtopic.php?p=1758157#p1758157
15
16 Fixes: 04356ac30771 ("PCI: brcmstb: Add bcm7278 PERST# support")
17
18 [1] 04356ac30771 ("PCI: brcmstb: Add bcm7278 PERST# support")
19
20 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
21 ---
22 drivers/pci/controller/pcie-brcmstb.c | 2 ++
23 1 file changed, 2 insertions(+)
24
25 --- a/drivers/pci/controller/pcie-brcmstb.c
26 +++ b/drivers/pci/controller/pcie-brcmstb.c
27 @@ -879,6 +879,8 @@ static int brcm_pcie_setup(struct brcm_p
28
29 /* Reset the bridge */
30 pcie->bridge_sw_init_set(pcie, 1);
31 + pcie->perst_set(pcie, 1);
32 +
33 usleep_range(100, 200);
34
35 /* Take the bridge out of reset */