diff options
| author | Subhash Jadavani <subhashj@codeaurora.org> | 2015-01-16 17:23:24 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:58:36 -0700 |
| commit | 2d59afeff93bec2f5892093a7ed0ad879fcf4295 (patch) | |
| tree | 1f40cdb9a3ceeaf52c30aa45d43fd67b18f165d6 /include/linux | |
| parent | 4ad04d8bc587f53e654817caa206043f7eefb766 (diff) | |
scsi: ufs: add UFS power collapse support during hibern8
UFS host controller hardware may allow the host controller
to be power collapsed when UFS link is hibern8 state, this
change allows the UFS host controller to be power collapsed
during hibern8.
Change-Id: I42f962484b9d6635be1139b1fc6447dd2ca2200c
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/scsi/ufs/ufshcd.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/scsi/ufs/ufshcd.h b/include/linux/scsi/ufs/ufshcd.h index ad3d250a7018..5e17d1b26a98 100644 --- a/include/linux/scsi/ufs/ufshcd.h +++ b/include/linux/scsi/ufs/ufshcd.h @@ -794,7 +794,12 @@ struct ufs_hba { * to do background operation when it's active but it might degrade * the performance of ongoing read/write operations. */ -#define UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND (1 << 5) +#define UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND (1 << 6) + /* + * If host controller hardware can be power collapsed when UFS link is + * in hibern8 then enable this cap. + */ +#define UFSHCD_CAP_POWER_COLLAPSE_DURING_HIBERN8 (1 << 7) struct devfreq *devfreq; struct ufs_clk_scaling clk_scaling; @@ -822,6 +827,13 @@ static inline bool ufshcd_is_hibern8_on_idle_allowed(struct ufs_hba *hba) { return hba->caps & UFSHCD_CAP_HIBERN8_ENTER_ON_IDLE; } + +static inline bool ufshcd_is_power_collapse_during_hibern8_allowed( + struct ufs_hba *hba) +{ + return !!(hba->caps & UFSHCD_CAP_POWER_COLLAPSE_DURING_HIBERN8); +} + static inline bool ufshcd_keep_autobkops_enabled_except_suspend( struct ufs_hba *hba) { |
