OSDN Git Service

cpufreq: loongson2: fix regression related to clock management
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 5 Aug 2013 18:27:12 +0000 (21:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Aug 2013 05:59:06 +0000 (22:59 -0700)
commit4b0be00599c98bb20e0396f41f47a593e1c9d4ea
tree5320dc0b4680b56619832cb10c91d68cafce6c31
parent060a7c36d7ba82d7f520d7f328db5d38e99c20a4
cpufreq: loongson2: fix regression related to clock management

commit f54fe64d14dff3df6d45a48115d248a82557811f upstream.

Commit 42913c799 (MIPS: Loongson2: Use clk API instead of direct
dereferences) broke the cpufreq functionality on Loongson2 boards:
clk_set_rate() is called before the CPU frequency table is
initialized, and therefore will always fail.

Fix by moving the clk_set_rate() after the table initialization.
Tested on Lemote FuLoong mini-PC.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/loongson2_cpufreq.c