Skip to content

Commit

Permalink
PCI: brcmstb: Assert PERST# on BCM2711
Browse files Browse the repository at this point in the history
The current PCIe driver assumes PERST# is asserted when probe() is invoked.
Some older versions of the 2711/RPi bootloader left PERST# unasserted, as
the Raspian OS does assert PERST# on probe().  For this reason, we assert
PERST# for BCM2711 SOCs (i.e. RPi).

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jim Quinlan <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
  • Loading branch information
jamesequinlan authored and Lorenzo Pieralisi committed Aug 24, 2023
1 parent 06c2afb commit 8eb8c27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/pci/controller/pcie-brcmstb.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,11 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)

/* Reset the bridge */
pcie->bridge_sw_init_set(pcie, 1);

/* Ensure that PERST# is asserted; some bootloaders may deassert it. */
if (pcie->type == BCM2711)
pcie->perst_set(pcie, 1);

usleep_range(100, 200);

/* Take the bridge out of reset */
Expand Down

0 comments on commit 8eb8c27

Please sign in to comment.