ANDROID: PCI: dwc: Wait for the link only if it has been started
In dw_pcie_host_init() regardless of whether the link has been started or not, the code waits for the link to come up. Even in cases where start_link() is not defined the code ends up spinning in a loop for 1 second. Since in some systems dw_pcie_host_init() gets called during probe, this one second loop for each pcie interface instance ends up extending the boot time. Wait for the link up in only if the start_link() is defined. The patch submitted to the upstream kernel (see link below) was not accepted due to no upstream user. The change here is a simplified version of that patch, which will wait for a link only if start_link ops has been defined. Also, this patch was already applied before in https://r.android.com/2548250 but the functionality was lost after https://lore.kernel.org/all/20220624143428.8334-14-Sergey.Semin@baikalelectronics.ru/ was pulled in from the LTS merge. This patch restores the functionality (of removing the delay) which was lost during the LTS merge. Bug: 315052790 Bug: 328536505 Link: https://lore.kernel.org/all/20240112093006.2832105-1-ajayagarwal@google.com/ Change-Id: I4e8d00f6195062728417e41ddd51072880676920 Signed-off-by:Sajid Dalvi <sdalvi@google.com> (cherry picked from commit 288abb8b)
Loading
Please sign in to comment