SATA: Add Port Multiplier support
Ximing Chen [Tue, 26 Aug 2014 11:40:04 +0000 (19:40 +0800)]
Current SATA controller configuration disables PM.
This CL is to enable it.
Support for direct SATA devices has no change.

Bug 1544067

Change-Id: I8f5e2161b687e07608228b9aafb7018808fe0203
Signed-off-by: Ximing Chen <ximingc@nvidia.com>
Reviewed-on: http://git-master/r/488162
(Cherry-picked from commit 9a2e7092d0d4977ebbb296b3f1352e6847a2496c)
Reviewed-on: http://git-master/r/493955
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

drivers/ata/ahci-tegra.c

index 58b56a8..3b78f7a 100644 (file)
@@ -1129,7 +1129,7 @@ static int tegra_ahci_controller_init(struct tegra_ahci_host_priv *tegra_hpriv,
                        SATA_FPCI_BAR5_0_OFFSET);
 
        val = scfg_readl(T_SATA0_AHCI_HBA_CAP_BKDR);
-       val |= (HOST_CAP_ALPM | HOST_CAP_SSC | HOST_CAP_PART);
+       val |= (HOST_CAP_ALPM | HOST_CAP_SSC | HOST_CAP_PART | HOST_CAP_PMP);
        scfg_writel(val, T_SATA0_AHCI_HBA_CAP_BKDR);
 
        /* Second Level Clock Gating*/
@@ -2488,6 +2488,8 @@ static int tegra_ahci_init_one(struct platform_device *pdev)
                pi.flags |= ATA_FLAG_NCQ;
                pi.flags |= ATA_FLAG_FPDMA_AA;
        }
+       if (hpriv->cap & HOST_CAP_PMP)
+               pi.flags |= ATA_FLAG_PMP;
 
        /*
         * CAP.NP sometimes indicate the index of the last enabled