soc.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  3. *
  4. * Under GPLv2
  5. */
  6. struct at91_init_soc {
  7. int builtin;
  8. unsigned int *default_irq_priority;
  9. void (*map_io)(void);
  10. void (*ioremap_registers)(void);
  11. void (*register_clocks)(void);
  12. void (*init)(void);
  13. };
  14. extern struct at91_init_soc at91_boot_soc;
  15. extern struct at91_init_soc at91rm9200_soc;
  16. extern struct at91_init_soc at91sam9260_soc;
  17. extern struct at91_init_soc at91sam9261_soc;
  18. extern struct at91_init_soc at91sam9263_soc;
  19. extern struct at91_init_soc at91sam9g45_soc;
  20. extern struct at91_init_soc at91sam9rl_soc;
  21. extern struct at91_init_soc at91sam9x5_soc;
  22. extern struct at91_init_soc at91sam9n12_soc;
  23. extern struct at91_init_soc sama5d3_soc;
  24. #define AT91_SOC_START(_name) \
  25. struct at91_init_soc __initdata _name##_soc \
  26. __used \
  27. = { \
  28. .builtin = 1, \
  29. #define AT91_SOC_END \
  30. };
  31. static inline int at91_soc_is_enabled(void)
  32. {
  33. return at91_boot_soc.builtin;
  34. }
  35. #if !defined(CONFIG_SOC_AT91RM9200)
  36. #define at91rm9200_soc at91_boot_soc
  37. #endif
  38. #if !defined(CONFIG_SOC_AT91SAM9260)
  39. #define at91sam9260_soc at91_boot_soc
  40. #endif
  41. #if !defined(CONFIG_SOC_AT91SAM9261)
  42. #define at91sam9261_soc at91_boot_soc
  43. #endif
  44. #if !defined(CONFIG_SOC_AT91SAM9263)
  45. #define at91sam9263_soc at91_boot_soc
  46. #endif
  47. #if !defined(CONFIG_SOC_AT91SAM9G45)
  48. #define at91sam9g45_soc at91_boot_soc
  49. #endif
  50. #if !defined(CONFIG_SOC_AT91SAM9RL)
  51. #define at91sam9rl_soc at91_boot_soc
  52. #endif
  53. #if !defined(CONFIG_SOC_AT91SAM9X5)
  54. #define at91sam9x5_soc at91_boot_soc
  55. #endif
  56. #if !defined(CONFIG_SOC_AT91SAM9N12)
  57. #define at91sam9n12_soc at91_boot_soc
  58. #endif
  59. #if !defined(CONFIG_SOC_SAMA5D3)
  60. #define sama5d3_soc at91_boot_soc
  61. #endif