ENGR00319415 pcie: random link down issue after warm-rst
authorRichard Zhu <r65037@freescale.com>
Tue, 24 Jun 2014 01:59:47 +0000 (09:59 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 28 Apr 2021 20:49:34 +0000 (13:49 -0700)
commit5b3b440ca6c85e285dc1ee782e6c8082c0ca418f
treef03378f98a7ad31395b1ff16552ce49ea38dd586
parent54224157d2ede2ddf7ae250289be956672ca4a5c
ENGR00319415 pcie: random link down issue after warm-rst

There are about 0.02% percentage on some imx6q/dl/solo
hw boards, random pcie link down when warm-reset is used.
Make sure to clear the ref_ssp_en bit16 of gpr1 before
warm-rst, and set ref_ssp_en after the pcie clks are
stable to workaround it.

imx6sl doesn't have the pcie module, mask the pcie
related codes from imx6sl.

rootcause:
* gpr regisers wouldn't be reset by warm-rst, while the
ref_ssp_en is required to be reset by pcie.
(work-around in u-boot)
* ref_ssp_en should be set after pcie clks are stable.
(work-around in kernel)

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit 5cc825b12c6b86a22f1a6a0535b52cf3ee142e77)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 6193cf4e3384a59e29546d13a67657f7faeafc9e)
(cherry picked from commit 7b4aabeddffabca46d7d6e7ef2611de468a6b4f7)
(cherry picked from commit a117fc7b2b8d930fd7a47b168c4638365cb3a475)
(cherry picked from commit d94a5b283afd2786428f514b0db4a6eaa5bcccff)
(cherry picked from commit 9ee86b956916432e0a27afc31d29933705d4a675)
arch/arm/mach-imx/mx6/soc.c