]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: dwc: Always cache the maximum link speed value in dw_pcie::max_link_speed
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 11 Sep 2024 15:26:27 +0000 (20:56 +0530)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Fri, 13 Sep 2024 14:44:55 +0000 (14:44 +0000)
commit19a69cbd9d436fe503e5cb6dade76fe371244d4f
treeb4cedb111843962aa9de497c815c18db7d6fc2e3
parent2cebf68a24abb0552ea59cf928829acd51f8b175
PCI: dwc: Always cache the maximum link speed value in dw_pcie::max_link_speed

Currently, the dw_pcie::max_link_speed has a valid value only if the
controller driver restricts the maximum link speed in the driver or if
the platform does so in the devicetree using the 'max-link-speed'
property.

But having the maximum supported link speed of the platform would be
helpful for the vendor drivers to configure any link specific settings.

So in the case of non-valid value in dw_pcie::max_link_speed, just cache
the hardware default value from Link Capability register.

While at it, remove the 'max_link_speed' argument to the
dw_pcie_link_set_max_speed() function since the value can be
retrieved within the function.

Link: https://lore.kernel.org/linux-pci/20240911-pci-qcom-gen4-stability-v7-2-743f5c1fd027@linaro.org
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
drivers/pci/controller/dwc/pcie-designware.c