omap_hwmod_2430_data.c 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736
  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 | SYSS_HAS_RESET_STATUS),
  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 | SYSS_HAS_RESET_STATUS),
  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. SYSS_HAS_RESET_STATUS),
  1350. .sysc_fields = &omap_hwmod_sysc_type1,
  1351. };
  1352. static struct omap_hwmod_class i2c_class = {
  1353. .name = "i2c",
  1354. .sysc = &i2c_sysc,
  1355. };
  1356. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1357. .fifo_depth = 8, /* bytes */
  1358. };
  1359. /* I2C1 */
  1360. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1361. { .irq = INT_24XX_I2C1_IRQ, },
  1362. };
  1363. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1364. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1365. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1366. };
  1367. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  1368. &omap2430_l4_core__i2c1,
  1369. };
  1370. static struct omap_hwmod omap2430_i2c1_hwmod = {
  1371. .name = "i2c1",
  1372. .mpu_irqs = i2c1_mpu_irqs,
  1373. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  1374. .sdma_reqs = i2c1_sdma_reqs,
  1375. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1376. .main_clk = "i2chs1_fck",
  1377. .prcm = {
  1378. .omap2 = {
  1379. /*
  1380. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  1381. * I2CHS IP's do not follow the usual pattern.
  1382. * prcm_reg_id alone cannot be used to program
  1383. * the iclk and fclk. Needs to be handled using
  1384. * additonal flags when clk handling is moved
  1385. * to hwmod framework.
  1386. */
  1387. .module_offs = CORE_MOD,
  1388. .prcm_reg_id = 1,
  1389. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  1390. .idlest_reg_id = 1,
  1391. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  1392. },
  1393. },
  1394. .slaves = omap2430_i2c1_slaves,
  1395. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  1396. .class = &i2c_class,
  1397. .dev_attr = &i2c_dev_attr,
  1398. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1399. };
  1400. /* I2C2 */
  1401. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1402. { .irq = INT_24XX_I2C2_IRQ, },
  1403. };
  1404. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1405. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1406. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1407. };
  1408. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  1409. &omap2430_l4_core__i2c2,
  1410. };
  1411. static struct omap_hwmod omap2430_i2c2_hwmod = {
  1412. .name = "i2c2",
  1413. .mpu_irqs = i2c2_mpu_irqs,
  1414. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  1415. .sdma_reqs = i2c2_sdma_reqs,
  1416. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1417. .main_clk = "i2chs2_fck",
  1418. .prcm = {
  1419. .omap2 = {
  1420. .module_offs = CORE_MOD,
  1421. .prcm_reg_id = 1,
  1422. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  1423. .idlest_reg_id = 1,
  1424. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  1425. },
  1426. },
  1427. .slaves = omap2430_i2c2_slaves,
  1428. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  1429. .class = &i2c_class,
  1430. .dev_attr = &i2c_dev_attr,
  1431. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1432. };
  1433. /* l4_wkup -> gpio1 */
  1434. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  1435. {
  1436. .pa_start = 0x4900C000,
  1437. .pa_end = 0x4900C1ff,
  1438. .flags = ADDR_TYPE_RT
  1439. },
  1440. };
  1441. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  1442. .master = &omap2430_l4_wkup_hwmod,
  1443. .slave = &omap2430_gpio1_hwmod,
  1444. .clk = "gpios_ick",
  1445. .addr = omap2430_gpio1_addr_space,
  1446. .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
  1447. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1448. };
  1449. /* l4_wkup -> gpio2 */
  1450. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  1451. {
  1452. .pa_start = 0x4900E000,
  1453. .pa_end = 0x4900E1ff,
  1454. .flags = ADDR_TYPE_RT
  1455. },
  1456. };
  1457. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  1458. .master = &omap2430_l4_wkup_hwmod,
  1459. .slave = &omap2430_gpio2_hwmod,
  1460. .clk = "gpios_ick",
  1461. .addr = omap2430_gpio2_addr_space,
  1462. .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
  1463. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1464. };
  1465. /* l4_wkup -> gpio3 */
  1466. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  1467. {
  1468. .pa_start = 0x49010000,
  1469. .pa_end = 0x490101ff,
  1470. .flags = ADDR_TYPE_RT
  1471. },
  1472. };
  1473. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  1474. .master = &omap2430_l4_wkup_hwmod,
  1475. .slave = &omap2430_gpio3_hwmod,
  1476. .clk = "gpios_ick",
  1477. .addr = omap2430_gpio3_addr_space,
  1478. .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
  1479. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1480. };
  1481. /* l4_wkup -> gpio4 */
  1482. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  1483. {
  1484. .pa_start = 0x49012000,
  1485. .pa_end = 0x490121ff,
  1486. .flags = ADDR_TYPE_RT
  1487. },
  1488. };
  1489. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  1490. .master = &omap2430_l4_wkup_hwmod,
  1491. .slave = &omap2430_gpio4_hwmod,
  1492. .clk = "gpios_ick",
  1493. .addr = omap2430_gpio4_addr_space,
  1494. .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
  1495. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1496. };
  1497. /* l4_core -> gpio5 */
  1498. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  1499. {
  1500. .pa_start = 0x480B6000,
  1501. .pa_end = 0x480B61ff,
  1502. .flags = ADDR_TYPE_RT
  1503. },
  1504. };
  1505. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  1506. .master = &omap2430_l4_core_hwmod,
  1507. .slave = &omap2430_gpio5_hwmod,
  1508. .clk = "gpio5_ick",
  1509. .addr = omap2430_gpio5_addr_space,
  1510. .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
  1511. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1512. };
  1513. /* gpio dev_attr */
  1514. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1515. .bank_width = 32,
  1516. .dbck_flag = false,
  1517. };
  1518. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  1519. .rev_offs = 0x0000,
  1520. .sysc_offs = 0x0010,
  1521. .syss_offs = 0x0014,
  1522. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1523. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1524. SYSS_HAS_RESET_STATUS),
  1525. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1526. .sysc_fields = &omap_hwmod_sysc_type1,
  1527. };
  1528. /*
  1529. * 'gpio' class
  1530. * general purpose io module
  1531. */
  1532. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  1533. .name = "gpio",
  1534. .sysc = &omap243x_gpio_sysc,
  1535. .rev = 0,
  1536. };
  1537. /* gpio1 */
  1538. static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
  1539. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  1540. };
  1541. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  1542. &omap2430_l4_wkup__gpio1,
  1543. };
  1544. static struct omap_hwmod omap2430_gpio1_hwmod = {
  1545. .name = "gpio1",
  1546. .mpu_irqs = omap243x_gpio1_irqs,
  1547. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
  1548. .main_clk = "gpios_fck",
  1549. .prcm = {
  1550. .omap2 = {
  1551. .prcm_reg_id = 1,
  1552. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1553. .module_offs = WKUP_MOD,
  1554. .idlest_reg_id = 1,
  1555. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1556. },
  1557. },
  1558. .slaves = omap2430_gpio1_slaves,
  1559. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  1560. .class = &omap243x_gpio_hwmod_class,
  1561. .dev_attr = &gpio_dev_attr,
  1562. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1563. };
  1564. /* gpio2 */
  1565. static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
  1566. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  1567. };
  1568. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  1569. &omap2430_l4_wkup__gpio2,
  1570. };
  1571. static struct omap_hwmod omap2430_gpio2_hwmod = {
  1572. .name = "gpio2",
  1573. .mpu_irqs = omap243x_gpio2_irqs,
  1574. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
  1575. .main_clk = "gpios_fck",
  1576. .prcm = {
  1577. .omap2 = {
  1578. .prcm_reg_id = 1,
  1579. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1580. .module_offs = WKUP_MOD,
  1581. .idlest_reg_id = 1,
  1582. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1583. },
  1584. },
  1585. .slaves = omap2430_gpio2_slaves,
  1586. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  1587. .class = &omap243x_gpio_hwmod_class,
  1588. .dev_attr = &gpio_dev_attr,
  1589. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1590. };
  1591. /* gpio3 */
  1592. static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
  1593. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  1594. };
  1595. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1596. &omap2430_l4_wkup__gpio3,
  1597. };
  1598. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1599. .name = "gpio3",
  1600. .mpu_irqs = omap243x_gpio3_irqs,
  1601. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
  1602. .main_clk = "gpios_fck",
  1603. .prcm = {
  1604. .omap2 = {
  1605. .prcm_reg_id = 1,
  1606. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1607. .module_offs = WKUP_MOD,
  1608. .idlest_reg_id = 1,
  1609. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1610. },
  1611. },
  1612. .slaves = omap2430_gpio3_slaves,
  1613. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1614. .class = &omap243x_gpio_hwmod_class,
  1615. .dev_attr = &gpio_dev_attr,
  1616. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1617. };
  1618. /* gpio4 */
  1619. static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
  1620. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  1621. };
  1622. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1623. &omap2430_l4_wkup__gpio4,
  1624. };
  1625. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1626. .name = "gpio4",
  1627. .mpu_irqs = omap243x_gpio4_irqs,
  1628. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
  1629. .main_clk = "gpios_fck",
  1630. .prcm = {
  1631. .omap2 = {
  1632. .prcm_reg_id = 1,
  1633. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1634. .module_offs = WKUP_MOD,
  1635. .idlest_reg_id = 1,
  1636. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1637. },
  1638. },
  1639. .slaves = omap2430_gpio4_slaves,
  1640. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1641. .class = &omap243x_gpio_hwmod_class,
  1642. .dev_attr = &gpio_dev_attr,
  1643. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1644. };
  1645. /* gpio5 */
  1646. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1647. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1648. };
  1649. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1650. &omap2430_l4_core__gpio5,
  1651. };
  1652. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1653. .name = "gpio5",
  1654. .mpu_irqs = omap243x_gpio5_irqs,
  1655. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
  1656. .main_clk = "gpio5_fck",
  1657. .prcm = {
  1658. .omap2 = {
  1659. .prcm_reg_id = 2,
  1660. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1661. .module_offs = CORE_MOD,
  1662. .idlest_reg_id = 2,
  1663. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1664. },
  1665. },
  1666. .slaves = omap2430_gpio5_slaves,
  1667. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1668. .class = &omap243x_gpio_hwmod_class,
  1669. .dev_attr = &gpio_dev_attr,
  1670. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1671. };
  1672. /* dma_system */
  1673. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1674. .rev_offs = 0x0000,
  1675. .sysc_offs = 0x002c,
  1676. .syss_offs = 0x0028,
  1677. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1678. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1679. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1680. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1681. .sysc_fields = &omap_hwmod_sysc_type1,
  1682. };
  1683. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1684. .name = "dma",
  1685. .sysc = &omap2430_dma_sysc,
  1686. };
  1687. /* dma attributes */
  1688. static struct omap_dma_dev_attr dma_dev_attr = {
  1689. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1690. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1691. .lch_count = 32,
  1692. };
  1693. static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
  1694. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1695. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1696. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1697. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1698. };
  1699. static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
  1700. {
  1701. .pa_start = 0x48056000,
  1702. .pa_end = 0x4a0560ff,
  1703. .flags = ADDR_TYPE_RT
  1704. },
  1705. };
  1706. /* dma_system -> L3 */
  1707. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1708. .master = &omap2430_dma_system_hwmod,
  1709. .slave = &omap2430_l3_main_hwmod,
  1710. .clk = "core_l3_ck",
  1711. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1712. };
  1713. /* dma_system master ports */
  1714. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1715. &omap2430_dma_system__l3,
  1716. };
  1717. /* l4_core -> dma_system */
  1718. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1719. .master = &omap2430_l4_core_hwmod,
  1720. .slave = &omap2430_dma_system_hwmod,
  1721. .clk = "sdma_ick",
  1722. .addr = omap2430_dma_system_addrs,
  1723. .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs),
  1724. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1725. };
  1726. /* dma_system slave ports */
  1727. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1728. &omap2430_l4_core__dma_system,
  1729. };
  1730. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1731. .name = "dma",
  1732. .class = &omap2430_dma_hwmod_class,
  1733. .mpu_irqs = omap2430_dma_system_irqs,
  1734. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
  1735. .main_clk = "core_l3_ck",
  1736. .slaves = omap2430_dma_system_slaves,
  1737. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1738. .masters = omap2430_dma_system_masters,
  1739. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1740. .dev_attr = &dma_dev_attr,
  1741. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1742. .flags = HWMOD_NO_IDLEST,
  1743. };
  1744. /*
  1745. * 'mailbox' class
  1746. * mailbox module allowing communication between the on-chip processors
  1747. * using a queued mailbox-interrupt mechanism.
  1748. */
  1749. static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
  1750. .rev_offs = 0x000,
  1751. .sysc_offs = 0x010,
  1752. .syss_offs = 0x014,
  1753. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1754. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1755. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1756. .sysc_fields = &omap_hwmod_sysc_type1,
  1757. };
  1758. static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
  1759. .name = "mailbox",
  1760. .sysc = &omap2430_mailbox_sysc,
  1761. };
  1762. /* mailbox */
  1763. static struct omap_hwmod omap2430_mailbox_hwmod;
  1764. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1765. { .irq = 26 },
  1766. };
  1767. static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
  1768. {
  1769. .pa_start = 0x48094000,
  1770. .pa_end = 0x480941ff,
  1771. .flags = ADDR_TYPE_RT,
  1772. },
  1773. };
  1774. /* l4_core -> mailbox */
  1775. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1776. .master = &omap2430_l4_core_hwmod,
  1777. .slave = &omap2430_mailbox_hwmod,
  1778. .addr = omap2430_mailbox_addrs,
  1779. .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
  1780. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1781. };
  1782. /* mailbox slave ports */
  1783. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1784. &omap2430_l4_core__mailbox,
  1785. };
  1786. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1787. .name = "mailbox",
  1788. .class = &omap2430_mailbox_hwmod_class,
  1789. .mpu_irqs = omap2430_mailbox_irqs,
  1790. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
  1791. .main_clk = "mailboxes_ick",
  1792. .prcm = {
  1793. .omap2 = {
  1794. .prcm_reg_id = 1,
  1795. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1796. .module_offs = CORE_MOD,
  1797. .idlest_reg_id = 1,
  1798. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1799. },
  1800. },
  1801. .slaves = omap2430_mailbox_slaves,
  1802. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1803. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1804. };
  1805. /*
  1806. * 'mcspi' class
  1807. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1808. * bus
  1809. */
  1810. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1811. .rev_offs = 0x0000,
  1812. .sysc_offs = 0x0010,
  1813. .syss_offs = 0x0014,
  1814. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1815. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1816. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1817. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1818. .sysc_fields = &omap_hwmod_sysc_type1,
  1819. };
  1820. static struct omap_hwmod_class omap2430_mcspi_class = {
  1821. .name = "mcspi",
  1822. .sysc = &omap2430_mcspi_sysc,
  1823. .rev = OMAP2_MCSPI_REV,
  1824. };
  1825. /* mcspi1 */
  1826. static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
  1827. { .irq = 65 },
  1828. };
  1829. static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
  1830. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1831. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1832. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1833. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1834. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1835. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1836. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1837. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1838. };
  1839. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1840. &omap2430_l4_core__mcspi1,
  1841. };
  1842. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1843. .num_chipselect = 4,
  1844. };
  1845. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1846. .name = "mcspi1_hwmod",
  1847. .mpu_irqs = omap2430_mcspi1_mpu_irqs,
  1848. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
  1849. .sdma_reqs = omap2430_mcspi1_sdma_reqs,
  1850. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
  1851. .main_clk = "mcspi1_fck",
  1852. .prcm = {
  1853. .omap2 = {
  1854. .module_offs = CORE_MOD,
  1855. .prcm_reg_id = 1,
  1856. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1857. .idlest_reg_id = 1,
  1858. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1859. },
  1860. },
  1861. .slaves = omap2430_mcspi1_slaves,
  1862. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1863. .class = &omap2430_mcspi_class,
  1864. .dev_attr = &omap_mcspi1_dev_attr,
  1865. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1866. };
  1867. /* mcspi2 */
  1868. static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
  1869. { .irq = 66 },
  1870. };
  1871. static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
  1872. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1873. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1874. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1875. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1876. };
  1877. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1878. &omap2430_l4_core__mcspi2,
  1879. };
  1880. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1881. .num_chipselect = 2,
  1882. };
  1883. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1884. .name = "mcspi2_hwmod",
  1885. .mpu_irqs = omap2430_mcspi2_mpu_irqs,
  1886. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
  1887. .sdma_reqs = omap2430_mcspi2_sdma_reqs,
  1888. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
  1889. .main_clk = "mcspi2_fck",
  1890. .prcm = {
  1891. .omap2 = {
  1892. .module_offs = CORE_MOD,
  1893. .prcm_reg_id = 1,
  1894. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1895. .idlest_reg_id = 1,
  1896. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1897. },
  1898. },
  1899. .slaves = omap2430_mcspi2_slaves,
  1900. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1901. .class = &omap2430_mcspi_class,
  1902. .dev_attr = &omap_mcspi2_dev_attr,
  1903. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1904. };
  1905. /* mcspi3 */
  1906. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1907. { .irq = 91 },
  1908. };
  1909. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1910. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1911. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1912. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1913. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1914. };
  1915. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1916. &omap2430_l4_core__mcspi3,
  1917. };
  1918. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1919. .num_chipselect = 2,
  1920. };
  1921. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1922. .name = "mcspi3_hwmod",
  1923. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1924. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
  1925. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1926. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
  1927. .main_clk = "mcspi3_fck",
  1928. .prcm = {
  1929. .omap2 = {
  1930. .module_offs = CORE_MOD,
  1931. .prcm_reg_id = 2,
  1932. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1933. .idlest_reg_id = 2,
  1934. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1935. },
  1936. },
  1937. .slaves = omap2430_mcspi3_slaves,
  1938. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1939. .class = &omap2430_mcspi_class,
  1940. .dev_attr = &omap_mcspi3_dev_attr,
  1941. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1942. };
  1943. /*
  1944. * usbhsotg
  1945. */
  1946. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1947. .rev_offs = 0x0400,
  1948. .sysc_offs = 0x0404,
  1949. .syss_offs = 0x0408,
  1950. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1951. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1952. SYSC_HAS_AUTOIDLE),
  1953. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1954. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1955. .sysc_fields = &omap_hwmod_sysc_type1,
  1956. };
  1957. static struct omap_hwmod_class usbotg_class = {
  1958. .name = "usbotg",
  1959. .sysc = &omap2430_usbhsotg_sysc,
  1960. };
  1961. /* usb_otg_hs */
  1962. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1963. { .name = "mc", .irq = 92 },
  1964. { .name = "dma", .irq = 93 },
  1965. };
  1966. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1967. .name = "usb_otg_hs",
  1968. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1969. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
  1970. .main_clk = "usbhs_ick",
  1971. .prcm = {
  1972. .omap2 = {
  1973. .prcm_reg_id = 1,
  1974. .module_bit = OMAP2430_EN_USBHS_MASK,
  1975. .module_offs = CORE_MOD,
  1976. .idlest_reg_id = 1,
  1977. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1978. },
  1979. },
  1980. .masters = omap2430_usbhsotg_masters,
  1981. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1982. .slaves = omap2430_usbhsotg_slaves,
  1983. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1984. .class = &usbotg_class,
  1985. /*
  1986. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1987. * broken when autoidle is enabled
  1988. * workaround is to disable the autoidle bit at module level.
  1989. */
  1990. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1991. | HWMOD_SWSUP_MSTANDBY,
  1992. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1993. };
  1994. /*
  1995. * 'mcbsp' class
  1996. * multi channel buffered serial port controller
  1997. */
  1998. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  1999. .rev_offs = 0x007C,
  2000. .sysc_offs = 0x008C,
  2001. .sysc_flags = (SYSC_HAS_SOFTRESET),
  2002. .sysc_fields = &omap_hwmod_sysc_type1,
  2003. };
  2004. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  2005. .name = "mcbsp",
  2006. .sysc = &omap2430_mcbsp_sysc,
  2007. .rev = MCBSP_CONFIG_TYPE2,
  2008. };
  2009. /* mcbsp1 */
  2010. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  2011. { .name = "tx", .irq = 59 },
  2012. { .name = "rx", .irq = 60 },
  2013. { .name = "ovr", .irq = 61 },
  2014. { .name = "common", .irq = 64 },
  2015. };
  2016. static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
  2017. { .name = "rx", .dma_req = 32 },
  2018. { .name = "tx", .dma_req = 31 },
  2019. };
  2020. static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
  2021. {
  2022. .name = "mpu",
  2023. .pa_start = 0x48074000,
  2024. .pa_end = 0x480740ff,
  2025. .flags = ADDR_TYPE_RT
  2026. },
  2027. };
  2028. /* l4_core -> mcbsp1 */
  2029. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  2030. .master = &omap2430_l4_core_hwmod,
  2031. .slave = &omap2430_mcbsp1_hwmod,
  2032. .clk = "mcbsp1_ick",
  2033. .addr = omap2430_mcbsp1_addrs,
  2034. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
  2035. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2036. };
  2037. /* mcbsp1 slave ports */
  2038. static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
  2039. &omap2430_l4_core__mcbsp1,
  2040. };
  2041. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  2042. .name = "mcbsp1",
  2043. .class = &omap2430_mcbsp_hwmod_class,
  2044. .mpu_irqs = omap2430_mcbsp1_irqs,
  2045. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
  2046. .sdma_reqs = omap2430_mcbsp1_sdma_chs,
  2047. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
  2048. .main_clk = "mcbsp1_fck",
  2049. .prcm = {
  2050. .omap2 = {
  2051. .prcm_reg_id = 1,
  2052. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  2053. .module_offs = CORE_MOD,
  2054. .idlest_reg_id = 1,
  2055. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  2056. },
  2057. },
  2058. .slaves = omap2430_mcbsp1_slaves,
  2059. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
  2060. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2061. };
  2062. /* mcbsp2 */
  2063. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  2064. { .name = "tx", .irq = 62 },
  2065. { .name = "rx", .irq = 63 },
  2066. { .name = "common", .irq = 16 },
  2067. };
  2068. static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
  2069. { .name = "rx", .dma_req = 34 },
  2070. { .name = "tx", .dma_req = 33 },
  2071. };
  2072. static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
  2073. {
  2074. .name = "mpu",
  2075. .pa_start = 0x48076000,
  2076. .pa_end = 0x480760ff,
  2077. .flags = ADDR_TYPE_RT
  2078. },
  2079. };
  2080. /* l4_core -> mcbsp2 */
  2081. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  2082. .master = &omap2430_l4_core_hwmod,
  2083. .slave = &omap2430_mcbsp2_hwmod,
  2084. .clk = "mcbsp2_ick",
  2085. .addr = omap2430_mcbsp2_addrs,
  2086. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
  2087. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2088. };
  2089. /* mcbsp2 slave ports */
  2090. static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
  2091. &omap2430_l4_core__mcbsp2,
  2092. };
  2093. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  2094. .name = "mcbsp2",
  2095. .class = &omap2430_mcbsp_hwmod_class,
  2096. .mpu_irqs = omap2430_mcbsp2_irqs,
  2097. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
  2098. .sdma_reqs = omap2430_mcbsp2_sdma_chs,
  2099. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
  2100. .main_clk = "mcbsp2_fck",
  2101. .prcm = {
  2102. .omap2 = {
  2103. .prcm_reg_id = 1,
  2104. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  2105. .module_offs = CORE_MOD,
  2106. .idlest_reg_id = 1,
  2107. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  2108. },
  2109. },
  2110. .slaves = omap2430_mcbsp2_slaves,
  2111. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
  2112. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2113. };
  2114. /* mcbsp3 */
  2115. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  2116. { .name = "tx", .irq = 89 },
  2117. { .name = "rx", .irq = 90 },
  2118. { .name = "common", .irq = 17 },
  2119. };
  2120. static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
  2121. { .name = "rx", .dma_req = 18 },
  2122. { .name = "tx", .dma_req = 17 },
  2123. };
  2124. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  2125. {
  2126. .name = "mpu",
  2127. .pa_start = 0x4808C000,
  2128. .pa_end = 0x4808C0ff,
  2129. .flags = ADDR_TYPE_RT
  2130. },
  2131. };
  2132. /* l4_core -> mcbsp3 */
  2133. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  2134. .master = &omap2430_l4_core_hwmod,
  2135. .slave = &omap2430_mcbsp3_hwmod,
  2136. .clk = "mcbsp3_ick",
  2137. .addr = omap2430_mcbsp3_addrs,
  2138. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
  2139. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2140. };
  2141. /* mcbsp3 slave ports */
  2142. static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
  2143. &omap2430_l4_core__mcbsp3,
  2144. };
  2145. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  2146. .name = "mcbsp3",
  2147. .class = &omap2430_mcbsp_hwmod_class,
  2148. .mpu_irqs = omap2430_mcbsp3_irqs,
  2149. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
  2150. .sdma_reqs = omap2430_mcbsp3_sdma_chs,
  2151. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
  2152. .main_clk = "mcbsp3_fck",
  2153. .prcm = {
  2154. .omap2 = {
  2155. .prcm_reg_id = 1,
  2156. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  2157. .module_offs = CORE_MOD,
  2158. .idlest_reg_id = 2,
  2159. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  2160. },
  2161. },
  2162. .slaves = omap2430_mcbsp3_slaves,
  2163. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
  2164. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2165. };
  2166. /* mcbsp4 */
  2167. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  2168. { .name = "tx", .irq = 54 },
  2169. { .name = "rx", .irq = 55 },
  2170. { .name = "common", .irq = 18 },
  2171. };
  2172. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  2173. { .name = "rx", .dma_req = 20 },
  2174. { .name = "tx", .dma_req = 19 },
  2175. };
  2176. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  2177. {
  2178. .name = "mpu",
  2179. .pa_start = 0x4808E000,
  2180. .pa_end = 0x4808E0ff,
  2181. .flags = ADDR_TYPE_RT
  2182. },
  2183. };
  2184. /* l4_core -> mcbsp4 */
  2185. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  2186. .master = &omap2430_l4_core_hwmod,
  2187. .slave = &omap2430_mcbsp4_hwmod,
  2188. .clk = "mcbsp4_ick",
  2189. .addr = omap2430_mcbsp4_addrs,
  2190. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
  2191. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2192. };
  2193. /* mcbsp4 slave ports */
  2194. static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
  2195. &omap2430_l4_core__mcbsp4,
  2196. };
  2197. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  2198. .name = "mcbsp4",
  2199. .class = &omap2430_mcbsp_hwmod_class,
  2200. .mpu_irqs = omap2430_mcbsp4_irqs,
  2201. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
  2202. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  2203. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
  2204. .main_clk = "mcbsp4_fck",
  2205. .prcm = {
  2206. .omap2 = {
  2207. .prcm_reg_id = 1,
  2208. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  2209. .module_offs = CORE_MOD,
  2210. .idlest_reg_id = 2,
  2211. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  2212. },
  2213. },
  2214. .slaves = omap2430_mcbsp4_slaves,
  2215. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
  2216. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2217. };
  2218. /* mcbsp5 */
  2219. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  2220. { .name = "tx", .irq = 81 },
  2221. { .name = "rx", .irq = 82 },
  2222. { .name = "common", .irq = 19 },
  2223. };
  2224. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  2225. { .name = "rx", .dma_req = 22 },
  2226. { .name = "tx", .dma_req = 21 },
  2227. };
  2228. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  2229. {
  2230. .name = "mpu",
  2231. .pa_start = 0x48096000,
  2232. .pa_end = 0x480960ff,
  2233. .flags = ADDR_TYPE_RT
  2234. },
  2235. };
  2236. /* l4_core -> mcbsp5 */
  2237. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  2238. .master = &omap2430_l4_core_hwmod,
  2239. .slave = &omap2430_mcbsp5_hwmod,
  2240. .clk = "mcbsp5_ick",
  2241. .addr = omap2430_mcbsp5_addrs,
  2242. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
  2243. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2244. };
  2245. /* mcbsp5 slave ports */
  2246. static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
  2247. &omap2430_l4_core__mcbsp5,
  2248. };
  2249. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  2250. .name = "mcbsp5",
  2251. .class = &omap2430_mcbsp_hwmod_class,
  2252. .mpu_irqs = omap2430_mcbsp5_irqs,
  2253. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
  2254. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  2255. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
  2256. .main_clk = "mcbsp5_fck",
  2257. .prcm = {
  2258. .omap2 = {
  2259. .prcm_reg_id = 1,
  2260. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  2261. .module_offs = CORE_MOD,
  2262. .idlest_reg_id = 2,
  2263. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  2264. },
  2265. },
  2266. .slaves = omap2430_mcbsp5_slaves,
  2267. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
  2268. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2269. };
  2270. /* MMC/SD/SDIO common */
  2271. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  2272. .rev_offs = 0x1fc,
  2273. .sysc_offs = 0x10,
  2274. .syss_offs = 0x14,
  2275. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2276. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2277. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2278. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2279. .sysc_fields = &omap_hwmod_sysc_type1,
  2280. };
  2281. static struct omap_hwmod_class omap2430_mmc_class = {
  2282. .name = "mmc",
  2283. .sysc = &omap2430_mmc_sysc,
  2284. };
  2285. /* MMC/SD/SDIO1 */
  2286. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  2287. { .irq = 83 },
  2288. };
  2289. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  2290. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  2291. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  2292. };
  2293. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  2294. { .role = "dbck", .clk = "mmchsdb1_fck" },
  2295. };
  2296. static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
  2297. &omap2430_l4_core__mmc1,
  2298. };
  2299. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2300. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2301. };
  2302. static struct omap_hwmod omap2430_mmc1_hwmod = {
  2303. .name = "mmc1",
  2304. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  2305. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  2306. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
  2307. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  2308. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
  2309. .opt_clks = omap2430_mmc1_opt_clks,
  2310. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  2311. .main_clk = "mmchs1_fck",
  2312. .prcm = {
  2313. .omap2 = {
  2314. .module_offs = CORE_MOD,
  2315. .prcm_reg_id = 2,
  2316. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  2317. .idlest_reg_id = 2,
  2318. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  2319. },
  2320. },
  2321. .dev_attr = &mmc1_dev_attr,
  2322. .slaves = omap2430_mmc1_slaves,
  2323. .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
  2324. .class = &omap2430_mmc_class,
  2325. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2326. };
  2327. /* MMC/SD/SDIO2 */
  2328. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  2329. { .irq = 86 },
  2330. };
  2331. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  2332. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  2333. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  2334. };
  2335. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  2336. { .role = "dbck", .clk = "mmchsdb2_fck" },
  2337. };
  2338. static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
  2339. &omap2430_l4_core__mmc2,
  2340. };
  2341. static struct omap_hwmod omap2430_mmc2_hwmod = {
  2342. .name = "mmc2",
  2343. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  2344. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  2345. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
  2346. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  2347. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
  2348. .opt_clks = omap2430_mmc2_opt_clks,
  2349. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  2350. .main_clk = "mmchs2_fck",
  2351. .prcm = {
  2352. .omap2 = {
  2353. .module_offs = CORE_MOD,
  2354. .prcm_reg_id = 2,
  2355. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  2356. .idlest_reg_id = 2,
  2357. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  2358. },
  2359. },
  2360. .slaves = omap2430_mmc2_slaves,
  2361. .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
  2362. .class = &omap2430_mmc_class,
  2363. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2364. };
  2365. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  2366. &omap2430_l3_main_hwmod,
  2367. &omap2430_l4_core_hwmod,
  2368. &omap2430_l4_wkup_hwmod,
  2369. &omap2430_mpu_hwmod,
  2370. &omap2430_iva_hwmod,
  2371. &omap2430_timer1_hwmod,
  2372. &omap2430_timer2_hwmod,
  2373. &omap2430_timer3_hwmod,
  2374. &omap2430_timer4_hwmod,
  2375. &omap2430_timer5_hwmod,
  2376. &omap2430_timer6_hwmod,
  2377. &omap2430_timer7_hwmod,
  2378. &omap2430_timer8_hwmod,
  2379. &omap2430_timer9_hwmod,
  2380. &omap2430_timer10_hwmod,
  2381. &omap2430_timer11_hwmod,
  2382. &omap2430_timer12_hwmod,
  2383. &omap2430_wd_timer2_hwmod,
  2384. &omap2430_uart1_hwmod,
  2385. &omap2430_uart2_hwmod,
  2386. &omap2430_uart3_hwmod,
  2387. /* dss class */
  2388. &omap2430_dss_core_hwmod,
  2389. &omap2430_dss_dispc_hwmod,
  2390. &omap2430_dss_rfbi_hwmod,
  2391. &omap2430_dss_venc_hwmod,
  2392. /* i2c class */
  2393. &omap2430_i2c1_hwmod,
  2394. &omap2430_i2c2_hwmod,
  2395. &omap2430_mmc1_hwmod,
  2396. &omap2430_mmc2_hwmod,
  2397. /* gpio class */
  2398. &omap2430_gpio1_hwmod,
  2399. &omap2430_gpio2_hwmod,
  2400. &omap2430_gpio3_hwmod,
  2401. &omap2430_gpio4_hwmod,
  2402. &omap2430_gpio5_hwmod,
  2403. /* dma_system class*/
  2404. &omap2430_dma_system_hwmod,
  2405. /* mcbsp class */
  2406. &omap2430_mcbsp1_hwmod,
  2407. &omap2430_mcbsp2_hwmod,
  2408. &omap2430_mcbsp3_hwmod,
  2409. &omap2430_mcbsp4_hwmod,
  2410. &omap2430_mcbsp5_hwmod,
  2411. /* mailbox class */
  2412. &omap2430_mailbox_hwmod,
  2413. /* mcspi class */
  2414. &omap2430_mcspi1_hwmod,
  2415. &omap2430_mcspi2_hwmod,
  2416. &omap2430_mcspi3_hwmod,
  2417. /* usbotg class*/
  2418. &omap2430_usbhsotg_hwmod,
  2419. NULL,
  2420. };
  2421. int __init omap2430_hwmod_init(void)
  2422. {
  2423. return omap_hwmod_register(omap2430_hwmods);
  2424. }