summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-spear/spear1310.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-03-10 11:13:18 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-12 01:06:01 +0100
commit2449d33a40553504867f407dd713e9bcf6f9fe24 (patch)
tree86b3ce294a01a4a1c12dddb24d0ae5cd81a9c0a5 /arch/arm/mach-spear/spear1310.c
parentcpufreq: Remove unnecessary variable/parameter 'frozen' (diff)
downloadlinux-2449d33a40553504867f407dd713e9bcf6f9fe24.tar.xz
linux-2449d33a40553504867f407dd713e9bcf6f9fe24.zip
cpufreq: SPEAr: Instantiate as platform_driver
As multiplatform build is being adopted by more and more ARM platforms, initcall function should be used very carefully. For example, when SPEAr cpufreq driver is enabled on a kernel booted on a non-SPEAr board, we will get following boot time error: spear_cpufreq: Invalid cpufreq_tbl To eliminate this undesired the effect, the patch changes SPEAr driver to have it instantiated as a platform_driver. Then it will only run on platforms that create the platform_device "spear-cpufreq". This patch also creates platform node for SPEAr13xx boards. Reported-by: Josh Cartwright <joshc@codeaurora.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/arm/mach-spear/spear1310.c')
-rw-r--r--arch/arm/mach-spear/spear1310.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index 7ad003001ab7..824b12a56a42 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -28,6 +28,7 @@
static void __init spear1310_dt_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+ platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
}
static const char * const spear1310_dt_board_compat[] = {