Skip to content
Snippets Groups Projects
Unverified Commit 19a69cbd authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Krzysztof Wilczyński
Browse files

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: default avatarJohan Hovold <johan+linaro@kernel.org>
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[kwilczynski: commit log]
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Reviewed-by: default avatarJohan Hovold <johan+linaro@kernel.org>
parent 2cebf68a
No related branches found
Tags amd-drm-next-5.16-2021-10-14
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment