omap_hwmod_2420_data.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. /*
  2. * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
  3. *
  4. * Copyright (C) 2009-2010 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. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/omap24xx.h>
  21. #include "omap_hwmod_common_data.h"
  22. #include "cm-regbits-24xx.h"
  23. #include "prm-regbits-24xx.h"
  24. /*
  25. * OMAP2420 hardware module integration data
  26. *
  27. * ALl of the data in this section should be autogeneratable from the
  28. * TI hardware database or other technical documentation. Data that
  29. * is driver-specific or driver-kernel integration-specific belongs
  30. * elsewhere.
  31. */
  32. static struct omap_hwmod omap2420_mpu_hwmod;
  33. static struct omap_hwmod omap2420_iva_hwmod;
  34. static struct omap_hwmod omap2420_l3_main_hwmod;
  35. static struct omap_hwmod omap2420_l4_core_hwmod;
  36. static struct omap_hwmod omap2420_wd_timer2_hwmod;
  37. /* L3 -> L4_CORE interface */
  38. static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
  39. .master = &omap2420_l3_main_hwmod,
  40. .slave = &omap2420_l4_core_hwmod,
  41. .user = OCP_USER_MPU | OCP_USER_SDMA,
  42. };
  43. /* MPU -> L3 interface */
  44. static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
  45. .master = &omap2420_mpu_hwmod,
  46. .slave = &omap2420_l3_main_hwmod,
  47. .user = OCP_USER_MPU,
  48. };
  49. /* Slave interfaces on the L3 interconnect */
  50. static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
  51. &omap2420_mpu__l3_main,
  52. };
  53. /* Master interfaces on the L3 interconnect */
  54. static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
  55. &omap2420_l3_main__l4_core,
  56. };
  57. /* L3 */
  58. static struct omap_hwmod omap2420_l3_main_hwmod = {
  59. .name = "l3_main",
  60. .class = &l3_hwmod_class,
  61. .masters = omap2420_l3_main_masters,
  62. .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
  63. .slaves = omap2420_l3_main_slaves,
  64. .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
  65. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  66. .flags = HWMOD_NO_IDLEST,
  67. };
  68. static struct omap_hwmod omap2420_l4_wkup_hwmod;
  69. static struct omap_hwmod omap2420_uart1_hwmod;
  70. static struct omap_hwmod omap2420_uart2_hwmod;
  71. static struct omap_hwmod omap2420_uart3_hwmod;
  72. static struct omap_hwmod omap2420_i2c1_hwmod;
  73. static struct omap_hwmod omap2420_i2c2_hwmod;
  74. /* L4_CORE -> L4_WKUP interface */
  75. static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
  76. .master = &omap2420_l4_core_hwmod,
  77. .slave = &omap2420_l4_wkup_hwmod,
  78. .user = OCP_USER_MPU | OCP_USER_SDMA,
  79. };
  80. /* L4 CORE -> UART1 interface */
  81. static struct omap_hwmod_addr_space omap2420_uart1_addr_space[] = {
  82. {
  83. .pa_start = OMAP2_UART1_BASE,
  84. .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
  85. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  86. },
  87. };
  88. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  89. .master = &omap2420_l4_core_hwmod,
  90. .slave = &omap2420_uart1_hwmod,
  91. .clk = "uart1_ick",
  92. .addr = omap2420_uart1_addr_space,
  93. .addr_cnt = ARRAY_SIZE(omap2420_uart1_addr_space),
  94. .user = OCP_USER_MPU | OCP_USER_SDMA,
  95. };
  96. /* L4 CORE -> UART2 interface */
  97. static struct omap_hwmod_addr_space omap2420_uart2_addr_space[] = {
  98. {
  99. .pa_start = OMAP2_UART2_BASE,
  100. .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
  101. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  102. },
  103. };
  104. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  105. .master = &omap2420_l4_core_hwmod,
  106. .slave = &omap2420_uart2_hwmod,
  107. .clk = "uart2_ick",
  108. .addr = omap2420_uart2_addr_space,
  109. .addr_cnt = ARRAY_SIZE(omap2420_uart2_addr_space),
  110. .user = OCP_USER_MPU | OCP_USER_SDMA,
  111. };
  112. /* L4 PER -> UART3 interface */
  113. static struct omap_hwmod_addr_space omap2420_uart3_addr_space[] = {
  114. {
  115. .pa_start = OMAP2_UART3_BASE,
  116. .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
  117. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  118. },
  119. };
  120. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  121. .master = &omap2420_l4_core_hwmod,
  122. .slave = &omap2420_uart3_hwmod,
  123. .clk = "uart3_ick",
  124. .addr = omap2420_uart3_addr_space,
  125. .addr_cnt = ARRAY_SIZE(omap2420_uart3_addr_space),
  126. .user = OCP_USER_MPU | OCP_USER_SDMA,
  127. };
  128. /* I2C IP block address space length (in bytes) */
  129. #define OMAP2_I2C_AS_LEN 128
  130. /* L4 CORE -> I2C1 interface */
  131. static struct omap_hwmod_addr_space omap2420_i2c1_addr_space[] = {
  132. {
  133. .pa_start = 0x48070000,
  134. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  135. .flags = ADDR_TYPE_RT,
  136. },
  137. };
  138. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
  139. .master = &omap2420_l4_core_hwmod,
  140. .slave = &omap2420_i2c1_hwmod,
  141. .clk = "i2c1_ick",
  142. .addr = omap2420_i2c1_addr_space,
  143. .addr_cnt = ARRAY_SIZE(omap2420_i2c1_addr_space),
  144. .user = OCP_USER_MPU | OCP_USER_SDMA,
  145. };
  146. /* L4 CORE -> I2C2 interface */
  147. static struct omap_hwmod_addr_space omap2420_i2c2_addr_space[] = {
  148. {
  149. .pa_start = 0x48072000,
  150. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  151. .flags = ADDR_TYPE_RT,
  152. },
  153. };
  154. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
  155. .master = &omap2420_l4_core_hwmod,
  156. .slave = &omap2420_i2c2_hwmod,
  157. .clk = "i2c2_ick",
  158. .addr = omap2420_i2c2_addr_space,
  159. .addr_cnt = ARRAY_SIZE(omap2420_i2c2_addr_space),
  160. .user = OCP_USER_MPU | OCP_USER_SDMA,
  161. };
  162. /* Slave interfaces on the L4_CORE interconnect */
  163. static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
  164. &omap2420_l3_main__l4_core,
  165. };
  166. /* Master interfaces on the L4_CORE interconnect */
  167. static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
  168. &omap2420_l4_core__l4_wkup,
  169. &omap2_l4_core__uart1,
  170. &omap2_l4_core__uart2,
  171. &omap2_l4_core__uart3,
  172. &omap2420_l4_core__i2c1,
  173. &omap2420_l4_core__i2c2
  174. };
  175. /* L4 CORE */
  176. static struct omap_hwmod omap2420_l4_core_hwmod = {
  177. .name = "l4_core",
  178. .class = &l4_hwmod_class,
  179. .masters = omap2420_l4_core_masters,
  180. .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
  181. .slaves = omap2420_l4_core_slaves,
  182. .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
  183. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  184. .flags = HWMOD_NO_IDLEST,
  185. };
  186. /* Slave interfaces on the L4_WKUP interconnect */
  187. static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
  188. &omap2420_l4_core__l4_wkup,
  189. };
  190. /* Master interfaces on the L4_WKUP interconnect */
  191. static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
  192. };
  193. /* L4 WKUP */
  194. static struct omap_hwmod omap2420_l4_wkup_hwmod = {
  195. .name = "l4_wkup",
  196. .class = &l4_hwmod_class,
  197. .masters = omap2420_l4_wkup_masters,
  198. .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
  199. .slaves = omap2420_l4_wkup_slaves,
  200. .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
  201. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  202. .flags = HWMOD_NO_IDLEST,
  203. };
  204. /* Master interfaces on the MPU device */
  205. static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
  206. &omap2420_mpu__l3_main,
  207. };
  208. /* MPU */
  209. static struct omap_hwmod omap2420_mpu_hwmod = {
  210. .name = "mpu",
  211. .class = &mpu_hwmod_class,
  212. .main_clk = "mpu_ck",
  213. .masters = omap2420_mpu_masters,
  214. .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
  215. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  216. };
  217. /*
  218. * IVA1 interface data
  219. */
  220. /* IVA <- L3 interface */
  221. static struct omap_hwmod_ocp_if omap2420_l3__iva = {
  222. .master = &omap2420_l3_main_hwmod,
  223. .slave = &omap2420_iva_hwmod,
  224. .clk = "iva1_ifck",
  225. .user = OCP_USER_MPU | OCP_USER_SDMA,
  226. };
  227. static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
  228. &omap2420_l3__iva,
  229. };
  230. /*
  231. * IVA2 (IVA2)
  232. */
  233. static struct omap_hwmod omap2420_iva_hwmod = {
  234. .name = "iva",
  235. .class = &iva_hwmod_class,
  236. .masters = omap2420_iva_masters,
  237. .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
  238. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  239. };
  240. /* l4_wkup -> wd_timer2 */
  241. static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
  242. {
  243. .pa_start = 0x48022000,
  244. .pa_end = 0x4802207f,
  245. .flags = ADDR_TYPE_RT
  246. },
  247. };
  248. static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
  249. .master = &omap2420_l4_wkup_hwmod,
  250. .slave = &omap2420_wd_timer2_hwmod,
  251. .clk = "mpu_wdt_ick",
  252. .addr = omap2420_wd_timer2_addrs,
  253. .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs),
  254. .user = OCP_USER_MPU | OCP_USER_SDMA,
  255. };
  256. /*
  257. * 'wd_timer' class
  258. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  259. * overflow condition
  260. */
  261. static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
  262. .rev_offs = 0x0000,
  263. .sysc_offs = 0x0010,
  264. .syss_offs = 0x0014,
  265. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  266. SYSC_HAS_AUTOIDLE),
  267. .sysc_fields = &omap_hwmod_sysc_type1,
  268. };
  269. static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
  270. .name = "wd_timer",
  271. .sysc = &omap2420_wd_timer_sysc,
  272. };
  273. /* wd_timer2 */
  274. static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
  275. &omap2420_l4_wkup__wd_timer2,
  276. };
  277. static struct omap_hwmod omap2420_wd_timer2_hwmod = {
  278. .name = "wd_timer2",
  279. .class = &omap2420_wd_timer_hwmod_class,
  280. .main_clk = "mpu_wdt_fck",
  281. .prcm = {
  282. .omap2 = {
  283. .prcm_reg_id = 1,
  284. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  285. .module_offs = WKUP_MOD,
  286. .idlest_reg_id = 1,
  287. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  288. },
  289. },
  290. .slaves = omap2420_wd_timer2_slaves,
  291. .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
  292. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  293. };
  294. /* UART */
  295. static struct omap_hwmod_class_sysconfig uart_sysc = {
  296. .rev_offs = 0x50,
  297. .sysc_offs = 0x54,
  298. .syss_offs = 0x58,
  299. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  300. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  301. SYSC_HAS_AUTOIDLE),
  302. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  303. .sysc_fields = &omap_hwmod_sysc_type1,
  304. };
  305. static struct omap_hwmod_class uart_class = {
  306. .name = "uart",
  307. .sysc = &uart_sysc,
  308. };
  309. /* UART1 */
  310. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  311. { .irq = INT_24XX_UART1_IRQ, },
  312. };
  313. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  314. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  315. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  316. };
  317. static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
  318. &omap2_l4_core__uart1,
  319. };
  320. static struct omap_hwmod omap2420_uart1_hwmod = {
  321. .name = "uart1",
  322. .mpu_irqs = uart1_mpu_irqs,
  323. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  324. .sdma_reqs = uart1_sdma_reqs,
  325. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  326. .main_clk = "uart1_fck",
  327. .prcm = {
  328. .omap2 = {
  329. .module_offs = CORE_MOD,
  330. .prcm_reg_id = 1,
  331. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  332. .idlest_reg_id = 1,
  333. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  334. },
  335. },
  336. .slaves = omap2420_uart1_slaves,
  337. .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
  338. .class = &uart_class,
  339. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  340. };
  341. /* UART2 */
  342. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  343. { .irq = INT_24XX_UART2_IRQ, },
  344. };
  345. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  346. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  347. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  348. };
  349. static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
  350. &omap2_l4_core__uart2,
  351. };
  352. static struct omap_hwmod omap2420_uart2_hwmod = {
  353. .name = "uart2",
  354. .mpu_irqs = uart2_mpu_irqs,
  355. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  356. .sdma_reqs = uart2_sdma_reqs,
  357. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  358. .main_clk = "uart2_fck",
  359. .prcm = {
  360. .omap2 = {
  361. .module_offs = CORE_MOD,
  362. .prcm_reg_id = 1,
  363. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  364. .idlest_reg_id = 1,
  365. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  366. },
  367. },
  368. .slaves = omap2420_uart2_slaves,
  369. .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
  370. .class = &uart_class,
  371. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  372. };
  373. /* UART3 */
  374. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  375. { .irq = INT_24XX_UART3_IRQ, },
  376. };
  377. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  378. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  379. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  380. };
  381. static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
  382. &omap2_l4_core__uart3,
  383. };
  384. static struct omap_hwmod omap2420_uart3_hwmod = {
  385. .name = "uart3",
  386. .mpu_irqs = uart3_mpu_irqs,
  387. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  388. .sdma_reqs = uart3_sdma_reqs,
  389. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  390. .main_clk = "uart3_fck",
  391. .prcm = {
  392. .omap2 = {
  393. .module_offs = CORE_MOD,
  394. .prcm_reg_id = 2,
  395. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  396. .idlest_reg_id = 2,
  397. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  398. },
  399. },
  400. .slaves = omap2420_uart3_slaves,
  401. .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
  402. .class = &uart_class,
  403. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  404. };
  405. /* I2C common */
  406. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  407. .rev_offs = 0x00,
  408. .sysc_offs = 0x20,
  409. .syss_offs = 0x10,
  410. .sysc_flags = SYSC_HAS_SOFTRESET,
  411. .sysc_fields = &omap_hwmod_sysc_type1,
  412. };
  413. static struct omap_hwmod_class i2c_class = {
  414. .name = "i2c",
  415. .sysc = &i2c_sysc,
  416. };
  417. static struct omap_i2c_dev_attr i2c_dev_attr;
  418. /* I2C1 */
  419. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  420. { .irq = INT_24XX_I2C1_IRQ, },
  421. };
  422. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  423. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  424. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  425. };
  426. static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
  427. &omap2420_l4_core__i2c1,
  428. };
  429. static struct omap_hwmod omap2420_i2c1_hwmod = {
  430. .name = "i2c1",
  431. .mpu_irqs = i2c1_mpu_irqs,
  432. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  433. .sdma_reqs = i2c1_sdma_reqs,
  434. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  435. .main_clk = "i2c1_fck",
  436. .prcm = {
  437. .omap2 = {
  438. .module_offs = CORE_MOD,
  439. .prcm_reg_id = 1,
  440. .module_bit = OMAP2420_EN_I2C1_SHIFT,
  441. .idlest_reg_id = 1,
  442. .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
  443. },
  444. },
  445. .slaves = omap2420_i2c1_slaves,
  446. .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
  447. .class = &i2c_class,
  448. .dev_attr = &i2c_dev_attr,
  449. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  450. .flags = HWMOD_16BIT_REG,
  451. };
  452. /* I2C2 */
  453. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  454. { .irq = INT_24XX_I2C2_IRQ, },
  455. };
  456. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  457. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  458. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  459. };
  460. static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
  461. &omap2420_l4_core__i2c2,
  462. };
  463. static struct omap_hwmod omap2420_i2c2_hwmod = {
  464. .name = "i2c2",
  465. .mpu_irqs = i2c2_mpu_irqs,
  466. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  467. .sdma_reqs = i2c2_sdma_reqs,
  468. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  469. .main_clk = "i2c2_fck",
  470. .prcm = {
  471. .omap2 = {
  472. .module_offs = CORE_MOD,
  473. .prcm_reg_id = 1,
  474. .module_bit = OMAP2420_EN_I2C2_SHIFT,
  475. .idlest_reg_id = 1,
  476. .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
  477. },
  478. },
  479. .slaves = omap2420_i2c2_slaves,
  480. .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
  481. .class = &i2c_class,
  482. .dev_attr = &i2c_dev_attr,
  483. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  484. .flags = HWMOD_16BIT_REG,
  485. };
  486. static __initdata struct omap_hwmod *omap2420_hwmods[] = {
  487. &omap2420_l3_main_hwmod,
  488. &omap2420_l4_core_hwmod,
  489. &omap2420_l4_wkup_hwmod,
  490. &omap2420_mpu_hwmod,
  491. &omap2420_iva_hwmod,
  492. &omap2420_wd_timer2_hwmod,
  493. &omap2420_uart1_hwmod,
  494. &omap2420_uart2_hwmod,
  495. &omap2420_uart3_hwmod,
  496. &omap2420_i2c1_hwmod,
  497. &omap2420_i2c2_hwmod,
  498. NULL,
  499. };
  500. int __init omap2420_hwmod_init(void)
  501. {
  502. return omap_hwmod_init(omap2420_hwmods);
  503. }