Merge tag 'mac80211-for-davem-2016-02-23' of git://git.kernel.org/pub/scm/linux/kerne...
[deliverable/linux.git] / arch / arm / mach-sunxi / sunxi.c
... / ...
CommitLineData
1/*
2 * Device Tree support for Allwinner A1X SoCs
3 *
4 * Copyright (C) 2012 Maxime Ripard
5 *
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/clk-provider.h>
14#include <linux/clocksource.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17
18#include <asm/mach/arch.h>
19
20static void __init sunxi_dt_cpufreq_init(void)
21{
22 platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
23}
24
25static const char * const sunxi_board_dt_compat[] = {
26 "allwinner,sun4i-a10",
27 "allwinner,sun5i-a10s",
28 "allwinner,sun5i-a13",
29 "allwinner,sun5i-r8",
30 NULL,
31};
32
33DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families")
34 .dt_compat = sunxi_board_dt_compat,
35 .init_late = sunxi_dt_cpufreq_init,
36MACHINE_END
37
38static const char * const sun6i_board_dt_compat[] = {
39 "allwinner,sun6i-a31",
40 "allwinner,sun6i-a31s",
41 NULL,
42};
43
44extern void __init sun6i_reset_init(void);
45static void __init sun6i_timer_init(void)
46{
47 of_clk_init(NULL);
48 if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
49 sun6i_reset_init();
50 clocksource_probe();
51}
52
53DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
54 .init_time = sun6i_timer_init,
55 .dt_compat = sun6i_board_dt_compat,
56 .init_late = sunxi_dt_cpufreq_init,
57MACHINE_END
58
59static const char * const sun7i_board_dt_compat[] = {
60 "allwinner,sun7i-a20",
61 NULL,
62};
63
64DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
65 .dt_compat = sun7i_board_dt_compat,
66 .init_late = sunxi_dt_cpufreq_init,
67MACHINE_END
68
69static const char * const sun8i_board_dt_compat[] = {
70 "allwinner,sun8i-a23",
71 "allwinner,sun8i-a33",
72 "allwinner,sun8i-h3",
73 NULL,
74};
75
76DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
77 .init_time = sun6i_timer_init,
78 .dt_compat = sun8i_board_dt_compat,
79 .init_late = sunxi_dt_cpufreq_init,
80MACHINE_END
81
82static const char * const sun9i_board_dt_compat[] = {
83 "allwinner,sun9i-a80",
84 NULL,
85};
86
87DT_MACHINE_START(SUN9I_DT, "Allwinner sun9i Family")
88 .dt_compat = sun9i_board_dt_compat,
89MACHINE_END
This page took 0.119554 seconds and 5 git commands to generate.