omap_hwmod_7xx_data.c 101 KB

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