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

Commit 4f57554e authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

scsi: ufs: remove the query of ref_clk frequency



UFS device ref_clk frequency is set during the one time provisioning,
UFS driver just queries the reference clock frequency from device and
prints it out for informational purpose. Although this seems redundant
as incorrect reference clock frequency would anyway be detected during
bootup phase itself. This patch removes this redundant query and in turn
removes one message from going to serial console.

Change-Id: Id6a4d6d84b05f4b07b5299fd90e78e793e9689dc
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent a62caa4f
Loading
Loading
Loading
Loading
+0 −37
Original line number Diff line number Diff line
@@ -6426,33 +6426,6 @@ out:
	return ret;
}

/**
 * ufshcd_get_device_ref_clk - get the device bRefClkFreq
 * @hba: per-adapter instance
 *
 * Returns zero on success, non-zero error value on failure.
 */
static int ufshcd_get_device_ref_clk(struct ufs_hba *hba)
{
	int err = 0;
	int val = -1;
	char *arr[] = {"19.2 MHz", "26 MHz", "38.4 MHz", "52 MHz"};

	err = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
			QUERY_ATTR_IDN_REF_CLK_FREQ, 0, 0, &val);

	if (err || val >= ARRAY_SIZE(arr) || val < 0) {
		dev_err(hba->dev, "%s: err = %d, val = %d",
			 __func__, err, val);
		goto out;
	}

	dev_info(hba->dev, "%s: bRefClkFreq = %s", __func__, arr[val]);

out:
	return err;
}

/**
 * ufshcd_tune_pa_tactivate - Tunes PA_TActivate of local UniPro
 * @hba: per-adapter instance
@@ -6626,16 +6599,6 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
	if (ret)
		goto out;

	if (!hba->is_init_prefetch) {
		ret = ufshcd_get_device_ref_clk(hba);
		if (ret) {
			dev_err(hba->dev,
				"%s: Failed reading bRefClkFreq attribute\n",
				__func__);
			ret = 0;
		}
	}

	/* UFS device is also active now */
	ufshcd_set_ufs_dev_active(hba);
	ufshcd_force_reset_auto_bkops(hba);