diff options
author | Stanley Chu <stanley.chu@mediatek.com> | 2020-05-09 17:37:16 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-05-14 21:02:22 -0400 |
commit | f48b285ae658b50f4ba2d3a267522f572720de6d (patch) | |
tree | dff8b0c61ad20c3d1e58eae336962fff14cd6e8b /drivers/scsi/ufs | |
parent | d14734ae3ae79d3b0286a2431782054e5066da8f (diff) | |
download | linux-f48b285ae658b50f4ba2d3a267522f572720de6d.tar.bz2 |
scsi: ufs-mediatek: Customize WriteBooster flush policy
Change the WriteBooster policy to keep VCC on during runtime suspend if
available WriteBooster buffer is less than 80%.
Link: https://lore.kernel.org/r/20200509093716.21010-5-stanley.chu@mediatek.com
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r-- | drivers/scsi/ufs/ufs-mediatek.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c index 74baba93f51e..d56ce8d97d4e 100644 --- a/drivers/scsi/ufs/ufs-mediatek.c +++ b/drivers/scsi/ufs/ufs-mediatek.c @@ -271,6 +271,7 @@ static int ufs_mtk_init(struct ufs_hba *hba) /* Enable WriteBooster */ hba->caps |= UFSHCD_CAP_WB_EN; + hba->vps->wb_flush_threshold = UFS_WB_BUF_REMAIN_PERCENT(80); /* * ufshcd_vops_init() is invoked after |