Re: [PATCH v3 1/2] PCI: tegra194: Use FIELD_*() for register fields

From: Bjorn Helgaas

Date: Mon Nov 16 2026 - 12:01:17 EST


On Mon, Nov 09, 2026 at 11:19:06AM -0600, Bjorn Helgaas wrote:
> On Mon, Nov 02, 2026 at 02:52:37PM +0530, Manikanta Maddireddy wrote:
> > Several Tegra194 APPL and DesignWare register fields are programmed
> > with open-coded shifts, which makes the register programming more
> > verbose than necessary.
> >
> > Use FIELD_PREP(), FIELD_MODIFY() and FIELD_GET() at the Tegra call
> > sites where values are shifted into fields. The LTSSM state constants
> > are converted from pre-shifted register values to unshifted field
> > values for FIELD_GET().
> >
> > Suggested-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > Link: https://lore.kernel.org/r/20260515070753.3852840-2-mmaddireddy@xxxxxxxxxx
>
> Thanks for this patch; it's great to get rid of the redundant *_SHIFT
> definitions.
>
> But I'm confused about why this Link: is here. It points to "[PATCH
> v3 1/2] PCI: tegra194: Use aspm-l1-entry-delay-ns DT property for L1
> entrance latency", which looks like a functional change.
>
> This patch should be zero functional changes; it should be purely
> mechanical changes from explicit shifts to using FIELD_MODIFY() etc.
>
> This patch doesn't mention aspm-l1-entry-delay-ns, so it doesn't
> *look* like this includes the [PATCH v3 1/2] content.

https://lore.kernel.org/r/20260515070753.3852840-2-mmaddireddy@xxxxxxxxxx
is a change that was already merged as 87f493041e20 ("PCI: tegra194:
Use aspm-l1-entry-delay-ns DT property for L1 entrance latency").

*This* patch only reworks it to use FIELD_MODIFY(). I dropped that
Link: tag to avoid confusion. And also put both PORT_AFAC_L0S_ELM and
PORT_AFAC_L1_ELM on one line since they fit easily.