omap_hwmod_44xx_data.c 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909
  1. /*
  2. * Hardware modules present on the OMAP44xx chips
  3. *
  4. * Copyright (C) 2009-2010 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 <plat/omap_hwmod.h>
  22. #include <plat/cpu.h>
  23. #include <plat/gpio.h>
  24. #include <plat/dma.h>
  25. #include "omap_hwmod_common_data.h"
  26. #include "cm1_44xx.h"
  27. #include "cm2_44xx.h"
  28. #include "prm44xx.h"
  29. #include "prm-regbits-44xx.h"
  30. #include "wd_timer.h"
  31. /* Base offset for all OMAP4 interrupts external to MPUSS */
  32. #define OMAP44XX_IRQ_GIC_START 32
  33. /* Base offset for all OMAP4 dma requests */
  34. #define OMAP44XX_DMA_REQ_START 1
  35. /* Backward references (IPs with Bus Master capability) */
  36. static struct omap_hwmod omap44xx_dma_system_hwmod;
  37. static struct omap_hwmod omap44xx_dmm_hwmod;
  38. static struct omap_hwmod omap44xx_dsp_hwmod;
  39. static struct omap_hwmod omap44xx_emif_fw_hwmod;
  40. static struct omap_hwmod omap44xx_iva_hwmod;
  41. static struct omap_hwmod omap44xx_l3_instr_hwmod;
  42. static struct omap_hwmod omap44xx_l3_main_1_hwmod;
  43. static struct omap_hwmod omap44xx_l3_main_2_hwmod;
  44. static struct omap_hwmod omap44xx_l3_main_3_hwmod;
  45. static struct omap_hwmod omap44xx_l4_abe_hwmod;
  46. static struct omap_hwmod omap44xx_l4_cfg_hwmod;
  47. static struct omap_hwmod omap44xx_l4_per_hwmod;
  48. static struct omap_hwmod omap44xx_l4_wkup_hwmod;
  49. static struct omap_hwmod omap44xx_mpu_hwmod;
  50. static struct omap_hwmod omap44xx_mpu_private_hwmod;
  51. /*
  52. * Interconnects omap_hwmod structures
  53. * hwmods that compose the global OMAP interconnect
  54. */
  55. /*
  56. * 'dmm' class
  57. * instance(s): dmm
  58. */
  59. static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
  60. .name = "dmm",
  61. };
  62. /* dmm interface data */
  63. /* l3_main_1 -> dmm */
  64. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
  65. .master = &omap44xx_l3_main_1_hwmod,
  66. .slave = &omap44xx_dmm_hwmod,
  67. .clk = "l3_div_ck",
  68. .user = OCP_USER_SDMA,
  69. };
  70. static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
  71. {
  72. .pa_start = 0x4e000000,
  73. .pa_end = 0x4e0007ff,
  74. .flags = ADDR_TYPE_RT
  75. },
  76. };
  77. /* mpu -> dmm */
  78. static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
  79. .master = &omap44xx_mpu_hwmod,
  80. .slave = &omap44xx_dmm_hwmod,
  81. .clk = "l3_div_ck",
  82. .addr = omap44xx_dmm_addrs,
  83. .addr_cnt = ARRAY_SIZE(omap44xx_dmm_addrs),
  84. .user = OCP_USER_MPU,
  85. };
  86. /* dmm slave ports */
  87. static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
  88. &omap44xx_l3_main_1__dmm,
  89. &omap44xx_mpu__dmm,
  90. };
  91. static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
  92. { .irq = 113 + OMAP44XX_IRQ_GIC_START },
  93. };
  94. static struct omap_hwmod omap44xx_dmm_hwmod = {
  95. .name = "dmm",
  96. .class = &omap44xx_dmm_hwmod_class,
  97. .slaves = omap44xx_dmm_slaves,
  98. .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
  99. .mpu_irqs = omap44xx_dmm_irqs,
  100. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs),
  101. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  102. };
  103. /*
  104. * 'emif_fw' class
  105. * instance(s): emif_fw
  106. */
  107. static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
  108. .name = "emif_fw",
  109. };
  110. /* emif_fw interface data */
  111. /* dmm -> emif_fw */
  112. static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
  113. .master = &omap44xx_dmm_hwmod,
  114. .slave = &omap44xx_emif_fw_hwmod,
  115. .clk = "l3_div_ck",
  116. .user = OCP_USER_MPU | OCP_USER_SDMA,
  117. };
  118. static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
  119. {
  120. .pa_start = 0x4a20c000,
  121. .pa_end = 0x4a20c0ff,
  122. .flags = ADDR_TYPE_RT
  123. },
  124. };
  125. /* l4_cfg -> emif_fw */
  126. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
  127. .master = &omap44xx_l4_cfg_hwmod,
  128. .slave = &omap44xx_emif_fw_hwmod,
  129. .clk = "l4_div_ck",
  130. .addr = omap44xx_emif_fw_addrs,
  131. .addr_cnt = ARRAY_SIZE(omap44xx_emif_fw_addrs),
  132. .user = OCP_USER_MPU,
  133. };
  134. /* emif_fw slave ports */
  135. static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
  136. &omap44xx_dmm__emif_fw,
  137. &omap44xx_l4_cfg__emif_fw,
  138. };
  139. static struct omap_hwmod omap44xx_emif_fw_hwmod = {
  140. .name = "emif_fw",
  141. .class = &omap44xx_emif_fw_hwmod_class,
  142. .slaves = omap44xx_emif_fw_slaves,
  143. .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
  144. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  145. };
  146. /*
  147. * 'l3' class
  148. * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
  149. */
  150. static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
  151. .name = "l3",
  152. };
  153. /* l3_instr interface data */
  154. /* iva -> l3_instr */
  155. static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
  156. .master = &omap44xx_iva_hwmod,
  157. .slave = &omap44xx_l3_instr_hwmod,
  158. .clk = "l3_div_ck",
  159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  160. };
  161. /* l3_main_3 -> l3_instr */
  162. static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
  163. .master = &omap44xx_l3_main_3_hwmod,
  164. .slave = &omap44xx_l3_instr_hwmod,
  165. .clk = "l3_div_ck",
  166. .user = OCP_USER_MPU | OCP_USER_SDMA,
  167. };
  168. /* l3_instr slave ports */
  169. static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
  170. &omap44xx_iva__l3_instr,
  171. &omap44xx_l3_main_3__l3_instr,
  172. };
  173. static struct omap_hwmod omap44xx_l3_instr_hwmod = {
  174. .name = "l3_instr",
  175. .class = &omap44xx_l3_hwmod_class,
  176. .slaves = omap44xx_l3_instr_slaves,
  177. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
  178. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  179. };
  180. /* l3_main_1 interface data */
  181. /* dsp -> l3_main_1 */
  182. static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
  183. .master = &omap44xx_dsp_hwmod,
  184. .slave = &omap44xx_l3_main_1_hwmod,
  185. .clk = "l3_div_ck",
  186. .user = OCP_USER_MPU | OCP_USER_SDMA,
  187. };
  188. /* l3_main_2 -> l3_main_1 */
  189. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
  190. .master = &omap44xx_l3_main_2_hwmod,
  191. .slave = &omap44xx_l3_main_1_hwmod,
  192. .clk = "l3_div_ck",
  193. .user = OCP_USER_MPU | OCP_USER_SDMA,
  194. };
  195. /* l4_cfg -> l3_main_1 */
  196. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
  197. .master = &omap44xx_l4_cfg_hwmod,
  198. .slave = &omap44xx_l3_main_1_hwmod,
  199. .clk = "l4_div_ck",
  200. .user = OCP_USER_MPU | OCP_USER_SDMA,
  201. };
  202. /* mpu -> l3_main_1 */
  203. static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
  204. .master = &omap44xx_mpu_hwmod,
  205. .slave = &omap44xx_l3_main_1_hwmod,
  206. .clk = "l3_div_ck",
  207. .user = OCP_USER_MPU | OCP_USER_SDMA,
  208. };
  209. /* l3_main_1 slave ports */
  210. static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
  211. &omap44xx_dsp__l3_main_1,
  212. &omap44xx_l3_main_2__l3_main_1,
  213. &omap44xx_l4_cfg__l3_main_1,
  214. &omap44xx_mpu__l3_main_1,
  215. };
  216. static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
  217. .name = "l3_main_1",
  218. .class = &omap44xx_l3_hwmod_class,
  219. .slaves = omap44xx_l3_main_1_slaves,
  220. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
  221. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  222. };
  223. /* l3_main_2 interface data */
  224. /* iva -> l3_main_2 */
  225. static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
  226. .master = &omap44xx_iva_hwmod,
  227. .slave = &omap44xx_l3_main_2_hwmod,
  228. .clk = "l3_div_ck",
  229. .user = OCP_USER_MPU | OCP_USER_SDMA,
  230. };
  231. /* l3_main_1 -> l3_main_2 */
  232. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
  233. .master = &omap44xx_l3_main_1_hwmod,
  234. .slave = &omap44xx_l3_main_2_hwmod,
  235. .clk = "l3_div_ck",
  236. .user = OCP_USER_MPU | OCP_USER_SDMA,
  237. };
  238. /* dma_system -> l3_main_2 */
  239. static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
  240. .master = &omap44xx_dma_system_hwmod,
  241. .slave = &omap44xx_l3_main_2_hwmod,
  242. .clk = "l3_div_ck",
  243. .user = OCP_USER_MPU | OCP_USER_SDMA,
  244. };
  245. /* l4_cfg -> l3_main_2 */
  246. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
  247. .master = &omap44xx_l4_cfg_hwmod,
  248. .slave = &omap44xx_l3_main_2_hwmod,
  249. .clk = "l4_div_ck",
  250. .user = OCP_USER_MPU | OCP_USER_SDMA,
  251. };
  252. /* l3_main_2 slave ports */
  253. static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
  254. &omap44xx_dma_system__l3_main_2,
  255. &omap44xx_iva__l3_main_2,
  256. &omap44xx_l3_main_1__l3_main_2,
  257. &omap44xx_l4_cfg__l3_main_2,
  258. };
  259. static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
  260. .name = "l3_main_2",
  261. .class = &omap44xx_l3_hwmod_class,
  262. .slaves = omap44xx_l3_main_2_slaves,
  263. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
  264. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  265. };
  266. /* l3_main_3 interface data */
  267. /* l3_main_1 -> l3_main_3 */
  268. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
  269. .master = &omap44xx_l3_main_1_hwmod,
  270. .slave = &omap44xx_l3_main_3_hwmod,
  271. .clk = "l3_div_ck",
  272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  273. };
  274. /* l3_main_2 -> l3_main_3 */
  275. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
  276. .master = &omap44xx_l3_main_2_hwmod,
  277. .slave = &omap44xx_l3_main_3_hwmod,
  278. .clk = "l3_div_ck",
  279. .user = OCP_USER_MPU | OCP_USER_SDMA,
  280. };
  281. /* l4_cfg -> l3_main_3 */
  282. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
  283. .master = &omap44xx_l4_cfg_hwmod,
  284. .slave = &omap44xx_l3_main_3_hwmod,
  285. .clk = "l4_div_ck",
  286. .user = OCP_USER_MPU | OCP_USER_SDMA,
  287. };
  288. /* l3_main_3 slave ports */
  289. static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
  290. &omap44xx_l3_main_1__l3_main_3,
  291. &omap44xx_l3_main_2__l3_main_3,
  292. &omap44xx_l4_cfg__l3_main_3,
  293. };
  294. static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
  295. .name = "l3_main_3",
  296. .class = &omap44xx_l3_hwmod_class,
  297. .slaves = omap44xx_l3_main_3_slaves,
  298. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
  299. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  300. };
  301. /*
  302. * 'l4' class
  303. * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
  304. */
  305. static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
  306. .name = "l4",
  307. };
  308. /* l4_abe interface data */
  309. /* dsp -> l4_abe */
  310. static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
  311. .master = &omap44xx_dsp_hwmod,
  312. .slave = &omap44xx_l4_abe_hwmod,
  313. .clk = "ocp_abe_iclk",
  314. .user = OCP_USER_MPU | OCP_USER_SDMA,
  315. };
  316. /* l3_main_1 -> l4_abe */
  317. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
  318. .master = &omap44xx_l3_main_1_hwmod,
  319. .slave = &omap44xx_l4_abe_hwmod,
  320. .clk = "l3_div_ck",
  321. .user = OCP_USER_MPU | OCP_USER_SDMA,
  322. };
  323. /* mpu -> l4_abe */
  324. static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
  325. .master = &omap44xx_mpu_hwmod,
  326. .slave = &omap44xx_l4_abe_hwmod,
  327. .clk = "ocp_abe_iclk",
  328. .user = OCP_USER_MPU | OCP_USER_SDMA,
  329. };
  330. /* l4_abe slave ports */
  331. static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
  332. &omap44xx_dsp__l4_abe,
  333. &omap44xx_l3_main_1__l4_abe,
  334. &omap44xx_mpu__l4_abe,
  335. };
  336. static struct omap_hwmod omap44xx_l4_abe_hwmod = {
  337. .name = "l4_abe",
  338. .class = &omap44xx_l4_hwmod_class,
  339. .slaves = omap44xx_l4_abe_slaves,
  340. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
  341. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  342. };
  343. /* l4_cfg interface data */
  344. /* l3_main_1 -> l4_cfg */
  345. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
  346. .master = &omap44xx_l3_main_1_hwmod,
  347. .slave = &omap44xx_l4_cfg_hwmod,
  348. .clk = "l3_div_ck",
  349. .user = OCP_USER_MPU | OCP_USER_SDMA,
  350. };
  351. /* l4_cfg slave ports */
  352. static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
  353. &omap44xx_l3_main_1__l4_cfg,
  354. };
  355. static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
  356. .name = "l4_cfg",
  357. .class = &omap44xx_l4_hwmod_class,
  358. .slaves = omap44xx_l4_cfg_slaves,
  359. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
  360. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  361. };
  362. /* l4_per interface data */
  363. /* l3_main_2 -> l4_per */
  364. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
  365. .master = &omap44xx_l3_main_2_hwmod,
  366. .slave = &omap44xx_l4_per_hwmod,
  367. .clk = "l3_div_ck",
  368. .user = OCP_USER_MPU | OCP_USER_SDMA,
  369. };
  370. /* l4_per slave ports */
  371. static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
  372. &omap44xx_l3_main_2__l4_per,
  373. };
  374. static struct omap_hwmod omap44xx_l4_per_hwmod = {
  375. .name = "l4_per",
  376. .class = &omap44xx_l4_hwmod_class,
  377. .slaves = omap44xx_l4_per_slaves,
  378. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
  379. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  380. };
  381. /* l4_wkup interface data */
  382. /* l4_cfg -> l4_wkup */
  383. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
  384. .master = &omap44xx_l4_cfg_hwmod,
  385. .slave = &omap44xx_l4_wkup_hwmod,
  386. .clk = "l4_div_ck",
  387. .user = OCP_USER_MPU | OCP_USER_SDMA,
  388. };
  389. /* l4_wkup slave ports */
  390. static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
  391. &omap44xx_l4_cfg__l4_wkup,
  392. };
  393. static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
  394. .name = "l4_wkup",
  395. .class = &omap44xx_l4_hwmod_class,
  396. .slaves = omap44xx_l4_wkup_slaves,
  397. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
  398. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  399. };
  400. /*
  401. * 'mpu_bus' class
  402. * instance(s): mpu_private
  403. */
  404. static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
  405. .name = "mpu_bus",
  406. };
  407. /* mpu_private interface data */
  408. /* mpu -> mpu_private */
  409. static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
  410. .master = &omap44xx_mpu_hwmod,
  411. .slave = &omap44xx_mpu_private_hwmod,
  412. .clk = "l3_div_ck",
  413. .user = OCP_USER_MPU | OCP_USER_SDMA,
  414. };
  415. /* mpu_private slave ports */
  416. static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
  417. &omap44xx_mpu__mpu_private,
  418. };
  419. static struct omap_hwmod omap44xx_mpu_private_hwmod = {
  420. .name = "mpu_private",
  421. .class = &omap44xx_mpu_bus_hwmod_class,
  422. .slaves = omap44xx_mpu_private_slaves,
  423. .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
  424. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  425. };
  426. /*
  427. * Modules omap_hwmod structures
  428. *
  429. * The following IPs are excluded for the moment because:
  430. * - They do not need an explicit SW control using omap_hwmod API.
  431. * - They still need to be validated with the driver
  432. * properly adapted to omap_hwmod / omap_device
  433. *
  434. * aess
  435. * bandgap
  436. * c2c
  437. * c2c_target_fw
  438. * cm_core
  439. * cm_core_aon
  440. * counter_32k
  441. * ctrl_module_core
  442. * ctrl_module_pad_core
  443. * ctrl_module_pad_wkup
  444. * ctrl_module_wkup
  445. * debugss
  446. * dma_system
  447. * dmic
  448. * dss
  449. * dss_dispc
  450. * dss_dsi1
  451. * dss_dsi2
  452. * dss_hdmi
  453. * dss_rfbi
  454. * dss_venc
  455. * efuse_ctrl_cust
  456. * efuse_ctrl_std
  457. * elm
  458. * emif1
  459. * emif2
  460. * fdif
  461. * gpmc
  462. * gpu
  463. * hdq1w
  464. * hsi
  465. * ipu
  466. * iss
  467. * kbd
  468. * mailbox
  469. * mcasp
  470. * mcbsp1
  471. * mcbsp2
  472. * mcbsp3
  473. * mcbsp4
  474. * mcpdm
  475. * mcspi1
  476. * mcspi2
  477. * mcspi3
  478. * mcspi4
  479. * mmc1
  480. * mmc2
  481. * mmc3
  482. * mmc4
  483. * mmc5
  484. * mpu_c0
  485. * mpu_c1
  486. * ocmc_ram
  487. * ocp2scp_usb_phy
  488. * ocp_wp_noc
  489. * prcm
  490. * prcm_mpu
  491. * prm
  492. * scrm
  493. * sl2if
  494. * slimbus1
  495. * slimbus2
  496. * smartreflex_core
  497. * smartreflex_iva
  498. * smartreflex_mpu
  499. * spinlock
  500. * timer1
  501. * timer10
  502. * timer11
  503. * timer2
  504. * timer3
  505. * timer4
  506. * timer5
  507. * timer6
  508. * timer7
  509. * timer8
  510. * timer9
  511. * usb_host_fs
  512. * usb_host_hs
  513. * usb_otg_hs
  514. * usb_phy_cm
  515. * usb_tll_hs
  516. * usim
  517. */
  518. /*
  519. * 'dsp' class
  520. * dsp sub-system
  521. */
  522. static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
  523. .name = "dsp",
  524. };
  525. /* dsp */
  526. static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
  527. { .irq = 28 + OMAP44XX_IRQ_GIC_START },
  528. };
  529. static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
  530. { .name = "mmu_cache", .rst_shift = 1 },
  531. };
  532. static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
  533. { .name = "dsp", .rst_shift = 0 },
  534. };
  535. /* dsp -> iva */
  536. static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
  537. .master = &omap44xx_dsp_hwmod,
  538. .slave = &omap44xx_iva_hwmod,
  539. .clk = "dpll_iva_m5x2_ck",
  540. };
  541. /* dsp master ports */
  542. static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
  543. &omap44xx_dsp__l3_main_1,
  544. &omap44xx_dsp__l4_abe,
  545. &omap44xx_dsp__iva,
  546. };
  547. /* l4_cfg -> dsp */
  548. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
  549. .master = &omap44xx_l4_cfg_hwmod,
  550. .slave = &omap44xx_dsp_hwmod,
  551. .clk = "l4_div_ck",
  552. .user = OCP_USER_MPU | OCP_USER_SDMA,
  553. };
  554. /* dsp slave ports */
  555. static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
  556. &omap44xx_l4_cfg__dsp,
  557. };
  558. /* Pseudo hwmod for reset control purpose only */
  559. static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
  560. .name = "dsp_c0",
  561. .class = &omap44xx_dsp_hwmod_class,
  562. .flags = HWMOD_INIT_NO_RESET,
  563. .rst_lines = omap44xx_dsp_c0_resets,
  564. .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
  565. .prcm = {
  566. .omap4 = {
  567. .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL,
  568. },
  569. },
  570. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  571. };
  572. static struct omap_hwmod omap44xx_dsp_hwmod = {
  573. .name = "dsp",
  574. .class = &omap44xx_dsp_hwmod_class,
  575. .mpu_irqs = omap44xx_dsp_irqs,
  576. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dsp_irqs),
  577. .rst_lines = omap44xx_dsp_resets,
  578. .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
  579. .main_clk = "dsp_fck",
  580. .prcm = {
  581. .omap4 = {
  582. .clkctrl_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
  583. .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL,
  584. },
  585. },
  586. .slaves = omap44xx_dsp_slaves,
  587. .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
  588. .masters = omap44xx_dsp_masters,
  589. .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
  590. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  591. };
  592. /*
  593. * 'gpio' class
  594. * general purpose io module
  595. */
  596. static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
  597. .rev_offs = 0x0000,
  598. .sysc_offs = 0x0010,
  599. .syss_offs = 0x0114,
  600. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  601. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  602. SYSS_HAS_RESET_STATUS),
  603. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  604. .sysc_fields = &omap_hwmod_sysc_type1,
  605. };
  606. static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
  607. .name = "gpio",
  608. .sysc = &omap44xx_gpio_sysc,
  609. .rev = 2,
  610. };
  611. /* gpio dev_attr */
  612. static struct omap_gpio_dev_attr gpio_dev_attr = {
  613. .bank_width = 32,
  614. .dbck_flag = true,
  615. };
  616. /* gpio1 */
  617. static struct omap_hwmod omap44xx_gpio1_hwmod;
  618. static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
  619. { .irq = 29 + OMAP44XX_IRQ_GIC_START },
  620. };
  621. static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
  622. {
  623. .pa_start = 0x4a310000,
  624. .pa_end = 0x4a3101ff,
  625. .flags = ADDR_TYPE_RT
  626. },
  627. };
  628. /* l4_wkup -> gpio1 */
  629. static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
  630. .master = &omap44xx_l4_wkup_hwmod,
  631. .slave = &omap44xx_gpio1_hwmod,
  632. .clk = "l4_wkup_clk_mux_ck",
  633. .addr = omap44xx_gpio1_addrs,
  634. .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs),
  635. .user = OCP_USER_MPU | OCP_USER_SDMA,
  636. };
  637. /* gpio1 slave ports */
  638. static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
  639. &omap44xx_l4_wkup__gpio1,
  640. };
  641. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  642. { .role = "dbclk", .clk = "gpio1_dbclk" },
  643. };
  644. static struct omap_hwmod omap44xx_gpio1_hwmod = {
  645. .name = "gpio1",
  646. .class = &omap44xx_gpio_hwmod_class,
  647. .mpu_irqs = omap44xx_gpio1_irqs,
  648. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs),
  649. .main_clk = "gpio1_ick",
  650. .prcm = {
  651. .omap4 = {
  652. .clkctrl_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
  653. },
  654. },
  655. .opt_clks = gpio1_opt_clks,
  656. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  657. .dev_attr = &gpio_dev_attr,
  658. .slaves = omap44xx_gpio1_slaves,
  659. .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
  660. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  661. };
  662. /* gpio2 */
  663. static struct omap_hwmod omap44xx_gpio2_hwmod;
  664. static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
  665. { .irq = 30 + OMAP44XX_IRQ_GIC_START },
  666. };
  667. static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
  668. {
  669. .pa_start = 0x48055000,
  670. .pa_end = 0x480551ff,
  671. .flags = ADDR_TYPE_RT
  672. },
  673. };
  674. /* l4_per -> gpio2 */
  675. static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
  676. .master = &omap44xx_l4_per_hwmod,
  677. .slave = &omap44xx_gpio2_hwmod,
  678. .clk = "l4_div_ck",
  679. .addr = omap44xx_gpio2_addrs,
  680. .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs),
  681. .user = OCP_USER_MPU | OCP_USER_SDMA,
  682. };
  683. /* gpio2 slave ports */
  684. static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
  685. &omap44xx_l4_per__gpio2,
  686. };
  687. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  688. { .role = "dbclk", .clk = "gpio2_dbclk" },
  689. };
  690. static struct omap_hwmod omap44xx_gpio2_hwmod = {
  691. .name = "gpio2",
  692. .class = &omap44xx_gpio_hwmod_class,
  693. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  694. .mpu_irqs = omap44xx_gpio2_irqs,
  695. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs),
  696. .main_clk = "gpio2_ick",
  697. .prcm = {
  698. .omap4 = {
  699. .clkctrl_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
  700. },
  701. },
  702. .opt_clks = gpio2_opt_clks,
  703. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  704. .dev_attr = &gpio_dev_attr,
  705. .slaves = omap44xx_gpio2_slaves,
  706. .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
  707. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  708. };
  709. /* gpio3 */
  710. static struct omap_hwmod omap44xx_gpio3_hwmod;
  711. static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
  712. { .irq = 31 + OMAP44XX_IRQ_GIC_START },
  713. };
  714. static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
  715. {
  716. .pa_start = 0x48057000,
  717. .pa_end = 0x480571ff,
  718. .flags = ADDR_TYPE_RT
  719. },
  720. };
  721. /* l4_per -> gpio3 */
  722. static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
  723. .master = &omap44xx_l4_per_hwmod,
  724. .slave = &omap44xx_gpio3_hwmod,
  725. .clk = "l4_div_ck",
  726. .addr = omap44xx_gpio3_addrs,
  727. .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs),
  728. .user = OCP_USER_MPU | OCP_USER_SDMA,
  729. };
  730. /* gpio3 slave ports */
  731. static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
  732. &omap44xx_l4_per__gpio3,
  733. };
  734. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  735. { .role = "dbclk", .clk = "gpio3_dbclk" },
  736. };
  737. static struct omap_hwmod omap44xx_gpio3_hwmod = {
  738. .name = "gpio3",
  739. .class = &omap44xx_gpio_hwmod_class,
  740. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  741. .mpu_irqs = omap44xx_gpio3_irqs,
  742. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs),
  743. .main_clk = "gpio3_ick",
  744. .prcm = {
  745. .omap4 = {
  746. .clkctrl_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
  747. },
  748. },
  749. .opt_clks = gpio3_opt_clks,
  750. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  751. .dev_attr = &gpio_dev_attr,
  752. .slaves = omap44xx_gpio3_slaves,
  753. .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
  754. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  755. };
  756. /* gpio4 */
  757. static struct omap_hwmod omap44xx_gpio4_hwmod;
  758. static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
  759. { .irq = 32 + OMAP44XX_IRQ_GIC_START },
  760. };
  761. static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
  762. {
  763. .pa_start = 0x48059000,
  764. .pa_end = 0x480591ff,
  765. .flags = ADDR_TYPE_RT
  766. },
  767. };
  768. /* l4_per -> gpio4 */
  769. static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
  770. .master = &omap44xx_l4_per_hwmod,
  771. .slave = &omap44xx_gpio4_hwmod,
  772. .clk = "l4_div_ck",
  773. .addr = omap44xx_gpio4_addrs,
  774. .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs),
  775. .user = OCP_USER_MPU | OCP_USER_SDMA,
  776. };
  777. /* gpio4 slave ports */
  778. static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
  779. &omap44xx_l4_per__gpio4,
  780. };
  781. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  782. { .role = "dbclk", .clk = "gpio4_dbclk" },
  783. };
  784. static struct omap_hwmod omap44xx_gpio4_hwmod = {
  785. .name = "gpio4",
  786. .class = &omap44xx_gpio_hwmod_class,
  787. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  788. .mpu_irqs = omap44xx_gpio4_irqs,
  789. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs),
  790. .main_clk = "gpio4_ick",
  791. .prcm = {
  792. .omap4 = {
  793. .clkctrl_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
  794. },
  795. },
  796. .opt_clks = gpio4_opt_clks,
  797. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  798. .dev_attr = &gpio_dev_attr,
  799. .slaves = omap44xx_gpio4_slaves,
  800. .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
  801. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  802. };
  803. /* gpio5 */
  804. static struct omap_hwmod omap44xx_gpio5_hwmod;
  805. static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
  806. { .irq = 33 + OMAP44XX_IRQ_GIC_START },
  807. };
  808. static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
  809. {
  810. .pa_start = 0x4805b000,
  811. .pa_end = 0x4805b1ff,
  812. .flags = ADDR_TYPE_RT
  813. },
  814. };
  815. /* l4_per -> gpio5 */
  816. static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
  817. .master = &omap44xx_l4_per_hwmod,
  818. .slave = &omap44xx_gpio5_hwmod,
  819. .clk = "l4_div_ck",
  820. .addr = omap44xx_gpio5_addrs,
  821. .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs),
  822. .user = OCP_USER_MPU | OCP_USER_SDMA,
  823. };
  824. /* gpio5 slave ports */
  825. static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
  826. &omap44xx_l4_per__gpio5,
  827. };
  828. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  829. { .role = "dbclk", .clk = "gpio5_dbclk" },
  830. };
  831. static struct omap_hwmod omap44xx_gpio5_hwmod = {
  832. .name = "gpio5",
  833. .class = &omap44xx_gpio_hwmod_class,
  834. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  835. .mpu_irqs = omap44xx_gpio5_irqs,
  836. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs),
  837. .main_clk = "gpio5_ick",
  838. .prcm = {
  839. .omap4 = {
  840. .clkctrl_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
  841. },
  842. },
  843. .opt_clks = gpio5_opt_clks,
  844. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  845. .dev_attr = &gpio_dev_attr,
  846. .slaves = omap44xx_gpio5_slaves,
  847. .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
  848. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  849. };
  850. /* gpio6 */
  851. static struct omap_hwmod omap44xx_gpio6_hwmod;
  852. static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
  853. { .irq = 34 + OMAP44XX_IRQ_GIC_START },
  854. };
  855. static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
  856. {
  857. .pa_start = 0x4805d000,
  858. .pa_end = 0x4805d1ff,
  859. .flags = ADDR_TYPE_RT
  860. },
  861. };
  862. /* l4_per -> gpio6 */
  863. static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
  864. .master = &omap44xx_l4_per_hwmod,
  865. .slave = &omap44xx_gpio6_hwmod,
  866. .clk = "l4_div_ck",
  867. .addr = omap44xx_gpio6_addrs,
  868. .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs),
  869. .user = OCP_USER_MPU | OCP_USER_SDMA,
  870. };
  871. /* gpio6 slave ports */
  872. static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
  873. &omap44xx_l4_per__gpio6,
  874. };
  875. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  876. { .role = "dbclk", .clk = "gpio6_dbclk" },
  877. };
  878. static struct omap_hwmod omap44xx_gpio6_hwmod = {
  879. .name = "gpio6",
  880. .class = &omap44xx_gpio_hwmod_class,
  881. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  882. .mpu_irqs = omap44xx_gpio6_irqs,
  883. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs),
  884. .main_clk = "gpio6_ick",
  885. .prcm = {
  886. .omap4 = {
  887. .clkctrl_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
  888. },
  889. },
  890. .opt_clks = gpio6_opt_clks,
  891. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  892. .dev_attr = &gpio_dev_attr,
  893. .slaves = omap44xx_gpio6_slaves,
  894. .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
  895. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  896. };
  897. /*
  898. * 'i2c' class
  899. * multimaster high-speed i2c controller
  900. */
  901. static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
  902. .sysc_offs = 0x0010,
  903. .syss_offs = 0x0090,
  904. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  905. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  906. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  907. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  908. .sysc_fields = &omap_hwmod_sysc_type1,
  909. };
  910. static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
  911. .name = "i2c",
  912. .sysc = &omap44xx_i2c_sysc,
  913. };
  914. /* i2c1 */
  915. static struct omap_hwmod omap44xx_i2c1_hwmod;
  916. static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
  917. { .irq = 56 + OMAP44XX_IRQ_GIC_START },
  918. };
  919. static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
  920. { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
  921. { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
  922. };
  923. static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
  924. {
  925. .pa_start = 0x48070000,
  926. .pa_end = 0x480700ff,
  927. .flags = ADDR_TYPE_RT
  928. },
  929. };
  930. /* l4_per -> i2c1 */
  931. static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
  932. .master = &omap44xx_l4_per_hwmod,
  933. .slave = &omap44xx_i2c1_hwmod,
  934. .clk = "l4_div_ck",
  935. .addr = omap44xx_i2c1_addrs,
  936. .addr_cnt = ARRAY_SIZE(omap44xx_i2c1_addrs),
  937. .user = OCP_USER_MPU | OCP_USER_SDMA,
  938. };
  939. /* i2c1 slave ports */
  940. static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
  941. &omap44xx_l4_per__i2c1,
  942. };
  943. static struct omap_hwmod omap44xx_i2c1_hwmod = {
  944. .name = "i2c1",
  945. .class = &omap44xx_i2c_hwmod_class,
  946. .flags = HWMOD_INIT_NO_RESET,
  947. .mpu_irqs = omap44xx_i2c1_irqs,
  948. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c1_irqs),
  949. .sdma_reqs = omap44xx_i2c1_sdma_reqs,
  950. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs),
  951. .main_clk = "i2c1_fck",
  952. .prcm = {
  953. .omap4 = {
  954. .clkctrl_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
  955. },
  956. },
  957. .slaves = omap44xx_i2c1_slaves,
  958. .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
  959. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  960. };
  961. /* i2c2 */
  962. static struct omap_hwmod omap44xx_i2c2_hwmod;
  963. static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
  964. { .irq = 57 + OMAP44XX_IRQ_GIC_START },
  965. };
  966. static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
  967. { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
  968. { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
  969. };
  970. static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
  971. {
  972. .pa_start = 0x48072000,
  973. .pa_end = 0x480720ff,
  974. .flags = ADDR_TYPE_RT
  975. },
  976. };
  977. /* l4_per -> i2c2 */
  978. static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
  979. .master = &omap44xx_l4_per_hwmod,
  980. .slave = &omap44xx_i2c2_hwmod,
  981. .clk = "l4_div_ck",
  982. .addr = omap44xx_i2c2_addrs,
  983. .addr_cnt = ARRAY_SIZE(omap44xx_i2c2_addrs),
  984. .user = OCP_USER_MPU | OCP_USER_SDMA,
  985. };
  986. /* i2c2 slave ports */
  987. static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
  988. &omap44xx_l4_per__i2c2,
  989. };
  990. static struct omap_hwmod omap44xx_i2c2_hwmod = {
  991. .name = "i2c2",
  992. .class = &omap44xx_i2c_hwmod_class,
  993. .flags = HWMOD_INIT_NO_RESET,
  994. .mpu_irqs = omap44xx_i2c2_irqs,
  995. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c2_irqs),
  996. .sdma_reqs = omap44xx_i2c2_sdma_reqs,
  997. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs),
  998. .main_clk = "i2c2_fck",
  999. .prcm = {
  1000. .omap4 = {
  1001. .clkctrl_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
  1002. },
  1003. },
  1004. .slaves = omap44xx_i2c2_slaves,
  1005. .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
  1006. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1007. };
  1008. /* i2c3 */
  1009. static struct omap_hwmod omap44xx_i2c3_hwmod;
  1010. static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
  1011. { .irq = 61 + OMAP44XX_IRQ_GIC_START },
  1012. };
  1013. static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
  1014. { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
  1015. { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
  1016. };
  1017. static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
  1018. {
  1019. .pa_start = 0x48060000,
  1020. .pa_end = 0x480600ff,
  1021. .flags = ADDR_TYPE_RT
  1022. },
  1023. };
  1024. /* l4_per -> i2c3 */
  1025. static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
  1026. .master = &omap44xx_l4_per_hwmod,
  1027. .slave = &omap44xx_i2c3_hwmod,
  1028. .clk = "l4_div_ck",
  1029. .addr = omap44xx_i2c3_addrs,
  1030. .addr_cnt = ARRAY_SIZE(omap44xx_i2c3_addrs),
  1031. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1032. };
  1033. /* i2c3 slave ports */
  1034. static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
  1035. &omap44xx_l4_per__i2c3,
  1036. };
  1037. static struct omap_hwmod omap44xx_i2c3_hwmod = {
  1038. .name = "i2c3",
  1039. .class = &omap44xx_i2c_hwmod_class,
  1040. .flags = HWMOD_INIT_NO_RESET,
  1041. .mpu_irqs = omap44xx_i2c3_irqs,
  1042. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c3_irqs),
  1043. .sdma_reqs = omap44xx_i2c3_sdma_reqs,
  1044. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs),
  1045. .main_clk = "i2c3_fck",
  1046. .prcm = {
  1047. .omap4 = {
  1048. .clkctrl_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
  1049. },
  1050. },
  1051. .slaves = omap44xx_i2c3_slaves,
  1052. .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
  1053. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1054. };
  1055. /* i2c4 */
  1056. static struct omap_hwmod omap44xx_i2c4_hwmod;
  1057. static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
  1058. { .irq = 62 + OMAP44XX_IRQ_GIC_START },
  1059. };
  1060. static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
  1061. { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
  1062. { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
  1063. };
  1064. static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
  1065. {
  1066. .pa_start = 0x48350000,
  1067. .pa_end = 0x483500ff,
  1068. .flags = ADDR_TYPE_RT
  1069. },
  1070. };
  1071. /* l4_per -> i2c4 */
  1072. static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
  1073. .master = &omap44xx_l4_per_hwmod,
  1074. .slave = &omap44xx_i2c4_hwmod,
  1075. .clk = "l4_div_ck",
  1076. .addr = omap44xx_i2c4_addrs,
  1077. .addr_cnt = ARRAY_SIZE(omap44xx_i2c4_addrs),
  1078. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1079. };
  1080. /* i2c4 slave ports */
  1081. static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
  1082. &omap44xx_l4_per__i2c4,
  1083. };
  1084. static struct omap_hwmod omap44xx_i2c4_hwmod = {
  1085. .name = "i2c4",
  1086. .class = &omap44xx_i2c_hwmod_class,
  1087. .flags = HWMOD_INIT_NO_RESET,
  1088. .mpu_irqs = omap44xx_i2c4_irqs,
  1089. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c4_irqs),
  1090. .sdma_reqs = omap44xx_i2c4_sdma_reqs,
  1091. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs),
  1092. .main_clk = "i2c4_fck",
  1093. .prcm = {
  1094. .omap4 = {
  1095. .clkctrl_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
  1096. },
  1097. },
  1098. .slaves = omap44xx_i2c4_slaves,
  1099. .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
  1100. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1101. };
  1102. /*
  1103. * 'iva' class
  1104. * multi-standard video encoder/decoder hardware accelerator
  1105. */
  1106. static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
  1107. .name = "iva",
  1108. };
  1109. /* iva */
  1110. static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
  1111. { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
  1112. { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
  1113. { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
  1114. };
  1115. static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
  1116. { .name = "logic", .rst_shift = 2 },
  1117. };
  1118. static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
  1119. { .name = "seq0", .rst_shift = 0 },
  1120. };
  1121. static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
  1122. { .name = "seq1", .rst_shift = 1 },
  1123. };
  1124. /* iva master ports */
  1125. static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
  1126. &omap44xx_iva__l3_main_2,
  1127. &omap44xx_iva__l3_instr,
  1128. };
  1129. static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
  1130. {
  1131. .pa_start = 0x5a000000,
  1132. .pa_end = 0x5a07ffff,
  1133. .flags = ADDR_TYPE_RT
  1134. },
  1135. };
  1136. /* l3_main_2 -> iva */
  1137. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
  1138. .master = &omap44xx_l3_main_2_hwmod,
  1139. .slave = &omap44xx_iva_hwmod,
  1140. .clk = "l3_div_ck",
  1141. .addr = omap44xx_iva_addrs,
  1142. .addr_cnt = ARRAY_SIZE(omap44xx_iva_addrs),
  1143. .user = OCP_USER_MPU,
  1144. };
  1145. /* iva slave ports */
  1146. static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
  1147. &omap44xx_dsp__iva,
  1148. &omap44xx_l3_main_2__iva,
  1149. };
  1150. /* Pseudo hwmod for reset control purpose only */
  1151. static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
  1152. .name = "iva_seq0",
  1153. .class = &omap44xx_iva_hwmod_class,
  1154. .flags = HWMOD_INIT_NO_RESET,
  1155. .rst_lines = omap44xx_iva_seq0_resets,
  1156. .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
  1157. .prcm = {
  1158. .omap4 = {
  1159. .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
  1160. },
  1161. },
  1162. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1163. };
  1164. /* Pseudo hwmod for reset control purpose only */
  1165. static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
  1166. .name = "iva_seq1",
  1167. .class = &omap44xx_iva_hwmod_class,
  1168. .flags = HWMOD_INIT_NO_RESET,
  1169. .rst_lines = omap44xx_iva_seq1_resets,
  1170. .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
  1171. .prcm = {
  1172. .omap4 = {
  1173. .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
  1174. },
  1175. },
  1176. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1177. };
  1178. static struct omap_hwmod omap44xx_iva_hwmod = {
  1179. .name = "iva",
  1180. .class = &omap44xx_iva_hwmod_class,
  1181. .mpu_irqs = omap44xx_iva_irqs,
  1182. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iva_irqs),
  1183. .rst_lines = omap44xx_iva_resets,
  1184. .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
  1185. .main_clk = "iva_fck",
  1186. .prcm = {
  1187. .omap4 = {
  1188. .clkctrl_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
  1189. .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
  1190. },
  1191. },
  1192. .slaves = omap44xx_iva_slaves,
  1193. .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
  1194. .masters = omap44xx_iva_masters,
  1195. .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
  1196. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1197. };
  1198. /*
  1199. * 'mpu' class
  1200. * mpu sub-system
  1201. */
  1202. static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
  1203. .name = "mpu",
  1204. };
  1205. /* mpu */
  1206. static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
  1207. { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
  1208. { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
  1209. { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
  1210. };
  1211. /* mpu master ports */
  1212. static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
  1213. &omap44xx_mpu__l3_main_1,
  1214. &omap44xx_mpu__l4_abe,
  1215. &omap44xx_mpu__dmm,
  1216. };
  1217. static struct omap_hwmod omap44xx_mpu_hwmod = {
  1218. .name = "mpu",
  1219. .class = &omap44xx_mpu_hwmod_class,
  1220. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  1221. .mpu_irqs = omap44xx_mpu_irqs,
  1222. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs),
  1223. .main_clk = "dpll_mpu_m2_ck",
  1224. .prcm = {
  1225. .omap4 = {
  1226. .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL,
  1227. },
  1228. },
  1229. .masters = omap44xx_mpu_masters,
  1230. .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
  1231. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1232. };
  1233. /*
  1234. * 'uart' class
  1235. * universal asynchronous receiver/transmitter (uart)
  1236. */
  1237. static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
  1238. .rev_offs = 0x0050,
  1239. .sysc_offs = 0x0054,
  1240. .syss_offs = 0x0058,
  1241. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1242. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1243. SYSS_HAS_RESET_STATUS),
  1244. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1245. .sysc_fields = &omap_hwmod_sysc_type1,
  1246. };
  1247. static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
  1248. .name = "uart",
  1249. .sysc = &omap44xx_uart_sysc,
  1250. };
  1251. /* uart1 */
  1252. static struct omap_hwmod omap44xx_uart1_hwmod;
  1253. static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
  1254. { .irq = 72 + OMAP44XX_IRQ_GIC_START },
  1255. };
  1256. static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
  1257. { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
  1258. { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
  1259. };
  1260. static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
  1261. {
  1262. .pa_start = 0x4806a000,
  1263. .pa_end = 0x4806a0ff,
  1264. .flags = ADDR_TYPE_RT
  1265. },
  1266. };
  1267. /* l4_per -> uart1 */
  1268. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
  1269. .master = &omap44xx_l4_per_hwmod,
  1270. .slave = &omap44xx_uart1_hwmod,
  1271. .clk = "l4_div_ck",
  1272. .addr = omap44xx_uart1_addrs,
  1273. .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs),
  1274. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1275. };
  1276. /* uart1 slave ports */
  1277. static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
  1278. &omap44xx_l4_per__uart1,
  1279. };
  1280. static struct omap_hwmod omap44xx_uart1_hwmod = {
  1281. .name = "uart1",
  1282. .class = &omap44xx_uart_hwmod_class,
  1283. .mpu_irqs = omap44xx_uart1_irqs,
  1284. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs),
  1285. .sdma_reqs = omap44xx_uart1_sdma_reqs,
  1286. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
  1287. .main_clk = "uart1_fck",
  1288. .prcm = {
  1289. .omap4 = {
  1290. .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
  1291. },
  1292. },
  1293. .slaves = omap44xx_uart1_slaves,
  1294. .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
  1295. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1296. };
  1297. /* uart2 */
  1298. static struct omap_hwmod omap44xx_uart2_hwmod;
  1299. static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
  1300. { .irq = 73 + OMAP44XX_IRQ_GIC_START },
  1301. };
  1302. static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
  1303. { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
  1304. { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
  1305. };
  1306. static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
  1307. {
  1308. .pa_start = 0x4806c000,
  1309. .pa_end = 0x4806c0ff,
  1310. .flags = ADDR_TYPE_RT
  1311. },
  1312. };
  1313. /* l4_per -> uart2 */
  1314. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
  1315. .master = &omap44xx_l4_per_hwmod,
  1316. .slave = &omap44xx_uart2_hwmod,
  1317. .clk = "l4_div_ck",
  1318. .addr = omap44xx_uart2_addrs,
  1319. .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs),
  1320. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1321. };
  1322. /* uart2 slave ports */
  1323. static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
  1324. &omap44xx_l4_per__uart2,
  1325. };
  1326. static struct omap_hwmod omap44xx_uart2_hwmod = {
  1327. .name = "uart2",
  1328. .class = &omap44xx_uart_hwmod_class,
  1329. .mpu_irqs = omap44xx_uart2_irqs,
  1330. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs),
  1331. .sdma_reqs = omap44xx_uart2_sdma_reqs,
  1332. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
  1333. .main_clk = "uart2_fck",
  1334. .prcm = {
  1335. .omap4 = {
  1336. .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
  1337. },
  1338. },
  1339. .slaves = omap44xx_uart2_slaves,
  1340. .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
  1341. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1342. };
  1343. /* uart3 */
  1344. static struct omap_hwmod omap44xx_uart3_hwmod;
  1345. static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
  1346. { .irq = 74 + OMAP44XX_IRQ_GIC_START },
  1347. };
  1348. static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
  1349. { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
  1350. { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
  1351. };
  1352. static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
  1353. {
  1354. .pa_start = 0x48020000,
  1355. .pa_end = 0x480200ff,
  1356. .flags = ADDR_TYPE_RT
  1357. },
  1358. };
  1359. /* l4_per -> uart3 */
  1360. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
  1361. .master = &omap44xx_l4_per_hwmod,
  1362. .slave = &omap44xx_uart3_hwmod,
  1363. .clk = "l4_div_ck",
  1364. .addr = omap44xx_uart3_addrs,
  1365. .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs),
  1366. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1367. };
  1368. /* uart3 slave ports */
  1369. static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
  1370. &omap44xx_l4_per__uart3,
  1371. };
  1372. static struct omap_hwmod omap44xx_uart3_hwmod = {
  1373. .name = "uart3",
  1374. .class = &omap44xx_uart_hwmod_class,
  1375. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  1376. .mpu_irqs = omap44xx_uart3_irqs,
  1377. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs),
  1378. .sdma_reqs = omap44xx_uart3_sdma_reqs,
  1379. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
  1380. .main_clk = "uart3_fck",
  1381. .prcm = {
  1382. .omap4 = {
  1383. .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
  1384. },
  1385. },
  1386. .slaves = omap44xx_uart3_slaves,
  1387. .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
  1388. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1389. };
  1390. /* uart4 */
  1391. static struct omap_hwmod omap44xx_uart4_hwmod;
  1392. static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
  1393. { .irq = 70 + OMAP44XX_IRQ_GIC_START },
  1394. };
  1395. static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
  1396. { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
  1397. { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
  1398. };
  1399. static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
  1400. {
  1401. .pa_start = 0x4806e000,
  1402. .pa_end = 0x4806e0ff,
  1403. .flags = ADDR_TYPE_RT
  1404. },
  1405. };
  1406. /* l4_per -> uart4 */
  1407. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
  1408. .master = &omap44xx_l4_per_hwmod,
  1409. .slave = &omap44xx_uart4_hwmod,
  1410. .clk = "l4_div_ck",
  1411. .addr = omap44xx_uart4_addrs,
  1412. .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs),
  1413. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1414. };
  1415. /* uart4 slave ports */
  1416. static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
  1417. &omap44xx_l4_per__uart4,
  1418. };
  1419. static struct omap_hwmod omap44xx_uart4_hwmod = {
  1420. .name = "uart4",
  1421. .class = &omap44xx_uart_hwmod_class,
  1422. .mpu_irqs = omap44xx_uart4_irqs,
  1423. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs),
  1424. .sdma_reqs = omap44xx_uart4_sdma_reqs,
  1425. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
  1426. .main_clk = "uart4_fck",
  1427. .prcm = {
  1428. .omap4 = {
  1429. .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
  1430. },
  1431. },
  1432. .slaves = omap44xx_uart4_slaves,
  1433. .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
  1434. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1435. };
  1436. /*
  1437. * 'wd_timer' class
  1438. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  1439. * overflow condition
  1440. */
  1441. static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
  1442. .rev_offs = 0x0000,
  1443. .sysc_offs = 0x0010,
  1444. .syss_offs = 0x0014,
  1445. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  1446. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1447. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1448. .sysc_fields = &omap_hwmod_sysc_type1,
  1449. };
  1450. static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
  1451. .name = "wd_timer",
  1452. .sysc = &omap44xx_wd_timer_sysc,
  1453. .pre_shutdown = &omap2_wd_timer_disable
  1454. };
  1455. /* wd_timer2 */
  1456. static struct omap_hwmod omap44xx_wd_timer2_hwmod;
  1457. static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
  1458. { .irq = 80 + OMAP44XX_IRQ_GIC_START },
  1459. };
  1460. static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
  1461. {
  1462. .pa_start = 0x4a314000,
  1463. .pa_end = 0x4a31407f,
  1464. .flags = ADDR_TYPE_RT
  1465. },
  1466. };
  1467. /* l4_wkup -> wd_timer2 */
  1468. static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
  1469. .master = &omap44xx_l4_wkup_hwmod,
  1470. .slave = &omap44xx_wd_timer2_hwmod,
  1471. .clk = "l4_wkup_clk_mux_ck",
  1472. .addr = omap44xx_wd_timer2_addrs,
  1473. .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs),
  1474. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1475. };
  1476. /* wd_timer2 slave ports */
  1477. static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
  1478. &omap44xx_l4_wkup__wd_timer2,
  1479. };
  1480. static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
  1481. .name = "wd_timer2",
  1482. .class = &omap44xx_wd_timer_hwmod_class,
  1483. .mpu_irqs = omap44xx_wd_timer2_irqs,
  1484. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs),
  1485. .main_clk = "wd_timer2_fck",
  1486. .prcm = {
  1487. .omap4 = {
  1488. .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
  1489. },
  1490. },
  1491. .slaves = omap44xx_wd_timer2_slaves,
  1492. .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
  1493. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1494. };
  1495. /* wd_timer3 */
  1496. static struct omap_hwmod omap44xx_wd_timer3_hwmod;
  1497. static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
  1498. { .irq = 36 + OMAP44XX_IRQ_GIC_START },
  1499. };
  1500. static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
  1501. {
  1502. .pa_start = 0x40130000,
  1503. .pa_end = 0x4013007f,
  1504. .flags = ADDR_TYPE_RT
  1505. },
  1506. };
  1507. /* l4_abe -> wd_timer3 */
  1508. static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
  1509. .master = &omap44xx_l4_abe_hwmod,
  1510. .slave = &omap44xx_wd_timer3_hwmod,
  1511. .clk = "ocp_abe_iclk",
  1512. .addr = omap44xx_wd_timer3_addrs,
  1513. .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs),
  1514. .user = OCP_USER_MPU,
  1515. };
  1516. static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
  1517. {
  1518. .pa_start = 0x49030000,
  1519. .pa_end = 0x4903007f,
  1520. .flags = ADDR_TYPE_RT
  1521. },
  1522. };
  1523. /* l4_abe -> wd_timer3 (dma) */
  1524. static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
  1525. .master = &omap44xx_l4_abe_hwmod,
  1526. .slave = &omap44xx_wd_timer3_hwmod,
  1527. .clk = "ocp_abe_iclk",
  1528. .addr = omap44xx_wd_timer3_dma_addrs,
  1529. .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs),
  1530. .user = OCP_USER_SDMA,
  1531. };
  1532. /* wd_timer3 slave ports */
  1533. static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
  1534. &omap44xx_l4_abe__wd_timer3,
  1535. &omap44xx_l4_abe__wd_timer3_dma,
  1536. };
  1537. static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
  1538. .name = "wd_timer3",
  1539. .class = &omap44xx_wd_timer_hwmod_class,
  1540. .mpu_irqs = omap44xx_wd_timer3_irqs,
  1541. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs),
  1542. .main_clk = "wd_timer3_fck",
  1543. .prcm = {
  1544. .omap4 = {
  1545. .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
  1546. },
  1547. },
  1548. .slaves = omap44xx_wd_timer3_slaves,
  1549. .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
  1550. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1551. };
  1552. /*
  1553. * 'dma' class
  1554. * dma controller for data exchange between memory to memory (i.e. internal or
  1555. * external memory) and gp peripherals to memory or memory to gp peripherals
  1556. */
  1557. static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
  1558. .rev_offs = 0x0000,
  1559. .sysc_offs = 0x002c,
  1560. .syss_offs = 0x0028,
  1561. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  1562. SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  1563. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1564. SYSS_HAS_RESET_STATUS),
  1565. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1566. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1567. .sysc_fields = &omap_hwmod_sysc_type1,
  1568. };
  1569. /* dma attributes */
  1570. static struct omap_dma_dev_attr dma_dev_attr = {
  1571. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1572. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1573. .lch_count = 32,
  1574. };
  1575. static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
  1576. .name = "dma",
  1577. .sysc = &omap44xx_dma_sysc,
  1578. };
  1579. /* dma_system */
  1580. static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
  1581. { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
  1582. { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
  1583. { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
  1584. { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
  1585. };
  1586. /* dma_system master ports */
  1587. static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
  1588. &omap44xx_dma_system__l3_main_2,
  1589. };
  1590. static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
  1591. {
  1592. .pa_start = 0x4a056000,
  1593. .pa_end = 0x4a0560ff,
  1594. .flags = ADDR_TYPE_RT
  1595. },
  1596. };
  1597. /* l4_cfg -> dma_system */
  1598. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
  1599. .master = &omap44xx_l4_cfg_hwmod,
  1600. .slave = &omap44xx_dma_system_hwmod,
  1601. .clk = "l4_div_ck",
  1602. .addr = omap44xx_dma_system_addrs,
  1603. .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs),
  1604. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1605. };
  1606. /* dma_system slave ports */
  1607. static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
  1608. &omap44xx_l4_cfg__dma_system,
  1609. };
  1610. static struct omap_hwmod omap44xx_dma_system_hwmod = {
  1611. .name = "dma_system",
  1612. .class = &omap44xx_dma_hwmod_class,
  1613. .mpu_irqs = omap44xx_dma_system_irqs,
  1614. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs),
  1615. .main_clk = "l3_div_ck",
  1616. .prcm = {
  1617. .omap4 = {
  1618. .clkctrl_reg = OMAP4430_CM_SDMA_SDMA_CLKCTRL,
  1619. },
  1620. },
  1621. .slaves = omap44xx_dma_system_slaves,
  1622. .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
  1623. .masters = omap44xx_dma_system_masters,
  1624. .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
  1625. .dev_attr = &dma_dev_attr,
  1626. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  1627. };
  1628. static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
  1629. /* dmm class */
  1630. &omap44xx_dmm_hwmod,
  1631. /* emif_fw class */
  1632. &omap44xx_emif_fw_hwmod,
  1633. /* l3 class */
  1634. &omap44xx_l3_instr_hwmod,
  1635. &omap44xx_l3_main_1_hwmod,
  1636. &omap44xx_l3_main_2_hwmod,
  1637. &omap44xx_l3_main_3_hwmod,
  1638. /* l4 class */
  1639. &omap44xx_l4_abe_hwmod,
  1640. &omap44xx_l4_cfg_hwmod,
  1641. &omap44xx_l4_per_hwmod,
  1642. &omap44xx_l4_wkup_hwmod,
  1643. /* dma class */
  1644. &omap44xx_dma_system_hwmod,
  1645. /* mpu_bus class */
  1646. &omap44xx_mpu_private_hwmod,
  1647. /* dsp class */
  1648. &omap44xx_dsp_hwmod,
  1649. &omap44xx_dsp_c0_hwmod,
  1650. /* gpio class */
  1651. &omap44xx_gpio1_hwmod,
  1652. &omap44xx_gpio2_hwmod,
  1653. &omap44xx_gpio3_hwmod,
  1654. &omap44xx_gpio4_hwmod,
  1655. &omap44xx_gpio5_hwmod,
  1656. &omap44xx_gpio6_hwmod,
  1657. /* i2c class */
  1658. &omap44xx_i2c1_hwmod,
  1659. &omap44xx_i2c2_hwmod,
  1660. &omap44xx_i2c3_hwmod,
  1661. &omap44xx_i2c4_hwmod,
  1662. /* iva class */
  1663. &omap44xx_iva_hwmod,
  1664. &omap44xx_iva_seq0_hwmod,
  1665. &omap44xx_iva_seq1_hwmod,
  1666. /* mpu class */
  1667. &omap44xx_mpu_hwmod,
  1668. /* uart class */
  1669. &omap44xx_uart1_hwmod,
  1670. &omap44xx_uart2_hwmod,
  1671. &omap44xx_uart3_hwmod,
  1672. &omap44xx_uart4_hwmod,
  1673. /* wd_timer class */
  1674. &omap44xx_wd_timer2_hwmod,
  1675. &omap44xx_wd_timer3_hwmod,
  1676. NULL,
  1677. };
  1678. int __init omap44xx_hwmod_init(void)
  1679. {
  1680. return omap_hwmod_init(omap44xx_hwmods);
  1681. }