PCI: imx6: Report "link up" only after link training completes
authorMarek Vasut <marex@denx.de>
Thu, 12 Dec 2013 21:49:59 +0000 (22:49 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 19 Dec 2013 17:45:17 +0000 (10:45 -0700)
commit7f9f40c01cce0c0e0ced34af2a2fd8353cc606c3
tree98292e24e4b7e36151c68d49c50afebf3b5db7c0
parentc28f8a1f2b5ed24d48ca6827d0ae499c2e48e8c9
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 <marex@denx.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Frank Li <lznuaa@gmail.com>
Cc: Harro Haan <hrhaan@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Mohit KUMAR <Mohit.KUMAR@st.com>
Cc: Pratyush Anand <pratyush.anand@st.com>
Cc: Richard Zhu <r65037@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Sean Cross <xobs@kosagi.com>
Cc: Siva Reddy Kallam <siva.kallam@samsung.com>
Cc: Srikanth T Shivanand <ts.srikanth@samsung.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Yinghai Lu <yinghai@kernel.org>
drivers/pci/host/pci-imx6.c