]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: ufs: core: Enable multi-level gear scaling
authorCan Guo <quic_cang@quicinc.com>
Thu, 13 Feb 2025 08:00:05 +0000 (16:00 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 21 Feb 2025 02:53:49 +0000 (21:53 -0500)
commit129b44c27c8a51cb74b2f68fde57f2a2e7f5696b
tree4c36f6b5ebf7e6e877d02c44b2cfcb4c40561692
parentc02fe9e222d16bed8c270608c42f77bc62562ac3
scsi: ufs: core: Enable multi-level gear scaling

With OPP V2 enabled, devfreq can scale clocks amongst multiple frequency
plans. However, the gear speed is only toggled between min and max during
clock scaling. Enable multi-level gear scaling by mapping clock frequencies
to gear speeds, so that when devfreq scales clock frequencies we can put
the UFS link at the appropriate gear speeds accordingly.

Signed-off-by: Can Guo <quic_cang@quicinc.com>
Co-developed-by: Ziqi Chen <quic_ziqichen@quicinc.com>
Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com>
Link: https://lore.kernel.org/r/20250213080008.2984807-6-quic_ziqichen@quicinc.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c