omap_hwmod_2xxx_3xxx_ipblock_data.c 7.8 KB

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