linux/drivers/pci/host
Marek Vasut 829293965d PCI: imx6: Wait for retraining
commit f95d3ae771 upstream.

This patch handles the case where the PCIe link is up and running, yet
drops into the LTSSM training mode. The link spends short time in the LTSSM
training mode, but the current code can misinterpret it as the link being
stalled.  Waiting for the LTSSM training to complete fixes the issue.

Quoting Sascha:

  This is broken since commit 7f9f40c01c ('PCI: imx6: Report "link up"
  only after link training completes').

  The designware driver changes the PORT_LOGIC_SPEED_CHANGE bit in
  dw_pcie_host_init() which causes the link to be retrained. During the
  next call to dw_pcie_rd_conf() the link is then reported being down and
  the function returns PCIBIOS_DEVICE_NOT_FOUND resulting in nonfunctioning
  PCIe.

Fixes: 7f9f40c01c (PCI: imx6: Report "link up" only after link training completes)
Tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:59:27 -07:00
..
Kconfig PCI changes for the v3.13 merge window: 2013-11-14 14:02:00 +09:00
Makefile Merge branch 'pci/host-rcar' into next 2013-10-31 13:58:49 -06:00
pci-exynos.c PCI: designware: Add dw_pcie prefix before cfg_read/write 2013-12-20 09:18:31 -07:00
pci-imx6.c PCI: imx6: Wait for retraining 2014-05-06 07:59:27 -07:00
pci-mvebu.c PCI: mvebu: Use Device ID and revision from underlying endpoint 2014-02-12 14:05:54 -07:00
pci-rcar-gen2.c PCI: rcar: Add runtime PM support 2013-12-09 16:24:37 -07:00
pci-tegra.c ARM: SoC cleanups for 3.14 2014-01-23 18:36:55 -08:00
pcie-designware.c PCI: designware: Fix iATU programming for cfg1, io and mem viewport 2014-04-26 17:19:03 -07:00
pcie-designware.h PCI: designware: Add dw_pcie prefix before cfg_read/write 2013-12-20 09:18:31 -07:00