soc.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. u32 extern_irq;
  9. unsigned int *default_irq_priority;
  10. void (*map_io)(void);
  11. void (*ioremap_registers)(void);
  12. void (*register_clocks)(void);
  13. void (*init)(void);
  14. };
  15. extern struct at91_init_soc at91_boot_soc;
  16. extern struct at91_init_soc at91rm9200_soc;
  17. extern struct at91_init_soc at91sam9260_soc;
  18. extern struct at91_init_soc at91sam9261_soc;
  19. extern struct at91_init_soc at91sam9263_soc;
  20. extern struct at91_init_soc at91sam9g45_soc;
  21. extern struct at91_init_soc at91sam9rl_soc;
  22. extern struct at91_init_soc at91sam9x5_soc;
  23. extern struct at91_init_soc at91sam9n12_soc;
  24. extern struct at91_init_soc sama5d3_soc;
  25. #define AT91_SOC_START(_name) \
  26. struct at91_init_soc __initdata _name##_soc \
  27. __used \
  28. = { \
  29. .builtin = 1, \
  30. #define AT91_SOC_END \
  31. };
  32. static inline int at91_soc_is_enabled(void)
  33. {
  34. return at91_boot_soc.builtin;
  35. }
  36. #if !defined(CONFIG_SOC_AT91RM9200)
  37. #define at91rm9200_soc at91_boot_soc
  38. #endif
  39. #if !defined(CONFIG_SOC_AT91SAM9260)
  40. #define at91sam9260_soc at91_boot_soc
  41. #endif
  42. #if !defined(CONFIG_SOC_AT91SAM9261)
  43. #define at91sam9261_soc at91_boot_soc
  44. #endif
  45. #if !defined(CONFIG_SOC_AT91SAM9263)
  46. #define at91sam9263_soc at91_boot_soc
  47. #endif
  48. #if !defined(CONFIG_SOC_AT91SAM9G45)
  49. #define at91sam9g45_soc at91_boot_soc
  50. #endif
  51. #if !defined(CONFIG_SOC_AT91SAM9RL)
  52. #define at91sam9rl_soc at91_boot_soc
  53. #endif
  54. #if !defined(CONFIG_SOC_AT91SAM9X5)
  55. #define at91sam9x5_soc at91_boot_soc
  56. #endif
  57. #if !defined(CONFIG_SOC_AT91SAM9N12)
  58. #define at91sam9n12_soc at91_boot_soc
  59. #endif
  60. #if !defined(CONFIG_SOC_SAMA5D3)
  61. #define sama5d3_soc at91_boot_soc
  62. #endif