[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1577683950-1702-6-git-send-email-stanley.chu@mediatek.com>
Date: Mon, 30 Dec 2019 13:32:29 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: <linux-scsi@...r.kernel.org>, <martin.petersen@...cle.com>,
<avri.altman@....com>, <alim.akhtar@...sung.com>,
<pedrom.sousa@...opsys.com>, <jejb@...ux.ibm.com>,
<matthias.bgg@...il.com>, <bvanassche@....org>,
<f.fainelli@...il.com>
CC: <beanhuo@...ron.com>, <cang@...eaurora.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <kuohong.wang@...iatek.com>,
<peter.wang@...iatek.com>, <chun-hung.wu@...iatek.com>,
<andy.teng@...iatek.com>, <leon.chen@...iatek.com>,
Stanley Chu <stanley.chu@...iatek.com>
Subject: [PATCH v2 5/6] scsi: ufs-mediatek: configure customized auto-hibern8 timer
Configure customized auto-hibern8 timer in MediaTek Chipsets.
Cc: Alim Akhtar <alim.akhtar@...sung.com>
Cc: Avri Altman <avri.altman@....com>
Cc: Bart Van Assche <bvanassche@....org>
Cc: Bean Huo <beanhuo@...ron.com>
Cc: Can Guo <cang@...eaurora.org>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: Matthias Brugger <matthias.bgg@...il.com>
Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
Reviewed-by: Alim Akhtar <alim.akhtar@...sung.com>
---
drivers/scsi/ufs/ufs-mediatek.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index fc5ba21ec02a..1f025723b61b 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -7,6 +7,7 @@
*/
#include <linux/arm-smccc.h>
+#include <linux/bitfield.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/phy/phy.h>
@@ -305,6 +306,13 @@ static int ufs_mtk_post_link(struct ufs_hba *hba)
/* enable unipro clock gating feature */
ufs_mtk_cfg_unipro_cg(hba, true);
+ /* configure auto-hibern8 timer to 10ms */
+ if (ufshcd_is_auto_hibern8_supported(hba)) {
+ ufshcd_auto_hibern8_update(hba,
+ FIELD_PREP(UFSHCI_AHIBERN8_TIMER_MASK, 10) |
+ FIELD_PREP(UFSHCI_AHIBERN8_SCALE_MASK, 3));
+ }
+
return 0;
}
--
2.18.0
Powered by blists - more mailing lists