omap_hwmod_2xxx_3xxx_ipblock_data.c 7.4 KB

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