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.
Bug: 270085637
Link: https://lore.kernel.org/r/20230412093425.3659088-1-ajayagarwal@google.com
Tested-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Sajid Dalvi <sdalvi@google.com>
Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
(cherry picked from commit da56a1bfbab55189595e588f1d984bdfb5cf5924
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git controller/dwc)
[willmcvicker: fixed trivial merge conflicts]
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: Ia4d9b41b2a15cb077025f6250d8fa07c495a17a9