diff options
| author | Chen-Yu Tsai <wens@csie.org> | 2015-01-05 21:35:11 -0500 |
|---|---|---|
| committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2015-01-07 05:23:05 -0500 |
| commit | f91b7c62e0cdb8a1a72b61b16fcd48858a7d9193 (patch) | |
| tree | 36824b623bbdf0a44835b797436628ecd95d8c00 | |
| parent | b0f2faa5ca02358ebfe404801e2ad604dc88c471 (diff) | |
ARM: sunxi: Register cpufreq-dt for sun[45678]i
On sun[45678]i, we have one cluster of identical cores sharing a
clock, which is ideal for using cpufreq-dt. Register a platform
device for cpufreq-dt.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| -rw-r--r-- | arch/arm/mach-sunxi/sunxi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index d4bb2395d39c..1bc811a74a9f 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c | |||
| @@ -13,9 +13,15 @@ | |||
| 13 | #include <linux/clk-provider.h> | 13 | #include <linux/clk-provider.h> |
| 14 | #include <linux/clocksource.h> | 14 | #include <linux/clocksource.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/platform_device.h> | ||
| 16 | 17 | ||
| 17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
| 18 | 19 | ||
| 20 | static void __init sunxi_dt_cpufreq_init(void) | ||
| 21 | { | ||
| 22 | platform_device_register_simple("cpufreq-dt", -1, NULL, 0); | ||
| 23 | } | ||
| 24 | |||
| 19 | static const char * const sunxi_board_dt_compat[] = { | 25 | static const char * const sunxi_board_dt_compat[] = { |
| 20 | "allwinner,sun4i-a10", | 26 | "allwinner,sun4i-a10", |
| 21 | "allwinner,sun5i-a10s", | 27 | "allwinner,sun5i-a10s", |
| @@ -25,6 +31,7 @@ static const char * const sunxi_board_dt_compat[] = { | |||
| 25 | 31 | ||
| 26 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | 32 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") |
| 27 | .dt_compat = sunxi_board_dt_compat, | 33 | .dt_compat = sunxi_board_dt_compat, |
| 34 | .init_late = sunxi_dt_cpufreq_init, | ||
| 28 | MACHINE_END | 35 | MACHINE_END |
| 29 | 36 | ||
| 30 | static const char * const sun6i_board_dt_compat[] = { | 37 | static const char * const sun6i_board_dt_compat[] = { |
| @@ -45,6 +52,7 @@ static void __init sun6i_timer_init(void) | |||
| 45 | DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") | 52 | DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") |
| 46 | .init_time = sun6i_timer_init, | 53 | .init_time = sun6i_timer_init, |
| 47 | .dt_compat = sun6i_board_dt_compat, | 54 | .dt_compat = sun6i_board_dt_compat, |
| 55 | .init_late = sunxi_dt_cpufreq_init, | ||
| 48 | MACHINE_END | 56 | MACHINE_END |
| 49 | 57 | ||
| 50 | static const char * const sun7i_board_dt_compat[] = { | 58 | static const char * const sun7i_board_dt_compat[] = { |
| @@ -54,6 +62,7 @@ static const char * const sun7i_board_dt_compat[] = { | |||
| 54 | 62 | ||
| 55 | DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") | 63 | DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") |
| 56 | .dt_compat = sun7i_board_dt_compat, | 64 | .dt_compat = sun7i_board_dt_compat, |
| 65 | .init_late = sunxi_dt_cpufreq_init, | ||
| 57 | MACHINE_END | 66 | MACHINE_END |
| 58 | 67 | ||
| 59 | static const char * const sun8i_board_dt_compat[] = { | 68 | static const char * const sun8i_board_dt_compat[] = { |
| @@ -63,6 +72,7 @@ static const char * const sun8i_board_dt_compat[] = { | |||
| 63 | 72 | ||
| 64 | DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family") | 73 | DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family") |
| 65 | .dt_compat = sun8i_board_dt_compat, | 74 | .dt_compat = sun8i_board_dt_compat, |
| 75 | .init_late = sunxi_dt_cpufreq_init, | ||
| 66 | MACHINE_END | 76 | MACHINE_END |
| 67 | 77 | ||
| 68 | static const char * const sun9i_board_dt_compat[] = { | 78 | static const char * const sun9i_board_dt_compat[] = { |
