[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260109152750.GA544801@bhelgaas>
Date: Fri, 9 Jan 2026 09:27:50 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Hongxing Zhu <hongxing.zhu@....com>
Cc: Frank Li <frank.li@....com>,
"l.stach@...gutronix.de" <l.stach@...gutronix.de>,
"lpieralisi@...nel.org" <lpieralisi@...nel.org>,
"kwilczynski@...nel.org" <kwilczynski@...nel.org>,
"mani@...nel.org" <mani@...nel.org>,
"robh@...nel.org" <robh@...nel.org>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 08/11] PCI: dwc: Invoke post_init in
dw_pcie_resume_noirq()
On Fri, Jan 09, 2026 at 02:10:07AM +0000, Hongxing Zhu wrote:
> > -----Original Message-----
> > From: Bjorn Helgaas <helgaas@...nel.org>
> > Sent: 2026年1月9日 5:50
> > To: Hongxing Zhu <hongxing.zhu@....com>
> > Cc: Frank Li <frank.li@....com>; l.stach@...gutronix.de;
> > lpieralisi@...nel.org; kwilczynski@...nel.org; mani@...nel.org;
> > robh@...nel.org; krzk+dt@...nel.org; conor+dt@...nel.org;
> > bhelgaas@...gle.com; shawnguo@...nel.org; s.hauer@...gutronix.de;
> > kernel@...gutronix.de; festevam@...il.com; linux-pci@...r.kernel.org;
> > linux-arm-kernel@...ts.infradead.org; devicetree@...r.kernel.org;
> > imx@...ts.linux.dev; linux-kernel@...r.kernel.org
> > Subject: Re: [PATCH v6 08/11] PCI: dwc: Invoke post_init in
> > dw_pcie_resume_noirq()
> >
> > On Wed, Oct 15, 2025 at 11:04:25AM +0800, Richard Zhu wrote:
> > > If the ops has post_init callback, invoke it in dw_pcie_resume_noirq().
> >
> > I'm trying to write the merge commit log for this branch, and I don't quite
> > understand this.
> >
> > The effect is to apply the GEN3_ZRXDC_NONCOMPL workaround for the
> > ERR051586 erratum, and Mani added the hint that this enables REFCLK
> > during resume. But it seems weird that we apply a REFCLK workaround
> > after the link is already up.
> >
> > During probe, .post_init() is run after pci_host_probe(), so we apply the
> > workaround after enumerating all the devices, which means REFCLK must
> > already be valid and the link is already up.
> >
> > Is "enabling REFCLK" actually what imx_pcie_host_post_init() does?
>
> The codes are used to clean up the CLKREQ# override active low
> configurations after link is up and the CLKREQ# is drove to low by
> remote endpoint device at this point(support-clkreq is TRUE).
>
> It paves the way to support the CLKREQ# toggling mandatory required
> by L1SS.
>
> > Could the workaround be done in imx_pcie_host_init() before the
> > link is brought up? If it could, it looks like we wouldn't need
> > imx_pcie_host_post_init() at all.
>
> Two actions are done in imx_pcie_post_init().
>
> One is to apply the workaround of ERR051586 by commit 744a1c20ce93
> ("PCI: imx6: Add workaround for errata ERR051586"). It should be
> applied after link is up.
>
> The other one is to clean up the CLKREQ# override active low
> configurations previous set in imx_pcie_host_init().
Right. I'm not asking about the CLKREQ# part. I'm asking about the
IMX_PCIE_FLAG_8GT_ECN_ERR051586 part.
The current commit log for this patch is this:
Some SoCs like i.MX95 require enabling REFCLK after resuming from suspend
in their post_init callback. So invoke the callback at the end of
dw_pcie_resume_noirq() if available.
When .post_init() is called, the link is already up and PCIe devices
have already been enumerated. I think REFCLK is required for the link
to come up, so it doesn't sound right to me that .post_init() would be
*enabling* REFCLK.
> > For now, I put this in the merge commit log:
> >
> > - Apply i.MX95 ERR051586 erratum workaround for REFCLK issue during
> > resume (Richard Zhu)
Powered by blists - more mailing lists