[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGVHG+GTANAx7zzp@lizhi-Precision-Tower-5810>
Date: Wed, 2 Jul 2025 10:50:14 -0400
From: Frank Li <Frank.li@....com>
To: Manivannan Sadhasivam <mani@...nel.org>
Cc: Kishon Vijay Abraham I <kishon@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Anup Patel <apatel@...tanamicro.com>, Marc Zyngier <maz@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Danilo Krummrich <dakr@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Shuah Khan <shuah@...nel.org>, Richard Zhu <hongxing.zhu@....com>,
Lucas Stach <l.stach@...gutronix.de>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Rob Herring <robh@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Wilczyński <kwilczynski@...nel.org>,
Niklas Cassel <cassel@...nel.org>, dlemoal@...nel.org,
jdmason@...zu.us, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org,
linux-kselftest@...r.kernel.org, imx@...ts.linux.dev,
devicetree@...r.kernel.org
Subject: Re: [PATCH v19 09/10] pci: imx6: Add LUT setting for MSI/IOMMU in
Endpoint mode
On Wed, Jul 02, 2025 at 06:52:01PM +0530, Manivannan Sadhasivam wrote:
> On Mon, Jun 09, 2025 at 12:34:21PM GMT, Frank Li wrote:
> > Support only one physical function, so call imx_pcie_add_lut_by_rid(0)
> > to add a single LUT entry when operating in EP mode.
> >
>
> So previously LUT config was not present and endpoint mode continued to work?
Yes, LUT only use when enable msi and iommu. I will add such information
at next version.
Frank
> Please explain why this is necessary now.
>
> - Mani
>
> > Signed-off-by: Frank Li <Frank.Li@....com>
> > ---
> > change from v14 to v16
> > - none
> >
> > change from v13 to v14
> > - new patch
> > ---
> > drivers/pci/controller/dwc/pci-imx6.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> > index 032b906c44dfa..3123bf49e209c 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -1063,7 +1063,10 @@ static int imx_pcie_add_lut(struct imx_pcie *imx_pcie, u16 rid, u8 sid)
> > data1 |= IMX95_PE0_LUT_VLD;
> > regmap_write(imx_pcie->iomuxc_gpr, IMX95_PE0_LUT_DATA1, data1);
> >
> > - data2 = IMX95_PE0_LUT_MASK; /* Match all bits of RID */
> > + if (imx_pcie->drvdata->mode == DW_PCIE_EP_TYPE)
> > + data2 = 0x7; /* EP side's RID from RC, only 'D' is meansful */
> > + else
> > + data2 = IMX95_PE0_LUT_MASK; /* Match all bits of RID */
> > data2 |= FIELD_PREP(IMX95_PE0_LUT_REQID, rid);
> > regmap_write(imx_pcie->iomuxc_gpr, IMX95_PE0_LUT_DATA2, data2);
> >
> > @@ -1767,6 +1770,9 @@ static int imx_pcie_probe(struct platform_device *pdev)
> > ret = imx_add_pcie_ep(imx_pcie, pdev);
> > if (ret < 0)
> > return ret;
> > +
> > + /* Only support one physical function */
> > + imx_pcie_add_lut_by_rid(imx_pcie, 0);
> > } else {
> > pci->pp.use_atu_msg = true;
> > ret = dw_pcie_host_init(&pci->pp);
> >
> > --
> > 2.34.1
> >
>
> --
> மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists