diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2018-07-27 16:47:02 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-07-30 10:09:10 -0400 |
commit | a5ec5a7bfd1f28d1905499641c9f589be36808c1 (patch) | |
tree | 592320d7a604f9ca492a29a293983231bbe19a1b /drivers/ata/libahci.c | |
parent | 04ba9488199e3ee9971769cee585ec6847013ed2 (diff) |
ata: ahci: Support state with min power but Partial low power state
Currently when min_power policy is selected, the partial low power state
is not entered and link will try aggressively enter to only slumber state.
Add a new policy which still enable DEVSLP but also try to enter partial
low power state. This policy is presented as "min_power_with_partial".
For information the difference between partial and slumber
Partial – PHY logic is powered up, and in a reduced power state. The link
PM exit latency to active state maximum is 10 ns.
Slumber – PHY logic is powered up, and in a reduced power state. The link
PM exit latency to active state maximum is 10 ms.
Devslp – PHY logic is powered down. The link PM exit latency from this
state to active state maximum is 20 ms, unless otherwise specified by
DETO.
Suggested-and-reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libahci.c')
-rw-r--r-- | drivers/ata/libahci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 5038cee7d982..f79dce613e54 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
@@ -800,6 +800,8 @@ static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, | |||
800 | cmd |= PORT_CMD_ALPE; | 800 | cmd |= PORT_CMD_ALPE; |
801 | if (policy == ATA_LPM_MIN_POWER) | 801 | if (policy == ATA_LPM_MIN_POWER) |
802 | cmd |= PORT_CMD_ASP; | 802 | cmd |= PORT_CMD_ASP; |
803 | else if (policy == ATA_LPM_MIN_POWER_WITH_PARTIAL) | ||
804 | cmd &= ~PORT_CMD_ASP; | ||
803 | 805 | ||
804 | /* write out new cmd value */ | 806 | /* write out new cmd value */ |
805 | writel(cmd, port_mmio + PORT_CMD); | 807 | writel(cmd, port_mmio + PORT_CMD); |
@@ -810,7 +812,8 @@ static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, | |||
810 | if ((hpriv->cap2 & HOST_CAP2_SDS) && | 812 | if ((hpriv->cap2 & HOST_CAP2_SDS) && |
811 | (hpriv->cap2 & HOST_CAP2_SADM) && | 813 | (hpriv->cap2 & HOST_CAP2_SADM) && |
812 | (link->device->flags & ATA_DFLAG_DEVSLP)) { | 814 | (link->device->flags & ATA_DFLAG_DEVSLP)) { |
813 | if (policy == ATA_LPM_MIN_POWER) | 815 | if (policy == ATA_LPM_MIN_POWER || |
816 | policy == ATA_LPM_MIN_POWER_WITH_PARTIAL) | ||
814 | ahci_set_aggressive_devslp(ap, true); | 817 | ahci_set_aggressive_devslp(ap, true); |
815 | else | 818 | else |
816 | ahci_set_aggressive_devslp(ap, false); | 819 | ahci_set_aggressive_devslp(ap, false); |