board-dt-sama5.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Setup code for SAMA5 Evaluation Kits with Device Tree support
  3. *
  4. * Copyright (C) 2013 Atmel,
  5. * 2013 Ludovic Desroches <ludovic.desroches@atmel.com>
  6. *
  7. * Licensed under GPLv2 or later.
  8. */
  9. #include <linux/types.h>
  10. #include <linux/init.h>
  11. #include <linux/module.h>
  12. #include <linux/gpio.h>
  13. #include <linux/micrel_phy.h>
  14. #include <linux/of.h>
  15. #include <linux/of_irq.h>
  16. #include <linux/of_platform.h>
  17. #include <linux/phy.h>
  18. #include <linux/clk-provider.h>
  19. #include <asm/setup.h>
  20. #include <asm/irq.h>
  21. #include <asm/mach/arch.h>
  22. #include <asm/mach/map.h>
  23. #include <asm/mach/irq.h>
  24. #include "at91_aic.h"
  25. #include "generic.h"
  26. static void __init sama5_dt_device_init(void)
  27. {
  28. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  29. }
  30. static const char *sama5_dt_board_compat[] __initconst = {
  31. "atmel,sama5",
  32. NULL
  33. };
  34. DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
  35. /* Maintainer: Atmel */
  36. .map_io = at91_map_io,
  37. .init_early = at91_dt_initialize,
  38. .init_machine = sama5_dt_device_init,
  39. .dt_compat = sama5_dt_board_compat,
  40. MACHINE_END
  41. static const char *sama5_alt_dt_board_compat[] __initconst = {
  42. "atmel,sama5d4",
  43. NULL
  44. };
  45. DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5 (Device Tree)")
  46. /* Maintainer: Atmel */
  47. .map_io = at91_alt_map_io,
  48. .init_early = at91_dt_initialize,
  49. .init_machine = sama5_dt_device_init,
  50. .dt_compat = sama5_alt_dt_board_compat,
  51. .l2c_aux_mask = ~0UL,
  52. MACHINE_END