From 5a84915a1060893351f277f2bbe24fa89ff7d5b9 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Tue, 7 Feb 2023 22:34:17 +0530 Subject: [PATCH] Revert "FROMGIT: scsi: ufs: ufs-qcom: Add support for finding max gear on new platforms" This reverts commit ac7823b077de23338833165f9d0d1486d82ad7c8. UFS G4 patchseries broke RB5 (sm8250). Reverting a minimal set of patches to get the device booting again. Bug: 146449535 Change-Id: I33155982effdcedcbf836e5355fbed646236ea48 Suggested-by: Bart Van Assche Suggested-by: Manivannan Sadhasivam Signed-off-by: Amit Pundir --- drivers/ufs/host/ufs-qcom.c | 2 -- drivers/ufs/host/ufs-qcom.h | 4 ---- 2 files changed, 6 deletions(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 19b181447685..a5fcfb561a9c 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -288,8 +288,6 @@ static u32 ufs_qcom_get_hs_gear(struct ufs_hba *hba) * Hence downgrade the maximum supported gear to HS-G2. */ return UFS_HS_G2; - } else if (host->hw_ver.major >= 0x4) { - return UFS_QCOM_MAX_GEAR(ufshcd_readl(hba, REG_UFS_PARAM0)); } /* Default is HS-G3 */ diff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h index 8050e214f722..d0a8fc4497d8 100644 --- a/drivers/ufs/host/ufs-qcom.h +++ b/drivers/ufs/host/ufs-qcom.h @@ -99,10 +99,6 @@ enum { #define TMRLUT_HW_CGC_EN BIT(6) #define OCSC_HW_CGC_EN BIT(7) -/* bit definitions for REG_UFS_PARAM0 */ -#define MAX_HS_GEAR_MASK GENMASK(6, 4) -#define UFS_QCOM_MAX_GEAR(x) FIELD_GET(MAX_HS_GEAR_MASK, (x)) - /* bit definition for UFS_UFS_TEST_BUS_CTRL_n */ #define TEST_BUS_SUB_SEL_MASK GENMASK(4, 0) /* All XXX_SEL fields are 5 bits wide */