Merge "scsi: ufshcd: Properly set the device Icc Level"

This commit is contained in:
qctecmdr 2020-06-26 17:34:06 -07:00 • committed by Gerrit - the friendly Code Review server
commit 95d17c2e1d
2 changed files with 6 additions and 3 deletions

View file

@ -7614,7 +7614,9 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba,
* vendors don't use this rail for embedded UFS devices as well. So
* it is normal that VCCQ rail may not be provided for given platform.
*/
if (!hba->vreg_info.vcc || !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, bActiveICCLevel=%d\n",
__func__, icc_level);
goto out;

View file

@ -6881,8 +6881,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);