omap_hwmod_2430_data.c 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/gpio.h>
  21. #include <plat/mcbsp.h>
  22. #include <plat/mcspi.h>
  23. #include <plat/dmtimer.h>
  24. #include <plat/mmc.h>
  25. #include <plat/l3_2xxx.h>
  26. #include "omap_hwmod_common_data.h"
  27. #include "prm-regbits-24xx.h"
  28. #include "cm-regbits-24xx.h"
  29. #include "wd_timer.h"
  30. /*
  31. * OMAP2430 hardware module integration data
  32. *
  33. * ALl of the data in this section should be autogeneratable from the
  34. * TI hardware database or other technical documentation. Data that
  35. * is driver-specific or driver-kernel integration-specific belongs
  36. * elsewhere.
  37. */
  38. static struct omap_hwmod omap2430_mpu_hwmod;
  39. static struct omap_hwmod omap2430_iva_hwmod;
  40. static struct omap_hwmod omap2430_l3_main_hwmod;
  41. static struct omap_hwmod omap2430_l4_core_hwmod;
  42. static struct omap_hwmod omap2430_dss_core_hwmod;
  43. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  44. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  45. static struct omap_hwmod omap2430_dss_venc_hwmod;
  46. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  47. static struct omap_hwmod omap2430_gpio1_hwmod;
  48. static struct omap_hwmod omap2430_gpio2_hwmod;
  49. static struct omap_hwmod omap2430_gpio3_hwmod;
  50. static struct omap_hwmod omap2430_gpio4_hwmod;
  51. static struct omap_hwmod omap2430_gpio5_hwmod;
  52. static struct omap_hwmod omap2430_dma_system_hwmod;
  53. static struct omap_hwmod omap2430_mcbsp1_hwmod;
  54. static struct omap_hwmod omap2430_mcbsp2_hwmod;
  55. static struct omap_hwmod omap2430_mcbsp3_hwmod;
  56. static struct omap_hwmod omap2430_mcbsp4_hwmod;
  57. static struct omap_hwmod omap2430_mcbsp5_hwmod;
  58. static struct omap_hwmod omap2430_mcspi1_hwmod;
  59. static struct omap_hwmod omap2430_mcspi2_hwmod;
  60. static struct omap_hwmod omap2430_mcspi3_hwmod;
  61. static struct omap_hwmod omap2430_mmc1_hwmod;
  62. static struct omap_hwmod omap2430_mmc2_hwmod;
  63. /* L3 -> L4_CORE interface */
  64. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  65. .master = &omap2430_l3_main_hwmod,
  66. .slave = &omap2430_l4_core_hwmod,
  67. .user = OCP_USER_MPU | OCP_USER_SDMA,
  68. };
  69. /* MPU -> L3 interface */
  70. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  71. .master = &omap2430_mpu_hwmod,
  72. .slave = &omap2430_l3_main_hwmod,
  73. .user = OCP_USER_MPU,
  74. };
  75. /* Slave interfaces on the L3 interconnect */
  76. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  77. &omap2430_mpu__l3_main,
  78. };
  79. /* DSS -> l3 */
  80. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  81. .master = &omap2430_dss_core_hwmod,
  82. .slave = &omap2430_l3_main_hwmod,
  83. .fw = {
  84. .omap2 = {
  85. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  86. .flags = OMAP_FIREWALL_L3,
  87. }
  88. },
  89. .user = OCP_USER_MPU | OCP_USER_SDMA,
  90. };
  91. /* Master interfaces on the L3 interconnect */
  92. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  93. &omap2430_l3_main__l4_core,
  94. };
  95. /* L3 */
  96. static struct omap_hwmod omap2430_l3_main_hwmod = {
  97. .name = "l3_main",
  98. .class = &l3_hwmod_class,
  99. .masters = omap2430_l3_main_masters,
  100. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  101. .slaves = omap2430_l3_main_slaves,
  102. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  103. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  104. .flags = HWMOD_NO_IDLEST,
  105. };
  106. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  107. static struct omap_hwmod omap2430_uart1_hwmod;
  108. static struct omap_hwmod omap2430_uart2_hwmod;
  109. static struct omap_hwmod omap2430_uart3_hwmod;
  110. static struct omap_hwmod omap2430_i2c1_hwmod;
  111. static struct omap_hwmod omap2430_i2c2_hwmod;
  112. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  113. /* l3_core -> usbhsotg interface */
  114. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  115. .master = &omap2430_usbhsotg_hwmod,
  116. .slave = &omap2430_l3_main_hwmod,
  117. .clk = "core_l3_ck",
  118. .user = OCP_USER_MPU,
  119. };
  120. /* L4 CORE -> I2C1 interface */
  121. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  122. .master = &omap2430_l4_core_hwmod,
  123. .slave = &omap2430_i2c1_hwmod,
  124. .clk = "i2c1_ick",
  125. .addr = omap2_i2c1_addr_space,
  126. .user = OCP_USER_MPU | OCP_USER_SDMA,
  127. };
  128. /* L4 CORE -> I2C2 interface */
  129. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  130. .master = &omap2430_l4_core_hwmod,
  131. .slave = &omap2430_i2c2_hwmod,
  132. .clk = "i2c2_ick",
  133. .addr = omap2_i2c2_addr_space,
  134. .user = OCP_USER_MPU | OCP_USER_SDMA,
  135. };
  136. /* L4_CORE -> L4_WKUP interface */
  137. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  138. .master = &omap2430_l4_core_hwmod,
  139. .slave = &omap2430_l4_wkup_hwmod,
  140. .user = OCP_USER_MPU | OCP_USER_SDMA,
  141. };
  142. /* L4 CORE -> UART1 interface */
  143. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  144. .master = &omap2430_l4_core_hwmod,
  145. .slave = &omap2430_uart1_hwmod,
  146. .clk = "uart1_ick",
  147. .addr = omap2xxx_uart1_addr_space,
  148. .user = OCP_USER_MPU | OCP_USER_SDMA,
  149. };
  150. /* L4 CORE -> UART2 interface */
  151. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  152. .master = &omap2430_l4_core_hwmod,
  153. .slave = &omap2430_uart2_hwmod,
  154. .clk = "uart2_ick",
  155. .addr = omap2xxx_uart2_addr_space,
  156. .user = OCP_USER_MPU | OCP_USER_SDMA,
  157. };
  158. /* L4 PER -> UART3 interface */
  159. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  160. .master = &omap2430_l4_core_hwmod,
  161. .slave = &omap2430_uart3_hwmod,
  162. .clk = "uart3_ick",
  163. .addr = omap2xxx_uart3_addr_space,
  164. .user = OCP_USER_MPU | OCP_USER_SDMA,
  165. };
  166. /*
  167. * usbhsotg interface data
  168. */
  169. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  170. {
  171. .pa_start = OMAP243X_HS_BASE,
  172. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  173. .flags = ADDR_TYPE_RT
  174. },
  175. };
  176. /* l4_core ->usbhsotg interface */
  177. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  178. .master = &omap2430_l4_core_hwmod,
  179. .slave = &omap2430_usbhsotg_hwmod,
  180. .clk = "usb_l4_ick",
  181. .addr = omap2430_usbhsotg_addrs,
  182. .user = OCP_USER_MPU,
  183. };
  184. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
  185. &omap2430_usbhsotg__l3,
  186. };
  187. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
  188. &omap2430_l4_core__usbhsotg,
  189. };
  190. /* L4 CORE -> MMC1 interface */
  191. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
  192. .master = &omap2430_l4_core_hwmod,
  193. .slave = &omap2430_mmc1_hwmod,
  194. .clk = "mmchs1_ick",
  195. .addr = omap2430_mmc1_addr_space,
  196. .user = OCP_USER_MPU | OCP_USER_SDMA,
  197. };
  198. /* L4 CORE -> MMC2 interface */
  199. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
  200. .master = &omap2430_l4_core_hwmod,
  201. .slave = &omap2430_mmc2_hwmod,
  202. .clk = "mmchs2_ick",
  203. .addr = omap2430_mmc2_addr_space,
  204. .user = OCP_USER_MPU | OCP_USER_SDMA,
  205. };
  206. /* Slave interfaces on the L4_CORE interconnect */
  207. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  208. &omap2430_l3_main__l4_core,
  209. };
  210. /* Master interfaces on the L4_CORE interconnect */
  211. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  212. &omap2430_l4_core__l4_wkup,
  213. &omap2430_l4_core__mmc1,
  214. &omap2430_l4_core__mmc2,
  215. };
  216. /* L4 CORE */
  217. static struct omap_hwmod omap2430_l4_core_hwmod = {
  218. .name = "l4_core",
  219. .class = &l4_hwmod_class,
  220. .masters = omap2430_l4_core_masters,
  221. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  222. .slaves = omap2430_l4_core_slaves,
  223. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  224. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  225. .flags = HWMOD_NO_IDLEST,
  226. };
  227. /* Slave interfaces on the L4_WKUP interconnect */
  228. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  229. &omap2430_l4_core__l4_wkup,
  230. &omap2_l4_core__uart1,
  231. &omap2_l4_core__uart2,
  232. &omap2_l4_core__uart3,
  233. };
  234. /* Master interfaces on the L4_WKUP interconnect */
  235. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  236. };
  237. /* l4 core -> mcspi1 interface */
  238. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  239. .master = &omap2430_l4_core_hwmod,
  240. .slave = &omap2430_mcspi1_hwmod,
  241. .clk = "mcspi1_ick",
  242. .addr = omap2_mcspi1_addr_space,
  243. .user = OCP_USER_MPU | OCP_USER_SDMA,
  244. };
  245. /* l4 core -> mcspi2 interface */
  246. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  247. .master = &omap2430_l4_core_hwmod,
  248. .slave = &omap2430_mcspi2_hwmod,
  249. .clk = "mcspi2_ick",
  250. .addr = omap2_mcspi2_addr_space,
  251. .user = OCP_USER_MPU | OCP_USER_SDMA,
  252. };
  253. /* l4 core -> mcspi3 interface */
  254. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  255. .master = &omap2430_l4_core_hwmod,
  256. .slave = &omap2430_mcspi3_hwmod,
  257. .clk = "mcspi3_ick",
  258. .addr = omap2430_mcspi3_addr_space,
  259. .user = OCP_USER_MPU | OCP_USER_SDMA,
  260. };
  261. /* L4 WKUP */
  262. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  263. .name = "l4_wkup",
  264. .class = &l4_hwmod_class,
  265. .masters = omap2430_l4_wkup_masters,
  266. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  267. .slaves = omap2430_l4_wkup_slaves,
  268. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  269. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  270. .flags = HWMOD_NO_IDLEST,
  271. };
  272. /* Master interfaces on the MPU device */
  273. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  274. &omap2430_mpu__l3_main,
  275. };
  276. /* MPU */
  277. static struct omap_hwmod omap2430_mpu_hwmod = {
  278. .name = "mpu",
  279. .class = &mpu_hwmod_class,
  280. .main_clk = "mpu_ck",
  281. .masters = omap2430_mpu_masters,
  282. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  283. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  284. };
  285. /*
  286. * IVA2_1 interface data
  287. */
  288. /* IVA2 <- L3 interface */
  289. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  290. .master = &omap2430_l3_main_hwmod,
  291. .slave = &omap2430_iva_hwmod,
  292. .clk = "dsp_fck",
  293. .user = OCP_USER_MPU | OCP_USER_SDMA,
  294. };
  295. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  296. &omap2430_l3__iva,
  297. };
  298. /*
  299. * IVA2 (IVA2)
  300. */
  301. static struct omap_hwmod omap2430_iva_hwmod = {
  302. .name = "iva",
  303. .class = &iva_hwmod_class,
  304. .masters = omap2430_iva_masters,
  305. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  306. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  307. };
  308. /* Timer Common */
  309. static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
  310. .rev_offs = 0x0000,
  311. .sysc_offs = 0x0010,
  312. .syss_offs = 0x0014,
  313. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  314. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  315. SYSC_HAS_AUTOIDLE),
  316. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  317. .sysc_fields = &omap_hwmod_sysc_type1,
  318. };
  319. static struct omap_hwmod_class omap2430_timer_hwmod_class = {
  320. .name = "timer",
  321. .sysc = &omap2430_timer_sysc,
  322. .rev = OMAP_TIMER_IP_VERSION_1,
  323. };
  324. /* timer1 */
  325. static struct omap_hwmod omap2430_timer1_hwmod;
  326. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  327. {
  328. .pa_start = 0x49018000,
  329. .pa_end = 0x49018000 + SZ_1K - 1,
  330. .flags = ADDR_TYPE_RT
  331. },
  332. { }
  333. };
  334. /* l4_wkup -> timer1 */
  335. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  336. .master = &omap2430_l4_wkup_hwmod,
  337. .slave = &omap2430_timer1_hwmod,
  338. .clk = "gpt1_ick",
  339. .addr = omap2430_timer1_addrs,
  340. .user = OCP_USER_MPU | OCP_USER_SDMA,
  341. };
  342. /* timer1 slave port */
  343. static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
  344. &omap2430_l4_wkup__timer1,
  345. };
  346. /* timer1 hwmod */
  347. static struct omap_hwmod omap2430_timer1_hwmod = {
  348. .name = "timer1",
  349. .mpu_irqs = omap2_timer1_mpu_irqs,
  350. .main_clk = "gpt1_fck",
  351. .prcm = {
  352. .omap2 = {
  353. .prcm_reg_id = 1,
  354. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  355. .module_offs = WKUP_MOD,
  356. .idlest_reg_id = 1,
  357. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  358. },
  359. },
  360. .slaves = omap2430_timer1_slaves,
  361. .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
  362. .class = &omap2430_timer_hwmod_class,
  363. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  364. };
  365. /* timer2 */
  366. static struct omap_hwmod omap2430_timer2_hwmod;
  367. /* l4_core -> timer2 */
  368. static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
  369. .master = &omap2430_l4_core_hwmod,
  370. .slave = &omap2430_timer2_hwmod,
  371. .clk = "gpt2_ick",
  372. .addr = omap2xxx_timer2_addrs,
  373. .user = OCP_USER_MPU | OCP_USER_SDMA,
  374. };
  375. /* timer2 slave port */
  376. static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
  377. &omap2430_l4_core__timer2,
  378. };
  379. /* timer2 hwmod */
  380. static struct omap_hwmod omap2430_timer2_hwmod = {
  381. .name = "timer2",
  382. .mpu_irqs = omap2_timer2_mpu_irqs,
  383. .main_clk = "gpt2_fck",
  384. .prcm = {
  385. .omap2 = {
  386. .prcm_reg_id = 1,
  387. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  388. .module_offs = CORE_MOD,
  389. .idlest_reg_id = 1,
  390. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  391. },
  392. },
  393. .slaves = omap2430_timer2_slaves,
  394. .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
  395. .class = &omap2430_timer_hwmod_class,
  396. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  397. };
  398. /* timer3 */
  399. static struct omap_hwmod omap2430_timer3_hwmod;
  400. /* l4_core -> timer3 */
  401. static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
  402. .master = &omap2430_l4_core_hwmod,
  403. .slave = &omap2430_timer3_hwmod,
  404. .clk = "gpt3_ick",
  405. .addr = omap2xxx_timer3_addrs,
  406. .user = OCP_USER_MPU | OCP_USER_SDMA,
  407. };
  408. /* timer3 slave port */
  409. static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
  410. &omap2430_l4_core__timer3,
  411. };
  412. /* timer3 hwmod */
  413. static struct omap_hwmod omap2430_timer3_hwmod = {
  414. .name = "timer3",
  415. .mpu_irqs = omap2_timer3_mpu_irqs,
  416. .main_clk = "gpt3_fck",
  417. .prcm = {
  418. .omap2 = {
  419. .prcm_reg_id = 1,
  420. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  421. .module_offs = CORE_MOD,
  422. .idlest_reg_id = 1,
  423. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  424. },
  425. },
  426. .slaves = omap2430_timer3_slaves,
  427. .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
  428. .class = &omap2430_timer_hwmod_class,
  429. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  430. };
  431. /* timer4 */
  432. static struct omap_hwmod omap2430_timer4_hwmod;
  433. /* l4_core -> timer4 */
  434. static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
  435. .master = &omap2430_l4_core_hwmod,
  436. .slave = &omap2430_timer4_hwmod,
  437. .clk = "gpt4_ick",
  438. .addr = omap2xxx_timer4_addrs,
  439. .user = OCP_USER_MPU | OCP_USER_SDMA,
  440. };
  441. /* timer4 slave port */
  442. static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
  443. &omap2430_l4_core__timer4,
  444. };
  445. /* timer4 hwmod */
  446. static struct omap_hwmod omap2430_timer4_hwmod = {
  447. .name = "timer4",
  448. .mpu_irqs = omap2_timer4_mpu_irqs,
  449. .main_clk = "gpt4_fck",
  450. .prcm = {
  451. .omap2 = {
  452. .prcm_reg_id = 1,
  453. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  454. .module_offs = CORE_MOD,
  455. .idlest_reg_id = 1,
  456. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  457. },
  458. },
  459. .slaves = omap2430_timer4_slaves,
  460. .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
  461. .class = &omap2430_timer_hwmod_class,
  462. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  463. };
  464. /* timer5 */
  465. static struct omap_hwmod omap2430_timer5_hwmod;
  466. /* l4_core -> timer5 */
  467. static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
  468. .master = &omap2430_l4_core_hwmod,
  469. .slave = &omap2430_timer5_hwmod,
  470. .clk = "gpt5_ick",
  471. .addr = omap2xxx_timer5_addrs,
  472. .user = OCP_USER_MPU | OCP_USER_SDMA,
  473. };
  474. /* timer5 slave port */
  475. static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
  476. &omap2430_l4_core__timer5,
  477. };
  478. /* timer5 hwmod */
  479. static struct omap_hwmod omap2430_timer5_hwmod = {
  480. .name = "timer5",
  481. .mpu_irqs = omap2_timer5_mpu_irqs,
  482. .main_clk = "gpt5_fck",
  483. .prcm = {
  484. .omap2 = {
  485. .prcm_reg_id = 1,
  486. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  487. .module_offs = CORE_MOD,
  488. .idlest_reg_id = 1,
  489. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  490. },
  491. },
  492. .slaves = omap2430_timer5_slaves,
  493. .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
  494. .class = &omap2430_timer_hwmod_class,
  495. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  496. };
  497. /* timer6 */
  498. static struct omap_hwmod omap2430_timer6_hwmod;
  499. /* l4_core -> timer6 */
  500. static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
  501. .master = &omap2430_l4_core_hwmod,
  502. .slave = &omap2430_timer6_hwmod,
  503. .clk = "gpt6_ick",
  504. .addr = omap2xxx_timer6_addrs,
  505. .user = OCP_USER_MPU | OCP_USER_SDMA,
  506. };
  507. /* timer6 slave port */
  508. static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
  509. &omap2430_l4_core__timer6,
  510. };
  511. /* timer6 hwmod */
  512. static struct omap_hwmod omap2430_timer6_hwmod = {
  513. .name = "timer6",
  514. .mpu_irqs = omap2_timer6_mpu_irqs,
  515. .main_clk = "gpt6_fck",
  516. .prcm = {
  517. .omap2 = {
  518. .prcm_reg_id = 1,
  519. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  520. .module_offs = CORE_MOD,
  521. .idlest_reg_id = 1,
  522. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  523. },
  524. },
  525. .slaves = omap2430_timer6_slaves,
  526. .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
  527. .class = &omap2430_timer_hwmod_class,
  528. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  529. };
  530. /* timer7 */
  531. static struct omap_hwmod omap2430_timer7_hwmod;
  532. /* l4_core -> timer7 */
  533. static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
  534. .master = &omap2430_l4_core_hwmod,
  535. .slave = &omap2430_timer7_hwmod,
  536. .clk = "gpt7_ick",
  537. .addr = omap2xxx_timer7_addrs,
  538. .user = OCP_USER_MPU | OCP_USER_SDMA,
  539. };
  540. /* timer7 slave port */
  541. static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
  542. &omap2430_l4_core__timer7,
  543. };
  544. /* timer7 hwmod */
  545. static struct omap_hwmod omap2430_timer7_hwmod = {
  546. .name = "timer7",
  547. .mpu_irqs = omap2_timer7_mpu_irqs,
  548. .main_clk = "gpt7_fck",
  549. .prcm = {
  550. .omap2 = {
  551. .prcm_reg_id = 1,
  552. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  553. .module_offs = CORE_MOD,
  554. .idlest_reg_id = 1,
  555. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  556. },
  557. },
  558. .slaves = omap2430_timer7_slaves,
  559. .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
  560. .class = &omap2430_timer_hwmod_class,
  561. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  562. };
  563. /* timer8 */
  564. static struct omap_hwmod omap2430_timer8_hwmod;
  565. /* l4_core -> timer8 */
  566. static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
  567. .master = &omap2430_l4_core_hwmod,
  568. .slave = &omap2430_timer8_hwmod,
  569. .clk = "gpt8_ick",
  570. .addr = omap2xxx_timer8_addrs,
  571. .user = OCP_USER_MPU | OCP_USER_SDMA,
  572. };
  573. /* timer8 slave port */
  574. static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
  575. &omap2430_l4_core__timer8,
  576. };
  577. /* timer8 hwmod */
  578. static struct omap_hwmod omap2430_timer8_hwmod = {
  579. .name = "timer8",
  580. .mpu_irqs = omap2_timer8_mpu_irqs,
  581. .main_clk = "gpt8_fck",
  582. .prcm = {
  583. .omap2 = {
  584. .prcm_reg_id = 1,
  585. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  586. .module_offs = CORE_MOD,
  587. .idlest_reg_id = 1,
  588. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  589. },
  590. },
  591. .slaves = omap2430_timer8_slaves,
  592. .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
  593. .class = &omap2430_timer_hwmod_class,
  594. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  595. };
  596. /* timer9 */
  597. static struct omap_hwmod omap2430_timer9_hwmod;
  598. /* l4_core -> timer9 */
  599. static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
  600. .master = &omap2430_l4_core_hwmod,
  601. .slave = &omap2430_timer9_hwmod,
  602. .clk = "gpt9_ick",
  603. .addr = omap2xxx_timer9_addrs,
  604. .user = OCP_USER_MPU | OCP_USER_SDMA,
  605. };
  606. /* timer9 slave port */
  607. static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
  608. &omap2430_l4_core__timer9,
  609. };
  610. /* timer9 hwmod */
  611. static struct omap_hwmod omap2430_timer9_hwmod = {
  612. .name = "timer9",
  613. .mpu_irqs = omap2_timer9_mpu_irqs,
  614. .main_clk = "gpt9_fck",
  615. .prcm = {
  616. .omap2 = {
  617. .prcm_reg_id = 1,
  618. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  619. .module_offs = CORE_MOD,
  620. .idlest_reg_id = 1,
  621. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  622. },
  623. },
  624. .slaves = omap2430_timer9_slaves,
  625. .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
  626. .class = &omap2430_timer_hwmod_class,
  627. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  628. };
  629. /* timer10 */
  630. static struct omap_hwmod omap2430_timer10_hwmod;
  631. /* l4_core -> timer10 */
  632. static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
  633. .master = &omap2430_l4_core_hwmod,
  634. .slave = &omap2430_timer10_hwmod,
  635. .clk = "gpt10_ick",
  636. .addr = omap2_timer10_addrs,
  637. .user = OCP_USER_MPU | OCP_USER_SDMA,
  638. };
  639. /* timer10 slave port */
  640. static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
  641. &omap2430_l4_core__timer10,
  642. };
  643. /* timer10 hwmod */
  644. static struct omap_hwmod omap2430_timer10_hwmod = {
  645. .name = "timer10",
  646. .mpu_irqs = omap2_timer10_mpu_irqs,
  647. .main_clk = "gpt10_fck",
  648. .prcm = {
  649. .omap2 = {
  650. .prcm_reg_id = 1,
  651. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  652. .module_offs = CORE_MOD,
  653. .idlest_reg_id = 1,
  654. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  655. },
  656. },
  657. .slaves = omap2430_timer10_slaves,
  658. .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
  659. .class = &omap2430_timer_hwmod_class,
  660. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  661. };
  662. /* timer11 */
  663. static struct omap_hwmod omap2430_timer11_hwmod;
  664. /* l4_core -> timer11 */
  665. static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
  666. .master = &omap2430_l4_core_hwmod,
  667. .slave = &omap2430_timer11_hwmod,
  668. .clk = "gpt11_ick",
  669. .addr = omap2_timer11_addrs,
  670. .user = OCP_USER_MPU | OCP_USER_SDMA,
  671. };
  672. /* timer11 slave port */
  673. static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
  674. &omap2430_l4_core__timer11,
  675. };
  676. /* timer11 hwmod */
  677. static struct omap_hwmod omap2430_timer11_hwmod = {
  678. .name = "timer11",
  679. .mpu_irqs = omap2_timer11_mpu_irqs,
  680. .main_clk = "gpt11_fck",
  681. .prcm = {
  682. .omap2 = {
  683. .prcm_reg_id = 1,
  684. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  685. .module_offs = CORE_MOD,
  686. .idlest_reg_id = 1,
  687. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  688. },
  689. },
  690. .slaves = omap2430_timer11_slaves,
  691. .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
  692. .class = &omap2430_timer_hwmod_class,
  693. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  694. };
  695. /* timer12 */
  696. static struct omap_hwmod omap2430_timer12_hwmod;
  697. /* l4_core -> timer12 */
  698. static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
  699. .master = &omap2430_l4_core_hwmod,
  700. .slave = &omap2430_timer12_hwmod,
  701. .clk = "gpt12_ick",
  702. .addr = omap2xxx_timer12_addrs,
  703. .user = OCP_USER_MPU | OCP_USER_SDMA,
  704. };
  705. /* timer12 slave port */
  706. static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
  707. &omap2430_l4_core__timer12,
  708. };
  709. /* timer12 hwmod */
  710. static struct omap_hwmod omap2430_timer12_hwmod = {
  711. .name = "timer12",
  712. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  713. .main_clk = "gpt12_fck",
  714. .prcm = {
  715. .omap2 = {
  716. .prcm_reg_id = 1,
  717. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  718. .module_offs = CORE_MOD,
  719. .idlest_reg_id = 1,
  720. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  721. },
  722. },
  723. .slaves = omap2430_timer12_slaves,
  724. .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
  725. .class = &omap2430_timer_hwmod_class,
  726. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  727. };
  728. /* l4_wkup -> wd_timer2 */
  729. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  730. {
  731. .pa_start = 0x49016000,
  732. .pa_end = 0x4901607f,
  733. .flags = ADDR_TYPE_RT
  734. },
  735. { }
  736. };
  737. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  738. .master = &omap2430_l4_wkup_hwmod,
  739. .slave = &omap2430_wd_timer2_hwmod,
  740. .clk = "mpu_wdt_ick",
  741. .addr = omap2430_wd_timer2_addrs,
  742. .user = OCP_USER_MPU | OCP_USER_SDMA,
  743. };
  744. /*
  745. * 'wd_timer' class
  746. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  747. * overflow condition
  748. */
  749. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  750. .rev_offs = 0x0,
  751. .sysc_offs = 0x0010,
  752. .syss_offs = 0x0014,
  753. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  754. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  755. .sysc_fields = &omap_hwmod_sysc_type1,
  756. };
  757. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  758. .name = "wd_timer",
  759. .sysc = &omap2430_wd_timer_sysc,
  760. .pre_shutdown = &omap2_wd_timer_disable
  761. };
  762. /* wd_timer2 */
  763. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  764. &omap2430_l4_wkup__wd_timer2,
  765. };
  766. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  767. .name = "wd_timer2",
  768. .class = &omap2430_wd_timer_hwmod_class,
  769. .main_clk = "mpu_wdt_fck",
  770. .prcm = {
  771. .omap2 = {
  772. .prcm_reg_id = 1,
  773. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  774. .module_offs = WKUP_MOD,
  775. .idlest_reg_id = 1,
  776. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  777. },
  778. },
  779. .slaves = omap2430_wd_timer2_slaves,
  780. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  781. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  782. };
  783. /* UART */
  784. static struct omap_hwmod_class_sysconfig uart_sysc = {
  785. .rev_offs = 0x50,
  786. .sysc_offs = 0x54,
  787. .syss_offs = 0x58,
  788. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  789. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  790. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  791. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  792. .sysc_fields = &omap_hwmod_sysc_type1,
  793. };
  794. static struct omap_hwmod_class uart_class = {
  795. .name = "uart",
  796. .sysc = &uart_sysc,
  797. };
  798. /* UART1 */
  799. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  800. &omap2_l4_core__uart1,
  801. };
  802. static struct omap_hwmod omap2430_uart1_hwmod = {
  803. .name = "uart1",
  804. .mpu_irqs = omap2_uart1_mpu_irqs,
  805. .sdma_reqs = omap2_uart1_sdma_reqs,
  806. .main_clk = "uart1_fck",
  807. .prcm = {
  808. .omap2 = {
  809. .module_offs = CORE_MOD,
  810. .prcm_reg_id = 1,
  811. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  812. .idlest_reg_id = 1,
  813. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  814. },
  815. },
  816. .slaves = omap2430_uart1_slaves,
  817. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  818. .class = &uart_class,
  819. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  820. };
  821. /* UART2 */
  822. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  823. &omap2_l4_core__uart2,
  824. };
  825. static struct omap_hwmod omap2430_uart2_hwmod = {
  826. .name = "uart2",
  827. .mpu_irqs = omap2_uart2_mpu_irqs,
  828. .sdma_reqs = omap2_uart2_sdma_reqs,
  829. .main_clk = "uart2_fck",
  830. .prcm = {
  831. .omap2 = {
  832. .module_offs = CORE_MOD,
  833. .prcm_reg_id = 1,
  834. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  835. .idlest_reg_id = 1,
  836. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  837. },
  838. },
  839. .slaves = omap2430_uart2_slaves,
  840. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  841. .class = &uart_class,
  842. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  843. };
  844. /* UART3 */
  845. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  846. &omap2_l4_core__uart3,
  847. };
  848. static struct omap_hwmod omap2430_uart3_hwmod = {
  849. .name = "uart3",
  850. .mpu_irqs = omap2_uart3_mpu_irqs,
  851. .sdma_reqs = omap2_uart3_sdma_reqs,
  852. .main_clk = "uart3_fck",
  853. .prcm = {
  854. .omap2 = {
  855. .module_offs = CORE_MOD,
  856. .prcm_reg_id = 2,
  857. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  858. .idlest_reg_id = 2,
  859. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  860. },
  861. },
  862. .slaves = omap2430_uart3_slaves,
  863. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  864. .class = &uart_class,
  865. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  866. };
  867. /*
  868. * 'dss' class
  869. * display sub-system
  870. */
  871. static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
  872. .rev_offs = 0x0000,
  873. .sysc_offs = 0x0010,
  874. .syss_offs = 0x0014,
  875. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  876. .sysc_fields = &omap_hwmod_sysc_type1,
  877. };
  878. static struct omap_hwmod_class omap2430_dss_hwmod_class = {
  879. .name = "dss",
  880. .sysc = &omap2430_dss_sysc,
  881. };
  882. /* dss */
  883. /* dss master ports */
  884. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  885. &omap2430_dss__l3,
  886. };
  887. /* l4_core -> dss */
  888. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  889. .master = &omap2430_l4_core_hwmod,
  890. .slave = &omap2430_dss_core_hwmod,
  891. .clk = "dss_ick",
  892. .addr = omap2_dss_addrs,
  893. .user = OCP_USER_MPU | OCP_USER_SDMA,
  894. };
  895. /* dss slave ports */
  896. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  897. &omap2430_l4_core__dss,
  898. };
  899. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  900. { .role = "tv_clk", .clk = "dss_54m_fck" },
  901. { .role = "sys_clk", .clk = "dss2_fck" },
  902. };
  903. static struct omap_hwmod omap2430_dss_core_hwmod = {
  904. .name = "dss_core",
  905. .class = &omap2430_dss_hwmod_class,
  906. .main_clk = "dss1_fck", /* instead of dss_fck */
  907. .sdma_reqs = omap2xxx_dss_sdma_chs,
  908. .prcm = {
  909. .omap2 = {
  910. .prcm_reg_id = 1,
  911. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  912. .module_offs = CORE_MOD,
  913. .idlest_reg_id = 1,
  914. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  915. },
  916. },
  917. .opt_clks = dss_opt_clks,
  918. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  919. .slaves = omap2430_dss_slaves,
  920. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  921. .masters = omap2430_dss_masters,
  922. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  923. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  924. .flags = HWMOD_NO_IDLEST,
  925. };
  926. /*
  927. * 'dispc' class
  928. * display controller
  929. */
  930. static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
  931. .rev_offs = 0x0000,
  932. .sysc_offs = 0x0010,
  933. .syss_offs = 0x0014,
  934. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  935. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  936. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  937. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  938. .sysc_fields = &omap_hwmod_sysc_type1,
  939. };
  940. static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
  941. .name = "dispc",
  942. .sysc = &omap2430_dispc_sysc,
  943. };
  944. /* l4_core -> dss_dispc */
  945. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  946. .master = &omap2430_l4_core_hwmod,
  947. .slave = &omap2430_dss_dispc_hwmod,
  948. .clk = "dss_ick",
  949. .addr = omap2_dss_dispc_addrs,
  950. .user = OCP_USER_MPU | OCP_USER_SDMA,
  951. };
  952. /* dss_dispc slave ports */
  953. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  954. &omap2430_l4_core__dss_dispc,
  955. };
  956. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  957. .name = "dss_dispc",
  958. .class = &omap2430_dispc_hwmod_class,
  959. .mpu_irqs = omap2_dispc_irqs,
  960. .main_clk = "dss1_fck",
  961. .prcm = {
  962. .omap2 = {
  963. .prcm_reg_id = 1,
  964. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  965. .module_offs = CORE_MOD,
  966. .idlest_reg_id = 1,
  967. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  968. },
  969. },
  970. .slaves = omap2430_dss_dispc_slaves,
  971. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  972. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  973. .flags = HWMOD_NO_IDLEST,
  974. };
  975. /*
  976. * 'rfbi' class
  977. * remote frame buffer interface
  978. */
  979. static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
  980. .rev_offs = 0x0000,
  981. .sysc_offs = 0x0010,
  982. .syss_offs = 0x0014,
  983. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  984. SYSC_HAS_AUTOIDLE),
  985. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  986. .sysc_fields = &omap_hwmod_sysc_type1,
  987. };
  988. static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
  989. .name = "rfbi",
  990. .sysc = &omap2430_rfbi_sysc,
  991. };
  992. /* l4_core -> dss_rfbi */
  993. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  994. .master = &omap2430_l4_core_hwmod,
  995. .slave = &omap2430_dss_rfbi_hwmod,
  996. .clk = "dss_ick",
  997. .addr = omap2_dss_rfbi_addrs,
  998. .user = OCP_USER_MPU | OCP_USER_SDMA,
  999. };
  1000. /* dss_rfbi slave ports */
  1001. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  1002. &omap2430_l4_core__dss_rfbi,
  1003. };
  1004. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  1005. .name = "dss_rfbi",
  1006. .class = &omap2430_rfbi_hwmod_class,
  1007. .main_clk = "dss1_fck",
  1008. .prcm = {
  1009. .omap2 = {
  1010. .prcm_reg_id = 1,
  1011. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1012. .module_offs = CORE_MOD,
  1013. },
  1014. },
  1015. .slaves = omap2430_dss_rfbi_slaves,
  1016. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  1017. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1018. .flags = HWMOD_NO_IDLEST,
  1019. };
  1020. /*
  1021. * 'venc' class
  1022. * video encoder
  1023. */
  1024. static struct omap_hwmod_class omap2430_venc_hwmod_class = {
  1025. .name = "venc",
  1026. };
  1027. /* l4_core -> dss_venc */
  1028. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  1029. .master = &omap2430_l4_core_hwmod,
  1030. .slave = &omap2430_dss_venc_hwmod,
  1031. .clk = "dss_54m_fck",
  1032. .addr = omap2_dss_venc_addrs,
  1033. .flags = OCPIF_SWSUP_IDLE,
  1034. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1035. };
  1036. /* dss_venc slave ports */
  1037. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  1038. &omap2430_l4_core__dss_venc,
  1039. };
  1040. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  1041. .name = "dss_venc",
  1042. .class = &omap2430_venc_hwmod_class,
  1043. .main_clk = "dss1_fck",
  1044. .prcm = {
  1045. .omap2 = {
  1046. .prcm_reg_id = 1,
  1047. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1048. .module_offs = CORE_MOD,
  1049. },
  1050. },
  1051. .slaves = omap2430_dss_venc_slaves,
  1052. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  1053. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1054. .flags = HWMOD_NO_IDLEST,
  1055. };
  1056. /* I2C common */
  1057. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1058. .rev_offs = 0x00,
  1059. .sysc_offs = 0x20,
  1060. .syss_offs = 0x10,
  1061. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1062. SYSS_HAS_RESET_STATUS),
  1063. .sysc_fields = &omap_hwmod_sysc_type1,
  1064. };
  1065. static struct omap_hwmod_class i2c_class = {
  1066. .name = "i2c",
  1067. .sysc = &i2c_sysc,
  1068. };
  1069. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1070. .fifo_depth = 8, /* bytes */
  1071. };
  1072. /* I2C1 */
  1073. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  1074. &omap2430_l4_core__i2c1,
  1075. };
  1076. static struct omap_hwmod omap2430_i2c1_hwmod = {
  1077. .name = "i2c1",
  1078. .mpu_irqs = omap2_i2c1_mpu_irqs,
  1079. .sdma_reqs = omap2_i2c1_sdma_reqs,
  1080. .main_clk = "i2chs1_fck",
  1081. .prcm = {
  1082. .omap2 = {
  1083. /*
  1084. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  1085. * I2CHS IP's do not follow the usual pattern.
  1086. * prcm_reg_id alone cannot be used to program
  1087. * the iclk and fclk. Needs to be handled using
  1088. * additional flags when clk handling is moved
  1089. * to hwmod framework.
  1090. */
  1091. .module_offs = CORE_MOD,
  1092. .prcm_reg_id = 1,
  1093. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  1094. .idlest_reg_id = 1,
  1095. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  1096. },
  1097. },
  1098. .slaves = omap2430_i2c1_slaves,
  1099. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  1100. .class = &i2c_class,
  1101. .dev_attr = &i2c_dev_attr,
  1102. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1103. };
  1104. /* I2C2 */
  1105. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  1106. &omap2430_l4_core__i2c2,
  1107. };
  1108. static struct omap_hwmod omap2430_i2c2_hwmod = {
  1109. .name = "i2c2",
  1110. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1111. .sdma_reqs = omap2_i2c2_sdma_reqs,
  1112. .main_clk = "i2chs2_fck",
  1113. .prcm = {
  1114. .omap2 = {
  1115. .module_offs = CORE_MOD,
  1116. .prcm_reg_id = 1,
  1117. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  1118. .idlest_reg_id = 1,
  1119. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  1120. },
  1121. },
  1122. .slaves = omap2430_i2c2_slaves,
  1123. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  1124. .class = &i2c_class,
  1125. .dev_attr = &i2c_dev_attr,
  1126. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1127. };
  1128. /* l4_wkup -> gpio1 */
  1129. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  1130. {
  1131. .pa_start = 0x4900C000,
  1132. .pa_end = 0x4900C1ff,
  1133. .flags = ADDR_TYPE_RT
  1134. },
  1135. { }
  1136. };
  1137. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  1138. .master = &omap2430_l4_wkup_hwmod,
  1139. .slave = &omap2430_gpio1_hwmod,
  1140. .clk = "gpios_ick",
  1141. .addr = omap2430_gpio1_addr_space,
  1142. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1143. };
  1144. /* l4_wkup -> gpio2 */
  1145. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  1146. {
  1147. .pa_start = 0x4900E000,
  1148. .pa_end = 0x4900E1ff,
  1149. .flags = ADDR_TYPE_RT
  1150. },
  1151. { }
  1152. };
  1153. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  1154. .master = &omap2430_l4_wkup_hwmod,
  1155. .slave = &omap2430_gpio2_hwmod,
  1156. .clk = "gpios_ick",
  1157. .addr = omap2430_gpio2_addr_space,
  1158. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1159. };
  1160. /* l4_wkup -> gpio3 */
  1161. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  1162. {
  1163. .pa_start = 0x49010000,
  1164. .pa_end = 0x490101ff,
  1165. .flags = ADDR_TYPE_RT
  1166. },
  1167. { }
  1168. };
  1169. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  1170. .master = &omap2430_l4_wkup_hwmod,
  1171. .slave = &omap2430_gpio3_hwmod,
  1172. .clk = "gpios_ick",
  1173. .addr = omap2430_gpio3_addr_space,
  1174. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1175. };
  1176. /* l4_wkup -> gpio4 */
  1177. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  1178. {
  1179. .pa_start = 0x49012000,
  1180. .pa_end = 0x490121ff,
  1181. .flags = ADDR_TYPE_RT
  1182. },
  1183. { }
  1184. };
  1185. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  1186. .master = &omap2430_l4_wkup_hwmod,
  1187. .slave = &omap2430_gpio4_hwmod,
  1188. .clk = "gpios_ick",
  1189. .addr = omap2430_gpio4_addr_space,
  1190. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1191. };
  1192. /* l4_core -> gpio5 */
  1193. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  1194. {
  1195. .pa_start = 0x480B6000,
  1196. .pa_end = 0x480B61ff,
  1197. .flags = ADDR_TYPE_RT
  1198. },
  1199. { }
  1200. };
  1201. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  1202. .master = &omap2430_l4_core_hwmod,
  1203. .slave = &omap2430_gpio5_hwmod,
  1204. .clk = "gpio5_ick",
  1205. .addr = omap2430_gpio5_addr_space,
  1206. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1207. };
  1208. /* gpio dev_attr */
  1209. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1210. .bank_width = 32,
  1211. .dbck_flag = false,
  1212. };
  1213. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  1214. .rev_offs = 0x0000,
  1215. .sysc_offs = 0x0010,
  1216. .syss_offs = 0x0014,
  1217. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1218. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1219. SYSS_HAS_RESET_STATUS),
  1220. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1221. .sysc_fields = &omap_hwmod_sysc_type1,
  1222. };
  1223. /*
  1224. * 'gpio' class
  1225. * general purpose io module
  1226. */
  1227. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  1228. .name = "gpio",
  1229. .sysc = &omap243x_gpio_sysc,
  1230. .rev = 0,
  1231. };
  1232. /* gpio1 */
  1233. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  1234. &omap2430_l4_wkup__gpio1,
  1235. };
  1236. static struct omap_hwmod omap2430_gpio1_hwmod = {
  1237. .name = "gpio1",
  1238. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1239. .mpu_irqs = omap2_gpio1_irqs,
  1240. .main_clk = "gpios_fck",
  1241. .prcm = {
  1242. .omap2 = {
  1243. .prcm_reg_id = 1,
  1244. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1245. .module_offs = WKUP_MOD,
  1246. .idlest_reg_id = 1,
  1247. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1248. },
  1249. },
  1250. .slaves = omap2430_gpio1_slaves,
  1251. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  1252. .class = &omap243x_gpio_hwmod_class,
  1253. .dev_attr = &gpio_dev_attr,
  1254. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1255. };
  1256. /* gpio2 */
  1257. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  1258. &omap2430_l4_wkup__gpio2,
  1259. };
  1260. static struct omap_hwmod omap2430_gpio2_hwmod = {
  1261. .name = "gpio2",
  1262. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1263. .mpu_irqs = omap2_gpio2_irqs,
  1264. .main_clk = "gpios_fck",
  1265. .prcm = {
  1266. .omap2 = {
  1267. .prcm_reg_id = 1,
  1268. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1269. .module_offs = WKUP_MOD,
  1270. .idlest_reg_id = 1,
  1271. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1272. },
  1273. },
  1274. .slaves = omap2430_gpio2_slaves,
  1275. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  1276. .class = &omap243x_gpio_hwmod_class,
  1277. .dev_attr = &gpio_dev_attr,
  1278. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1279. };
  1280. /* gpio3 */
  1281. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1282. &omap2430_l4_wkup__gpio3,
  1283. };
  1284. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1285. .name = "gpio3",
  1286. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1287. .mpu_irqs = omap2_gpio3_irqs,
  1288. .main_clk = "gpios_fck",
  1289. .prcm = {
  1290. .omap2 = {
  1291. .prcm_reg_id = 1,
  1292. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1293. .module_offs = WKUP_MOD,
  1294. .idlest_reg_id = 1,
  1295. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1296. },
  1297. },
  1298. .slaves = omap2430_gpio3_slaves,
  1299. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1300. .class = &omap243x_gpio_hwmod_class,
  1301. .dev_attr = &gpio_dev_attr,
  1302. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1303. };
  1304. /* gpio4 */
  1305. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1306. &omap2430_l4_wkup__gpio4,
  1307. };
  1308. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1309. .name = "gpio4",
  1310. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1311. .mpu_irqs = omap2_gpio4_irqs,
  1312. .main_clk = "gpios_fck",
  1313. .prcm = {
  1314. .omap2 = {
  1315. .prcm_reg_id = 1,
  1316. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1317. .module_offs = WKUP_MOD,
  1318. .idlest_reg_id = 1,
  1319. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1320. },
  1321. },
  1322. .slaves = omap2430_gpio4_slaves,
  1323. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1324. .class = &omap243x_gpio_hwmod_class,
  1325. .dev_attr = &gpio_dev_attr,
  1326. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1327. };
  1328. /* gpio5 */
  1329. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1330. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1331. { .irq = -1 }
  1332. };
  1333. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1334. &omap2430_l4_core__gpio5,
  1335. };
  1336. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1337. .name = "gpio5",
  1338. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1339. .mpu_irqs = omap243x_gpio5_irqs,
  1340. .main_clk = "gpio5_fck",
  1341. .prcm = {
  1342. .omap2 = {
  1343. .prcm_reg_id = 2,
  1344. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1345. .module_offs = CORE_MOD,
  1346. .idlest_reg_id = 2,
  1347. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1348. },
  1349. },
  1350. .slaves = omap2430_gpio5_slaves,
  1351. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1352. .class = &omap243x_gpio_hwmod_class,
  1353. .dev_attr = &gpio_dev_attr,
  1354. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1355. };
  1356. /* dma_system */
  1357. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1358. .rev_offs = 0x0000,
  1359. .sysc_offs = 0x002c,
  1360. .syss_offs = 0x0028,
  1361. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1362. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1363. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1364. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1365. .sysc_fields = &omap_hwmod_sysc_type1,
  1366. };
  1367. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1368. .name = "dma",
  1369. .sysc = &omap2430_dma_sysc,
  1370. };
  1371. /* dma attributes */
  1372. static struct omap_dma_dev_attr dma_dev_attr = {
  1373. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1374. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1375. .lch_count = 32,
  1376. };
  1377. /* dma_system -> L3 */
  1378. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1379. .master = &omap2430_dma_system_hwmod,
  1380. .slave = &omap2430_l3_main_hwmod,
  1381. .clk = "core_l3_ck",
  1382. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1383. };
  1384. /* dma_system master ports */
  1385. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1386. &omap2430_dma_system__l3,
  1387. };
  1388. /* l4_core -> dma_system */
  1389. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1390. .master = &omap2430_l4_core_hwmod,
  1391. .slave = &omap2430_dma_system_hwmod,
  1392. .clk = "sdma_ick",
  1393. .addr = omap2_dma_system_addrs,
  1394. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1395. };
  1396. /* dma_system slave ports */
  1397. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1398. &omap2430_l4_core__dma_system,
  1399. };
  1400. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1401. .name = "dma",
  1402. .class = &omap2430_dma_hwmod_class,
  1403. .mpu_irqs = omap2_dma_system_irqs,
  1404. .main_clk = "core_l3_ck",
  1405. .slaves = omap2430_dma_system_slaves,
  1406. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1407. .masters = omap2430_dma_system_masters,
  1408. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1409. .dev_attr = &dma_dev_attr,
  1410. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1411. .flags = HWMOD_NO_IDLEST,
  1412. };
  1413. /*
  1414. * 'mailbox' class
  1415. * mailbox module allowing communication between the on-chip processors
  1416. * using a queued mailbox-interrupt mechanism.
  1417. */
  1418. static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
  1419. .rev_offs = 0x000,
  1420. .sysc_offs = 0x010,
  1421. .syss_offs = 0x014,
  1422. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1423. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1424. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1425. .sysc_fields = &omap_hwmod_sysc_type1,
  1426. };
  1427. static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
  1428. .name = "mailbox",
  1429. .sysc = &omap2430_mailbox_sysc,
  1430. };
  1431. /* mailbox */
  1432. static struct omap_hwmod omap2430_mailbox_hwmod;
  1433. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1434. { .irq = 26 },
  1435. { .irq = -1 }
  1436. };
  1437. /* l4_core -> mailbox */
  1438. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1439. .master = &omap2430_l4_core_hwmod,
  1440. .slave = &omap2430_mailbox_hwmod,
  1441. .addr = omap2_mailbox_addrs,
  1442. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1443. };
  1444. /* mailbox slave ports */
  1445. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1446. &omap2430_l4_core__mailbox,
  1447. };
  1448. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1449. .name = "mailbox",
  1450. .class = &omap2430_mailbox_hwmod_class,
  1451. .mpu_irqs = omap2430_mailbox_irqs,
  1452. .main_clk = "mailboxes_ick",
  1453. .prcm = {
  1454. .omap2 = {
  1455. .prcm_reg_id = 1,
  1456. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1457. .module_offs = CORE_MOD,
  1458. .idlest_reg_id = 1,
  1459. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1460. },
  1461. },
  1462. .slaves = omap2430_mailbox_slaves,
  1463. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1464. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1465. };
  1466. /*
  1467. * 'mcspi' class
  1468. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1469. * bus
  1470. */
  1471. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1472. .rev_offs = 0x0000,
  1473. .sysc_offs = 0x0010,
  1474. .syss_offs = 0x0014,
  1475. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1476. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1477. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1478. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1479. .sysc_fields = &omap_hwmod_sysc_type1,
  1480. };
  1481. static struct omap_hwmod_class omap2430_mcspi_class = {
  1482. .name = "mcspi",
  1483. .sysc = &omap2430_mcspi_sysc,
  1484. .rev = OMAP2_MCSPI_REV,
  1485. };
  1486. /* mcspi1 */
  1487. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1488. &omap2430_l4_core__mcspi1,
  1489. };
  1490. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1491. .num_chipselect = 4,
  1492. };
  1493. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1494. .name = "mcspi1_hwmod",
  1495. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1496. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1497. .main_clk = "mcspi1_fck",
  1498. .prcm = {
  1499. .omap2 = {
  1500. .module_offs = CORE_MOD,
  1501. .prcm_reg_id = 1,
  1502. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1503. .idlest_reg_id = 1,
  1504. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1505. },
  1506. },
  1507. .slaves = omap2430_mcspi1_slaves,
  1508. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1509. .class = &omap2430_mcspi_class,
  1510. .dev_attr = &omap_mcspi1_dev_attr,
  1511. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1512. };
  1513. /* mcspi2 */
  1514. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1515. &omap2430_l4_core__mcspi2,
  1516. };
  1517. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1518. .num_chipselect = 2,
  1519. };
  1520. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1521. .name = "mcspi2_hwmod",
  1522. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1523. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1524. .main_clk = "mcspi2_fck",
  1525. .prcm = {
  1526. .omap2 = {
  1527. .module_offs = CORE_MOD,
  1528. .prcm_reg_id = 1,
  1529. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1530. .idlest_reg_id = 1,
  1531. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1532. },
  1533. },
  1534. .slaves = omap2430_mcspi2_slaves,
  1535. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1536. .class = &omap2430_mcspi_class,
  1537. .dev_attr = &omap_mcspi2_dev_attr,
  1538. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1539. };
  1540. /* mcspi3 */
  1541. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1542. { .irq = 91 },
  1543. { .irq = -1 }
  1544. };
  1545. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1546. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1547. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1548. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1549. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1550. { .dma_req = -1 }
  1551. };
  1552. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1553. &omap2430_l4_core__mcspi3,
  1554. };
  1555. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1556. .num_chipselect = 2,
  1557. };
  1558. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1559. .name = "mcspi3_hwmod",
  1560. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1561. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1562. .main_clk = "mcspi3_fck",
  1563. .prcm = {
  1564. .omap2 = {
  1565. .module_offs = CORE_MOD,
  1566. .prcm_reg_id = 2,
  1567. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1568. .idlest_reg_id = 2,
  1569. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1570. },
  1571. },
  1572. .slaves = omap2430_mcspi3_slaves,
  1573. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1574. .class = &omap2430_mcspi_class,
  1575. .dev_attr = &omap_mcspi3_dev_attr,
  1576. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1577. };
  1578. /*
  1579. * usbhsotg
  1580. */
  1581. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1582. .rev_offs = 0x0400,
  1583. .sysc_offs = 0x0404,
  1584. .syss_offs = 0x0408,
  1585. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1586. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1587. SYSC_HAS_AUTOIDLE),
  1588. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1589. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1590. .sysc_fields = &omap_hwmod_sysc_type1,
  1591. };
  1592. static struct omap_hwmod_class usbotg_class = {
  1593. .name = "usbotg",
  1594. .sysc = &omap2430_usbhsotg_sysc,
  1595. };
  1596. /* usb_otg_hs */
  1597. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1598. { .name = "mc", .irq = 92 },
  1599. { .name = "dma", .irq = 93 },
  1600. { .irq = -1 }
  1601. };
  1602. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1603. .name = "usb_otg_hs",
  1604. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1605. .main_clk = "usbhs_ick",
  1606. .prcm = {
  1607. .omap2 = {
  1608. .prcm_reg_id = 1,
  1609. .module_bit = OMAP2430_EN_USBHS_MASK,
  1610. .module_offs = CORE_MOD,
  1611. .idlest_reg_id = 1,
  1612. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1613. },
  1614. },
  1615. .masters = omap2430_usbhsotg_masters,
  1616. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1617. .slaves = omap2430_usbhsotg_slaves,
  1618. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1619. .class = &usbotg_class,
  1620. /*
  1621. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1622. * broken when autoidle is enabled
  1623. * workaround is to disable the autoidle bit at module level.
  1624. */
  1625. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1626. | HWMOD_SWSUP_MSTANDBY,
  1627. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1628. };
  1629. /*
  1630. * 'mcbsp' class
  1631. * multi channel buffered serial port controller
  1632. */
  1633. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  1634. .rev_offs = 0x007C,
  1635. .sysc_offs = 0x008C,
  1636. .sysc_flags = (SYSC_HAS_SOFTRESET),
  1637. .sysc_fields = &omap_hwmod_sysc_type1,
  1638. };
  1639. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  1640. .name = "mcbsp",
  1641. .sysc = &omap2430_mcbsp_sysc,
  1642. .rev = MCBSP_CONFIG_TYPE2,
  1643. };
  1644. /* mcbsp1 */
  1645. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  1646. { .name = "tx", .irq = 59 },
  1647. { .name = "rx", .irq = 60 },
  1648. { .name = "ovr", .irq = 61 },
  1649. { .name = "common", .irq = 64 },
  1650. { .irq = -1 }
  1651. };
  1652. /* l4_core -> mcbsp1 */
  1653. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  1654. .master = &omap2430_l4_core_hwmod,
  1655. .slave = &omap2430_mcbsp1_hwmod,
  1656. .clk = "mcbsp1_ick",
  1657. .addr = omap2_mcbsp1_addrs,
  1658. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1659. };
  1660. /* mcbsp1 slave ports */
  1661. static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
  1662. &omap2430_l4_core__mcbsp1,
  1663. };
  1664. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  1665. .name = "mcbsp1",
  1666. .class = &omap2430_mcbsp_hwmod_class,
  1667. .mpu_irqs = omap2430_mcbsp1_irqs,
  1668. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1669. .main_clk = "mcbsp1_fck",
  1670. .prcm = {
  1671. .omap2 = {
  1672. .prcm_reg_id = 1,
  1673. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1674. .module_offs = CORE_MOD,
  1675. .idlest_reg_id = 1,
  1676. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1677. },
  1678. },
  1679. .slaves = omap2430_mcbsp1_slaves,
  1680. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
  1681. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1682. };
  1683. /* mcbsp2 */
  1684. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  1685. { .name = "tx", .irq = 62 },
  1686. { .name = "rx", .irq = 63 },
  1687. { .name = "common", .irq = 16 },
  1688. { .irq = -1 }
  1689. };
  1690. /* l4_core -> mcbsp2 */
  1691. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  1692. .master = &omap2430_l4_core_hwmod,
  1693. .slave = &omap2430_mcbsp2_hwmod,
  1694. .clk = "mcbsp2_ick",
  1695. .addr = omap2xxx_mcbsp2_addrs,
  1696. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1697. };
  1698. /* mcbsp2 slave ports */
  1699. static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
  1700. &omap2430_l4_core__mcbsp2,
  1701. };
  1702. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  1703. .name = "mcbsp2",
  1704. .class = &omap2430_mcbsp_hwmod_class,
  1705. .mpu_irqs = omap2430_mcbsp2_irqs,
  1706. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1707. .main_clk = "mcbsp2_fck",
  1708. .prcm = {
  1709. .omap2 = {
  1710. .prcm_reg_id = 1,
  1711. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1712. .module_offs = CORE_MOD,
  1713. .idlest_reg_id = 1,
  1714. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1715. },
  1716. },
  1717. .slaves = omap2430_mcbsp2_slaves,
  1718. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
  1719. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1720. };
  1721. /* mcbsp3 */
  1722. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  1723. { .name = "tx", .irq = 89 },
  1724. { .name = "rx", .irq = 90 },
  1725. { .name = "common", .irq = 17 },
  1726. { .irq = -1 }
  1727. };
  1728. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  1729. {
  1730. .name = "mpu",
  1731. .pa_start = 0x4808C000,
  1732. .pa_end = 0x4808C0ff,
  1733. .flags = ADDR_TYPE_RT
  1734. },
  1735. { }
  1736. };
  1737. /* l4_core -> mcbsp3 */
  1738. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  1739. .master = &omap2430_l4_core_hwmod,
  1740. .slave = &omap2430_mcbsp3_hwmod,
  1741. .clk = "mcbsp3_ick",
  1742. .addr = omap2430_mcbsp3_addrs,
  1743. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1744. };
  1745. /* mcbsp3 slave ports */
  1746. static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
  1747. &omap2430_l4_core__mcbsp3,
  1748. };
  1749. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  1750. .name = "mcbsp3",
  1751. .class = &omap2430_mcbsp_hwmod_class,
  1752. .mpu_irqs = omap2430_mcbsp3_irqs,
  1753. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  1754. .main_clk = "mcbsp3_fck",
  1755. .prcm = {
  1756. .omap2 = {
  1757. .prcm_reg_id = 1,
  1758. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  1759. .module_offs = CORE_MOD,
  1760. .idlest_reg_id = 2,
  1761. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  1762. },
  1763. },
  1764. .slaves = omap2430_mcbsp3_slaves,
  1765. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
  1766. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1767. };
  1768. /* mcbsp4 */
  1769. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  1770. { .name = "tx", .irq = 54 },
  1771. { .name = "rx", .irq = 55 },
  1772. { .name = "common", .irq = 18 },
  1773. { .irq = -1 }
  1774. };
  1775. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  1776. { .name = "rx", .dma_req = 20 },
  1777. { .name = "tx", .dma_req = 19 },
  1778. { .dma_req = -1 }
  1779. };
  1780. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  1781. {
  1782. .name = "mpu",
  1783. .pa_start = 0x4808E000,
  1784. .pa_end = 0x4808E0ff,
  1785. .flags = ADDR_TYPE_RT
  1786. },
  1787. { }
  1788. };
  1789. /* l4_core -> mcbsp4 */
  1790. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  1791. .master = &omap2430_l4_core_hwmod,
  1792. .slave = &omap2430_mcbsp4_hwmod,
  1793. .clk = "mcbsp4_ick",
  1794. .addr = omap2430_mcbsp4_addrs,
  1795. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1796. };
  1797. /* mcbsp4 slave ports */
  1798. static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
  1799. &omap2430_l4_core__mcbsp4,
  1800. };
  1801. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  1802. .name = "mcbsp4",
  1803. .class = &omap2430_mcbsp_hwmod_class,
  1804. .mpu_irqs = omap2430_mcbsp4_irqs,
  1805. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  1806. .main_clk = "mcbsp4_fck",
  1807. .prcm = {
  1808. .omap2 = {
  1809. .prcm_reg_id = 1,
  1810. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  1811. .module_offs = CORE_MOD,
  1812. .idlest_reg_id = 2,
  1813. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  1814. },
  1815. },
  1816. .slaves = omap2430_mcbsp4_slaves,
  1817. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
  1818. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1819. };
  1820. /* mcbsp5 */
  1821. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  1822. { .name = "tx", .irq = 81 },
  1823. { .name = "rx", .irq = 82 },
  1824. { .name = "common", .irq = 19 },
  1825. { .irq = -1 }
  1826. };
  1827. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  1828. { .name = "rx", .dma_req = 22 },
  1829. { .name = "tx", .dma_req = 21 },
  1830. { .dma_req = -1 }
  1831. };
  1832. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  1833. {
  1834. .name = "mpu",
  1835. .pa_start = 0x48096000,
  1836. .pa_end = 0x480960ff,
  1837. .flags = ADDR_TYPE_RT
  1838. },
  1839. { }
  1840. };
  1841. /* l4_core -> mcbsp5 */
  1842. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  1843. .master = &omap2430_l4_core_hwmod,
  1844. .slave = &omap2430_mcbsp5_hwmod,
  1845. .clk = "mcbsp5_ick",
  1846. .addr = omap2430_mcbsp5_addrs,
  1847. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1848. };
  1849. /* mcbsp5 slave ports */
  1850. static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
  1851. &omap2430_l4_core__mcbsp5,
  1852. };
  1853. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  1854. .name = "mcbsp5",
  1855. .class = &omap2430_mcbsp_hwmod_class,
  1856. .mpu_irqs = omap2430_mcbsp5_irqs,
  1857. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  1858. .main_clk = "mcbsp5_fck",
  1859. .prcm = {
  1860. .omap2 = {
  1861. .prcm_reg_id = 1,
  1862. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  1863. .module_offs = CORE_MOD,
  1864. .idlest_reg_id = 2,
  1865. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  1866. },
  1867. },
  1868. .slaves = omap2430_mcbsp5_slaves,
  1869. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
  1870. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1871. };
  1872. /* MMC/SD/SDIO common */
  1873. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  1874. .rev_offs = 0x1fc,
  1875. .sysc_offs = 0x10,
  1876. .syss_offs = 0x14,
  1877. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1878. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1879. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1880. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1881. .sysc_fields = &omap_hwmod_sysc_type1,
  1882. };
  1883. static struct omap_hwmod_class omap2430_mmc_class = {
  1884. .name = "mmc",
  1885. .sysc = &omap2430_mmc_sysc,
  1886. };
  1887. /* MMC/SD/SDIO1 */
  1888. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  1889. { .irq = 83 },
  1890. { .irq = -1 }
  1891. };
  1892. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  1893. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  1894. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  1895. { .dma_req = -1 }
  1896. };
  1897. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  1898. { .role = "dbck", .clk = "mmchsdb1_fck" },
  1899. };
  1900. static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
  1901. &omap2430_l4_core__mmc1,
  1902. };
  1903. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1904. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1905. };
  1906. static struct omap_hwmod omap2430_mmc1_hwmod = {
  1907. .name = "mmc1",
  1908. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1909. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  1910. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  1911. .opt_clks = omap2430_mmc1_opt_clks,
  1912. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  1913. .main_clk = "mmchs1_fck",
  1914. .prcm = {
  1915. .omap2 = {
  1916. .module_offs = CORE_MOD,
  1917. .prcm_reg_id = 2,
  1918. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  1919. .idlest_reg_id = 2,
  1920. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  1921. },
  1922. },
  1923. .dev_attr = &mmc1_dev_attr,
  1924. .slaves = omap2430_mmc1_slaves,
  1925. .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
  1926. .class = &omap2430_mmc_class,
  1927. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1928. };
  1929. /* MMC/SD/SDIO2 */
  1930. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  1931. { .irq = 86 },
  1932. { .irq = -1 }
  1933. };
  1934. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  1935. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  1936. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  1937. { .dma_req = -1 }
  1938. };
  1939. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  1940. { .role = "dbck", .clk = "mmchsdb2_fck" },
  1941. };
  1942. static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
  1943. &omap2430_l4_core__mmc2,
  1944. };
  1945. static struct omap_hwmod omap2430_mmc2_hwmod = {
  1946. .name = "mmc2",
  1947. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1948. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  1949. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  1950. .opt_clks = omap2430_mmc2_opt_clks,
  1951. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  1952. .main_clk = "mmchs2_fck",
  1953. .prcm = {
  1954. .omap2 = {
  1955. .module_offs = CORE_MOD,
  1956. .prcm_reg_id = 2,
  1957. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  1958. .idlest_reg_id = 2,
  1959. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  1960. },
  1961. },
  1962. .slaves = omap2430_mmc2_slaves,
  1963. .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
  1964. .class = &omap2430_mmc_class,
  1965. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1966. };
  1967. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  1968. &omap2430_l3_main_hwmod,
  1969. &omap2430_l4_core_hwmod,
  1970. &omap2430_l4_wkup_hwmod,
  1971. &omap2430_mpu_hwmod,
  1972. &omap2430_iva_hwmod,
  1973. &omap2430_timer1_hwmod,
  1974. &omap2430_timer2_hwmod,
  1975. &omap2430_timer3_hwmod,
  1976. &omap2430_timer4_hwmod,
  1977. &omap2430_timer5_hwmod,
  1978. &omap2430_timer6_hwmod,
  1979. &omap2430_timer7_hwmod,
  1980. &omap2430_timer8_hwmod,
  1981. &omap2430_timer9_hwmod,
  1982. &omap2430_timer10_hwmod,
  1983. &omap2430_timer11_hwmod,
  1984. &omap2430_timer12_hwmod,
  1985. &omap2430_wd_timer2_hwmod,
  1986. &omap2430_uart1_hwmod,
  1987. &omap2430_uart2_hwmod,
  1988. &omap2430_uart3_hwmod,
  1989. /* dss class */
  1990. &omap2430_dss_core_hwmod,
  1991. &omap2430_dss_dispc_hwmod,
  1992. &omap2430_dss_rfbi_hwmod,
  1993. &omap2430_dss_venc_hwmod,
  1994. /* i2c class */
  1995. &omap2430_i2c1_hwmod,
  1996. &omap2430_i2c2_hwmod,
  1997. &omap2430_mmc1_hwmod,
  1998. &omap2430_mmc2_hwmod,
  1999. /* gpio class */
  2000. &omap2430_gpio1_hwmod,
  2001. &omap2430_gpio2_hwmod,
  2002. &omap2430_gpio3_hwmod,
  2003. &omap2430_gpio4_hwmod,
  2004. &omap2430_gpio5_hwmod,
  2005. /* dma_system class*/
  2006. &omap2430_dma_system_hwmod,
  2007. /* mcbsp class */
  2008. &omap2430_mcbsp1_hwmod,
  2009. &omap2430_mcbsp2_hwmod,
  2010. &omap2430_mcbsp3_hwmod,
  2011. &omap2430_mcbsp4_hwmod,
  2012. &omap2430_mcbsp5_hwmod,
  2013. /* mailbox class */
  2014. &omap2430_mailbox_hwmod,
  2015. /* mcspi class */
  2016. &omap2430_mcspi1_hwmod,
  2017. &omap2430_mcspi2_hwmod,
  2018. &omap2430_mcspi3_hwmod,
  2019. /* usbotg class*/
  2020. &omap2430_usbhsotg_hwmod,
  2021. NULL,
  2022. };
  2023. int __init omap2430_hwmod_init(void)
  2024. {
  2025. return omap_hwmod_register(omap2430_hwmods);
  2026. }