soc.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 (*ioremap_registers)(void);
  10. void (*register_clocks)(void);
  11. void (*init)(void);
  12. };
  13. extern struct at91_init_soc at91_boot_soc;
  14. extern struct at91_init_soc at91rm9200_soc;
  15. extern struct at91_init_soc at91sam9260_soc;
  16. extern struct at91_init_soc at91sam9261_soc;
  17. extern struct at91_init_soc at91sam9263_soc;
  18. extern struct at91_init_soc at91sam9g45_soc;
  19. extern struct at91_init_soc at91sam9rl_soc;
  20. extern struct at91_init_soc at91sam9x5_soc;
  21. static inline int at91_soc_is_enabled(void)
  22. {
  23. return at91_boot_soc.init != NULL;
  24. }
  25. #if !defined(CONFIG_ARCH_AT91RM9200)
  26. #define at91rm9200_soc at91_boot_soc
  27. #endif
  28. #if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20))
  29. #define at91sam9260_soc at91_boot_soc
  30. #endif
  31. #if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10))
  32. #define at91sam9261_soc at91_boot_soc
  33. #endif
  34. #if !defined(CONFIG_ARCH_AT91SAM9263)
  35. #define at91sam9263_soc at91_boot_soc
  36. #endif
  37. #if !defined(CONFIG_ARCH_AT91SAM9G45)
  38. #define at91sam9g45_soc at91_boot_soc
  39. #endif
  40. #if !defined(CONFIG_ARCH_AT91SAM9RL)
  41. #define at91sam9rl_soc at91_boot_soc
  42. #endif
  43. #if !defined(CONFIG_ARCH_AT91SAM9X5)
  44. #define at91sam9x5_soc at91_boot_soc
  45. #endif