]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq: apple-soc: Use 32-bit read for status register
authorNick Chan <towinchenmi@gmail.com>
Wed, 18 Dec 2024 18:25:06 +0000 (02:25 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 23 Dec 2024 10:56:46 +0000 (16:26 +0530)
Apple A7-A9(X) SoCs requires 32-bit reads on the status register. Newer
SoCs accepts 32-bit reads on the status register as well.

Signed-off-by: Nick Chan <towinchenmi@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/apple-soc-cpufreq.c

index 90e34105b50bda9309ffb5e724e3b1f1102bb3f8..b27d261fe5a68343705d549711ab8e244c791b30 100644 (file)
@@ -122,7 +122,7 @@ static unsigned int apple_soc_cpufreq_get_rate(unsigned int cpu)
        unsigned int pstate;
 
        if (priv->info->cur_pstate_mask) {
-               u64 reg = readq_relaxed(priv->reg_base + APPLE_DVFS_STATUS);
+               u32 reg = readl_relaxed(priv->reg_base + APPLE_DVFS_STATUS);
 
                pstate = (reg & priv->info->cur_pstate_mask) >>  priv->info->cur_pstate_shift;
        } else {