summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBibek Basu <bbasu@nvidia.com>2014-02-25 22:23:22 +0530
committerMandar Padmawar <mpadmawar@nvidia.com>2014-05-02 04:32:38 -0700
commit7dc56d1f8c49b94eb0382e390b3da0d255cf4adb (patch)
tree367b5abb1c5a3bdf6526da5e4dbee6c7992ab67d
parent39fed3b186f59fe23dc60dc34fb5a4b634a4cfd7 (diff)
pcie: host: tegra: enable both controller
Enable both the lanes for the x2, x1 configuration based on port status Bug 1468239 Change-Id: I8e4b59940bc148d883c129cecc614a0173874219 Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/374341 (cherry picked from commit 65d65f9eb2c9320b27da0fb4e425785bb6f966f7) Reviewed-on: http://git-master/r/402823 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jay Agarwal <jagarwal@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
-rw-r--r--drivers/pci/host/pci-tegra.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 455ae530a621..ca49e452bbbb 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -984,9 +984,11 @@ static int tegra_pcie_enable_controller(void)
/* Extract 2 upper bits from odmdata[28:30] and configure */
/* T124 pcie lanes in X2_X1/X4_X1 config based on them */
lane_owner = tegra_get_lane_owner_info() >> 1;
- if (lane_owner == PCIE_LANES_X2_X1)
+ if (lane_owner == PCIE_LANES_X2_X1) {
val |= AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X2_X1;
- else {
+ if (tegra_pcie.plat_data->port_status[1])
+ val &= ~AFI_PCIE_CONFIG_PCIEC1_DISABLE_DEVICE;
+ } else {
val |= AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X4_X1;
if ((tegra_pcie.plat_data->port_status[1]) &&
(lane_owner == PCIE_LANES_X4_X1))