aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-07-22 00:34:48 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-07-22 00:34:48 -0700
commit7635e457c75605e7eee02db33bb1cf0f15717175 (patch)
treeb8a9a82ab833ecb5c33cff8c476dd3826a60eb44
parent413c2238a1cc38f3b37d0a74f7cff442cb3bab63 (diff)
parentd32839a913751102b61918a91b223cb245a449b9 (diff)
Merge "scsi: ufs: UFS device spec version for G4 and low voltage support"LA.UM.7.1.r1-15600-sm8150.0
-rw-r--r--drivers/scsi/ufs/ufshcd.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 5217a0e09820..3b0dcdef99b3 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -476,7 +476,6 @@ static int ufshcd_config_vreg(struct device *dev,
struct ufs_vreg *vreg, bool on);
static int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg);
static int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg);
-static bool ufshcd_is_g4_supported(struct ufs_hba *hba);
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
static struct devfreq_simple_ondemand_data ufshcd_ondemand_data = {
@@ -8141,7 +8140,7 @@ static int ufshcd_set_low_vcc_level(struct ufs_hba *hba,
struct ufs_vreg *vreg = hba->vreg_info.vcc;
/* Check if device supports the low voltage VCC feature */
- if (dev_desc->wspecversion < 0x300 && !ufshcd_is_g4_supported(hba))
+ if (dev_desc->wspecversion < 0x300)
return 0;
/*
@@ -8692,34 +8691,6 @@ out:
}
/**
- * ufshcd_is_g4_supported - check if device supports HS-G4
- * @hba: per-adapter instance
- *
- * Returns True if device supports HS-G4, False otherwise.
- */
-static bool ufshcd_is_g4_supported(struct ufs_hba *hba)
-{
- int ret;
- u32 tx_hsgear = 0;
-
- /* check device capability */
- ret = ufshcd_dme_peer_get(hba,
- UIC_ARG_MIB_SEL(TX_HSGEAR_CAPABILITY,
- UIC_ARG_MPHY_TX_GEN_SEL_INDEX(0)),
- &tx_hsgear);
- if (ret) {
- dev_err(hba->dev, "%s: Failed getting peer TX_HSGEAR_CAPABILITY. err = %d\n",
- __func__, ret);
- return false;
- }
-
- if (tx_hsgear == UFS_HS_G4)
- return true;
- else
- return false;
-}
-
-/**
* ufshcd_probe_hba - probe hba to detect device and initialize
* @hba: per-adapter instance
*
@@ -8771,13 +8742,7 @@ reinit:
goto out;
}
- /*
- * Note: Some UFS 3.0 devices may still advertise UFS specification
- * version as 2.1. So let's also read the TX_HSGEAR_CAPABILITY from
- * device to know if device support HS-G4 or not.
- */
- if ((card.wspecversion >= 0x300 || ufshcd_is_g4_supported(hba)) &&
- !hba->reinit_g4_rate_A) {
+ if (card.wspecversion >= 0x300 && !hba->reinit_g4_rate_A) {
unsigned long flags;
int err;