omap_hwmod_2430_data.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 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 "prm-regbits-24xx.h"
  23. #include "cm-regbits-24xx.h"
  24. /*
  25. * OMAP2430 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 omap2430_mpu_hwmod;
  33. static struct omap_hwmod omap2430_iva_hwmod;
  34. static struct omap_hwmod omap2430_l3_main_hwmod;
  35. static struct omap_hwmod omap2430_l4_core_hwmod;
  36. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  37. /* L3 -> L4_CORE interface */
  38. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  39. .master = &omap2430_l3_main_hwmod,
  40. .slave = &omap2430_l4_core_hwmod,
  41. .user = OCP_USER_MPU | OCP_USER_SDMA,
  42. };
  43. /* MPU -> L3 interface */
  44. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  45. .master = &omap2430_mpu_hwmod,
  46. .slave = &omap2430_l3_main_hwmod,
  47. .user = OCP_USER_MPU,
  48. };
  49. /* Slave interfaces on the L3 interconnect */
  50. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  51. &omap2430_mpu__l3_main,
  52. };
  53. /* Master interfaces on the L3 interconnect */
  54. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  55. &omap2430_l3_main__l4_core,
  56. };
  57. /* L3 */
  58. static struct omap_hwmod omap2430_l3_main_hwmod = {
  59. .name = "l3_main",
  60. .class = &l3_hwmod_class,
  61. .masters = omap2430_l3_main_masters,
  62. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  63. .slaves = omap2430_l3_main_slaves,
  64. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  65. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  66. .flags = HWMOD_NO_IDLEST,
  67. };
  68. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  69. static struct omap_hwmod omap2430_uart1_hwmod;
  70. static struct omap_hwmod omap2430_uart2_hwmod;
  71. static struct omap_hwmod omap2430_uart3_hwmod;
  72. static struct omap_hwmod omap2430_i2c1_hwmod;
  73. static struct omap_hwmod omap2430_i2c2_hwmod;
  74. /* I2C IP block address space length (in bytes) */
  75. #define OMAP2_I2C_AS_LEN 128
  76. /* L4 CORE -> I2C1 interface */
  77. static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
  78. {
  79. .pa_start = 0x48070000,
  80. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  81. .flags = ADDR_TYPE_RT,
  82. },
  83. };
  84. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  85. .master = &omap2430_l4_core_hwmod,
  86. .slave = &omap2430_i2c1_hwmod,
  87. .clk = "i2c1_ick",
  88. .addr = omap2430_i2c1_addr_space,
  89. .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
  90. .user = OCP_USER_MPU | OCP_USER_SDMA,
  91. };
  92. /* L4 CORE -> I2C2 interface */
  93. static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
  94. {
  95. .pa_start = 0x48072000,
  96. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  97. .flags = ADDR_TYPE_RT,
  98. },
  99. };
  100. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  101. .master = &omap2430_l4_core_hwmod,
  102. .slave = &omap2430_i2c2_hwmod,
  103. .clk = "i2c2_ick",
  104. .addr = omap2430_i2c2_addr_space,
  105. .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
  106. .user = OCP_USER_MPU | OCP_USER_SDMA,
  107. };
  108. /* L4_CORE -> L4_WKUP interface */
  109. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  110. .master = &omap2430_l4_core_hwmod,
  111. .slave = &omap2430_l4_wkup_hwmod,
  112. .user = OCP_USER_MPU | OCP_USER_SDMA,
  113. };
  114. /* L4 CORE -> UART1 interface */
  115. static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
  116. {
  117. .pa_start = OMAP2_UART1_BASE,
  118. .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
  119. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  120. },
  121. };
  122. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  123. .master = &omap2430_l4_core_hwmod,
  124. .slave = &omap2430_uart1_hwmod,
  125. .clk = "uart1_ick",
  126. .addr = omap2430_uart1_addr_space,
  127. .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
  128. .user = OCP_USER_MPU | OCP_USER_SDMA,
  129. };
  130. /* L4 CORE -> UART2 interface */
  131. static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
  132. {
  133. .pa_start = OMAP2_UART2_BASE,
  134. .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
  135. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  136. },
  137. };
  138. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  139. .master = &omap2430_l4_core_hwmod,
  140. .slave = &omap2430_uart2_hwmod,
  141. .clk = "uart2_ick",
  142. .addr = omap2430_uart2_addr_space,
  143. .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
  144. .user = OCP_USER_MPU | OCP_USER_SDMA,
  145. };
  146. /* L4 PER -> UART3 interface */
  147. static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
  148. {
  149. .pa_start = OMAP2_UART3_BASE,
  150. .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
  151. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  152. },
  153. };
  154. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  155. .master = &omap2430_l4_core_hwmod,
  156. .slave = &omap2430_uart3_hwmod,
  157. .clk = "uart3_ick",
  158. .addr = omap2430_uart3_addr_space,
  159. .addr_cnt = ARRAY_SIZE(omap2430_uart3_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 *omap2430_l4_core_slaves[] = {
  164. &omap2430_l3_main__l4_core,
  165. };
  166. /* Master interfaces on the L4_CORE interconnect */
  167. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  168. &omap2430_l4_core__l4_wkup,
  169. };
  170. /* L4 CORE */
  171. static struct omap_hwmod omap2430_l4_core_hwmod = {
  172. .name = "l4_core",
  173. .class = &l4_hwmod_class,
  174. .masters = omap2430_l4_core_masters,
  175. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  176. .slaves = omap2430_l4_core_slaves,
  177. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  178. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  179. .flags = HWMOD_NO_IDLEST,
  180. };
  181. /* Slave interfaces on the L4_WKUP interconnect */
  182. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  183. &omap2430_l4_core__l4_wkup,
  184. &omap2_l4_core__uart1,
  185. &omap2_l4_core__uart2,
  186. &omap2_l4_core__uart3,
  187. };
  188. /* Master interfaces on the L4_WKUP interconnect */
  189. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  190. };
  191. /* L4 WKUP */
  192. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  193. .name = "l4_wkup",
  194. .class = &l4_hwmod_class,
  195. .masters = omap2430_l4_wkup_masters,
  196. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  197. .slaves = omap2430_l4_wkup_slaves,
  198. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  199. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  200. .flags = HWMOD_NO_IDLEST,
  201. };
  202. /* Master interfaces on the MPU device */
  203. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  204. &omap2430_mpu__l3_main,
  205. };
  206. /* MPU */
  207. static struct omap_hwmod omap2430_mpu_hwmod = {
  208. .name = "mpu",
  209. .class = &mpu_hwmod_class,
  210. .main_clk = "mpu_ck",
  211. .masters = omap2430_mpu_masters,
  212. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  213. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  214. };
  215. /*
  216. * IVA2_1 interface data
  217. */
  218. /* IVA2 <- L3 interface */
  219. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  220. .master = &omap2430_l3_main_hwmod,
  221. .slave = &omap2430_iva_hwmod,
  222. .clk = "dsp_fck",
  223. .user = OCP_USER_MPU | OCP_USER_SDMA,
  224. };
  225. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  226. &omap2430_l3__iva,
  227. };
  228. /*
  229. * IVA2 (IVA2)
  230. */
  231. static struct omap_hwmod omap2430_iva_hwmod = {
  232. .name = "iva",
  233. .class = &iva_hwmod_class,
  234. .masters = omap2430_iva_masters,
  235. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  236. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  237. };
  238. /* l4_wkup -> wd_timer2 */
  239. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  240. {
  241. .pa_start = 0x49016000,
  242. .pa_end = 0x4901607f,
  243. .flags = ADDR_TYPE_RT
  244. },
  245. };
  246. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  247. .master = &omap2430_l4_wkup_hwmod,
  248. .slave = &omap2430_wd_timer2_hwmod,
  249. .clk = "mpu_wdt_ick",
  250. .addr = omap2430_wd_timer2_addrs,
  251. .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
  252. .user = OCP_USER_MPU | OCP_USER_SDMA,
  253. };
  254. /*
  255. * 'wd_timer' class
  256. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  257. * overflow condition
  258. */
  259. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  260. .rev_offs = 0x0,
  261. .sysc_offs = 0x0010,
  262. .syss_offs = 0x0014,
  263. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  264. SYSC_HAS_AUTOIDLE),
  265. .sysc_fields = &omap_hwmod_sysc_type1,
  266. };
  267. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  268. .name = "wd_timer",
  269. .sysc = &omap2430_wd_timer_sysc,
  270. };
  271. /* wd_timer2 */
  272. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  273. &omap2430_l4_wkup__wd_timer2,
  274. };
  275. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  276. .name = "wd_timer2",
  277. .class = &omap2430_wd_timer_hwmod_class,
  278. .main_clk = "mpu_wdt_fck",
  279. .prcm = {
  280. .omap2 = {
  281. .prcm_reg_id = 1,
  282. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  283. .module_offs = WKUP_MOD,
  284. .idlest_reg_id = 1,
  285. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  286. },
  287. },
  288. .slaves = omap2430_wd_timer2_slaves,
  289. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  290. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  291. };
  292. /* UART */
  293. static struct omap_hwmod_class_sysconfig uart_sysc = {
  294. .rev_offs = 0x50,
  295. .sysc_offs = 0x54,
  296. .syss_offs = 0x58,
  297. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  298. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  299. SYSC_HAS_AUTOIDLE),
  300. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  301. .sysc_fields = &omap_hwmod_sysc_type1,
  302. };
  303. static struct omap_hwmod_class uart_class = {
  304. .name = "uart",
  305. .sysc = &uart_sysc,
  306. };
  307. /* UART1 */
  308. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  309. { .irq = INT_24XX_UART1_IRQ, },
  310. };
  311. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  312. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  313. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  314. };
  315. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  316. &omap2_l4_core__uart1,
  317. };
  318. static struct omap_hwmod omap2430_uart1_hwmod = {
  319. .name = "uart1",
  320. .mpu_irqs = uart1_mpu_irqs,
  321. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  322. .sdma_reqs = uart1_sdma_reqs,
  323. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  324. .main_clk = "uart1_fck",
  325. .prcm = {
  326. .omap2 = {
  327. .module_offs = CORE_MOD,
  328. .prcm_reg_id = 1,
  329. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  330. .idlest_reg_id = 1,
  331. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  332. },
  333. },
  334. .slaves = omap2430_uart1_slaves,
  335. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  336. .class = &uart_class,
  337. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  338. };
  339. /* UART2 */
  340. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  341. { .irq = INT_24XX_UART2_IRQ, },
  342. };
  343. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  344. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  345. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  346. };
  347. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  348. &omap2_l4_core__uart2,
  349. };
  350. static struct omap_hwmod omap2430_uart2_hwmod = {
  351. .name = "uart2",
  352. .mpu_irqs = uart2_mpu_irqs,
  353. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  354. .sdma_reqs = uart2_sdma_reqs,
  355. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  356. .main_clk = "uart2_fck",
  357. .prcm = {
  358. .omap2 = {
  359. .module_offs = CORE_MOD,
  360. .prcm_reg_id = 1,
  361. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  362. .idlest_reg_id = 1,
  363. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  364. },
  365. },
  366. .slaves = omap2430_uart2_slaves,
  367. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  368. .class = &uart_class,
  369. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  370. };
  371. /* UART3 */
  372. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  373. { .irq = INT_24XX_UART3_IRQ, },
  374. };
  375. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  376. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  377. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  378. };
  379. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  380. &omap2_l4_core__uart3,
  381. };
  382. static struct omap_hwmod omap2430_uart3_hwmod = {
  383. .name = "uart3",
  384. .mpu_irqs = uart3_mpu_irqs,
  385. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  386. .sdma_reqs = uart3_sdma_reqs,
  387. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  388. .main_clk = "uart3_fck",
  389. .prcm = {
  390. .omap2 = {
  391. .module_offs = CORE_MOD,
  392. .prcm_reg_id = 2,
  393. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  394. .idlest_reg_id = 2,
  395. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  396. },
  397. },
  398. .slaves = omap2430_uart3_slaves,
  399. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  400. .class = &uart_class,
  401. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  402. };
  403. /* I2C common */
  404. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  405. .rev_offs = 0x00,
  406. .sysc_offs = 0x20,
  407. .syss_offs = 0x10,
  408. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  409. .sysc_fields = &omap_hwmod_sysc_type1,
  410. };
  411. static struct omap_hwmod_class i2c_class = {
  412. .name = "i2c",
  413. .sysc = &i2c_sysc,
  414. };
  415. static struct omap_i2c_dev_attr i2c_dev_attr;
  416. /* I2C1 */
  417. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  418. .fifo_depth = 8, /* bytes */
  419. };
  420. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  421. { .irq = INT_24XX_I2C1_IRQ, },
  422. };
  423. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  424. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  425. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  426. };
  427. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  428. &omap2430_l4_core__i2c1,
  429. };
  430. static struct omap_hwmod omap2430_i2c1_hwmod = {
  431. .name = "i2c1",
  432. .mpu_irqs = i2c1_mpu_irqs,
  433. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  434. .sdma_reqs = i2c1_sdma_reqs,
  435. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  436. .main_clk = "i2chs1_fck",
  437. .prcm = {
  438. .omap2 = {
  439. /*
  440. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  441. * I2CHS IP's do not follow the usual pattern.
  442. * prcm_reg_id alone cannot be used to program
  443. * the iclk and fclk. Needs to be handled using
  444. * additonal flags when clk handling is moved
  445. * to hwmod framework.
  446. */
  447. .module_offs = CORE_MOD,
  448. .prcm_reg_id = 1,
  449. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  450. .idlest_reg_id = 1,
  451. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  452. },
  453. },
  454. .slaves = omap2430_i2c1_slaves,
  455. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  456. .class = &i2c_class,
  457. .dev_attr = &i2c1_dev_attr,
  458. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  459. };
  460. /* I2C2 */
  461. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  462. .fifo_depth = 8, /* bytes */
  463. };
  464. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  465. { .irq = INT_24XX_I2C2_IRQ, },
  466. };
  467. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  468. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  469. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  470. };
  471. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  472. &omap2430_l4_core__i2c2,
  473. };
  474. static struct omap_hwmod omap2430_i2c2_hwmod = {
  475. .name = "i2c2",
  476. .mpu_irqs = i2c2_mpu_irqs,
  477. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  478. .sdma_reqs = i2c2_sdma_reqs,
  479. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  480. .main_clk = "i2chs2_fck",
  481. .prcm = {
  482. .omap2 = {
  483. .module_offs = CORE_MOD,
  484. .prcm_reg_id = 1,
  485. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  486. .idlest_reg_id = 1,
  487. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  488. },
  489. },
  490. .slaves = omap2430_i2c2_slaves,
  491. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  492. .class = &i2c_class,
  493. .dev_attr = &i2c2_dev_attr,
  494. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  495. };
  496. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  497. &omap2430_l3_main_hwmod,
  498. &omap2430_l4_core_hwmod,
  499. &omap2430_l4_wkup_hwmod,
  500. &omap2430_mpu_hwmod,
  501. &omap2430_iva_hwmod,
  502. &omap2430_wd_timer2_hwmod,
  503. &omap2430_uart1_hwmod,
  504. &omap2430_uart2_hwmod,
  505. &omap2430_uart3_hwmod,
  506. &omap2430_i2c1_hwmod,
  507. &omap2430_i2c2_hwmod,
  508. NULL,
  509. };
  510. int __init omap2430_hwmod_init(void)
  511. {
  512. return omap_hwmod_init(omap2430_hwmods);
  513. }