Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2275a311 authored by Subhash Jadavani's avatar Subhash Jadavani Committed by Can Guo
Browse files

scsi: ufs-qcom: disable low power modes and run slow on newer controller



Newer UFS controllers (revision 2) still need to be validated properly
hence disable the low power modes for it until they are validated
thoroughly.
Also run the UFS interface in PWM gear until High Speed Gear operation
is stabililized.

Change-Id: I310b49030d084557f487f3095fc7e1cfa68335e6
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
[cang@codeaurora.org: Resolved trivial merge conflicts]
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 408b9f05
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -1093,6 +1093,13 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
				ufs_qcom_cap.hs_rx_gear = UFS_HS_G2;
		}

		/*
		 * Until High Speed gear mode is stabilized, operate in PWM gear
		 * mode for newer controller versions.
		 */
		if (host->hw_ver.major >= 0x2)
			ufs_qcom_cap.desired_working_mode = SLOW;

		ret = ufs_qcom_get_pwr_dev_param(&ufs_qcom_cap,
						 dev_max_params,
						 dev_req_params);
@@ -1224,10 +1231,13 @@ static void ufs_qcom_set_caps(struct ufs_hba *hba)
{
	struct ufs_qcom_host *host = ufshcd_get_variant(hba);

	hba->caps |= UFSHCD_CAP_CLK_GATING | UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
	if (host->hw_ver.major < 0x2) {
		hba->caps |= UFSHCD_CAP_CLK_GATING;
		hba->caps |= UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
		hba->caps |= UFSHCD_CAP_CLK_SCALING;
		hba->caps |= UFSHCD_CAP_AUTO_BKOPS_SUSPEND;
		hba->caps |= UFSHCD_CAP_HIBERN8_ENTER_ON_IDLE;
	}

	if (host->hw_ver.major >= 0x2) {
		host->caps = UFS_QCOM_CAP_QUNIPRO |