omap_hwmod_2430_data.c 72 KB

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