realizationOfDataCalculation.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-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. * XXX handle crossbar/shared link difference for L3?
  13. * XXX these should be marked initdata for multi-OMAP kernels
  14. */
  15. #include <linux/i2c-omap.h>
  16. #include <linux/platform_data/asoc-ti-mcbsp.h>
  17. #include <linux/platform_data/spi-omap2-mcspi.h>
  18. #include <linux/omap-dma.h>
  19. #include <plat/dmtimer.h>
  20. #include "omap_hwmod.h"
  21. #include "mmc.h"
  22. #include "l3_2xxx.h"
  23. #include "soc.h"
  24. #include "omap_hwmod_common_data.h"
  25. #include "prm-regbits-24xx.h"
  26. #include "cm-regbits-24xx.h"
  27. #include "i2c.h"
  28. #include "wd_timer.h"
  29. /*
  30. * OMAP2430 hardware module integration data
  31. *
  32. * All of the data in this section should be autogeneratable from the
  33. * TI hardware database or other technical documentation. Data that
  34. * is driver-specific or driver-kernel integration-specific belongs
  35. * elsewhere.
  36. */
  37. /*
  38. * IP blocks
  39. */
  40. /* IVA2 (IVA2) */
  41. static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
  42. { .name = "logic", .rst_shift = 0 },
  43. { .name = "mmu", .rst_shift = 1 },
  44. };
  45. static struct omap_hwmod omap2430_iva_hwmod = {
  46. .name = "iva",
  47. .class = &iva_hwmod_class,
  48. .clkdm_name = "dsp_clkdm",
  49. .rst_lines = omap2430_iva_resets,
  50. .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
  51. .main_clk = "dsp_fck",
  52. };
  53. /* I2C common */
  54. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  55. .rev_offs = 0x00,
  56. .sysc_offs = 0x20,
  57. .syss_offs = 0x10,
  58. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  59. SYSS_HAS_RESET_STATUS),
  60. .sysc_fields = &omap_hwmod_sysc_type1,
  61. };
  62. static struct omap_hwmod_class i2c_class = {
  63. .name = "i2c",
  64. .sysc = &i2c_sysc,
  65. .rev = OMAP_I2C_IP_VERSION_1,
  66. .reset = &omap_i2c_reset,
  67. };
  68. static struct omap_i2c_dev_attr i2c_dev_attr = {
  69. .fifo_depth = 8, /* bytes */
  70. .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
  71. OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
  72. };
  73. /* I2C1 */
  74. static struct omap_hwmod omap2430_i2c1_hwmod = {
  75. .name = "i2c1",
  76. .flags = HWMOD_16BIT_REG,
  77. .mpu_irqs = omap2_i2c1_mpu_irqs,
  78. .sdma_reqs = omap2_i2c1_sdma_reqs,
  79. .main_clk = "i2chs1_fck",
  80. .prcm = {
  81. .omap2 = {
  82. /*
  83. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  84. * I2CHS IP's do not follow the usual pattern.
  85. * prcm_reg_id alone cannot be used to program
  86. * the iclk and fclk. Needs to be handled using
  87. * additional flags when clk handling is moved
  88. * to hwmod framework.
  89. */
  90. .module_offs = CORE_MOD,
  91. .prcm_reg_id = 1,
  92. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  93. .idlest_reg_id = 1,
  94. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  95. },
  96. },
  97. .class = &i2c_class,
  98. .dev_attr = &i2c_dev_attr,
  99. };
  100. /* I2C2 */
  101. static struct omap_hwmod omap2430_i2c2_hwmod = {
  102. .name = "i2c2",
  103. .flags = HWMOD_16BIT_REG,
  104. .mpu_irqs = omap2_i2c2_mpu_irqs,
  105. .sdma_reqs = omap2_i2c2_sdma_reqs,
  106. .main_clk = "i2chs2_fck",
  107. .prcm = {
  108. .omap2 = {
  109. .module_offs = CORE_MOD,
  110. .prcm_reg_id = 1,
  111. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  112. .idlest_reg_id = 1,
  113. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  114. },
  115. },
  116. .class = &i2c_class,
  117. .dev_attr = &i2c_dev_attr,
  118. };
  119. /* gpio5 */
  120. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  121. { .irq = 33 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK5 */
  122. { .irq = -1 },
  123. };
  124. static struct omap_hwmod omap2430_gpio5_hwmod = {
  125. .name = "gpio5",
  126. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  127. .mpu_irqs = omap243x_gpio5_irqs,
  128. .main_clk = "gpio5_fck",
  129. .prcm = {
  130. .omap2 = {
  131. .prcm_reg_id = 2,
  132. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  133. .module_offs = CORE_MOD,
  134. .idlest_reg_id = 2,
  135. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  136. },
  137. },
  138. .class = &omap2xxx_gpio_hwmod_class,
  139. .dev_attr = &omap2xxx_gpio_dev_attr,
  140. };
  141. /* dma attributes */
  142. static struct omap_dma_dev_attr dma_dev_attr = {
  143. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  144. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  145. .lch_count = 32,
  146. };
  147. static struct omap_hwmod omap2430_dma_system_hwmod = {
  148. .name = "dma",
  149. .class = &omap2xxx_dma_hwmod_class,
  150. .mpu_irqs = omap2_dma_system_irqs,
  151. .main_clk = "core_l3_ck",
  152. .dev_attr = &dma_dev_attr,
  153. .flags = HWMOD_NO_IDLEST,
  154. };
  155. /* mailbox */
  156. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  157. { .irq = 26 + OMAP_INTC_START, },
  158. { .irq = -1 },
  159. };
  160. static struct omap_hwmod omap2430_mailbox_hwmod = {
  161. .name = "mailbox",
  162. .class = &omap2xxx_mailbox_hwmod_class,
  163. .mpu_irqs = omap2430_mailbox_irqs,
  164. .main_clk = "mailboxes_ick",
  165. .prcm = {
  166. .omap2 = {
  167. .prcm_reg_id = 1,
  168. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  169. .module_offs = CORE_MOD,
  170. .idlest_reg_id = 1,
  171. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  172. },
  173. },
  174. };
  175. /* mcspi3 */
  176. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  177. { .irq = 91 + OMAP_INTC_START, },
  178. { .irq = -1 },
  179. };
  180. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  181. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  182. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  183. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  184. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  185. { .dma_req = -1 }
  186. };
  187. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  188. .num_chipselect = 2,
  189. };
  190. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  191. .name = "mcspi3",
  192. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  193. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  194. .main_clk = "mcspi3_fck",
  195. .prcm = {
  196. .omap2 = {
  197. .module_offs = CORE_MOD,
  198. .prcm_reg_id = 2,
  199. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  200. .idlest_reg_id = 2,
  201. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  202. },
  203. },
  204. .class = &omap2xxx_mcspi_class,
  205. .dev_attr = &omap_mcspi3_dev_attr,
  206. };
  207. /* usbhsotg */
  208. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  209. .rev_offs = 0x0400,
  210. .sysc_offs = 0x0404,
  211. .syss_offs = 0x0408,
  212. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  213. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  214. SYSC_HAS_AUTOIDLE),
  215. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  216. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  217. .sysc_fields = &omap_hwmod_sysc_type1,
  218. };
  219. static struct omap_hwmod_class usbotg_class = {
  220. .name = "usbotg",
  221. .sysc = &omap2430_usbhsotg_sysc,
  222. };
  223. /* usb_otg_hs */
  224. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  225. { .name = "mc", .irq = 92 + OMAP_INTC_START, },
  226. { .name = "dma", .irq = 93 + OMAP_INTC_START, },
  227. { .irq = -1 },
  228. };
  229. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  230. .name = "usb_otg_hs",
  231. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  232. .main_clk = "usbhs_ick",
  233. .prcm = {
  234. .omap2 = {
  235. .prcm_reg_id = 1,
  236. .module_bit = OMAP2430_EN_USBHS_MASK,
  237. .module_offs = CORE_MOD,
  238. .idlest_reg_id = 1,
  239. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  240. },
  241. },
  242. .class = &usbotg_class,
  243. /*
  244. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  245. * broken when autoidle is enabled
  246. * workaround is to disable the autoidle bit at module level.
  247. */
  248. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  249. | HWMOD_SWSUP_MSTANDBY,
  250. };
  251. /*
  252. * 'mcbsp' class
  253. * multi channel buffered serial port controller
  254. */
  255. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  256. .rev_offs = 0x007C,
  257. .sysc_offs = 0x008C,
  258. .sysc_flags = (SYSC_HAS_SOFTRESET),
  259. .sysc_fields = &omap_hwmod_sysc_type1,
  260. };
  261. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  262. .name = "mcbsp",
  263. .sysc = &omap2430_mcbsp_sysc,
  264. .rev = MCBSP_CONFIG_TYPE2,
  265. };
  266. static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
  267. { .role = "pad_fck", .clk = "mcbsp_clks" },
  268. { .role = "prcm_fck", .clk = "func_96m_ck" },
  269. };
  270. /* mcbsp1 */
  271. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  272. { .name = "tx", .irq = 59 + OMAP_INTC_START, },
  273. { .name = "rx", .irq = 60 + OMAP_INTC_START, },
  274. { .name = "ovr", .irq = 61 + OMAP_INTC_START, },
  275. { .name = "common", .irq = 64 + OMAP_INTC_START, },
  276. { .irq = -1 },
  277. };
  278. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  279. .name = "mcbsp1",
  280. .class = &omap2430_mcbsp_hwmod_class,
  281. .mpu_irqs = omap2430_mcbsp1_irqs,
  282. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  283. .main_clk = "mcbsp1_fck",
  284. .prcm = {
  285. .omap2 = {
  286. .prcm_reg_id = 1,
  287. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  288. .module_offs = CORE_MOD,
  289. .idlest_reg_id = 1,
  290. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  291. },
  292. },
  293. .opt_clks = mcbsp_opt_clks,
  294. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  295. };
  296. /* mcbsp2 */
  297. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  298. { .name = "tx", .irq = 62 + OMAP_INTC_START, },
  299. { .name = "rx", .irq = 63 + OMAP_INTC_START, },
  300. { .name = "common", .irq = 16 + OMAP_INTC_START, },
  301. { .irq = -1 },
  302. };
  303. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  304. .name = "mcbsp2",
  305. .class = &omap2430_mcbsp_hwmod_class,
  306. .mpu_irqs = omap2430_mcbsp2_irqs,
  307. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  308. .main_clk = "mcbsp2_fck",
  309. .prcm = {
  310. .omap2 = {
  311. .prcm_reg_id = 1,
  312. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  313. .module_offs = CORE_MOD,
  314. .idlest_reg_id = 1,
  315. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  316. },
  317. },
  318. .opt_clks = mcbsp_opt_clks,
  319. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  320. };
  321. /* mcbsp3 */
  322. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  323. { .name = "tx", .irq = 89 + OMAP_INTC_START, },
  324. { .name = "rx", .irq = 90 + OMAP_INTC_START, },
  325. { .name = "common", .irq = 17 + OMAP_INTC_START, },
  326. { .irq = -1 },
  327. };
  328. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  329. .name = "mcbsp3",
  330. .class = &omap2430_mcbsp_hwmod_class,
  331. .mpu_irqs = omap2430_mcbsp3_irqs,
  332. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  333. .main_clk = "mcbsp3_fck",
  334. .prcm = {
  335. .omap2 = {
  336. .prcm_reg_id = 1,
  337. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  338. .module_offs = CORE_MOD,
  339. .idlest_reg_id = 2,
  340. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  341. },
  342. },
  343. .opt_clks = mcbsp_opt_clks,
  344. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  345. };
  346. /* mcbsp4 */
  347. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  348. { .name = "tx", .irq = 54 + OMAP_INTC_START, },
  349. { .name = "rx", .irq = 55 + OMAP_INTC_START, },
  350. { .name = "common", .irq = 18 + OMAP_INTC_START, },
  351. { .irq = -1 },
  352. };
  353. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  354. { .name = "rx", .dma_req = 20 },
  355. { .name = "tx", .dma_req = 19 },
  356. { .dma_req = -1 }
  357. };
  358. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  359. .name = "mcbsp4",
  360. .class = &omap2430_mcbsp_hwmod_class,
  361. .mpu_irqs = omap2430_mcbsp4_irqs,
  362. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  363. .main_clk = "mcbsp4_fck",
  364. .prcm = {
  365. .omap2 = {
  366. .prcm_reg_id = 1,
  367. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  368. .module_offs = CORE_MOD,
  369. .idlest_reg_id = 2,
  370. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  371. },
  372. },
  373. .opt_clks = mcbsp_opt_clks,
  374. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  375. };
  376. /* mcbsp5 */
  377. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  378. { .name = "tx", .irq = 81 + OMAP_INTC_START, },
  379. { .name = "rx", .irq = 82 + OMAP_INTC_START, },
  380. { .name = "common", .irq = 19 + OMAP_INTC_START, },
  381. { .irq = -1 },
  382. };
  383. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  384. { .name = "rx", .dma_req = 22 },
  385. { .name = "tx", .dma_req = 21 },
  386. { .dma_req = -1 }
  387. };
  388. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  389. .name = "mcbsp5",
  390. .class = &omap2430_mcbsp_hwmod_class,
  391. .mpu_irqs = omap2430_mcbsp5_irqs,
  392. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  393. .main_clk = "mcbsp5_fck",
  394. .prcm = {
  395. .omap2 = {
  396. .prcm_reg_id = 1,
  397. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  398. .module_offs = CORE_MOD,
  399. .idlest_reg_id = 2,
  400. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  401. },
  402. },
  403. .opt_clks = mcbsp_opt_clks,
  404. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  405. };
  406. /* MMC/SD/SDIO common */
  407. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  408. .rev_offs = 0x1fc,
  409. .sysc_offs = 0x10,
  410. .syss_offs = 0x14,
  411. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  412. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  413. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  414. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  415. .sysc_fields = &omap_hwmod_sysc_type1,
  416. };
  417. static struct omap_hwmod_class omap2430_mmc_class = {
  418. .name = "mmc",
  419. .sysc = &omap2430_mmc_sysc,
  420. };
  421. /* MMC/SD/SDIO1 */
  422. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  423. { .irq = 83 + OMAP_INTC_START, },
  424. { .irq = -1 },
  425. };
  426. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  427. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  428. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  429. { .dma_req = -1 }
  430. };
  431. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  432. { .role = "dbck", .clk = "mmchsdb1_fck" },
  433. };
  434. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  435. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  436. };
  437. static struct omap_hwmod omap2430_mmc1_hwmod = {
  438. .name = "mmc1",
  439. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  440. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  441. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  442. .opt_clks = omap2430_mmc1_opt_clks,
  443. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  444. .main_clk = "mmchs1_fck",
  445. .prcm = {
  446. .omap2 = {
  447. .module_offs = CORE_MOD,
  448. .prcm_reg_id = 2,
  449. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  450. .idlest_reg_id = 2,
  451. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  452. },
  453. },
  454. .dev_attr = &mmc1_dev_attr,
  455. .class = &omap2430_mmc_class,
  456. };
  457. /* MMC/SD/SDIO2 */
  458. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  459. { .irq = 86 + OMAP_INTC_START, },
  460. { .irq = -1 },
  461. };
  462. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  463. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  464. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  465. { .dma_req = -1 }
  466. };
  467. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  468. { .role = "dbck", .clk = "mmchsdb2_fck" },
  469. };
  470. static struct omap_hwmod omap2430_mmc2_hwmod = {
  471. .name = "mmc2",
  472. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  473. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  474. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  475. .opt_clks = omap2430_mmc2_opt_clks,
  476. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  477. .main_clk = "mmchs2_fck",
  478. .prcm = {
  479. .omap2 = {
  480. .module_offs = CORE_MOD,
  481. .prcm_reg_id = 2,
  482. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  483. .idlest_reg_id = 2,
  484. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  485. },
  486. },
  487. .class = &omap2430_mmc_class,
  488. };
  489. /* HDQ1W/1-wire */
  490. static struct omap_hwmod omap2430_hdq1w_hwmod = {
  491. .name = "hdq1w",
  492. .mpu_irqs = omap2_hdq1w_mpu_irqs,
  493. .main_clk = "hdq_fck",
  494. .prcm = {
  495. .omap2 = {
  496. .module_offs = CORE_MOD,
  497. .prcm_reg_id = 1,
  498. .module_bit = OMAP24XX_EN_HDQ_SHIFT,
  499. .idlest_reg_id = 1,
  500. .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
  501. },
  502. },
  503. .class = &omap2_hdq1w_class,
  504. };
  505. /*
  506. * interfaces
  507. */
  508. /* L3 -> L4_CORE interface */
  509. /* l3_core -> usbhsotg interface */
  510. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  511. .master = &omap2430_usbhsotg_hwmod,
  512. .slave = &omap2xxx_l3_main_hwmod,
  513. .clk = "core_l3_ck",
  514. .user = OCP_USER_MPU,
  515. };
  516. /* L4 CORE -> I2C1 interface */
  517. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  518. .master = &omap2xxx_l4_core_hwmod,
  519. .slave = &omap2430_i2c1_hwmod,
  520. .clk = "i2c1_ick",
  521. .addr = omap2_i2c1_addr_space,
  522. .user = OCP_USER_MPU | OCP_USER_SDMA,
  523. };