omap_hwmod_3xxx_data.c 96 KB

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