omap_hwmod_2430_data.c 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2010 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include "omap_hwmod_common_data.h"
  19. #include "prm-regbits-24xx.h"
  20. #include "cm-regbits-24xx.h"
  21. /*
  22. * OMAP2430 hardware module integration data
  23. *
  24. * ALl of the data in this section should be autogeneratable from the
  25. * TI hardware database or other technical documentation. Data that
  26. * is driver-specific or driver-kernel integration-specific belongs
  27. * elsewhere.
  28. */
  29. static struct omap_hwmod omap2430_mpu_hwmod;
  30. static struct omap_hwmod omap2430_iva_hwmod;
  31. static struct omap_hwmod omap2430_l3_main_hwmod;
  32. static struct omap_hwmod omap2430_l4_core_hwmod;
  33. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  34. /* L3 -> L4_CORE interface */
  35. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  36. .master = &omap2430_l3_main_hwmod,
  37. .slave = &omap2430_l4_core_hwmod,
  38. .user = OCP_USER_MPU | OCP_USER_SDMA,
  39. };
  40. /* MPU -> L3 interface */
  41. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  42. .master = &omap2430_mpu_hwmod,
  43. .slave = &omap2430_l3_main_hwmod,
  44. .user = OCP_USER_MPU,
  45. };
  46. /* Slave interfaces on the L3 interconnect */
  47. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  48. &omap2430_mpu__l3_main,
  49. };
  50. /* Master interfaces on the L3 interconnect */
  51. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  52. &omap2430_l3_main__l4_core,
  53. };
  54. /* L3 */
  55. static struct omap_hwmod omap2430_l3_main_hwmod = {
  56. .name = "l3_main",
  57. .class = &l3_hwmod_class,
  58. .masters = omap2430_l3_main_masters,
  59. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  60. .slaves = omap2430_l3_main_slaves,
  61. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  62. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  63. .flags = HWMOD_NO_IDLEST,
  64. };
  65. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  66. /* L4_CORE -> L4_WKUP interface */
  67. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  68. .master = &omap2430_l4_core_hwmod,
  69. .slave = &omap2430_l4_wkup_hwmod,
  70. .user = OCP_USER_MPU | OCP_USER_SDMA,
  71. };
  72. /* Slave interfaces on the L4_CORE interconnect */
  73. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  74. &omap2430_l3_main__l4_core,
  75. };
  76. /* Master interfaces on the L4_CORE interconnect */
  77. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  78. &omap2430_l4_core__l4_wkup,
  79. };
  80. /* L4 CORE */
  81. static struct omap_hwmod omap2430_l4_core_hwmod = {
  82. .name = "l4_core",
  83. .class = &l4_hwmod_class,
  84. .masters = omap2430_l4_core_masters,
  85. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  86. .slaves = omap2430_l4_core_slaves,
  87. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  88. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  89. .flags = HWMOD_NO_IDLEST,
  90. };
  91. /* Slave interfaces on the L4_WKUP interconnect */
  92. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  93. &omap2430_l4_core__l4_wkup,
  94. };
  95. /* Master interfaces on the L4_WKUP interconnect */
  96. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  97. };
  98. /* L4 WKUP */
  99. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  100. .name = "l4_wkup",
  101. .class = &l4_hwmod_class,
  102. .masters = omap2430_l4_wkup_masters,
  103. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  104. .slaves = omap2430_l4_wkup_slaves,
  105. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  106. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  107. .flags = HWMOD_NO_IDLEST,
  108. };
  109. /* Master interfaces on the MPU device */
  110. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  111. &omap2430_mpu__l3_main,
  112. };
  113. /* MPU */
  114. static struct omap_hwmod omap2430_mpu_hwmod = {
  115. .name = "mpu",
  116. .class = &mpu_hwmod_class,
  117. .main_clk = "mpu_ck",
  118. .masters = omap2430_mpu_masters,
  119. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  120. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  121. };
  122. /*
  123. * IVA2_1 interface data
  124. */
  125. /* IVA2 <- L3 interface */
  126. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  127. .master = &omap2430_l3_main_hwmod,
  128. .slave = &omap2430_iva_hwmod,
  129. .clk = "dsp_fck",
  130. .user = OCP_USER_MPU | OCP_USER_SDMA,
  131. };
  132. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  133. &omap2430_l3__iva,
  134. };
  135. /*
  136. * IVA2 (IVA2)
  137. */
  138. static struct omap_hwmod omap2430_iva_hwmod = {
  139. .name = "iva",
  140. .class = &iva_hwmod_class,
  141. .masters = omap2430_iva_masters,
  142. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  143. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  144. };
  145. /* l4_wkup -> wd_timer2 */
  146. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  147. {
  148. .pa_start = 0x49016000,
  149. .pa_end = 0x4901607f,
  150. .flags = ADDR_TYPE_RT
  151. },
  152. };
  153. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  154. .master = &omap2430_l4_wkup_hwmod,
  155. .slave = &omap2430_wd_timer2_hwmod,
  156. .clk = "mpu_wdt_ick",
  157. .addr = omap2430_wd_timer2_addrs,
  158. .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
  159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  160. };
  161. /*
  162. * 'wd_timer' class
  163. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  164. * overflow condition
  165. */
  166. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  167. .rev_offs = 0x0,
  168. .sysc_offs = 0x0010,
  169. .syss_offs = 0x0014,
  170. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  171. SYSC_HAS_AUTOIDLE),
  172. .sysc_fields = &omap_hwmod_sysc_type1,
  173. };
  174. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  175. .name = "wd_timer",
  176. .sysc = &omap2430_wd_timer_sysc,
  177. };
  178. /* wd_timer2 */
  179. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  180. &omap2430_l4_wkup__wd_timer2,
  181. };
  182. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  183. .name = "wd_timer2",
  184. .class = &omap2430_wd_timer_hwmod_class,
  185. .main_clk = "mpu_wdt_fck",
  186. .prcm = {
  187. .omap2 = {
  188. .prcm_reg_id = 1,
  189. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  190. .module_offs = WKUP_MOD,
  191. .idlest_reg_id = 1,
  192. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  193. },
  194. },
  195. .slaves = omap2430_wd_timer2_slaves,
  196. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  197. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  198. };
  199. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  200. &omap2430_l3_main_hwmod,
  201. &omap2430_l4_core_hwmod,
  202. &omap2430_l4_wkup_hwmod,
  203. &omap2430_mpu_hwmod,
  204. &omap2430_iva_hwmod,
  205. &omap2430_wd_timer2_hwmod,
  206. NULL,
  207. };
  208. int __init omap2430_hwmod_init(void)
  209. {
  210. return omap_hwmod_init(omap2430_hwmods);
  211. }