omap_hwmod_2xxx_3xxx_ipblock_data.c 6.7 KB

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