omap_hwmod_7xx_data.c 101 KB

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