omap_hwmod_7xx_data.c 101 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038
  1. /*
  2. * Hardware modules present on the DRA7xx chips
  3. *
  4. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * Paul Walmsley
  7. * Benoit Cousson
  8. *
  9. * This file is automatically generated from the OMAP hardware databases.
  10. * We respectfully ask that any modifications to this file be coordinated
  11. * with the public linux-omap@vger.kernel.org mailing list and the
  12. * authors above to ensure that the autogeneration scripts are kept
  13. * up-to-date with the file contents.
  14. *
  15. * This program is free software; you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License version 2 as
  17. * published by the Free Software Foundation.
  18. */
  19. #include <linux/io.h>
  20. #include <linux/platform_data/hsmmc-omap.h>
  21. #include <linux/power/smartreflex.h>
  22. #include <linux/i2c-omap.h>
  23. #include <linux/omap-dma.h>
  24. #include <linux/platform_data/spi-omap2-mcspi.h>
  25. #include <linux/platform_data/asoc-ti-mcbsp.h>
  26. #include "omap_hwmod.h"
  27. #include "omap_hwmod_common_data.h"
  28. #include "cm1_7xx.h"
  29. #include "cm2_7xx.h"
  30. #include "prm7xx.h"
  31. #include "i2c.h"
  32. #include "wd_timer.h"
  33. #include "soc.h"
  34. /* Base offset for all DRA7XX interrupts external to MPUSS */
  35. #define DRA7XX_IRQ_GIC_START 32
  36. /* Base offset for all DRA7XX dma requests */
  37. #define DRA7XX_DMA_REQ_START 1
  38. /*
  39. * IP blocks
  40. */
  41. /*
  42. * 'dmm' class
  43. * instance(s): dmm
  44. */
  45. static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
  46. .name = "dmm",
  47. };
  48. /* dmm */
  49. static struct omap_hwmod dra7xx_dmm_hwmod = {
  50. .name = "dmm",
  51. .class = &dra7xx_dmm_hwmod_class,
  52. .clkdm_name = "emif_clkdm",
  53. .prcm = {
  54. .omap4 = {
  55. .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
  56. .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
  57. },
  58. },
  59. };
  60. /*
  61. * 'l3' class
  62. * instance(s): l3_instr, l3_main_1, l3_main_2
  63. */
  64. static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
  65. .name = "l3",
  66. };
  67. /* l3_instr */
  68. static struct omap_hwmod dra7xx_l3_instr_hwmod = {
  69. .name = "l3_instr",
  70. .class = &dra7xx_l3_hwmod_class,
  71. .clkdm_name = "l3instr_clkdm",
  72. .prcm = {
  73. .omap4 = {
  74. .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
  75. .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
  76. .modulemode = MODULEMODE_HWCTRL,
  77. },
  78. },
  79. };
  80. /* l3_main_1 */
  81. static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
  82. .name = "l3_main_1",
  83. .class = &dra7xx_l3_hwmod_class,
  84. .clkdm_name = "l3main1_clkdm",
  85. .prcm = {
  86. .omap4 = {
  87. .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
  88. .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
  89. },
  90. },
  91. };
  92. /* l3_main_2 */
  93. static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
  94. .name = "l3_main_2",
  95. .class = &dra7xx_l3_hwmod_class,
  96. .clkdm_name = "l3instr_clkdm",
  97. .prcm = {
  98. .omap4 = {
  99. .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
  100. .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
  101. .modulemode = MODULEMODE_HWCTRL,
  102. },
  103. },
  104. };
  105. /*
  106. * 'l4' class
  107. * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
  108. */
  109. static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
  110. .name = "l4",
  111. };
  112. /* l4_cfg */
  113. static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
  114. .name = "l4_cfg",
  115. .class = &dra7xx_l4_hwmod_class,
  116. .clkdm_name = "l4cfg_clkdm",
  117. .prcm = {
  118. .omap4 = {
  119. .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
  120. .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
  121. },
  122. },
  123. };
  124. /* l4_per1 */
  125. static struct omap_hwmod dra7xx_l4_per1_hwmod = {
  126. .name = "l4_per1",
  127. .class = &dra7xx_l4_hwmod_class,
  128. .clkdm_name = "l4per_clkdm",
  129. .prcm = {
  130. .omap4 = {
  131. .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
  132. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  133. },
  134. },
  135. };
  136. /* l4_per2 */
  137. static struct omap_hwmod dra7xx_l4_per2_hwmod = {
  138. .name = "l4_per2",
  139. .class = &dra7xx_l4_hwmod_class,
  140. .clkdm_name = "l4per2_clkdm",
  141. .prcm = {
  142. .omap4 = {
  143. .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
  144. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  145. },
  146. },
  147. };
  148. /* l4_per3 */
  149. static struct omap_hwmod dra7xx_l4_per3_hwmod = {
  150. .name = "l4_per3",
  151. .class = &dra7xx_l4_hwmod_class,
  152. .clkdm_name = "l4per3_clkdm",
  153. .prcm = {
  154. .omap4 = {
  155. .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
  156. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  157. },
  158. },
  159. };
  160. /* l4_wkup */
  161. static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
  162. .name = "l4_wkup",
  163. .class = &dra7xx_l4_hwmod_class,
  164. .clkdm_name = "wkupaon_clkdm",
  165. .prcm = {
  166. .omap4 = {
  167. .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
  168. .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
  169. },
  170. },
  171. };
  172. /*
  173. * 'atl' class
  174. *
  175. */
  176. static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
  177. .name = "atl",
  178. };
  179. /* atl */
  180. static struct omap_hwmod dra7xx_atl_hwmod = {
  181. .name = "atl",
  182. .class = &dra7xx_atl_hwmod_class,
  183. .clkdm_name = "atl_clkdm",
  184. .main_clk = "atl_gfclk_mux",
  185. .prcm = {
  186. .omap4 = {
  187. .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
  188. .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
  189. .modulemode = MODULEMODE_SWCTRL,
  190. },
  191. },
  192. };
  193. /*
  194. * 'bb2d' class
  195. *
  196. */
  197. static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
  198. .name = "bb2d",
  199. };
  200. /* bb2d */
  201. static struct omap_hwmod dra7xx_bb2d_hwmod = {
  202. .name = "bb2d",
  203. .class = &dra7xx_bb2d_hwmod_class,
  204. .clkdm_name = "dss_clkdm",
  205. .main_clk = "dpll_core_h24x2_ck",
  206. .prcm = {
  207. .omap4 = {
  208. .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
  209. .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
  210. .modulemode = MODULEMODE_SWCTRL,
  211. },
  212. },
  213. };
  214. /*
  215. * 'counter' class
  216. *
  217. */
  218. static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
  219. .rev_offs = 0x0000,
  220. .sysc_offs = 0x0010,
  221. .sysc_flags = SYSC_HAS_SIDLEMODE,
  222. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  223. SIDLE_SMART_WKUP),
  224. .sysc_fields = &omap_hwmod_sysc_type1,
  225. };
  226. static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
  227. .name = "counter",
  228. .sysc = &dra7xx_counter_sysc,
  229. };
  230. /* counter_32k */
  231. static struct omap_hwmod dra7xx_counter_32k_hwmod = {
  232. .name = "counter_32k",
  233. .class = &dra7xx_counter_hwmod_class,
  234. .clkdm_name = "wkupaon_clkdm",
  235. .flags = HWMOD_SWSUP_SIDLE,
  236. .main_clk = "wkupaon_iclk_mux",
  237. .prcm = {
  238. .omap4 = {
  239. .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
  240. .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
  241. },
  242. },
  243. };
  244. /*
  245. * 'ctrl_module' class
  246. *
  247. */
  248. static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
  249. .name = "ctrl_module",
  250. };
  251. /* ctrl_module_wkup */
  252. static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
  253. .name = "ctrl_module_wkup",
  254. .class = &dra7xx_ctrl_module_hwmod_class,
  255. .clkdm_name = "wkupaon_clkdm",
  256. .prcm = {
  257. .omap4 = {
  258. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  259. },
  260. },
  261. };
  262. /*
  263. * 'gmac' class
  264. * cpsw/gmac sub system
  265. */
  266. static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = {
  267. .rev_offs = 0x0,
  268. .sysc_offs = 0x8,
  269. .syss_offs = 0x4,
  270. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  271. SYSS_HAS_RESET_STATUS),
  272. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  273. MSTANDBY_NO),
  274. .sysc_fields = &omap_hwmod_sysc_type3,
  275. };
  276. static struct omap_hwmod_class dra7xx_gmac_hwmod_class = {
  277. .name = "gmac",
  278. .sysc = &dra7xx_gmac_sysc,
  279. };
  280. static struct omap_hwmod dra7xx_gmac_hwmod = {
  281. .name = "gmac",
  282. .class = &dra7xx_gmac_hwmod_class,
  283. .clkdm_name = "gmac_clkdm",
  284. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  285. .main_clk = "dpll_gmac_ck",
  286. .mpu_rt_idx = 1,
  287. .prcm = {
  288. .omap4 = {
  289. .clkctrl_offs = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET,
  290. .context_offs = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET,
  291. .modulemode = MODULEMODE_SWCTRL,
  292. },
  293. },
  294. };
  295. /*
  296. * 'mdio' class
  297. */
  298. static struct omap_hwmod_class dra7xx_mdio_hwmod_class = {
  299. .name = "davinci_mdio",
  300. };
  301. static struct omap_hwmod dra7xx_mdio_hwmod = {
  302. .name = "davinci_mdio",
  303. .class = &dra7xx_mdio_hwmod_class,
  304. .clkdm_name = "gmac_clkdm",
  305. .main_clk = "dpll_gmac_ck",
  306. };
  307. /*
  308. * 'dcan' class
  309. *
  310. */
  311. static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
  312. .name = "dcan",
  313. };
  314. /* dcan1 */
  315. static struct omap_hwmod dra7xx_dcan1_hwmod = {
  316. .name = "dcan1",
  317. .class = &dra7xx_dcan_hwmod_class,
  318. .clkdm_name = "wkupaon_clkdm",
  319. .main_clk = "dcan1_sys_clk_mux",
  320. .flags = HWMOD_CLKDM_NOAUTO,
  321. .prcm = {
  322. .omap4 = {
  323. .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
  324. .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
  325. .modulemode = MODULEMODE_SWCTRL,
  326. },
  327. },
  328. };
  329. /* dcan2 */
  330. static struct omap_hwmod dra7xx_dcan2_hwmod = {
  331. .name = "dcan2",
  332. .class = &dra7xx_dcan_hwmod_class,
  333. .clkdm_name = "l4per2_clkdm",
  334. .main_clk = "sys_clkin1",
  335. .flags = HWMOD_CLKDM_NOAUTO,
  336. .prcm = {
  337. .omap4 = {
  338. .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
  339. .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
  340. .modulemode = MODULEMODE_SWCTRL,
  341. },
  342. },
  343. };
  344. /* pwmss */
  345. static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
  346. .rev_offs = 0x0,
  347. .sysc_offs = 0x4,
  348. .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
  349. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  350. .sysc_fields = &omap_hwmod_sysc_type2,
  351. };
  352. /*
  353. * epwmss class
  354. */
  355. static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
  356. .name = "epwmss",
  357. .sysc = &dra7xx_epwmss_sysc,
  358. };
  359. /* epwmss0 */
  360. static struct omap_hwmod dra7xx_epwmss0_hwmod = {
  361. .name = "epwmss0",
  362. .class = &dra7xx_epwmss_hwmod_class,
  363. .clkdm_name = "l4per2_clkdm",
  364. .main_clk = "l4_root_clk_div",
  365. .prcm = {
  366. .omap4 = {
  367. .modulemode = MODULEMODE_SWCTRL,
  368. .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
  369. .context_offs = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
  370. },
  371. },
  372. };
  373. /* epwmss1 */
  374. static struct omap_hwmod dra7xx_epwmss1_hwmod = {
  375. .name = "epwmss1",
  376. .class = &dra7xx_epwmss_hwmod_class,
  377. .clkdm_name = "l4per2_clkdm",
  378. .main_clk = "l4_root_clk_div",
  379. .prcm = {
  380. .omap4 = {
  381. .modulemode = MODULEMODE_SWCTRL,
  382. .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
  383. .context_offs = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
  384. },
  385. },
  386. };
  387. /* epwmss2 */
  388. static struct omap_hwmod dra7xx_epwmss2_hwmod = {
  389. .name = "epwmss2",
  390. .class = &dra7xx_epwmss_hwmod_class,
  391. .clkdm_name = "l4per2_clkdm",
  392. .main_clk = "l4_root_clk_div",
  393. .prcm = {
  394. .omap4 = {
  395. .modulemode = MODULEMODE_SWCTRL,
  396. .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
  397. .context_offs = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
  398. },
  399. },
  400. };
  401. /*
  402. * 'dma' class
  403. *
  404. */
  405. static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
  406. .rev_offs = 0x0000,
  407. .sysc_offs = 0x002c,
  408. .syss_offs = 0x0028,
  409. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  410. SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  411. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  412. SYSS_HAS_RESET_STATUS),
  413. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  414. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  415. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  416. .sysc_fields = &omap_hwmod_sysc_type1,
  417. };
  418. static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
  419. .name = "dma",
  420. .sysc = &dra7xx_dma_sysc,
  421. };
  422. /* dma dev_attr */
  423. static struct omap_dma_dev_attr dma_dev_attr = {
  424. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  425. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  426. .lch_count = 32,
  427. };
  428. /* dma_system */
  429. static struct omap_hwmod dra7xx_dma_system_hwmod = {
  430. .name = "dma_system",
  431. .class = &dra7xx_dma_hwmod_class,
  432. .clkdm_name = "dma_clkdm",
  433. .main_clk = "l3_iclk_div",
  434. .prcm = {
  435. .omap4 = {
  436. .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
  437. .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
  438. },
  439. },
  440. .dev_attr = &dma_dev_attr,
  441. };
  442. /*
  443. * 'tpcc' class
  444. *
  445. */
  446. static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
  447. .name = "tpcc",
  448. };
  449. static struct omap_hwmod dra7xx_tpcc_hwmod = {
  450. .name = "tpcc",
  451. .class = &dra7xx_tpcc_hwmod_class,
  452. .clkdm_name = "l3main1_clkdm",
  453. .main_clk = "l3_iclk_div",
  454. .prcm = {
  455. .omap4 = {
  456. .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
  457. .context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
  458. },
  459. },
  460. };
  461. /*
  462. * 'tptc' class
  463. *
  464. */
  465. static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
  466. .name = "tptc",
  467. };
  468. /* tptc0 */
  469. static struct omap_hwmod dra7xx_tptc0_hwmod = {
  470. .name = "tptc0",
  471. .class = &dra7xx_tptc_hwmod_class,
  472. .clkdm_name = "l3main1_clkdm",
  473. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  474. .main_clk = "l3_iclk_div",
  475. .prcm = {
  476. .omap4 = {
  477. .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
  478. .context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
  479. .modulemode = MODULEMODE_HWCTRL,
  480. },
  481. },
  482. };
  483. /* tptc1 */
  484. static struct omap_hwmod dra7xx_tptc1_hwmod = {
  485. .name = "tptc1",
  486. .class = &dra7xx_tptc_hwmod_class,
  487. .clkdm_name = "l3main1_clkdm",
  488. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  489. .main_clk = "l3_iclk_div",
  490. .prcm = {
  491. .omap4 = {
  492. .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
  493. .context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
  494. .modulemode = MODULEMODE_HWCTRL,
  495. },
  496. },
  497. };
  498. /*
  499. * 'dss' class
  500. *
  501. */
  502. static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
  503. .rev_offs = 0x0000,
  504. .syss_offs = 0x0014,
  505. .sysc_flags = SYSS_HAS_RESET_STATUS,
  506. };
  507. static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
  508. .name = "dss",
  509. .sysc = &dra7xx_dss_sysc,
  510. .reset = omap_dss_reset,
  511. };
  512. /* dss */
  513. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  514. { .role = "dss_clk", .clk = "dss_dss_clk" },
  515. { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
  516. { .role = "32khz_clk", .clk = "dss_32khz_clk" },
  517. { .role = "video2_clk", .clk = "dss_video2_clk" },
  518. { .role = "video1_clk", .clk = "dss_video1_clk" },
  519. { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
  520. { .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
  521. };
  522. static struct omap_hwmod dra7xx_dss_hwmod = {
  523. .name = "dss_core",
  524. .class = &dra7xx_dss_hwmod_class,
  525. .clkdm_name = "dss_clkdm",
  526. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  527. .main_clk = "dss_dss_clk",
  528. .prcm = {
  529. .omap4 = {
  530. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  531. .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
  532. .modulemode = MODULEMODE_SWCTRL,
  533. },
  534. },
  535. .opt_clks = dss_opt_clks,
  536. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  537. };
  538. /*
  539. * 'dispc' class
  540. * display controller
  541. */
  542. static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
  543. .rev_offs = 0x0000,
  544. .sysc_offs = 0x0010,
  545. .syss_offs = 0x0014,
  546. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  547. SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
  548. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  549. SYSS_HAS_RESET_STATUS),
  550. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  551. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  552. .sysc_fields = &omap_hwmod_sysc_type1,
  553. };
  554. static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
  555. .name = "dispc",
  556. .sysc = &dra7xx_dispc_sysc,
  557. };
  558. /* dss_dispc */
  559. /* dss_dispc dev_attr */
  560. static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
  561. .has_framedonetv_irq = 1,
  562. .manager_count = 4,
  563. };
  564. static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
  565. .name = "dss_dispc",
  566. .class = &dra7xx_dispc_hwmod_class,
  567. .clkdm_name = "dss_clkdm",
  568. .main_clk = "dss_dss_clk",
  569. .prcm = {
  570. .omap4 = {
  571. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  572. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  573. },
  574. },
  575. .dev_attr = &dss_dispc_dev_attr,
  576. .parent_hwmod = &dra7xx_dss_hwmod,
  577. };
  578. /*
  579. * 'hdmi' class
  580. * hdmi controller
  581. */
  582. static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
  583. .rev_offs = 0x0000,
  584. .sysc_offs = 0x0010,
  585. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  586. SYSC_HAS_SOFTRESET),
  587. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  588. SIDLE_SMART_WKUP),
  589. .sysc_fields = &omap_hwmod_sysc_type2,
  590. };
  591. static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
  592. .name = "hdmi",
  593. .sysc = &dra7xx_hdmi_sysc,
  594. };
  595. /* dss_hdmi */
  596. static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
  597. { .role = "sys_clk", .clk = "dss_hdmi_clk" },
  598. };
  599. static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
  600. .name = "dss_hdmi",
  601. .class = &dra7xx_hdmi_hwmod_class,
  602. .clkdm_name = "dss_clkdm",
  603. .main_clk = "dss_48mhz_clk",
  604. .prcm = {
  605. .omap4 = {
  606. .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
  607. .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
  608. },
  609. },
  610. .opt_clks = dss_hdmi_opt_clks,
  611. .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
  612. .parent_hwmod = &dra7xx_dss_hwmod,
  613. };
  614. /* AES (the 'P' (public) device) */
  615. static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
  616. .rev_offs = 0x0080,
  617. .sysc_offs = 0x0084,
  618. .syss_offs = 0x0088,
  619. .sysc_flags = SYSS_HAS_RESET_STATUS,
  620. };
  621. static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
  622. .name = "aes",
  623. .sysc = &dra7xx_aes_sysc,
  624. .rev = 2,
  625. };
  626. /* AES1 */
  627. static struct omap_hwmod dra7xx_aes1_hwmod = {
  628. .name = "aes1",
  629. .class = &dra7xx_aes_hwmod_class,
  630. .clkdm_name = "l4sec_clkdm",
  631. .main_clk = "l3_iclk_div",
  632. .prcm = {
  633. .omap4 = {
  634. .clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
  635. .context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
  636. .modulemode = MODULEMODE_HWCTRL,
  637. },
  638. },
  639. };
  640. /* AES2 */
  641. static struct omap_hwmod dra7xx_aes2_hwmod = {
  642. .name = "aes2",
  643. .class = &dra7xx_aes_hwmod_class,
  644. .clkdm_name = "l4sec_clkdm",
  645. .main_clk = "l3_iclk_div",
  646. .prcm = {
  647. .omap4 = {
  648. .clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
  649. .context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
  650. .modulemode = MODULEMODE_HWCTRL,
  651. },
  652. },
  653. };
  654. /* sha0 HIB2 (the 'P' (public) device) */
  655. static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
  656. .rev_offs = 0x100,
  657. .sysc_offs = 0x110,
  658. .syss_offs = 0x114,
  659. .sysc_flags = SYSS_HAS_RESET_STATUS,
  660. };
  661. static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
  662. .name = "sham",
  663. .sysc = &dra7xx_sha0_sysc,
  664. .rev = 2,
  665. };
  666. struct omap_hwmod dra7xx_sha0_hwmod = {
  667. .name = "sham",
  668. .class = &dra7xx_sha0_hwmod_class,
  669. .clkdm_name = "l4sec_clkdm",
  670. .main_clk = "l3_iclk_div",
  671. .prcm = {
  672. .omap4 = {
  673. .clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
  674. .context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
  675. .modulemode = MODULEMODE_HWCTRL,
  676. },
  677. },
  678. };
  679. /*
  680. * 'elm' class
  681. *
  682. */
  683. static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
  684. .rev_offs = 0x0000,
  685. .sysc_offs = 0x0010,
  686. .syss_offs = 0x0014,
  687. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  688. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  689. SYSS_HAS_RESET_STATUS),
  690. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  691. SIDLE_SMART_WKUP),
  692. .sysc_fields = &omap_hwmod_sysc_type1,
  693. };
  694. static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
  695. .name = "elm",
  696. .sysc = &dra7xx_elm_sysc,
  697. };
  698. /* elm */
  699. static struct omap_hwmod dra7xx_elm_hwmod = {
  700. .name = "elm",
  701. .class = &dra7xx_elm_hwmod_class,
  702. .clkdm_name = "l4per_clkdm",
  703. .main_clk = "l3_iclk_div",
  704. .prcm = {
  705. .omap4 = {
  706. .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
  707. .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
  708. },
  709. },
  710. };
  711. /*
  712. * 'gpio' class
  713. *
  714. */
  715. static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
  716. .rev_offs = 0x0000,
  717. .sysc_offs = 0x0010,
  718. .syss_offs = 0x0114,
  719. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  720. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  721. SYSS_HAS_RESET_STATUS),
  722. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  723. SIDLE_SMART_WKUP),
  724. .sysc_fields = &omap_hwmod_sysc_type1,
  725. };
  726. static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
  727. .name = "gpio",
  728. .sysc = &dra7xx_gpio_sysc,
  729. .rev = 2,
  730. };
  731. /* gpio1 */
  732. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  733. { .role = "dbclk", .clk = "gpio1_dbclk" },
  734. };
  735. static struct omap_hwmod dra7xx_gpio1_hwmod = {
  736. .name = "gpio1",
  737. .class = &dra7xx_gpio_hwmod_class,
  738. .clkdm_name = "wkupaon_clkdm",
  739. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  740. .main_clk = "wkupaon_iclk_mux",
  741. .prcm = {
  742. .omap4 = {
  743. .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
  744. .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
  745. .modulemode = MODULEMODE_HWCTRL,
  746. },
  747. },
  748. .opt_clks = gpio1_opt_clks,
  749. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  750. };
  751. /* gpio2 */
  752. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  753. { .role = "dbclk", .clk = "gpio2_dbclk" },
  754. };
  755. static struct omap_hwmod dra7xx_gpio2_hwmod = {
  756. .name = "gpio2",
  757. .class = &dra7xx_gpio_hwmod_class,
  758. .clkdm_name = "l4per_clkdm",
  759. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  760. .main_clk = "l3_iclk_div",
  761. .prcm = {
  762. .omap4 = {
  763. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
  764. .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
  765. .modulemode = MODULEMODE_HWCTRL,
  766. },
  767. },
  768. .opt_clks = gpio2_opt_clks,
  769. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  770. };
  771. /* gpio3 */
  772. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  773. { .role = "dbclk", .clk = "gpio3_dbclk" },
  774. };
  775. static struct omap_hwmod dra7xx_gpio3_hwmod = {
  776. .name = "gpio3",
  777. .class = &dra7xx_gpio_hwmod_class,
  778. .clkdm_name = "l4per_clkdm",
  779. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  780. .main_clk = "l3_iclk_div",
  781. .prcm = {
  782. .omap4 = {
  783. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
  784. .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
  785. .modulemode = MODULEMODE_HWCTRL,
  786. },
  787. },
  788. .opt_clks = gpio3_opt_clks,
  789. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  790. };
  791. /* gpio4 */
  792. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  793. { .role = "dbclk", .clk = "gpio4_dbclk" },
  794. };
  795. static struct omap_hwmod dra7xx_gpio4_hwmod = {
  796. .name = "gpio4",
  797. .class = &dra7xx_gpio_hwmod_class,
  798. .clkdm_name = "l4per_clkdm",
  799. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  800. .main_clk = "l3_iclk_div",
  801. .prcm = {
  802. .omap4 = {
  803. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
  804. .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
  805. .modulemode = MODULEMODE_HWCTRL,
  806. },
  807. },
  808. .opt_clks = gpio4_opt_clks,
  809. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  810. };
  811. /* gpio5 */
  812. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  813. { .role = "dbclk", .clk = "gpio5_dbclk" },
  814. };
  815. static struct omap_hwmod dra7xx_gpio5_hwmod = {
  816. .name = "gpio5",
  817. .class = &dra7xx_gpio_hwmod_class,
  818. .clkdm_name = "l4per_clkdm",
  819. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  820. .main_clk = "l3_iclk_div",
  821. .prcm = {
  822. .omap4 = {
  823. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
  824. .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
  825. .modulemode = MODULEMODE_HWCTRL,
  826. },
  827. },
  828. .opt_clks = gpio5_opt_clks,
  829. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  830. };
  831. /* gpio6 */
  832. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  833. { .role = "dbclk", .clk = "gpio6_dbclk" },
  834. };
  835. static struct omap_hwmod dra7xx_gpio6_hwmod = {
  836. .name = "gpio6",
  837. .class = &dra7xx_gpio_hwmod_class,
  838. .clkdm_name = "l4per_clkdm",
  839. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  840. .main_clk = "l3_iclk_div",
  841. .prcm = {
  842. .omap4 = {
  843. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
  844. .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
  845. .modulemode = MODULEMODE_HWCTRL,
  846. },
  847. },
  848. .opt_clks = gpio6_opt_clks,
  849. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  850. };
  851. /* gpio7 */
  852. static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
  853. { .role = "dbclk", .clk = "gpio7_dbclk" },
  854. };
  855. static struct omap_hwmod dra7xx_gpio7_hwmod = {
  856. .name = "gpio7",
  857. .class = &dra7xx_gpio_hwmod_class,
  858. .clkdm_name = "l4per_clkdm",
  859. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  860. .main_clk = "l3_iclk_div",
  861. .prcm = {
  862. .omap4 = {
  863. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
  864. .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
  865. .modulemode = MODULEMODE_HWCTRL,
  866. },
  867. },
  868. .opt_clks = gpio7_opt_clks,
  869. .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
  870. };
  871. /* gpio8 */
  872. static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
  873. { .role = "dbclk", .clk = "gpio8_dbclk" },
  874. };
  875. static struct omap_hwmod dra7xx_gpio8_hwmod = {
  876. .name = "gpio8",
  877. .class = &dra7xx_gpio_hwmod_class,
  878. .clkdm_name = "l4per_clkdm",
  879. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  880. .main_clk = "l3_iclk_div",
  881. .prcm = {
  882. .omap4 = {
  883. .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
  884. .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
  885. .modulemode = MODULEMODE_HWCTRL,
  886. },
  887. },
  888. .opt_clks = gpio8_opt_clks,
  889. .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
  890. };
  891. /*
  892. * 'gpmc' class
  893. *
  894. */
  895. static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
  896. .rev_offs = 0x0000,
  897. .sysc_offs = 0x0010,
  898. .syss_offs = 0x0014,
  899. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  900. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  901. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  902. .sysc_fields = &omap_hwmod_sysc_type1,
  903. };
  904. static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
  905. .name = "gpmc",
  906. .sysc = &dra7xx_gpmc_sysc,
  907. };
  908. /* gpmc */
  909. static struct omap_hwmod dra7xx_gpmc_hwmod = {
  910. .name = "gpmc",
  911. .class = &dra7xx_gpmc_hwmod_class,
  912. .clkdm_name = "l3main1_clkdm",
  913. /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
  914. .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
  915. .main_clk = "l3_iclk_div",
  916. .prcm = {
  917. .omap4 = {
  918. .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
  919. .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
  920. .modulemode = MODULEMODE_HWCTRL,
  921. },
  922. },
  923. };
  924. /*
  925. * 'hdq1w' class
  926. *
  927. */
  928. static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
  929. .rev_offs = 0x0000,
  930. .sysc_offs = 0x0014,
  931. .syss_offs = 0x0018,
  932. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
  933. SYSS_HAS_RESET_STATUS),
  934. .sysc_fields = &omap_hwmod_sysc_type1,
  935. };
  936. static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
  937. .name = "hdq1w",
  938. .sysc = &dra7xx_hdq1w_sysc,
  939. };
  940. /* hdq1w */
  941. static struct omap_hwmod dra7xx_hdq1w_hwmod = {
  942. .name = "hdq1w",
  943. .class = &dra7xx_hdq1w_hwmod_class,
  944. .clkdm_name = "l4per_clkdm",
  945. .flags = HWMOD_INIT_NO_RESET,
  946. .main_clk = "func_12m_fclk",
  947. .prcm = {
  948. .omap4 = {
  949. .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
  950. .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
  951. .modulemode = MODULEMODE_SWCTRL,
  952. },
  953. },
  954. };
  955. /*
  956. * 'i2c' class
  957. *
  958. */
  959. static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
  960. .sysc_offs = 0x0010,
  961. .syss_offs = 0x0090,
  962. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  963. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  964. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  965. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  966. SIDLE_SMART_WKUP),
  967. .sysc_fields = &omap_hwmod_sysc_type1,
  968. };
  969. static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
  970. .name = "i2c",
  971. .sysc = &dra7xx_i2c_sysc,
  972. .reset = &omap_i2c_reset,
  973. .rev = OMAP_I2C_IP_VERSION_2,
  974. };
  975. /* i2c1 */
  976. static struct omap_hwmod dra7xx_i2c1_hwmod = {
  977. .name = "i2c1",
  978. .class = &dra7xx_i2c_hwmod_class,
  979. .clkdm_name = "l4per_clkdm",
  980. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  981. .main_clk = "func_96m_fclk",
  982. .prcm = {
  983. .omap4 = {
  984. .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
  985. .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
  986. .modulemode = MODULEMODE_SWCTRL,
  987. },
  988. },
  989. };
  990. /* i2c2 */
  991. static struct omap_hwmod dra7xx_i2c2_hwmod = {
  992. .name = "i2c2",
  993. .class = &dra7xx_i2c_hwmod_class,
  994. .clkdm_name = "l4per_clkdm",
  995. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  996. .main_clk = "func_96m_fclk",
  997. .prcm = {
  998. .omap4 = {
  999. .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
  1000. .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
  1001. .modulemode = MODULEMODE_SWCTRL,
  1002. },
  1003. },
  1004. };
  1005. /* i2c3 */
  1006. static struct omap_hwmod dra7xx_i2c3_hwmod = {
  1007. .name = "i2c3",
  1008. .class = &dra7xx_i2c_hwmod_class,
  1009. .clkdm_name = "l4per_clkdm",
  1010. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1011. .main_clk = "func_96m_fclk",
  1012. .prcm = {
  1013. .omap4 = {
  1014. .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
  1015. .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
  1016. .modulemode = MODULEMODE_SWCTRL,
  1017. },
  1018. },
  1019. };
  1020. /* i2c4 */
  1021. static struct omap_hwmod dra7xx_i2c4_hwmod = {
  1022. .name = "i2c4",
  1023. .class = &dra7xx_i2c_hwmod_class,
  1024. .clkdm_name = "l4per_clkdm",
  1025. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1026. .main_clk = "func_96m_fclk",
  1027. .prcm = {
  1028. .omap4 = {
  1029. .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
  1030. .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
  1031. .modulemode = MODULEMODE_SWCTRL,
  1032. },
  1033. },
  1034. };
  1035. /* i2c5 */
  1036. static struct omap_hwmod dra7xx_i2c5_hwmod = {
  1037. .name = "i2c5",
  1038. .class = &dra7xx_i2c_hwmod_class,
  1039. .clkdm_name = "ipu_clkdm",
  1040. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1041. .main_clk = "func_96m_fclk",
  1042. .prcm = {
  1043. .omap4 = {
  1044. .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
  1045. .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
  1046. .modulemode = MODULEMODE_SWCTRL,
  1047. },
  1048. },
  1049. };
  1050. /*
  1051. * 'mailbox' class
  1052. *
  1053. */
  1054. static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
  1055. .rev_offs = 0x0000,
  1056. .sysc_offs = 0x0010,
  1057. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1058. SYSC_HAS_SOFTRESET),
  1059. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1060. .sysc_fields = &omap_hwmod_sysc_type2,
  1061. };
  1062. static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
  1063. .name = "mailbox",
  1064. .sysc = &dra7xx_mailbox_sysc,
  1065. };
  1066. /* mailbox1 */
  1067. static struct omap_hwmod dra7xx_mailbox1_hwmod = {
  1068. .name = "mailbox1",
  1069. .class = &dra7xx_mailbox_hwmod_class,
  1070. .clkdm_name = "l4cfg_clkdm",
  1071. .prcm = {
  1072. .omap4 = {
  1073. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
  1074. .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
  1075. },
  1076. },
  1077. };
  1078. /* mailbox2 */
  1079. static struct omap_hwmod dra7xx_mailbox2_hwmod = {
  1080. .name = "mailbox2",
  1081. .class = &dra7xx_mailbox_hwmod_class,
  1082. .clkdm_name = "l4cfg_clkdm",
  1083. .prcm = {
  1084. .omap4 = {
  1085. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
  1086. .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
  1087. },
  1088. },
  1089. };
  1090. /* mailbox3 */
  1091. static struct omap_hwmod dra7xx_mailbox3_hwmod = {
  1092. .name = "mailbox3",
  1093. .class = &dra7xx_mailbox_hwmod_class,
  1094. .clkdm_name = "l4cfg_clkdm",
  1095. .prcm = {
  1096. .omap4 = {
  1097. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
  1098. .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
  1099. },
  1100. },
  1101. };
  1102. /* mailbox4 */
  1103. static struct omap_hwmod dra7xx_mailbox4_hwmod = {
  1104. .name = "mailbox4",
  1105. .class = &dra7xx_mailbox_hwmod_class,
  1106. .clkdm_name = "l4cfg_clkdm",
  1107. .prcm = {
  1108. .omap4 = {
  1109. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
  1110. .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
  1111. },
  1112. },
  1113. };
  1114. /* mailbox5 */
  1115. static struct omap_hwmod dra7xx_mailbox5_hwmod = {
  1116. .name = "mailbox5",
  1117. .class = &dra7xx_mailbox_hwmod_class,
  1118. .clkdm_name = "l4cfg_clkdm",
  1119. .prcm = {
  1120. .omap4 = {
  1121. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
  1122. .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
  1123. },
  1124. },
  1125. };
  1126. /* mailbox6 */
  1127. static struct omap_hwmod dra7xx_mailbox6_hwmod = {
  1128. .name = "mailbox6",
  1129. .class = &dra7xx_mailbox_hwmod_class,
  1130. .clkdm_name = "l4cfg_clkdm",
  1131. .prcm = {
  1132. .omap4 = {
  1133. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
  1134. .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
  1135. },
  1136. },
  1137. };
  1138. /* mailbox7 */
  1139. static struct omap_hwmod dra7xx_mailbox7_hwmod = {
  1140. .name = "mailbox7",
  1141. .class = &dra7xx_mailbox_hwmod_class,
  1142. .clkdm_name = "l4cfg_clkdm",
  1143. .prcm = {
  1144. .omap4 = {
  1145. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
  1146. .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
  1147. },
  1148. },
  1149. };
  1150. /* mailbox8 */
  1151. static struct omap_hwmod dra7xx_mailbox8_hwmod = {
  1152. .name = "mailbox8",
  1153. .class = &dra7xx_mailbox_hwmod_class,
  1154. .clkdm_name = "l4cfg_clkdm",
  1155. .prcm = {
  1156. .omap4 = {
  1157. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
  1158. .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
  1159. },
  1160. },
  1161. };
  1162. /* mailbox9 */
  1163. static struct omap_hwmod dra7xx_mailbox9_hwmod = {
  1164. .name = "mailbox9",
  1165. .class = &dra7xx_mailbox_hwmod_class,
  1166. .clkdm_name = "l4cfg_clkdm",
  1167. .prcm = {
  1168. .omap4 = {
  1169. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
  1170. .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
  1171. },
  1172. },
  1173. };
  1174. /* mailbox10 */
  1175. static struct omap_hwmod dra7xx_mailbox10_hwmod = {
  1176. .name = "mailbox10",
  1177. .class = &dra7xx_mailbox_hwmod_class,
  1178. .clkdm_name = "l4cfg_clkdm",
  1179. .prcm = {
  1180. .omap4 = {
  1181. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
  1182. .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
  1183. },
  1184. },
  1185. };
  1186. /* mailbox11 */
  1187. static struct omap_hwmod dra7xx_mailbox11_hwmod = {
  1188. .name = "mailbox11",
  1189. .class = &dra7xx_mailbox_hwmod_class,
  1190. .clkdm_name = "l4cfg_clkdm",
  1191. .prcm = {
  1192. .omap4 = {
  1193. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
  1194. .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
  1195. },
  1196. },
  1197. };
  1198. /* mailbox12 */
  1199. static struct omap_hwmod dra7xx_mailbox12_hwmod = {
  1200. .name = "mailbox12",
  1201. .class = &dra7xx_mailbox_hwmod_class,
  1202. .clkdm_name = "l4cfg_clkdm",
  1203. .prcm = {
  1204. .omap4 = {
  1205. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
  1206. .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
  1207. },
  1208. },
  1209. };
  1210. /* mailbox13 */
  1211. static struct omap_hwmod dra7xx_mailbox13_hwmod = {
  1212. .name = "mailbox13",
  1213. .class = &dra7xx_mailbox_hwmod_class,
  1214. .clkdm_name = "l4cfg_clkdm",
  1215. .prcm = {
  1216. .omap4 = {
  1217. .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
  1218. .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
  1219. },
  1220. },
  1221. };
  1222. /*
  1223. * 'mcspi' class
  1224. *
  1225. */
  1226. static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
  1227. .rev_offs = 0x0000,
  1228. .sysc_offs = 0x0010,
  1229. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1230. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1231. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1232. SIDLE_SMART_WKUP),
  1233. .sysc_fields = &omap_hwmod_sysc_type2,
  1234. };
  1235. static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
  1236. .name = "mcspi",
  1237. .sysc = &dra7xx_mcspi_sysc,
  1238. .rev = OMAP4_MCSPI_REV,
  1239. };
  1240. /* mcspi1 */
  1241. /* mcspi1 dev_attr */
  1242. static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
  1243. .num_chipselect = 4,
  1244. };
  1245. static struct omap_hwmod dra7xx_mcspi1_hwmod = {
  1246. .name = "mcspi1",
  1247. .class = &dra7xx_mcspi_hwmod_class,
  1248. .clkdm_name = "l4per_clkdm",
  1249. .main_clk = "func_48m_fclk",
  1250. .prcm = {
  1251. .omap4 = {
  1252. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
  1253. .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
  1254. .modulemode = MODULEMODE_SWCTRL,
  1255. },
  1256. },
  1257. .dev_attr = &mcspi1_dev_attr,
  1258. };
  1259. /* mcspi2 */
  1260. /* mcspi2 dev_attr */
  1261. static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
  1262. .num_chipselect = 2,
  1263. };
  1264. static struct omap_hwmod dra7xx_mcspi2_hwmod = {
  1265. .name = "mcspi2",
  1266. .class = &dra7xx_mcspi_hwmod_class,
  1267. .clkdm_name = "l4per_clkdm",
  1268. .main_clk = "func_48m_fclk",
  1269. .prcm = {
  1270. .omap4 = {
  1271. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
  1272. .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
  1273. .modulemode = MODULEMODE_SWCTRL,
  1274. },
  1275. },
  1276. .dev_attr = &mcspi2_dev_attr,
  1277. };
  1278. /* mcspi3 */
  1279. /* mcspi3 dev_attr */
  1280. static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
  1281. .num_chipselect = 2,
  1282. };
  1283. static struct omap_hwmod dra7xx_mcspi3_hwmod = {
  1284. .name = "mcspi3",
  1285. .class = &dra7xx_mcspi_hwmod_class,
  1286. .clkdm_name = "l4per_clkdm",
  1287. .main_clk = "func_48m_fclk",
  1288. .prcm = {
  1289. .omap4 = {
  1290. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
  1291. .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
  1292. .modulemode = MODULEMODE_SWCTRL,
  1293. },
  1294. },
  1295. .dev_attr = &mcspi3_dev_attr,
  1296. };
  1297. /* mcspi4 */
  1298. /* mcspi4 dev_attr */
  1299. static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
  1300. .num_chipselect = 1,
  1301. };
  1302. static struct omap_hwmod dra7xx_mcspi4_hwmod = {
  1303. .name = "mcspi4",
  1304. .class = &dra7xx_mcspi_hwmod_class,
  1305. .clkdm_name = "l4per_clkdm",
  1306. .main_clk = "func_48m_fclk",
  1307. .prcm = {
  1308. .omap4 = {
  1309. .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
  1310. .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
  1311. .modulemode = MODULEMODE_SWCTRL,
  1312. },
  1313. },
  1314. .dev_attr = &mcspi4_dev_attr,
  1315. };
  1316. /*
  1317. * 'mcasp' class
  1318. *
  1319. */
  1320. static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = {
  1321. .sysc_offs = 0x0004,
  1322. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1323. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1324. .sysc_fields = &omap_hwmod_sysc_type3,
  1325. };
  1326. static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = {
  1327. .name = "mcasp",
  1328. .sysc = &dra7xx_mcasp_sysc,
  1329. };
  1330. /* mcasp1 */
  1331. static struct omap_hwmod_opt_clk mcasp1_opt_clks[] = {
  1332. { .role = "ahclkx", .clk = "mcasp1_ahclkx_mux" },
  1333. { .role = "ahclkr", .clk = "mcasp1_ahclkr_mux" },
  1334. };
  1335. static struct omap_hwmod dra7xx_mcasp1_hwmod = {
  1336. .name = "mcasp1",
  1337. .class = &dra7xx_mcasp_hwmod_class,
  1338. .clkdm_name = "ipu_clkdm",
  1339. .main_clk = "mcasp1_aux_gfclk_mux",
  1340. .flags = HWMOD_OPT_CLKS_NEEDED,
  1341. .prcm = {
  1342. .omap4 = {
  1343. .clkctrl_offs = DRA7XX_CM_IPU_MCASP1_CLKCTRL_OFFSET,
  1344. .context_offs = DRA7XX_RM_IPU_MCASP1_CONTEXT_OFFSET,
  1345. .modulemode = MODULEMODE_SWCTRL,
  1346. },
  1347. },
  1348. .opt_clks = mcasp1_opt_clks,
  1349. .opt_clks_cnt = ARRAY_SIZE(mcasp1_opt_clks),
  1350. };
  1351. /* mcasp2 */
  1352. static struct omap_hwmod_opt_clk mcasp2_opt_clks[] = {
  1353. { .role = "ahclkx", .clk = "mcasp2_ahclkx_mux" },
  1354. { .role = "ahclkr", .clk = "mcasp2_ahclkr_mux" },
  1355. };
  1356. static struct omap_hwmod dra7xx_mcasp2_hwmod = {
  1357. .name = "mcasp2",
  1358. .class = &dra7xx_mcasp_hwmod_class,
  1359. .clkdm_name = "l4per2_clkdm",
  1360. .main_clk = "mcasp2_aux_gfclk_mux",
  1361. .flags = HWMOD_OPT_CLKS_NEEDED,
  1362. .prcm = {
  1363. .omap4 = {
  1364. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP2_CLKCTRL_OFFSET,
  1365. .context_offs = DRA7XX_RM_L4PER2_MCASP2_CONTEXT_OFFSET,
  1366. .modulemode = MODULEMODE_SWCTRL,
  1367. },
  1368. },
  1369. .opt_clks = mcasp2_opt_clks,
  1370. .opt_clks_cnt = ARRAY_SIZE(mcasp2_opt_clks),
  1371. };
  1372. /* mcasp3 */
  1373. static struct omap_hwmod_opt_clk mcasp3_opt_clks[] = {
  1374. { .role = "ahclkx", .clk = "mcasp3_ahclkx_mux" },
  1375. };
  1376. static struct omap_hwmod dra7xx_mcasp3_hwmod = {
  1377. .name = "mcasp3",
  1378. .class = &dra7xx_mcasp_hwmod_class,
  1379. .clkdm_name = "l4per2_clkdm",
  1380. .main_clk = "mcasp3_aux_gfclk_mux",
  1381. .flags = HWMOD_OPT_CLKS_NEEDED,
  1382. .prcm = {
  1383. .omap4 = {
  1384. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
  1385. .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET,
  1386. .modulemode = MODULEMODE_SWCTRL,
  1387. },
  1388. },
  1389. .opt_clks = mcasp3_opt_clks,
  1390. .opt_clks_cnt = ARRAY_SIZE(mcasp3_opt_clks),
  1391. };
  1392. /* mcasp4 */
  1393. static struct omap_hwmod_opt_clk mcasp4_opt_clks[] = {
  1394. { .role = "ahclkx", .clk = "mcasp4_ahclkx_mux" },
  1395. };
  1396. static struct omap_hwmod dra7xx_mcasp4_hwmod = {
  1397. .name = "mcasp4",
  1398. .class = &dra7xx_mcasp_hwmod_class,
  1399. .clkdm_name = "l4per2_clkdm",
  1400. .main_clk = "mcasp4_aux_gfclk_mux",
  1401. .flags = HWMOD_OPT_CLKS_NEEDED,
  1402. .prcm = {
  1403. .omap4 = {
  1404. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP4_CLKCTRL_OFFSET,
  1405. .context_offs = DRA7XX_RM_L4PER2_MCASP4_CONTEXT_OFFSET,
  1406. .modulemode = MODULEMODE_SWCTRL,
  1407. },
  1408. },
  1409. .opt_clks = mcasp4_opt_clks,
  1410. .opt_clks_cnt = ARRAY_SIZE(mcasp4_opt_clks),
  1411. };
  1412. /* mcasp5 */
  1413. static struct omap_hwmod_opt_clk mcasp5_opt_clks[] = {
  1414. { .role = "ahclkx", .clk = "mcasp5_ahclkx_mux" },
  1415. };
  1416. static struct omap_hwmod dra7xx_mcasp5_hwmod = {
  1417. .name = "mcasp5",
  1418. .class = &dra7xx_mcasp_hwmod_class,
  1419. .clkdm_name = "l4per2_clkdm",
  1420. .main_clk = "mcasp5_aux_gfclk_mux",
  1421. .flags = HWMOD_OPT_CLKS_NEEDED,
  1422. .prcm = {
  1423. .omap4 = {
  1424. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP5_CLKCTRL_OFFSET,
  1425. .context_offs = DRA7XX_RM_L4PER2_MCASP5_CONTEXT_OFFSET,
  1426. .modulemode = MODULEMODE_SWCTRL,
  1427. },
  1428. },
  1429. .opt_clks = mcasp5_opt_clks,
  1430. .opt_clks_cnt = ARRAY_SIZE(mcasp5_opt_clks),
  1431. };
  1432. /* mcasp6 */
  1433. static struct omap_hwmod_opt_clk mcasp6_opt_clks[] = {
  1434. { .role = "ahclkx", .clk = "mcasp6_ahclkx_mux" },
  1435. };
  1436. static struct omap_hwmod dra7xx_mcasp6_hwmod = {
  1437. .name = "mcasp6",
  1438. .class = &dra7xx_mcasp_hwmod_class,
  1439. .clkdm_name = "l4per2_clkdm",
  1440. .main_clk = "mcasp6_aux_gfclk_mux",
  1441. .flags = HWMOD_OPT_CLKS_NEEDED,
  1442. .prcm = {
  1443. .omap4 = {
  1444. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP6_CLKCTRL_OFFSET,
  1445. .context_offs = DRA7XX_RM_L4PER2_MCASP6_CONTEXT_OFFSET,
  1446. .modulemode = MODULEMODE_SWCTRL,
  1447. },
  1448. },
  1449. .opt_clks = mcasp6_opt_clks,
  1450. .opt_clks_cnt = ARRAY_SIZE(mcasp6_opt_clks),
  1451. };
  1452. /* mcasp7 */
  1453. static struct omap_hwmod_opt_clk mcasp7_opt_clks[] = {
  1454. { .role = "ahclkx", .clk = "mcasp7_ahclkx_mux" },
  1455. };
  1456. static struct omap_hwmod dra7xx_mcasp7_hwmod = {
  1457. .name = "mcasp7",
  1458. .class = &dra7xx_mcasp_hwmod_class,
  1459. .clkdm_name = "l4per2_clkdm",
  1460. .main_clk = "mcasp7_aux_gfclk_mux",
  1461. .flags = HWMOD_OPT_CLKS_NEEDED,
  1462. .prcm = {
  1463. .omap4 = {
  1464. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP7_CLKCTRL_OFFSET,
  1465. .context_offs = DRA7XX_RM_L4PER2_MCASP7_CONTEXT_OFFSET,
  1466. .modulemode = MODULEMODE_SWCTRL,
  1467. },
  1468. },
  1469. .opt_clks = mcasp7_opt_clks,
  1470. .opt_clks_cnt = ARRAY_SIZE(mcasp7_opt_clks),
  1471. };
  1472. /* mcasp8 */
  1473. static struct omap_hwmod_opt_clk mcasp8_opt_clks[] = {
  1474. { .role = "ahclkx", .clk = "mcasp8_ahclkx_mux" },
  1475. };
  1476. static struct omap_hwmod dra7xx_mcasp8_hwmod = {
  1477. .name = "mcasp8",
  1478. .class = &dra7xx_mcasp_hwmod_class,
  1479. .clkdm_name = "l4per2_clkdm",
  1480. .main_clk = "mcasp8_aux_gfclk_mux",
  1481. .flags = HWMOD_OPT_CLKS_NEEDED,
  1482. .prcm = {
  1483. .omap4 = {
  1484. .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP8_CLKCTRL_OFFSET,
  1485. .context_offs = DRA7XX_RM_L4PER2_MCASP8_CONTEXT_OFFSET,
  1486. .modulemode = MODULEMODE_SWCTRL,
  1487. },
  1488. },
  1489. .opt_clks = mcasp8_opt_clks,
  1490. .opt_clks_cnt = ARRAY_SIZE(mcasp8_opt_clks),
  1491. };
  1492. /*
  1493. * 'mmc' class
  1494. *
  1495. */
  1496. static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
  1497. .rev_offs = 0x0000,
  1498. .sysc_offs = 0x0010,
  1499. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
  1500. SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1501. SYSC_HAS_SOFTRESET),
  1502. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1503. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1504. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1505. .sysc_fields = &omap_hwmod_sysc_type2,
  1506. };
  1507. static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
  1508. .name = "mmc",
  1509. .sysc = &dra7xx_mmc_sysc,
  1510. };
  1511. /* mmc1 */
  1512. static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
  1513. { .role = "clk32k", .clk = "mmc1_clk32k" },
  1514. };
  1515. /* mmc1 dev_attr */
  1516. static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
  1517. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1518. };
  1519. static struct omap_hwmod dra7xx_mmc1_hwmod = {
  1520. .name = "mmc1",
  1521. .class = &dra7xx_mmc_hwmod_class,
  1522. .clkdm_name = "l3init_clkdm",
  1523. .main_clk = "mmc1_fclk_div",
  1524. .prcm = {
  1525. .omap4 = {
  1526. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
  1527. .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
  1528. .modulemode = MODULEMODE_SWCTRL,
  1529. },
  1530. },
  1531. .opt_clks = mmc1_opt_clks,
  1532. .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
  1533. .dev_attr = &mmc1_dev_attr,
  1534. };
  1535. /* mmc2 */
  1536. static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
  1537. { .role = "clk32k", .clk = "mmc2_clk32k" },
  1538. };
  1539. static struct omap_hwmod dra7xx_mmc2_hwmod = {
  1540. .name = "mmc2",
  1541. .class = &dra7xx_mmc_hwmod_class,
  1542. .clkdm_name = "l3init_clkdm",
  1543. .main_clk = "mmc2_fclk_div",
  1544. .prcm = {
  1545. .omap4 = {
  1546. .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
  1547. .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
  1548. .modulemode = MODULEMODE_SWCTRL,
  1549. },
  1550. },
  1551. .opt_clks = mmc2_opt_clks,
  1552. .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
  1553. };
  1554. /* mmc3 */
  1555. static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
  1556. { .role = "clk32k", .clk = "mmc3_clk32k" },
  1557. };
  1558. static struct omap_hwmod dra7xx_mmc3_hwmod = {
  1559. .name = "mmc3",
  1560. .class = &dra7xx_mmc_hwmod_class,
  1561. .clkdm_name = "l4per_clkdm",
  1562. .main_clk = "mmc3_gfclk_div",
  1563. .prcm = {
  1564. .omap4 = {
  1565. .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
  1566. .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
  1567. .modulemode = MODULEMODE_SWCTRL,
  1568. },
  1569. },
  1570. .opt_clks = mmc3_opt_clks,
  1571. .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
  1572. };
  1573. /* mmc4 */
  1574. static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
  1575. { .role = "clk32k", .clk = "mmc4_clk32k" },
  1576. };
  1577. static struct omap_hwmod dra7xx_mmc4_hwmod = {
  1578. .name = "mmc4",
  1579. .class = &dra7xx_mmc_hwmod_class,
  1580. .clkdm_name = "l4per_clkdm",
  1581. .main_clk = "mmc4_gfclk_div",
  1582. .prcm = {
  1583. .omap4 = {
  1584. .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
  1585. .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
  1586. .modulemode = MODULEMODE_SWCTRL,
  1587. },
  1588. },
  1589. .opt_clks = mmc4_opt_clks,
  1590. .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
  1591. };
  1592. /*
  1593. * 'mpu' class
  1594. *
  1595. */
  1596. static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
  1597. .name = "mpu",
  1598. };
  1599. /* mpu */
  1600. static struct omap_hwmod dra7xx_mpu_hwmod = {
  1601. .name = "mpu",
  1602. .class = &dra7xx_mpu_hwmod_class,
  1603. .clkdm_name = "mpu_clkdm",
  1604. .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
  1605. .main_clk = "dpll_mpu_m2_ck",
  1606. .prcm = {
  1607. .omap4 = {
  1608. .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  1609. .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
  1610. },
  1611. },
  1612. };
  1613. /*
  1614. * 'ocp2scp' class
  1615. *
  1616. */
  1617. static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
  1618. .rev_offs = 0x0000,
  1619. .sysc_offs = 0x0010,
  1620. .syss_offs = 0x0014,
  1621. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1622. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1623. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1624. .sysc_fields = &omap_hwmod_sysc_type1,
  1625. };
  1626. static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
  1627. .name = "ocp2scp",
  1628. .sysc = &dra7xx_ocp2scp_sysc,
  1629. };
  1630. /* ocp2scp1 */
  1631. static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
  1632. .name = "ocp2scp1",
  1633. .class = &dra7xx_ocp2scp_hwmod_class,
  1634. .clkdm_name = "l3init_clkdm",
  1635. .main_clk = "l4_root_clk_div",
  1636. .prcm = {
  1637. .omap4 = {
  1638. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
  1639. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
  1640. .modulemode = MODULEMODE_HWCTRL,
  1641. },
  1642. },
  1643. };
  1644. /* ocp2scp3 */
  1645. static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
  1646. .name = "ocp2scp3",
  1647. .class = &dra7xx_ocp2scp_hwmod_class,
  1648. .clkdm_name = "l3init_clkdm",
  1649. .main_clk = "l4_root_clk_div",
  1650. .prcm = {
  1651. .omap4 = {
  1652. .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
  1653. .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
  1654. .modulemode = MODULEMODE_HWCTRL,
  1655. },
  1656. },
  1657. };
  1658. /*
  1659. * 'PCIE' class
  1660. *
  1661. */
  1662. /*
  1663. * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
  1664. * functionality of OMAP HWMOD layer does not deassert the hardreset lines
  1665. * associated with an IP automatically leaving the driver to handle that
  1666. * by itself. This does not work for PCIeSS which needs the reset lines
  1667. * deasserted for the driver to start accessing registers.
  1668. *
  1669. * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
  1670. * lines after asserting them.
  1671. */
  1672. static int dra7xx_pciess_reset(struct omap_hwmod *oh)
  1673. {
  1674. int i;
  1675. for (i = 0; i < oh->rst_lines_cnt; i++) {
  1676. omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
  1677. omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
  1678. }
  1679. return 0;
  1680. }
  1681. static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
  1682. .name = "pcie",
  1683. .reset = dra7xx_pciess_reset,
  1684. };
  1685. /* pcie1 */
  1686. static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
  1687. { .name = "pcie", .rst_shift = 0 },
  1688. };
  1689. static struct omap_hwmod dra7xx_pciess1_hwmod = {
  1690. .name = "pcie1",
  1691. .class = &dra7xx_pciess_hwmod_class,
  1692. .clkdm_name = "pcie_clkdm",
  1693. .rst_lines = dra7xx_pciess1_resets,
  1694. .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets),
  1695. .main_clk = "l4_root_clk_div",
  1696. .prcm = {
  1697. .omap4 = {
  1698. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
  1699. .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
  1700. .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
  1701. .modulemode = MODULEMODE_SWCTRL,
  1702. },
  1703. },
  1704. };
  1705. /* pcie2 */
  1706. static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
  1707. { .name = "pcie", .rst_shift = 1 },
  1708. };
  1709. /* pcie2 */
  1710. static struct omap_hwmod dra7xx_pciess2_hwmod = {
  1711. .name = "pcie2",
  1712. .class = &dra7xx_pciess_hwmod_class,
  1713. .clkdm_name = "pcie_clkdm",
  1714. .rst_lines = dra7xx_pciess2_resets,
  1715. .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets),
  1716. .main_clk = "l4_root_clk_div",
  1717. .prcm = {
  1718. .omap4 = {
  1719. .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
  1720. .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
  1721. .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
  1722. .modulemode = MODULEMODE_SWCTRL,
  1723. },
  1724. },
  1725. };
  1726. /*
  1727. * 'qspi' class
  1728. *
  1729. */
  1730. static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
  1731. .sysc_offs = 0x0010,
  1732. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1733. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1734. SIDLE_SMART_WKUP),
  1735. .sysc_fields = &omap_hwmod_sysc_type2,
  1736. };
  1737. static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
  1738. .name = "qspi",
  1739. .sysc = &dra7xx_qspi_sysc,
  1740. };
  1741. /* qspi */
  1742. static struct omap_hwmod dra7xx_qspi_hwmod = {
  1743. .name = "qspi",
  1744. .class = &dra7xx_qspi_hwmod_class,
  1745. .clkdm_name = "l4per2_clkdm",
  1746. .main_clk = "qspi_gfclk_div",
  1747. .prcm = {
  1748. .omap4 = {
  1749. .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
  1750. .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
  1751. .modulemode = MODULEMODE_SWCTRL,
  1752. },
  1753. },
  1754. };
  1755. /*
  1756. * 'rtcss' class
  1757. *
  1758. */
  1759. static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
  1760. .sysc_offs = 0x0078,
  1761. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1762. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1763. SIDLE_SMART_WKUP),
  1764. .sysc_fields = &omap_hwmod_sysc_type3,
  1765. };
  1766. static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
  1767. .name = "rtcss",
  1768. .sysc = &dra7xx_rtcss_sysc,
  1769. .unlock = &omap_hwmod_rtc_unlock,
  1770. .lock = &omap_hwmod_rtc_lock,
  1771. };
  1772. /* rtcss */
  1773. static struct omap_hwmod dra7xx_rtcss_hwmod = {
  1774. .name = "rtcss",
  1775. .class = &dra7xx_rtcss_hwmod_class,
  1776. .clkdm_name = "rtc_clkdm",
  1777. .main_clk = "sys_32k_ck",
  1778. .prcm = {
  1779. .omap4 = {
  1780. .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
  1781. .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
  1782. .modulemode = MODULEMODE_SWCTRL,
  1783. },
  1784. },
  1785. };
  1786. /*
  1787. * 'sata' class
  1788. *
  1789. */
  1790. static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
  1791. .sysc_offs = 0x0000,
  1792. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
  1793. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1794. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  1795. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  1796. .sysc_fields = &omap_hwmod_sysc_type2,
  1797. };
  1798. static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
  1799. .name = "sata",
  1800. .sysc = &dra7xx_sata_sysc,
  1801. };
  1802. /* sata */
  1803. static struct omap_hwmod dra7xx_sata_hwmod = {
  1804. .name = "sata",
  1805. .class = &dra7xx_sata_hwmod_class,
  1806. .clkdm_name = "l3init_clkdm",
  1807. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1808. .main_clk = "func_48m_fclk",
  1809. .mpu_rt_idx = 1,
  1810. .prcm = {
  1811. .omap4 = {
  1812. .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
  1813. .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
  1814. .modulemode = MODULEMODE_SWCTRL,
  1815. },
  1816. },
  1817. };
  1818. /*
  1819. * 'smartreflex' class
  1820. *
  1821. */
  1822. /* The IP is not compliant to type1 / type2 scheme */
  1823. static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
  1824. .sysc_offs = 0x0038,
  1825. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
  1826. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1827. SIDLE_SMART_WKUP),
  1828. .sysc_fields = &omap36xx_sr_sysc_fields,
  1829. };
  1830. static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
  1831. .name = "smartreflex",
  1832. .sysc = &dra7xx_smartreflex_sysc,
  1833. .rev = 2,
  1834. };
  1835. /* smartreflex_core */
  1836. /* smartreflex_core dev_attr */
  1837. static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
  1838. .sensor_voltdm_name = "core",
  1839. };
  1840. static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
  1841. .name = "smartreflex_core",
  1842. .class = &dra7xx_smartreflex_hwmod_class,
  1843. .clkdm_name = "coreaon_clkdm",
  1844. .main_clk = "wkupaon_iclk_mux",
  1845. .prcm = {
  1846. .omap4 = {
  1847. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
  1848. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
  1849. .modulemode = MODULEMODE_SWCTRL,
  1850. },
  1851. },
  1852. .dev_attr = &smartreflex_core_dev_attr,
  1853. };
  1854. /* smartreflex_mpu */
  1855. /* smartreflex_mpu dev_attr */
  1856. static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
  1857. .sensor_voltdm_name = "mpu",
  1858. };
  1859. static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
  1860. .name = "smartreflex_mpu",
  1861. .class = &dra7xx_smartreflex_hwmod_class,
  1862. .clkdm_name = "coreaon_clkdm",
  1863. .main_clk = "wkupaon_iclk_mux",
  1864. .prcm = {
  1865. .omap4 = {
  1866. .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
  1867. .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
  1868. .modulemode = MODULEMODE_SWCTRL,
  1869. },
  1870. },
  1871. .dev_attr = &smartreflex_mpu_dev_attr,
  1872. };
  1873. /*
  1874. * 'spinlock' class
  1875. *
  1876. */
  1877. static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
  1878. .rev_offs = 0x0000,
  1879. .sysc_offs = 0x0010,
  1880. .syss_offs = 0x0014,
  1881. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  1882. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1883. SYSS_HAS_RESET_STATUS),
  1884. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1885. .sysc_fields = &omap_hwmod_sysc_type1,
  1886. };
  1887. static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
  1888. .name = "spinlock",
  1889. .sysc = &dra7xx_spinlock_sysc,
  1890. };
  1891. /* spinlock */
  1892. static struct omap_hwmod dra7xx_spinlock_hwmod = {
  1893. .name = "spinlock",
  1894. .class = &dra7xx_spinlock_hwmod_class,
  1895. .clkdm_name = "l4cfg_clkdm",
  1896. .main_clk = "l3_iclk_div",
  1897. .prcm = {
  1898. .omap4 = {
  1899. .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
  1900. .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
  1901. },
  1902. },
  1903. };
  1904. /*
  1905. * 'timer' class
  1906. *
  1907. * This class contains several variants: ['timer_1ms', 'timer_secure',
  1908. * 'timer']
  1909. */
  1910. static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
  1911. .rev_offs = 0x0000,
  1912. .sysc_offs = 0x0010,
  1913. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1914. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1915. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1916. SIDLE_SMART_WKUP),
  1917. .sysc_fields = &omap_hwmod_sysc_type2,
  1918. };
  1919. static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
  1920. .name = "timer",
  1921. .sysc = &dra7xx_timer_1ms_sysc,
  1922. };
  1923. static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
  1924. .rev_offs = 0x0000,
  1925. .sysc_offs = 0x0010,
  1926. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
  1927. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1928. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1929. SIDLE_SMART_WKUP),
  1930. .sysc_fields = &omap_hwmod_sysc_type2,
  1931. };
  1932. static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
  1933. .name = "timer",
  1934. .sysc = &dra7xx_timer_sysc,
  1935. };
  1936. /* timer1 */
  1937. static struct omap_hwmod dra7xx_timer1_hwmod = {
  1938. .name = "timer1",
  1939. .class = &dra7xx_timer_1ms_hwmod_class,
  1940. .clkdm_name = "wkupaon_clkdm",
  1941. .main_clk = "timer1_gfclk_mux",
  1942. .prcm = {
  1943. .omap4 = {
  1944. .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
  1945. .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
  1946. .modulemode = MODULEMODE_SWCTRL,
  1947. },
  1948. },
  1949. };
  1950. /* timer2 */
  1951. static struct omap_hwmod dra7xx_timer2_hwmod = {
  1952. .name = "timer2",
  1953. .class = &dra7xx_timer_1ms_hwmod_class,
  1954. .clkdm_name = "l4per_clkdm",
  1955. .main_clk = "timer2_gfclk_mux",
  1956. .prcm = {
  1957. .omap4 = {
  1958. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
  1959. .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
  1960. .modulemode = MODULEMODE_SWCTRL,
  1961. },
  1962. },
  1963. };
  1964. /* timer3 */
  1965. static struct omap_hwmod dra7xx_timer3_hwmod = {
  1966. .name = "timer3",
  1967. .class = &dra7xx_timer_hwmod_class,
  1968. .clkdm_name = "l4per_clkdm",
  1969. .main_clk = "timer3_gfclk_mux",
  1970. .prcm = {
  1971. .omap4 = {
  1972. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
  1973. .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
  1974. .modulemode = MODULEMODE_SWCTRL,
  1975. },
  1976. },
  1977. };
  1978. /* timer4 */
  1979. static struct omap_hwmod dra7xx_timer4_hwmod = {
  1980. .name = "timer4",
  1981. .class = &dra7xx_timer_hwmod_class,
  1982. .clkdm_name = "l4per_clkdm",
  1983. .main_clk = "timer4_gfclk_mux",
  1984. .prcm = {
  1985. .omap4 = {
  1986. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
  1987. .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
  1988. .modulemode = MODULEMODE_SWCTRL,
  1989. },
  1990. },
  1991. };
  1992. /* timer5 */
  1993. static struct omap_hwmod dra7xx_timer5_hwmod = {
  1994. .name = "timer5",
  1995. .class = &dra7xx_timer_hwmod_class,
  1996. .clkdm_name = "ipu_clkdm",
  1997. .main_clk = "timer5_gfclk_mux",
  1998. .prcm = {
  1999. .omap4 = {
  2000. .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
  2001. .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
  2002. .modulemode = MODULEMODE_SWCTRL,
  2003. },
  2004. },
  2005. };
  2006. /* timer6 */
  2007. static struct omap_hwmod dra7xx_timer6_hwmod = {
  2008. .name = "timer6",
  2009. .class = &dra7xx_timer_hwmod_class,
  2010. .clkdm_name = "ipu_clkdm",
  2011. .main_clk = "timer6_gfclk_mux",
  2012. .prcm = {
  2013. .omap4 = {
  2014. .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
  2015. .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
  2016. .modulemode = MODULEMODE_SWCTRL,
  2017. },
  2018. },
  2019. };
  2020. /* timer7 */
  2021. static struct omap_hwmod dra7xx_timer7_hwmod = {
  2022. .name = "timer7",
  2023. .class = &dra7xx_timer_hwmod_class,
  2024. .clkdm_name = "ipu_clkdm",
  2025. .main_clk = "timer7_gfclk_mux",
  2026. .prcm = {
  2027. .omap4 = {
  2028. .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
  2029. .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
  2030. .modulemode = MODULEMODE_SWCTRL,
  2031. },
  2032. },
  2033. };
  2034. /* timer8 */
  2035. static struct omap_hwmod dra7xx_timer8_hwmod = {
  2036. .name = "timer8",
  2037. .class = &dra7xx_timer_hwmod_class,
  2038. .clkdm_name = "ipu_clkdm",
  2039. .main_clk = "timer8_gfclk_mux",
  2040. .prcm = {
  2041. .omap4 = {
  2042. .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
  2043. .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
  2044. .modulemode = MODULEMODE_SWCTRL,
  2045. },
  2046. },
  2047. };
  2048. /* timer9 */
  2049. static struct omap_hwmod dra7xx_timer9_hwmod = {
  2050. .name = "timer9",
  2051. .class = &dra7xx_timer_hwmod_class,
  2052. .clkdm_name = "l4per_clkdm",
  2053. .main_clk = "timer9_gfclk_mux",
  2054. .prcm = {
  2055. .omap4 = {
  2056. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
  2057. .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
  2058. .modulemode = MODULEMODE_SWCTRL,
  2059. },
  2060. },
  2061. };
  2062. /* timer10 */
  2063. static struct omap_hwmod dra7xx_timer10_hwmod = {
  2064. .name = "timer10",
  2065. .class = &dra7xx_timer_1ms_hwmod_class,
  2066. .clkdm_name = "l4per_clkdm",
  2067. .main_clk = "timer10_gfclk_mux",
  2068. .prcm = {
  2069. .omap4 = {
  2070. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
  2071. .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
  2072. .modulemode = MODULEMODE_SWCTRL,
  2073. },
  2074. },
  2075. };
  2076. /* timer11 */
  2077. static struct omap_hwmod dra7xx_timer11_hwmod = {
  2078. .name = "timer11",
  2079. .class = &dra7xx_timer_hwmod_class,
  2080. .clkdm_name = "l4per_clkdm",
  2081. .main_clk = "timer11_gfclk_mux",
  2082. .prcm = {
  2083. .omap4 = {
  2084. .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
  2085. .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
  2086. .modulemode = MODULEMODE_SWCTRL,
  2087. },
  2088. },
  2089. };
  2090. /* timer12 */
  2091. static struct omap_hwmod dra7xx_timer12_hwmod = {
  2092. .name = "timer12",
  2093. .class = &dra7xx_timer_hwmod_class,
  2094. .clkdm_name = "wkupaon_clkdm",
  2095. .main_clk = "secure_32k_clk_src_ck",
  2096. .prcm = {
  2097. .omap4 = {
  2098. .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
  2099. .context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
  2100. },
  2101. },
  2102. };
  2103. /* timer13 */
  2104. static struct omap_hwmod dra7xx_timer13_hwmod = {
  2105. .name = "timer13",
  2106. .class = &dra7xx_timer_hwmod_class,
  2107. .clkdm_name = "l4per3_clkdm",
  2108. .main_clk = "timer13_gfclk_mux",
  2109. .prcm = {
  2110. .omap4 = {
  2111. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
  2112. .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
  2113. .modulemode = MODULEMODE_SWCTRL,
  2114. },
  2115. },
  2116. };
  2117. /* timer14 */
  2118. static struct omap_hwmod dra7xx_timer14_hwmod = {
  2119. .name = "timer14",
  2120. .class = &dra7xx_timer_hwmod_class,
  2121. .clkdm_name = "l4per3_clkdm",
  2122. .main_clk = "timer14_gfclk_mux",
  2123. .prcm = {
  2124. .omap4 = {
  2125. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
  2126. .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
  2127. .modulemode = MODULEMODE_SWCTRL,
  2128. },
  2129. },
  2130. };
  2131. /* timer15 */
  2132. static struct omap_hwmod dra7xx_timer15_hwmod = {
  2133. .name = "timer15",
  2134. .class = &dra7xx_timer_hwmod_class,
  2135. .clkdm_name = "l4per3_clkdm",
  2136. .main_clk = "timer15_gfclk_mux",
  2137. .prcm = {
  2138. .omap4 = {
  2139. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
  2140. .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
  2141. .modulemode = MODULEMODE_SWCTRL,
  2142. },
  2143. },
  2144. };
  2145. /* timer16 */
  2146. static struct omap_hwmod dra7xx_timer16_hwmod = {
  2147. .name = "timer16",
  2148. .class = &dra7xx_timer_hwmod_class,
  2149. .clkdm_name = "l4per3_clkdm",
  2150. .main_clk = "timer16_gfclk_mux",
  2151. .prcm = {
  2152. .omap4 = {
  2153. .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
  2154. .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
  2155. .modulemode = MODULEMODE_SWCTRL,
  2156. },
  2157. },
  2158. };
  2159. /*
  2160. * 'uart' class
  2161. *
  2162. */
  2163. static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
  2164. .rev_offs = 0x0050,
  2165. .sysc_offs = 0x0054,
  2166. .syss_offs = 0x0058,
  2167. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  2168. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  2169. SYSS_HAS_RESET_STATUS),
  2170. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2171. SIDLE_SMART_WKUP),
  2172. .sysc_fields = &omap_hwmod_sysc_type1,
  2173. };
  2174. static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
  2175. .name = "uart",
  2176. .sysc = &dra7xx_uart_sysc,
  2177. };
  2178. /* uart1 */
  2179. static struct omap_hwmod dra7xx_uart1_hwmod = {
  2180. .name = "uart1",
  2181. .class = &dra7xx_uart_hwmod_class,
  2182. .clkdm_name = "l4per_clkdm",
  2183. .main_clk = "uart1_gfclk_mux",
  2184. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
  2185. .prcm = {
  2186. .omap4 = {
  2187. .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
  2188. .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
  2189. .modulemode = MODULEMODE_SWCTRL,
  2190. },
  2191. },
  2192. };
  2193. /* uart2 */
  2194. static struct omap_hwmod dra7xx_uart2_hwmod = {
  2195. .name = "uart2",
  2196. .class = &dra7xx_uart_hwmod_class,
  2197. .clkdm_name = "l4per_clkdm",
  2198. .main_clk = "uart2_gfclk_mux",
  2199. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2200. .prcm = {
  2201. .omap4 = {
  2202. .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
  2203. .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
  2204. .modulemode = MODULEMODE_SWCTRL,
  2205. },
  2206. },
  2207. };
  2208. /* uart3 */
  2209. static struct omap_hwmod dra7xx_uart3_hwmod = {
  2210. .name = "uart3",
  2211. .class = &dra7xx_uart_hwmod_class,
  2212. .clkdm_name = "l4per_clkdm",
  2213. .main_clk = "uart3_gfclk_mux",
  2214. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
  2215. .prcm = {
  2216. .omap4 = {
  2217. .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
  2218. .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
  2219. .modulemode = MODULEMODE_SWCTRL,
  2220. },
  2221. },
  2222. };
  2223. /* uart4 */
  2224. static struct omap_hwmod dra7xx_uart4_hwmod = {
  2225. .name = "uart4",
  2226. .class = &dra7xx_uart_hwmod_class,
  2227. .clkdm_name = "l4per_clkdm",
  2228. .main_clk = "uart4_gfclk_mux",
  2229. .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART4_FLAGS,
  2230. .prcm = {
  2231. .omap4 = {
  2232. .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
  2233. .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
  2234. .modulemode = MODULEMODE_SWCTRL,
  2235. },
  2236. },
  2237. };
  2238. /* uart5 */
  2239. static struct omap_hwmod dra7xx_uart5_hwmod = {
  2240. .name = "uart5",
  2241. .class = &dra7xx_uart_hwmod_class,
  2242. .clkdm_name = "l4per_clkdm",
  2243. .main_clk = "uart5_gfclk_mux",
  2244. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2245. .prcm = {
  2246. .omap4 = {
  2247. .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
  2248. .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
  2249. .modulemode = MODULEMODE_SWCTRL,
  2250. },
  2251. },
  2252. };
  2253. /* uart6 */
  2254. static struct omap_hwmod dra7xx_uart6_hwmod = {
  2255. .name = "uart6",
  2256. .class = &dra7xx_uart_hwmod_class,
  2257. .clkdm_name = "ipu_clkdm",
  2258. .main_clk = "uart6_gfclk_mux",
  2259. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2260. .prcm = {
  2261. .omap4 = {
  2262. .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
  2263. .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
  2264. .modulemode = MODULEMODE_SWCTRL,
  2265. },
  2266. },
  2267. };
  2268. /* uart7 */
  2269. static struct omap_hwmod dra7xx_uart7_hwmod = {
  2270. .name = "uart7",
  2271. .class = &dra7xx_uart_hwmod_class,
  2272. .clkdm_name = "l4per2_clkdm",
  2273. .main_clk = "uart7_gfclk_mux",
  2274. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2275. .prcm = {
  2276. .omap4 = {
  2277. .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET,
  2278. .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET,
  2279. .modulemode = MODULEMODE_SWCTRL,
  2280. },
  2281. },
  2282. };
  2283. /* uart8 */
  2284. static struct omap_hwmod dra7xx_uart8_hwmod = {
  2285. .name = "uart8",
  2286. .class = &dra7xx_uart_hwmod_class,
  2287. .clkdm_name = "l4per2_clkdm",
  2288. .main_clk = "uart8_gfclk_mux",
  2289. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2290. .prcm = {
  2291. .omap4 = {
  2292. .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET,
  2293. .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET,
  2294. .modulemode = MODULEMODE_SWCTRL,
  2295. },
  2296. },
  2297. };
  2298. /* uart9 */
  2299. static struct omap_hwmod dra7xx_uart9_hwmod = {
  2300. .name = "uart9",
  2301. .class = &dra7xx_uart_hwmod_class,
  2302. .clkdm_name = "l4per2_clkdm",
  2303. .main_clk = "uart9_gfclk_mux",
  2304. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2305. .prcm = {
  2306. .omap4 = {
  2307. .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET,
  2308. .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET,
  2309. .modulemode = MODULEMODE_SWCTRL,
  2310. },
  2311. },
  2312. };
  2313. /* uart10 */
  2314. static struct omap_hwmod dra7xx_uart10_hwmod = {
  2315. .name = "uart10",
  2316. .class = &dra7xx_uart_hwmod_class,
  2317. .clkdm_name = "wkupaon_clkdm",
  2318. .main_clk = "uart10_gfclk_mux",
  2319. .flags = HWMOD_SWSUP_SIDLE_ACT,
  2320. .prcm = {
  2321. .omap4 = {
  2322. .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET,
  2323. .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET,
  2324. .modulemode = MODULEMODE_SWCTRL,
  2325. },
  2326. },
  2327. };
  2328. /* DES (the 'P' (public) device) */
  2329. static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
  2330. .rev_offs = 0x0030,
  2331. .sysc_offs = 0x0034,
  2332. .syss_offs = 0x0038,
  2333. .sysc_flags = SYSS_HAS_RESET_STATUS,
  2334. };
  2335. static struct omap_hwmod_class dra7xx_des_hwmod_class = {
  2336. .name = "des",
  2337. .sysc = &dra7xx_des_sysc,
  2338. };
  2339. /* DES */
  2340. static struct omap_hwmod dra7xx_des_hwmod = {
  2341. .name = "des",
  2342. .class = &dra7xx_des_hwmod_class,
  2343. .clkdm_name = "l4sec_clkdm",
  2344. .main_clk = "l3_iclk_div",
  2345. .prcm = {
  2346. .omap4 = {
  2347. .clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
  2348. .context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
  2349. .modulemode = MODULEMODE_HWCTRL,
  2350. },
  2351. },
  2352. };
  2353. /* rng */
  2354. static struct omap_hwmod_class_sysconfig dra7xx_rng_sysc = {
  2355. .rev_offs = 0x1fe0,
  2356. .sysc_offs = 0x1fe4,
  2357. .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
  2358. .idlemodes = SIDLE_FORCE | SIDLE_NO,
  2359. .sysc_fields = &omap_hwmod_sysc_type1,
  2360. };
  2361. static struct omap_hwmod_class dra7xx_rng_hwmod_class = {
  2362. .name = "rng",
  2363. .sysc = &dra7xx_rng_sysc,
  2364. };
  2365. static struct omap_hwmod dra7xx_rng_hwmod = {
  2366. .name = "rng",
  2367. .class = &dra7xx_rng_hwmod_class,
  2368. .flags = HWMOD_SWSUP_SIDLE,
  2369. .clkdm_name = "l4sec_clkdm",
  2370. .prcm = {
  2371. .omap4 = {
  2372. .clkctrl_offs = DRA7XX_CM_L4SEC_RNG_CLKCTRL_OFFSET,
  2373. .context_offs = DRA7XX_RM_L4SEC_RNG_CONTEXT_OFFSET,
  2374. .modulemode = MODULEMODE_HWCTRL,
  2375. },
  2376. },
  2377. };
  2378. /*
  2379. * 'usb_otg_ss' class
  2380. *
  2381. */
  2382. static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
  2383. .rev_offs = 0x0000,
  2384. .sysc_offs = 0x0010,
  2385. .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
  2386. SYSC_HAS_SIDLEMODE),
  2387. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2388. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  2389. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  2390. .sysc_fields = &omap_hwmod_sysc_type2,
  2391. };
  2392. static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
  2393. .name = "usb_otg_ss",
  2394. .sysc = &dra7xx_usb_otg_ss_sysc,
  2395. };
  2396. /* usb_otg_ss1 */
  2397. static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
  2398. { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
  2399. };
  2400. static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
  2401. .name = "usb_otg_ss1",
  2402. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2403. .clkdm_name = "l3init_clkdm",
  2404. .main_clk = "dpll_core_h13x2_ck",
  2405. .flags = HWMOD_CLKDM_NOAUTO,
  2406. .prcm = {
  2407. .omap4 = {
  2408. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
  2409. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
  2410. .modulemode = MODULEMODE_HWCTRL,
  2411. },
  2412. },
  2413. .opt_clks = usb_otg_ss1_opt_clks,
  2414. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
  2415. };
  2416. /* usb_otg_ss2 */
  2417. static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
  2418. { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
  2419. };
  2420. static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
  2421. .name = "usb_otg_ss2",
  2422. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2423. .clkdm_name = "l3init_clkdm",
  2424. .main_clk = "dpll_core_h13x2_ck",
  2425. .flags = HWMOD_CLKDM_NOAUTO,
  2426. .prcm = {
  2427. .omap4 = {
  2428. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
  2429. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
  2430. .modulemode = MODULEMODE_HWCTRL,
  2431. },
  2432. },
  2433. .opt_clks = usb_otg_ss2_opt_clks,
  2434. .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
  2435. };
  2436. /* usb_otg_ss3 */
  2437. static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
  2438. .name = "usb_otg_ss3",
  2439. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2440. .clkdm_name = "l3init_clkdm",
  2441. .main_clk = "dpll_core_h13x2_ck",
  2442. .prcm = {
  2443. .omap4 = {
  2444. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
  2445. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
  2446. .modulemode = MODULEMODE_HWCTRL,
  2447. },
  2448. },
  2449. };
  2450. /* usb_otg_ss4 */
  2451. static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
  2452. .name = "usb_otg_ss4",
  2453. .class = &dra7xx_usb_otg_ss_hwmod_class,
  2454. .clkdm_name = "l3init_clkdm",
  2455. .main_clk = "dpll_core_h13x2_ck",
  2456. .prcm = {
  2457. .omap4 = {
  2458. .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
  2459. .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
  2460. .modulemode = MODULEMODE_HWCTRL,
  2461. },
  2462. },
  2463. };
  2464. /*
  2465. * 'vcp' class
  2466. *
  2467. */
  2468. static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
  2469. .name = "vcp",
  2470. };
  2471. /* vcp1 */
  2472. static struct omap_hwmod dra7xx_vcp1_hwmod = {
  2473. .name = "vcp1",
  2474. .class = &dra7xx_vcp_hwmod_class,
  2475. .clkdm_name = "l3main1_clkdm",
  2476. .main_clk = "l3_iclk_div",
  2477. .prcm = {
  2478. .omap4 = {
  2479. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
  2480. .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
  2481. },
  2482. },
  2483. };
  2484. /* vcp2 */
  2485. static struct omap_hwmod dra7xx_vcp2_hwmod = {
  2486. .name = "vcp2",
  2487. .class = &dra7xx_vcp_hwmod_class,
  2488. .clkdm_name = "l3main1_clkdm",
  2489. .main_clk = "l3_iclk_div",
  2490. .prcm = {
  2491. .omap4 = {
  2492. .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
  2493. .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
  2494. },
  2495. },
  2496. };
  2497. /*
  2498. * 'wd_timer' class
  2499. *
  2500. */
  2501. static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
  2502. .rev_offs = 0x0000,
  2503. .sysc_offs = 0x0010,
  2504. .syss_offs = 0x0014,
  2505. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
  2506. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  2507. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  2508. SIDLE_SMART_WKUP),
  2509. .sysc_fields = &omap_hwmod_sysc_type1,
  2510. };
  2511. static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
  2512. .name = "wd_timer",
  2513. .sysc = &dra7xx_wd_timer_sysc,
  2514. .pre_shutdown = &omap2_wd_timer_disable,
  2515. .reset = &omap2_wd_timer_reset,
  2516. };
  2517. /* wd_timer2 */
  2518. static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
  2519. .name = "wd_timer2",
  2520. .class = &dra7xx_wd_timer_hwmod_class,
  2521. .clkdm_name = "wkupaon_clkdm",
  2522. .main_clk = "sys_32k_ck",
  2523. .prcm = {
  2524. .omap4 = {
  2525. .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
  2526. .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
  2527. .modulemode = MODULEMODE_SWCTRL,
  2528. },
  2529. },
  2530. };
  2531. /*
  2532. * Interfaces
  2533. */
  2534. /* l3_main_1 -> dmm */
  2535. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
  2536. .master = &dra7xx_l3_main_1_hwmod,
  2537. .slave = &dra7xx_dmm_hwmod,
  2538. .clk = "l3_iclk_div",
  2539. .user = OCP_USER_SDMA,
  2540. };
  2541. /* l3_main_2 -> l3_instr */
  2542. static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
  2543. .master = &dra7xx_l3_main_2_hwmod,
  2544. .slave = &dra7xx_l3_instr_hwmod,
  2545. .clk = "l3_iclk_div",
  2546. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2547. };
  2548. /* l4_cfg -> l3_main_1 */
  2549. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
  2550. .master = &dra7xx_l4_cfg_hwmod,
  2551. .slave = &dra7xx_l3_main_1_hwmod,
  2552. .clk = "l3_iclk_div",
  2553. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2554. };
  2555. /* mpu -> l3_main_1 */
  2556. static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
  2557. .master = &dra7xx_mpu_hwmod,
  2558. .slave = &dra7xx_l3_main_1_hwmod,
  2559. .clk = "l3_iclk_div",
  2560. .user = OCP_USER_MPU,
  2561. };
  2562. /* l3_main_1 -> l3_main_2 */
  2563. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
  2564. .master = &dra7xx_l3_main_1_hwmod,
  2565. .slave = &dra7xx_l3_main_2_hwmod,
  2566. .clk = "l3_iclk_div",
  2567. .user = OCP_USER_MPU,
  2568. };
  2569. /* l4_cfg -> l3_main_2 */
  2570. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
  2571. .master = &dra7xx_l4_cfg_hwmod,
  2572. .slave = &dra7xx_l3_main_2_hwmod,
  2573. .clk = "l3_iclk_div",
  2574. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2575. };
  2576. /* l3_main_1 -> l4_cfg */
  2577. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
  2578. .master = &dra7xx_l3_main_1_hwmod,
  2579. .slave = &dra7xx_l4_cfg_hwmod,
  2580. .clk = "l3_iclk_div",
  2581. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2582. };
  2583. /* l3_main_1 -> l4_per1 */
  2584. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
  2585. .master = &dra7xx_l3_main_1_hwmod,
  2586. .slave = &dra7xx_l4_per1_hwmod,
  2587. .clk = "l3_iclk_div",
  2588. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2589. };
  2590. /* l3_main_1 -> l4_per2 */
  2591. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
  2592. .master = &dra7xx_l3_main_1_hwmod,
  2593. .slave = &dra7xx_l4_per2_hwmod,
  2594. .clk = "l3_iclk_div",
  2595. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2596. };
  2597. /* l3_main_1 -> l4_per3 */
  2598. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
  2599. .master = &dra7xx_l3_main_1_hwmod,
  2600. .slave = &dra7xx_l4_per3_hwmod,
  2601. .clk = "l3_iclk_div",
  2602. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2603. };
  2604. /* l3_main_1 -> l4_wkup */
  2605. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
  2606. .master = &dra7xx_l3_main_1_hwmod,
  2607. .slave = &dra7xx_l4_wkup_hwmod,
  2608. .clk = "wkupaon_iclk_mux",
  2609. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2610. };
  2611. /* l4_per2 -> atl */
  2612. static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
  2613. .master = &dra7xx_l4_per2_hwmod,
  2614. .slave = &dra7xx_atl_hwmod,
  2615. .clk = "l3_iclk_div",
  2616. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2617. };
  2618. /* l3_main_1 -> bb2d */
  2619. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
  2620. .master = &dra7xx_l3_main_1_hwmod,
  2621. .slave = &dra7xx_bb2d_hwmod,
  2622. .clk = "l3_iclk_div",
  2623. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2624. };
  2625. /* l4_wkup -> counter_32k */
  2626. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
  2627. .master = &dra7xx_l4_wkup_hwmod,
  2628. .slave = &dra7xx_counter_32k_hwmod,
  2629. .clk = "wkupaon_iclk_mux",
  2630. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2631. };
  2632. /* l4_wkup -> ctrl_module_wkup */
  2633. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
  2634. .master = &dra7xx_l4_wkup_hwmod,
  2635. .slave = &dra7xx_ctrl_module_wkup_hwmod,
  2636. .clk = "wkupaon_iclk_mux",
  2637. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2638. };
  2639. static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
  2640. .master = &dra7xx_l4_per2_hwmod,
  2641. .slave = &dra7xx_gmac_hwmod,
  2642. .clk = "dpll_gmac_ck",
  2643. .user = OCP_USER_MPU,
  2644. };
  2645. static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
  2646. .master = &dra7xx_gmac_hwmod,
  2647. .slave = &dra7xx_mdio_hwmod,
  2648. .user = OCP_USER_MPU,
  2649. };
  2650. /* l4_wkup -> dcan1 */
  2651. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
  2652. .master = &dra7xx_l4_wkup_hwmod,
  2653. .slave = &dra7xx_dcan1_hwmod,
  2654. .clk = "wkupaon_iclk_mux",
  2655. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2656. };
  2657. /* l4_per2 -> dcan2 */
  2658. static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
  2659. .master = &dra7xx_l4_per2_hwmod,
  2660. .slave = &dra7xx_dcan2_hwmod,
  2661. .clk = "l3_iclk_div",
  2662. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2663. };
  2664. /* l4_cfg -> dma_system */
  2665. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
  2666. .master = &dra7xx_l4_cfg_hwmod,
  2667. .slave = &dra7xx_dma_system_hwmod,
  2668. .clk = "l3_iclk_div",
  2669. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2670. };
  2671. /* l3_main_1 -> tpcc */
  2672. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
  2673. .master = &dra7xx_l3_main_1_hwmod,
  2674. .slave = &dra7xx_tpcc_hwmod,
  2675. .clk = "l3_iclk_div",
  2676. .user = OCP_USER_MPU,
  2677. };
  2678. /* l3_main_1 -> tptc0 */
  2679. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
  2680. .master = &dra7xx_l3_main_1_hwmod,
  2681. .slave = &dra7xx_tptc0_hwmod,
  2682. .clk = "l3_iclk_div",
  2683. .user = OCP_USER_MPU,
  2684. };
  2685. /* l3_main_1 -> tptc1 */
  2686. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
  2687. .master = &dra7xx_l3_main_1_hwmod,
  2688. .slave = &dra7xx_tptc1_hwmod,
  2689. .clk = "l3_iclk_div",
  2690. .user = OCP_USER_MPU,
  2691. };
  2692. /* l3_main_1 -> dss */
  2693. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
  2694. .master = &dra7xx_l3_main_1_hwmod,
  2695. .slave = &dra7xx_dss_hwmod,
  2696. .clk = "l3_iclk_div",
  2697. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2698. };
  2699. /* l3_main_1 -> dispc */
  2700. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
  2701. .master = &dra7xx_l3_main_1_hwmod,
  2702. .slave = &dra7xx_dss_dispc_hwmod,
  2703. .clk = "l3_iclk_div",
  2704. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2705. };
  2706. /* l3_main_1 -> dispc */
  2707. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
  2708. .master = &dra7xx_l3_main_1_hwmod,
  2709. .slave = &dra7xx_dss_hdmi_hwmod,
  2710. .clk = "l3_iclk_div",
  2711. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2712. };
  2713. /* l3_main_1 -> aes1 */
  2714. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
  2715. .master = &dra7xx_l3_main_1_hwmod,
  2716. .slave = &dra7xx_aes1_hwmod,
  2717. .clk = "l3_iclk_div",
  2718. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2719. };
  2720. /* l3_main_1 -> aes2 */
  2721. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
  2722. .master = &dra7xx_l3_main_1_hwmod,
  2723. .slave = &dra7xx_aes2_hwmod,
  2724. .clk = "l3_iclk_div",
  2725. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2726. };
  2727. /* l3_main_1 -> sha0 */
  2728. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
  2729. .master = &dra7xx_l3_main_1_hwmod,
  2730. .slave = &dra7xx_sha0_hwmod,
  2731. .clk = "l3_iclk_div",
  2732. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2733. };
  2734. /* l4_per2 -> mcasp1 */
  2735. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp1 = {
  2736. .master = &dra7xx_l4_per2_hwmod,
  2737. .slave = &dra7xx_mcasp1_hwmod,
  2738. .clk = "l4_root_clk_div",
  2739. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2740. };
  2741. /* l3_main_1 -> mcasp1 */
  2742. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp1 = {
  2743. .master = &dra7xx_l3_main_1_hwmod,
  2744. .slave = &dra7xx_mcasp1_hwmod,
  2745. .clk = "l3_iclk_div",
  2746. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2747. };
  2748. /* l4_per2 -> mcasp2 */
  2749. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp2 = {
  2750. .master = &dra7xx_l4_per2_hwmod,
  2751. .slave = &dra7xx_mcasp2_hwmod,
  2752. .clk = "l4_root_clk_div",
  2753. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2754. };
  2755. /* l3_main_1 -> mcasp2 */
  2756. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp2 = {
  2757. .master = &dra7xx_l3_main_1_hwmod,
  2758. .slave = &dra7xx_mcasp2_hwmod,
  2759. .clk = "l3_iclk_div",
  2760. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2761. };
  2762. /* l4_per2 -> mcasp3 */
  2763. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = {
  2764. .master = &dra7xx_l4_per2_hwmod,
  2765. .slave = &dra7xx_mcasp3_hwmod,
  2766. .clk = "l4_root_clk_div",
  2767. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2768. };
  2769. /* l3_main_1 -> mcasp3 */
  2770. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp3 = {
  2771. .master = &dra7xx_l3_main_1_hwmod,
  2772. .slave = &dra7xx_mcasp3_hwmod,
  2773. .clk = "l3_iclk_div",
  2774. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2775. };
  2776. /* l4_per2 -> mcasp4 */
  2777. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp4 = {
  2778. .master = &dra7xx_l4_per2_hwmod,
  2779. .slave = &dra7xx_mcasp4_hwmod,
  2780. .clk = "l4_root_clk_div",
  2781. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2782. };
  2783. /* l4_per2 -> mcasp5 */
  2784. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp5 = {
  2785. .master = &dra7xx_l4_per2_hwmod,
  2786. .slave = &dra7xx_mcasp5_hwmod,
  2787. .clk = "l4_root_clk_div",
  2788. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2789. };
  2790. /* l4_per2 -> mcasp6 */
  2791. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp6 = {
  2792. .master = &dra7xx_l4_per2_hwmod,
  2793. .slave = &dra7xx_mcasp6_hwmod,
  2794. .clk = "l4_root_clk_div",
  2795. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2796. };
  2797. /* l4_per2 -> mcasp7 */
  2798. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp7 = {
  2799. .master = &dra7xx_l4_per2_hwmod,
  2800. .slave = &dra7xx_mcasp7_hwmod,
  2801. .clk = "l4_root_clk_div",
  2802. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2803. };
  2804. /* l4_per2 -> mcasp8 */
  2805. static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp8 = {
  2806. .master = &dra7xx_l4_per2_hwmod,
  2807. .slave = &dra7xx_mcasp8_hwmod,
  2808. .clk = "l4_root_clk_div",
  2809. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2810. };
  2811. /* l4_per1 -> elm */
  2812. static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
  2813. .master = &dra7xx_l4_per1_hwmod,
  2814. .slave = &dra7xx_elm_hwmod,
  2815. .clk = "l3_iclk_div",
  2816. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2817. };
  2818. /* l4_wkup -> gpio1 */
  2819. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
  2820. .master = &dra7xx_l4_wkup_hwmod,
  2821. .slave = &dra7xx_gpio1_hwmod,
  2822. .clk = "wkupaon_iclk_mux",
  2823. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2824. };
  2825. /* l4_per1 -> gpio2 */
  2826. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
  2827. .master = &dra7xx_l4_per1_hwmod,
  2828. .slave = &dra7xx_gpio2_hwmod,
  2829. .clk = "l3_iclk_div",
  2830. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2831. };
  2832. /* l4_per1 -> gpio3 */
  2833. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
  2834. .master = &dra7xx_l4_per1_hwmod,
  2835. .slave = &dra7xx_gpio3_hwmod,
  2836. .clk = "l3_iclk_div",
  2837. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2838. };
  2839. /* l4_per1 -> gpio4 */
  2840. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
  2841. .master = &dra7xx_l4_per1_hwmod,
  2842. .slave = &dra7xx_gpio4_hwmod,
  2843. .clk = "l3_iclk_div",
  2844. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2845. };
  2846. /* l4_per1 -> gpio5 */
  2847. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
  2848. .master = &dra7xx_l4_per1_hwmod,
  2849. .slave = &dra7xx_gpio5_hwmod,
  2850. .clk = "l3_iclk_div",
  2851. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2852. };
  2853. /* l4_per1 -> gpio6 */
  2854. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
  2855. .master = &dra7xx_l4_per1_hwmod,
  2856. .slave = &dra7xx_gpio6_hwmod,
  2857. .clk = "l3_iclk_div",
  2858. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2859. };
  2860. /* l4_per1 -> gpio7 */
  2861. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
  2862. .master = &dra7xx_l4_per1_hwmod,
  2863. .slave = &dra7xx_gpio7_hwmod,
  2864. .clk = "l3_iclk_div",
  2865. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2866. };
  2867. /* l4_per1 -> gpio8 */
  2868. static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
  2869. .master = &dra7xx_l4_per1_hwmod,
  2870. .slave = &dra7xx_gpio8_hwmod,
  2871. .clk = "l3_iclk_div",
  2872. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2873. };
  2874. /* l3_main_1 -> gpmc */
  2875. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
  2876. .master = &dra7xx_l3_main_1_hwmod,
  2877. .slave = &dra7xx_gpmc_hwmod,
  2878. .clk = "l3_iclk_div",
  2879. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2880. };
  2881. /* l4_per1 -> hdq1w */
  2882. static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
  2883. .master = &dra7xx_l4_per1_hwmod,
  2884. .slave = &dra7xx_hdq1w_hwmod,
  2885. .clk = "l3_iclk_div",
  2886. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2887. };
  2888. /* l4_per1 -> i2c1 */
  2889. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
  2890. .master = &dra7xx_l4_per1_hwmod,
  2891. .slave = &dra7xx_i2c1_hwmod,
  2892. .clk = "l3_iclk_div",
  2893. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2894. };
  2895. /* l4_per1 -> i2c2 */
  2896. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
  2897. .master = &dra7xx_l4_per1_hwmod,
  2898. .slave = &dra7xx_i2c2_hwmod,
  2899. .clk = "l3_iclk_div",
  2900. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2901. };
  2902. /* l4_per1 -> i2c3 */
  2903. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
  2904. .master = &dra7xx_l4_per1_hwmod,
  2905. .slave = &dra7xx_i2c3_hwmod,
  2906. .clk = "l3_iclk_div",
  2907. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2908. };
  2909. /* l4_per1 -> i2c4 */
  2910. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
  2911. .master = &dra7xx_l4_per1_hwmod,
  2912. .slave = &dra7xx_i2c4_hwmod,
  2913. .clk = "l3_iclk_div",
  2914. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2915. };
  2916. /* l4_per1 -> i2c5 */
  2917. static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
  2918. .master = &dra7xx_l4_per1_hwmod,
  2919. .slave = &dra7xx_i2c5_hwmod,
  2920. .clk = "l3_iclk_div",
  2921. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2922. };
  2923. /* l4_cfg -> mailbox1 */
  2924. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
  2925. .master = &dra7xx_l4_cfg_hwmod,
  2926. .slave = &dra7xx_mailbox1_hwmod,
  2927. .clk = "l3_iclk_div",
  2928. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2929. };
  2930. /* l4_per3 -> mailbox2 */
  2931. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
  2932. .master = &dra7xx_l4_per3_hwmod,
  2933. .slave = &dra7xx_mailbox2_hwmod,
  2934. .clk = "l3_iclk_div",
  2935. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2936. };
  2937. /* l4_per3 -> mailbox3 */
  2938. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
  2939. .master = &dra7xx_l4_per3_hwmod,
  2940. .slave = &dra7xx_mailbox3_hwmod,
  2941. .clk = "l3_iclk_div",
  2942. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2943. };
  2944. /* l4_per3 -> mailbox4 */
  2945. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
  2946. .master = &dra7xx_l4_per3_hwmod,
  2947. .slave = &dra7xx_mailbox4_hwmod,
  2948. .clk = "l3_iclk_div",
  2949. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2950. };
  2951. /* l4_per3 -> mailbox5 */
  2952. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
  2953. .master = &dra7xx_l4_per3_hwmod,
  2954. .slave = &dra7xx_mailbox5_hwmod,
  2955. .clk = "l3_iclk_div",
  2956. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2957. };
  2958. /* l4_per3 -> mailbox6 */
  2959. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
  2960. .master = &dra7xx_l4_per3_hwmod,
  2961. .slave = &dra7xx_mailbox6_hwmod,
  2962. .clk = "l3_iclk_div",
  2963. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2964. };
  2965. /* l4_per3 -> mailbox7 */
  2966. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
  2967. .master = &dra7xx_l4_per3_hwmod,
  2968. .slave = &dra7xx_mailbox7_hwmod,
  2969. .clk = "l3_iclk_div",
  2970. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2971. };
  2972. /* l4_per3 -> mailbox8 */
  2973. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
  2974. .master = &dra7xx_l4_per3_hwmod,
  2975. .slave = &dra7xx_mailbox8_hwmod,
  2976. .clk = "l3_iclk_div",
  2977. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2978. };
  2979. /* l4_per3 -> mailbox9 */
  2980. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
  2981. .master = &dra7xx_l4_per3_hwmod,
  2982. .slave = &dra7xx_mailbox9_hwmod,
  2983. .clk = "l3_iclk_div",
  2984. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2985. };
  2986. /* l4_per3 -> mailbox10 */
  2987. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
  2988. .master = &dra7xx_l4_per3_hwmod,
  2989. .slave = &dra7xx_mailbox10_hwmod,
  2990. .clk = "l3_iclk_div",
  2991. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2992. };
  2993. /* l4_per3 -> mailbox11 */
  2994. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
  2995. .master = &dra7xx_l4_per3_hwmod,
  2996. .slave = &dra7xx_mailbox11_hwmod,
  2997. .clk = "l3_iclk_div",
  2998. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2999. };
  3000. /* l4_per3 -> mailbox12 */
  3001. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
  3002. .master = &dra7xx_l4_per3_hwmod,
  3003. .slave = &dra7xx_mailbox12_hwmod,
  3004. .clk = "l3_iclk_div",
  3005. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3006. };
  3007. /* l4_per3 -> mailbox13 */
  3008. static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
  3009. .master = &dra7xx_l4_per3_hwmod,
  3010. .slave = &dra7xx_mailbox13_hwmod,
  3011. .clk = "l3_iclk_div",
  3012. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3013. };
  3014. /* l4_per1 -> mcspi1 */
  3015. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
  3016. .master = &dra7xx_l4_per1_hwmod,
  3017. .slave = &dra7xx_mcspi1_hwmod,
  3018. .clk = "l3_iclk_div",
  3019. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3020. };
  3021. /* l4_per1 -> mcspi2 */
  3022. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
  3023. .master = &dra7xx_l4_per1_hwmod,
  3024. .slave = &dra7xx_mcspi2_hwmod,
  3025. .clk = "l3_iclk_div",
  3026. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3027. };
  3028. /* l4_per1 -> mcspi3 */
  3029. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
  3030. .master = &dra7xx_l4_per1_hwmod,
  3031. .slave = &dra7xx_mcspi3_hwmod,
  3032. .clk = "l3_iclk_div",
  3033. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3034. };
  3035. /* l4_per1 -> mcspi4 */
  3036. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
  3037. .master = &dra7xx_l4_per1_hwmod,
  3038. .slave = &dra7xx_mcspi4_hwmod,
  3039. .clk = "l3_iclk_div",
  3040. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3041. };
  3042. /* l4_per1 -> mmc1 */
  3043. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
  3044. .master = &dra7xx_l4_per1_hwmod,
  3045. .slave = &dra7xx_mmc1_hwmod,
  3046. .clk = "l3_iclk_div",
  3047. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3048. };
  3049. /* l4_per1 -> mmc2 */
  3050. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
  3051. .master = &dra7xx_l4_per1_hwmod,
  3052. .slave = &dra7xx_mmc2_hwmod,
  3053. .clk = "l3_iclk_div",
  3054. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3055. };
  3056. /* l4_per1 -> mmc3 */
  3057. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
  3058. .master = &dra7xx_l4_per1_hwmod,
  3059. .slave = &dra7xx_mmc3_hwmod,
  3060. .clk = "l3_iclk_div",
  3061. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3062. };
  3063. /* l4_per1 -> mmc4 */
  3064. static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
  3065. .master = &dra7xx_l4_per1_hwmod,
  3066. .slave = &dra7xx_mmc4_hwmod,
  3067. .clk = "l3_iclk_div",
  3068. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3069. };
  3070. /* l4_cfg -> mpu */
  3071. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
  3072. .master = &dra7xx_l4_cfg_hwmod,
  3073. .slave = &dra7xx_mpu_hwmod,
  3074. .clk = "l3_iclk_div",
  3075. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3076. };
  3077. /* l4_cfg -> ocp2scp1 */
  3078. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
  3079. .master = &dra7xx_l4_cfg_hwmod,
  3080. .slave = &dra7xx_ocp2scp1_hwmod,
  3081. .clk = "l4_root_clk_div",
  3082. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3083. };
  3084. /* l4_cfg -> ocp2scp3 */
  3085. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
  3086. .master = &dra7xx_l4_cfg_hwmod,
  3087. .slave = &dra7xx_ocp2scp3_hwmod,
  3088. .clk = "l4_root_clk_div",
  3089. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3090. };
  3091. /* l3_main_1 -> pciess1 */
  3092. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
  3093. .master = &dra7xx_l3_main_1_hwmod,
  3094. .slave = &dra7xx_pciess1_hwmod,
  3095. .clk = "l3_iclk_div",
  3096. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3097. };
  3098. /* l4_cfg -> pciess1 */
  3099. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
  3100. .master = &dra7xx_l4_cfg_hwmod,
  3101. .slave = &dra7xx_pciess1_hwmod,
  3102. .clk = "l4_root_clk_div",
  3103. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3104. };
  3105. /* l3_main_1 -> pciess2 */
  3106. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
  3107. .master = &dra7xx_l3_main_1_hwmod,
  3108. .slave = &dra7xx_pciess2_hwmod,
  3109. .clk = "l3_iclk_div",
  3110. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3111. };
  3112. /* l4_cfg -> pciess2 */
  3113. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
  3114. .master = &dra7xx_l4_cfg_hwmod,
  3115. .slave = &dra7xx_pciess2_hwmod,
  3116. .clk = "l4_root_clk_div",
  3117. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3118. };
  3119. /* l3_main_1 -> qspi */
  3120. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
  3121. .master = &dra7xx_l3_main_1_hwmod,
  3122. .slave = &dra7xx_qspi_hwmod,
  3123. .clk = "l3_iclk_div",
  3124. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3125. };
  3126. /* l4_per3 -> rtcss */
  3127. static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
  3128. .master = &dra7xx_l4_per3_hwmod,
  3129. .slave = &dra7xx_rtcss_hwmod,
  3130. .clk = "l4_root_clk_div",
  3131. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3132. };
  3133. /* l4_cfg -> sata */
  3134. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
  3135. .master = &dra7xx_l4_cfg_hwmod,
  3136. .slave = &dra7xx_sata_hwmod,
  3137. .clk = "l3_iclk_div",
  3138. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3139. };
  3140. /* l4_cfg -> smartreflex_core */
  3141. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
  3142. .master = &dra7xx_l4_cfg_hwmod,
  3143. .slave = &dra7xx_smartreflex_core_hwmod,
  3144. .clk = "l4_root_clk_div",
  3145. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3146. };
  3147. /* l4_cfg -> smartreflex_mpu */
  3148. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
  3149. .master = &dra7xx_l4_cfg_hwmod,
  3150. .slave = &dra7xx_smartreflex_mpu_hwmod,
  3151. .clk = "l4_root_clk_div",
  3152. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3153. };
  3154. /* l4_cfg -> spinlock */
  3155. static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
  3156. .master = &dra7xx_l4_cfg_hwmod,
  3157. .slave = &dra7xx_spinlock_hwmod,
  3158. .clk = "l3_iclk_div",
  3159. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3160. };
  3161. /* l4_wkup -> timer1 */
  3162. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
  3163. .master = &dra7xx_l4_wkup_hwmod,
  3164. .slave = &dra7xx_timer1_hwmod,
  3165. .clk = "wkupaon_iclk_mux",
  3166. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3167. };
  3168. /* l4_per1 -> timer2 */
  3169. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
  3170. .master = &dra7xx_l4_per1_hwmod,
  3171. .slave = &dra7xx_timer2_hwmod,
  3172. .clk = "l3_iclk_div",
  3173. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3174. };
  3175. /* l4_per1 -> timer3 */
  3176. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
  3177. .master = &dra7xx_l4_per1_hwmod,
  3178. .slave = &dra7xx_timer3_hwmod,
  3179. .clk = "l3_iclk_div",
  3180. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3181. };
  3182. /* l4_per1 -> timer4 */
  3183. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
  3184. .master = &dra7xx_l4_per1_hwmod,
  3185. .slave = &dra7xx_timer4_hwmod,
  3186. .clk = "l3_iclk_div",
  3187. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3188. };
  3189. /* l4_per3 -> timer5 */
  3190. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
  3191. .master = &dra7xx_l4_per3_hwmod,
  3192. .slave = &dra7xx_timer5_hwmod,
  3193. .clk = "l3_iclk_div",
  3194. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3195. };
  3196. /* l4_per3 -> timer6 */
  3197. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
  3198. .master = &dra7xx_l4_per3_hwmod,
  3199. .slave = &dra7xx_timer6_hwmod,
  3200. .clk = "l3_iclk_div",
  3201. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3202. };
  3203. /* l4_per3 -> timer7 */
  3204. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
  3205. .master = &dra7xx_l4_per3_hwmod,
  3206. .slave = &dra7xx_timer7_hwmod,
  3207. .clk = "l3_iclk_div",
  3208. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3209. };
  3210. /* l4_per3 -> timer8 */
  3211. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
  3212. .master = &dra7xx_l4_per3_hwmod,
  3213. .slave = &dra7xx_timer8_hwmod,
  3214. .clk = "l3_iclk_div",
  3215. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3216. };
  3217. /* l4_per1 -> timer9 */
  3218. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
  3219. .master = &dra7xx_l4_per1_hwmod,
  3220. .slave = &dra7xx_timer9_hwmod,
  3221. .clk = "l3_iclk_div",
  3222. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3223. };
  3224. /* l4_per1 -> timer10 */
  3225. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
  3226. .master = &dra7xx_l4_per1_hwmod,
  3227. .slave = &dra7xx_timer10_hwmod,
  3228. .clk = "l3_iclk_div",
  3229. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3230. };
  3231. /* l4_per1 -> timer11 */
  3232. static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
  3233. .master = &dra7xx_l4_per1_hwmod,
  3234. .slave = &dra7xx_timer11_hwmod,
  3235. .clk = "l3_iclk_div",
  3236. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3237. };
  3238. /* l4_wkup -> timer12 */
  3239. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
  3240. .master = &dra7xx_l4_wkup_hwmod,
  3241. .slave = &dra7xx_timer12_hwmod,
  3242. .clk = "wkupaon_iclk_mux",
  3243. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3244. };
  3245. /* l4_per3 -> timer13 */
  3246. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
  3247. .master = &dra7xx_l4_per3_hwmod,
  3248. .slave = &dra7xx_timer13_hwmod,
  3249. .clk = "l3_iclk_div",
  3250. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3251. };
  3252. /* l4_per3 -> timer14 */
  3253. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
  3254. .master = &dra7xx_l4_per3_hwmod,
  3255. .slave = &dra7xx_timer14_hwmod,
  3256. .clk = "l3_iclk_div",
  3257. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3258. };
  3259. /* l4_per3 -> timer15 */
  3260. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
  3261. .master = &dra7xx_l4_per3_hwmod,
  3262. .slave = &dra7xx_timer15_hwmod,
  3263. .clk = "l3_iclk_div",
  3264. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3265. };
  3266. /* l4_per3 -> timer16 */
  3267. static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
  3268. .master = &dra7xx_l4_per3_hwmod,
  3269. .slave = &dra7xx_timer16_hwmod,
  3270. .clk = "l3_iclk_div",
  3271. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3272. };
  3273. /* l4_per1 -> uart1 */
  3274. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
  3275. .master = &dra7xx_l4_per1_hwmod,
  3276. .slave = &dra7xx_uart1_hwmod,
  3277. .clk = "l3_iclk_div",
  3278. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3279. };
  3280. /* l4_per1 -> uart2 */
  3281. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
  3282. .master = &dra7xx_l4_per1_hwmod,
  3283. .slave = &dra7xx_uart2_hwmod,
  3284. .clk = "l3_iclk_div",
  3285. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3286. };
  3287. /* l4_per1 -> uart3 */
  3288. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
  3289. .master = &dra7xx_l4_per1_hwmod,
  3290. .slave = &dra7xx_uart3_hwmod,
  3291. .clk = "l3_iclk_div",
  3292. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3293. };
  3294. /* l4_per1 -> uart4 */
  3295. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
  3296. .master = &dra7xx_l4_per1_hwmod,
  3297. .slave = &dra7xx_uart4_hwmod,
  3298. .clk = "l3_iclk_div",
  3299. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3300. };
  3301. /* l4_per1 -> uart5 */
  3302. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
  3303. .master = &dra7xx_l4_per1_hwmod,
  3304. .slave = &dra7xx_uart5_hwmod,
  3305. .clk = "l3_iclk_div",
  3306. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3307. };
  3308. /* l4_per1 -> uart6 */
  3309. static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
  3310. .master = &dra7xx_l4_per1_hwmod,
  3311. .slave = &dra7xx_uart6_hwmod,
  3312. .clk = "l3_iclk_div",
  3313. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3314. };
  3315. /* l4_per2 -> uart7 */
  3316. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
  3317. .master = &dra7xx_l4_per2_hwmod,
  3318. .slave = &dra7xx_uart7_hwmod,
  3319. .clk = "l3_iclk_div",
  3320. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3321. };
  3322. /* l4_per1 -> des */
  3323. static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
  3324. .master = &dra7xx_l4_per1_hwmod,
  3325. .slave = &dra7xx_des_hwmod,
  3326. .clk = "l3_iclk_div",
  3327. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3328. };
  3329. /* l4_per2 -> uart8 */
  3330. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
  3331. .master = &dra7xx_l4_per2_hwmod,
  3332. .slave = &dra7xx_uart8_hwmod,
  3333. .clk = "l3_iclk_div",
  3334. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3335. };
  3336. /* l4_per2 -> uart9 */
  3337. static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = {
  3338. .master = &dra7xx_l4_per2_hwmod,
  3339. .slave = &dra7xx_uart9_hwmod,
  3340. .clk = "l3_iclk_div",
  3341. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3342. };
  3343. /* l4_wkup -> uart10 */
  3344. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
  3345. .master = &dra7xx_l4_wkup_hwmod,
  3346. .slave = &dra7xx_uart10_hwmod,
  3347. .clk = "wkupaon_iclk_mux",
  3348. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3349. };
  3350. /* l4_per1 -> rng */
  3351. static struct omap_hwmod_ocp_if dra7xx_l4_per1__rng = {
  3352. .master = &dra7xx_l4_per1_hwmod,
  3353. .slave = &dra7xx_rng_hwmod,
  3354. .user = OCP_USER_MPU,
  3355. };
  3356. /* l4_per3 -> usb_otg_ss1 */
  3357. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
  3358. .master = &dra7xx_l4_per3_hwmod,
  3359. .slave = &dra7xx_usb_otg_ss1_hwmod,
  3360. .clk = "dpll_core_h13x2_ck",
  3361. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3362. };
  3363. /* l4_per3 -> usb_otg_ss2 */
  3364. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
  3365. .master = &dra7xx_l4_per3_hwmod,
  3366. .slave = &dra7xx_usb_otg_ss2_hwmod,
  3367. .clk = "dpll_core_h13x2_ck",
  3368. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3369. };
  3370. /* l4_per3 -> usb_otg_ss3 */
  3371. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
  3372. .master = &dra7xx_l4_per3_hwmod,
  3373. .slave = &dra7xx_usb_otg_ss3_hwmod,
  3374. .clk = "dpll_core_h13x2_ck",
  3375. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3376. };
  3377. /* l4_per3 -> usb_otg_ss4 */
  3378. static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
  3379. .master = &dra7xx_l4_per3_hwmod,
  3380. .slave = &dra7xx_usb_otg_ss4_hwmod,
  3381. .clk = "dpll_core_h13x2_ck",
  3382. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3383. };
  3384. /* l3_main_1 -> vcp1 */
  3385. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
  3386. .master = &dra7xx_l3_main_1_hwmod,
  3387. .slave = &dra7xx_vcp1_hwmod,
  3388. .clk = "l3_iclk_div",
  3389. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3390. };
  3391. /* l4_per2 -> vcp1 */
  3392. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
  3393. .master = &dra7xx_l4_per2_hwmod,
  3394. .slave = &dra7xx_vcp1_hwmod,
  3395. .clk = "l3_iclk_div",
  3396. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3397. };
  3398. /* l3_main_1 -> vcp2 */
  3399. static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
  3400. .master = &dra7xx_l3_main_1_hwmod,
  3401. .slave = &dra7xx_vcp2_hwmod,
  3402. .clk = "l3_iclk_div",
  3403. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3404. };
  3405. /* l4_per2 -> vcp2 */
  3406. static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
  3407. .master = &dra7xx_l4_per2_hwmod,
  3408. .slave = &dra7xx_vcp2_hwmod,
  3409. .clk = "l3_iclk_div",
  3410. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3411. };
  3412. /* l4_wkup -> wd_timer2 */
  3413. static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
  3414. .master = &dra7xx_l4_wkup_hwmod,
  3415. .slave = &dra7xx_wd_timer2_hwmod,
  3416. .clk = "wkupaon_iclk_mux",
  3417. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3418. };
  3419. /* l4_per2 -> epwmss0 */
  3420. static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
  3421. .master = &dra7xx_l4_per2_hwmod,
  3422. .slave = &dra7xx_epwmss0_hwmod,
  3423. .clk = "l4_root_clk_div",
  3424. .user = OCP_USER_MPU,
  3425. };
  3426. /* l4_per2 -> epwmss1 */
  3427. static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
  3428. .master = &dra7xx_l4_per2_hwmod,
  3429. .slave = &dra7xx_epwmss1_hwmod,
  3430. .clk = "l4_root_clk_div",
  3431. .user = OCP_USER_MPU,
  3432. };
  3433. /* l4_per2 -> epwmss2 */
  3434. static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
  3435. .master = &dra7xx_l4_per2_hwmod,
  3436. .slave = &dra7xx_epwmss2_hwmod,
  3437. .clk = "l4_root_clk_div",
  3438. .user = OCP_USER_MPU,
  3439. };
  3440. static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
  3441. &dra7xx_l3_main_1__dmm,
  3442. &dra7xx_l3_main_2__l3_instr,
  3443. &dra7xx_l4_cfg__l3_main_1,
  3444. &dra7xx_mpu__l3_main_1,
  3445. &dra7xx_l3_main_1__l3_main_2,
  3446. &dra7xx_l4_cfg__l3_main_2,
  3447. &dra7xx_l3_main_1__l4_cfg,
  3448. &dra7xx_l3_main_1__l4_per1,
  3449. &dra7xx_l3_main_1__l4_per2,
  3450. &dra7xx_l3_main_1__l4_per3,
  3451. &dra7xx_l3_main_1__l4_wkup,
  3452. &dra7xx_l4_per2__atl,
  3453. &dra7xx_l3_main_1__bb2d,
  3454. &dra7xx_l4_wkup__counter_32k,
  3455. &dra7xx_l4_wkup__ctrl_module_wkup,
  3456. &dra7xx_l4_wkup__dcan1,
  3457. &dra7xx_l4_per2__dcan2,
  3458. &dra7xx_l4_per2__cpgmac0,
  3459. &dra7xx_l4_per2__mcasp1,
  3460. &dra7xx_l3_main_1__mcasp1,
  3461. &dra7xx_l4_per2__mcasp2,
  3462. &dra7xx_l3_main_1__mcasp2,
  3463. &dra7xx_l4_per2__mcasp3,
  3464. &dra7xx_l3_main_1__mcasp3,
  3465. &dra7xx_l4_per2__mcasp4,
  3466. &dra7xx_l4_per2__mcasp5,
  3467. &dra7xx_l4_per2__mcasp6,
  3468. &dra7xx_l4_per2__mcasp7,
  3469. &dra7xx_l4_per2__mcasp8,
  3470. &dra7xx_gmac__mdio,
  3471. &dra7xx_l4_cfg__dma_system,
  3472. &dra7xx_l3_main_1__tpcc,
  3473. &dra7xx_l3_main_1__tptc0,
  3474. &dra7xx_l3_main_1__tptc1,
  3475. &dra7xx_l3_main_1__dss,
  3476. &dra7xx_l3_main_1__dispc,
  3477. &dra7xx_l3_main_1__hdmi,
  3478. &dra7xx_l3_main_1__aes1,
  3479. &dra7xx_l3_main_1__aes2,
  3480. &dra7xx_l3_main_1__sha0,
  3481. &dra7xx_l4_per1__elm,
  3482. &dra7xx_l4_wkup__gpio1,
  3483. &dra7xx_l4_per1__gpio2,
  3484. &dra7xx_l4_per1__gpio3,
  3485. &dra7xx_l4_per1__gpio4,
  3486. &dra7xx_l4_per1__gpio5,
  3487. &dra7xx_l4_per1__gpio6,
  3488. &dra7xx_l4_per1__gpio7,
  3489. &dra7xx_l4_per1__gpio8,
  3490. &dra7xx_l3_main_1__gpmc,
  3491. &dra7xx_l4_per1__hdq1w,
  3492. &dra7xx_l4_per1__i2c1,
  3493. &dra7xx_l4_per1__i2c2,
  3494. &dra7xx_l4_per1__i2c3,
  3495. &dra7xx_l4_per1__i2c4,
  3496. &dra7xx_l4_per1__i2c5,
  3497. &dra7xx_l4_cfg__mailbox1,
  3498. &dra7xx_l4_per3__mailbox2,
  3499. &dra7xx_l4_per3__mailbox3,
  3500. &dra7xx_l4_per3__mailbox4,
  3501. &dra7xx_l4_per3__mailbox5,
  3502. &dra7xx_l4_per3__mailbox6,
  3503. &dra7xx_l4_per3__mailbox7,
  3504. &dra7xx_l4_per3__mailbox8,
  3505. &dra7xx_l4_per3__mailbox9,
  3506. &dra7xx_l4_per3__mailbox10,
  3507. &dra7xx_l4_per3__mailbox11,
  3508. &dra7xx_l4_per3__mailbox12,
  3509. &dra7xx_l4_per3__mailbox13,
  3510. &dra7xx_l4_per1__mcspi1,
  3511. &dra7xx_l4_per1__mcspi2,
  3512. &dra7xx_l4_per1__mcspi3,
  3513. &dra7xx_l4_per1__mcspi4,
  3514. &dra7xx_l4_per1__mmc1,
  3515. &dra7xx_l4_per1__mmc2,
  3516. &dra7xx_l4_per1__mmc3,
  3517. &dra7xx_l4_per1__mmc4,
  3518. &dra7xx_l4_cfg__mpu,
  3519. &dra7xx_l4_cfg__ocp2scp1,
  3520. &dra7xx_l4_cfg__ocp2scp3,
  3521. &dra7xx_l3_main_1__pciess1,
  3522. &dra7xx_l4_cfg__pciess1,
  3523. &dra7xx_l3_main_1__pciess2,
  3524. &dra7xx_l4_cfg__pciess2,
  3525. &dra7xx_l3_main_1__qspi,
  3526. &dra7xx_l4_cfg__sata,
  3527. &dra7xx_l4_cfg__smartreflex_core,
  3528. &dra7xx_l4_cfg__smartreflex_mpu,
  3529. &dra7xx_l4_cfg__spinlock,
  3530. &dra7xx_l4_wkup__timer1,
  3531. &dra7xx_l4_per1__timer2,
  3532. &dra7xx_l4_per1__timer3,
  3533. &dra7xx_l4_per1__timer4,
  3534. &dra7xx_l4_per3__timer5,
  3535. &dra7xx_l4_per3__timer6,
  3536. &dra7xx_l4_per3__timer7,
  3537. &dra7xx_l4_per3__timer8,
  3538. &dra7xx_l4_per1__timer9,
  3539. &dra7xx_l4_per1__timer10,
  3540. &dra7xx_l4_per1__timer11,
  3541. &dra7xx_l4_per3__timer13,
  3542. &dra7xx_l4_per3__timer14,
  3543. &dra7xx_l4_per3__timer15,
  3544. &dra7xx_l4_per3__timer16,
  3545. &dra7xx_l4_per1__uart1,
  3546. &dra7xx_l4_per1__uart2,
  3547. &dra7xx_l4_per1__uart3,
  3548. &dra7xx_l4_per1__uart4,
  3549. &dra7xx_l4_per1__uart5,
  3550. &dra7xx_l4_per1__uart6,
  3551. &dra7xx_l4_per2__uart7,
  3552. &dra7xx_l4_per2__uart8,
  3553. &dra7xx_l4_per2__uart9,
  3554. &dra7xx_l4_wkup__uart10,
  3555. &dra7xx_l4_per1__des,
  3556. &dra7xx_l4_per3__usb_otg_ss1,
  3557. &dra7xx_l4_per3__usb_otg_ss2,
  3558. &dra7xx_l4_per3__usb_otg_ss3,
  3559. &dra7xx_l3_main_1__vcp1,
  3560. &dra7xx_l4_per2__vcp1,
  3561. &dra7xx_l3_main_1__vcp2,
  3562. &dra7xx_l4_per2__vcp2,
  3563. &dra7xx_l4_wkup__wd_timer2,
  3564. &dra7xx_l4_per2__epwmss0,
  3565. &dra7xx_l4_per2__epwmss1,
  3566. &dra7xx_l4_per2__epwmss2,
  3567. NULL,
  3568. };
  3569. /* GP-only hwmod links */
  3570. static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
  3571. &dra7xx_l4_wkup__timer12,
  3572. &dra7xx_l4_per1__rng,
  3573. NULL,
  3574. };
  3575. /* SoC variant specific hwmod links */
  3576. static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = {
  3577. &dra7xx_l4_per3__usb_otg_ss4,
  3578. NULL,
  3579. };
  3580. static struct omap_hwmod_ocp_if *acd_76x_hwmod_ocp_ifs[] __initdata = {
  3581. NULL,
  3582. };
  3583. static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
  3584. &dra7xx_l4_per3__usb_otg_ss4,
  3585. NULL,
  3586. };
  3587. static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
  3588. NULL,
  3589. };
  3590. static struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = {
  3591. &dra7xx_l4_per3__rtcss,
  3592. NULL,
  3593. };
  3594. int __init dra7xx_hwmod_init(void)
  3595. {
  3596. int ret;
  3597. omap_hwmod_init();
  3598. ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
  3599. if (!ret && soc_is_dra74x()) {
  3600. ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
  3601. if (!ret)
  3602. ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
  3603. } else if (!ret && soc_is_dra72x()) {
  3604. ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
  3605. if (!ret && !of_machine_is_compatible("ti,dra718"))
  3606. ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
  3607. } else if (!ret && soc_is_dra76x()) {
  3608. ret = omap_hwmod_register_links(dra76x_hwmod_ocp_ifs);
  3609. if (!ret && soc_is_dra76x_acd()) {
  3610. ret = omap_hwmod_register_links(acd_76x_hwmod_ocp_ifs);
  3611. } else if (!ret && soc_is_dra76x_abz()) {
  3612. ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
  3613. }
  3614. }
  3615. if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
  3616. ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
  3617. return ret;
  3618. }