omap_hwmod_2xxx_3xxx_ipblock_data.c 6.9 KB

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