1fea44f8e8d05f91209022424a0e0d1b1a134cf0
[openwrt/openwrt.git] / target / linux / mvebu / patches-3.18 / 150-use_the_cpufreq-dt_platform_data_for_independent_clocks.patch
1 From 842f7d2c4d392c0571cf72e3eaca26742bebbd1e Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Tue, 2 Dec 2014 17:48:02 +0100
4 Subject: ARM: mvebu: use the cpufreq-dt platform_data for independent clocks
5
6 This commit adjusts the registration of the cpufreq-dt driver in the
7 mvebu platform to indicate to the cpufreq driver that the platform has
8 independent clocks for each CPU.
9
10 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 Acked-by: Jason Cooper <jason@lakedaemon.net>
12 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
13
14 --- a/arch/arm/mach-mvebu/pmsu.c
15 +++ b/arch/arm/mach-mvebu/pmsu.c
16 @@ -20,6 +20,7 @@
17
18 #include <linux/clk.h>
19 #include <linux/cpu_pm.h>
20 +#include <linux/cpufreq-dt.h>
21 #include <linux/delay.h>
22 #include <linux/init.h>
23 #include <linux/io.h>
24 @@ -586,6 +587,10 @@ int mvebu_pmsu_dfs_request(int cpu)
25 return 0;
26 }
27
28 +struct cpufreq_dt_platform_data cpufreq_dt_pd = {
29 + .independent_clocks = true,
30 +};
31 +
32 static int __init armada_xp_pmsu_cpufreq_init(void)
33 {
34 struct device_node *np;
35 @@ -658,7 +663,8 @@ static int __init armada_xp_pmsu_cpufreq
36 }
37 }
38
39 - platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
40 + platform_device_register_data(NULL, "cpufreq-dt", -1,
41 + &cpufreq_dt_pd, sizeof(cpufreq_dt_pd));
42 return 0;
43 }
44