MIPS/loongson2_cpufreq: Fix CPU clock rate setting
authorAaro Koskinen <aaro.koskinen@iki.fi>
Thu, 3 Apr 2014 19:24:01 +0000 (22:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:07 +0000 (10:28 -0700)
commit4236d29b5fc3e32a6c00ddf7ccf53ce5786730a8
tree49e6237d3001556e2c8ecddd9d29b8f6d80c0004
parent7c3b5654c06c68470c446f96c6ba9b939c67771e
MIPS/loongson2_cpufreq: Fix CPU clock rate setting

commit 8e8acb32960f42c81b1d50deac56a2c07bb6a18a upstream.

Loongson2 has been using (incorrectly) kHz for cpu_clk rate. This has
been unnoticed, as loongson2_cpufreq was the only place where the rate
was set/get. After commit 652ed95d5fa6074b3c4ea245deb0691f1acb6656
(cpufreq: introduce cpufreq_generic_get() routine) things however broke,
and now loops_per_jiffy adjustments are incorrect (1000 times too long).
The patch fixes this by changing cpu_clk rate to Hz.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: cpufreq@vger.kernel.org
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Patchwork: https://patchwork.linux-mips.org/patch/6678/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/loongson/lemote-2f/clock.c
drivers/cpufreq/loongson2_cpufreq.c