mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
scsi: ufs: qcom: Rename "hs_gear" to "phy_gear"
The "hs_gear" variable is used to cache the gear setting for the PHY that will be used during ufs_qcom_power_up_sequence(). But it creates ambiguity with the gear setting used by the ufshcd driver. So let's rename it to "phy_gear" to make it explicit that this variable caches the gear setting for the PHY. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20230908145329.154024-2-manivannan.sadhasivam@linaro.org Reviewed-by: Can Guo <quic_cang@quicinc.com> Tested-by: Can Guo <quic_cang@quicinc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
fc88ca19ad
commit
5a738cfe49
@ -459,7 +459,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
phy_set_mode_ext(phy, PHY_MODE_UFS_HS_B, host->hs_gear);
|
phy_set_mode_ext(phy, PHY_MODE_UFS_HS_B, host->phy_gear);
|
||||||
|
|
||||||
/* power on phy - start serdes and phy's power and clocks */
|
/* power on phy - start serdes and phy's power and clocks */
|
||||||
ret = phy_power_on(phy);
|
ret = phy_power_on(phy);
|
||||||
@ -924,12 +924,12 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update hs_gear only when the gears are scaled to a higher value. This is because,
|
* Update phy_gear only when the gears are scaled to a higher value. This is
|
||||||
* the PHY gear settings are backwards compatible and we only need to change the PHY
|
* because, the PHY gear settings are backwards compatible and we only need to
|
||||||
* settings while scaling to higher gears.
|
* change the PHY gear settings while scaling to higher gears.
|
||||||
*/
|
*/
|
||||||
if (dev_req_params->gear_tx > host->hs_gear)
|
if (dev_req_params->gear_tx > host->phy_gear)
|
||||||
host->hs_gear = dev_req_params->gear_tx;
|
host->phy_gear = dev_req_params->gear_tx;
|
||||||
|
|
||||||
/* enable the device ref clock before changing to HS mode */
|
/* enable the device ref clock before changing to HS mode */
|
||||||
if (!ufshcd_is_hs_mode(&hba->pwr_info) &&
|
if (!ufshcd_is_hs_mode(&hba->pwr_info) &&
|
||||||
@ -1296,7 +1296,7 @@ static int ufs_qcom_init(struct ufs_hba *hba)
|
|||||||
* Power up the PHY using the minimum supported gear (UFS_HS_G2).
|
* Power up the PHY using the minimum supported gear (UFS_HS_G2).
|
||||||
* Switching to max gear will be performed during reinit if supported.
|
* Switching to max gear will be performed during reinit if supported.
|
||||||
*/
|
*/
|
||||||
host->hs_gear = UFS_HS_G2;
|
host->phy_gear = UFS_HS_G2;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ struct ufs_qcom_host {
|
|||||||
|
|
||||||
struct gpio_desc *device_reset;
|
struct gpio_desc *device_reset;
|
||||||
|
|
||||||
u32 hs_gear;
|
u32 phy_gear;
|
||||||
|
|
||||||
bool esi_enabled;
|
bool esi_enabled;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user