UPSTREAM: PCI: rockchip: Fix wrong transmitted FTS count
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 7 Oct 2016 09:42:47 +0000 (17:42 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 18 Oct 2016 12:35:57 +0000 (20:35 +0800)
commitf67addade59302f2cc0fd4bf040a54283206e3aa
tree3de3f2af4ad48afb8f46560b5c476bfd14224ed7
parent976b01b55f5386aef2e11672f7928f38a3ab3786
UPSTREAM: PCI: rockchip: Fix wrong transmitted FTS count

If the expected number of FTS aren't received by RC when exiting from L0s,
the LTSSM will fall into recover state, which means it will need to send TS
for retraining which makes the latency of exiting from L0s a little longer
than expected.  This issue is caused by an incorrect reset value of FTS
count on PLC1 register (offset 0x4).  The expected value for Gen1/2 should
be more than 240 and we may leave a little margin here.  Fix this before
starting Gen1 training which will make TS1 contain the correct FTS count.

Change-Id: I15543b385fdb7a007187faf51265c591c51433e6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit ca1989084054e64da25662e1f974f77312083eb3)
drivers/pci/host/pcie-rockchip.c