omap_hwmod_2430_data.c 61 KB

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