]> git.itanic.dy.fi Git - linux-stable/commit
PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 19 Sep 2023 12:56:44 +0000 (15:56 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 10 Oct 2023 20:00:52 +0000 (15:00 -0500)
commit759574abd78e3b47ec45bbd31a64e8832cf73f97
tree23c64cc1e05c0302adc77a785f36ff8cf671ccc2
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields

Use FIELD_GET() to extract PCIe Negotiated Link Width field instead of
custom masking and shifting.

Similarly, change custom code that misleadingly used
PCI_EXP_LNKSTA_NLW_SHIFT to prepare value for PCI_EXP_LNKCAP write
to use FIELD_PREP() with correct field define (PCI_EXP_LNKCAP_MLW).

Link: https://lore.kernel.org/r/20230919125648.1920-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/pci/controller/dwc/pcie-tegra194.c