mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: ufs-qcom: Add more rates to ufs_qcom_freq_to_gear_speed()
@ 2025-04-29 19:46 Konrad Dybcio
  2025-04-29 21:44 ` Konrad Dybcio
  0 siblings, 1 reply; 2+ messages in thread
From: Konrad Dybcio @ 2025-04-29 19:46 UTC (permalink / raw)
  To: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
	Peter Wang, Bean Huo, Can Guo, Ziqi Chen
  Cc: Marijn Suijten, linux-arm-msm, linux-scsi, linux-kernel, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Booting up -next on SDM845 results in a number of warnings like:

ufshc: ufs_qcom_freq_to_gear_speed: Unsupported clock freq : 50000000
ufshc: ufs_qcom_freq_to_gear_speed: Unsupported clock freq : 200000000

Add the rates to the switch statement to make the check happy.

Fixes: c02fe9e222d1 ("scsi: ufs: qcom: Implement the freq_to_gear_speed() vop")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/ufs/host/ufs-qcom.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 37887ec684127925e92e01d40f5ea6b8cdb7fc3c..6ddae865b35851b3b9d5bc5fd3720d06be0b2972 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -2104,6 +2104,7 @@ static u32 ufs_qcom_freq_to_gear_speed(struct ufs_hba *hba, unsigned long freq)
 		gear = UFS_HS_G4;
 		break;
 	case 201500000:
+	case 200000000:
 		gear = UFS_HS_G3;
 		break;
 	case 150000000:
@@ -2111,6 +2112,7 @@ static u32 ufs_qcom_freq_to_gear_speed(struct ufs_hba *hba, unsigned long freq)
 		gear = UFS_HS_G2;
 		break;
 	case 75000000:
+	case 50000000:
 	case 37500000:
 		gear = UFS_HS_G1;
 		break;

---
base-commit: 9d9096722447b77662d4237a09909bde7774f22e
change-id: 20250429-topic-ufs_sdm845-16892228f4db

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: ufs: ufs-qcom: Add more rates to ufs_qcom_freq_to_gear_speed()
  2025-04-29 19:46 [PATCH] scsi: ufs: ufs-qcom: Add more rates to ufs_qcom_freq_to_gear_speed() Konrad Dybcio
@ 2025-04-29 21:44 ` Konrad Dybcio
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Dybcio @ 2025-04-29 21:44 UTC (permalink / raw)
  To: Konrad Dybcio, Manivannan Sadhasivam, James E.J. Bottomley,
	Martin K. Petersen, Peter Wang, Bean Huo, Can Guo, Ziqi Chen
  Cc: Marijn Suijten, linux-arm-msm, linux-scsi, linux-kernel

On 4/29/25 9:46 PM, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Booting up -next on SDM845 results in a number of warnings like:
> 
> ufshc: ufs_qcom_freq_to_gear_speed: Unsupported clock freq : 50000000
> ufshc: ufs_qcom_freq_to_gear_speed: Unsupported clock freq : 200000000
> 
> Add the rates to the switch statement to make the check happy.
> 
> Fixes: c02fe9e222d1 ("scsi: ufs: qcom: Implement the freq_to_gear_speed() vop")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---

Please ignore, I was informed that the issue exists because we're checking
the frequency of the wrong clock, a fix for which will be posted by another
engineer soon

Konrad

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-29 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 19:46 [PATCH] scsi: ufs: ufs-qcom: Add more rates to ufs_qcom_freq_to_gear_speed() Konrad Dybcio
2025-04-29 21:44 ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®