From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Elad Nachman <enachman@marvell.com>,
<thomas.petazzoni@bootlin.com>, <bhelgaas@google.com>,
<lpieralisi@kernel.org>, <robh@kernel.org>, <kw@linux.com>,
<krzysztof.kozlowski+dt@linaro.org>, <linux-pci@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 8/8] PCI: dwc: Introduce region limit from DT
Date: Tue, 14 Mar 2023 23:48:38 +0300 [thread overview]
Message-ID: <20230314204838.buba4y2iyx3m6qnn@mobilestation> (raw)
In-Reply-To: <20230313194802.GA1531673@bhelgaas>
Hi Bjorn
On Mon, Mar 13, 2023 at 02:48:02PM -0500, Bjorn Helgaas wrote:
> [+cc Serge, who has done most of the recent work in this file]
>
Thanks for sending copy to me. I'll have a look at the series on
this week.
-Serge(y)
> On Mon, Mar 13, 2023 at 02:40:16PM +0200, Elad Nachman wrote:
> > From: Elad Nachman <enachman@marvell.com>
> >
> > Allow dts override of region limit for SOCs with older Synopsis
> > Designware PCIe IP but with greater than 32-bit address range support,
> > such as the Armada 7020/7040/8040 family of SOCs by Marvell,
> > when the DT file places the PCIe window above the 4GB region.
> > The Synopsis Designware PCIe IP in these SOCs is too old to specify the
> > highest memory location supported by the PCIe, but practically supports
> > such locations. Allow these locations to be specified in the DT file.
> > DT property is called num-regionmask , and can range between 33 and 64.
>
> s/Synopsis/Synopsys/ (several occurrences)
>
> s/Designware/DesignWare/ (several occurrences)
>
> Remove space before comma.
>
> > Signed-off-by: Elad Nachman <enachman@marvell.com>
> > ---
> > v4:
> > 1) Fix blank lines removal / addition
> >
> > 2) Remove usage of variable with same name as dt binding property
> >
> > drivers/pci/controller/dwc/pcie-designware.c | 12 ++++++++++--
> > 1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> > index 53a16b8b6ac2..9773c110c733 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware.c
> > @@ -735,8 +735,10 @@ static void dw_pcie_link_set_max_speed(struct dw_pcie *pci, u32 link_gen)
> > void dw_pcie_iatu_detect(struct dw_pcie *pci)
> > {
> > int max_region, ob, ib;
> > - u32 val, min, dir;
> > + u32 val, min, dir, ret;
> > u64 max;
> > + struct device *dev = pci->dev;
> > + struct device_node *np = dev->of_node;
> >
> > val = dw_pcie_readl_dbi(pci, PCIE_ATU_VIEWPORT);
> > if (val == 0xFFFFFFFF) {
> > @@ -781,7 +783,13 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
> > dw_pcie_writel_atu(pci, dir, 0, PCIE_ATU_UPPER_LIMIT, 0xFFFFFFFF);
> > max = dw_pcie_readl_atu(pci, dir, 0, PCIE_ATU_UPPER_LIMIT);
> > } else {
> > - max = 0;
> > + /* Allow dts override of region limit for older IP with above 32-bit support: */
>
> Reflow comment to fit in 80 columns.
>
> > + ret = of_property_read_u32(np, "num-regionmask", &val);
> > + if (!ret && val > 32) {
> > + max = GENMASK(val - 33, 0);
> > + dev_info(pci->dev, "Overriding region limit to %u bits\n", val);
> > + } else
> > + max = 0;
> > }
> >
> > pci->num_ob_windows = ob;
> > --
> > 2.17.1
> >
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-03-14 20:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230313124016.17102-1-enachman@marvell.com>
2023-03-13 19:22 ` [PATCH v4 0/8] PCI: dwc: Add support for Marvell AC5 SoC Bjorn Helgaas
[not found] ` <20230313124016.17102-9-enachman@marvell.com>
2023-03-13 19:48 ` [PATCH v4 8/8] PCI: dwc: Introduce region limit from DT Bjorn Helgaas
2023-03-14 20:48 ` Serge Semin [this message]
2023-03-23 0:11 ` Serge Semin
[not found] ` <20230313124016.17102-8-enachman@marvell.com>
2023-03-17 18:23 ` [PATCH v4 7/8] PCI: dwc: Introduce configurable DMA mask Rob Herring
2023-03-27 17:01 ` Robin Murphy
[not found] ` <20230313124016.17102-5-enachman@marvell.com>
2023-03-17 18:30 ` [PATCH v4 4/8] dt-bindings: PCI: dwc: Add dma-ranges, region mask Rob Herring
[not found] ` <20230313124016.17102-3-enachman@marvell.com>
2023-03-13 19:43 ` [PATCH v4 2/8] PCI: armada8k: Add AC5 SoC support Bjorn Helgaas
2023-03-22 23:19 ` Serge Semin
[not found] ` <20230313124016.17102-4-enachman@marvell.com>
2023-03-22 23:23 ` [PATCH v4 3/8] PCI: armada8k: Add AC5 MSI support Serge Semin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230314204838.buba4y2iyx3m6qnn@mobilestation \
--to=sergey.semin@baikalelectronics.ru \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=enachman@marvell.com \
--cc=helgaas@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox