clk: qcom: smd-rpm: conditionally enable scaling before doing handover
authorLuca Weiss <luca@z3ntu.xyz>
Sat, 6 May 2023 20:10:32 +0000 (22:10 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 25 May 2023 04:47:17 +0000 (21:47 -0700)
commite9a2db5caf9f219d9cf570cb0965710344c85519
tree5c8f6102bbd70a1ffda2168e8e9c0e95df91fabd
parentbbd899f53412b79cbc46e7144437bb75302b1b80
clk: qcom: smd-rpm: conditionally enable scaling before doing handover

On older platforms like msm8226, msm8974 and msm8916 the driver in the
downstream kernel enables scaling first before doing the handover of the
clocks.

While this normally doesn't seem to cause noticeable problems, on
apq8026-asus-sparrow this causes the device to immediately reboot,
perhaps due to older rpm firmware that becomes unhappy.

On newer platforms the order has swapped and enabling scaling is done
after the handover, so let's introduce this behavior only conditionally
for msm8226 and msm8974 for now.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230506-rpmcc-scaling-handover-v1-1-374338a8dfd9@z3ntu.xyz
drivers/clk/qcom/clk-smd-rpm.c