soc.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. extern struct at91_init_soc at91sam9n12_soc;
  22. static inline int at91_soc_is_enabled(void)
  23. {
  24. return at91_boot_soc.init != NULL;
  25. }
  26. #if !defined(CONFIG_SOC_AT91RM9200)
  27. #define at91rm9200_soc at91_boot_soc
  28. #endif
  29. #if !defined(CONFIG_SOC_AT91SAM9260)
  30. #define at91sam9260_soc at91_boot_soc
  31. #endif
  32. #if !defined(CONFIG_SOC_AT91SAM9261)
  33. #define at91sam9261_soc at91_boot_soc
  34. #endif
  35. #if !defined(CONFIG_SOC_AT91SAM9263)
  36. #define at91sam9263_soc at91_boot_soc
  37. #endif
  38. #if !defined(CONFIG_SOC_AT91SAM9G45)
  39. #define at91sam9g45_soc at91_boot_soc
  40. #endif
  41. #if !defined(CONFIG_SOC_AT91SAM9RL)
  42. #define at91sam9rl_soc at91_boot_soc
  43. #endif
  44. #if !defined(CONFIG_SOC_AT91SAM9X5)
  45. #define at91sam9x5_soc at91_boot_soc
  46. #endif
  47. #if !defined(CONFIG_SOC_AT91SAM9N12)
  48. #define at91sam9n12_soc at91_boot_soc
  49. #endif