PCI: imx6: Report "link up" only after link training completes
PCI: imx6: Report "link up" only after link training completes

While waiting for the PHY to report the PCIe link is up, we might hit a
situation where the link training is still in progress, while the PHY
already reports the link is up.  Add additional check for this condition.

Signed-off-by: Marek Vasut <f40600653b33f5282fa4c5daf377dfc444fb4625@denx.de>
Signed-off-by: Bjorn Helgaas <f10ec01be0c6b54271af5c550cd257810bdf3268@google.com>
Acked-by: Shawn Guo <912cf7eb7d8018e2943586ae6657d21fd4e38239@linaro.org>
Cc: Frank Li <b99eefcf732eea439715b026468a4bc1ee869eb4@gmail.com>
Cc: Harro Haan <40e8a27788f449d808beae313ed476eba749f2e0@gmail.com>
Cc: Jingoo Han <fc379137a64feb86ce38ec5811a14280acc1ccfc@samsung.com>
Cc: Mohit KUMAR <6f8e7e8d6d30b46a494f0850fb8f59f76f38ae6a@st.com>
Cc: Pratyush Anand <312638e7d640785762ded1305e88fac68d55a9ab@st.com>
Cc: Richard Zhu <745816b10228d666aef7119ae868544c37433c8d@freescale.com>
Cc: Sascha Hauer <c00cbc2b736c26791a3822db86f8796fe9efff67@pengutronix.de>
Cc: Sean Cross <dd28e116ed3e781f3ae781acae9fb18383f35c2f@kosagi.com>
Cc: Siva Reddy Kallam <152dd442537d9b53464fb22bfe7c9a0089599008@samsung.com>
Cc: Srikanth T Shivanand <28e159d20b8c674a0607ac06f5ddc772473ba8bd@samsung.com>
Cc: Tim Harvey <2eb8e9683e255f7f6ab4ba7e0e01ba35c34e3b93@gateworks.com>
Cc: Troy Kisky <debfc29e3a9e989b865b88f1f207951588bac6b3@boundarydevices.com>
Cc: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org>
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs