[PATCH] PCI: brcmstb: Restore initial fundamental reset

Jim Quinlan james.quinlan at broadcom.com
Thu Nov 12 11:28:45 EST 2020


On Thu, Nov 12, 2020 at 10:44 AM Florian Fainelli <f.fainelli at gmail.com> wrote:
>
> +JimQ,
>
> On 11/12/2020 5:14 AM, Phil Elwell 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>
>
> This does indeed seem to have been lost during that commit, I will let
> JimQ comment on whether this was intentional or not. Please make sure
> you copy him, always, he wrote the driver after all.
Hello,

This wasn't accidentally lost; I intentionally removed it.  I was
remiss in not mentioning this in comments, sorry.

The reason I took it out is because (a) it breaks certain STB SOCs and
(b) I considered it superfluous (see reason below).  At any rate, if
you must restore this line please add the following guard so
everyone's board will work :-)

        if (pcie->type != BCM7278)
                brcm_pcie_perst_set(pcie, 1);



As for me considering that  this line is superfluous -- which
apparently it is not : AFAIK PERST# is always asserted from cold start
on all Brcm STB SOCs, and I expected the same on the RPi.  Asserting
PERST# at this point in time should be a no-op.  Is this not the case?

Thanks,
Jim Quinlan
Broadcom STB


>
> > ---
> >  drivers/pci/controller/pcie-brcmstb.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> > index bea86899bd5d..a90d6f69c5a1 100644
> > --- a/drivers/pci/controller/pcie-brcmstb.c
> > +++ b/drivers/pci/controller/pcie-brcmstb.c
> > @@ -869,6 +869,8 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
> >
> >       /* 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 */
> >
>
> --
> Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4167 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20201112/59f984e1/attachment.p7s>


More information about the linux-rpi-kernel mailing list