]> git.ipfire.org Git - thirdparty/kernel/stable.git/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:18 +0000 (16:56 +0000)
commitf05ae00106aa4c1f67257f943cd0f10da9910a06
tree20207dd4f00a74fc5d5216e0a71d12d7f2a91fda
parent631a96e9eb4228ff75fce7e72d133ca81194797e
PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields

[ Upstream commit 759574abd78e3b47ec45bbd31a64e8832cf73f97 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-tegra194.c