summaryrefslogtreecommitdiffstats
path: root/drivers/ufs/host/ufs-hisi.c
diff options
context:
space:
mode:
authorCan Guo <quic_cang@quicinc.com>2023-12-02 04:36:07 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2023-12-13 22:37:20 -0500
commitfa3dca8251c4fff88da9f64ba931942638ab0c00 (patch)
tree1e66868db2222ed817c4f6ebe75d4b79cdcf3adb /drivers/ufs/host/ufs-hisi.c
parentb85ea95d086471afb4ad062012a4d73cd328fa86 (diff)
downloadlinux-stable-fa3dca8251c4fff88da9f64ba931942638ab0c00.tar.gz
linux-stable-fa3dca8251c4fff88da9f64ba931942638ab0c00.tar.bz2
linux-stable-fa3dca8251c4fff88da9f64ba931942638ab0c00.zip
scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params
Structure ufs_dev_params is actually used in UFS host drivers to declare host specific power mode parameters, like ufs_<vendor>_params or host_cap, which makes the code not very straightforward to read. Rename the structure ufs_dev_params to ufs_host_params and unify the declarations in all drivers to host_params. In addition, rename the two functions ufshcd_init_pwr_dev_param() and ufshcd_get_pwr_dev_param() which work based on the ufs_host_params to ufshcd_init_host_params() and ufshcd_negotiate_pwr_params() respectively to avoid confusions. This change does not change any functionalities or logic. Acked-by: Andrew Halaney <ahalaney@redhat.com> Reviewed-by: Nitin Rawat <quic_nitirawa@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Can Guo <quic_cang@quicinc.com> Link: https://lore.kernel.org/r/1701520577-31163-2-git-send-email-quic_cang@quicinc.com Reviewed-by: Peter Wang <peter.wang@mediatek.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/host/ufs-hisi.c')
-rw-r--r--drivers/ufs/host/ufs-hisi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ufs/host/ufs-hisi.c b/drivers/ufs/host/ufs-hisi.c
index 0229ac0a8dbe..5ee73ff05251 100644
--- a/drivers/ufs/host/ufs-hisi.c
+++ b/drivers/ufs/host/ufs-hisi.c
@@ -293,9 +293,9 @@ static int ufs_hisi_link_startup_notify(struct ufs_hba *hba,
return err;
}
-static void ufs_hisi_set_dev_cap(struct ufs_dev_params *hisi_param)
+static void ufs_hisi_set_dev_cap(struct ufs_host_params *host_params)
{
- ufshcd_init_pwr_dev_param(hisi_param);
+ ufshcd_init_host_params(host_params);
}
static void ufs_hisi_pwr_change_pre_change(struct ufs_hba *hba)
@@ -365,7 +365,7 @@ static int ufs_hisi_pwr_change_notify(struct ufs_hba *hba,
struct ufs_pa_layer_attr *dev_max_params,
struct ufs_pa_layer_attr *dev_req_params)
{
- struct ufs_dev_params ufs_hisi_cap;
+ struct ufs_host_params host_params;
int ret = 0;
if (!dev_req_params) {
@@ -377,9 +377,8 @@ static int ufs_hisi_pwr_change_notify(struct ufs_hba *hba,
switch (status) {
case PRE_CHANGE:
- ufs_hisi_set_dev_cap(&ufs_hisi_cap);
- ret = ufshcd_get_pwr_dev_param(&ufs_hisi_cap,
- dev_max_params, dev_req_params);
+ ufs_hisi_set_dev_cap(&host_params);
+ ret = ufshcd_negotiate_pwr_params(&host_params, dev_max_params, dev_req_params);
if (ret) {
dev_err(hba->dev,
"%s: failed to determine capabilities\n", __func__);