public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Bug fixes for UFS multi-frequency scaling on Qcom platform
@ 2025-05-22  2:15 Ziqi Chen
  2025-05-22  2:15 ` [PATCH v4 1/3] scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear() Ziqi Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ziqi Chen @ 2025-05-22  2:15 UTC (permalink / raw)
  To: quic_cang, bvanassche, mani, beanhuo, avri.altman, junwoo80.lee,
	martin.petersen, quic_ziqichen, quic_nguyenb, quic_nitirawa,
	quic_rampraka, neil.armstrong, luca.weiss, konrad.dybcio,
	peter.wang
  Cc: linux-arm-msm, linux-scsi, Loïc Minier

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2642 bytes --]

This series fixes a few corner cases introduced by multi-frequency scaling feature
on some old Qcom platforms design.

This series should be applied since 6.15/scsi-queue to fix the bugs of series
https://lore.kernel.org/all/20250213080008.2984807-1-quic_ziqichen@quicinc.com/
"Support Multi-frequency scale for UFS".

1. On some platforms, the frequency tables for unipro clock and the core clock are different,
   which has led to errors when handling the unipro clock.

2. On some platforms, the maximum gear supported by the host may exceed the maximum gear
   supported by connected UFS device. Therefore, this should be taken into account when
   find mapped gear for frequency.

This series has been tested on below platforms -
sm8550 mtp + UFS3.1
SM8650 MTP + UFS3.1
QCS6490 BR3GEN2 + UFS2.2

For change "scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear()"
Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Closes: https://lore.kernel.org/all/c7f2476a-943a-4d73-ad80-802c91e5f880@linaro.org/
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on RB3GEN2
Tested-By: Loïc Minier <loic.minier@oss.qualcomm.com> # on RB3GEN2

For change "scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq"
           "scsi: ufs: qcom: Call ufs_qcom_cfg_timers() in clock scaling path"

Reported-by: Luca Weiss <luca.weiss@fairphone.com>
Closes: https://lore.kernel.org/linux-arm-msm/D9FZ9U3AEXW4.1I12FX3YQ3JPW@fairphone.com/
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4
Tested-By: Loïc Minier <loic.minier@oss.qualcomm.com> # on RB3GEN2


v1 - > v2:
Change "scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear()":
1. Instead of return 'gear', return '0' directly if didn't find mapped gear
2. Derectly return min_t(gear,max_gear) instead assign to 'gear' then return it.

v2 - > v3:
Change "scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear()":
  Replace hard code '0' with enum 'UFS_HS_DONT_CHANGE'.

Change "scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq"
1. Skip calling ufs_qcom_opp_freq_to_clk_freq() if freq is ULONG_MAX to avoid useless error prints.
2. Correct indentation size to follow Linux kernel coding style.

v3 -> v4:
Rebased to branch 6.15/scsi-queue.

Can Guo (2):
  scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq
  scsi: ufs: qcom: Call ufs_qcom_cfg_timers() in clock scaling path

Ziqi Chen (1):
  scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear()

 drivers/ufs/host/ufs-qcom.c | 136 +++++++++++++++++++++++++++---------
 1 file changed, 103 insertions(+), 33 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-05-28  2:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  2:15 [PATCH v4 0/3] Bug fixes for UFS multi-frequency scaling on Qcom platform Ziqi Chen
2025-05-22  2:15 ` [PATCH v4 1/3] scsi: ufs: qcom: Check gear against max gear in vop freq_to_gear() Ziqi Chen
2025-05-22  2:15 ` [PATCH v4 2/3] scsi: ufs: qcom: Map devfreq OPP freq to UniPro Core Clock freq Ziqi Chen
2025-05-22  2:15 ` [PATCH v4 3/3] scsi: ufs: qcom: Call ufs_qcom_cfg_timers() in clock scaling path Ziqi Chen
2025-05-28  2:15 ` [PATCH v4 0/3] Bug fixes for UFS multi-frequency scaling on Qcom platform Martin K. Petersen

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