Message ID | 20201028140847.1018-5-lukasz.luba@arm.com |
---|---|
State | New |
Headers | show |
Series | Add sustainable OPP concept | expand |
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 82fb3babff72..a8f3fa1d7f1e 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -669,6 +669,16 @@ static int scmi_dvfs_device_opps_add(const struct scmi_handle *handle, return ret; } } + + if (dom->sustained_freq_khz) { + /* The sustained frequency is always in kHz */ + freq = dom->sustained_freq_khz * 1000; + ret = dev_pm_opp_set_sustainable_opp_freq(dev, freq); + if (ret) + dev_warn(dev, "failed to add sustainable freq=%lu %d\n", + freq, ret); + } + return 0; }
Mark sustainable OPP frequency based on previously received value from the firmware. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> --- drivers/firmware/arm_scmi/perf.c | 10 ++++++++++ 1 file changed, 10 insertions(+)