BACKPORT: UPSTREAM: PCI: qcom: Ensure that PERST is asserted for at least 100 ms

Currently, there is only a 1 ms sleep after asserting PERST.

Reading the datasheets for different endpoints, some require PERST to be
asserted for 10 ms in order for the endpoint to perform a reset, others
require it to be asserted for 50 ms.

Several SoCs using this driver uses PCIe Mini Card, where we don't know
what endpoint will be plugged in.

The PCI Express Card Electromechanical Specification r2.0, section
2.2, "PERST# Signal" specifies:

"On power up, the deassertion of PERST# is delayed 100 ms (TPVPERL) from
the power rails achieving specified operating limits."

Add a sleep of 100 ms before deasserting PERST, in order to ensure that
we are compliant with the spec.

BUG=b:138962769
TEST=COMPILE and boot the device,the PCIe device should work as expected.

(cherry picked from commit 64adde31c8e996a6db6f7a1a4131180e363aa9f2
 https://github.com/torvalds/linux.git)

Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
Change-Id: Ibe1842ae0d8261fce2ec87fce8fa4ec81c47be53
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@linaro.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1852387
Reviewed-by: Zhihong Yu <zhihongyu@chromium.org>
Commit-Queue: Zhihong Yu <zhihongyu@chromium.org>
Tested-by: Zhihong Yu <zhihongyu@chromium.org>
1 file changed