summaryrefslogtreecommitdiff
path: root/drivers/ufs/ufs.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2023-08-16 17:05:51 +0200
committerTom Rini <trini@konsulko.com>2023-08-24 13:47:43 -0400
commitf430151e105b055abd687a456c3980b3674eeb42 (patch)
treebbd29b730a71d16dac1edbee83354061cb997c8b /drivers/ufs/ufs.c
parent91913a1aa2ffeb7278d7d4e4bc51565bb38cebeb (diff)
downloadu-boot-f430151e105b055abd687a456c3980b3674eeb42.tar.gz
u-boot-f430151e105b055abd687a456c3980b3674eeb42.tar.bz2
u-boot-f430151e105b055abd687a456c3980b3674eeb42.zip
ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO
Add UFSHCD_QUIRK_HIBERN_FASTAUTO quirk for host controllers which supports auto-hibernate the capability but only FASTAUTO mode. Ported from Linux kernel commit 2f11bbc2c7f3 ("scsi: ufs: core: Add UFSHCD_QUIRK_HIBERN_FASTAUTO") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Diffstat (limited to 'drivers/ufs/ufs.c')
-rw-r--r--drivers/ufs/ufs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index da0550d98c..261ae2843c 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -1631,8 +1631,13 @@ static int ufshcd_get_max_pwr_mode(struct ufs_hba *hba)
if (hba->max_pwr_info.is_valid)
return 0;
- pwr_info->pwr_tx = FAST_MODE;
- pwr_info->pwr_rx = FAST_MODE;
+ if (hba->quirks & UFSHCD_QUIRK_HIBERN_FASTAUTO) {
+ pwr_info->pwr_tx = FASTAUTO_MODE;
+ pwr_info->pwr_rx = FASTAUTO_MODE;
+ } else {
+ pwr_info->pwr_tx = FAST_MODE;
+ pwr_info->pwr_rx = FAST_MODE;
+ }
pwr_info->hs_rate = PA_HS_MODE_B;
/* Get the connected lane count */