val |= AFI_PLLE_CONTROL_PCIE2PLLE_CONTROL_EN;
list_for_each_entry_safe(port, tmp, &pcie->ports, list) {
if (port->disable_clock_request) {
- val |= AFI_PLLE_CONTROL_BYPASS_PADS2PLLE_CONTROL;
val &= ~AFI_PLLE_CONTROL_PADS2PLLE_CONTROL_EN;
break;
}
RP_LINK_CONTROL_STATUS_NEG_LINK_WIDTH) >> 20;
}
+static void tegra_pcie_update_pads2plle(struct tegra_pcie_port *port)
+{
+ unsigned long ctrl = 0;
+ u32 val = 0;
+
+ ctrl = tegra_pcie_port_get_pex_ctrl(port);
+ /* AFI_PEX_STATUS is AFI_PEX_CTRL + 4 */
+ val = afi_readl(port->pcie, ctrl + 4);
+ if (val & 0x1) {
+ val = afi_readl(port->pcie, AFI_PLLE_CONTROL);
+ val &= ~AFI_PLLE_CONTROL_PADS2PLLE_CONTROL_EN;
+ afi_writel(port->pcie, val, AFI_PLLE_CONTROL);
+ }
+}
+
#if defined(CONFIG_ARCH_TEGRA_21x_SOC)
static void mbist_war(struct tegra_pcie *pcie, bool apply)
{
port->status = 1;
pcie->num_ports++;
tegra_pcie_update_lane_width(port);
+ tegra_pcie_update_pads2plle(port);
continue;
}
dev_info(pcie->dev, "link %u down, ignoring\n", port->index);