soc.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  3. *
  4. * Under GPLv2
  5. */
  6. struct at91_init_soc {
  7. unsigned int *default_irq_priority;
  8. void (*map_io)(void);
  9. void (*init)(void);
  10. };
  11. extern struct at91_init_soc at91_boot_soc;
  12. extern struct at91_init_soc at91cap9_soc;
  13. extern struct at91_init_soc at91rm9200_soc;
  14. extern struct at91_init_soc at91sam9260_soc;
  15. extern struct at91_init_soc at91sam9261_soc;
  16. extern struct at91_init_soc at91sam9263_soc;
  17. extern struct at91_init_soc at91sam9g45_soc;
  18. extern struct at91_init_soc at91sam9rl_soc;
  19. extern struct at91_init_soc at91sam9x5_soc;
  20. static inline int at91_soc_is_enabled(void)
  21. {
  22. return at91_boot_soc.init != NULL;
  23. }
  24. #if !defined(CONFIG_ARCH_AT91CAP9)
  25. #define at91cap9_soc at91_boot_soc
  26. #endif
  27. #if !defined(CONFIG_ARCH_AT91RM9200)
  28. #define at91rm9200_soc at91_boot_soc
  29. #endif
  30. #if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20))
  31. #define at91sam9260_soc at91_boot_soc
  32. #endif
  33. #if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10))
  34. #define at91sam9261_soc at91_boot_soc
  35. #endif
  36. #if !defined(CONFIG_ARCH_AT91SAM9263)
  37. #define at91sam9263_soc at91_boot_soc
  38. #endif
  39. #if !defined(CONFIG_ARCH_AT91SAM9G45)
  40. #define at91sam9g45_soc at91_boot_soc
  41. #endif
  42. #if !defined(CONFIG_ARCH_AT91SAM9RL)
  43. #define at91sam9rl_soc at91_boot_soc
  44. #endif
  45. #if !defined(CONFIG_ARCH_AT91SAM9X5)
  46. #define at91sam9x5_soc at91_boot_soc
  47. #endif