soc.h 1.7 KB

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