board-dt-sama5.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 "generic.h"
  25. static void __init sama5_dt_device_init(void)
  26. {
  27. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  28. }
  29. static const char *sama5_dt_board_compat[] __initconst = {
  30. "atmel,sama5",
  31. NULL
  32. };
  33. DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
  34. /* Maintainer: Atmel */
  35. .map_io = at91_map_io,
  36. .init_early = at91_dt_initialize,
  37. .init_machine = sama5_dt_device_init,
  38. .dt_compat = sama5_dt_board_compat,
  39. MACHINE_END
  40. static const char *sama5_alt_dt_board_compat[] __initconst = {
  41. "atmel,sama5d4",
  42. NULL
  43. };
  44. DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5 (Device Tree)")
  45. /* Maintainer: Atmel */
  46. .map_io = at91_alt_map_io,
  47. .init_early = at91_dt_initialize,
  48. .init_machine = sama5_dt_device_init,
  49. .dt_compat = sama5_alt_dt_board_compat,
  50. .l2c_aux_mask = ~0UL,
  51. MACHINE_END