soc.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. #define AT91_SOC_START(_name) \
  24. struct at91_init_soc __initdata at91##_name##_soc \
  25. __used \
  26. = { \
  27. .builtin = 1, \
  28. #define AT91_SOC_END \
  29. };
  30. static inline int at91_soc_is_enabled(void)
  31. {
  32. return at91_boot_soc.builtin;
  33. }
  34. #if !defined(CONFIG_SOC_AT91RM9200)
  35. #define at91rm9200_soc at91_boot_soc
  36. #endif
  37. #if !defined(CONFIG_SOC_AT91SAM9260)
  38. #define at91sam9260_soc at91_boot_soc
  39. #endif
  40. #if !defined(CONFIG_SOC_AT91SAM9261)
  41. #define at91sam9261_soc at91_boot_soc
  42. #endif
  43. #if !defined(CONFIG_SOC_AT91SAM9263)
  44. #define at91sam9263_soc at91_boot_soc
  45. #endif
  46. #if !defined(CONFIG_SOC_AT91SAM9G45)
  47. #define at91sam9g45_soc at91_boot_soc
  48. #endif
  49. #if !defined(CONFIG_SOC_AT91SAM9RL)
  50. #define at91sam9rl_soc at91_boot_soc
  51. #endif
  52. #if !defined(CONFIG_SOC_AT91SAM9X5)
  53. #define at91sam9x5_soc at91_boot_soc
  54. #endif
  55. #if !defined(CONFIG_SOC_AT91SAM9N12)
  56. #define at91sam9n12_soc at91_boot_soc
  57. #endif