]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
authorRick Wertenbroek <rick.wertenbroek@gmail.com>
Tue, 18 Apr 2023 07:46:51 +0000 (09:46 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:20:19 +0000 (17:20 +0200)
commit43c998176824f0f7d6eb134147b7ee76abbc8638
tree690935d6abde4309c12a009c250279ad780c7775
parentce7058f8a1d232dedc0f3408edbd64d54f78590b
PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked

BugLink: https://bugs.launchpad.net/bugs/2036075
commit 9dd3c7c4c8c3f7f010d9cdb7c3f42506d93c9527 upstream.

The RK3399 PCIe controller should wait until the PHY PLLs are locked.
Add poll and timeout to wait for PHY PLLs to be locked. If they cannot
be locked generate error message and jump to error handler. Accessing
registers in the PHY clock domain when PLLs are not locked causes hang
The PHY PLLs status is checked through a side channel register.
This is documented in the TRM section 17.5.8.1 "PCIe Initialization
Sequence".

Link: https://lore.kernel.org/r/20230418074700.1083505-5-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Rick Wertenbroek <rick.wertenbroek@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/pci/controller/pcie-rockchip.c
drivers/pci/controller/pcie-rockchip.h