Re: [PATCH v3 2/8] scsi: ufs: qcom: Pass target_freq to clk scale pre and post change
From: Bean Huo
Date: Mon Feb 03 2025 - 05:10:16 EST
On Mon, 2025-02-03 at 16:11 +0800, Ziqi Chen wrote:
> From: Can Guo <quic_cang@xxxxxxxxxxx>
>
> Instead of only two frequencies, if OPP V2 is used, the UFS devfreq
> clock
> scaling may scale the clock among multiple frequencies. In the case
> of
> scaling up, the devfreq may decide to scale the clock to an
> intermediate
> freq base on load,
based on load
> but the clock scale up pre change operation uses
> settings for the max clock freq unconditionally. Fix it by passing
> the
> target_freq to clock scale up pre change so that the correct settings
> for
> the target_freq can be used.
>
> In the case of scaling down, the clock scale down post change
> operation
> is doing fine, because it reads the actual clock rate to tell freq,
> but to
> keep symmetry with clock scale up pre change operation, just use the
> target_freq instead of reading clock rate.
>
> Signed-off-by: Can Guo <quic_cang@xxxxxxxxxxx>
> Co-developed-by: Ziqi Chen <quic_ziqichen@xxxxxxxxxxx>
> Signed-off-by: Ziqi Chen <quic_ziqichen@xxxxxxxxxxx>
agaion, no logic change, add my review tag:
Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>