diff options
author | Stanley Chu <stanley.chu@mediatek.com> | 2020-05-09 11:37:16 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-05-15 03:02:22 +0200 |
commit | f48b285ae658b50f4ba2d3a267522f572720de6d (patch) | |
tree | dff8b0c61ad20c3d1e58eae336962fff14cd6e8b /drivers/scsi/ufs/ufs-mediatek.c | |
parent | scsi: ufs: Customize flush threshold for WriteBooster (diff) | |
download | linux-f48b285ae658b50f4ba2d3a267522f572720de6d.tar.xz linux-f48b285ae658b50f4ba2d3a267522f572720de6d.zip |
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 '')
-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 |