From: Can Guo <cang@codeaurora.org>
To: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
hongwus@codeaurora.org, rnayak@codeaurora.org,
linux-scsi@vger.kernel.org, kernel-team@android.com,
saravanak@google.com, salyzyn@google.com, cang@codeaurora.org
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
Pedro Sousa <pedrom.sousa@synopsys.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Bean Huo <beanhuo@micron.com>,
Venkat Gopalakrishnan <venkatg@codeaurora.org>,
Tomas Winkler <tomas.winkler@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Allison Randal <allison@lohutok.net>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v3 8/8] scsi: ufs: Select INITIAL adapt for HS Gear4
Date: Wed, 22 Jan 2020 22:12:25 -0800 [thread overview]
Message-ID: <1579759946-5448-9-git-send-email-cang@codeaurora.org> (raw)
In-Reply-To: <1579759946-5448-1-git-send-email-cang@codeaurora.org>
ADAPT is added specifically for HS Gear4 mode only, select INITIAL adapt
before do power mode change to G4 and select no adapt before switch to
non-G4 modes.
Signed-off-by: Can Guo <cang@codeaurora.org>
---
drivers/scsi/ufs/ufshcd.c | 8 ++++++++
drivers/scsi/ufs/unipro.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 1ee2187..20b9428 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -4134,6 +4134,14 @@ static int ufshcd_change_power_mode(struct ufs_hba *hba,
ufshcd_dme_set(hba, UIC_ARG_MIB(PA_HSSERIES),
pwr_mode->hs_rate);
+ if (pwr_mode->gear_tx == UFS_HS_G4)
+ /* INITIAL ADAPT */
+ ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXHSADAPTTYPE),
+ PA_INITIAL_ADAPT);
+ else
+ /* NO ADAPT */
+ ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXHSADAPTTYPE), PA_NO_ADAPT);
+
ret = ufshcd_uic_change_pwr_mode(hba, pwr_mode->pwr_rx << 4
| pwr_mode->pwr_tx);
diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
index f539f87..bd1c3d6 100644
--- a/drivers/scsi/ufs/unipro.h
+++ b/drivers/scsi/ufs/unipro.h
@@ -192,6 +192,7 @@ enum ufs_hs_gear_tag {
UFS_HS_G1, /* HS Gear 1 (default for reset) */
UFS_HS_G2, /* HS Gear 2 */
UFS_HS_G3, /* HS Gear 3 */
+ UFS_HS_G4, /* HS Gear 4 */
};
enum ufs_unipro_ver {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2020-01-23 6:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 6:12 [PATCH v3 0/8] UFS driver general fixes bundle 4 Can Guo
2020-01-23 6:12 ` [PATCH v3 1/8] scsi: ufs: Flush exception event before suspend Can Guo
2020-01-23 22:54 ` [EXT] " Bean Huo (beanhuo)
2020-01-23 6:12 ` [PATCH v3 2/8] scsi: ufs: set load before setting voltage in regulators Can Guo
2020-01-23 6:12 ` [PATCH v3 3/8] scsi: ufs: Remove the check before call setup clock notify vops Can Guo
2020-01-23 6:12 ` [PATCH v3 4/8] scsi: ufs-qcom: Adjust bus bandwidth voting and unvoting Can Guo
2020-01-23 6:12 ` [PATCH v3 5/8] scsi: ufs: Fix ufshcd_hold() caused scheduling while atomic Can Guo
2020-01-23 6:50 ` hongwus
2020-01-23 6:12 ` [PATCH v3 6/8] scsi: ufs: Add dev ref clock gating wait time support Can Guo
2020-01-23 6:12 ` [PATCH v3 7/8] scsi: ufs-qcom: Delay specific time before gate ref clk Can Guo
2020-01-23 6:12 ` Can Guo [this message]
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=1579759946-5448-9-git-send-email-cang@codeaurora.org \
--to=cang@codeaurora.org \
--cc=alim.akhtar@samsung.com \
--cc=allison@lohutok.net \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=gregkh@linuxfoundation.org \
--cc=hongwus@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nguyenb@codeaurora.org \
--cc=pedrom.sousa@synopsys.com \
--cc=rnayak@codeaurora.org \
--cc=salyzyn@google.com \
--cc=saravanak@google.com \
--cc=stanley.chu@mediatek.com \
--cc=tglx@linutronix.de \
--cc=tomas.winkler@intel.com \
--cc=venkatg@codeaurora.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.