Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: qcom-cpufreq-nvmem: fix reading of PVS Valid fuse

The fuse consists of 64 bits, with this statement we're supposed to get
the upper 32 bits but it actually read out of bounds and got 0 instead
of the desired value which lead to the "PVS bin not set." codepath being
run resetting our pvs value.

Fixes: a8811ec764f9 ("cpufreq: qcom: Add support for krait based socs")
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Luca Weiss and committed by
Viresh Kumar
4a8a77ab b48cd0d1

+1 -1
+1 -1
drivers/cpufreq/qcom-cpufreq-nvmem.c
··· 130 130 } 131 131 132 132 /* Check PVS_BLOW_STATUS */ 133 - pte_efuse = *(((u32 *)buf) + 4); 133 + pte_efuse = *(((u32 *)buf) + 1); 134 134 pte_efuse &= BIT(21); 135 135 if (pte_efuse) { 136 136 dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs);