]> git.itanic.dy.fi Git - linux-stable/commit
PCI: dwc: Use FIELD_GET/PREP()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 24 Oct 2023 11:03:36 +0000 (14:03 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 24 Oct 2023 15:53:58 +0000 (10:53 -0500)
commit92af77ca26f75f7874634c8ac2f744f86ec56e88
treeae3e6a14d9d7e57a421a084881f9ddc7a773b29c
parentb09d0f98a434bd6b9b9e0fb63bebfcac5e1a679e
PCI: dwc: Use FIELD_GET/PREP()

Convert open-coded variants of PCI field access into FIELD_GET/PREP()
to make the code easier to understand.

Add two missing defines into pci_regs.h. Logically, the Max No-Snoop
Latency Register is a separate word sized register in the PCIe spec,
but the pre-existing LTR defines in pci_regs.h with dword long values
seem to consider the registers together (the same goes for the only
user). Thus, follow the custom and make the new values also take both
word long LTR registers as a joint dword register.

Link: https://lore.kernel.org/r/20231024110336.26264-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/dwc/pcie-designware-ep.c
drivers/pci/controller/dwc/pcie-tegra194.c
include/uapi/linux/pci_regs.h