[PATCH v2] PCI: brcmstb: Restore initial fundamental reset

Nicolas Saenz Julienne nsaenzjulienne at suse.de
Mon Jan 18 07:44:44 EST 2021


On Mon, 2021-01-18 at 12:40 +0000, Lorenzo Pieralisi wrote:
> On Thu, Nov 12, 2020 at 01:38:13PM -0500, Jim Quinlan wrote:
> > On Thu, Nov 12, 2020 at 12:27 PM Phil Elwell <phil at raspberrypi.com> wrote:
> > > 
> > > Commit 04356ac30771 ("PCI: brcmstb: Add bcm7278 PERST# support")
> > > 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.
> > > 
> > > Fixes: commit 04356ac30771 ("PCI: brcmstb: Add bcm7278 PERST# support")
> > > 
> > > Signed-off-by: Phil Elwell <phil at raspberrypi.com>
> > > Acked-by: Nicolas Saenz Julienne <nsaenzjulienne at suse.de>
> > > ---
> > > Changes in v2:
> > >   - Exclude BCM7278 from the initial reset
> > >   - Ack from Nicolas
> > > ---
> > >  drivers/pci/controller/pcie-brcmstb.c | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> > > index bea86899bd5d..83aa85bfe8e3 100644
> > > --- a/drivers/pci/controller/pcie-brcmstb.c
> > > +++ b/drivers/pci/controller/pcie-brcmstb.c
> > > @@ -869,6 +869,11 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
> > > 
> > >         /* Reset the bridge */
> > >         pcie->bridge_sw_init_set(pcie, 1);
> > > +
> > > +       /* Assert the fundemental reset, except on BCM7278 */
> > > +       if (pcie->type != BCM7278)
> > > +               pcie->perst_set(pcie, 1);
> > I'm okay with this although I  would rather it not be needed.
> 
> Can I merge this patch as is then ?

No. IIUC the consensus was to fix this in firmware. There is a u-boot fix
available in their mailing list, and I think RPi's firmware was also patched
accordingly (@Phil please confirm).

Regards,
Nicolas



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20210118/0a471963/attachment.sig>


More information about the linux-rpi-kernel mailing list