linux/drivers/pci/host
Lucas Stach 3e3e406e38 PCI: imx6: Put LTSSM in "Detect" state before disabling it
This fixes a boot hang observed when the bootloader already enabled the
PCIe link for its own use.  The fundamental problem is that Freescale
forgot to wire up the core reset, so software doesn't have a sane way to
get the core into a defined state.

According to the DW PCIe core reference manual, configuration of the core
may only happen when the LTSSM is disabled, so this is one of the first
things we need to do.  Apparently this isn't safe to do when the LTSSM is in
any state other than "detect" as we observe an instant machine hang when
trying to do so while the link is already up.

As a workaround, force LTSSM into detect state right before hitting the
disable switch.  There is still a race window because the LTSSM may
transition out of "detect" before we can disable it, but it's the best
we can do for now.

[bhelgaas: mention race window]
Link: http://lkml.kernel.org/r/1406830565-23450-3-git-send-email-l.stach@pengutronix.de
Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
2014-09-04 07:32:21 -06:00
..
Kconfig PCI changes for v3.17 (part 3): 2014-08-19 09:45:31 -05:00
Makefile PCI changes for v3.17 (part 3): 2014-08-19 09:45:31 -05:00
pci-dra7xx.c PCI: dra7xx: Add TI DRA7xx PCIe driver 2014-07-22 15:26:24 -06:00
pci-exynos.c Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pci-host-generic.c PCI: generic: Fix GPL v2 license string typo 2014-07-15 15:07:46 -06:00
pci-imx6.c PCI: imx6: Put LTSSM in "Detect" state before disabling it 2014-09-04 07:32:21 -06:00
pci-mvebu.c PCI: mvebu: Fix GPL v2 license string typo 2014-07-15 15:01:05 -06:00
pci-rcar-gen2.c PCI: rcar: Add gen2 device tree support 2014-05-28 07:47:55 -06:00
pci-tegra.c PCI changes for v3.17 (part 3): 2014-08-19 09:45:31 -05:00
pcie-designware.c PCI: designware: Add MSI-related pcie_host_ops for v3.65 hardware 2014-07-22 16:47:29 -06:00
pcie-designware.h PCI: designware: Add MSI-related pcie_host_ops for v3.65 hardware 2014-07-22 16:47:29 -06:00
pcie-rcar.c PCI: rcar: Fix GPL v2 license string typo 2014-07-15 15:06:12 -06:00
pcie-spear13xx.c PCI: spear: Remove spear13xx_pcie_remove() 2014-07-20 12:27:50 -07:00