Re: [PATCH v3 1/2] PCI: tegra194: Use FIELD_*() for register fields
From: Manikanta Maddireddy
Date: Tue Nov 17 2026 - 08:33:32 EST
On 16/11/26 10:31 pm, Bjorn Helgaas wrote:
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.
Thank you, Bjorn, for removing the misleading Link tag and simplifying the formatting.
I intended to reference your suggestion to replace the SHIFT definitions with FIELD() helpers, but linked to the original patch instead of your review comment at https://lore.kernel.org/all/20260520193024.GA84903@bhelgaas/
--
nvpublic