mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Merge "scsi: ufs: update pm_lvl during probe only when current pm_lvl is invalid"
This commit is contained in:
commit
44d57bb97f
2 changed files with 7 additions and 0 deletions
|
|
@ -1786,16 +1786,22 @@ static void ufshcd_parse_pm_levels(struct ufs_hba *hba)
|
|||
{
|
||||
struct device *dev = hba->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
|
||||
enum ufs_pm_level rpm_lvl = UFS_PM_LVL_MAX, spm_lvl = UFS_PM_LVL_MAX;
|
||||
|
||||
if (!np)
|
||||
return;
|
||||
|
||||
if (host->is_dt_pm_level_read)
|
||||
return;
|
||||
|
||||
if (!of_property_read_u32(np, "rpm-level", &rpm_lvl) &&
|
||||
ufshcd_is_valid_pm_lvl(rpm_lvl))
|
||||
hba->rpm_lvl = rpm_lvl;
|
||||
if (!of_property_read_u32(np, "spm-level", &spm_lvl) &&
|
||||
ufshcd_is_valid_pm_lvl(spm_lvl))
|
||||
hba->spm_lvl = spm_lvl;
|
||||
host->is_dt_pm_level_read = true;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SCSI_UFSHCD_QTI)
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ struct ufs_qcom_host {
|
|||
atomic_t clks_on;
|
||||
struct ufs_qcom_qos_req *ufs_qos;
|
||||
bool bypass_g4_cfgready;
|
||||
bool is_dt_pm_level_read;
|
||||
};
|
||||
|
||||
static inline u32
|
||||
|
|
|
|||
Loading…
Reference in a new issue