]> code.ossystems Code Review - bsp/u-boot.git/commit
drivers: pci: imx: fix imx_pcie_remove function
authorSven-Ola Tuecke <sven-ola.tuecke@numberfour.eu>
Thu, 5 Oct 2017 11:46:42 +0000 (08:46 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Thu, 12 Oct 2017 20:40:45 +0000 (17:40 -0300)
commitacea9a74c8f82d1bad59bceefff2c2d99ae7de6f
tree8d4fcbc02c86fb1085e43e81e5caf8bbe1fa9e06
parent977c60b15354f9b88d49bf6e1ee38e24f55b1fe3
drivers: pci: imx: fix imx_pcie_remove function

We have at least a minor count of boards, that failed to re-initialize
PCI express in the Linux kernel. Typical failure rate is 20% on affected
boards. This is mitigated by commit 6ecbe1375671 ("drivers: pci: imx:
add imx_pcie_remove function").

However, at least on some i.MX6 custom boards, when calling
assert_core_reset() as part of the first-time PCIe init, read access
to PCIE_PL_PFLR simply hangs. Surround this readl() with
imx_pcie_fix_dabt_handler() does not help. For this reason, the forced
LTSSM detection is only used on the second assert_core_reset() that is
called shorly before starting the Linux kernel.

Signed-off-by: Sven-Ola Tuecke <sven-ola.tuecke@numberfour.eu>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: David Müller <d.mueller@elsoft.ch>
(cherry picked from commit b2915ba25e350caa79a13a1cd3513eb82709e1f9)
drivers/pci/pcie_imx.c