Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43dcb173 authored by Stanley Chu's avatar Stanley Chu Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: 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: default avatarAsutosh Das <asutoshd@codeaurora.org>
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

Bug: 151050916
(cherry picked from commit f48b285ae658b50f4ba2d3a267522f572720de6d)
Change-Id: I552f19b2806b5819a49ffff02768c2a5afa4cec7
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7e6050a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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