synchronousMemoryDatabase.c 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894
  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" },
  704. };
  705. static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
  706. .name = "dss_dsi1",
  707. .class = &omap44xx_dsi_hwmod_class,
  708. .clkdm_name = "l3_dss_clkdm",
  709. .mpu_irqs = omap44xx_dss_dsi1_irqs,
  710. .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
  711. .main_clk = "dss_dss_clk",
  712. .prcm = {
  713. .omap4 = {
  714. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  715. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  716. },
  717. },
  718. .opt_clks = dss_dsi1_opt_clks,
  719. .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
  720. };
  721. /* dss_dsi2 */
  722. static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
  723. { .irq = 84 + OMAP44XX_IRQ_GIC_START },
  724. { .irq = -1 }
  725. };
  726. static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
  727. { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
  728. { .dma_req = -1 }
  729. };
  730. static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
  731. { .role = "sys_clk", .clk = "dss_sys_clk" },
  732. };
  733. static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
  734. .name = "dss_dsi2",
  735. .class = &omap44xx_dsi_hwmod_class,
  736. .clkdm_name = "l3_dss_clkdm",
  737. .mpu_irqs = omap44xx_dss_dsi2_irqs,
  738. .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
  739. .main_clk = "dss_dss_clk",
  740. .prcm = {
  741. .omap4 = {
  742. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  743. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  744. },
  745. },
  746. .opt_clks = dss_dsi2_opt_clks,
  747. .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
  748. };
  749. /*
  750. * 'hdmi' class
  751. * hdmi controller
  752. */
  753. static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
  754. .rev_offs = 0x0000,
  755. .sysc_offs = 0x0010,
  756. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  757. SYSC_HAS_SOFTRESET),
  758. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  759. SIDLE_SMART_WKUP),
  760. .sysc_fields = &omap_hwmod_sysc_type2,
  761. };
  762. static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
  763. .name = "hdmi",
  764. .sysc = &omap44xx_hdmi_sysc,
  765. };
  766. /* dss_hdmi */
  767. static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
  768. { .irq = 101 + OMAP44XX_IRQ_GIC_START },
  769. { .irq = -1 }
  770. };
  771. static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
  772. { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
  773. { .dma_req = -1 }
  774. };
  775. static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
  776. { .role = "sys_clk", .clk = "dss_sys_clk" },
  777. };
  778. static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
  779. .name = "dss_hdmi",
  780. .class = &omap44xx_hdmi_hwmod_class,
  781. .clkdm_name = "l3_dss_clkdm",
  782. /*
  783. * HDMI audio requires to use no-idle mode. Hence,
  784. * set idle mode by software.
  785. */
  786. .flags = HWMOD_SWSUP_SIDLE,
  787. .mpu_irqs = omap44xx_dss_hdmi_irqs,
  788. .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
  789. .main_clk = "dss_48mhz_clk",
  790. .prcm = {
  791. .omap4 = {
  792. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  793. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  794. },
  795. },
  796. .opt_clks = dss_hdmi_opt_clks,
  797. .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
  798. };
  799. /*
  800. * 'rfbi' class
  801. * remote frame buffer interface
  802. */
  803. static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
  804. .rev_offs = 0x0000,
  805. .sysc_offs = 0x0010,
  806. .syss_offs = 0x0014,
  807. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  808. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  809. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  810. .sysc_fields = &omap_hwmod_sysc_type1,
  811. };
  812. static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
  813. .name = "rfbi",
  814. .sysc = &omap44xx_rfbi_sysc,
  815. };
  816. /* dss_rfbi */
  817. static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
  818. { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
  819. { .dma_req = -1 }
  820. };
  821. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  822. { .role = "ick", .clk = "dss_fck" },
  823. };
  824. static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
  825. .name = "dss_rfbi",
  826. .class = &omap44xx_rfbi_hwmod_class,
  827. .clkdm_name = "l3_dss_clkdm",
  828. .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
  829. .main_clk = "dss_dss_clk",
  830. .prcm = {
  831. .omap4 = {
  832. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  833. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  834. },
  835. },
  836. .opt_clks = dss_rfbi_opt_clks,
  837. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  838. };
  839. /*
  840. * 'venc' class
  841. * video encoder
  842. */
  843. static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
  844. .name = "venc",
  845. };
  846. /* dss_venc */
  847. static struct omap_hwmod omap44xx_dss_venc_hwmod = {
  848. .name = "dss_venc",
  849. .class = &omap44xx_venc_hwmod_class,
  850. .clkdm_name = "l3_dss_clkdm",
  851. .main_clk = "dss_tv_clk",
  852. .prcm = {
  853. .omap4 = {
  854. .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
  855. .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
  856. },
  857. },
  858. };
  859. /*
  860. * 'elm' class
  861. * bch error location module
  862. */
  863. static struct omap_hwmod_class_sysconfig omap44xx_elm_sysc = {
  864. .rev_offs = 0x0000,
  865. .sysc_offs = 0x0010,
  866. .syss_offs = 0x0014,
  867. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  868. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  869. SYSS_HAS_RESET_STATUS),
  870. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  871. .sysc_fields = &omap_hwmod_sysc_type1,
  872. };
  873. static struct omap_hwmod_class omap44xx_elm_hwmod_class = {
  874. .name = "elm",
  875. .sysc = &omap44xx_elm_sysc,
  876. };
  877. /* elm */
  878. static struct omap_hwmod_irq_info omap44xx_elm_irqs[] = {
  879. { .irq = 4 + OMAP44XX_IRQ_GIC_START },
  880. { .irq = -1 }
  881. };
  882. static struct omap_hwmod omap44xx_elm_hwmod = {
  883. .name = "elm",
  884. .class = &omap44xx_elm_hwmod_class,
  885. .clkdm_name = "l4_per_clkdm",
  886. .mpu_irqs = omap44xx_elm_irqs,
  887. .prcm = {
  888. .omap4 = {
  889. .clkctrl_offs = OMAP4_CM_L4PER_ELM_CLKCTRL_OFFSET,
  890. .context_offs = OMAP4_RM_L4PER_ELM_CONTEXT_OFFSET,
  891. },
  892. },
  893. };
  894. /*
  895. * 'emif' class
  896. * external memory interface no1
  897. */
  898. static struct omap_hwmod_class_sysconfig omap44xx_emif_sysc = {
  899. .rev_offs = 0x0000,
  900. };
  901. static struct omap_hwmod_class omap44xx_emif_hwmod_class = {
  902. .name = "emif",
  903. .sysc = &omap44xx_emif_sysc,
  904. };
  905. /* emif1 */
  906. static struct omap_hwmod_irq_info omap44xx_emif1_irqs[] = {
  907. { .irq = 110 + OMAP44XX_IRQ_GIC_START },
  908. { .irq = -1 }
  909. };
  910. static struct omap_hwmod omap44xx_emif1_hwmod = {
  911. .name = "emif1",
  912. .class = &omap44xx_emif_hwmod_class,
  913. .clkdm_name = "l3_emif_clkdm",
  914. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  915. .mpu_irqs = omap44xx_emif1_irqs,
  916. .main_clk = "ddrphy_ck",
  917. .prcm = {
  918. .omap4 = {
  919. .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_1_CLKCTRL_OFFSET,
  920. .context_offs = OMAP4_RM_MEMIF_EMIF_1_CONTEXT_OFFSET,
  921. .modulemode = MODULEMODE_HWCTRL,
  922. },
  923. },
  924. };
  925. /* emif2 */
  926. static struct omap_hwmod_irq_info omap44xx_emif2_irqs[] = {
  927. { .irq = 111 + OMAP44XX_IRQ_GIC_START },
  928. { .irq = -1 }
  929. };
  930. static struct omap_hwmod omap44xx_emif2_hwmod = {
  931. .name = "emif2",
  932. .class = &omap44xx_emif_hwmod_class,
  933. .clkdm_name = "l3_emif_clkdm",
  934. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  935. .mpu_irqs = omap44xx_emif2_irqs,
  936. .main_clk = "ddrphy_ck",
  937. .prcm = {
  938. .omap4 = {
  939. .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_2_CLKCTRL_OFFSET,
  940. .context_offs = OMAP4_RM_MEMIF_EMIF_2_CONTEXT_OFFSET,
  941. .modulemode = MODULEMODE_HWCTRL,
  942. },
  943. },
  944. };
  945. /*
  946. * 'fdif' class
  947. * face detection hw accelerator module
  948. */
  949. static struct omap_hwmod_class_sysconfig omap44xx_fdif_sysc = {
  950. .rev_offs = 0x0000,
  951. .sysc_offs = 0x0010,
  952. /*
  953. * FDIF needs 100 OCP clk cycles delay after a softreset before
  954. * accessing sysconfig again.
  955. * The lowest frequency at the moment for L3 bus is 100 MHz, so
  956. * 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
  957. *
  958. * TODO: Indicate errata when available.
  959. */
  960. .srst_udelay = 2,
  961. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
  962. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  963. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  964. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  965. .sysc_fields = &omap_hwmod_sysc_type2,
  966. };
  967. static struct omap_hwmod_class omap44xx_fdif_hwmod_class = {
  968. .name = "fdif",
  969. .sysc = &omap44xx_fdif_sysc,
  970. };
  971. /* fdif */
  972. static struct omap_hwmod_irq_info omap44xx_fdif_irqs[] = {
  973. { .irq = 69 + OMAP44XX_IRQ_GIC_START },
  974. { .irq = -1 }
  975. };
  976. static struct omap_hwmod omap44xx_fdif_hwmod = {
  977. .name = "fdif",
  978. .class = &omap44xx_fdif_hwmod_class,
  979. .clkdm_name = "iss_clkdm",
  980. .mpu_irqs = omap44xx_fdif_irqs,
  981. .main_clk = "fdif_fck",
  982. .prcm = {
  983. .omap4 = {
  984. .clkctrl_offs = OMAP4_CM_CAM_FDIF_CLKCTRL_OFFSET,
  985. .context_offs = OMAP4_RM_CAM_FDIF_CONTEXT_OFFSET,
  986. .modulemode = MODULEMODE_SWCTRL,
  987. },
  988. },
  989. };
  990. /*
  991. * 'gpio' class
  992. * general purpose io module
  993. */
  994. static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
  995. .rev_offs = 0x0000,
  996. .sysc_offs = 0x0010,
  997. .syss_offs = 0x0114,
  998. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  999. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1000. SYSS_HAS_RESET_STATUS),
  1001. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1002. SIDLE_SMART_WKUP),
  1003. .sysc_fields = &omap_hwmod_sysc_type1,
  1004. };
  1005. static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
  1006. .name = "gpio",
  1007. .sysc = &omap44xx_gpio_sysc,
  1008. .rev = 2,
  1009. };
  1010. /* gpio dev_attr */
  1011. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1012. .bank_width = 32,
  1013. .dbck_flag = true,
  1014. };
  1015. /* gpio1 */
  1016. static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
  1017. { .irq = 29 + OMAP44XX_IRQ_GIC_START },
  1018. { .irq = -1 }
  1019. };
  1020. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  1021. { .role = "dbclk", .clk = "gpio1_dbclk" },
  1022. };
  1023. static struct omap_hwmod omap44xx_gpio1_hwmod = {
  1024. .name = "gpio1",
  1025. .class = &omap44xx_gpio_hwmod_class,
  1026. .clkdm_name = "l4_wkup_clkdm",
  1027. .mpu_irqs = omap44xx_gpio1_irqs,
  1028. .main_clk = "gpio1_ick",
  1029. .prcm = {
  1030. .omap4 = {
  1031. .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
  1032. .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
  1033. .modulemode = MODULEMODE_HWCTRL,
  1034. },
  1035. },
  1036. .opt_clks = gpio1_opt_clks,
  1037. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  1038. .dev_attr = &gpio_dev_attr,
  1039. };
  1040. /* gpio2 */
  1041. static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
  1042. { .irq = 30 + OMAP44XX_IRQ_GIC_START },
  1043. { .irq = -1 }
  1044. };
  1045. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  1046. { .role = "dbclk", .clk = "gpio2_dbclk" },
  1047. };
  1048. static struct omap_hwmod omap44xx_gpio2_hwmod = {
  1049. .name = "gpio2",
  1050. .class = &omap44xx_gpio_hwmod_class,
  1051. .clkdm_name = "l4_per_clkdm",
  1052. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1053. .mpu_irqs = omap44xx_gpio2_irqs,
  1054. .main_clk = "gpio2_ick",
  1055. .prcm = {
  1056. .omap4 = {
  1057. .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
  1058. .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
  1059. .modulemode = MODULEMODE_HWCTRL,
  1060. },
  1061. },
  1062. .opt_clks = gpio2_opt_clks,
  1063. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  1064. .dev_attr = &gpio_dev_attr,
  1065. };
  1066. /* gpio3 */
  1067. static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
  1068. { .irq = 31 + OMAP44XX_IRQ_GIC_START },
  1069. { .irq = -1 }
  1070. };
  1071. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  1072. { .role = "dbclk", .clk = "gpio3_dbclk" },
  1073. };
  1074. static struct omap_hwmod omap44xx_gpio3_hwmod = {
  1075. .name = "gpio3",
  1076. .class = &omap44xx_gpio_hwmod_class,
  1077. .clkdm_name = "l4_per_clkdm",
  1078. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1079. .mpu_irqs = omap44xx_gpio3_irqs,
  1080. .main_clk = "gpio3_ick",
  1081. .prcm = {
  1082. .omap4 = {
  1083. .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
  1084. .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
  1085. .modulemode = MODULEMODE_HWCTRL,
  1086. },
  1087. },
  1088. .opt_clks = gpio3_opt_clks,
  1089. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  1090. .dev_attr = &gpio_dev_attr,
  1091. };
  1092. /* gpio4 */
  1093. static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
  1094. { .irq = 32 + OMAP44XX_IRQ_GIC_START },
  1095. { .irq = -1 }
  1096. };
  1097. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  1098. { .role = "dbclk", .clk = "gpio4_dbclk" },
  1099. };
  1100. static struct omap_hwmod omap44xx_gpio4_hwmod = {
  1101. .name = "gpio4",
  1102. .class = &omap44xx_gpio_hwmod_class,
  1103. .clkdm_name = "l4_per_clkdm",
  1104. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1105. .mpu_irqs = omap44xx_gpio4_irqs,
  1106. .main_clk = "gpio4_ick",
  1107. .prcm = {
  1108. .omap4 = {
  1109. .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
  1110. .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
  1111. .modulemode = MODULEMODE_HWCTRL,
  1112. },
  1113. },
  1114. .opt_clks = gpio4_opt_clks,
  1115. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  1116. .dev_attr = &gpio_dev_attr,
  1117. };
  1118. /* gpio5 */
  1119. static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
  1120. { .irq = 33 + OMAP44XX_IRQ_GIC_START },
  1121. { .irq = -1 }
  1122. };
  1123. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  1124. { .role = "dbclk", .clk = "gpio5_dbclk" },
  1125. };
  1126. static struct omap_hwmod omap44xx_gpio5_hwmod = {
  1127. .name = "gpio5",
  1128. .class = &omap44xx_gpio_hwmod_class,
  1129. .clkdm_name = "l4_per_clkdm",
  1130. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1131. .mpu_irqs = omap44xx_gpio5_irqs,
  1132. .main_clk = "gpio5_ick",
  1133. .prcm = {
  1134. .omap4 = {
  1135. .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
  1136. .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
  1137. .modulemode = MODULEMODE_HWCTRL,
  1138. },
  1139. },
  1140. .opt_clks = gpio5_opt_clks,
  1141. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  1142. .dev_attr = &gpio_dev_attr,
  1143. };
  1144. /* gpio6 */
  1145. static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
  1146. { .irq = 34 + OMAP44XX_IRQ_GIC_START },
  1147. { .irq = -1 }
  1148. };
  1149. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  1150. { .role = "dbclk", .clk = "gpio6_dbclk" },
  1151. };
  1152. static struct omap_hwmod omap44xx_gpio6_hwmod = {
  1153. .name = "gpio6",
  1154. .class = &omap44xx_gpio_hwmod_class,
  1155. .clkdm_name = "l4_per_clkdm",
  1156. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1157. .mpu_irqs = omap44xx_gpio6_irqs,
  1158. .main_clk = "gpio6_ick",
  1159. .prcm = {
  1160. .omap4 = {
  1161. .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
  1162. .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
  1163. .modulemode = MODULEMODE_HWCTRL,
  1164. },
  1165. },
  1166. .opt_clks = gpio6_opt_clks,
  1167. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  1168. .dev_attr = &gpio_dev_attr,
  1169. };
  1170. /*
  1171. * 'gpmc' class
  1172. * general purpose memory controller
  1173. */
  1174. static struct omap_hwmod_class_sysconfig omap44xx_gpmc_sysc = {
  1175. .rev_offs = 0x0000,
  1176. .sysc_offs = 0x0010,
  1177. .syss_offs = 0x0014,
  1178. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1179. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1180. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1181. .sysc_fields = &omap_hwmod_sysc_type1,
  1182. };
  1183. static struct omap_hwmod_class omap44xx_gpmc_hwmod_class = {
  1184. .name = "gpmc",
  1185. .sysc = &omap44xx_gpmc_sysc,
  1186. };
  1187. /* gpmc */
  1188. static struct omap_hwmod_irq_info omap44xx_gpmc_irqs[] = {
  1189. { .irq = 20 + OMAP44XX_IRQ_GIC_START },
  1190. { .irq = -1 }
  1191. };
  1192. static struct omap_hwmod_dma_info omap44xx_gpmc_sdma_reqs[] = {
  1193. { .dma_req = 3 + OMAP44XX_DMA_REQ_START },
  1194. { .dma_req = -1 }
  1195. };
  1196. static struct omap_hwmod omap44xx_gpmc_hwmod = {
  1197. .name = "gpmc",
  1198. .class = &omap44xx_gpmc_hwmod_class,
  1199. .clkdm_name = "l3_2_clkdm",
  1200. /*
  1201. * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
  1202. * block. It is not being added due to any known bugs with
  1203. * resetting the GPMC IP block, but rather because any timings
  1204. * set by the bootloader are not being correctly programmed by
  1205. * the kernel from the board file or DT data.
  1206. * HWMOD_INIT_NO_RESET should be removed ASAP.
  1207. */
  1208. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  1209. .mpu_irqs = omap44xx_gpmc_irqs,
  1210. .sdma_reqs = omap44xx_gpmc_sdma_reqs,
  1211. .prcm = {
  1212. .omap4 = {
  1213. .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
  1214. .context_offs = OMAP4_RM_L3_2_GPMC_CONTEXT_OFFSET,
  1215. .modulemode = MODULEMODE_HWCTRL,
  1216. },
  1217. },
  1218. };
  1219. /*
  1220. * 'gpu' class
  1221. * 2d/3d graphics accelerator
  1222. */
  1223. static struct omap_hwmod_class_sysconfig omap44xx_gpu_sysc = {
  1224. .rev_offs = 0x1fc00,
  1225. .sysc_offs = 0x1fc10,
  1226. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
  1227. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1228. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1229. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1230. .sysc_fields = &omap_hwmod_sysc_type2,
  1231. };
  1232. static struct omap_hwmod_class omap44xx_gpu_hwmod_class = {
  1233. .name = "gpu",
  1234. .sysc = &omap44xx_gpu_sysc,
  1235. };
  1236. /* gpu */
  1237. static struct omap_hwmod_irq_info omap44xx_gpu_irqs[] = {
  1238. { .irq = 21 + OMAP44XX_IRQ_GIC_START },
  1239. { .irq = -1 }
  1240. };
  1241. static struct omap_hwmod omap44xx_gpu_hwmod = {
  1242. .name = "gpu",
  1243. .class = &omap44xx_gpu_hwmod_class,
  1244. .clkdm_name = "l3_gfx_clkdm",
  1245. .mpu_irqs = omap44xx_gpu_irqs,
  1246. .main_clk = "gpu_fck",
  1247. .prcm = {
  1248. .omap4 = {
  1249. .clkctrl_offs = OMAP4_CM_GFX_GFX_CLKCTRL_OFFSET,
  1250. .context_offs = OMAP4_RM_GFX_GFX_CONTEXT_OFFSET,
  1251. .modulemode = MODULEMODE_SWCTRL,
  1252. },
  1253. },
  1254. };
  1255. /*
  1256. * 'hdq1w' class
  1257. * hdq / 1-wire serial interface controller
  1258. */
  1259. static struct omap_hwmod_class_sysconfig omap44xx_hdq1w_sysc = {
  1260. .rev_offs = 0x0000,
  1261. .sysc_offs = 0x0014,
  1262. .syss_offs = 0x0018,
  1263. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
  1264. SYSS_HAS_RESET_STATUS),
  1265. .sysc_fields = &omap_hwmod_sysc_type1,
  1266. };
  1267. static struct omap_hwmod_class omap44xx_hdq1w_hwmod_class = {
  1268. .name = "hdq1w",
  1269. .sysc = &omap44xx_hdq1w_sysc,
  1270. };
  1271. /* hdq1w */
  1272. static struct omap_hwmod_irq_info omap44xx_hdq1w_irqs[] = {
  1273. { .irq = 58 + OMAP44XX_IRQ_GIC_START },
  1274. { .irq = -1 }
  1275. };
  1276. static struct omap_hwmod omap44xx_hdq1w_hwmod = {
  1277. .name = "hdq1w",
  1278. .class = &omap44xx_hdq1w_hwmod_class,
  1279. .clkdm_name = "l4_per_clkdm",
  1280. .flags = HWMOD_INIT_NO_RESET, /* XXX temporary */
  1281. .mpu_irqs = omap44xx_hdq1w_irqs,
  1282. .main_clk = "hdq1w_fck",
  1283. .prcm = {
  1284. .omap4 = {
  1285. .clkctrl_offs = OMAP4_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
  1286. .context_offs = OMAP4_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
  1287. .modulemode = MODULEMODE_SWCTRL,
  1288. },
  1289. },
  1290. };
  1291. /*
  1292. * 'hsi' class
  1293. * mipi high-speed synchronous serial interface (multichannel and full-duplex
  1294. * serial if)
  1295. */
  1296. static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
  1297. .rev_offs = 0x0000,
  1298. .sysc_offs = 0x0010,
  1299. .syss_offs = 0x0014,
  1300. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
  1301. SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
  1302. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1303. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1304. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1305. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1306. .sysc_fields = &omap_hwmod_sysc_type1,
  1307. };
  1308. static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
  1309. .name = "hsi",
  1310. .sysc = &omap44xx_hsi_sysc,
  1311. };
  1312. /* hsi */
  1313. static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
  1314. { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
  1315. { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
  1316. { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
  1317. { .irq = -1 }
  1318. };
  1319. static struct omap_hwmod omap44xx_hsi_hwmod = {
  1320. .name = "hsi",
  1321. .class = &omap44xx_hsi_hwmod_class,
  1322. .clkdm_name = "l3_init_clkdm",
  1323. .mpu_irqs = omap44xx_hsi_irqs,
  1324. .main_clk = "hsi_fck",
  1325. .prcm = {
  1326. .omap4 = {
  1327. .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
  1328. .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
  1329. .modulemode = MODULEMODE_HWCTRL,
  1330. },
  1331. },
  1332. };
  1333. /*
  1334. * 'i2c' class
  1335. * multimaster high-speed i2c controller
  1336. */
  1337. static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
  1338. .sysc_offs = 0x0010,
  1339. .syss_offs = 0x0090,
  1340. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  1341. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1342. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1343. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1344. SIDLE_SMART_WKUP),
  1345. .clockact = CLOCKACT_TEST_ICLK,
  1346. .sysc_fields = &omap_hwmod_sysc_type1,
  1347. };
  1348. static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
  1349. .name = "i2c",
  1350. .sysc = &omap44xx_i2c_sysc,
  1351. .rev = OMAP_I2C_IP_VERSION_2,
  1352. .reset = &omap_i2c_reset,
  1353. };
  1354. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1355. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  1356. };
  1357. /* i2c1 */
  1358. static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
  1359. { .irq = 56 + OMAP44XX_IRQ_GIC_START },
  1360. { .irq = -1 }
  1361. };
  1362. static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
  1363. { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
  1364. { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
  1365. { .dma_req = -1 }
  1366. };
  1367. static struct omap_hwmod omap44xx_i2c1_hwmod = {
  1368. .name = "i2c1",
  1369. .class = &omap44xx_i2c_hwmod_class,
  1370. .clkdm_name = "l4_per_clkdm",
  1371. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1372. .mpu_irqs = omap44xx_i2c1_irqs,
  1373. .sdma_reqs = omap44xx_i2c1_sdma_reqs,
  1374. .main_clk = "i2c1_fck",
  1375. .prcm = {
  1376. .omap4 = {
  1377. .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
  1378. .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
  1379. .modulemode = MODULEMODE_SWCTRL,
  1380. },
  1381. },
  1382. .dev_attr = &i2c_dev_attr,
  1383. };
  1384. /* i2c2 */
  1385. static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
  1386. { .irq = 57 + OMAP44XX_IRQ_GIC_START },
  1387. { .irq = -1 }
  1388. };
  1389. static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
  1390. { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
  1391. { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
  1392. { .dma_req = -1 }
  1393. };
  1394. static struct omap_hwmod omap44xx_i2c2_hwmod = {
  1395. .name = "i2c2",
  1396. .class = &omap44xx_i2c_hwmod_class,
  1397. .clkdm_name = "l4_per_clkdm",
  1398. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1399. .mpu_irqs = omap44xx_i2c2_irqs,
  1400. .sdma_reqs = omap44xx_i2c2_sdma_reqs,
  1401. .main_clk = "i2c2_fck",
  1402. .prcm = {
  1403. .omap4 = {
  1404. .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
  1405. .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
  1406. .modulemode = MODULEMODE_SWCTRL,
  1407. },
  1408. },
  1409. .dev_attr = &i2c_dev_attr,
  1410. };
  1411. /* i2c3 */
  1412. static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
  1413. { .irq = 61 + OMAP44XX_IRQ_GIC_START },
  1414. { .irq = -1 }
  1415. };
  1416. static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
  1417. { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
  1418. { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
  1419. { .dma_req = -1 }
  1420. };
  1421. static struct omap_hwmod omap44xx_i2c3_hwmod = {
  1422. .name = "i2c3",
  1423. .class = &omap44xx_i2c_hwmod_class,
  1424. .clkdm_name = "l4_per_clkdm",
  1425. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1426. .mpu_irqs = omap44xx_i2c3_irqs,
  1427. .sdma_reqs = omap44xx_i2c3_sdma_reqs,
  1428. .main_clk = "i2c3_fck",
  1429. .prcm = {
  1430. .omap4 = {
  1431. .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
  1432. .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
  1433. .modulemode = MODULEMODE_SWCTRL,
  1434. },
  1435. },
  1436. .dev_attr = &i2c_dev_attr,
  1437. };
  1438. /* i2c4 */
  1439. static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
  1440. { .irq = 62 + OMAP44XX_IRQ_GIC_START },
  1441. { .irq = -1 }
  1442. };
  1443. static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
  1444. { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
  1445. { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
  1446. { .dma_req = -1 }
  1447. };
  1448. static struct omap_hwmod omap44xx_i2c4_hwmod = {
  1449. .name = "i2c4",
  1450. .class = &omap44xx_i2c_hwmod_class,
  1451. .clkdm_name = "l4_per_clkdm",
  1452. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1453. .mpu_irqs = omap44xx_i2c4_irqs,
  1454. .sdma_reqs = omap44xx_i2c4_sdma_reqs,
  1455. .main_clk = "i2c4_fck",
  1456. .prcm = {
  1457. .omap4 = {
  1458. .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
  1459. .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
  1460. .modulemode = MODULEMODE_SWCTRL,
  1461. },
  1462. },
  1463. .dev_attr = &i2c_dev_attr,
  1464. };
  1465. /*
  1466. * 'ipu' class
  1467. * imaging processor unit
  1468. */
  1469. static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
  1470. .name = "ipu",
  1471. };
  1472. /* ipu */
  1473. static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
  1474. { .irq = 100 + OMAP44XX_IRQ_GIC_START },
  1475. { .irq = -1 }
  1476. };
  1477. static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
  1478. { .name = "cpu0", .rst_shift = 0 },
  1479. { .name = "cpu1", .rst_shift = 1 },
  1480. };
  1481. static struct omap_hwmod omap44xx_ipu_hwmod = {
  1482. .name = "ipu",
  1483. .class = &omap44xx_ipu_hwmod_class,
  1484. .clkdm_name = "ducati_clkdm",
  1485. .mpu_irqs = omap44xx_ipu_irqs,
  1486. .rst_lines = omap44xx_ipu_resets,
  1487. .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
  1488. .main_clk = "ducati_clk_mux_ck",
  1489. .prcm = {
  1490. .omap4 = {
  1491. .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
  1492. .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
  1493. .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
  1494. .modulemode = MODULEMODE_HWCTRL,
  1495. },
  1496. },
  1497. };
  1498. /*
  1499. * 'iss' class
  1500. * external images sensor pixel data processor
  1501. */
  1502. static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
  1503. .rev_offs = 0x0000,
  1504. .sysc_offs = 0x0010,
  1505. /*
  1506. * ISS needs 100 OCP clk cycles delay after a softreset before
  1507. * accessing sysconfig again.
  1508. * The lowest frequency at the moment for L3 bus is 100 MHz, so
  1509. * 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
  1510. *
  1511. * TODO: Indicate errata when available.
  1512. */
  1513. .srst_udelay = 2,
  1514. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
  1515. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1516. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1517. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1518. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1519. .sysc_fields = &omap_hwmod_sysc_type2,
  1520. };
  1521. static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
  1522. .name = "iss",
  1523. .sysc = &omap44xx_iss_sysc,
  1524. };
  1525. /* iss */
  1526. static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
  1527. { .irq = 24 + OMAP44XX_IRQ_GIC_START },
  1528. { .irq = -1 }
  1529. };
  1530. static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
  1531. { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
  1532. { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
  1533. { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
  1534. { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
  1535. { .dma_req = -1 }
  1536. };
  1537. static struct omap_hwmod_opt_clk iss_opt_clks[] = {
  1538. { .role = "ctrlclk", .clk = "iss_ctrlclk" },
  1539. };
  1540. static struct omap_hwmod omap44xx_iss_hwmod = {
  1541. .name = "iss",
  1542. .class = &omap44xx_iss_hwmod_class,
  1543. .clkdm_name = "iss_clkdm",
  1544. .mpu_irqs = omap44xx_iss_irqs,
  1545. .sdma_reqs = omap44xx_iss_sdma_reqs,
  1546. .main_clk = "iss_fck",
  1547. .prcm = {
  1548. .omap4 = {
  1549. .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
  1550. .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
  1551. .modulemode = MODULEMODE_SWCTRL,
  1552. },
  1553. },
  1554. .opt_clks = iss_opt_clks,
  1555. .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
  1556. };
  1557. /*
  1558. * 'iva' class
  1559. * multi-standard video encoder/decoder hardware accelerator
  1560. */
  1561. static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
  1562. .name = "iva",
  1563. };
  1564. /* iva */
  1565. static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
  1566. { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
  1567. { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
  1568. { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
  1569. { .irq = -1 }
  1570. };
  1571. static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
  1572. { .name = "seq0", .rst_shift = 0 },
  1573. { .name = "seq1", .rst_shift = 1 },
  1574. { .name = "logic", .rst_shift = 2 },
  1575. };
  1576. static struct omap_hwmod omap44xx_iva_hwmod = {
  1577. .name = "iva",
  1578. .class = &omap44xx_iva_hwmod_class,
  1579. .clkdm_name = "ivahd_clkdm",
  1580. .mpu_irqs = omap44xx_iva_irqs,
  1581. .rst_lines = omap44xx_iva_resets,
  1582. .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
  1583. .main_clk = "iva_fck",
  1584. .prcm = {
  1585. .omap4 = {
  1586. .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
  1587. .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
  1588. .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
  1589. .modulemode = MODULEMODE_HWCTRL,
  1590. },
  1591. },
  1592. };
  1593. /*
  1594. * 'kbd' class
  1595. * keyboard controller
  1596. */
  1597. static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
  1598. .rev_offs = 0x0000,
  1599. .sysc_offs = 0x0010,
  1600. .syss_offs = 0x0014,
  1601. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  1602. SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
  1603. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1604. SYSS_HAS_RESET_STATUS),
  1605. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1606. .sysc_fields = &omap_hwmod_sysc_type1,
  1607. };
  1608. static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
  1609. .name = "kbd",
  1610. .sysc = &omap44xx_kbd_sysc,
  1611. };
  1612. /* kbd */
  1613. static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
  1614. { .irq = 120 + OMAP44XX_IRQ_GIC_START },
  1615. { .irq = -1 }
  1616. };
  1617. static struct omap_hwmod omap44xx_kbd_hwmod = {
  1618. .name = "kbd",
  1619. .class = &omap44xx_kbd_hwmod_class,
  1620. .clkdm_name = "l4_wkup_clkdm",
  1621. .mpu_irqs = omap44xx_kbd_irqs,
  1622. .main_clk = "kbd_fck",
  1623. .prcm = {
  1624. .omap4 = {
  1625. .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
  1626. .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
  1627. .modulemode = MODULEMODE_SWCTRL,
  1628. },
  1629. },
  1630. };
  1631. /*
  1632. * 'mailbox' class
  1633. * mailbox module allowing communication between the on-chip processors using a
  1634. * queued mailbox-interrupt mechanism.
  1635. */
  1636. static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
  1637. .rev_offs = 0x0000,
  1638. .sysc_offs = 0x0010,
  1639. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1640. SYSC_HAS_SOFTRESET),
  1641. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1642. .sysc_fields = &omap_hwmod_sysc_type2,
  1643. };
  1644. static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
  1645. .name = "mailbox",
  1646. .sysc = &omap44xx_mailbox_sysc,
  1647. };
  1648. /* mailbox */
  1649. static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
  1650. { .irq = 26 + OMAP44XX_IRQ_GIC_START },
  1651. { .irq = -1 }
  1652. };
  1653. static struct omap_hwmod omap44xx_mailbox_hwmod = {
  1654. .name = "mailbox",
  1655. .class = &omap44xx_mailbox_hwmod_class,
  1656. .clkdm_name = "l4_cfg_clkdm",
  1657. .mpu_irqs = omap44xx_mailbox_irqs,
  1658. .prcm = {
  1659. .omap4 = {
  1660. .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
  1661. .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
  1662. },
  1663. },
  1664. };
  1665. /*
  1666. * 'mcasp' class
  1667. * multi-channel audio serial port controller
  1668. */
  1669. /* The IP is not compliant to type1 / type2 scheme */
  1670. static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_mcasp = {
  1671. .sidle_shift = 0,
  1672. };
  1673. static struct omap_hwmod_class_sysconfig omap44xx_mcasp_sysc = {
  1674. .sysc_offs = 0x0004,
  1675. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1676. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |