omap_hwmod_2430_data.c 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473
  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_irq_info omap2430_timer1_mpu_irqs[] = {
  327. { .irq = 37, },
  328. { .irq = -1 }
  329. };
  330. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  331. {
  332. .pa_start = 0x49018000,
  333. .pa_end = 0x49018000 + SZ_1K - 1,
  334. .flags = ADDR_TYPE_RT
  335. },
  336. { }
  337. };
  338. /* l4_wkup -> timer1 */
  339. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  340. .master = &omap2430_l4_wkup_hwmod,
  341. .slave = &omap2430_timer1_hwmod,
  342. .clk = "gpt1_ick",
  343. .addr = omap2430_timer1_addrs,
  344. .user = OCP_USER_MPU | OCP_USER_SDMA,
  345. };
  346. /* timer1 slave port */
  347. static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
  348. &omap2430_l4_wkup__timer1,
  349. };
  350. /* timer1 hwmod */
  351. static struct omap_hwmod omap2430_timer1_hwmod = {
  352. .name = "timer1",
  353. .mpu_irqs = omap2430_timer1_mpu_irqs,
  354. .main_clk = "gpt1_fck",
  355. .prcm = {
  356. .omap2 = {
  357. .prcm_reg_id = 1,
  358. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  359. .module_offs = WKUP_MOD,
  360. .idlest_reg_id = 1,
  361. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  362. },
  363. },
  364. .slaves = omap2430_timer1_slaves,
  365. .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
  366. .class = &omap2430_timer_hwmod_class,
  367. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  368. };
  369. /* timer2 */
  370. static struct omap_hwmod omap2430_timer2_hwmod;
  371. static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = {
  372. { .irq = 38, },
  373. { .irq = -1 }
  374. };
  375. /* l4_core -> timer2 */
  376. static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
  377. .master = &omap2430_l4_core_hwmod,
  378. .slave = &omap2430_timer2_hwmod,
  379. .clk = "gpt2_ick",
  380. .addr = omap2xxx_timer2_addrs,
  381. .user = OCP_USER_MPU | OCP_USER_SDMA,
  382. };
  383. /* timer2 slave port */
  384. static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
  385. &omap2430_l4_core__timer2,
  386. };
  387. /* timer2 hwmod */
  388. static struct omap_hwmod omap2430_timer2_hwmod = {
  389. .name = "timer2",
  390. .mpu_irqs = omap2430_timer2_mpu_irqs,
  391. .main_clk = "gpt2_fck",
  392. .prcm = {
  393. .omap2 = {
  394. .prcm_reg_id = 1,
  395. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  396. .module_offs = CORE_MOD,
  397. .idlest_reg_id = 1,
  398. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  399. },
  400. },
  401. .slaves = omap2430_timer2_slaves,
  402. .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
  403. .class = &omap2430_timer_hwmod_class,
  404. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  405. };
  406. /* timer3 */
  407. static struct omap_hwmod omap2430_timer3_hwmod;
  408. static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = {
  409. { .irq = 39, },
  410. { .irq = -1 }
  411. };
  412. /* l4_core -> timer3 */
  413. static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
  414. .master = &omap2430_l4_core_hwmod,
  415. .slave = &omap2430_timer3_hwmod,
  416. .clk = "gpt3_ick",
  417. .addr = omap2xxx_timer3_addrs,
  418. .user = OCP_USER_MPU | OCP_USER_SDMA,
  419. };
  420. /* timer3 slave port */
  421. static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
  422. &omap2430_l4_core__timer3,
  423. };
  424. /* timer3 hwmod */
  425. static struct omap_hwmod omap2430_timer3_hwmod = {
  426. .name = "timer3",
  427. .mpu_irqs = omap2430_timer3_mpu_irqs,
  428. .main_clk = "gpt3_fck",
  429. .prcm = {
  430. .omap2 = {
  431. .prcm_reg_id = 1,
  432. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  433. .module_offs = CORE_MOD,
  434. .idlest_reg_id = 1,
  435. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  436. },
  437. },
  438. .slaves = omap2430_timer3_slaves,
  439. .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
  440. .class = &omap2430_timer_hwmod_class,
  441. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  442. };
  443. /* timer4 */
  444. static struct omap_hwmod omap2430_timer4_hwmod;
  445. static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = {
  446. { .irq = 40, },
  447. { .irq = -1 }
  448. };
  449. /* l4_core -> timer4 */
  450. static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
  451. .master = &omap2430_l4_core_hwmod,
  452. .slave = &omap2430_timer4_hwmod,
  453. .clk = "gpt4_ick",
  454. .addr = omap2xxx_timer4_addrs,
  455. .user = OCP_USER_MPU | OCP_USER_SDMA,
  456. };
  457. /* timer4 slave port */
  458. static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
  459. &omap2430_l4_core__timer4,
  460. };
  461. /* timer4 hwmod */
  462. static struct omap_hwmod omap2430_timer4_hwmod = {
  463. .name = "timer4",
  464. .mpu_irqs = omap2430_timer4_mpu_irqs,
  465. .main_clk = "gpt4_fck",
  466. .prcm = {
  467. .omap2 = {
  468. .prcm_reg_id = 1,
  469. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  470. .module_offs = CORE_MOD,
  471. .idlest_reg_id = 1,
  472. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  473. },
  474. },
  475. .slaves = omap2430_timer4_slaves,
  476. .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
  477. .class = &omap2430_timer_hwmod_class,
  478. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  479. };
  480. /* timer5 */
  481. static struct omap_hwmod omap2430_timer5_hwmod;
  482. static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = {
  483. { .irq = 41, },
  484. { .irq = -1 }
  485. };
  486. /* l4_core -> timer5 */
  487. static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
  488. .master = &omap2430_l4_core_hwmod,
  489. .slave = &omap2430_timer5_hwmod,
  490. .clk = "gpt5_ick",
  491. .addr = omap2xxx_timer5_addrs,
  492. .user = OCP_USER_MPU | OCP_USER_SDMA,
  493. };
  494. /* timer5 slave port */
  495. static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
  496. &omap2430_l4_core__timer5,
  497. };
  498. /* timer5 hwmod */
  499. static struct omap_hwmod omap2430_timer5_hwmod = {
  500. .name = "timer5",
  501. .mpu_irqs = omap2430_timer5_mpu_irqs,
  502. .main_clk = "gpt5_fck",
  503. .prcm = {
  504. .omap2 = {
  505. .prcm_reg_id = 1,
  506. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  507. .module_offs = CORE_MOD,
  508. .idlest_reg_id = 1,
  509. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  510. },
  511. },
  512. .slaves = omap2430_timer5_slaves,
  513. .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
  514. .class = &omap2430_timer_hwmod_class,
  515. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  516. };
  517. /* timer6 */
  518. static struct omap_hwmod omap2430_timer6_hwmod;
  519. static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = {
  520. { .irq = 42, },
  521. { .irq = -1 }
  522. };
  523. /* l4_core -> timer6 */
  524. static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
  525. .master = &omap2430_l4_core_hwmod,
  526. .slave = &omap2430_timer6_hwmod,
  527. .clk = "gpt6_ick",
  528. .addr = omap2xxx_timer6_addrs,
  529. .user = OCP_USER_MPU | OCP_USER_SDMA,
  530. };
  531. /* timer6 slave port */
  532. static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
  533. &omap2430_l4_core__timer6,
  534. };
  535. /* timer6 hwmod */
  536. static struct omap_hwmod omap2430_timer6_hwmod = {
  537. .name = "timer6",
  538. .mpu_irqs = omap2430_timer6_mpu_irqs,
  539. .main_clk = "gpt6_fck",
  540. .prcm = {
  541. .omap2 = {
  542. .prcm_reg_id = 1,
  543. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  544. .module_offs = CORE_MOD,
  545. .idlest_reg_id = 1,
  546. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  547. },
  548. },
  549. .slaves = omap2430_timer6_slaves,
  550. .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
  551. .class = &omap2430_timer_hwmod_class,
  552. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  553. };
  554. /* timer7 */
  555. static struct omap_hwmod omap2430_timer7_hwmod;
  556. static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = {
  557. { .irq = 43, },
  558. { .irq = -1 }
  559. };
  560. /* l4_core -> timer7 */
  561. static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
  562. .master = &omap2430_l4_core_hwmod,
  563. .slave = &omap2430_timer7_hwmod,
  564. .clk = "gpt7_ick",
  565. .addr = omap2xxx_timer7_addrs,
  566. .user = OCP_USER_MPU | OCP_USER_SDMA,
  567. };
  568. /* timer7 slave port */
  569. static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
  570. &omap2430_l4_core__timer7,
  571. };
  572. /* timer7 hwmod */
  573. static struct omap_hwmod omap2430_timer7_hwmod = {
  574. .name = "timer7",
  575. .mpu_irqs = omap2430_timer7_mpu_irqs,
  576. .main_clk = "gpt7_fck",
  577. .prcm = {
  578. .omap2 = {
  579. .prcm_reg_id = 1,
  580. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  581. .module_offs = CORE_MOD,
  582. .idlest_reg_id = 1,
  583. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  584. },
  585. },
  586. .slaves = omap2430_timer7_slaves,
  587. .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
  588. .class = &omap2430_timer_hwmod_class,
  589. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  590. };
  591. /* timer8 */
  592. static struct omap_hwmod omap2430_timer8_hwmod;
  593. static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = {
  594. { .irq = 44, },
  595. { .irq = -1 }
  596. };
  597. /* l4_core -> timer8 */
  598. static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
  599. .master = &omap2430_l4_core_hwmod,
  600. .slave = &omap2430_timer8_hwmod,
  601. .clk = "gpt8_ick",
  602. .addr = omap2xxx_timer8_addrs,
  603. .user = OCP_USER_MPU | OCP_USER_SDMA,
  604. };
  605. /* timer8 slave port */
  606. static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
  607. &omap2430_l4_core__timer8,
  608. };
  609. /* timer8 hwmod */
  610. static struct omap_hwmod omap2430_timer8_hwmod = {
  611. .name = "timer8",
  612. .mpu_irqs = omap2430_timer8_mpu_irqs,
  613. .main_clk = "gpt8_fck",
  614. .prcm = {
  615. .omap2 = {
  616. .prcm_reg_id = 1,
  617. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  618. .module_offs = CORE_MOD,
  619. .idlest_reg_id = 1,
  620. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  621. },
  622. },
  623. .slaves = omap2430_timer8_slaves,
  624. .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
  625. .class = &omap2430_timer_hwmod_class,
  626. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  627. };
  628. /* timer9 */
  629. static struct omap_hwmod omap2430_timer9_hwmod;
  630. static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = {
  631. { .irq = 45, },
  632. { .irq = -1 }
  633. };
  634. /* l4_core -> timer9 */
  635. static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
  636. .master = &omap2430_l4_core_hwmod,
  637. .slave = &omap2430_timer9_hwmod,
  638. .clk = "gpt9_ick",
  639. .addr = omap2xxx_timer9_addrs,
  640. .user = OCP_USER_MPU | OCP_USER_SDMA,
  641. };
  642. /* timer9 slave port */
  643. static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
  644. &omap2430_l4_core__timer9,
  645. };
  646. /* timer9 hwmod */
  647. static struct omap_hwmod omap2430_timer9_hwmod = {
  648. .name = "timer9",
  649. .mpu_irqs = omap2430_timer9_mpu_irqs,
  650. .main_clk = "gpt9_fck",
  651. .prcm = {
  652. .omap2 = {
  653. .prcm_reg_id = 1,
  654. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  655. .module_offs = CORE_MOD,
  656. .idlest_reg_id = 1,
  657. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  658. },
  659. },
  660. .slaves = omap2430_timer9_slaves,
  661. .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
  662. .class = &omap2430_timer_hwmod_class,
  663. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  664. };
  665. /* timer10 */
  666. static struct omap_hwmod omap2430_timer10_hwmod;
  667. static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = {
  668. { .irq = 46, },
  669. { .irq = -1 }
  670. };
  671. /* l4_core -> timer10 */
  672. static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
  673. .master = &omap2430_l4_core_hwmod,
  674. .slave = &omap2430_timer10_hwmod,
  675. .clk = "gpt10_ick",
  676. .addr = omap2_timer10_addrs,
  677. .user = OCP_USER_MPU | OCP_USER_SDMA,
  678. };
  679. /* timer10 slave port */
  680. static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
  681. &omap2430_l4_core__timer10,
  682. };
  683. /* timer10 hwmod */
  684. static struct omap_hwmod omap2430_timer10_hwmod = {
  685. .name = "timer10",
  686. .mpu_irqs = omap2430_timer10_mpu_irqs,
  687. .main_clk = "gpt10_fck",
  688. .prcm = {
  689. .omap2 = {
  690. .prcm_reg_id = 1,
  691. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  692. .module_offs = CORE_MOD,
  693. .idlest_reg_id = 1,
  694. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  695. },
  696. },
  697. .slaves = omap2430_timer10_slaves,
  698. .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
  699. .class = &omap2430_timer_hwmod_class,
  700. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  701. };
  702. /* timer11 */
  703. static struct omap_hwmod omap2430_timer11_hwmod;
  704. static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = {
  705. { .irq = 47, },
  706. { .irq = -1 }
  707. };
  708. /* l4_core -> timer11 */
  709. static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
  710. .master = &omap2430_l4_core_hwmod,
  711. .slave = &omap2430_timer11_hwmod,
  712. .clk = "gpt11_ick",
  713. .addr = omap2_timer11_addrs,
  714. .user = OCP_USER_MPU | OCP_USER_SDMA,
  715. };
  716. /* timer11 slave port */
  717. static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
  718. &omap2430_l4_core__timer11,
  719. };
  720. /* timer11 hwmod */
  721. static struct omap_hwmod omap2430_timer11_hwmod = {
  722. .name = "timer11",
  723. .mpu_irqs = omap2430_timer11_mpu_irqs,
  724. .main_clk = "gpt11_fck",
  725. .prcm = {
  726. .omap2 = {
  727. .prcm_reg_id = 1,
  728. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  729. .module_offs = CORE_MOD,
  730. .idlest_reg_id = 1,
  731. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  732. },
  733. },
  734. .slaves = omap2430_timer11_slaves,
  735. .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
  736. .class = &omap2430_timer_hwmod_class,
  737. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  738. };
  739. /* timer12 */
  740. static struct omap_hwmod omap2430_timer12_hwmod;
  741. static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = {
  742. { .irq = 48, },
  743. { .irq = -1 }
  744. };
  745. /* l4_core -> timer12 */
  746. static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
  747. .master = &omap2430_l4_core_hwmod,
  748. .slave = &omap2430_timer12_hwmod,
  749. .clk = "gpt12_ick",
  750. .addr = omap2xxx_timer12_addrs,
  751. .user = OCP_USER_MPU | OCP_USER_SDMA,
  752. };
  753. /* timer12 slave port */
  754. static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
  755. &omap2430_l4_core__timer12,
  756. };
  757. /* timer12 hwmod */
  758. static struct omap_hwmod omap2430_timer12_hwmod = {
  759. .name = "timer12",
  760. .mpu_irqs = omap2430_timer12_mpu_irqs,
  761. .main_clk = "gpt12_fck",
  762. .prcm = {
  763. .omap2 = {
  764. .prcm_reg_id = 1,
  765. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  766. .module_offs = CORE_MOD,
  767. .idlest_reg_id = 1,
  768. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  769. },
  770. },
  771. .slaves = omap2430_timer12_slaves,
  772. .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
  773. .class = &omap2430_timer_hwmod_class,
  774. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  775. };
  776. /* l4_wkup -> wd_timer2 */
  777. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  778. {
  779. .pa_start = 0x49016000,
  780. .pa_end = 0x4901607f,
  781. .flags = ADDR_TYPE_RT
  782. },
  783. { }
  784. };
  785. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  786. .master = &omap2430_l4_wkup_hwmod,
  787. .slave = &omap2430_wd_timer2_hwmod,
  788. .clk = "mpu_wdt_ick",
  789. .addr = omap2430_wd_timer2_addrs,
  790. .user = OCP_USER_MPU | OCP_USER_SDMA,
  791. };
  792. /*
  793. * 'wd_timer' class
  794. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  795. * overflow condition
  796. */
  797. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  798. .rev_offs = 0x0,
  799. .sysc_offs = 0x0010,
  800. .syss_offs = 0x0014,
  801. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  802. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  803. .sysc_fields = &omap_hwmod_sysc_type1,
  804. };
  805. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  806. .name = "wd_timer",
  807. .sysc = &omap2430_wd_timer_sysc,
  808. .pre_shutdown = &omap2_wd_timer_disable
  809. };
  810. /* wd_timer2 */
  811. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  812. &omap2430_l4_wkup__wd_timer2,
  813. };
  814. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  815. .name = "wd_timer2",
  816. .class = &omap2430_wd_timer_hwmod_class,
  817. .main_clk = "mpu_wdt_fck",
  818. .prcm = {
  819. .omap2 = {
  820. .prcm_reg_id = 1,
  821. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  822. .module_offs = WKUP_MOD,
  823. .idlest_reg_id = 1,
  824. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  825. },
  826. },
  827. .slaves = omap2430_wd_timer2_slaves,
  828. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  829. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  830. };
  831. /* UART */
  832. static struct omap_hwmod_class_sysconfig uart_sysc = {
  833. .rev_offs = 0x50,
  834. .sysc_offs = 0x54,
  835. .syss_offs = 0x58,
  836. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  837. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  838. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  839. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  840. .sysc_fields = &omap_hwmod_sysc_type1,
  841. };
  842. static struct omap_hwmod_class uart_class = {
  843. .name = "uart",
  844. .sysc = &uart_sysc,
  845. };
  846. /* UART1 */
  847. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  848. { .irq = INT_24XX_UART1_IRQ, },
  849. { .irq = -1 }
  850. };
  851. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  852. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  853. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  854. };
  855. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  856. &omap2_l4_core__uart1,
  857. };
  858. static struct omap_hwmod omap2430_uart1_hwmod = {
  859. .name = "uart1",
  860. .mpu_irqs = uart1_mpu_irqs,
  861. .sdma_reqs = uart1_sdma_reqs,
  862. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  863. .main_clk = "uart1_fck",
  864. .prcm = {
  865. .omap2 = {
  866. .module_offs = CORE_MOD,
  867. .prcm_reg_id = 1,
  868. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  869. .idlest_reg_id = 1,
  870. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  871. },
  872. },
  873. .slaves = omap2430_uart1_slaves,
  874. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  875. .class = &uart_class,
  876. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  877. };
  878. /* UART2 */
  879. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  880. { .irq = INT_24XX_UART2_IRQ, },
  881. { .irq = -1 }
  882. };
  883. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  884. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  885. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  886. };
  887. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  888. &omap2_l4_core__uart2,
  889. };
  890. static struct omap_hwmod omap2430_uart2_hwmod = {
  891. .name = "uart2",
  892. .mpu_irqs = uart2_mpu_irqs,
  893. .sdma_reqs = uart2_sdma_reqs,
  894. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  895. .main_clk = "uart2_fck",
  896. .prcm = {
  897. .omap2 = {
  898. .module_offs = CORE_MOD,
  899. .prcm_reg_id = 1,
  900. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  901. .idlest_reg_id = 1,
  902. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  903. },
  904. },
  905. .slaves = omap2430_uart2_slaves,
  906. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  907. .class = &uart_class,
  908. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  909. };
  910. /* UART3 */
  911. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  912. { .irq = INT_24XX_UART3_IRQ, },
  913. { .irq = -1 }
  914. };
  915. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  916. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  917. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  918. };
  919. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  920. &omap2_l4_core__uart3,
  921. };
  922. static struct omap_hwmod omap2430_uart3_hwmod = {
  923. .name = "uart3",
  924. .mpu_irqs = uart3_mpu_irqs,
  925. .sdma_reqs = uart3_sdma_reqs,
  926. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  927. .main_clk = "uart3_fck",
  928. .prcm = {
  929. .omap2 = {
  930. .module_offs = CORE_MOD,
  931. .prcm_reg_id = 2,
  932. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  933. .idlest_reg_id = 2,
  934. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  935. },
  936. },
  937. .slaves = omap2430_uart3_slaves,
  938. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  939. .class = &uart_class,
  940. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  941. };
  942. /*
  943. * 'dss' class
  944. * display sub-system
  945. */
  946. static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
  947. .rev_offs = 0x0000,
  948. .sysc_offs = 0x0010,
  949. .syss_offs = 0x0014,
  950. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  951. .sysc_fields = &omap_hwmod_sysc_type1,
  952. };
  953. static struct omap_hwmod_class omap2430_dss_hwmod_class = {
  954. .name = "dss",
  955. .sysc = &omap2430_dss_sysc,
  956. };
  957. static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
  958. { .name = "dispc", .dma_req = 5 },
  959. };
  960. /* dss */
  961. /* dss master ports */
  962. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  963. &omap2430_dss__l3,
  964. };
  965. /* l4_core -> dss */
  966. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  967. .master = &omap2430_l4_core_hwmod,
  968. .slave = &omap2430_dss_core_hwmod,
  969. .clk = "dss_ick",
  970. .addr = omap2_dss_addrs,
  971. .user = OCP_USER_MPU | OCP_USER_SDMA,
  972. };
  973. /* dss slave ports */
  974. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  975. &omap2430_l4_core__dss,
  976. };
  977. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  978. { .role = "tv_clk", .clk = "dss_54m_fck" },
  979. { .role = "sys_clk", .clk = "dss2_fck" },
  980. };
  981. static struct omap_hwmod omap2430_dss_core_hwmod = {
  982. .name = "dss_core",
  983. .class = &omap2430_dss_hwmod_class,
  984. .main_clk = "dss1_fck", /* instead of dss_fck */
  985. .sdma_reqs = omap2430_dss_sdma_chs,
  986. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
  987. .prcm = {
  988. .omap2 = {
  989. .prcm_reg_id = 1,
  990. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  991. .module_offs = CORE_MOD,
  992. .idlest_reg_id = 1,
  993. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  994. },
  995. },
  996. .opt_clks = dss_opt_clks,
  997. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  998. .slaves = omap2430_dss_slaves,
  999. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  1000. .masters = omap2430_dss_masters,
  1001. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  1002. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1003. .flags = HWMOD_NO_IDLEST,
  1004. };
  1005. /*
  1006. * 'dispc' class
  1007. * display controller
  1008. */
  1009. static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
  1010. .rev_offs = 0x0000,
  1011. .sysc_offs = 0x0010,
  1012. .syss_offs = 0x0014,
  1013. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  1014. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1015. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1016. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1017. .sysc_fields = &omap_hwmod_sysc_type1,
  1018. };
  1019. static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
  1020. .name = "dispc",
  1021. .sysc = &omap2430_dispc_sysc,
  1022. };
  1023. static struct omap_hwmod_irq_info omap2430_dispc_irqs[] = {
  1024. { .irq = 25 },
  1025. { .irq = -1 }
  1026. };
  1027. /* l4_core -> dss_dispc */
  1028. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  1029. .master = &omap2430_l4_core_hwmod,
  1030. .slave = &omap2430_dss_dispc_hwmod,
  1031. .clk = "dss_ick",
  1032. .addr = omap2_dss_dispc_addrs,
  1033. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1034. };
  1035. /* dss_dispc slave ports */
  1036. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  1037. &omap2430_l4_core__dss_dispc,
  1038. };
  1039. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  1040. .name = "dss_dispc",
  1041. .class = &omap2430_dispc_hwmod_class,
  1042. .mpu_irqs = omap2430_dispc_irqs,
  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. .idlest_reg_id = 1,
  1050. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  1051. },
  1052. },
  1053. .slaves = omap2430_dss_dispc_slaves,
  1054. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  1055. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1056. .flags = HWMOD_NO_IDLEST,
  1057. };
  1058. /*
  1059. * 'rfbi' class
  1060. * remote frame buffer interface
  1061. */
  1062. static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
  1063. .rev_offs = 0x0000,
  1064. .sysc_offs = 0x0010,
  1065. .syss_offs = 0x0014,
  1066. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1067. SYSC_HAS_AUTOIDLE),
  1068. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1069. .sysc_fields = &omap_hwmod_sysc_type1,
  1070. };
  1071. static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
  1072. .name = "rfbi",
  1073. .sysc = &omap2430_rfbi_sysc,
  1074. };
  1075. /* l4_core -> dss_rfbi */
  1076. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  1077. .master = &omap2430_l4_core_hwmod,
  1078. .slave = &omap2430_dss_rfbi_hwmod,
  1079. .clk = "dss_ick",
  1080. .addr = omap2_dss_rfbi_addrs,
  1081. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1082. };
  1083. /* dss_rfbi slave ports */
  1084. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  1085. &omap2430_l4_core__dss_rfbi,
  1086. };
  1087. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  1088. .name = "dss_rfbi",
  1089. .class = &omap2430_rfbi_hwmod_class,
  1090. .main_clk = "dss1_fck",
  1091. .prcm = {
  1092. .omap2 = {
  1093. .prcm_reg_id = 1,
  1094. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1095. .module_offs = CORE_MOD,
  1096. },
  1097. },
  1098. .slaves = omap2430_dss_rfbi_slaves,
  1099. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  1100. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1101. .flags = HWMOD_NO_IDLEST,
  1102. };
  1103. /*
  1104. * 'venc' class
  1105. * video encoder
  1106. */
  1107. static struct omap_hwmod_class omap2430_venc_hwmod_class = {
  1108. .name = "venc",
  1109. };
  1110. /* l4_core -> dss_venc */
  1111. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  1112. .master = &omap2430_l4_core_hwmod,
  1113. .slave = &omap2430_dss_venc_hwmod,
  1114. .clk = "dss_54m_fck",
  1115. .addr = omap2_dss_venc_addrs,
  1116. .flags = OCPIF_SWSUP_IDLE,
  1117. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1118. };
  1119. /* dss_venc slave ports */
  1120. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  1121. &omap2430_l4_core__dss_venc,
  1122. };
  1123. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  1124. .name = "dss_venc",
  1125. .class = &omap2430_venc_hwmod_class,
  1126. .main_clk = "dss1_fck",
  1127. .prcm = {
  1128. .omap2 = {
  1129. .prcm_reg_id = 1,
  1130. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1131. .module_offs = CORE_MOD,
  1132. },
  1133. },
  1134. .slaves = omap2430_dss_venc_slaves,
  1135. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  1136. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1137. .flags = HWMOD_NO_IDLEST,
  1138. };
  1139. /* I2C common */
  1140. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1141. .rev_offs = 0x00,
  1142. .sysc_offs = 0x20,
  1143. .syss_offs = 0x10,
  1144. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1145. SYSS_HAS_RESET_STATUS),
  1146. .sysc_fields = &omap_hwmod_sysc_type1,
  1147. };
  1148. static struct omap_hwmod_class i2c_class = {
  1149. .name = "i2c",
  1150. .sysc = &i2c_sysc,
  1151. };
  1152. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1153. .fifo_depth = 8, /* bytes */
  1154. };
  1155. /* I2C1 */
  1156. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1157. { .irq = INT_24XX_I2C1_IRQ, },
  1158. { .irq = -1 }
  1159. };
  1160. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1161. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1162. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1163. };
  1164. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  1165. &omap2430_l4_core__i2c1,
  1166. };
  1167. static struct omap_hwmod omap2430_i2c1_hwmod = {
  1168. .name = "i2c1",
  1169. .mpu_irqs = i2c1_mpu_irqs,
  1170. .sdma_reqs = i2c1_sdma_reqs,
  1171. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1172. .main_clk = "i2chs1_fck",
  1173. .prcm = {
  1174. .omap2 = {
  1175. /*
  1176. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  1177. * I2CHS IP's do not follow the usual pattern.
  1178. * prcm_reg_id alone cannot be used to program
  1179. * the iclk and fclk. Needs to be handled using
  1180. * additional flags when clk handling is moved
  1181. * to hwmod framework.
  1182. */
  1183. .module_offs = CORE_MOD,
  1184. .prcm_reg_id = 1,
  1185. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  1186. .idlest_reg_id = 1,
  1187. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  1188. },
  1189. },
  1190. .slaves = omap2430_i2c1_slaves,
  1191. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  1192. .class = &i2c_class,
  1193. .dev_attr = &i2c_dev_attr,
  1194. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1195. };
  1196. /* I2C2 */
  1197. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1198. { .irq = INT_24XX_I2C2_IRQ, },
  1199. { .irq = -1 }
  1200. };
  1201. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1202. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1203. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1204. };
  1205. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  1206. &omap2430_l4_core__i2c2,
  1207. };
  1208. static struct omap_hwmod omap2430_i2c2_hwmod = {
  1209. .name = "i2c2",
  1210. .mpu_irqs = i2c2_mpu_irqs,
  1211. .sdma_reqs = i2c2_sdma_reqs,
  1212. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1213. .main_clk = "i2chs2_fck",
  1214. .prcm = {
  1215. .omap2 = {
  1216. .module_offs = CORE_MOD,
  1217. .prcm_reg_id = 1,
  1218. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  1219. .idlest_reg_id = 1,
  1220. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  1221. },
  1222. },
  1223. .slaves = omap2430_i2c2_slaves,
  1224. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  1225. .class = &i2c_class,
  1226. .dev_attr = &i2c_dev_attr,
  1227. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1228. };
  1229. /* l4_wkup -> gpio1 */
  1230. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  1231. {
  1232. .pa_start = 0x4900C000,
  1233. .pa_end = 0x4900C1ff,
  1234. .flags = ADDR_TYPE_RT
  1235. },
  1236. { }
  1237. };
  1238. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  1239. .master = &omap2430_l4_wkup_hwmod,
  1240. .slave = &omap2430_gpio1_hwmod,
  1241. .clk = "gpios_ick",
  1242. .addr = omap2430_gpio1_addr_space,
  1243. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1244. };
  1245. /* l4_wkup -> gpio2 */
  1246. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  1247. {
  1248. .pa_start = 0x4900E000,
  1249. .pa_end = 0x4900E1ff,
  1250. .flags = ADDR_TYPE_RT
  1251. },
  1252. { }
  1253. };
  1254. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  1255. .master = &omap2430_l4_wkup_hwmod,
  1256. .slave = &omap2430_gpio2_hwmod,
  1257. .clk = "gpios_ick",
  1258. .addr = omap2430_gpio2_addr_space,
  1259. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1260. };
  1261. /* l4_wkup -> gpio3 */
  1262. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  1263. {
  1264. .pa_start = 0x49010000,
  1265. .pa_end = 0x490101ff,
  1266. .flags = ADDR_TYPE_RT
  1267. },
  1268. { }
  1269. };
  1270. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  1271. .master = &omap2430_l4_wkup_hwmod,
  1272. .slave = &omap2430_gpio3_hwmod,
  1273. .clk = "gpios_ick",
  1274. .addr = omap2430_gpio3_addr_space,
  1275. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1276. };
  1277. /* l4_wkup -> gpio4 */
  1278. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  1279. {
  1280. .pa_start = 0x49012000,
  1281. .pa_end = 0x490121ff,
  1282. .flags = ADDR_TYPE_RT
  1283. },
  1284. { }
  1285. };
  1286. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  1287. .master = &omap2430_l4_wkup_hwmod,
  1288. .slave = &omap2430_gpio4_hwmod,
  1289. .clk = "gpios_ick",
  1290. .addr = omap2430_gpio4_addr_space,
  1291. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1292. };
  1293. /* l4_core -> gpio5 */
  1294. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  1295. {
  1296. .pa_start = 0x480B6000,
  1297. .pa_end = 0x480B61ff,
  1298. .flags = ADDR_TYPE_RT
  1299. },
  1300. { }
  1301. };
  1302. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  1303. .master = &omap2430_l4_core_hwmod,
  1304. .slave = &omap2430_gpio5_hwmod,
  1305. .clk = "gpio5_ick",
  1306. .addr = omap2430_gpio5_addr_space,
  1307. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1308. };
  1309. /* gpio dev_attr */
  1310. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1311. .bank_width = 32,
  1312. .dbck_flag = false,
  1313. };
  1314. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  1315. .rev_offs = 0x0000,
  1316. .sysc_offs = 0x0010,
  1317. .syss_offs = 0x0014,
  1318. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1319. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1320. SYSS_HAS_RESET_STATUS),
  1321. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1322. .sysc_fields = &omap_hwmod_sysc_type1,
  1323. };
  1324. /*
  1325. * 'gpio' class
  1326. * general purpose io module
  1327. */
  1328. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  1329. .name = "gpio",
  1330. .sysc = &omap243x_gpio_sysc,
  1331. .rev = 0,
  1332. };
  1333. /* gpio1 */
  1334. static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
  1335. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  1336. { .irq = -1 }
  1337. };
  1338. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  1339. &omap2430_l4_wkup__gpio1,
  1340. };
  1341. static struct omap_hwmod omap2430_gpio1_hwmod = {
  1342. .name = "gpio1",
  1343. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1344. .mpu_irqs = omap243x_gpio1_irqs,
  1345. .main_clk = "gpios_fck",
  1346. .prcm = {
  1347. .omap2 = {
  1348. .prcm_reg_id = 1,
  1349. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1350. .module_offs = WKUP_MOD,
  1351. .idlest_reg_id = 1,
  1352. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1353. },
  1354. },
  1355. .slaves = omap2430_gpio1_slaves,
  1356. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  1357. .class = &omap243x_gpio_hwmod_class,
  1358. .dev_attr = &gpio_dev_attr,
  1359. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1360. };
  1361. /* gpio2 */
  1362. static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
  1363. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  1364. { .irq = -1 }
  1365. };
  1366. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  1367. &omap2430_l4_wkup__gpio2,
  1368. };
  1369. static struct omap_hwmod omap2430_gpio2_hwmod = {
  1370. .name = "gpio2",
  1371. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1372. .mpu_irqs = omap243x_gpio2_irqs,
  1373. .main_clk = "gpios_fck",
  1374. .prcm = {
  1375. .omap2 = {
  1376. .prcm_reg_id = 1,
  1377. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1378. .module_offs = WKUP_MOD,
  1379. .idlest_reg_id = 1,
  1380. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1381. },
  1382. },
  1383. .slaves = omap2430_gpio2_slaves,
  1384. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  1385. .class = &omap243x_gpio_hwmod_class,
  1386. .dev_attr = &gpio_dev_attr,
  1387. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1388. };
  1389. /* gpio3 */
  1390. static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
  1391. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  1392. { .irq = -1 }
  1393. };
  1394. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1395. &omap2430_l4_wkup__gpio3,
  1396. };
  1397. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1398. .name = "gpio3",
  1399. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1400. .mpu_irqs = omap243x_gpio3_irqs,
  1401. .main_clk = "gpios_fck",
  1402. .prcm = {
  1403. .omap2 = {
  1404. .prcm_reg_id = 1,
  1405. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1406. .module_offs = WKUP_MOD,
  1407. .idlest_reg_id = 1,
  1408. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1409. },
  1410. },
  1411. .slaves = omap2430_gpio3_slaves,
  1412. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1413. .class = &omap243x_gpio_hwmod_class,
  1414. .dev_attr = &gpio_dev_attr,
  1415. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1416. };
  1417. /* gpio4 */
  1418. static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
  1419. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  1420. { .irq = -1 }
  1421. };
  1422. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1423. &omap2430_l4_wkup__gpio4,
  1424. };
  1425. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1426. .name = "gpio4",
  1427. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1428. .mpu_irqs = omap243x_gpio4_irqs,
  1429. .main_clk = "gpios_fck",
  1430. .prcm = {
  1431. .omap2 = {
  1432. .prcm_reg_id = 1,
  1433. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1434. .module_offs = WKUP_MOD,
  1435. .idlest_reg_id = 1,
  1436. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1437. },
  1438. },
  1439. .slaves = omap2430_gpio4_slaves,
  1440. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1441. .class = &omap243x_gpio_hwmod_class,
  1442. .dev_attr = &gpio_dev_attr,
  1443. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1444. };
  1445. /* gpio5 */
  1446. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1447. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1448. { .irq = -1 }
  1449. };
  1450. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1451. &omap2430_l4_core__gpio5,
  1452. };
  1453. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1454. .name = "gpio5",
  1455. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1456. .mpu_irqs = omap243x_gpio5_irqs,
  1457. .main_clk = "gpio5_fck",
  1458. .prcm = {
  1459. .omap2 = {
  1460. .prcm_reg_id = 2,
  1461. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1462. .module_offs = CORE_MOD,
  1463. .idlest_reg_id = 2,
  1464. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1465. },
  1466. },
  1467. .slaves = omap2430_gpio5_slaves,
  1468. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1469. .class = &omap243x_gpio_hwmod_class,
  1470. .dev_attr = &gpio_dev_attr,
  1471. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1472. };
  1473. /* dma_system */
  1474. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1475. .rev_offs = 0x0000,
  1476. .sysc_offs = 0x002c,
  1477. .syss_offs = 0x0028,
  1478. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1479. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1480. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1481. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1482. .sysc_fields = &omap_hwmod_sysc_type1,
  1483. };
  1484. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1485. .name = "dma",
  1486. .sysc = &omap2430_dma_sysc,
  1487. };
  1488. /* dma attributes */
  1489. static struct omap_dma_dev_attr dma_dev_attr = {
  1490. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1491. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1492. .lch_count = 32,
  1493. };
  1494. static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
  1495. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1496. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1497. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1498. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1499. { .irq = -1 }
  1500. };
  1501. /* dma_system -> L3 */
  1502. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1503. .master = &omap2430_dma_system_hwmod,
  1504. .slave = &omap2430_l3_main_hwmod,
  1505. .clk = "core_l3_ck",
  1506. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1507. };
  1508. /* dma_system master ports */
  1509. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1510. &omap2430_dma_system__l3,
  1511. };
  1512. /* l4_core -> dma_system */
  1513. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1514. .master = &omap2430_l4_core_hwmod,
  1515. .slave = &omap2430_dma_system_hwmod,
  1516. .clk = "sdma_ick",
  1517. .addr = omap2_dma_system_addrs,
  1518. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1519. };
  1520. /* dma_system slave ports */
  1521. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1522. &omap2430_l4_core__dma_system,
  1523. };
  1524. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1525. .name = "dma",
  1526. .class = &omap2430_dma_hwmod_class,
  1527. .mpu_irqs = omap2430_dma_system_irqs,
  1528. .main_clk = "core_l3_ck",
  1529. .slaves = omap2430_dma_system_slaves,
  1530. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1531. .masters = omap2430_dma_system_masters,
  1532. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1533. .dev_attr = &dma_dev_attr,
  1534. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1535. .flags = HWMOD_NO_IDLEST,
  1536. };
  1537. /*
  1538. * 'mailbox' class
  1539. * mailbox module allowing communication between the on-chip processors
  1540. * using a queued mailbox-interrupt mechanism.
  1541. */
  1542. static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
  1543. .rev_offs = 0x000,
  1544. .sysc_offs = 0x010,
  1545. .syss_offs = 0x014,
  1546. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1547. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1548. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1549. .sysc_fields = &omap_hwmod_sysc_type1,
  1550. };
  1551. static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
  1552. .name = "mailbox",
  1553. .sysc = &omap2430_mailbox_sysc,
  1554. };
  1555. /* mailbox */
  1556. static struct omap_hwmod omap2430_mailbox_hwmod;
  1557. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1558. { .irq = 26 },
  1559. { .irq = -1 }
  1560. };
  1561. /* l4_core -> mailbox */
  1562. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1563. .master = &omap2430_l4_core_hwmod,
  1564. .slave = &omap2430_mailbox_hwmod,
  1565. .addr = omap2_mailbox_addrs,
  1566. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1567. };
  1568. /* mailbox slave ports */
  1569. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1570. &omap2430_l4_core__mailbox,
  1571. };
  1572. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1573. .name = "mailbox",
  1574. .class = &omap2430_mailbox_hwmod_class,
  1575. .mpu_irqs = omap2430_mailbox_irqs,
  1576. .main_clk = "mailboxes_ick",
  1577. .prcm = {
  1578. .omap2 = {
  1579. .prcm_reg_id = 1,
  1580. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1581. .module_offs = CORE_MOD,
  1582. .idlest_reg_id = 1,
  1583. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1584. },
  1585. },
  1586. .slaves = omap2430_mailbox_slaves,
  1587. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1588. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1589. };
  1590. /*
  1591. * 'mcspi' class
  1592. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1593. * bus
  1594. */
  1595. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1596. .rev_offs = 0x0000,
  1597. .sysc_offs = 0x0010,
  1598. .syss_offs = 0x0014,
  1599. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1600. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1601. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1602. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1603. .sysc_fields = &omap_hwmod_sysc_type1,
  1604. };
  1605. static struct omap_hwmod_class omap2430_mcspi_class = {
  1606. .name = "mcspi",
  1607. .sysc = &omap2430_mcspi_sysc,
  1608. .rev = OMAP2_MCSPI_REV,
  1609. };
  1610. /* mcspi1 */
  1611. static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
  1612. { .irq = 65 },
  1613. { .irq = -1 }
  1614. };
  1615. static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
  1616. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1617. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1618. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1619. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1620. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1621. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1622. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1623. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1624. };
  1625. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1626. &omap2430_l4_core__mcspi1,
  1627. };
  1628. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1629. .num_chipselect = 4,
  1630. };
  1631. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1632. .name = "mcspi1_hwmod",
  1633. .mpu_irqs = omap2430_mcspi1_mpu_irqs,
  1634. .sdma_reqs = omap2430_mcspi1_sdma_reqs,
  1635. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
  1636. .main_clk = "mcspi1_fck",
  1637. .prcm = {
  1638. .omap2 = {
  1639. .module_offs = CORE_MOD,
  1640. .prcm_reg_id = 1,
  1641. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1642. .idlest_reg_id = 1,
  1643. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1644. },
  1645. },
  1646. .slaves = omap2430_mcspi1_slaves,
  1647. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1648. .class = &omap2430_mcspi_class,
  1649. .dev_attr = &omap_mcspi1_dev_attr,
  1650. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1651. };
  1652. /* mcspi2 */
  1653. static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
  1654. { .irq = 66 },
  1655. { .irq = -1 }
  1656. };
  1657. static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
  1658. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1659. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1660. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1661. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1662. };
  1663. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1664. &omap2430_l4_core__mcspi2,
  1665. };
  1666. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1667. .num_chipselect = 2,
  1668. };
  1669. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1670. .name = "mcspi2_hwmod",
  1671. .mpu_irqs = omap2430_mcspi2_mpu_irqs,
  1672. .sdma_reqs = omap2430_mcspi2_sdma_reqs,
  1673. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
  1674. .main_clk = "mcspi2_fck",
  1675. .prcm = {
  1676. .omap2 = {
  1677. .module_offs = CORE_MOD,
  1678. .prcm_reg_id = 1,
  1679. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1680. .idlest_reg_id = 1,
  1681. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1682. },
  1683. },
  1684. .slaves = omap2430_mcspi2_slaves,
  1685. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1686. .class = &omap2430_mcspi_class,
  1687. .dev_attr = &omap_mcspi2_dev_attr,
  1688. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1689. };
  1690. /* mcspi3 */
  1691. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1692. { .irq = 91 },
  1693. { .irq = -1 }
  1694. };
  1695. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1696. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1697. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1698. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1699. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1700. };
  1701. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1702. &omap2430_l4_core__mcspi3,
  1703. };
  1704. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1705. .num_chipselect = 2,
  1706. };
  1707. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1708. .name = "mcspi3_hwmod",
  1709. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1710. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1711. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
  1712. .main_clk = "mcspi3_fck",
  1713. .prcm = {
  1714. .omap2 = {
  1715. .module_offs = CORE_MOD,
  1716. .prcm_reg_id = 2,
  1717. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1718. .idlest_reg_id = 2,
  1719. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1720. },
  1721. },
  1722. .slaves = omap2430_mcspi3_slaves,
  1723. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1724. .class = &omap2430_mcspi_class,
  1725. .dev_attr = &omap_mcspi3_dev_attr,
  1726. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1727. };
  1728. /*
  1729. * usbhsotg
  1730. */
  1731. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1732. .rev_offs = 0x0400,
  1733. .sysc_offs = 0x0404,
  1734. .syss_offs = 0x0408,
  1735. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1736. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1737. SYSC_HAS_AUTOIDLE),
  1738. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1739. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1740. .sysc_fields = &omap_hwmod_sysc_type1,
  1741. };
  1742. static struct omap_hwmod_class usbotg_class = {
  1743. .name = "usbotg",
  1744. .sysc = &omap2430_usbhsotg_sysc,
  1745. };
  1746. /* usb_otg_hs */
  1747. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1748. { .name = "mc", .irq = 92 },
  1749. { .name = "dma", .irq = 93 },
  1750. { .irq = -1 }
  1751. };
  1752. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1753. .name = "usb_otg_hs",
  1754. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1755. .main_clk = "usbhs_ick",
  1756. .prcm = {
  1757. .omap2 = {
  1758. .prcm_reg_id = 1,
  1759. .module_bit = OMAP2430_EN_USBHS_MASK,
  1760. .module_offs = CORE_MOD,
  1761. .idlest_reg_id = 1,
  1762. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1763. },
  1764. },
  1765. .masters = omap2430_usbhsotg_masters,
  1766. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1767. .slaves = omap2430_usbhsotg_slaves,
  1768. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1769. .class = &usbotg_class,
  1770. /*
  1771. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1772. * broken when autoidle is enabled
  1773. * workaround is to disable the autoidle bit at module level.
  1774. */
  1775. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1776. | HWMOD_SWSUP_MSTANDBY,
  1777. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1778. };
  1779. /*
  1780. * 'mcbsp' class
  1781. * multi channel buffered serial port controller
  1782. */
  1783. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  1784. .rev_offs = 0x007C,
  1785. .sysc_offs = 0x008C,
  1786. .sysc_flags = (SYSC_HAS_SOFTRESET),
  1787. .sysc_fields = &omap_hwmod_sysc_type1,
  1788. };
  1789. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  1790. .name = "mcbsp",
  1791. .sysc = &omap2430_mcbsp_sysc,
  1792. .rev = MCBSP_CONFIG_TYPE2,
  1793. };
  1794. /* mcbsp1 */
  1795. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  1796. { .name = "tx", .irq = 59 },
  1797. { .name = "rx", .irq = 60 },
  1798. { .name = "ovr", .irq = 61 },
  1799. { .name = "common", .irq = 64 },
  1800. { .irq = -1 }
  1801. };
  1802. static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
  1803. { .name = "rx", .dma_req = 32 },
  1804. { .name = "tx", .dma_req = 31 },
  1805. };
  1806. /* l4_core -> mcbsp1 */
  1807. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  1808. .master = &omap2430_l4_core_hwmod,
  1809. .slave = &omap2430_mcbsp1_hwmod,
  1810. .clk = "mcbsp1_ick",
  1811. .addr = omap2_mcbsp1_addrs,
  1812. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1813. };
  1814. /* mcbsp1 slave ports */
  1815. static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
  1816. &omap2430_l4_core__mcbsp1,
  1817. };
  1818. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  1819. .name = "mcbsp1",
  1820. .class = &omap2430_mcbsp_hwmod_class,
  1821. .mpu_irqs = omap2430_mcbsp1_irqs,
  1822. .sdma_reqs = omap2430_mcbsp1_sdma_chs,
  1823. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
  1824. .main_clk = "mcbsp1_fck",
  1825. .prcm = {
  1826. .omap2 = {
  1827. .prcm_reg_id = 1,
  1828. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1829. .module_offs = CORE_MOD,
  1830. .idlest_reg_id = 1,
  1831. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1832. },
  1833. },
  1834. .slaves = omap2430_mcbsp1_slaves,
  1835. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
  1836. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1837. };
  1838. /* mcbsp2 */
  1839. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  1840. { .name = "tx", .irq = 62 },
  1841. { .name = "rx", .irq = 63 },
  1842. { .name = "common", .irq = 16 },
  1843. { .irq = -1 }
  1844. };
  1845. static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
  1846. { .name = "rx", .dma_req = 34 },
  1847. { .name = "tx", .dma_req = 33 },
  1848. };
  1849. /* l4_core -> mcbsp2 */
  1850. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  1851. .master = &omap2430_l4_core_hwmod,
  1852. .slave = &omap2430_mcbsp2_hwmod,
  1853. .clk = "mcbsp2_ick",
  1854. .addr = omap2xxx_mcbsp2_addrs,
  1855. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1856. };
  1857. /* mcbsp2 slave ports */
  1858. static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
  1859. &omap2430_l4_core__mcbsp2,
  1860. };
  1861. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  1862. .name = "mcbsp2",
  1863. .class = &omap2430_mcbsp_hwmod_class,
  1864. .mpu_irqs = omap2430_mcbsp2_irqs,
  1865. .sdma_reqs = omap2430_mcbsp2_sdma_chs,
  1866. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
  1867. .main_clk = "mcbsp2_fck",
  1868. .prcm = {
  1869. .omap2 = {
  1870. .prcm_reg_id = 1,
  1871. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1872. .module_offs = CORE_MOD,
  1873. .idlest_reg_id = 1,
  1874. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1875. },
  1876. },
  1877. .slaves = omap2430_mcbsp2_slaves,
  1878. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
  1879. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1880. };
  1881. /* mcbsp3 */
  1882. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  1883. { .name = "tx", .irq = 89 },
  1884. { .name = "rx", .irq = 90 },
  1885. { .name = "common", .irq = 17 },
  1886. { .irq = -1 }
  1887. };
  1888. static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
  1889. { .name = "rx", .dma_req = 18 },
  1890. { .name = "tx", .dma_req = 17 },
  1891. };
  1892. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  1893. {
  1894. .name = "mpu",
  1895. .pa_start = 0x4808C000,
  1896. .pa_end = 0x4808C0ff,
  1897. .flags = ADDR_TYPE_RT
  1898. },
  1899. { }
  1900. };
  1901. /* l4_core -> mcbsp3 */
  1902. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  1903. .master = &omap2430_l4_core_hwmod,
  1904. .slave = &omap2430_mcbsp3_hwmod,
  1905. .clk = "mcbsp3_ick",
  1906. .addr = omap2430_mcbsp3_addrs,
  1907. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1908. };
  1909. /* mcbsp3 slave ports */
  1910. static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
  1911. &omap2430_l4_core__mcbsp3,
  1912. };
  1913. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  1914. .name = "mcbsp3",
  1915. .class = &omap2430_mcbsp_hwmod_class,
  1916. .mpu_irqs = omap2430_mcbsp3_irqs,
  1917. .sdma_reqs = omap2430_mcbsp3_sdma_chs,
  1918. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
  1919. .main_clk = "mcbsp3_fck",
  1920. .prcm = {
  1921. .omap2 = {
  1922. .prcm_reg_id = 1,
  1923. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  1924. .module_offs = CORE_MOD,
  1925. .idlest_reg_id = 2,
  1926. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  1927. },
  1928. },
  1929. .slaves = omap2430_mcbsp3_slaves,
  1930. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
  1931. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1932. };
  1933. /* mcbsp4 */
  1934. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  1935. { .name = "tx", .irq = 54 },
  1936. { .name = "rx", .irq = 55 },
  1937. { .name = "common", .irq = 18 },
  1938. { .irq = -1 }
  1939. };
  1940. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  1941. { .name = "rx", .dma_req = 20 },
  1942. { .name = "tx", .dma_req = 19 },
  1943. };
  1944. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  1945. {
  1946. .name = "mpu",
  1947. .pa_start = 0x4808E000,
  1948. .pa_end = 0x4808E0ff,
  1949. .flags = ADDR_TYPE_RT
  1950. },
  1951. { }
  1952. };
  1953. /* l4_core -> mcbsp4 */
  1954. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  1955. .master = &omap2430_l4_core_hwmod,
  1956. .slave = &omap2430_mcbsp4_hwmod,
  1957. .clk = "mcbsp4_ick",
  1958. .addr = omap2430_mcbsp4_addrs,
  1959. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1960. };
  1961. /* mcbsp4 slave ports */
  1962. static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
  1963. &omap2430_l4_core__mcbsp4,
  1964. };
  1965. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  1966. .name = "mcbsp4",
  1967. .class = &omap2430_mcbsp_hwmod_class,
  1968. .mpu_irqs = omap2430_mcbsp4_irqs,
  1969. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  1970. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
  1971. .main_clk = "mcbsp4_fck",
  1972. .prcm = {
  1973. .omap2 = {
  1974. .prcm_reg_id = 1,
  1975. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  1976. .module_offs = CORE_MOD,
  1977. .idlest_reg_id = 2,
  1978. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  1979. },
  1980. },
  1981. .slaves = omap2430_mcbsp4_slaves,
  1982. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
  1983. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1984. };
  1985. /* mcbsp5 */
  1986. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  1987. { .name = "tx", .irq = 81 },
  1988. { .name = "rx", .irq = 82 },
  1989. { .name = "common", .irq = 19 },
  1990. { .irq = -1 }
  1991. };
  1992. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  1993. { .name = "rx", .dma_req = 22 },
  1994. { .name = "tx", .dma_req = 21 },
  1995. };
  1996. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  1997. {
  1998. .name = "mpu",
  1999. .pa_start = 0x48096000,
  2000. .pa_end = 0x480960ff,
  2001. .flags = ADDR_TYPE_RT
  2002. },
  2003. { }
  2004. };
  2005. /* l4_core -> mcbsp5 */
  2006. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  2007. .master = &omap2430_l4_core_hwmod,
  2008. .slave = &omap2430_mcbsp5_hwmod,
  2009. .clk = "mcbsp5_ick",
  2010. .addr = omap2430_mcbsp5_addrs,
  2011. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2012. };
  2013. /* mcbsp5 slave ports */
  2014. static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
  2015. &omap2430_l4_core__mcbsp5,
  2016. };
  2017. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  2018. .name = "mcbsp5",
  2019. .class = &omap2430_mcbsp_hwmod_class,
  2020. .mpu_irqs = omap2430_mcbsp5_irqs,
  2021. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  2022. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
  2023. .main_clk = "mcbsp5_fck",
  2024. .prcm = {
  2025. .omap2 = {
  2026. .prcm_reg_id = 1,
  2027. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  2028. .module_offs = CORE_MOD,
  2029. .idlest_reg_id = 2,
  2030. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  2031. },
  2032. },
  2033. .slaves = omap2430_mcbsp5_slaves,
  2034. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
  2035. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2036. };
  2037. /* MMC/SD/SDIO common */
  2038. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  2039. .rev_offs = 0x1fc,
  2040. .sysc_offs = 0x10,
  2041. .syss_offs = 0x14,
  2042. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2043. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2044. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2045. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2046. .sysc_fields = &omap_hwmod_sysc_type1,
  2047. };
  2048. static struct omap_hwmod_class omap2430_mmc_class = {
  2049. .name = "mmc",
  2050. .sysc = &omap2430_mmc_sysc,
  2051. };
  2052. /* MMC/SD/SDIO1 */
  2053. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  2054. { .irq = 83 },
  2055. { .irq = -1 }
  2056. };
  2057. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  2058. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  2059. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  2060. };
  2061. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  2062. { .role = "dbck", .clk = "mmchsdb1_fck" },
  2063. };
  2064. static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
  2065. &omap2430_l4_core__mmc1,
  2066. };
  2067. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2068. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2069. };
  2070. static struct omap_hwmod omap2430_mmc1_hwmod = {
  2071. .name = "mmc1",
  2072. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  2073. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  2074. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  2075. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
  2076. .opt_clks = omap2430_mmc1_opt_clks,
  2077. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  2078. .main_clk = "mmchs1_fck",
  2079. .prcm = {
  2080. .omap2 = {
  2081. .module_offs = CORE_MOD,
  2082. .prcm_reg_id = 2,
  2083. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  2084. .idlest_reg_id = 2,
  2085. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  2086. },
  2087. },
  2088. .dev_attr = &mmc1_dev_attr,
  2089. .slaves = omap2430_mmc1_slaves,
  2090. .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
  2091. .class = &omap2430_mmc_class,
  2092. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2093. };
  2094. /* MMC/SD/SDIO2 */
  2095. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  2096. { .irq = 86 },
  2097. { .irq = -1 }
  2098. };
  2099. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  2100. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  2101. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  2102. };
  2103. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  2104. { .role = "dbck", .clk = "mmchsdb2_fck" },
  2105. };
  2106. static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
  2107. &omap2430_l4_core__mmc2,
  2108. };
  2109. static struct omap_hwmod omap2430_mmc2_hwmod = {
  2110. .name = "mmc2",
  2111. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  2112. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  2113. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  2114. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
  2115. .opt_clks = omap2430_mmc2_opt_clks,
  2116. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  2117. .main_clk = "mmchs2_fck",
  2118. .prcm = {
  2119. .omap2 = {
  2120. .module_offs = CORE_MOD,
  2121. .prcm_reg_id = 2,
  2122. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  2123. .idlest_reg_id = 2,
  2124. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  2125. },
  2126. },
  2127. .slaves = omap2430_mmc2_slaves,
  2128. .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
  2129. .class = &omap2430_mmc_class,
  2130. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2131. };
  2132. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  2133. &omap2430_l3_main_hwmod,
  2134. &omap2430_l4_core_hwmod,
  2135. &omap2430_l4_wkup_hwmod,
  2136. &omap2430_mpu_hwmod,
  2137. &omap2430_iva_hwmod,
  2138. &omap2430_timer1_hwmod,
  2139. &omap2430_timer2_hwmod,
  2140. &omap2430_timer3_hwmod,
  2141. &omap2430_timer4_hwmod,
  2142. &omap2430_timer5_hwmod,
  2143. &omap2430_timer6_hwmod,
  2144. &omap2430_timer7_hwmod,
  2145. &omap2430_timer8_hwmod,
  2146. &omap2430_timer9_hwmod,
  2147. &omap2430_timer10_hwmod,
  2148. &omap2430_timer11_hwmod,
  2149. &omap2430_timer12_hwmod,
  2150. &omap2430_wd_timer2_hwmod,
  2151. &omap2430_uart1_hwmod,
  2152. &omap2430_uart2_hwmod,
  2153. &omap2430_uart3_hwmod,
  2154. /* dss class */
  2155. &omap2430_dss_core_hwmod,
  2156. &omap2430_dss_dispc_hwmod,
  2157. &omap2430_dss_rfbi_hwmod,
  2158. &omap2430_dss_venc_hwmod,
  2159. /* i2c class */
  2160. &omap2430_i2c1_hwmod,
  2161. &omap2430_i2c2_hwmod,
  2162. &omap2430_mmc1_hwmod,
  2163. &omap2430_mmc2_hwmod,
  2164. /* gpio class */
  2165. &omap2430_gpio1_hwmod,
  2166. &omap2430_gpio2_hwmod,
  2167. &omap2430_gpio3_hwmod,
  2168. &omap2430_gpio4_hwmod,
  2169. &omap2430_gpio5_hwmod,
  2170. /* dma_system class*/
  2171. &omap2430_dma_system_hwmod,
  2172. /* mcbsp class */
  2173. &omap2430_mcbsp1_hwmod,
  2174. &omap2430_mcbsp2_hwmod,
  2175. &omap2430_mcbsp3_hwmod,
  2176. &omap2430_mcbsp4_hwmod,
  2177. &omap2430_mcbsp5_hwmod,
  2178. /* mailbox class */
  2179. &omap2430_mailbox_hwmod,
  2180. /* mcspi class */
  2181. &omap2430_mcspi1_hwmod,
  2182. &omap2430_mcspi2_hwmod,
  2183. &omap2430_mcspi3_hwmod,
  2184. /* usbotg class*/
  2185. &omap2430_usbhsotg_hwmod,
  2186. NULL,
  2187. };
  2188. int __init omap2430_hwmod_init(void)
  2189. {
  2190. return omap_hwmod_register(omap2430_hwmods);
  2191. }