PCIE: tegra: enable ASPM and disable L0s
Bibek Basu [Tue, 1 Apr 2014 08:41:20 +0000 (13:41 +0530)]
Enable ASPM feature for Tegra12 but keep L0s
disabled as its broken.

Bug 1483608

Change-Id: Ie1f8c10dc1d95c4b5164f9030aa5560542c81f1b
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/391647
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

drivers/pci/host/pci-tegra.c

index f4293d7..bcf90b9 100644 (file)
@@ -1758,6 +1758,10 @@ static void tegra_pcie_enable_aspm(void)
                pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &val);
                val |= aspm >> 10;
                pcie_capability_write_word(pdev, PCI_EXP_LNKCTL, val);
+#if defined CONFIG_ARCH_TEGRA_12x_SOC
+               pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL,
+                               PCI_EXP_LNKCTL_ASPM_L0S);
+#endif
        }
 }
 
@@ -1770,9 +1774,7 @@ static void tegra_pcie_enable_features(void)
                pr_info("PCIE: No Link speed change happened\n");
 
        tegra_pcie_pll_pdn();
-#if !defined(CONFIG_ARCH_TEGRA_12x_SOC)
        tegra_pcie_enable_aspm();
-#endif
        tegra_pcie_apply_sw_war(0, true);
 }