sunxi.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #include <linux/clk-provider.h>
  13. #include <linux/clocksource.h>
  14. #include <linux/init.h>
  15. #include <asm/mach/arch.h>
  16. static const char * const sunxi_board_dt_compat[] = {
  17. "allwinner,sun4i-a10",
  18. "allwinner,sun5i-a10s",
  19. "allwinner,sun5i-a13",
  20. NULL,
  21. };
  22. DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
  23. .dt_compat = sunxi_board_dt_compat,
  24. MACHINE_END
  25. static const char * const sun6i_board_dt_compat[] = {
  26. "allwinner,sun6i-a31",
  27. NULL,
  28. };
  29. extern void __init sun6i_reset_init(void);
  30. static void __init sun6i_timer_init(void)
  31. {
  32. of_clk_init(NULL);
  33. if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
  34. sun6i_reset_init();
  35. clocksource_of_init();
  36. }
  37. DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
  38. .init_time = sun6i_timer_init,
  39. .dt_compat = sun6i_board_dt_compat,
  40. MACHINE_END
  41. static const char * const sun7i_board_dt_compat[] = {
  42. "allwinner,sun7i-a20",
  43. NULL,
  44. };
  45. DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
  46. .dt_compat = sun7i_board_dt_compat,
  47. MACHINE_END
  48. static const char * const sun8i_board_dt_compat[] = {
  49. "allwinner,sun8i-a23",
  50. NULL,
  51. };
  52. DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i (A23) Family")
  53. .dt_compat = sun8i_board_dt_compat,
  54. MACHINE_END