omap_hwmod_2xxx_3xxx_ipblock_data.c 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. /*
  2. * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3
  3. *
  4. * Copyright (C) 2011 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. #include <plat/omap_hwmod.h>
  12. #include <plat/serial.h>
  13. #include <plat/dma.h>
  14. #include <mach/irqs.h>
  15. #include "omap_hwmod_common_data.h"
  16. /* UART */
  17. static struct omap_hwmod_class_sysconfig omap2_uart_sysc = {
  18. .rev_offs = 0x50,
  19. .sysc_offs = 0x54,
  20. .syss_offs = 0x58,
  21. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  22. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  23. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  24. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  25. .sysc_fields = &omap_hwmod_sysc_type1,
  26. };
  27. struct omap_hwmod_class omap2_uart_class = {
  28. .name = "uart",
  29. .sysc = &omap2_uart_sysc,
  30. };
  31. /*
  32. * 'dss' class
  33. * display sub-system
  34. */
  35. static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
  36. .rev_offs = 0x0000,
  37. .sysc_offs = 0x0010,
  38. .syss_offs = 0x0014,
  39. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  40. .sysc_fields = &omap_hwmod_sysc_type1,
  41. };
  42. struct omap_hwmod_class omap2_dss_hwmod_class = {
  43. .name = "dss",
  44. .sysc = &omap2_dss_sysc,
  45. };
  46. /*
  47. * 'dispc' class
  48. * display controller
  49. */
  50. static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
  51. .rev_offs = 0x0000,
  52. .sysc_offs = 0x0010,
  53. .syss_offs = 0x0014,
  54. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  55. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  56. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  57. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  58. .sysc_fields = &omap_hwmod_sysc_type1,
  59. };
  60. struct omap_hwmod_class omap2_dispc_hwmod_class = {
  61. .name = "dispc",
  62. .sysc = &omap2_dispc_sysc,
  63. };
  64. /*
  65. * 'rfbi' class
  66. * remote frame buffer interface
  67. */
  68. static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
  69. .rev_offs = 0x0000,
  70. .sysc_offs = 0x0010,
  71. .syss_offs = 0x0014,
  72. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  73. SYSC_HAS_AUTOIDLE),
  74. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  75. .sysc_fields = &omap_hwmod_sysc_type1,
  76. };
  77. struct omap_hwmod_class omap2_rfbi_hwmod_class = {
  78. .name = "rfbi",
  79. .sysc = &omap2_rfbi_sysc,
  80. };
  81. /*
  82. * 'venc' class
  83. * video encoder
  84. */
  85. struct omap_hwmod_class omap2_venc_hwmod_class = {
  86. .name = "venc",
  87. };
  88. /* Common DMA request line data */
  89. struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
  90. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  91. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  92. { .dma_req = -1 }
  93. };
  94. struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
  95. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  96. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  97. { .dma_req = -1 }
  98. };
  99. struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
  100. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  101. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  102. { .dma_req = -1 }
  103. };
  104. struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
  105. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  106. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  107. { .dma_req = -1 }
  108. };
  109. struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
  110. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  111. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  112. { .dma_req = -1 }
  113. };
  114. struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[] = {
  115. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  116. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  117. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  118. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  119. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  120. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  121. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  122. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  123. { .dma_req = -1 }
  124. };
  125. struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[] = {
  126. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  127. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  128. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  129. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  130. { .dma_req = -1 }
  131. };
  132. struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[] = {
  133. { .name = "rx", .dma_req = 32 },
  134. { .name = "tx", .dma_req = 31 },
  135. { .dma_req = -1 }
  136. };
  137. struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[] = {
  138. { .name = "rx", .dma_req = 34 },
  139. { .name = "tx", .dma_req = 33 },
  140. { .dma_req = -1 }
  141. };
  142. struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[] = {
  143. { .name = "rx", .dma_req = 18 },
  144. { .name = "tx", .dma_req = 17 },
  145. { .dma_req = -1 }
  146. };
  147. /* Other IP block data */
  148. /*
  149. * omap_hwmod class data
  150. */
  151. struct omap_hwmod_class l3_hwmod_class = {
  152. .name = "l3"
  153. };
  154. struct omap_hwmod_class l4_hwmod_class = {
  155. .name = "l4"
  156. };
  157. struct omap_hwmod_class mpu_hwmod_class = {
  158. .name = "mpu"
  159. };
  160. struct omap_hwmod_class iva_hwmod_class = {
  161. .name = "iva"
  162. };
  163. /* Common MPU IRQ line data */
  164. struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
  165. { .irq = 37, },
  166. { .irq = -1 }
  167. };
  168. struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = {
  169. { .irq = 38, },
  170. { .irq = -1 }
  171. };
  172. struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = {
  173. { .irq = 39, },
  174. { .irq = -1 }
  175. };
  176. struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = {
  177. { .irq = 40, },
  178. { .irq = -1 }
  179. };
  180. struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = {
  181. { .irq = 41, },
  182. { .irq = -1 }
  183. };
  184. struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = {
  185. { .irq = 42, },
  186. { .irq = -1 }
  187. };
  188. struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = {
  189. { .irq = 43, },
  190. { .irq = -1 }
  191. };
  192. struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = {
  193. { .irq = 44, },
  194. { .irq = -1 }
  195. };
  196. struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = {
  197. { .irq = 45, },
  198. { .irq = -1 }
  199. };
  200. struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = {
  201. { .irq = 46, },
  202. { .irq = -1 }
  203. };
  204. struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = {
  205. { .irq = 47, },
  206. { .irq = -1 }
  207. };
  208. struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = {
  209. { .irq = INT_24XX_UART1_IRQ, },
  210. { .irq = -1 }
  211. };
  212. struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = {
  213. { .irq = INT_24XX_UART2_IRQ, },
  214. { .irq = -1 }
  215. };
  216. struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = {
  217. { .irq = INT_24XX_UART3_IRQ, },
  218. { .irq = -1 }
  219. };
  220. struct omap_hwmod_irq_info omap2_dispc_irqs[] = {
  221. { .irq = 25 },
  222. { .irq = -1 }
  223. };
  224. struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = {
  225. { .irq = INT_24XX_I2C1_IRQ, },
  226. { .irq = -1 }
  227. };
  228. struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = {
  229. { .irq = INT_24XX_I2C2_IRQ, },
  230. { .irq = -1 }
  231. };
  232. struct omap_hwmod_irq_info omap2_gpio1_irqs[] = {
  233. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  234. { .irq = -1 }
  235. };
  236. struct omap_hwmod_irq_info omap2_gpio2_irqs[] = {
  237. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  238. { .irq = -1 }
  239. };
  240. struct omap_hwmod_irq_info omap2_gpio3_irqs[] = {
  241. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  242. { .irq = -1 }
  243. };
  244. struct omap_hwmod_irq_info omap2_gpio4_irqs[] = {
  245. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  246. { .irq = -1 }
  247. };
  248. struct omap_hwmod_irq_info omap2_dma_system_irqs[] = {
  249. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  250. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  251. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  252. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  253. { .irq = -1 }
  254. };
  255. struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = {
  256. { .irq = 65 },
  257. { .irq = -1 }
  258. };
  259. struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
  260. { .irq = 66 },
  261. { .irq = -1 }
  262. };