summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorPreetham Chandru R <pchandru@nvidia.com>2015-10-08 08:35:33 -0400
committerPreetham Chandru R <pchandru@nvidia.com>2017-08-21 05:16:33 -0400
commit89fa7d1ff060236e9d62f115868571c0c971c4e3 (patch)
tree7ea96d3cd558fc807cf044f631b996a49e574b8a /drivers/ata
parent70f0e5acb0ead6aecb651e5a397b9f40c47d15f4 (diff)
ata: ahci: Enable/disable partial or slumber
Add options to enable/disable partial or slumber Bug 200123901 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Signed-off-by: Seema Khowala <seemaj@nvidia.com> Change-Id: I6ae6d8c3d58796931e9cb5252488cb69575b0440 Reviewed-on: http://git-master/r/1127297 (cherry picked from commit 8429e54ed40570fbc7797f33e1ea4e3b528cdd27)
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/tegra/ahci_tegra.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/ata/tegra/ahci_tegra.c b/drivers/ata/tegra/ahci_tegra.c
index c22baf78a..03a47540c 100644
--- a/drivers/ata/tegra/ahci_tegra.c
+++ b/drivers/ata/tegra/ahci_tegra.c
@@ -768,6 +768,24 @@ static void tegra_ahci_disable_hipm(struct ahci_host_priv *hpriv)
768 tegra_ahci_scfg_update(hpriv, val, mask, T_SATA0_AHCI_HBA_CAP_BKDR); 768 tegra_ahci_scfg_update(hpriv, val, mask, T_SATA0_AHCI_HBA_CAP_BKDR);
769} 769}
770 770
771static void tegra_ahci_disable_partial(struct ahci_host_priv *hpriv)
772{
773 u32 val = 0;
774 u32 mask = T_SATA0_AHCI_HBA_CAP_BKDR_PARTIAL_ST_CAP;
775
776 val = 0xFFFFFFFF & ~T_SATA0_AHCI_HBA_CAP_BKDR_PARTIAL_ST_CAP;
777 tegra_ahci_scfg_update(hpriv, val, mask, T_SATA0_AHCI_HBA_CAP_BKDR);
778}
779
780static void tegra_ahci_disable_slumber(struct ahci_host_priv *hpriv)
781{
782 u32 val = 0;
783 u32 mask = T_SATA0_AHCI_HBA_CAP_BKDR_SLUMBER_ST_CAP;
784
785 val = 0xFFFFFFFF & ~T_SATA0_AHCI_HBA_CAP_BKDR_SLUMBER_ST_CAP;
786 tegra_ahci_scfg_update(hpriv, val, mask, T_SATA0_AHCI_HBA_CAP_BKDR);
787}
788
771static void tegra_ahci_disable_ncq(struct ahci_host_priv *hpriv) 789static void tegra_ahci_disable_ncq(struct ahci_host_priv *hpriv)
772{ 790{
773 u32 val = 0; 791 u32 val = 0;
@@ -802,6 +820,10 @@ static int tegra_ahci_disable_features(struct ahci_host_priv *hpriv)
802 tegra_ahci_disable_ncq(hpriv); 820 tegra_ahci_disable_ncq(hpriv);
803 } else if (!strcmp(feature, "dipm")) { 821 } else if (!strcmp(feature, "dipm")) {
804 ahci_tegra_port_info.flags |= ATA_FLAG_NO_DIPM; 822 ahci_tegra_port_info.flags |= ATA_FLAG_NO_DIPM;
823 } else if (!strcmp(feature, "partial")) {
824 tegra_ahci_disable_partial(hpriv);
825 } else if (!strcmp(feature, "slumber")) {
826 tegra_ahci_disable_slumber(hpriv);
805 } 827 }
806 } 828 }
807 829