lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 8 Jul 2022 09:37:13 -0400
From:   Jim Quinlan <james.quinlan@...adcom.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Jim Quinlan <jim2101024@...il.com>,
        "open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" 
        <linux-pci@...r.kernel.org>, linux-mips@...r.kernel.org,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Kevin Cernekee <cernekee@...il.com>,
        "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" 
        <bcm-kernel-feedback-list@...adcom.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Rob Herring <robh@...nel.org>,
        Krzysztof WilczyƄski <kw@...ux.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        open list <linux-kernel@...r.kernel.org>,
        "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
        <linux-rpi-kernel@...ts.infradead.org>,
        "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v1 4/4] PCI: brcmstb: Augment driver for MIPs SOCs

On Wed, Jul 6, 2022 at 5:42 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> On Thu, Dec 09, 2021 at 03:47:25PM -0500, Jim Quinlan wrote:
> > The current brcmstb driver works for Arm and Arm64.  A few things are
> > modified here for us to support MIPs as well.
> >
> >   o There are four outbound range register groups and each directs a window
> >     of up to 128MB.  Even though there are four 128MB DT "ranges" in the
> >     bmips PCIe DT node, these ranges are contiguous and are collapsed into
> >     a single range by the OF range parser.  Now the driver assumes a single
> >     range -- for MIPs only -- and splits it back into 128MB sizes.
> >
> >   o For bcm7425, the config space accesses must be 32-bit reads or
> >     writes.  In addition, the 4k config space register array is missing
> >     and not used.
> >
> >   o The registers for the upper 32-bits of the outbound window address do
> >     not exist.
> >
> >   o Burst size must be set to 256 (this refers to an internal bus).
> > ...
>
> > @@ -118,6 +118,7 @@
> >  #define PCIE_MISC_HARD_PCIE_HARD_DEBUG                                       0x4204
> >  #define  PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK     0x2
> >  #define  PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK             0x08000000
> > +#define  PCIE_BMIPS_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK               0x00800000
>
> > @@ -883,7 +937,10 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
> >       pcie->bridge_sw_init_set(pcie, 0);
> >
> >       tmp = readl(base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
> > -     tmp &= ~PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK;
> > +     if (is_bmips(pcie))
> > +             tmp &= ~PCIE_BMIPS_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK;
> > +     else
> > +             tmp &= ~PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK;
> >       writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
> >       /* Wait for SerDes to be stable */
> >       usleep_range(100, 200);
>
> brcm_pcie_resume() has similar code that updates
> PCIE_MISC_HARD_PCIE_HARD_DEBUG [1]:
>
>   tmp = readl(base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
>   u32p_replace_bits(&tmp, 0, PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK);
>   writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
>
>   /* wait for serdes to be stable */
>   udelay(100);
>
> This patch didn't change brcm_pcie_resume() to check is_bmips().
> Should it?
>
> If so, it would be nice to use the same method for updating the value
> (either u32p_replace_bits or plain C bitops) in both places.

Will send a patch to fix this, thanks.

Jim Quinlan
Broadcom STB

>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/pcie-brcmstb.c?id=v5.18#n1452

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4210 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ