From: Nick Chan Date: Wed, 18 Dec 2024 18:25:06 +0000 (+0800) Subject: cpufreq: apple-soc: Use 32-bit read for status register X-Git-Tag: v6.14-rc1~148^2~2^2^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55aac9f570b0f8a300a9b0128620ced15c4742d8;p=thirdparty%2Fkernel%2Flinux.git cpufreq: apple-soc: Use 32-bit read for status register 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 Signed-off-by: Viresh Kumar --- diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c index 90e34105b50bd..b27d261fe5a68 100644 --- a/drivers/cpufreq/apple-soc-cpufreq.c +++ b/drivers/cpufreq/apple-soc-cpufreq.c @@ -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 {