From: "Bao D. Nguyen" <nguyenb@codeaurora.org>
To: cang@codeaurora.org, asutoshd@codeaurora.org,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Cc: "Bao D. Nguyen" <nguyenb@codeaurora.org>,
linux-arm-msm@vger.kernel.org,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Bean Huo <beanhuo@micron.com>,
Bart Van Assche <bvanassche@acm.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v1 1/1] scsi: ufshcd: Properly set the device Icc Level
Date: Mon, 31 Aug 2020 18:19:57 -0700 [thread overview]
Message-ID: <5c9d6f76303bbe5188bf839b2ea5e5bf530e7281.1598923023.git.nguyenb@codeaurora.org> (raw)
UFS version 3.0 and later devices require Vcc and Vccq power supplies
with Vccq2 being optional. While earlier UFS version 2.0 and 2.1
devices, the Vcc and Vccq2 are required with Vccq being optional.
Check the required power supplies used by the device
and set the device's supported Icc level properly.
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
---
drivers/scsi/ufs/ufshcd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 06e2439..fdd1d3e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6845,8 +6845,9 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba,
{
u32 icc_level = 0;
- if (!hba->vreg_info.vcc || !hba->vreg_info.vccq ||
- !hba->vreg_info.vccq2) {
+ if (!hba->vreg_info.vcc ||
+ (!hba->vreg_info.vccq && hba->dev_info.wspecversion >= 0x300) ||
+ (!hba->vreg_info.vccq2 && hba->dev_info.wspecversion < 0x300)) {
dev_err(hba->dev,
"%s: Regulator capability was not set, actvIccLevel=%d",
__func__, icc_level);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next reply other threads:[~2020-09-01 1:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 1:19 Bao D. Nguyen [this message]
2020-09-10 1:28 ` [PATCH v1 1/1] scsi: ufshcd: Properly set the device Icc Level nguyenb
[not found] ` <0101017475a11d00-6def34a7-db5d-472c-9dcc-215a80510402-000000@us-west-2.amazonses.com>
2020-09-10 10:02 ` Avri Altman
2020-09-14 16:34 ` nguyenb
2020-09-15 2:54 ` Bjorn Andersson
2020-09-15 8:49 ` nguyenb
2020-09-15 13:37 ` Bjorn Andersson
2020-09-17 0:53 ` nguyenb
2020-09-17 2:29 ` Bjorn Andersson
2020-09-29 2:35 ` nguyenb
2020-10-26 20:48 ` nguyenb
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=5c9d6f76303bbe5188bf839b2ea5e5bf530e7281.1598923023.git.nguyenb@codeaurora.org \
--to=nguyenb@codeaurora.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@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).