patch1 is a trivial clean up: move the parameters for wait for link
into the core pcie-designware.c
Since link may be UP but still in link training, if so, we can't think
the link is up and operating correctly. So patch2 teaches
dw_pcie_link_up() beware of the PCIE_PHY_DEBUG_R1_LINK_IN_TRAINING bit.
Since v1:
- add Joao's Ack
- rebased on v4.8-rc1
Jisheng Zhang (2):
PCI: designware: mv parameters for wait for link into
pcie-designware.c
PCI: designware: let dw_pcie_link_up() beware of LTSSM training bit
drivers/pci/host/pcie-designware.c | 11 +++++++++--
drivers/pci/host/pcie-designware.h | 5 -----
2 files changed, 9 insertions(+), 7 deletions(-)
--
2.8.1
On Wed, 10 Aug 2016 18:07:01 +0800 Jisheng Zhang wrote:
patch1 is a trivial clean up: move the parameters for wait for link
into the core pcie-designware.c
Since link may be UP but still in link training, if so, we can't think
the link is up and operating correctly. So patch2 teaches
dw_pcie_link_up() beware of the PCIE_PHY_DEBUG_R1_LINK_IN_TRAINING bit.
hmm, there's one accident with my email system, the v2 series is sent twice
Sorry for inconvenience,
Jisheng
Since v1:
- add Joao's Ack
- rebased on v4.8-rc1
Jisheng Zhang (2):
PCI: designware: mv parameters for wait for link into
pcie-designware.c
PCI: designware: let dw_pcie_link_up() beware of LTSSM training bit
drivers/pci/host/pcie-designware.c | 11 +++++++++--
drivers/pci/host/pcie-designware.h | 5 -----
2 files changed, 9 insertions(+), 7 deletions(-)
These parameters are only used in the core pcie-designware.c, let's
move them to the core driver.
Signed-off-by: Jisheng Zhang <redacted>
---
drivers/pci/host/pcie-designware.c | 5 +++++
drivers/pci/host/pcie-designware.h | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
@@ -75,6 +75,11 @@#define PCIE_PHY_DEBUG_R1 (PLR_OFFSET + 0x2c)#define PCIE_PHY_DEBUG_R1_LINK_UP 0x00000010+/* Parameters for the waiting for link up routine */+#define LINK_WAIT_MAX_RETRIES 10+#define LINK_WAIT_USLEEP_MIN 90000+#define LINK_WAIT_USLEEP_MAX 100000+staticstructpci_opsdw_pcie_ops;intdw_pcie_cfg_read(void__iomem*addr,intsize,u32*val)
@@ -22,11 +22,6 @@#define MAX_MSI_IRQS 32#define MAX_MSI_CTRLS (MAX_MSI_IRQS / 32)-/* Parameters for the waiting for link up routine */-#define LINK_WAIT_MAX_RETRIES 10-#define LINK_WAIT_USLEEP_MIN 90000-#define LINK_WAIT_USLEEP_MAX 100000-structpcie_port{structdevice*dev;u8root_bus_nr;
The link may be UP but still in link training. In this case, we can't
think the link is up and operating correctly. So we need to teach
dw_pcie_link_up() beware of the PCIE_PHY_DEBUG_R1_LINK_IN_TRAINING bit.
This patch also rewrite PCIE_PHY_DEBUG_R1_LINK_UP definition so that
it's consistent with other MACROS.
Signed-off-by: Jisheng Zhang <redacted>
Acked-by: Joao Pinto <redacted>
---
drivers/pci/host/pcie-designware.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
On Wed, Aug 10, 2016 at 06:07:01PM +0800, Jisheng Zhang wrote:
patch1 is a trivial clean up: move the parameters for wait for link
into the core pcie-designware.c
Since link may be UP but still in link training, if so, we can't think
the link is up and operating correctly. So patch2 teaches
dw_pcie_link_up() beware of the PCIE_PHY_DEBUG_R1_LINK_IN_TRAINING bit.
Since v1:
- add Joao's Ack
- rebased on v4.8-rc1
Jisheng Zhang (2):
PCI: designware: mv parameters for wait for link into
pcie-designware.c
PCI: designware: let dw_pcie_link_up() beware of LTSSM training bit
drivers/pci/host/pcie-designware.c | 11 +++++++++--
drivers/pci/host/pcie-designware.h | 5 -----
2 files changed, 9 insertions(+), 7 deletions(-)
Applied to pci/host-designware for v4.9, thanks, Jisheng.