PM / devfreq: Make max_freq node read only

There seems to be a problem where ddr speeds are extremely slow
while running memcpy tests i found out that the max freq of llcc-ddr-bw and cpu-llc-bw
are capped to a lower frequency. Upon further discovery i found out that the
qcom init script is responsible for altering the min and max freq of the bus.

So lets just avoid anything from overriding maximum frequency of devfreq

Note: max_freq_store is now unused

Tests: Check frequency using
cat /sys/devices/platform/soc/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw/available_frequencies
cat /sys/devices/platform/soc/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw/available_frequencies
cat /sys/devices/platform/soc/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw/max_freq
cat /sys/devices/platform/soc/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw/max_freq

Change-Id: I377eb6b49fa530fe3dfa8c2009e1f69b9769fc24
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
UtsavBalar1231 2022-06-15 06:33:12 +00:00 committed by spakkkk
parent 0a8d56da65
commit ae13e506c9

View File

@ -1255,7 +1255,7 @@ static ssize_t min_freq_show(struct device *dev, struct device_attribute *attr,
return sprintf(buf, "%lu\n", MAX(df->scaling_min_freq, df->min_freq));
}
static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr,
static ssize_t __maybe_unused max_freq_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct devfreq *df = to_devfreq(dev);
@ -1301,7 +1301,7 @@ static ssize_t max_freq_show(struct device *dev, struct device_attribute *attr,
return sprintf(buf, "%lu\n", MIN(df->scaling_max_freq, df->max_freq));
}
static DEVICE_ATTR_RW(max_freq);
static DEVICE_ATTR_RO(max_freq);
static ssize_t available_frequencies_show(struct device *d,
struct device_attribute *attr,