omap_hwmod_3xxx_data.c 90 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * The data in this file should be completely autogeneratable from
  13. * the TI hardware database or other technical documentation.
  14. *
  15. * XXX these should be marked initdata for multi-OMAP kernels
  16. */
  17. #include <linux/power/smartreflex.h>
  18. #include <linux/platform_data/gpio-omap.h>
  19. #include <plat/omap_hwmod.h>
  20. #include <plat/dma.h>
  21. #include <plat/serial.h>
  22. #include <plat/l3_3xxx.h>
  23. #include <plat/l4_3xxx.h>
  24. #include <plat/i2c.h>
  25. #include <plat/mmc.h>
  26. #include <plat/mcbsp.h>
  27. #include <plat/mcspi.h>
  28. #include <plat/dmtimer.h>
  29. #include <mach/am35xx.h>
  30. #include "soc.h"
  31. #include "omap_hwmod_common_data.h"
  32. #include "prm-regbits-34xx.h"
  33. #include "cm-regbits-34xx.h"
  34. #include "wd_timer.h"
  35. /*
  36. * OMAP3xxx hardware module integration data
  37. *
  38. * All of the data in this section should be autogeneratable from the
  39. * TI hardware database or other technical documentation. Data that
  40. * is driver-specific or driver-kernel integration-specific belongs
  41. * elsewhere.
  42. */
  43. /*
  44. * IP blocks
  45. */
  46. /* L3 */
  47. static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
  48. { .irq = 9 + OMAP_INTC_START, },
  49. { .irq = 10 + OMAP_INTC_START, },
  50. { .irq = -1 },
  51. };
  52. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  53. .name = "l3_main",
  54. .class = &l3_hwmod_class,
  55. .mpu_irqs = omap3xxx_l3_main_irqs,
  56. .flags = HWMOD_NO_IDLEST,
  57. };
  58. /* L4 CORE */
  59. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  60. .name = "l4_core",
  61. .class = &l4_hwmod_class,
  62. .flags = HWMOD_NO_IDLEST,
  63. };
  64. /* L4 PER */
  65. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  66. .name = "l4_per",
  67. .class = &l4_hwmod_class,
  68. .flags = HWMOD_NO_IDLEST,
  69. };
  70. /* L4 WKUP */
  71. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  72. .name = "l4_wkup",
  73. .class = &l4_hwmod_class,
  74. .flags = HWMOD_NO_IDLEST,
  75. };
  76. /* L4 SEC */
  77. static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
  78. .name = "l4_sec",
  79. .class = &l4_hwmod_class,
  80. .flags = HWMOD_NO_IDLEST,
  81. };
  82. /* MPU */
  83. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  84. .name = "mpu",
  85. .class = &mpu_hwmod_class,
  86. .main_clk = "arm_fck",
  87. };
  88. /* IVA2 (IVA2) */
  89. static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
  90. { .name = "logic", .rst_shift = 0, .st_shift = 8 },
  91. { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
  92. { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
  93. };
  94. static struct omap_hwmod omap3xxx_iva_hwmod = {
  95. .name = "iva",
  96. .class = &iva_hwmod_class,
  97. .clkdm_name = "iva2_clkdm",
  98. .rst_lines = omap3xxx_iva_resets,
  99. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
  100. .main_clk = "iva2_ck",
  101. .prcm = {
  102. .omap2 = {
  103. .module_offs = OMAP3430_IVA2_MOD,
  104. .prcm_reg_id = 1,
  105. .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
  106. .idlest_reg_id = 1,
  107. .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
  108. }
  109. },
  110. };
  111. /* timer class */
  112. static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
  113. .rev_offs = 0x0000,
  114. .sysc_offs = 0x0010,
  115. .syss_offs = 0x0014,
  116. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  117. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  118. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  119. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  120. .sysc_fields = &omap_hwmod_sysc_type1,
  121. };
  122. static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
  123. .name = "timer",
  124. .sysc = &omap3xxx_timer_1ms_sysc,
  125. };
  126. static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
  127. .rev_offs = 0x0000,
  128. .sysc_offs = 0x0010,
  129. .syss_offs = 0x0014,
  130. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  131. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  132. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  133. .sysc_fields = &omap_hwmod_sysc_type1,
  134. };
  135. static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
  136. .name = "timer",
  137. .sysc = &omap3xxx_timer_sysc,
  138. };
  139. /* secure timers dev attribute */
  140. static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
  141. .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
  142. };
  143. /* always-on timers dev attribute */
  144. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  145. .timer_capability = OMAP_TIMER_ALWON,
  146. };
  147. /* pwm timers dev attribute */
  148. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  149. .timer_capability = OMAP_TIMER_HAS_PWM,
  150. };
  151. /* timer1 */
  152. static struct omap_hwmod omap3xxx_timer1_hwmod = {
  153. .name = "timer1",
  154. .mpu_irqs = omap2_timer1_mpu_irqs,
  155. .main_clk = "gpt1_fck",
  156. .prcm = {
  157. .omap2 = {
  158. .prcm_reg_id = 1,
  159. .module_bit = OMAP3430_EN_GPT1_SHIFT,
  160. .module_offs = WKUP_MOD,
  161. .idlest_reg_id = 1,
  162. .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
  163. },
  164. },
  165. .dev_attr = &capability_alwon_dev_attr,
  166. .class = &omap3xxx_timer_1ms_hwmod_class,
  167. };
  168. /* timer2 */
  169. static struct omap_hwmod omap3xxx_timer2_hwmod = {
  170. .name = "timer2",
  171. .mpu_irqs = omap2_timer2_mpu_irqs,
  172. .main_clk = "gpt2_fck",
  173. .prcm = {
  174. .omap2 = {
  175. .prcm_reg_id = 1,
  176. .module_bit = OMAP3430_EN_GPT2_SHIFT,
  177. .module_offs = OMAP3430_PER_MOD,
  178. .idlest_reg_id = 1,
  179. .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
  180. },
  181. },
  182. .class = &omap3xxx_timer_1ms_hwmod_class,
  183. };
  184. /* timer3 */
  185. static struct omap_hwmod omap3xxx_timer3_hwmod = {
  186. .name = "timer3",
  187. .mpu_irqs = omap2_timer3_mpu_irqs,
  188. .main_clk = "gpt3_fck",
  189. .prcm = {
  190. .omap2 = {
  191. .prcm_reg_id = 1,
  192. .module_bit = OMAP3430_EN_GPT3_SHIFT,
  193. .module_offs = OMAP3430_PER_MOD,
  194. .idlest_reg_id = 1,
  195. .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
  196. },
  197. },
  198. .class = &omap3xxx_timer_hwmod_class,
  199. };
  200. /* timer4 */
  201. static struct omap_hwmod omap3xxx_timer4_hwmod = {
  202. .name = "timer4",
  203. .mpu_irqs = omap2_timer4_mpu_irqs,
  204. .main_clk = "gpt4_fck",
  205. .prcm = {
  206. .omap2 = {
  207. .prcm_reg_id = 1,
  208. .module_bit = OMAP3430_EN_GPT4_SHIFT,
  209. .module_offs = OMAP3430_PER_MOD,
  210. .idlest_reg_id = 1,
  211. .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
  212. },
  213. },
  214. .class = &omap3xxx_timer_hwmod_class,
  215. };
  216. /* timer5 */
  217. static struct omap_hwmod omap3xxx_timer5_hwmod = {
  218. .name = "timer5",
  219. .mpu_irqs = omap2_timer5_mpu_irqs,
  220. .main_clk = "gpt5_fck",
  221. .prcm = {
  222. .omap2 = {
  223. .prcm_reg_id = 1,
  224. .module_bit = OMAP3430_EN_GPT5_SHIFT,
  225. .module_offs = OMAP3430_PER_MOD,
  226. .idlest_reg_id = 1,
  227. .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
  228. },
  229. },
  230. .class = &omap3xxx_timer_hwmod_class,
  231. };
  232. /* timer6 */
  233. static struct omap_hwmod omap3xxx_timer6_hwmod = {
  234. .name = "timer6",
  235. .mpu_irqs = omap2_timer6_mpu_irqs,
  236. .main_clk = "gpt6_fck",
  237. .prcm = {
  238. .omap2 = {
  239. .prcm_reg_id = 1,
  240. .module_bit = OMAP3430_EN_GPT6_SHIFT,
  241. .module_offs = OMAP3430_PER_MOD,
  242. .idlest_reg_id = 1,
  243. .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
  244. },
  245. },
  246. .class = &omap3xxx_timer_hwmod_class,
  247. };
  248. /* timer7 */
  249. static struct omap_hwmod omap3xxx_timer7_hwmod = {
  250. .name = "timer7",
  251. .mpu_irqs = omap2_timer7_mpu_irqs,
  252. .main_clk = "gpt7_fck",
  253. .prcm = {
  254. .omap2 = {
  255. .prcm_reg_id = 1,
  256. .module_bit = OMAP3430_EN_GPT7_SHIFT,
  257. .module_offs = OMAP3430_PER_MOD,
  258. .idlest_reg_id = 1,
  259. .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
  260. },
  261. },
  262. .class = &omap3xxx_timer_hwmod_class,
  263. };
  264. /* timer8 */
  265. static struct omap_hwmod omap3xxx_timer8_hwmod = {
  266. .name = "timer8",
  267. .mpu_irqs = omap2_timer8_mpu_irqs,
  268. .main_clk = "gpt8_fck",
  269. .prcm = {
  270. .omap2 = {
  271. .prcm_reg_id = 1,
  272. .module_bit = OMAP3430_EN_GPT8_SHIFT,
  273. .module_offs = OMAP3430_PER_MOD,
  274. .idlest_reg_id = 1,
  275. .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
  276. },
  277. },
  278. .dev_attr = &capability_pwm_dev_attr,
  279. .class = &omap3xxx_timer_hwmod_class,
  280. };
  281. /* timer9 */
  282. static struct omap_hwmod omap3xxx_timer9_hwmod = {
  283. .name = "timer9",
  284. .mpu_irqs = omap2_timer9_mpu_irqs,
  285. .main_clk = "gpt9_fck",
  286. .prcm = {
  287. .omap2 = {
  288. .prcm_reg_id = 1,
  289. .module_bit = OMAP3430_EN_GPT9_SHIFT,
  290. .module_offs = OMAP3430_PER_MOD,
  291. .idlest_reg_id = 1,
  292. .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
  293. },
  294. },
  295. .dev_attr = &capability_pwm_dev_attr,
  296. .class = &omap3xxx_timer_hwmod_class,
  297. };
  298. /* timer10 */
  299. static struct omap_hwmod omap3xxx_timer10_hwmod = {
  300. .name = "timer10",
  301. .mpu_irqs = omap2_timer10_mpu_irqs,
  302. .main_clk = "gpt10_fck",
  303. .prcm = {
  304. .omap2 = {
  305. .prcm_reg_id = 1,
  306. .module_bit = OMAP3430_EN_GPT10_SHIFT,
  307. .module_offs = CORE_MOD,
  308. .idlest_reg_id = 1,
  309. .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
  310. },
  311. },
  312. .dev_attr = &capability_pwm_dev_attr,
  313. .class = &omap3xxx_timer_1ms_hwmod_class,
  314. };
  315. /* timer11 */
  316. static struct omap_hwmod omap3xxx_timer11_hwmod = {
  317. .name = "timer11",
  318. .mpu_irqs = omap2_timer11_mpu_irqs,
  319. .main_clk = "gpt11_fck",
  320. .prcm = {
  321. .omap2 = {
  322. .prcm_reg_id = 1,
  323. .module_bit = OMAP3430_EN_GPT11_SHIFT,
  324. .module_offs = CORE_MOD,
  325. .idlest_reg_id = 1,
  326. .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
  327. },
  328. },
  329. .dev_attr = &capability_pwm_dev_attr,
  330. .class = &omap3xxx_timer_hwmod_class,
  331. };
  332. /* timer12 */
  333. static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
  334. { .irq = 95 + OMAP_INTC_START, },
  335. { .irq = -1 },
  336. };
  337. static struct omap_hwmod omap3xxx_timer12_hwmod = {
  338. .name = "timer12",
  339. .mpu_irqs = omap3xxx_timer12_mpu_irqs,
  340. .main_clk = "gpt12_fck",
  341. .prcm = {
  342. .omap2 = {
  343. .prcm_reg_id = 1,
  344. .module_bit = OMAP3430_EN_GPT12_SHIFT,
  345. .module_offs = WKUP_MOD,
  346. .idlest_reg_id = 1,
  347. .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
  348. },
  349. },
  350. .dev_attr = &capability_secure_dev_attr,
  351. .class = &omap3xxx_timer_hwmod_class,
  352. };
  353. /*
  354. * 'wd_timer' class
  355. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  356. * overflow condition
  357. */
  358. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  359. .rev_offs = 0x0000,
  360. .sysc_offs = 0x0010,
  361. .syss_offs = 0x0014,
  362. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  363. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  364. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  365. SYSS_HAS_RESET_STATUS),
  366. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  367. .sysc_fields = &omap_hwmod_sysc_type1,
  368. };
  369. /* I2C common */
  370. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  371. .rev_offs = 0x00,
  372. .sysc_offs = 0x20,
  373. .syss_offs = 0x10,
  374. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  375. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  376. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  377. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  378. .clockact = CLOCKACT_TEST_ICLK,
  379. .sysc_fields = &omap_hwmod_sysc_type1,
  380. };
  381. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  382. .name = "wd_timer",
  383. .sysc = &omap3xxx_wd_timer_sysc,
  384. .pre_shutdown = &omap2_wd_timer_disable,
  385. .reset = &omap2_wd_timer_reset,
  386. };
  387. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  388. .name = "wd_timer2",
  389. .class = &omap3xxx_wd_timer_hwmod_class,
  390. .main_clk = "wdt2_fck",
  391. .prcm = {
  392. .omap2 = {
  393. .prcm_reg_id = 1,
  394. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  395. .module_offs = WKUP_MOD,
  396. .idlest_reg_id = 1,
  397. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  398. },
  399. },
  400. /*
  401. * XXX: Use software supervised mode, HW supervised smartidle seems to
  402. * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
  403. */
  404. .flags = HWMOD_SWSUP_SIDLE,
  405. };
  406. /* UART1 */
  407. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  408. .name = "uart1",
  409. .mpu_irqs = omap2_uart1_mpu_irqs,
  410. .sdma_reqs = omap2_uart1_sdma_reqs,
  411. .main_clk = "uart1_fck",
  412. .prcm = {
  413. .omap2 = {
  414. .module_offs = CORE_MOD,
  415. .prcm_reg_id = 1,
  416. .module_bit = OMAP3430_EN_UART1_SHIFT,
  417. .idlest_reg_id = 1,
  418. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  419. },
  420. },
  421. .class = &omap2_uart_class,
  422. };
  423. /* UART2 */
  424. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  425. .name = "uart2",
  426. .mpu_irqs = omap2_uart2_mpu_irqs,
  427. .sdma_reqs = omap2_uart2_sdma_reqs,
  428. .main_clk = "uart2_fck",
  429. .prcm = {
  430. .omap2 = {
  431. .module_offs = CORE_MOD,
  432. .prcm_reg_id = 1,
  433. .module_bit = OMAP3430_EN_UART2_SHIFT,
  434. .idlest_reg_id = 1,
  435. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  436. },
  437. },
  438. .class = &omap2_uart_class,
  439. };
  440. /* UART3 */
  441. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  442. .name = "uart3",
  443. .mpu_irqs = omap2_uart3_mpu_irqs,
  444. .sdma_reqs = omap2_uart3_sdma_reqs,
  445. .main_clk = "uart3_fck",
  446. .prcm = {
  447. .omap2 = {
  448. .module_offs = OMAP3430_PER_MOD,
  449. .prcm_reg_id = 1,
  450. .module_bit = OMAP3430_EN_UART3_SHIFT,
  451. .idlest_reg_id = 1,
  452. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  453. },
  454. },
  455. .class = &omap2_uart_class,
  456. };
  457. /* UART4 */
  458. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  459. { .irq = 80 + OMAP_INTC_START, },
  460. { .irq = -1 },
  461. };
  462. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  463. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  464. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  465. { .dma_req = -1 }
  466. };
  467. static struct omap_hwmod omap36xx_uart4_hwmod = {
  468. .name = "uart4",
  469. .mpu_irqs = uart4_mpu_irqs,
  470. .sdma_reqs = uart4_sdma_reqs,
  471. .main_clk = "uart4_fck",
  472. .prcm = {
  473. .omap2 = {
  474. .module_offs = OMAP3430_PER_MOD,
  475. .prcm_reg_id = 1,
  476. .module_bit = OMAP3630_EN_UART4_SHIFT,
  477. .idlest_reg_id = 1,
  478. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  479. },
  480. },
  481. .class = &omap2_uart_class,
  482. };
  483. static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
  484. { .irq = 84 + OMAP_INTC_START, },
  485. { .irq = -1 },
  486. };
  487. static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
  488. { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
  489. { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
  490. { .dma_req = -1 }
  491. };
  492. /*
  493. * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
  494. * uart2_fck being enabled. So we add uart1_fck as an optional clock,
  495. * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
  496. * should not be needed. The functional clock structure of the AM35xx
  497. * UART4 is extremely unclear and opaque; it is unclear what the role
  498. * of uart1/2_fck is for the UART4. Any clarification from either
  499. * empirical testing or the AM3505/3517 hardware designers would be
  500. * most welcome.
  501. */
  502. static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
  503. { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
  504. };
  505. static struct omap_hwmod am35xx_uart4_hwmod = {
  506. .name = "uart4",
  507. .mpu_irqs = am35xx_uart4_mpu_irqs,
  508. .sdma_reqs = am35xx_uart4_sdma_reqs,
  509. .main_clk = "uart4_fck",
  510. .prcm = {
  511. .omap2 = {
  512. .module_offs = CORE_MOD,
  513. .prcm_reg_id = 1,
  514. .module_bit = AM35XX_EN_UART4_SHIFT,
  515. .idlest_reg_id = 1,
  516. .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
  517. },
  518. },
  519. .opt_clks = am35xx_uart4_opt_clks,
  520. .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
  521. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  522. .class = &omap2_uart_class,
  523. };
  524. static struct omap_hwmod_class i2c_class = {
  525. .name = "i2c",
  526. .sysc = &i2c_sysc,
  527. .rev = OMAP_I2C_IP_VERSION_1,
  528. .reset = &omap_i2c_reset,
  529. };
  530. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  531. { .name = "dispc", .dma_req = 5 },
  532. { .name = "dsi1", .dma_req = 74 },
  533. { .dma_req = -1 }
  534. };
  535. /* dss */
  536. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  537. /*
  538. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  539. * driver does not use these clocks.
  540. */
  541. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  542. { .role = "tv_clk", .clk = "dss_tv_fck" },
  543. /* required only on OMAP3430 */
  544. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  545. };
  546. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  547. .name = "dss_core",
  548. .class = &omap2_dss_hwmod_class,
  549. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  550. .sdma_reqs = omap3xxx_dss_sdma_chs,
  551. .prcm = {
  552. .omap2 = {
  553. .prcm_reg_id = 1,
  554. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  555. .module_offs = OMAP3430_DSS_MOD,
  556. .idlest_reg_id = 1,
  557. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  558. },
  559. },
  560. .opt_clks = dss_opt_clks,
  561. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  562. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  563. };
  564. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  565. .name = "dss_core",
  566. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  567. .class = &omap2_dss_hwmod_class,
  568. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  569. .sdma_reqs = omap3xxx_dss_sdma_chs,
  570. .prcm = {
  571. .omap2 = {
  572. .prcm_reg_id = 1,
  573. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  574. .module_offs = OMAP3430_DSS_MOD,
  575. .idlest_reg_id = 1,
  576. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  577. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  578. },
  579. },
  580. .opt_clks = dss_opt_clks,
  581. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  582. };
  583. /*
  584. * 'dispc' class
  585. * display controller
  586. */
  587. static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
  588. .rev_offs = 0x0000,
  589. .sysc_offs = 0x0010,
  590. .syss_offs = 0x0014,
  591. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  592. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  593. SYSC_HAS_ENAWAKEUP),
  594. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  595. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  596. .sysc_fields = &omap_hwmod_sysc_type1,
  597. };
  598. static struct omap_hwmod_class omap3_dispc_hwmod_class = {
  599. .name = "dispc",
  600. .sysc = &omap3_dispc_sysc,
  601. };
  602. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  603. .name = "dss_dispc",
  604. .class = &omap3_dispc_hwmod_class,
  605. .mpu_irqs = omap2_dispc_irqs,
  606. .main_clk = "dss1_alwon_fck",
  607. .prcm = {
  608. .omap2 = {
  609. .prcm_reg_id = 1,
  610. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  611. .module_offs = OMAP3430_DSS_MOD,
  612. },
  613. },
  614. .flags = HWMOD_NO_IDLEST,
  615. .dev_attr = &omap2_3_dss_dispc_dev_attr
  616. };
  617. /*
  618. * 'dsi' class
  619. * display serial interface controller
  620. */
  621. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  622. .name = "dsi",
  623. };
  624. static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
  625. { .irq = 25 + OMAP_INTC_START, },
  626. { .irq = -1 },
  627. };
  628. /* dss_dsi1 */
  629. static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
  630. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  631. };
  632. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  633. .name = "dss_dsi1",
  634. .class = &omap3xxx_dsi_hwmod_class,
  635. .mpu_irqs = omap3xxx_dsi1_irqs,
  636. .main_clk = "dss1_alwon_fck",
  637. .prcm = {
  638. .omap2 = {
  639. .prcm_reg_id = 1,
  640. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  641. .module_offs = OMAP3430_DSS_MOD,
  642. },
  643. },
  644. .opt_clks = dss_dsi1_opt_clks,
  645. .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
  646. .flags = HWMOD_NO_IDLEST,
  647. };
  648. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  649. { .role = "ick", .clk = "dss_ick" },
  650. };
  651. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  652. .name = "dss_rfbi",
  653. .class = &omap2_rfbi_hwmod_class,
  654. .main_clk = "dss1_alwon_fck",
  655. .prcm = {
  656. .omap2 = {
  657. .prcm_reg_id = 1,
  658. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  659. .module_offs = OMAP3430_DSS_MOD,
  660. },
  661. },
  662. .opt_clks = dss_rfbi_opt_clks,
  663. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  664. .flags = HWMOD_NO_IDLEST,
  665. };
  666. static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
  667. /* required only on OMAP3430 */
  668. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  669. };
  670. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  671. .name = "dss_venc",
  672. .class = &omap2_venc_hwmod_class,
  673. .main_clk = "dss_tv_fck",
  674. .prcm = {
  675. .omap2 = {
  676. .prcm_reg_id = 1,
  677. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  678. .module_offs = OMAP3430_DSS_MOD,
  679. },
  680. },
  681. .opt_clks = dss_venc_opt_clks,
  682. .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
  683. .flags = HWMOD_NO_IDLEST,
  684. };
  685. /* I2C1 */
  686. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  687. .fifo_depth = 8, /* bytes */
  688. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  689. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  690. OMAP_I2C_FLAG_BUS_SHIFT_2,
  691. };
  692. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  693. .name = "i2c1",
  694. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  695. .mpu_irqs = omap2_i2c1_mpu_irqs,
  696. .sdma_reqs = omap2_i2c1_sdma_reqs,
  697. .main_clk = "i2c1_fck",
  698. .prcm = {
  699. .omap2 = {
  700. .module_offs = CORE_MOD,
  701. .prcm_reg_id = 1,
  702. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  703. .idlest_reg_id = 1,
  704. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  705. },
  706. },
  707. .class = &i2c_class,
  708. .dev_attr = &i2c1_dev_attr,
  709. };
  710. /* I2C2 */
  711. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  712. .fifo_depth = 8, /* bytes */
  713. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  714. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  715. OMAP_I2C_FLAG_BUS_SHIFT_2,
  716. };
  717. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  718. .name = "i2c2",
  719. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  720. .mpu_irqs = omap2_i2c2_mpu_irqs,
  721. .sdma_reqs = omap2_i2c2_sdma_reqs,
  722. .main_clk = "i2c2_fck",
  723. .prcm = {
  724. .omap2 = {
  725. .module_offs = CORE_MOD,
  726. .prcm_reg_id = 1,
  727. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  728. .idlest_reg_id = 1,
  729. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  730. },
  731. },
  732. .class = &i2c_class,
  733. .dev_attr = &i2c2_dev_attr,
  734. };
  735. /* I2C3 */
  736. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  737. .fifo_depth = 64, /* bytes */
  738. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  739. OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
  740. OMAP_I2C_FLAG_BUS_SHIFT_2,
  741. };
  742. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  743. { .irq = 61 + OMAP_INTC_START, },
  744. { .irq = -1 },
  745. };
  746. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  747. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  748. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  749. { .dma_req = -1 }
  750. };
  751. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  752. .name = "i2c3",
  753. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  754. .mpu_irqs = i2c3_mpu_irqs,
  755. .sdma_reqs = i2c3_sdma_reqs,
  756. .main_clk = "i2c3_fck",
  757. .prcm = {
  758. .omap2 = {
  759. .module_offs = CORE_MOD,
  760. .prcm_reg_id = 1,
  761. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  762. .idlest_reg_id = 1,
  763. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  764. },
  765. },
  766. .class = &i2c_class,
  767. .dev_attr = &i2c3_dev_attr,
  768. };
  769. /*
  770. * 'gpio' class
  771. * general purpose io module
  772. */
  773. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  774. .rev_offs = 0x0000,
  775. .sysc_offs = 0x0010,
  776. .syss_offs = 0x0014,
  777. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  778. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  779. SYSS_HAS_RESET_STATUS),
  780. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  781. .sysc_fields = &omap_hwmod_sysc_type1,
  782. };
  783. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  784. .name = "gpio",
  785. .sysc = &omap3xxx_gpio_sysc,
  786. .rev = 1,
  787. };
  788. /* gpio_dev_attr */
  789. static struct omap_gpio_dev_attr gpio_dev_attr = {
  790. .bank_width = 32,
  791. .dbck_flag = true,
  792. };
  793. /* gpio1 */
  794. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  795. { .role = "dbclk", .clk = "gpio1_dbck", },
  796. };
  797. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  798. .name = "gpio1",
  799. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  800. .mpu_irqs = omap2_gpio1_irqs,
  801. .main_clk = "gpio1_ick",
  802. .opt_clks = gpio1_opt_clks,
  803. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  804. .prcm = {
  805. .omap2 = {
  806. .prcm_reg_id = 1,
  807. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  808. .module_offs = WKUP_MOD,
  809. .idlest_reg_id = 1,
  810. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  811. },
  812. },
  813. .class = &omap3xxx_gpio_hwmod_class,
  814. .dev_attr = &gpio_dev_attr,
  815. };
  816. /* gpio2 */
  817. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  818. { .role = "dbclk", .clk = "gpio2_dbck", },
  819. };
  820. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  821. .name = "gpio2",
  822. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  823. .mpu_irqs = omap2_gpio2_irqs,
  824. .main_clk = "gpio2_ick",
  825. .opt_clks = gpio2_opt_clks,
  826. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  827. .prcm = {
  828. .omap2 = {
  829. .prcm_reg_id = 1,
  830. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  831. .module_offs = OMAP3430_PER_MOD,
  832. .idlest_reg_id = 1,
  833. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  834. },
  835. },
  836. .class = &omap3xxx_gpio_hwmod_class,
  837. .dev_attr = &gpio_dev_attr,
  838. };
  839. /* gpio3 */
  840. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  841. { .role = "dbclk", .clk = "gpio3_dbck", },
  842. };
  843. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  844. .name = "gpio3",
  845. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  846. .mpu_irqs = omap2_gpio3_irqs,
  847. .main_clk = "gpio3_ick",
  848. .opt_clks = gpio3_opt_clks,
  849. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  850. .prcm = {
  851. .omap2 = {
  852. .prcm_reg_id = 1,
  853. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  854. .module_offs = OMAP3430_PER_MOD,
  855. .idlest_reg_id = 1,
  856. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  857. },
  858. },
  859. .class = &omap3xxx_gpio_hwmod_class,
  860. .dev_attr = &gpio_dev_attr,
  861. };
  862. /* gpio4 */
  863. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  864. { .role = "dbclk", .clk = "gpio4_dbck", },
  865. };
  866. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  867. .name = "gpio4",
  868. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  869. .mpu_irqs = omap2_gpio4_irqs,
  870. .main_clk = "gpio4_ick",
  871. .opt_clks = gpio4_opt_clks,
  872. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  873. .prcm = {
  874. .omap2 = {
  875. .prcm_reg_id = 1,
  876. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  877. .module_offs = OMAP3430_PER_MOD,
  878. .idlest_reg_id = 1,
  879. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  880. },
  881. },
  882. .class = &omap3xxx_gpio_hwmod_class,
  883. .dev_attr = &gpio_dev_attr,
  884. };
  885. /* gpio5 */
  886. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  887. { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
  888. { .irq = -1 },
  889. };
  890. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  891. { .role = "dbclk", .clk = "gpio5_dbck", },
  892. };
  893. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  894. .name = "gpio5",
  895. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  896. .mpu_irqs = omap3xxx_gpio5_irqs,
  897. .main_clk = "gpio5_ick",
  898. .opt_clks = gpio5_opt_clks,
  899. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  900. .prcm = {
  901. .omap2 = {
  902. .prcm_reg_id = 1,
  903. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  904. .module_offs = OMAP3430_PER_MOD,
  905. .idlest_reg_id = 1,
  906. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  907. },
  908. },
  909. .class = &omap3xxx_gpio_hwmod_class,
  910. .dev_attr = &gpio_dev_attr,
  911. };
  912. /* gpio6 */
  913. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  914. { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
  915. { .irq = -1 },
  916. };
  917. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  918. { .role = "dbclk", .clk = "gpio6_dbck", },
  919. };
  920. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  921. .name = "gpio6",
  922. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  923. .mpu_irqs = omap3xxx_gpio6_irqs,
  924. .main_clk = "gpio6_ick",
  925. .opt_clks = gpio6_opt_clks,
  926. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  927. .prcm = {
  928. .omap2 = {
  929. .prcm_reg_id = 1,
  930. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  931. .module_offs = OMAP3430_PER_MOD,
  932. .idlest_reg_id = 1,
  933. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  934. },
  935. },
  936. .class = &omap3xxx_gpio_hwmod_class,
  937. .dev_attr = &gpio_dev_attr,
  938. };
  939. /* dma attributes */
  940. static struct omap_dma_dev_attr dma_dev_attr = {
  941. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  942. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  943. .lch_count = 32,
  944. };
  945. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  946. .rev_offs = 0x0000,
  947. .sysc_offs = 0x002c,
  948. .syss_offs = 0x0028,
  949. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  950. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  951. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  952. SYSS_HAS_RESET_STATUS),
  953. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  954. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  955. .sysc_fields = &omap_hwmod_sysc_type1,
  956. };
  957. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  958. .name = "dma",
  959. .sysc = &omap3xxx_dma_sysc,
  960. };
  961. /* dma_system */
  962. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  963. .name = "dma",
  964. .class = &omap3xxx_dma_hwmod_class,
  965. .mpu_irqs = omap2_dma_system_irqs,
  966. .main_clk = "core_l3_ick",
  967. .prcm = {
  968. .omap2 = {
  969. .module_offs = CORE_MOD,
  970. .prcm_reg_id = 1,
  971. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  972. .idlest_reg_id = 1,
  973. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  974. },
  975. },
  976. .dev_attr = &dma_dev_attr,
  977. .flags = HWMOD_NO_IDLEST,
  978. };
  979. /*
  980. * 'mcbsp' class
  981. * multi channel buffered serial port controller
  982. */
  983. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  984. .sysc_offs = 0x008c,
  985. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  986. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  987. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  988. .sysc_fields = &omap_hwmod_sysc_type1,
  989. .clockact = 0x2,
  990. };
  991. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  992. .name = "mcbsp",
  993. .sysc = &omap3xxx_mcbsp_sysc,
  994. .rev = MCBSP_CONFIG_TYPE3,
  995. };
  996. /* McBSP functional clock mapping */
  997. static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
  998. { .role = "pad_fck", .clk = "mcbsp_clks" },
  999. { .role = "prcm_fck", .clk = "core_96m_fck" },
  1000. };
  1001. static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
  1002. { .role = "pad_fck", .clk = "mcbsp_clks" },
  1003. { .role = "prcm_fck", .clk = "per_96m_fck" },
  1004. };
  1005. /* mcbsp1 */
  1006. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  1007. { .name = "common", .irq = 16 + OMAP_INTC_START, },
  1008. { .name = "tx", .irq = 59 + OMAP_INTC_START, },
  1009. { .name = "rx", .irq = 60 + OMAP_INTC_START, },
  1010. { .irq = -1 },
  1011. };
  1012. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  1013. .name = "mcbsp1",
  1014. .class = &omap3xxx_mcbsp_hwmod_class,
  1015. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  1016. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1017. .main_clk = "mcbsp1_fck",
  1018. .prcm = {
  1019. .omap2 = {
  1020. .prcm_reg_id = 1,
  1021. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  1022. .module_offs = CORE_MOD,
  1023. .idlest_reg_id = 1,
  1024. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  1025. },
  1026. },
  1027. .opt_clks = mcbsp15_opt_clks,
  1028. .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
  1029. };
  1030. /* mcbsp2 */
  1031. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  1032. { .name = "common", .irq = 17 + OMAP_INTC_START, },
  1033. { .name = "tx", .irq = 62 + OMAP_INTC_START, },
  1034. { .name = "rx", .irq = 63 + OMAP_INTC_START, },
  1035. { .irq = -1 },
  1036. };
  1037. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  1038. .sidetone = "mcbsp2_sidetone",
  1039. };
  1040. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  1041. .name = "mcbsp2",
  1042. .class = &omap3xxx_mcbsp_hwmod_class,
  1043. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  1044. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1045. .main_clk = "mcbsp2_fck",
  1046. .prcm = {
  1047. .omap2 = {
  1048. .prcm_reg_id = 1,
  1049. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  1050. .module_offs = OMAP3430_PER_MOD,
  1051. .idlest_reg_id = 1,
  1052. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  1053. },
  1054. },
  1055. .opt_clks = mcbsp234_opt_clks,
  1056. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1057. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  1058. };
  1059. /* mcbsp3 */
  1060. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  1061. { .name = "common", .irq = 22 + OMAP_INTC_START, },
  1062. { .name = "tx", .irq = 89 + OMAP_INTC_START, },
  1063. { .name = "rx", .irq = 90 + OMAP_INTC_START, },
  1064. { .irq = -1 },
  1065. };
  1066. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  1067. .sidetone = "mcbsp3_sidetone",
  1068. };
  1069. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  1070. .name = "mcbsp3",
  1071. .class = &omap3xxx_mcbsp_hwmod_class,
  1072. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  1073. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  1074. .main_clk = "mcbsp3_fck",
  1075. .prcm = {
  1076. .omap2 = {
  1077. .prcm_reg_id = 1,
  1078. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  1079. .module_offs = OMAP3430_PER_MOD,
  1080. .idlest_reg_id = 1,
  1081. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  1082. },
  1083. },
  1084. .opt_clks = mcbsp234_opt_clks,
  1085. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1086. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  1087. };
  1088. /* mcbsp4 */
  1089. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  1090. { .name = "common", .irq = 23 + OMAP_INTC_START, },
  1091. { .name = "tx", .irq = 54 + OMAP_INTC_START, },
  1092. { .name = "rx", .irq = 55 + OMAP_INTC_START, },
  1093. { .irq = -1 },
  1094. };
  1095. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  1096. { .name = "rx", .dma_req = 20 },
  1097. { .name = "tx", .dma_req = 19 },
  1098. { .dma_req = -1 }
  1099. };
  1100. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  1101. .name = "mcbsp4",
  1102. .class = &omap3xxx_mcbsp_hwmod_class,
  1103. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  1104. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  1105. .main_clk = "mcbsp4_fck",
  1106. .prcm = {
  1107. .omap2 = {
  1108. .prcm_reg_id = 1,
  1109. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  1110. .module_offs = OMAP3430_PER_MOD,
  1111. .idlest_reg_id = 1,
  1112. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  1113. },
  1114. },
  1115. .opt_clks = mcbsp234_opt_clks,
  1116. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1117. };
  1118. /* mcbsp5 */
  1119. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  1120. { .name = "common", .irq = 27 + OMAP_INTC_START, },
  1121. { .name = "tx", .irq = 81 + OMAP_INTC_START, },
  1122. { .name = "rx", .irq = 82 + OMAP_INTC_START, },
  1123. { .irq = -1 },
  1124. };
  1125. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  1126. { .name = "rx", .dma_req = 22 },
  1127. { .name = "tx", .dma_req = 21 },
  1128. { .dma_req = -1 }
  1129. };
  1130. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  1131. .name = "mcbsp5",
  1132. .class = &omap3xxx_mcbsp_hwmod_class,
  1133. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  1134. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  1135. .main_clk = "mcbsp5_fck",
  1136. .prcm = {
  1137. .omap2 = {
  1138. .prcm_reg_id = 1,
  1139. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  1140. .module_offs = CORE_MOD,
  1141. .idlest_reg_id = 1,
  1142. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  1143. },
  1144. },
  1145. .opt_clks = mcbsp15_opt_clks,
  1146. .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
  1147. };
  1148. /* 'mcbsp sidetone' class */
  1149. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  1150. .sysc_offs = 0x0010,
  1151. .sysc_flags = SYSC_HAS_AUTOIDLE,
  1152. .sysc_fields = &omap_hwmod_sysc_type1,
  1153. };
  1154. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  1155. .name = "mcbsp_sidetone",
  1156. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  1157. };
  1158. /* mcbsp2_sidetone */
  1159. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  1160. { .name = "irq", .irq = 4 + OMAP_INTC_START, },
  1161. { .irq = -1 },
  1162. };
  1163. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  1164. .name = "mcbsp2_sidetone",
  1165. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  1166. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  1167. .main_clk = "mcbsp2_fck",
  1168. .prcm = {
  1169. .omap2 = {
  1170. .prcm_reg_id = 1,
  1171. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  1172. .module_offs = OMAP3430_PER_MOD,
  1173. .idlest_reg_id = 1,
  1174. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  1175. },
  1176. },
  1177. };
  1178. /* mcbsp3_sidetone */
  1179. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  1180. { .name = "irq", .irq = 5 + OMAP_INTC_START, },
  1181. { .irq = -1 },
  1182. };
  1183. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  1184. .name = "mcbsp3_sidetone",
  1185. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  1186. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  1187. .main_clk = "mcbsp3_fck",
  1188. .prcm = {
  1189. .omap2 = {
  1190. .prcm_reg_id = 1,
  1191. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  1192. .module_offs = OMAP3430_PER_MOD,
  1193. .idlest_reg_id = 1,
  1194. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  1195. },
  1196. },
  1197. };
  1198. /* SR common */
  1199. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  1200. .clkact_shift = 20,
  1201. };
  1202. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  1203. .sysc_offs = 0x24,
  1204. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  1205. .clockact = CLOCKACT_TEST_ICLK,
  1206. .sysc_fields = &omap34xx_sr_sysc_fields,
  1207. };
  1208. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  1209. .name = "smartreflex",
  1210. .sysc = &omap34xx_sr_sysc,
  1211. .rev = 1,
  1212. };
  1213. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  1214. .sidle_shift = 24,
  1215. .enwkup_shift = 26,
  1216. };
  1217. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  1218. .sysc_offs = 0x38,
  1219. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1220. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1221. SYSC_NO_CACHE),
  1222. .sysc_fields = &omap36xx_sr_sysc_fields,
  1223. };
  1224. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  1225. .name = "smartreflex",
  1226. .sysc = &omap36xx_sr_sysc,
  1227. .rev = 2,
  1228. };
  1229. /* SR1 */
  1230. static struct omap_smartreflex_dev_attr sr1_dev_attr = {
  1231. .sensor_voltdm_name = "mpu_iva",
  1232. };
  1233. static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
  1234. { .irq = 18 + OMAP_INTC_START, },
  1235. { .irq = -1 },
  1236. };
  1237. static struct omap_hwmod omap34xx_sr1_hwmod = {
  1238. .name = "smartreflex_mpu_iva",
  1239. .class = &omap34xx_smartreflex_hwmod_class,
  1240. .main_clk = "sr1_fck",
  1241. .prcm = {
  1242. .omap2 = {
  1243. .prcm_reg_id = 1,
  1244. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1245. .module_offs = WKUP_MOD,
  1246. .idlest_reg_id = 1,
  1247. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1248. },
  1249. },
  1250. .dev_attr = &sr1_dev_attr,
  1251. .mpu_irqs = omap3_smartreflex_mpu_irqs,
  1252. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1253. };
  1254. static struct omap_hwmod omap36xx_sr1_hwmod = {
  1255. .name = "smartreflex_mpu_iva",
  1256. .class = &omap36xx_smartreflex_hwmod_class,
  1257. .main_clk = "sr1_fck",
  1258. .prcm = {
  1259. .omap2 = {
  1260. .prcm_reg_id = 1,
  1261. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1262. .module_offs = WKUP_MOD,
  1263. .idlest_reg_id = 1,
  1264. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1265. },
  1266. },
  1267. .dev_attr = &sr1_dev_attr,
  1268. .mpu_irqs = omap3_smartreflex_mpu_irqs,
  1269. };
  1270. /* SR2 */
  1271. static struct omap_smartreflex_dev_attr sr2_dev_attr = {
  1272. .sensor_voltdm_name = "core",
  1273. };
  1274. static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
  1275. { .irq = 19 + OMAP_INTC_START, },
  1276. { .irq = -1 },
  1277. };
  1278. static struct omap_hwmod omap34xx_sr2_hwmod = {
  1279. .name = "smartreflex_core",
  1280. .class = &omap34xx_smartreflex_hwmod_class,
  1281. .main_clk = "sr2_fck",
  1282. .prcm = {
  1283. .omap2 = {
  1284. .prcm_reg_id = 1,
  1285. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1286. .module_offs = WKUP_MOD,
  1287. .idlest_reg_id = 1,
  1288. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1289. },
  1290. },
  1291. .dev_attr = &sr2_dev_attr,
  1292. .mpu_irqs = omap3_smartreflex_core_irqs,
  1293. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1294. };
  1295. static struct omap_hwmod omap36xx_sr2_hwmod = {
  1296. .name = "smartreflex_core",
  1297. .class = &omap36xx_smartreflex_hwmod_class,
  1298. .main_clk = "sr2_fck",
  1299. .prcm = {
  1300. .omap2 = {
  1301. .prcm_reg_id = 1,
  1302. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1303. .module_offs = WKUP_MOD,
  1304. .idlest_reg_id = 1,
  1305. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1306. },
  1307. },
  1308. .dev_attr = &sr2_dev_attr,
  1309. .mpu_irqs = omap3_smartreflex_core_irqs,
  1310. };
  1311. /*
  1312. * 'mailbox' class
  1313. * mailbox module allowing communication between the on-chip processors
  1314. * using a queued mailbox-interrupt mechanism.
  1315. */
  1316. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  1317. .rev_offs = 0x000,
  1318. .sysc_offs = 0x010,
  1319. .syss_offs = 0x014,
  1320. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1321. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1322. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1323. .sysc_fields = &omap_hwmod_sysc_type1,
  1324. };
  1325. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  1326. .name = "mailbox",
  1327. .sysc = &omap3xxx_mailbox_sysc,
  1328. };
  1329. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  1330. { .irq = 26 + OMAP_INTC_START, },
  1331. { .irq = -1 },
  1332. };
  1333. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  1334. .name = "mailbox",
  1335. .class = &omap3xxx_mailbox_hwmod_class,
  1336. .mpu_irqs = omap3xxx_mailbox_irqs,
  1337. .main_clk = "mailboxes_ick",
  1338. .prcm = {
  1339. .omap2 = {
  1340. .prcm_reg_id = 1,
  1341. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  1342. .module_offs = CORE_MOD,
  1343. .idlest_reg_id = 1,
  1344. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  1345. },
  1346. },
  1347. };
  1348. /*
  1349. * 'mcspi' class
  1350. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1351. * bus
  1352. */
  1353. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1354. .rev_offs = 0x0000,
  1355. .sysc_offs = 0x0010,
  1356. .syss_offs = 0x0014,
  1357. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1358. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1359. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1360. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1361. .sysc_fields = &omap_hwmod_sysc_type1,
  1362. };
  1363. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1364. .name = "mcspi",
  1365. .sysc = &omap34xx_mcspi_sysc,
  1366. .rev = OMAP3_MCSPI_REV,
  1367. };
  1368. /* mcspi1 */
  1369. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1370. .num_chipselect = 4,
  1371. };
  1372. static struct omap_hwmod omap34xx_mcspi1 = {
  1373. .name = "mcspi1",
  1374. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1375. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1376. .main_clk = "mcspi1_fck",
  1377. .prcm = {
  1378. .omap2 = {
  1379. .module_offs = CORE_MOD,
  1380. .prcm_reg_id = 1,
  1381. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1382. .idlest_reg_id = 1,
  1383. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1384. },
  1385. },
  1386. .class = &omap34xx_mcspi_class,
  1387. .dev_attr = &omap_mcspi1_dev_attr,
  1388. };
  1389. /* mcspi2 */
  1390. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1391. .num_chipselect = 2,
  1392. };
  1393. static struct omap_hwmod omap34xx_mcspi2 = {
  1394. .name = "mcspi2",
  1395. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1396. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1397. .main_clk = "mcspi2_fck",
  1398. .prcm = {
  1399. .omap2 = {
  1400. .module_offs = CORE_MOD,
  1401. .prcm_reg_id = 1,
  1402. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1403. .idlest_reg_id = 1,
  1404. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1405. },
  1406. },
  1407. .class = &omap34xx_mcspi_class,
  1408. .dev_attr = &omap_mcspi2_dev_attr,
  1409. };
  1410. /* mcspi3 */
  1411. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1412. { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
  1413. { .irq = -1 },
  1414. };
  1415. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1416. { .name = "tx0", .dma_req = 15 },
  1417. { .name = "rx0", .dma_req = 16 },
  1418. { .name = "tx1", .dma_req = 23 },
  1419. { .name = "rx1", .dma_req = 24 },
  1420. { .dma_req = -1 }
  1421. };
  1422. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1423. .num_chipselect = 2,
  1424. };
  1425. static struct omap_hwmod omap34xx_mcspi3 = {
  1426. .name = "mcspi3",
  1427. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1428. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1429. .main_clk = "mcspi3_fck",
  1430. .prcm = {
  1431. .omap2 = {
  1432. .module_offs = CORE_MOD,
  1433. .prcm_reg_id = 1,
  1434. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1435. .idlest_reg_id = 1,
  1436. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1437. },
  1438. },
  1439. .class = &omap34xx_mcspi_class,
  1440. .dev_attr = &omap_mcspi3_dev_attr,
  1441. };
  1442. /* mcspi4 */
  1443. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1444. { .name = "irq", .irq = 48 + OMAP_INTC_START, },
  1445. { .irq = -1 },
  1446. };
  1447. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1448. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1449. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1450. { .dma_req = -1 }
  1451. };
  1452. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1453. .num_chipselect = 1,
  1454. };
  1455. static struct omap_hwmod omap34xx_mcspi4 = {
  1456. .name = "mcspi4",
  1457. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1458. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1459. .main_clk = "mcspi4_fck",
  1460. .prcm = {
  1461. .omap2 = {
  1462. .module_offs = CORE_MOD,
  1463. .prcm_reg_id = 1,
  1464. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1465. .idlest_reg_id = 1,
  1466. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1467. },
  1468. },
  1469. .class = &omap34xx_mcspi_class,
  1470. .dev_attr = &omap_mcspi4_dev_attr,
  1471. };
  1472. /* usbhsotg */
  1473. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  1474. .rev_offs = 0x0400,
  1475. .sysc_offs = 0x0404,
  1476. .syss_offs = 0x0408,
  1477. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1478. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1479. SYSC_HAS_AUTOIDLE),
  1480. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1481. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1482. .sysc_fields = &omap_hwmod_sysc_type1,
  1483. };
  1484. static struct omap_hwmod_class usbotg_class = {
  1485. .name = "usbotg",
  1486. .sysc = &omap3xxx_usbhsotg_sysc,
  1487. };
  1488. /* usb_otg_hs */
  1489. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  1490. { .name = "mc", .irq = 92 + OMAP_INTC_START, },
  1491. { .name = "dma", .irq = 93 + OMAP_INTC_START, },
  1492. { .irq = -1 },
  1493. };
  1494. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  1495. .name = "usb_otg_hs",
  1496. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  1497. .main_clk = "hsotgusb_ick",
  1498. .prcm = {
  1499. .omap2 = {
  1500. .prcm_reg_id = 1,
  1501. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  1502. .module_offs = CORE_MOD,
  1503. .idlest_reg_id = 1,
  1504. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  1505. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  1506. },
  1507. },
  1508. .class = &usbotg_class,
  1509. /*
  1510. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1511. * broken when autoidle is enabled
  1512. * workaround is to disable the autoidle bit at module level.
  1513. */
  1514. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1515. | HWMOD_SWSUP_MSTANDBY,
  1516. };
  1517. /* usb_otg_hs */
  1518. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  1519. { .name = "mc", .irq = 71 + OMAP_INTC_START, },
  1520. { .irq = -1 },
  1521. };
  1522. static struct omap_hwmod_class am35xx_usbotg_class = {
  1523. .name = "am35xx_usbotg",
  1524. };
  1525. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  1526. .name = "am35x_otg_hs",
  1527. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  1528. .main_clk = "hsotgusb_fck",
  1529. .class = &am35xx_usbotg_class,
  1530. .flags = HWMOD_NO_IDLEST,
  1531. };
  1532. /* MMC/SD/SDIO common */
  1533. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  1534. .rev_offs = 0x1fc,
  1535. .sysc_offs = 0x10,
  1536. .syss_offs = 0x14,
  1537. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1538. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1539. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1540. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1541. .sysc_fields = &omap_hwmod_sysc_type1,
  1542. };
  1543. static struct omap_hwmod_class omap34xx_mmc_class = {
  1544. .name = "mmc",
  1545. .sysc = &omap34xx_mmc_sysc,
  1546. };
  1547. /* MMC/SD/SDIO1 */
  1548. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  1549. { .irq = 83 + OMAP_INTC_START, },
  1550. { .irq = -1 },
  1551. };
  1552. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  1553. { .name = "tx", .dma_req = 61, },
  1554. { .name = "rx", .dma_req = 62, },
  1555. { .dma_req = -1 }
  1556. };
  1557. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  1558. { .role = "dbck", .clk = "omap_32k_fck", },
  1559. };
  1560. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1561. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1562. };
  1563. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  1564. static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
  1565. .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
  1566. OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
  1567. };
  1568. static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
  1569. .name = "mmc1",
  1570. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  1571. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  1572. .opt_clks = omap34xx_mmc1_opt_clks,
  1573. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  1574. .main_clk = "mmchs1_fck",
  1575. .prcm = {
  1576. .omap2 = {
  1577. .module_offs = CORE_MOD,
  1578. .prcm_reg_id = 1,
  1579. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  1580. .idlest_reg_id = 1,
  1581. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  1582. },
  1583. },
  1584. .dev_attr = &mmc1_pre_es3_dev_attr,
  1585. .class = &omap34xx_mmc_class,
  1586. };
  1587. static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
  1588. .name = "mmc1",
  1589. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  1590. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  1591. .opt_clks = omap34xx_mmc1_opt_clks,
  1592. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  1593. .main_clk = "mmchs1_fck",
  1594. .prcm = {
  1595. .omap2 = {
  1596. .module_offs = CORE_MOD,
  1597. .prcm_reg_id = 1,
  1598. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  1599. .idlest_reg_id = 1,
  1600. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  1601. },
  1602. },
  1603. .dev_attr = &mmc1_dev_attr,
  1604. .class = &omap34xx_mmc_class,
  1605. };
  1606. /* MMC/SD/SDIO2 */
  1607. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  1608. { .irq = 86 + OMAP_INTC_START, },
  1609. { .irq = -1 },
  1610. };
  1611. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  1612. { .name = "tx", .dma_req = 47, },
  1613. { .name = "rx", .dma_req = 48, },
  1614. { .dma_req = -1 }
  1615. };
  1616. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  1617. { .role = "dbck", .clk = "omap_32k_fck", },
  1618. };
  1619. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  1620. static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
  1621. .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
  1622. };
  1623. static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
  1624. .name = "mmc2",
  1625. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  1626. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  1627. .opt_clks = omap34xx_mmc2_opt_clks,
  1628. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  1629. .main_clk = "mmchs2_fck",
  1630. .prcm = {
  1631. .omap2 = {
  1632. .module_offs = CORE_MOD,
  1633. .prcm_reg_id = 1,
  1634. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  1635. .idlest_reg_id = 1,
  1636. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  1637. },
  1638. },
  1639. .dev_attr = &mmc2_pre_es3_dev_attr,
  1640. .class = &omap34xx_mmc_class,
  1641. };
  1642. static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
  1643. .name = "mmc2",
  1644. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  1645. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  1646. .opt_clks = omap34xx_mmc2_opt_clks,
  1647. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  1648. .main_clk = "mmchs2_fck",
  1649. .prcm = {
  1650. .omap2 = {
  1651. .module_offs = CORE_MOD,
  1652. .prcm_reg_id = 1,
  1653. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  1654. .idlest_reg_id = 1,
  1655. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  1656. },
  1657. },
  1658. .class = &omap34xx_mmc_class,
  1659. };
  1660. /* MMC/SD/SDIO3 */
  1661. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  1662. { .irq = 94 + OMAP_INTC_START, },
  1663. { .irq = -1 },
  1664. };
  1665. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  1666. { .name = "tx", .dma_req = 77, },
  1667. { .name = "rx", .dma_req = 78, },
  1668. { .dma_req = -1 }
  1669. };
  1670. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  1671. { .role = "dbck", .clk = "omap_32k_fck", },
  1672. };
  1673. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  1674. .name = "mmc3",
  1675. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  1676. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  1677. .opt_clks = omap34xx_mmc3_opt_clks,
  1678. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  1679. .main_clk = "mmchs3_fck",
  1680. .prcm = {
  1681. .omap2 = {
  1682. .prcm_reg_id = 1,
  1683. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  1684. .idlest_reg_id = 1,
  1685. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  1686. },
  1687. },
  1688. .class = &omap34xx_mmc_class,
  1689. };
  1690. /*
  1691. * 'usb_host_hs' class
  1692. * high-speed multi-port usb host controller
  1693. */
  1694. static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
  1695. .rev_offs = 0x0000,
  1696. .sysc_offs = 0x0010,
  1697. .syss_offs = 0x0014,
  1698. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1699. SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1700. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1701. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1702. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1703. .sysc_fields = &omap_hwmod_sysc_type1,
  1704. };
  1705. static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
  1706. .name = "usb_host_hs",
  1707. .sysc = &omap3xxx_usb_host_hs_sysc,
  1708. };
  1709. static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
  1710. { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
  1711. };
  1712. static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
  1713. { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
  1714. { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
  1715. { .irq = -1 },
  1716. };
  1717. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
  1718. .name = "usb_host_hs",
  1719. .class = &omap3xxx_usb_host_hs_hwmod_class,
  1720. .clkdm_name = "l3_init_clkdm",
  1721. .mpu_irqs = omap3xxx_usb_host_hs_irqs,
  1722. .main_clk = "usbhost_48m_fck",
  1723. .prcm = {
  1724. .omap2 = {
  1725. .module_offs = OMAP3430ES2_USBHOST_MOD,
  1726. .prcm_reg_id = 1,
  1727. .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
  1728. .idlest_reg_id = 1,
  1729. .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
  1730. .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
  1731. },
  1732. },
  1733. .opt_clks = omap3xxx_usb_host_hs_opt_clks,
  1734. .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
  1735. /*
  1736. * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
  1737. * id: i660
  1738. *
  1739. * Description:
  1740. * In the following configuration :
  1741. * - USBHOST module is set to smart-idle mode
  1742. * - PRCM asserts idle_req to the USBHOST module ( This typically
  1743. * happens when the system is going to a low power mode : all ports
  1744. * have been suspended, the master part of the USBHOST module has
  1745. * entered the standby state, and SW has cut the functional clocks)
  1746. * - an USBHOST interrupt occurs before the module is able to answer
  1747. * idle_ack, typically a remote wakeup IRQ.
  1748. * Then the USB HOST module will enter a deadlock situation where it
  1749. * is no more accessible nor functional.
  1750. *
  1751. * Workaround:
  1752. * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
  1753. */
  1754. /*
  1755. * Errata: USB host EHCI may stall when entering smart-standby mode
  1756. * Id: i571
  1757. *
  1758. * Description:
  1759. * When the USBHOST module is set to smart-standby mode, and when it is
  1760. * ready to enter the standby state (i.e. all ports are suspended and
  1761. * all attached devices are in suspend mode), then it can wrongly assert
  1762. * the Mstandby signal too early while there are still some residual OCP
  1763. * transactions ongoing. If this condition occurs, the internal state
  1764. * machine may go to an undefined state and the USB link may be stuck
  1765. * upon the next resume.
  1766. *
  1767. * Workaround:
  1768. * Don't use smart standby; use only force standby,
  1769. * hence HWMOD_SWSUP_MSTANDBY
  1770. */
  1771. /*
  1772. * During system boot; If the hwmod framework resets the module
  1773. * the module will have smart idle settings; which can lead to deadlock
  1774. * (above Errata Id:i660); so, dont reset the module during boot;
  1775. * Use HWMOD_INIT_NO_RESET.
  1776. */
  1777. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  1778. HWMOD_INIT_NO_RESET,
  1779. };
  1780. /*
  1781. * 'usb_tll_hs' class
  1782. * usb_tll_hs module is the adapter on the usb_host_hs ports
  1783. */
  1784. static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
  1785. .rev_offs = 0x0000,
  1786. .sysc_offs = 0x0010,
  1787. .syss_offs = 0x0014,
  1788. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1789. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1790. SYSC_HAS_AUTOIDLE),
  1791. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1792. .sysc_fields = &omap_hwmod_sysc_type1,
  1793. };
  1794. static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
  1795. .name = "usb_tll_hs",
  1796. .sysc = &omap3xxx_usb_tll_hs_sysc,
  1797. };
  1798. static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
  1799. { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
  1800. { .irq = -1 },
  1801. };
  1802. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
  1803. .name = "usb_tll_hs",
  1804. .class = &omap3xxx_usb_tll_hs_hwmod_class,
  1805. .clkdm_name = "l3_init_clkdm",
  1806. .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
  1807. .main_clk = "usbtll_fck",
  1808. .prcm = {
  1809. .omap2 = {
  1810. .module_offs = CORE_MOD,
  1811. .prcm_reg_id = 3,
  1812. .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
  1813. .idlest_reg_id = 3,
  1814. .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
  1815. },
  1816. },
  1817. };
  1818. static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
  1819. .name = "hdq1w",
  1820. .mpu_irqs = omap2_hdq1w_mpu_irqs,
  1821. .main_clk = "hdq_fck",
  1822. .prcm = {
  1823. .omap2 = {
  1824. .module_offs = CORE_MOD,
  1825. .prcm_reg_id = 1,
  1826. .module_bit = OMAP3430_EN_HDQ_SHIFT,
  1827. .idlest_reg_id = 1,
  1828. .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
  1829. },
  1830. },
  1831. .class = &omap2_hdq1w_class,
  1832. };
  1833. /* SAD2D */
  1834. static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
  1835. { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
  1836. { .name = "rst_modem_sw", .rst_shift = 1 },
  1837. };
  1838. static struct omap_hwmod_class omap3xxx_sad2d_class = {
  1839. .name = "sad2d",
  1840. };
  1841. static struct omap_hwmod omap3xxx_sad2d_hwmod = {
  1842. .name = "sad2d",
  1843. .rst_lines = omap3xxx_sad2d_resets,
  1844. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
  1845. .main_clk = "sad2d_ick",
  1846. .prcm = {
  1847. .omap2 = {
  1848. .module_offs = CORE_MOD,
  1849. .prcm_reg_id = 1,
  1850. .module_bit = OMAP3430_EN_SAD2D_SHIFT,
  1851. .idlest_reg_id = 1,
  1852. .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
  1853. },
  1854. },
  1855. .class = &omap3xxx_sad2d_class,
  1856. };
  1857. /*
  1858. * '32K sync counter' class
  1859. * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
  1860. */
  1861. static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
  1862. .rev_offs = 0x0000,
  1863. .sysc_offs = 0x0004,
  1864. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1865. .idlemodes = (SIDLE_FORCE | SIDLE_NO),
  1866. .sysc_fields = &omap_hwmod_sysc_type1,
  1867. };
  1868. static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
  1869. .name = "counter",
  1870. .sysc = &omap3xxx_counter_sysc,
  1871. };
  1872. static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
  1873. .name = "counter_32k",
  1874. .class = &omap3xxx_counter_hwmod_class,
  1875. .clkdm_name = "wkup_clkdm",
  1876. .flags = HWMOD_SWSUP_SIDLE,
  1877. .main_clk = "wkup_32k_fck",
  1878. .prcm = {
  1879. .omap2 = {
  1880. .module_offs = WKUP_MOD,
  1881. .prcm_reg_id = 1,
  1882. .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1883. .idlest_reg_id = 1,
  1884. .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1885. },
  1886. },
  1887. };
  1888. /*
  1889. * interfaces
  1890. */
  1891. /* L3 -> L4_CORE interface */
  1892. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  1893. .master = &omap3xxx_l3_main_hwmod,
  1894. .slave = &omap3xxx_l4_core_hwmod,
  1895. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1896. };
  1897. /* L3 -> L4_PER interface */
  1898. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  1899. .master = &omap3xxx_l3_main_hwmod,
  1900. .slave = &omap3xxx_l4_per_hwmod,
  1901. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1902. };
  1903. static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
  1904. {
  1905. .pa_start = 0x68000000,
  1906. .pa_end = 0x6800ffff,
  1907. .flags = ADDR_TYPE_RT,
  1908. },
  1909. { }
  1910. };
  1911. /* MPU -> L3 interface */
  1912. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  1913. .master = &omap3xxx_mpu_hwmod,
  1914. .slave = &omap3xxx_l3_main_hwmod,
  1915. .addr = omap3xxx_l3_main_addrs,
  1916. .user = OCP_USER_MPU,
  1917. };
  1918. /* DSS -> l3 */
  1919. static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
  1920. .master = &omap3430es1_dss_core_hwmod,
  1921. .slave = &omap3xxx_l3_main_hwmod,
  1922. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1923. };
  1924. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  1925. .master = &omap3xxx_dss_core_hwmod,
  1926. .slave = &omap3xxx_l3_main_hwmod,
  1927. .fw = {
  1928. .omap2 = {
  1929. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  1930. .flags = OMAP_FIREWALL_L3,
  1931. }
  1932. },
  1933. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1934. };
  1935. /* l3_core -> usbhsotg interface */
  1936. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  1937. .master = &omap3xxx_usbhsotg_hwmod,
  1938. .slave = &omap3xxx_l3_main_hwmod,
  1939. .clk = "core_l3_ick",
  1940. .user = OCP_USER_MPU,
  1941. };
  1942. /* l3_core -> am35xx_usbhsotg interface */
  1943. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  1944. .master = &am35xx_usbhsotg_hwmod,
  1945. .slave = &omap3xxx_l3_main_hwmod,
  1946. .clk = "hsotgusb_ick",
  1947. .user = OCP_USER_MPU,
  1948. };
  1949. /* l3_core -> sad2d interface */
  1950. static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
  1951. .master = &omap3xxx_sad2d_hwmod,
  1952. .slave = &omap3xxx_l3_main_hwmod,
  1953. .clk = "core_l3_ick",
  1954. .user = OCP_USER_MPU,
  1955. };
  1956. /* L4_CORE -> L4_WKUP interface */
  1957. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  1958. .master = &omap3xxx_l4_core_hwmod,
  1959. .slave = &omap3xxx_l4_wkup_hwmod,
  1960. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1961. };
  1962. /* L4 CORE -> MMC1 interface */
  1963. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
  1964. .master = &omap3xxx_l4_core_hwmod,
  1965. .slave = &omap3xxx_pre_es3_mmc1_hwmod,
  1966. .clk = "mmchs1_ick",
  1967. .addr = omap2430_mmc1_addr_space,
  1968. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1969. .flags = OMAP_FIREWALL_L4
  1970. };
  1971. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
  1972. .master = &omap3xxx_l4_core_hwmod,
  1973. .slave = &omap3xxx_es3plus_mmc1_hwmod,
  1974. .clk = "mmchs1_ick",
  1975. .addr = omap2430_mmc1_addr_space,
  1976. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1977. .flags = OMAP_FIREWALL_L4
  1978. };
  1979. /* L4 CORE -> MMC2 interface */
  1980. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
  1981. .master = &omap3xxx_l4_core_hwmod,
  1982. .slave = &omap3xxx_pre_es3_mmc2_hwmod,
  1983. .clk = "mmchs2_ick",
  1984. .addr = omap2430_mmc2_addr_space,
  1985. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1986. .flags = OMAP_FIREWALL_L4
  1987. };
  1988. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
  1989. .master = &omap3xxx_l4_core_hwmod,
  1990. .slave = &omap3xxx_es3plus_mmc2_hwmod,
  1991. .clk = "mmchs2_ick",
  1992. .addr = omap2430_mmc2_addr_space,
  1993. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1994. .flags = OMAP_FIREWALL_L4
  1995. };
  1996. /* L4 CORE -> MMC3 interface */
  1997. static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
  1998. {
  1999. .pa_start = 0x480ad000,
  2000. .pa_end = 0x480ad1ff,
  2001. .flags = ADDR_TYPE_RT,
  2002. },
  2003. { }
  2004. };
  2005. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
  2006. .master = &omap3xxx_l4_core_hwmod,
  2007. .slave = &omap3xxx_mmc3_hwmod,
  2008. .clk = "mmchs3_ick",
  2009. .addr = omap3xxx_mmc3_addr_space,
  2010. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2011. .flags = OMAP_FIREWALL_L4
  2012. };
  2013. /* L4 CORE -> UART1 interface */
  2014. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  2015. {
  2016. .pa_start = OMAP3_UART1_BASE,
  2017. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  2018. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2019. },
  2020. { }
  2021. };
  2022. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  2023. .master = &omap3xxx_l4_core_hwmod,
  2024. .slave = &omap3xxx_uart1_hwmod,
  2025. .clk = "uart1_ick",
  2026. .addr = omap3xxx_uart1_addr_space,
  2027. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2028. };
  2029. /* L4 CORE -> UART2 interface */
  2030. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  2031. {
  2032. .pa_start = OMAP3_UART2_BASE,
  2033. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  2034. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2035. },
  2036. { }
  2037. };
  2038. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  2039. .master = &omap3xxx_l4_core_hwmod,
  2040. .slave = &omap3xxx_uart2_hwmod,
  2041. .clk = "uart2_ick",
  2042. .addr = omap3xxx_uart2_addr_space,
  2043. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2044. };
  2045. /* L4 PER -> UART3 interface */
  2046. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  2047. {
  2048. .pa_start = OMAP3_UART3_BASE,
  2049. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  2050. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2051. },
  2052. { }
  2053. };
  2054. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  2055. .master = &omap3xxx_l4_per_hwmod,
  2056. .slave = &omap3xxx_uart3_hwmod,
  2057. .clk = "uart3_ick",
  2058. .addr = omap3xxx_uart3_addr_space,
  2059. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2060. };
  2061. /* L4 PER -> UART4 interface */
  2062. static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
  2063. {
  2064. .pa_start = OMAP3_UART4_BASE,
  2065. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  2066. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2067. },
  2068. { }
  2069. };
  2070. static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
  2071. .master = &omap3xxx_l4_per_hwmod,
  2072. .slave = &omap36xx_uart4_hwmod,
  2073. .clk = "uart4_ick",
  2074. .addr = omap36xx_uart4_addr_space,
  2075. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2076. };
  2077. /* AM35xx: L4 CORE -> UART4 interface */
  2078. static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
  2079. {
  2080. .pa_start = OMAP3_UART4_AM35XX_BASE,
  2081. .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
  2082. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2083. },
  2084. { }
  2085. };
  2086. static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
  2087. .master = &omap3xxx_l4_core_hwmod,
  2088. .slave = &am35xx_uart4_hwmod,
  2089. .clk = "uart4_ick",
  2090. .addr = am35xx_uart4_addr_space,
  2091. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2092. };
  2093. /* L4 CORE -> I2C1 interface */
  2094. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  2095. .master = &omap3xxx_l4_core_hwmod,
  2096. .slave = &omap3xxx_i2c1_hwmod,
  2097. .clk = "i2c1_ick",
  2098. .addr = omap2_i2c1_addr_space,
  2099. .fw = {
  2100. .omap2 = {
  2101. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  2102. .l4_prot_group = 7,
  2103. .flags = OMAP_FIREWALL_L4,
  2104. }
  2105. },
  2106. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2107. };
  2108. /* L4 CORE -> I2C2 interface */
  2109. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  2110. .master = &omap3xxx_l4_core_hwmod,
  2111. .slave = &omap3xxx_i2c2_hwmod,
  2112. .clk = "i2c2_ick",
  2113. .addr = omap2_i2c2_addr_space,
  2114. .fw = {
  2115. .omap2 = {
  2116. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  2117. .l4_prot_group = 7,
  2118. .flags = OMAP_FIREWALL_L4,
  2119. }
  2120. },
  2121. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2122. };
  2123. /* L4 CORE -> I2C3 interface */
  2124. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  2125. {
  2126. .pa_start = 0x48060000,
  2127. .pa_end = 0x48060000 + SZ_128 - 1,
  2128. .flags = ADDR_TYPE_RT,
  2129. },
  2130. { }
  2131. };
  2132. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  2133. .master = &omap3xxx_l4_core_hwmod,
  2134. .slave = &omap3xxx_i2c3_hwmod,
  2135. .clk = "i2c3_ick",
  2136. .addr = omap3xxx_i2c3_addr_space,
  2137. .fw = {
  2138. .omap2 = {
  2139. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  2140. .l4_prot_group = 7,
  2141. .flags = OMAP_FIREWALL_L4,
  2142. }
  2143. },
  2144. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2145. };
  2146. /* L4 CORE -> SR1 interface */
  2147. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  2148. {
  2149. .pa_start = OMAP34XX_SR1_BASE,
  2150. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  2151. .flags = ADDR_TYPE_RT,
  2152. },
  2153. { }
  2154. };
  2155. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
  2156. .master = &omap3xxx_l4_core_hwmod,
  2157. .slave = &omap34xx_sr1_hwmod,
  2158. .clk = "sr_l4_ick",
  2159. .addr = omap3_sr1_addr_space,
  2160. .user = OCP_USER_MPU,
  2161. };
  2162. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
  2163. .master = &omap3xxx_l4_core_hwmod,
  2164. .slave = &omap36xx_sr1_hwmod,
  2165. .clk = "sr_l4_ick",
  2166. .addr = omap3_sr1_addr_space,
  2167. .user = OCP_USER_MPU,
  2168. };
  2169. /* L4 CORE -> SR1 interface */
  2170. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  2171. {
  2172. .pa_start = OMAP34XX_SR2_BASE,
  2173. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  2174. .flags = ADDR_TYPE_RT,
  2175. },
  2176. { }
  2177. };
  2178. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
  2179. .master = &omap3xxx_l4_core_hwmod,
  2180. .slave = &omap34xx_sr2_hwmod,
  2181. .clk = "sr_l4_ick",
  2182. .addr = omap3_sr2_addr_space,
  2183. .user = OCP_USER_MPU,
  2184. };
  2185. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
  2186. .master = &omap3xxx_l4_core_hwmod,
  2187. .slave = &omap36xx_sr2_hwmod,
  2188. .clk = "sr_l4_ick",
  2189. .addr = omap3_sr2_addr_space,
  2190. .user = OCP_USER_MPU,
  2191. };
  2192. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  2193. {
  2194. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  2195. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  2196. .flags = ADDR_TYPE_RT
  2197. },
  2198. { }
  2199. };
  2200. /* l4_core -> usbhsotg */
  2201. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  2202. .master = &omap3xxx_l4_core_hwmod,
  2203. .slave = &omap3xxx_usbhsotg_hwmod,
  2204. .clk = "l4_ick",
  2205. .addr = omap3xxx_usbhsotg_addrs,
  2206. .user = OCP_USER_MPU,
  2207. };
  2208. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  2209. {
  2210. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  2211. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  2212. .flags = ADDR_TYPE_RT
  2213. },
  2214. { }
  2215. };
  2216. /* l4_core -> usbhsotg */
  2217. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  2218. .master = &omap3xxx_l4_core_hwmod,
  2219. .slave = &am35xx_usbhsotg_hwmod,
  2220. .clk = "hsotgusb_ick",
  2221. .addr = am35xx_usbhsotg_addrs,
  2222. .user = OCP_USER_MPU,
  2223. };
  2224. /* L4_WKUP -> L4_SEC interface */
  2225. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
  2226. .master = &omap3xxx_l4_wkup_hwmod,
  2227. .slave = &omap3xxx_l4_sec_hwmod,
  2228. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2229. };
  2230. /* IVA2 <- L3 interface */
  2231. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  2232. .master = &omap3xxx_l3_main_hwmod,
  2233. .slave = &omap3xxx_iva_hwmod,
  2234. .clk = "core_l3_ick",
  2235. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2236. };
  2237. static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
  2238. {
  2239. .pa_start = 0x48318000,
  2240. .pa_end = 0x48318000 + SZ_1K - 1,
  2241. .flags = ADDR_TYPE_RT
  2242. },
  2243. { }
  2244. };
  2245. /* l4_wkup -> timer1 */
  2246. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
  2247. .master = &omap3xxx_l4_wkup_hwmod,
  2248. .slave = &omap3xxx_timer1_hwmod,
  2249. .clk = "gpt1_ick",
  2250. .addr = omap3xxx_timer1_addrs,
  2251. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2252. };
  2253. static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
  2254. {
  2255. .pa_start = 0x49032000,
  2256. .pa_end = 0x49032000 + SZ_1K - 1,
  2257. .flags = ADDR_TYPE_RT
  2258. },
  2259. { }
  2260. };
  2261. /* l4_per -> timer2 */
  2262. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
  2263. .master = &omap3xxx_l4_per_hwmod,
  2264. .slave = &omap3xxx_timer2_hwmod,
  2265. .clk = "gpt2_ick",
  2266. .addr = omap3xxx_timer2_addrs,
  2267. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2268. };
  2269. static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
  2270. {
  2271. .pa_start = 0x49034000,
  2272. .pa_end = 0x49034000 + SZ_1K - 1,
  2273. .flags = ADDR_TYPE_RT
  2274. },
  2275. { }
  2276. };
  2277. /* l4_per -> timer3 */
  2278. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
  2279. .master = &omap3xxx_l4_per_hwmod,
  2280. .slave = &omap3xxx_timer3_hwmod,
  2281. .clk = "gpt3_ick",
  2282. .addr = omap3xxx_timer3_addrs,
  2283. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2284. };
  2285. static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
  2286. {
  2287. .pa_start = 0x49036000,
  2288. .pa_end = 0x49036000 + SZ_1K - 1,
  2289. .flags = ADDR_TYPE_RT
  2290. },
  2291. { }
  2292. };
  2293. /* l4_per -> timer4 */
  2294. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
  2295. .master = &omap3xxx_l4_per_hwmod,
  2296. .slave = &omap3xxx_timer4_hwmod,
  2297. .clk = "gpt4_ick",
  2298. .addr = omap3xxx_timer4_addrs,
  2299. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2300. };
  2301. static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
  2302. {
  2303. .pa_start = 0x49038000,
  2304. .pa_end = 0x49038000 + SZ_1K - 1,
  2305. .flags = ADDR_TYPE_RT
  2306. },
  2307. { }
  2308. };
  2309. /* l4_per -> timer5 */
  2310. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
  2311. .master = &omap3xxx_l4_per_hwmod,
  2312. .slave = &omap3xxx_timer5_hwmod,
  2313. .clk = "gpt5_ick",
  2314. .addr = omap3xxx_timer5_addrs,
  2315. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2316. };
  2317. static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
  2318. {
  2319. .pa_start = 0x4903A000,
  2320. .pa_end = 0x4903A000 + SZ_1K - 1,
  2321. .flags = ADDR_TYPE_RT
  2322. },
  2323. { }
  2324. };
  2325. /* l4_per -> timer6 */
  2326. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
  2327. .master = &omap3xxx_l4_per_hwmod,
  2328. .slave = &omap3xxx_timer6_hwmod,
  2329. .clk = "gpt6_ick",
  2330. .addr = omap3xxx_timer6_addrs,
  2331. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2332. };
  2333. static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
  2334. {
  2335. .pa_start = 0x4903C000,
  2336. .pa_end = 0x4903C000 + SZ_1K - 1,
  2337. .flags = ADDR_TYPE_RT
  2338. },
  2339. { }
  2340. };
  2341. /* l4_per -> timer7 */
  2342. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
  2343. .master = &omap3xxx_l4_per_hwmod,
  2344. .slave = &omap3xxx_timer7_hwmod,
  2345. .clk = "gpt7_ick",
  2346. .addr = omap3xxx_timer7_addrs,
  2347. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2348. };
  2349. static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
  2350. {
  2351. .pa_start = 0x4903E000,
  2352. .pa_end = 0x4903E000 + SZ_1K - 1,
  2353. .flags = ADDR_TYPE_RT
  2354. },
  2355. { }
  2356. };
  2357. /* l4_per -> timer8 */
  2358. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
  2359. .master = &omap3xxx_l4_per_hwmod,
  2360. .slave = &omap3xxx_timer8_hwmod,
  2361. .clk = "gpt8_ick",
  2362. .addr = omap3xxx_timer8_addrs,
  2363. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2364. };
  2365. static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
  2366. {
  2367. .pa_start = 0x49040000,
  2368. .pa_end = 0x49040000 + SZ_1K - 1,
  2369. .flags = ADDR_TYPE_RT
  2370. },
  2371. { }
  2372. };
  2373. /* l4_per -> timer9 */
  2374. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
  2375. .master = &omap3xxx_l4_per_hwmod,
  2376. .slave = &omap3xxx_timer9_hwmod,
  2377. .clk = "gpt9_ick",
  2378. .addr = omap3xxx_timer9_addrs,
  2379. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2380. };
  2381. /* l4_core -> timer10 */
  2382. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
  2383. .master = &omap3xxx_l4_core_hwmod,
  2384. .slave = &omap3xxx_timer10_hwmod,
  2385. .clk = "gpt10_ick",
  2386. .addr = omap2_timer10_addrs,
  2387. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2388. };
  2389. /* l4_core -> timer11 */
  2390. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
  2391. .master = &omap3xxx_l4_core_hwmod,
  2392. .slave = &omap3xxx_timer11_hwmod,
  2393. .clk = "gpt11_ick",
  2394. .addr = omap2_timer11_addrs,
  2395. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2396. };
  2397. static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
  2398. {
  2399. .pa_start = 0x48304000,
  2400. .pa_end = 0x48304000 + SZ_1K - 1,
  2401. .flags = ADDR_TYPE_RT
  2402. },
  2403. { }
  2404. };
  2405. /* l4_core -> timer12 */
  2406. static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
  2407. .master = &omap3xxx_l4_sec_hwmod,
  2408. .slave = &omap3xxx_timer12_hwmod,
  2409. .clk = "gpt12_ick",
  2410. .addr = omap3xxx_timer12_addrs,
  2411. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2412. };
  2413. /* l4_wkup -> wd_timer2 */
  2414. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  2415. {
  2416. .pa_start = 0x48314000,
  2417. .pa_end = 0x4831407f,
  2418. .flags = ADDR_TYPE_RT
  2419. },
  2420. { }
  2421. };
  2422. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  2423. .master = &omap3xxx_l4_wkup_hwmod,
  2424. .slave = &omap3xxx_wd_timer2_hwmod,
  2425. .clk = "wdt2_ick",
  2426. .addr = omap3xxx_wd_timer2_addrs,
  2427. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2428. };
  2429. /* l4_core -> dss */
  2430. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  2431. .master = &omap3xxx_l4_core_hwmod,
  2432. .slave = &omap3430es1_dss_core_hwmod,
  2433. .clk = "dss_ick",
  2434. .addr = omap2_dss_addrs,
  2435. .fw = {
  2436. .omap2 = {
  2437. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  2438. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2439. .flags = OMAP_FIREWALL_L4,
  2440. }
  2441. },
  2442. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2443. };
  2444. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  2445. .master = &omap3xxx_l4_core_hwmod,
  2446. .slave = &omap3xxx_dss_core_hwmod,
  2447. .clk = "dss_ick",
  2448. .addr = omap2_dss_addrs,
  2449. .fw = {
  2450. .omap2 = {
  2451. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  2452. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2453. .flags = OMAP_FIREWALL_L4,
  2454. }
  2455. },
  2456. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2457. };
  2458. /* l4_core -> dss_dispc */
  2459. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  2460. .master = &omap3xxx_l4_core_hwmod,
  2461. .slave = &omap3xxx_dss_dispc_hwmod,
  2462. .clk = "dss_ick",
  2463. .addr = omap2_dss_dispc_addrs,
  2464. .fw = {
  2465. .omap2 = {
  2466. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  2467. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2468. .flags = OMAP_FIREWALL_L4,
  2469. }
  2470. },
  2471. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2472. };
  2473. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  2474. {
  2475. .pa_start = 0x4804FC00,
  2476. .pa_end = 0x4804FFFF,
  2477. .flags = ADDR_TYPE_RT
  2478. },
  2479. { }
  2480. };
  2481. /* l4_core -> dss_dsi1 */
  2482. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  2483. .master = &omap3xxx_l4_core_hwmod,
  2484. .slave = &omap3xxx_dss_dsi1_hwmod,
  2485. .clk = "dss_ick",
  2486. .addr = omap3xxx_dss_dsi1_addrs,
  2487. .fw = {
  2488. .omap2 = {
  2489. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  2490. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2491. .flags = OMAP_FIREWALL_L4,
  2492. }
  2493. },
  2494. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2495. };
  2496. /* l4_core -> dss_rfbi */
  2497. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  2498. .master = &omap3xxx_l4_core_hwmod,
  2499. .slave = &omap3xxx_dss_rfbi_hwmod,
  2500. .clk = "dss_ick",
  2501. .addr = omap2_dss_rfbi_addrs,
  2502. .fw = {
  2503. .omap2 = {
  2504. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  2505. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  2506. .flags = OMAP_FIREWALL_L4,
  2507. }
  2508. },
  2509. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2510. };
  2511. /* l4_core -> dss_venc */
  2512. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  2513. .master = &omap3xxx_l4_core_hwmod,
  2514. .slave = &omap3xxx_dss_venc_hwmod,
  2515. .clk = "dss_ick",
  2516. .addr = omap2_dss_venc_addrs,
  2517. .fw = {
  2518. .omap2 = {
  2519. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  2520. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2521. .flags = OMAP_FIREWALL_L4,
  2522. }
  2523. },
  2524. .flags = OCPIF_SWSUP_IDLE,
  2525. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2526. };
  2527. /* l4_wkup -> gpio1 */
  2528. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  2529. {
  2530. .pa_start = 0x48310000,
  2531. .pa_end = 0x483101ff,
  2532. .flags = ADDR_TYPE_RT
  2533. },
  2534. { }
  2535. };
  2536. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  2537. .master = &omap3xxx_l4_wkup_hwmod,
  2538. .slave = &omap3xxx_gpio1_hwmod,
  2539. .addr = omap3xxx_gpio1_addrs,
  2540. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2541. };
  2542. /* l4_per -> gpio2 */
  2543. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  2544. {
  2545. .pa_start = 0x49050000,
  2546. .pa_end = 0x490501ff,
  2547. .flags = ADDR_TYPE_RT
  2548. },
  2549. { }
  2550. };
  2551. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  2552. .master = &omap3xxx_l4_per_hwmod,
  2553. .slave = &omap3xxx_gpio2_hwmod,
  2554. .addr = omap3xxx_gpio2_addrs,
  2555. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2556. };
  2557. /* l4_per -> gpio3 */
  2558. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  2559. {
  2560. .pa_start = 0x49052000,
  2561. .pa_end = 0x490521ff,
  2562. .flags = ADDR_TYPE_RT
  2563. },
  2564. { }
  2565. };
  2566. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  2567. .master = &omap3xxx_l4_per_hwmod,
  2568. .slave = &omap3xxx_gpio3_hwmod,
  2569. .addr = omap3xxx_gpio3_addrs,
  2570. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2571. };
  2572. /* l4_per -> gpio4 */
  2573. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  2574. {
  2575. .pa_start = 0x49054000,
  2576. .pa_end = 0x490541ff,
  2577. .flags = ADDR_TYPE_RT
  2578. },
  2579. { }
  2580. };
  2581. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  2582. .master = &omap3xxx_l4_per_hwmod,
  2583. .slave = &omap3xxx_gpio4_hwmod,
  2584. .addr = omap3xxx_gpio4_addrs,
  2585. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2586. };
  2587. /* l4_per -> gpio5 */
  2588. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  2589. {
  2590. .pa_start = 0x49056000,
  2591. .pa_end = 0x490561ff,
  2592. .flags = ADDR_TYPE_RT
  2593. },
  2594. { }
  2595. };
  2596. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  2597. .master = &omap3xxx_l4_per_hwmod,
  2598. .slave = &omap3xxx_gpio5_hwmod,
  2599. .addr = omap3xxx_gpio5_addrs,
  2600. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2601. };
  2602. /* l4_per -> gpio6 */
  2603. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  2604. {
  2605. .pa_start = 0x49058000,
  2606. .pa_end = 0x490581ff,
  2607. .flags = ADDR_TYPE_RT
  2608. },
  2609. { }
  2610. };
  2611. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  2612. .master = &omap3xxx_l4_per_hwmod,
  2613. .slave = &omap3xxx_gpio6_hwmod,
  2614. .addr = omap3xxx_gpio6_addrs,
  2615. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2616. };
  2617. /* dma_system -> L3 */
  2618. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  2619. .master = &omap3xxx_dma_system_hwmod,
  2620. .slave = &omap3xxx_l3_main_hwmod,
  2621. .clk = "core_l3_ick",
  2622. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2623. };
  2624. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  2625. {
  2626. .pa_start = 0x48056000,
  2627. .pa_end = 0x48056fff,
  2628. .flags = ADDR_TYPE_RT
  2629. },
  2630. { }
  2631. };
  2632. /* l4_cfg -> dma_system */
  2633. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  2634. .master = &omap3xxx_l4_core_hwmod,
  2635. .slave = &omap3xxx_dma_system_hwmod,
  2636. .clk = "core_l4_ick",
  2637. .addr = omap3xxx_dma_system_addrs,
  2638. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2639. };
  2640. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  2641. {
  2642. .name = "mpu",
  2643. .pa_start = 0x48074000,
  2644. .pa_end = 0x480740ff,
  2645. .flags = ADDR_TYPE_RT
  2646. },
  2647. { }
  2648. };
  2649. /* l4_core -> mcbsp1 */
  2650. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  2651. .master = &omap3xxx_l4_core_hwmod,
  2652. .slave = &omap3xxx_mcbsp1_hwmod,
  2653. .clk = "mcbsp1_ick",
  2654. .addr = omap3xxx_mcbsp1_addrs,
  2655. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2656. };
  2657. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2658. {
  2659. .name = "mpu",
  2660. .pa_start = 0x49022000,
  2661. .pa_end = 0x490220ff,
  2662. .flags = ADDR_TYPE_RT
  2663. },
  2664. { }
  2665. };
  2666. /* l4_per -> mcbsp2 */
  2667. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2668. .master = &omap3xxx_l4_per_hwmod,
  2669. .slave = &omap3xxx_mcbsp2_hwmod,
  2670. .clk = "mcbsp2_ick",
  2671. .addr = omap3xxx_mcbsp2_addrs,
  2672. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2673. };
  2674. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2675. {
  2676. .name = "mpu",
  2677. .pa_start = 0x49024000,
  2678. .pa_end = 0x490240ff,
  2679. .flags = ADDR_TYPE_RT
  2680. },
  2681. { }
  2682. };
  2683. /* l4_per -> mcbsp3 */
  2684. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2685. .master = &omap3xxx_l4_per_hwmod,
  2686. .slave = &omap3xxx_mcbsp3_hwmod,
  2687. .clk = "mcbsp3_ick",
  2688. .addr = omap3xxx_mcbsp3_addrs,
  2689. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2690. };
  2691. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2692. {
  2693. .name = "mpu",
  2694. .pa_start = 0x49026000,
  2695. .pa_end = 0x490260ff,
  2696. .flags = ADDR_TYPE_RT
  2697. },
  2698. { }
  2699. };
  2700. /* l4_per -> mcbsp4 */
  2701. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2702. .master = &omap3xxx_l4_per_hwmod,
  2703. .slave = &omap3xxx_mcbsp4_hwmod,
  2704. .clk = "mcbsp4_ick",
  2705. .addr = omap3xxx_mcbsp4_addrs,
  2706. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2707. };
  2708. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2709. {
  2710. .name = "mpu",
  2711. .pa_start = 0x48096000,
  2712. .pa_end = 0x480960ff,
  2713. .flags = ADDR_TYPE_RT
  2714. },
  2715. { }
  2716. };
  2717. /* l4_core -> mcbsp5 */
  2718. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2719. .master = &omap3xxx_l4_core_hwmod,
  2720. .slave = &omap3xxx_mcbsp5_hwmod,
  2721. .clk = "mcbsp5_ick",
  2722. .addr = omap3xxx_mcbsp5_addrs,
  2723. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2724. };
  2725. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2726. {
  2727. .name = "sidetone",
  2728. .pa_start = 0x49028000,
  2729. .pa_end = 0x490280ff,
  2730. .flags = ADDR_TYPE_RT
  2731. },
  2732. { }
  2733. };
  2734. /* l4_per -> mcbsp2_sidetone */
  2735. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2736. .master = &omap3xxx_l4_per_hwmod,
  2737. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2738. .clk = "mcbsp2_ick",
  2739. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2740. .user = OCP_USER_MPU,
  2741. };
  2742. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2743. {
  2744. .name = "sidetone",
  2745. .pa_start = 0x4902A000,
  2746. .pa_end = 0x4902A0ff,
  2747. .flags = ADDR_TYPE_RT
  2748. },
  2749. { }
  2750. };
  2751. /* l4_per -> mcbsp3_sidetone */
  2752. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2753. .master = &omap3xxx_l4_per_hwmod,
  2754. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2755. .clk = "mcbsp3_ick",
  2756. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2757. .user = OCP_USER_MPU,
  2758. };
  2759. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2760. {
  2761. .pa_start = 0x48094000,
  2762. .pa_end = 0x480941ff,
  2763. .flags = ADDR_TYPE_RT,
  2764. },
  2765. { }
  2766. };
  2767. /* l4_core -> mailbox */
  2768. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2769. .master = &omap3xxx_l4_core_hwmod,
  2770. .slave = &omap3xxx_mailbox_hwmod,
  2771. .addr = omap3xxx_mailbox_addrs,
  2772. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2773. };
  2774. /* l4 core -> mcspi1 interface */
  2775. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2776. .master = &omap3xxx_l4_core_hwmod,
  2777. .slave = &omap34xx_mcspi1,
  2778. .clk = "mcspi1_ick",
  2779. .addr = omap2_mcspi1_addr_space,
  2780. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2781. };
  2782. /* l4 core -> mcspi2 interface */
  2783. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2784. .master = &omap3xxx_l4_core_hwmod,
  2785. .slave = &omap34xx_mcspi2,
  2786. .clk = "mcspi2_ick",
  2787. .addr = omap2_mcspi2_addr_space,
  2788. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2789. };
  2790. /* l4 core -> mcspi3 interface */
  2791. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2792. .master = &omap3xxx_l4_core_hwmod,
  2793. .slave = &omap34xx_mcspi3,
  2794. .clk = "mcspi3_ick",
  2795. .addr = omap2430_mcspi3_addr_space,
  2796. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2797. };
  2798. /* l4 core -> mcspi4 interface */
  2799. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2800. {
  2801. .pa_start = 0x480ba000,
  2802. .pa_end = 0x480ba0ff,
  2803. .flags = ADDR_TYPE_RT,
  2804. },
  2805. { }
  2806. };
  2807. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2808. .master = &omap3xxx_l4_core_hwmod,
  2809. .slave = &omap34xx_mcspi4,
  2810. .clk = "mcspi4_ick",
  2811. .addr = omap34xx_mcspi4_addr_space,
  2812. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2813. };
  2814. static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
  2815. .master = &omap3xxx_usb_host_hs_hwmod,
  2816. .slave = &omap3xxx_l3_main_hwmod,
  2817. .clk = "core_l3_ick",
  2818. .user = OCP_USER_MPU,
  2819. };
  2820. static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
  2821. {
  2822. .name = "uhh",
  2823. .pa_start = 0x48064000,
  2824. .pa_end = 0x480643ff,
  2825. .flags = ADDR_TYPE_RT
  2826. },
  2827. {
  2828. .name = "ohci",
  2829. .pa_start = 0x48064400,
  2830. .pa_end = 0x480647ff,
  2831. },
  2832. {
  2833. .name = "ehci",
  2834. .pa_start = 0x48064800,
  2835. .pa_end = 0x48064cff,
  2836. },
  2837. {}
  2838. };
  2839. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
  2840. .master = &omap3xxx_l4_core_hwmod,
  2841. .slave = &omap3xxx_usb_host_hs_hwmod,
  2842. .clk = "usbhost_ick",
  2843. .addr = omap3xxx_usb_host_hs_addrs,
  2844. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2845. };
  2846. static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
  2847. {
  2848. .name = "tll",
  2849. .pa_start = 0x48062000,
  2850. .pa_end = 0x48062fff,
  2851. .flags = ADDR_TYPE_RT
  2852. },
  2853. {}
  2854. };
  2855. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
  2856. .master = &omap3xxx_l4_core_hwmod,
  2857. .slave = &omap3xxx_usb_tll_hs_hwmod,
  2858. .clk = "usbtll_ick",
  2859. .addr = omap3xxx_usb_tll_hs_addrs,
  2860. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2861. };
  2862. /* l4_core -> hdq1w interface */
  2863. static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
  2864. .master = &omap3xxx_l4_core_hwmod,
  2865. .slave = &omap3xxx_hdq1w_hwmod,
  2866. .clk = "hdq_ick",
  2867. .addr = omap2_hdq1w_addr_space,
  2868. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2869. .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
  2870. };
  2871. /* l4_wkup -> 32ksync_counter */
  2872. static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
  2873. {
  2874. .pa_start = 0x48320000,
  2875. .pa_end = 0x4832001f,
  2876. .flags = ADDR_TYPE_RT
  2877. },
  2878. { }
  2879. };
  2880. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
  2881. .master = &omap3xxx_l4_wkup_hwmod,
  2882. .slave = &omap3xxx_counter_32k_hwmod,
  2883. .clk = "omap_32ksync_ick",
  2884. .addr = omap3xxx_counter_32k_addrs,
  2885. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2886. };
  2887. /* am35xx has Davinci MDIO & EMAC */
  2888. static struct omap_hwmod_class am35xx_mdio_class = {
  2889. .name = "davinci_mdio",
  2890. };
  2891. static struct omap_hwmod am35xx_mdio_hwmod = {
  2892. .name = "davinci_mdio",
  2893. .class = &am35xx_mdio_class,
  2894. .flags = HWMOD_NO_IDLEST,
  2895. };
  2896. /*
  2897. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  2898. * but this will probably require some additional hwmod core support,
  2899. * so is left as a future to-do item.
  2900. */
  2901. static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
  2902. .master = &am35xx_mdio_hwmod,
  2903. .slave = &omap3xxx_l3_main_hwmod,
  2904. .clk = "emac_fck",
  2905. .user = OCP_USER_MPU,
  2906. };
  2907. static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
  2908. {
  2909. .pa_start = AM35XX_IPSS_MDIO_BASE,
  2910. .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
  2911. .flags = ADDR_TYPE_RT,
  2912. },
  2913. { }
  2914. };
  2915. /* l4_core -> davinci mdio */
  2916. /*
  2917. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  2918. * but this will probably require some additional hwmod core support,
  2919. * so is left as a future to-do item.
  2920. */
  2921. static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
  2922. .master = &omap3xxx_l4_core_hwmod,
  2923. .slave = &am35xx_mdio_hwmod,
  2924. .clk = "emac_fck",
  2925. .addr = am35xx_mdio_addrs,
  2926. .user = OCP_USER_MPU,
  2927. };
  2928. static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
  2929. { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
  2930. { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
  2931. { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
  2932. { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
  2933. { .irq = -1 },
  2934. };
  2935. static struct omap_hwmod_class am35xx_emac_class = {
  2936. .name = "davinci_emac",
  2937. };
  2938. static struct omap_hwmod am35xx_emac_hwmod = {
  2939. .name = "davinci_emac",
  2940. .mpu_irqs = am35xx_emac_mpu_irqs,
  2941. .class = &am35xx_emac_class,
  2942. .flags = HWMOD_NO_IDLEST,
  2943. };
  2944. /* l3_core -> davinci emac interface */
  2945. /*
  2946. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  2947. * but this will probably require some additional hwmod core support,
  2948. * so is left as a future to-do item.
  2949. */
  2950. static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
  2951. .master = &am35xx_emac_hwmod,
  2952. .slave = &omap3xxx_l3_main_hwmod,
  2953. .clk = "emac_ick",
  2954. .user = OCP_USER_MPU,
  2955. };
  2956. static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
  2957. {
  2958. .pa_start = AM35XX_IPSS_EMAC_BASE,
  2959. .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
  2960. .flags = ADDR_TYPE_RT,
  2961. },
  2962. { }
  2963. };
  2964. /* l4_core -> davinci emac */
  2965. /*
  2966. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  2967. * but this will probably require some additional hwmod core support,
  2968. * so is left as a future to-do item.
  2969. */
  2970. static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
  2971. .master = &omap3xxx_l4_core_hwmod,
  2972. .slave = &am35xx_emac_hwmod,
  2973. .clk = "emac_ick",
  2974. .addr = am35xx_emac_addrs,
  2975. .user = OCP_USER_MPU,
  2976. };
  2977. static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
  2978. &omap3xxx_l3_main__l4_core,
  2979. &omap3xxx_l3_main__l4_per,
  2980. &omap3xxx_mpu__l3_main,
  2981. &omap3xxx_l4_core__l4_wkup,
  2982. &omap3xxx_l4_core__mmc3,
  2983. &omap3_l4_core__uart1,
  2984. &omap3_l4_core__uart2,
  2985. &omap3_l4_per__uart3,
  2986. &omap3_l4_core__i2c1,
  2987. &omap3_l4_core__i2c2,
  2988. &omap3_l4_core__i2c3,
  2989. &omap3xxx_l4_wkup__l4_sec,
  2990. &omap3xxx_l4_wkup__timer1,
  2991. &omap3xxx_l4_per__timer2,
  2992. &omap3xxx_l4_per__timer3,
  2993. &omap3xxx_l4_per__timer4,
  2994. &omap3xxx_l4_per__timer5,
  2995. &omap3xxx_l4_per__timer6,
  2996. &omap3xxx_l4_per__timer7,
  2997. &omap3xxx_l4_per__timer8,
  2998. &omap3xxx_l4_per__timer9,
  2999. &omap3xxx_l4_core__timer10,
  3000. &omap3xxx_l4_core__timer11,
  3001. &omap3xxx_l4_wkup__wd_timer2,
  3002. &omap3xxx_l4_wkup__gpio1,
  3003. &omap3xxx_l4_per__gpio2,
  3004. &omap3xxx_l4_per__gpio3,
  3005. &omap3xxx_l4_per__gpio4,
  3006. &omap3xxx_l4_per__gpio5,
  3007. &omap3xxx_l4_per__gpio6,
  3008. &omap3xxx_dma_system__l3,
  3009. &omap3xxx_l4_core__dma_system,
  3010. &omap3xxx_l4_core__mcbsp1,
  3011. &omap3xxx_l4_per__mcbsp2,
  3012. &omap3xxx_l4_per__mcbsp3,
  3013. &omap3xxx_l4_per__mcbsp4,
  3014. &omap3xxx_l4_core__mcbsp5,
  3015. &omap3xxx_l4_per__mcbsp2_sidetone,
  3016. &omap3xxx_l4_per__mcbsp3_sidetone,
  3017. &omap34xx_l4_core__mcspi1,
  3018. &omap34xx_l4_core__mcspi2,
  3019. &omap34xx_l4_core__mcspi3,
  3020. &omap34xx_l4_core__mcspi4,
  3021. &omap3xxx_l4_wkup__counter_32k,
  3022. NULL,
  3023. };
  3024. /* GP-only hwmod links */
  3025. static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
  3026. &omap3xxx_l4_sec__timer12,
  3027. NULL
  3028. };
  3029. /* 3430ES1-only hwmod links */
  3030. static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
  3031. &omap3430es1_dss__l3,
  3032. &omap3430es1_l4_core__dss,
  3033. NULL
  3034. };
  3035. /* 3430ES2+-only hwmod links */
  3036. static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
  3037. &omap3xxx_dss__l3,
  3038. &omap3xxx_l4_core__dss,
  3039. &omap3xxx_usbhsotg__l3,
  3040. &omap3xxx_l4_core__usbhsotg,
  3041. &omap3xxx_usb_host_hs__l3_main_2,
  3042. &omap3xxx_l4_core__usb_host_hs,
  3043. &omap3xxx_l4_core__usb_tll_hs,
  3044. NULL
  3045. };
  3046. /* <= 3430ES3-only hwmod links */
  3047. static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
  3048. &omap3xxx_l4_core__pre_es3_mmc1,
  3049. &omap3xxx_l4_core__pre_es3_mmc2,
  3050. NULL
  3051. };
  3052. /* 3430ES3+-only hwmod links */
  3053. static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
  3054. &omap3xxx_l4_core__es3plus_mmc1,
  3055. &omap3xxx_l4_core__es3plus_mmc2,
  3056. NULL
  3057. };
  3058. /* 34xx-only hwmod links (all ES revisions) */
  3059. static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
  3060. &omap3xxx_l3__iva,
  3061. &omap34xx_l4_core__sr1,
  3062. &omap34xx_l4_core__sr2,
  3063. &omap3xxx_l4_core__mailbox,
  3064. &omap3xxx_l4_core__hdq1w,
  3065. &omap3xxx_sad2d__l3,
  3066. NULL
  3067. };
  3068. /* 36xx-only hwmod links (all ES revisions) */
  3069. static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
  3070. &omap3xxx_l3__iva,
  3071. &omap36xx_l4_per__uart4,
  3072. &omap3xxx_dss__l3,
  3073. &omap3xxx_l4_core__dss,
  3074. &omap36xx_l4_core__sr1,
  3075. &omap36xx_l4_core__sr2,
  3076. &omap3xxx_usbhsotg__l3,
  3077. &omap3xxx_l4_core__usbhsotg,
  3078. &omap3xxx_l4_core__mailbox,
  3079. &omap3xxx_usb_host_hs__l3_main_2,
  3080. &omap3xxx_l4_core__usb_host_hs,
  3081. &omap3xxx_l4_core__usb_tll_hs,
  3082. &omap3xxx_l4_core__es3plus_mmc1,
  3083. &omap3xxx_l4_core__es3plus_mmc2,
  3084. &omap3xxx_l4_core__hdq1w,
  3085. &omap3xxx_sad2d__l3,
  3086. NULL
  3087. };
  3088. static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
  3089. &omap3xxx_dss__l3,
  3090. &omap3xxx_l4_core__dss,
  3091. &am35xx_usbhsotg__l3,
  3092. &am35xx_l4_core__usbhsotg,
  3093. &am35xx_l4_core__uart4,
  3094. &omap3xxx_usb_host_hs__l3_main_2,
  3095. &omap3xxx_l4_core__usb_host_hs,
  3096. &omap3xxx_l4_core__usb_tll_hs,
  3097. &omap3xxx_l4_core__es3plus_mmc1,
  3098. &omap3xxx_l4_core__es3plus_mmc2,
  3099. &am35xx_mdio__l3,
  3100. &am35xx_l4_core__mdio,
  3101. &am35xx_emac__l3,
  3102. &am35xx_l4_core__emac,
  3103. NULL
  3104. };
  3105. static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
  3106. &omap3xxx_l4_core__dss_dispc,
  3107. &omap3xxx_l4_core__dss_dsi1,
  3108. &omap3xxx_l4_core__dss_rfbi,
  3109. &omap3xxx_l4_core__dss_venc,
  3110. NULL
  3111. };
  3112. int __init omap3xxx_hwmod_init(void)
  3113. {
  3114. int r;
  3115. struct omap_hwmod_ocp_if **h = NULL;
  3116. unsigned int rev;
  3117. omap_hwmod_init();
  3118. /* Register hwmod links common to all OMAP3 */
  3119. r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
  3120. if (r < 0)
  3121. return r;
  3122. /* Register GP-only hwmod links. */
  3123. if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
  3124. r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
  3125. if (r < 0)
  3126. return r;
  3127. }
  3128. rev = omap_rev();
  3129. /*
  3130. * Register hwmod links common to individual OMAP3 families, all
  3131. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  3132. * All possible revisions should be included in this conditional.
  3133. */
  3134. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3135. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  3136. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  3137. h = omap34xx_hwmod_ocp_ifs;
  3138. } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
  3139. h = am35xx_hwmod_ocp_ifs;
  3140. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  3141. rev == OMAP3630_REV_ES1_2) {
  3142. h = omap36xx_hwmod_ocp_ifs;
  3143. } else {
  3144. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3145. return -EINVAL;
  3146. };
  3147. r = omap_hwmod_register_links(h);
  3148. if (r < 0)
  3149. return r;
  3150. /*
  3151. * Register hwmod links specific to certain ES levels of a
  3152. * particular family of silicon (e.g., 34xx ES1.0)
  3153. */
  3154. h = NULL;
  3155. if (rev == OMAP3430_REV_ES1_0) {
  3156. h = omap3430es1_hwmod_ocp_ifs;
  3157. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3158. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3159. rev == OMAP3430_REV_ES3_1_2) {
  3160. h = omap3430es2plus_hwmod_ocp_ifs;
  3161. };
  3162. if (h) {
  3163. r = omap_hwmod_register_links(h);
  3164. if (r < 0)
  3165. return r;
  3166. }
  3167. h = NULL;
  3168. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3169. rev == OMAP3430_REV_ES2_1) {
  3170. h = omap3430_pre_es3_hwmod_ocp_ifs;
  3171. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3172. rev == OMAP3430_REV_ES3_1_2) {
  3173. h = omap3430_es3plus_hwmod_ocp_ifs;
  3174. };
  3175. if (h)
  3176. r = omap_hwmod_register_links(h);
  3177. if (r < 0)
  3178. return r;
  3179. /*
  3180. * DSS code presumes that dss_core hwmod is handled first,
  3181. * _before_ any other DSS related hwmods so register common
  3182. * DSS hwmod links last to ensure that dss_core is already
  3183. * registered. Otherwise some change things may happen, for
  3184. * ex. if dispc is handled before dss_core and DSS is enabled
  3185. * in bootloader DISPC will be reset with outputs enabled
  3186. * which sometimes leads to unrecoverable L3 error. XXX The
  3187. * long-term fix to this is to ensure hwmods are set up in
  3188. * dependency order in the hwmod core code.
  3189. */
  3190. r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
  3191. return r;
  3192. }