0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <linux/clocksource.h>
0012 #include <linux/init.h>
0013 #include <linux/of_clk.h>
0014 #include <linux/platform_device.h>
0015 #include <linux/reset/sunxi.h>
0016
0017 #include <asm/mach/arch.h>
0018 #include <asm/secure_cntvoff.h>
0019
0020 static const char * const sunxi_board_dt_compat[] = {
0021 "allwinner,sun4i-a10",
0022 "allwinner,sun5i-a10s",
0023 "allwinner,sun5i-a13",
0024 "allwinner,sun5i-r8",
0025 "nextthing,gr8",
0026 NULL,
0027 };
0028
0029 DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families")
0030 .dt_compat = sunxi_board_dt_compat,
0031 MACHINE_END
0032
0033 static const char * const sun6i_board_dt_compat[] = {
0034 "allwinner,sun6i-a31",
0035 "allwinner,sun6i-a31s",
0036 NULL,
0037 };
0038
0039 static void __init sun6i_timer_init(void)
0040 {
0041 of_clk_init(NULL);
0042 if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
0043 sun6i_reset_init();
0044 timer_probe();
0045 }
0046
0047 DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
0048 .init_time = sun6i_timer_init,
0049 .dt_compat = sun6i_board_dt_compat,
0050 MACHINE_END
0051
0052 static const char * const sun7i_board_dt_compat[] = {
0053 "allwinner,sun7i-a20",
0054 NULL,
0055 };
0056
0057 DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
0058 .dt_compat = sun7i_board_dt_compat,
0059 MACHINE_END
0060
0061 static const char * const sun8i_board_dt_compat[] = {
0062 "allwinner,sun8i-a23",
0063 "allwinner,sun8i-a33",
0064 "allwinner,sun8i-h2-plus",
0065 "allwinner,sun8i-h3",
0066 "allwinner,sun8i-r40",
0067 "allwinner,sun8i-v3",
0068 "allwinner,sun8i-v3s",
0069 NULL,
0070 };
0071
0072 DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
0073 .init_time = sun6i_timer_init,
0074 .dt_compat = sun8i_board_dt_compat,
0075 MACHINE_END
0076
0077 static void __init sun8i_a83t_cntvoff_init(void)
0078 {
0079 #ifdef CONFIG_SMP
0080 secure_cntvoff_init();
0081 #endif
0082 }
0083
0084 static const char * const sun8i_a83t_cntvoff_board_dt_compat[] = {
0085 "allwinner,sun8i-a83t",
0086 NULL,
0087 };
0088
0089 DT_MACHINE_START(SUN8I_A83T_CNTVOFF_DT, "Allwinner A83t board")
0090 .init_early = sun8i_a83t_cntvoff_init,
0091 .init_time = sun6i_timer_init,
0092 .dt_compat = sun8i_a83t_cntvoff_board_dt_compat,
0093 MACHINE_END
0094
0095 static const char * const sun9i_board_dt_compat[] = {
0096 "allwinner,sun9i-a80",
0097 NULL,
0098 };
0099
0100 DT_MACHINE_START(SUN9I_DT, "Allwinner sun9i Family")
0101 .dt_compat = sun9i_board_dt_compat,
0102 MACHINE_END
0103
0104 static const char * const suniv_board_dt_compat[] = {
0105 "allwinner,suniv-f1c100s",
0106 NULL,
0107 };
0108
0109 DT_MACHINE_START(SUNIV_DT, "Allwinner suniv Family")
0110 .dt_compat = suniv_board_dt_compat,
0111 MACHINE_END