soc.h 1.9 KB

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