Skip to content

Commit 5a738cf

Browse files
Mani-Sadhasivammartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Can Guo <[email protected]> Tested-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent fc88ca1 commit 5a738cf

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
459459
return ret;
460460
}
461461

462-
phy_set_mode_ext(phy, PHY_MODE_UFS_HS_B, host->hs_gear);
462+
phy_set_mode_ext(phy, PHY_MODE_UFS_HS_B, host->phy_gear);
463463

464464
/* power on phy - start serdes and phy's power and clocks */
465465
ret = phy_power_on(phy);
@@ -924,12 +924,12 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
924924
}
925925

926926
/*
927-
* Update hs_gear only when the gears are scaled to a higher value. This is because,
928-
* the PHY gear settings are backwards compatible and we only need to change the PHY
929-
* settings while scaling to higher gears.
927+
* Update phy_gear only when the gears are scaled to a higher value. This is
928+
* because, the PHY gear settings are backwards compatible and we only need to
929+
* change the PHY gear settings while scaling to higher gears.
930930
*/
931-
if (dev_req_params->gear_tx > host->hs_gear)
932-
host->hs_gear = dev_req_params->gear_tx;
931+
if (dev_req_params->gear_tx > host->phy_gear)
932+
host->phy_gear = dev_req_params->gear_tx;
933933

934934
/* enable the device ref clock before changing to HS mode */
935935
if (!ufshcd_is_hs_mode(&hba->pwr_info) &&
@@ -1296,7 +1296,7 @@ static int ufs_qcom_init(struct ufs_hba *hba)
12961296
* Power up the PHY using the minimum supported gear (UFS_HS_G2).
12971297
* Switching to max gear will be performed during reinit if supported.
12981298
*/
1299-
host->hs_gear = UFS_HS_G2;
1299+
host->phy_gear = UFS_HS_G2;
13001300

13011301
return 0;
13021302

drivers/ufs/host/ufs-qcom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ struct ufs_qcom_host {
240240

241241
struct gpio_desc *device_reset;
242242

243-
u32 hs_gear;
243+
u32 phy_gear;
244244

245245
bool esi_enabled;
246246
};

0 commit comments

Comments
 (0)