]>
Commit | Line | Data |
---|---|---|
3b52634f MR |
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 | ||
751b2ac4 MR |
13 | #include <linux/clk-provider.h> |
14 | #include <linux/clocksource.h> | |
d767af5e | 15 | #include <linux/init.h> |
3b52634f | 16 | |
3b52634f | 17 | #include <asm/mach/arch.h> |
bc34b5f2 | 18 | |
3b52634f | 19 | static const char * const sunxi_board_dt_compat[] = { |
43880f70 | 20 | "allwinner,sun4i-a10", |
81265dfb | 21 | "allwinner,sun5i-a10s", |
43880f70 | 22 | "allwinner,sun5i-a13", |
3b52634f MR |
23 | NULL, |
24 | }; | |
25 | ||
26 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | |
3b52634f MR |
27 | .dt_compat = sunxi_board_dt_compat, |
28 | MACHINE_END | |
91a31977 MR |
29 | |
30 | static const char * const sun6i_board_dt_compat[] = { | |
31 | "allwinner,sun6i-a31", | |
32 | NULL, | |
33 | }; | |
34 | ||
751b2ac4 MR |
35 | extern void __init sun6i_reset_init(void); |
36 | static void __init sun6i_timer_init(void) | |
37 | { | |
38 | of_clk_init(NULL); | |
e58cf019 AB |
39 | if (IS_ENABLED(CONFIG_RESET_CONTROLLER)) |
40 | sun6i_reset_init(); | |
751b2ac4 MR |
41 | clocksource_of_init(); |
42 | } | |
43 | ||
91a31977 | 44 | DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family") |
751b2ac4 | 45 | .init_time = sun6i_timer_init, |
91a31977 MR |
46 | .dt_compat = sun6i_board_dt_compat, |
47 | MACHINE_END | |
48 | ||
49 | static const char * const sun7i_board_dt_compat[] = { | |
50 | "allwinner,sun7i-a20", | |
51 | NULL, | |
52 | }; | |
53 | ||
54 | DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") | |
91a31977 | 55 | .dt_compat = sun7i_board_dt_compat, |
3b52634f | 56 | MACHINE_END |
ac84b79f CYT |
57 | |
58 | static const char * const sun8i_board_dt_compat[] = { | |
59 | "allwinner,sun8i-a23", | |
60 | NULL, | |
61 | }; | |
62 | ||
63 | DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family") | |
64 | .dt_compat = sun8i_board_dt_compat, | |
65 | MACHINE_END | |
3d4c2f1c CYT |
66 | |
67 | static const char * const sun9i_board_dt_compat[] = { | |
68 | "allwinner,sun9i-a80", | |
69 | NULL, | |
70 | }; | |
71 | ||
72 | DT_MACHINE_START(SUN9I_DT, "Allwinner sun9i Family") | |
73 | .dt_compat = sun9i_board_dt_compat, | |
74 | MACHINE_END |