OSDN Git Service

PCI: tegra: Set target speed as Gen1 before starting LTSSM
authorManikanta Maddireddy <mmaddireddy@nvidia.com>
Tue, 18 Jun 2019 18:01:55 +0000 (23:31 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 20 Jun 2019 16:22:27 +0000 (17:22 +0100)
commitc23ae2aec5bc40cfc8e9ad0058aff2edacb0fbcb
tree9986ad0214f11c050b4d03b547114c62298d18b8
parent9f570b6c240e4f64791805b37fb4c60c65ea95c6
PCI: tegra: Set target speed as Gen1 before starting LTSSM

PCIe link up fails with few legacy endpoints if root port advertises both
Gen-1 and Gen-2 speeds in Tegra. This is because link number negotiation
fails if both Gen1 & Gen2 are advertised. Tegra doesn't retry link up by
advertising only Gen1. Hence, the strategy followed here is to initially
advertise only Gen-1 and after link is up, retrain link to Gen-2 speed.

Tegra doesn't support HW autonomous speed change. Link comes up in Gen1
even if Gen2 is advertised, so there is no downside of this change.

This behavior is observed with following two PCIe devices on Tegra:

- Fusion HDTV 5 Express card
- IOGear SIL - PCIE - SATA card

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Thierry Reding <treding@nvidia.com>
drivers/pci/controller/pci-tegra.c