synchronousMemoryDatabase.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. /*
  2. * Hardware modules present on the OMAP44xx chips
  3. *
  4. * Copyright (C) 2009-2012 Texas Instruments, Inc.
  5. * Copyright (C) 2009-2010 Nokia Corporation
  6. *
  7. * Paul Walmsley
  8. * Benoit Cousson
  9. *
  10. * This file is automatically generated from the OMAP hardware databases.
  11. * We respectfully ask that any modifications to this file be coordinated
  12. * with the public linux-omap@vger.kernel.org mailing list and the
  13. * authors above to ensure that the autogeneration scripts are kept
  14. * up-to-date with the file contents.
  15. *
  16. * This program is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License version 2 as
  18. * published by the Free Software Foundation.
  19. */
  20. #include <linux/io.h>
  21. #include <linux/platform_data/gpio-omap.h>
  22. #include <linux/power/smartreflex.h>
  23. #include <linux/platform_data/omap_ocp2scp.h>
  24. #include <linux/i2c-omap.h>
  25. #include <linux/omap-dma.h>
  26. #include <linux/platform_data/spi-omap2-mcspi.h>
  27. #include <linux/platform_data/asoc-ti-mcbsp.h>
  28. #include <linux/platform_data/iommu-omap.h>
  29. #include <plat/dmtimer.h>
  30. #include "omap_hwmod.h"
  31. #include "omap_hwmod_common_data.h"
  32. #include "cm1_44xx.h"
  33. #include "cm2_44xx.h"
  34. #include "prm44xx.h"
  35. #include "prm-regbits-44xx.h"
  36. #include "i2c.h"
  37. #include "mmc.h"
  38. #include "wd_timer.h"
  39. /* Base offset for all OMAP4 interrupts external to MPUSS */
  40. #define OMAP44XX_IRQ_GIC_START 32
  41. /* Base offset for all OMAP4 dma requests */
  42. #define OMAP44XX_DMA_REQ_START 1
  43. /*
  44. * IP blocks
  45. */
  46. /*
  47. * 'c2c_target_fw' class
  48. * instance(s): c2c_target_fw
  49. */
  50. static struct omap_hwmod_class omap44xx_c2c_target_fw_hwmod_class = {
  51. .name = "c2c_target_fw",
  52. };
  53. /* c2c_target_fw */
  54. static struct omap_hwmod omap44xx_c2c_target_fw_hwmod = {
  55. .name = "c2c_target_fw",
  56. .class = &omap44xx_c2c_target_fw_hwmod_class,
  57. .clkdm_name = "d2d_clkdm",
  58. .prcm = {
  59. .omap4 = {
  60. .clkctrl_offs = OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET,
  61. .context_offs = OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET,
  62. },
  63. },
  64. };
  65. /*
  66. * 'dmm' class
  67. * instance(s): dmm
  68. */
  69. static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
  70. .name = "dmm",
  71. };
  72. /* dmm */
  73. static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
  74. { .irq = 113 + OMAP44XX_IRQ_GIC_START },
  75. { .irq = -1 }
  76. };
  77. static struct omap_hwmod omap44xx_dmm_hwmod = {
  78. .name = "dmm",
  79. .class = &omap44xx_dmm_hwmod_class,
  80. .clkdm_name = "l3_emif_clkdm",
  81. .mpu_irqs = omap44xx_dmm_irqs,
  82. .prcm = {
  83. .omap4 = {
  84. .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
  85. .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
  86. },
  87. },
  88. };
  89. /*
  90. * 'emif_fw' class
  91. * instance(s): emif_fw
  92. */
  93. static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
  94. .name = "emif_fw",
  95. };
  96. /* emif_fw */
  97. static struct omap_hwmod omap44xx_emif_fw_hwmod = {
  98. .name = "emif_fw",
  99. .class = &omap44xx_emif_fw_hwmod_class,
  100. .clkdm_name = "l3_emif_clkdm",
  101. .prcm = {
  102. .omap4 = {
  103. .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
  104. .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
  105. },
  106. },
  107. };
  108. /*
  109. * 'l3' class
  110. * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
  111. */
  112. static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
  113. .name = "l3",
  114. };
  115. /* l3_instr */
  116. static struct omap_hwmod omap44xx_l3_instr_hwmod = {
  117. .name = "l3_instr",
  118. .class = &omap44xx_l3_hwmod_class,
  119. .clkdm_name = "l3_instr_clkdm",
  120. .prcm = {
  121. .omap4 = {
  122. .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
  123. .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
  124. .modulemode = MODULEMODE_HWCTRL,
  125. },
  126. },
  127. };
  128. /* l3_main_1 */
  129. static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
  130. { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
  131. { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
  132. { .irq = -1 }
  133. };
  134. static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
  135. .name = "l3_main_1",
  136. .class = &omap44xx_l3_hwmod_class,
  137. .clkdm_name = "l3_1_clkdm",
  138. .mpu_irqs = omap44xx_l3_main_1_irqs,
  139. .prcm = {
  140. .omap4 = {
  141. .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
  142. .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
  143. },
  144. },
  145. };
  146. /* l3_main_2 */
  147. static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
  148. .name = "l3_main_2",
  149. .class = &omap44xx_l3_hwmod_class,
  150. .clkdm_name = "l3_2_clkdm",
  151. .prcm = {
  152. .omap4 = {
  153. .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
  154. .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
  155. },
  156. },
  157. };
  158. /* l3_main_3 */
  159. static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
  160. .name = "l3_main_3",
  161. .class = &omap44xx_l3_hwmod_class,
  162. .clkdm_name = "l3_instr_clkdm",
  163. .prcm = {
  164. .omap4 = {
  165. .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
  166. .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
  167. .modulemode = MODULEMODE_HWCTRL,
  168. },
  169. },
  170. };
  171. /*
  172. * 'l4' class
  173. * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
  174. */
  175. static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
  176. .name = "l4",
  177. };
  178. /* l4_abe */
  179. static struct omap_hwmod omap44xx_l4_abe_hwmod = {
  180. .name = "l4_abe",
  181. .class = &omap44xx_l4_hwmod_class,
  182. .clkdm_name = "abe_clkdm",
  183. .prcm = {
  184. .omap4 = {
  185. .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
  186. .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
  187. .lostcontext_mask = OMAP4430_LOSTMEM_AESSMEM_MASK,
  188. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  189. },
  190. },
  191. };
  192. /* l4_cfg */
  193. static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
  194. .name = "l4_cfg",
  195. .class = &omap44xx_l4_hwmod_class,
  196. .clkdm_name = "l4_cfg_clkdm",
  197. .prcm = {
  198. .omap4 = {
  199. .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
  200. .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
  201. },
  202. },
  203. };
  204. /* l4_per */
  205. static struct omap_hwmod omap44xx_l4_per_hwmod = {
  206. .name = "l4_per",
  207. .class = &omap44xx_l4_hwmod_class,
  208. .clkdm_name = "l4_per_clkdm",
  209. .prcm = {
  210. .omap4 = {
  211. .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
  212. .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
  213. },
  214. },
  215. };
  216. /* l4_wkup */
  217. static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
  218. .name = "l4_wkup",
  219. .class = &omap44xx_l4_hwmod_class,
  220. .clkdm_name = "l4_wkup_clkdm",
  221. .prcm = {
  222. .omap4 = {
  223. .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
  224. .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
  225. },
  226. },
  227. };
  228. /*
  229. * 'mpu_bus' class
  230. * instance(s): mpu_private
  231. */
  232. static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
  233. .name = "mpu_bus",
  234. };
  235. /* mpu_private */
  236. static struct omap_hwmod omap44xx_mpu_private_hwmod = {
  237. .name = "mpu_private",
  238. .class = &omap44xx_mpu_bus_hwmod_class,
  239. .clkdm_name = "mpuss_clkdm",
  240. .prcm = {
  241. .omap4 = {
  242. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  243. },
  244. },
  245. };
  246. /*
  247. * 'ocp_wp_noc' class
  248. * instance(s): ocp_wp_noc
  249. */
  250. static struct omap_hwmod_class omap44xx_ocp_wp_noc_hwmod_class = {
  251. .name = "ocp_wp_noc",
  252. };
  253. /* ocp_wp_noc */
  254. static struct omap_hwmod omap44xx_ocp_wp_noc_hwmod = {
  255. .name = "ocp_wp_noc",
  256. .class = &omap44xx_ocp_wp_noc_hwmod_class,
  257. .clkdm_name = "l3_instr_clkdm",
  258. .prcm = {
  259. .omap4 = {
  260. .clkctrl_offs = OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_OFFSET,
  261. .context_offs = OMAP4_RM_L3INSTR_OCP_WP1_CONTEXT_OFFSET,
  262. .modulemode = MODULEMODE_HWCTRL,
  263. },
  264. },
  265. };
  266. /*
  267. * Modules omap_hwmod structures
  268. *
  269. * The following IPs are excluded for the moment because:
  270. * - They do not need an explicit SW control using omap_hwmod API.
  271. * - They still need to be validated with the driver
  272. * properly adapted to omap_hwmod / omap_device
  273. *
  274. * usim
  275. */
  276. /*
  277. * 'aess' class
  278. * audio engine sub system
  279. */
  280. static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
  281. .rev_offs = 0x0000,
  282. .sysc_offs = 0x0010,
  283. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
  284. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  285. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
  286. MSTANDBY_SMART_WKUP),
  287. .sysc_fields = &omap_hwmod_sysc_type2,
  288. };
  289. static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
  290. .name = "aess",
  291. .sysc = &omap44xx_aess_sysc,
  292. };
  293. /* aess */
  294. static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
  295. { .irq = 99 + OMAP44XX_IRQ_GIC_START },
  296. { .irq = -1 }
  297. };
  298. static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
  299. { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
  300. { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
  301. { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
  302. { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
  303. { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
  304. { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
  305. { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
  306. { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
  307. { .dma_req = -1 }
  308. };
  309. static struct omap_hwmod omap44xx_aess_hwmod = {
  310. .name = "aess",
  311. .class = &omap44xx_aess_hwmod_class,
  312. .clkdm_name = "abe_clkdm",
  313. .mpu_irqs = omap44xx_aess_irqs,
  314. .sdma_reqs = omap44xx_aess_sdma_reqs,
  315. .main_clk = "aess_fck",
  316. .prcm = {
  317. .omap4 = {
  318. .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
  319. .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
  320. .lostcontext_mask = OMAP4430_LOSTCONTEXT_DFF_MASK,
  321. .modulemode = MODULEMODE_SWCTRL,
  322. },
  323. },
  324. };
  325. /*
  326. * 'c2c' class
  327. * chip 2 chip interface used to plug the ape soc (omap) with an external modem
  328. * soc
  329. */
  330. static struct omap_hwmod_class omap44xx_c2c_hwmod_class = {
  331. .name = "c2c",
  332. };
  333. /* c2c */
  334. static struct omap_hwmod_irq_info omap44xx_c2c_irqs[] = {
  335. { .irq = 88 + OMAP44XX_IRQ_GIC_START },
  336. { .irq = -1 }
  337. };
  338. static struct omap_hwmod_dma_info omap44xx_c2c_sdma_reqs[] = {
  339. { .dma_req = 68 + OMAP44XX_DMA_REQ_START },
  340. { .dma_req = -1 }
  341. };
  342. static struct omap_hwmod omap44xx_c2c_hwmod = {
  343. .name = "c2c",
  344. .class = &omap44xx_c2c_hwmod_class,
  345. .clkdm_name = "d2d_clkdm",
  346. .mpu_irqs = omap44xx_c2c_irqs,
  347. .sdma_reqs = omap44xx_c2c_sdma_reqs,
  348. .prcm = {
  349. .omap4 = {
  350. .clkctrl_offs = OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET,
  351. .context_offs = OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET,
  352. },
  353. },
  354. };
  355. /*
  356. * 'counter' class
  357. * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
  358. */
  359. static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
  360. .rev_offs = 0x0000,
  361. .sysc_offs = 0x0004,
  362. .sysc_flags = SYSC_HAS_SIDLEMODE,
  363. .idlemodes = (SIDLE_FORCE | SIDLE_NO),
  364. .sysc_fields = &omap_hwmod_sysc_type1,
  365. };
  366. static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
  367. .name = "counter",
  368. .sysc = &omap44xx_counter_sysc,
  369. };
  370. /* counter_32k */
  371. static struct omap_hwmod omap44xx_counter_32k_hwmod = {
  372. .name = "counter_32k",
  373. .class = &omap44xx_counter_hwmod_class,
  374. .clkdm_name = "l4_wkup_clkdm",
  375. .flags = HWMOD_SWSUP_SIDLE,
  376. .main_clk = "sys_32k_ck",
  377. .prcm = {
  378. .omap4 = {
  379. .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
  380. .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
  381. },
  382. },
  383. };
  384. /*
  385. * 'ctrl_module' class
  386. * attila core control module + core pad control module + wkup pad control
  387. * module + attila wkup control module
  388. */
  389. static struct omap_hwmod_class_sysconfig omap44xx_ctrl_module_sysc = {
  390. .rev_offs = 0x0000,
  391. .sysc_offs = 0x0010,
  392. .sysc_flags = SYSC_HAS_SIDLEMODE,
  393. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  394. SIDLE_SMART_WKUP),
  395. .sysc_fields = &omap_hwmod_sysc_type2,
  396. };
  397. static struct omap_hwmod_class omap44xx_ctrl_module_hwmod_class = {
  398. .name = "ctrl_module",
  399. .sysc = &omap44xx_ctrl_module_sysc,
  400. };
  401. /* ctrl_module_core */
  402. static struct omap_hwmod_irq_info omap44xx_ctrl_module_core_irqs[] = {
  403. { .irq = 8 + OMAP44XX_IRQ_GIC_START },
  404. { .irq = -1 }
  405. };
  406. static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = {
  407. .name = "ctrl_module_core",
  408. .class = &omap44xx_ctrl_module_hwmod_class,
  409. .clkdm_name = "l4_cfg_clkdm",
  410. .mpu_irqs = omap44xx_ctrl_module_core_irqs,
  411. .prcm = {
  412. .omap4 = {
  413. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  414. },
  415. },
  416. };
  417. /* ctrl_module_pad_core */
  418. static struct omap_hwmod omap44xx_ctrl_module_pad_core_hwmod = {
  419. .name = "ctrl_module_pad_core",
  420. .class = &omap44xx_ctrl_module_hwmod_class,
  421. .clkdm_name = "l4_cfg_clkdm",
  422. .prcm = {
  423. .omap4 = {
  424. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  425. },
  426. },
  427. };
  428. /* ctrl_module_wkup */
  429. static struct omap_hwmod omap44xx_ctrl_module_wkup_hwmod = {
  430. .name = "ctrl_module_wkup",
  431. .class = &omap44xx_ctrl_module_hwmod_class,
  432. .clkdm_name = "l4_wkup_clkdm",
  433. .prcm = {
  434. .omap4 = {
  435. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  436. },
  437. },
  438. };
  439. /* ctrl_module_pad_wkup */
  440. static struct omap_hwmod omap44xx_ctrl_module_pad_wkup_hwmod = {
  441. .name = "ctrl_module_pad_wkup",
  442. .class = &omap44xx_ctrl_module_hwmod_class,
  443. .clkdm_name = "l4_wkup_clkdm",
  444. .prcm = {
  445. .omap4 = {
  446. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  447. },
  448. },
  449. };
  450. /*
  451. * 'debugss' class
  452. * debug and emulation sub system
  453. */
  454. static struct omap_hwmod_class omap44xx_debugss_hwmod_class = {
  455. .name = "debugss",
  456. };
  457. /* debugss */
  458. static struct omap_hwmod omap44xx_debugss_hwmod = {
  459. .name = "debugss",
  460. .class = &omap44xx_debugss_hwmod_class,
  461. .clkdm_name = "emu_sys_clkdm",
  462. .main_clk = "trace_clk_div_ck",
  463. .prcm = {
  464. .omap4 = {
  465. .clkctrl_offs = OMAP4_CM_EMU_DEBUGSS_CLKCTRL_OFFSET,
  466. .context_offs = OMAP4_RM_EMU_DEBUGSS_CONTEXT_OFFSET,
  467. },
  468. },
  469. };
  470. /*
  471. * 'dma' class
  472. * dma controller for data exchange between memory to memory (i.e. internal or
  473. * external memory) and gp peripherals to memory or memory to gp peripherals
  474. */
  475. static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
  476. .rev_offs = 0x0000,
  477. .sysc_offs = 0x002c,
  478. .syss_offs = 0x0028,
  479. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  480. SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  481. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  482. SYSS_HAS_RESET_STATUS),
  483. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  484. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  485. .sysc_fields = &omap_hwmod_sysc_type1,
  486. };
  487. static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
  488. .name = "dma",
  489. .sysc = &omap44xx_dma_sysc,
  490. };
  491. /* dma dev_attr */
  492. static struct omap_dma_dev_attr dma_dev_attr = {
  493. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  494. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  495. .lch_count = 32,
  496. };
  497. /* dma_system */
  498. static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
  499. { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
  500. { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
  501. { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
  502. { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
  503. { .irq = -1 }
  504. };
  505. static struct omap_hwmod omap44xx_dma_system_hwmod = {
  506. .name = "dma_system",
  507. .class = &omap44xx_dma_hwmod_class,
  508. .clkdm_name = "l3_dma_clkdm",
  509. .mpu_irqs = omap44xx_dma_system_irqs,
  510. .main_clk = "l3_div_ck",
  511. .prcm = {
  512. .omap4 = {
  513. .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
  514. .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
  515. },
  516. },
  517. .dev_attr = &dma_dev_attr,
  518. };
  519. /*
  520. * 'dmic' class
  521. * digital microphone controller
  522. */
  523. static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
  524. .rev_offs = 0x0000,
  525. .sysc_offs = 0x0010,
  526. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  527. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  528. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  529. SIDLE_SMART_WKUP),
  530. .sysc_fields = &omap_hwmod_sysc_type2,
  531. };
  532. static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
  533. .name = "dmic",
  534. .sysc = &omap44xx_dmic_sysc,
  535. };
  536. /* dmic */
  537. static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
  538. { .irq = 114 + OMAP44XX_IRQ_GIC_START },
  539. { .irq = -1 }
  540. };
  541. static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
  542. { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
  543. { .dma_req = -1 }
  544. };
  545. static struct omap_hwmod omap44xx_dmic_hwmod = {
  546. .name = "dmic",
  547. .class = &omap44xx_dmic_hwmod_class,
  548. .clkdm_name = "abe_clkdm",
  549. .mpu_irqs = omap44xx_dmic_irqs,
  550. .sdma_reqs = omap44xx_dmic_sdma_reqs,
  551. .main_clk = "dmic_fck",
  552. .prcm = {
  553. .omap4 = {
  554. .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
  555. .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
  556. .modulemode = MODULEMODE_SWCTRL,
  557. },
  558. },
  559. };
  560. /*
  561. * 'dsp' class
  562. * dsp sub-system
  563. */
  564. static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
  565. .name = "dsp",
  566. };
  567. /* dsp */
  568. static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
  569. { .irq = 28 + OMAP44XX_IRQ_GIC_START },
  570. { .irq = -1 }
  571. };
  572. static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
  573. { .name = "dsp", .rst_shift = 0 },
  574. };
  575. static struct omap_hwmod omap44xx_dsp_hwmod = {
  576. .name = "dsp",
  577. .class = &omap44xx_dsp_hwmod_class,
  578. .clkdm_name = "tesla_clkdm",
  579. .mpu_irqs = omap44xx_dsp_irqs,
  580. .rst_lines = omap44xx_dsp_resets,
  581. .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
  582. .main_clk = "dpll_iva_m4x2_ck",
  583. .prcm = {
  584. .omap4 = {
  585. .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
  586. .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
  587. .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
  588. .modulemode = MODULEMODE_HWCTRL,
  589. },
  590. },
  591. };
  592. /*
  593. * 'dss' class
  594. * display sub-system
  595. */
  596. static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
  597. .rev_offs = 0x0000,
  598. .syss_offs = 0x0014,
  599. .sysc_flags = SYSS_HAS_RESET_STATUS,
  600. };
  601. static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
  602. .name = "dss",
  603. .sysc = &omap44xx_dss_sysc,
  604. .reset = omap_dss_reset,
  605. };
  606. /* dss */
  607. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  608. { .role = "sys_clk", .clk = "dss_sys_clk" },
  609. { .role = "tv_clk", .clk = "dss_tv_clk" },
  610. { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
  611. };
  612. static struct omap_hwmod omap44xx_dss_hwmod = {
  613. .name = "dss_core",
  614. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  615. .class = &omap44xx_dss_hwmod_class,
  616. .clkdm_name = "l3_dss_clkdm",
  617. .main_clk = "dss_dss_clk",
  618. .prcm = {
  619. .omap4 = {
  620. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  621. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  622. },
  623. },
  624. .opt_clks = dss_opt_clks,
  625. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  626. };
  627. /*
  628. * 'dispc' class
  629. * display controller
  630. */
  631. static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
  632. .rev_offs = 0x0000,
  633. .sysc_offs = 0x0010,
  634. .syss_offs = 0x0014,
  635. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  636. SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
  637. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  638. SYSS_HAS_RESET_STATUS),
  639. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  640. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  641. .sysc_fields = &omap_hwmod_sysc_type1,
  642. };
  643. static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
  644. .name = "dispc",
  645. .sysc = &omap44xx_dispc_sysc,
  646. };
  647. /* dss_dispc */
  648. static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
  649. { .irq = 25 + OMAP44XX_IRQ_GIC_START },
  650. { .irq = -1 }
  651. };
  652. static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
  653. { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
  654. { .dma_req = -1 }
  655. };
  656. static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = {
  657. .manager_count = 3,
  658. .has_framedonetv_irq = 1
  659. };
  660. static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
  661. .name = "dss_dispc",
  662. .class = &omap44xx_dispc_hwmod_class,
  663. .clkdm_name = "l3_dss_clkdm",
  664. .mpu_irqs = omap44xx_dss_dispc_irqs,
  665. .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
  666. .main_clk = "dss_dss_clk",
  667. .prcm = {
  668. .omap4 = {
  669. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  670. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  671. },
  672. },
  673. .dev_attr = &omap44xx_dss_dispc_dev_attr
  674. };
  675. /*
  676. * 'dsi' class
  677. * display serial interface controller
  678. */
  679. static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
  680. .rev_offs = 0x0000,
  681. .sysc_offs = 0x0010,
  682. .syss_offs = 0x0014,
  683. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  684. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  685. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  686. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  687. .sysc_fields = &omap_hwmod_sysc_type1,
  688. };
  689. static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
  690. .name = "dsi",
  691. .sysc = &omap44xx_dsi_sysc,
  692. };
  693. /* dss_dsi1 */
  694. static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
  695. { .irq = 53 + OMAP44XX_IRQ_GIC_START },
  696. { .irq = -1 }
  697. };
  698. static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
  699. { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
  700. { .dma_req = -1 }
  701. };
  702. static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
  703. { .role = "sys_clk", .clk = "dss_sys_clk" },