]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Aug 2013 20:25:06 +0000 (22:25 +0200)
commit96f0e5fc86ab4ac93d495c8bc00d67be7654591f
treea0115b281230dbb0a1c3d50e95b81c64264e63c9
parented880b9baffd6d96a1025a205af229851349ff5d
cpufreq: loongson2: fix regression related to clock management

Commit 2e6b09544 (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>
Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/loongson2_cpufreq.c