omap_hwmod_2430_data.c 61 KB

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