TEGRA: Fix PCIe link timeout.

MFC after: 2 weeks
This commit is contained in:
Michal Meloun 2016-10-04 09:14:48 +00:00
parent 9ba3abc30e
commit c7533311be
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306666

View File

@ -201,7 +201,8 @@ __FBSDID("$FreeBSD$");
#define RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE 0x20000000
#define RP_LINK_CONTROL_STATUS_LINKSTAT_MASK 0x3fff0000
#define TEGRA_PCIE_LINKUP_TIMEOUT 200
/* Wait 50 ms (per port) for link. */
#define TEGRA_PCIE_LINKUP_TIMEOUT 50000
#define TEGRA_PCIB_MSI_ENABLE
@ -1160,6 +1161,7 @@ tegra_pcib_wait_for_link(struct tegra_pcib_softc *sc,
RP_VEND_XP, 4);
if (reg & RP_VEND_XP_DL_UP)
break;
DELAY(1);
}
if (i <= 0)
@ -1171,6 +1173,7 @@ tegra_pcib_wait_for_link(struct tegra_pcib_softc *sc,
if (reg & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE)
break;
DELAY(1);
}
if (i <= 0)
return (ETIMEDOUT);