From: Stanley Chu <stanley.chu@mediatek.com>
To: <linux-scsi@vger.kernel.org>, <martin.petersen@oracle.com>,
<avri.altman@wdc.com>, <alim.akhtar@samsung.com>,
<pedrom.sousa@synopsys.com>, <jejb@linux.ibm.com>,
<matthias.bgg@gmail.com>
Cc: <linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <beanhuo@micron.com>,
<kuohong.wang@mediatek.com>, <peter.wang@mediatek.com>,
<chun-hung.wu@mediatek.com>, <andy.teng@mediatek.com>,
Stanley Chu <stanley.chu@mediatek.com>
Subject: [PATCH v1 3/4] scsi: ufs-mediatek: configure customized auto-hibern8 timer
Date: Fri, 13 Dec 2019 16:11:34 +0800 [thread overview]
Message-ID: <1576224695-22657-4-git-send-email-stanley.chu@mediatek.com> (raw)
In-Reply-To: <1576224695-22657-1-git-send-email-stanley.chu@mediatek.com>
Configure customized auto-hibern8 timer in MediaTek Chipsets.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.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 690483c78212..71e2e0e4ea11 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>
@@ -300,6 +301,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
next prev parent reply other threads:[~2019-12-13 9:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 8:11 [PATCH v1 0/4] scsi: ufs-mediatek: provide power management Stanley Chu
2019-12-13 8:11 ` [PATCH v1 1/4] scsi: ufs-mediatek: introduce reference clock control Stanley Chu
2019-12-19 18:17 ` Alim Akhtar
2019-12-13 8:11 ` [PATCH v1 2/4] scsi: ufs: export ufshcd_auto_hibern8_update for vendor usage Stanley Chu
2019-12-18 23:53 ` Asutosh Das (asd)
2019-12-19 18:32 ` Alim Akhtar
2019-12-13 8:11 ` Stanley Chu [this message]
2019-12-19 18:25 ` [PATCH v1 3/4] scsi: ufs-mediatek: configure customized auto-hibern8 timer Alim Akhtar
2019-12-13 8:11 ` [PATCH v1 4/4] scsi: ufs-mediatek: configure and enable clk-gating Stanley Chu
2019-12-19 18:33 ` Alim Akhtar
2019-12-19 23:17 ` [PATCH v1 0/4] scsi: ufs-mediatek: provide power management Martin K. Petersen
2019-12-20 1:25 ` Stanley Chu
2019-12-20 2:25 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576224695-22657-4-git-send-email-stanley.chu@mediatek.com \
--to=stanley.chu@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=andy.teng@mediatek.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=chun-hung.wu@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=kuohong.wang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=pedrom.sousa@synopsys.com \
--cc=peter.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).