summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Chu <stanley.chu@mediatek.com>2020-11-16 09:50:54 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-11-17 09:03:18 +0300
commitd9fa1e731e243525861517ba256b179072070c1d (patch)
treeecb7db24f55ec39439a914df70bbf334fa9fe368
parente1e25d1b89967035059cf8e098270cc3300b5bd9 (diff)
downloadlinux-d9fa1e731e243525861517ba256b179072070c1d.tar.xz
scsi: ufs: ufs-qcom: Use common ADAPT configuration function
Use common ADAPT configuration function to reduce duplicated code in UFS drivers. Link: https://lore.kernel.org/r/20201116065054.7658-10-stanley.chu@mediatek.com Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/ufs/ufs-qcom.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 04adfbd10753..1e434cce0f79 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -723,17 +723,9 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
ufs_qcom_dev_ref_clk_ctrl(host, true);
if (host->hw_ver.major >= 0x4) {
- if (dev_req_params->gear_tx == UFS_HS_G4) {
- /* INITIAL ADAPT */
- ufshcd_dme_set(hba,
- UIC_ARG_MIB(PA_TXHSADAPTTYPE),
- PA_INITIAL_ADAPT);
- } else {
- /* NO ADAPT */
- ufshcd_dme_set(hba,
- UIC_ARG_MIB(PA_TXHSADAPTTYPE),
- PA_NO_ADAPT);
- }
+ ufshcd_dme_configure_adapt(hba,
+ dev_req_params->gear_tx,
+ PA_INITIAL_ADAPT);
}
break;
case POST_CHANGE: