Commit 1250c1a5 authored by Alexandre Oliva's avatar Alexandre Oliva Committed by Rafael J. Wysocki

cpufreq: loongson2_cpufreq: adjust cpufreq uses of LOONGSON_CHIPCFG

The post-fork cleanup of loongson2ef from loongson64 changed
LOONGSON_CHIPCFG from a single-argument functional macro to a
non-functional macro with an mmio address in loongson2ef, but
loongson2_cpufreq still uses the notation of a functional macro call
expecting it to be an lvalue.  Fixed based on loongson_suspend_enter.
Signed-off-by: default avatarAlexandre Oliva <lxoliva@fsfla.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 731e6b97
...@@ -144,9 +144,11 @@ static void loongson2_cpu_wait(void) ...@@ -144,9 +144,11 @@ static void loongson2_cpu_wait(void)
u32 cpu_freq; u32 cpu_freq;
spin_lock_irqsave(&loongson2_wait_lock, flags); spin_lock_irqsave(&loongson2_wait_lock, flags);
cpu_freq = LOONGSON_CHIPCFG(0); cpu_freq = readl(LOONGSON_CHIPCFG);
LOONGSON_CHIPCFG(0) &= ~0x7; /* Put CPU into wait mode */ /* Put CPU into wait mode */
LOONGSON_CHIPCFG(0) = cpu_freq; /* Restore CPU state */ writel(readl(LOONGSON_CHIPCFG) & ~0x7, LOONGSON_CHIPCFG);
/* Restore CPU state */
writel(cpu_freq, LOONGSON_CHIPCFG);
spin_unlock_irqrestore(&loongson2_wait_lock, flags); spin_unlock_irqrestore(&loongson2_wait_lock, flags);
local_irq_enable(); local_irq_enable();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment