omap_hwmod_3xxx_data.c 96 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801
  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 <linux/omap-dma.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 <linux/platform_data/iommu-omap.h>
  26. #include <plat/dmtimer.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_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. SYSS_HAS_RESET_STATUS),
  143. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  144. .clockact = CLOCKACT_TEST_ICLK,
  145. .sysc_fields = &omap_hwmod_sysc_type1,
  146. };
  147. static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
  148. .name = "timer",
  149. .sysc = &omap3xxx_timer_sysc,
  150. };
  151. /* secure timers dev attribute */
  152. static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
  153. .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
  154. };
  155. /* always-on timers dev attribute */
  156. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  157. .timer_capability = OMAP_TIMER_ALWON,
  158. };
  159. /* pwm timers dev attribute */
  160. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  161. .timer_capability = OMAP_TIMER_HAS_PWM,
  162. };
  163. /* timers with DSP interrupt dev attribute */
  164. static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
  165. .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
  166. };
  167. /* pwm timers with DSP interrupt dev attribute */
  168. static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
  169. .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
  170. };
  171. /* timer1 */
  172. static struct omap_hwmod omap3xxx_timer1_hwmod = {
  173. .name = "timer1",
  174. .mpu_irqs = omap2_timer1_mpu_irqs,
  175. .main_clk = "gpt1_fck",
  176. .prcm = {
  177. .omap2 = {
  178. .prcm_reg_id = 1,
  179. .module_bit = OMAP3430_EN_GPT1_SHIFT,
  180. .module_offs = WKUP_MOD,
  181. .idlest_reg_id = 1,
  182. .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
  183. },
  184. },
  185. .dev_attr = &capability_alwon_dev_attr,
  186. .class = &omap3xxx_timer_hwmod_class,
  187. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  188. };
  189. /* timer2 */
  190. static struct omap_hwmod omap3xxx_timer2_hwmod = {
  191. .name = "timer2",
  192. .mpu_irqs = omap2_timer2_mpu_irqs,
  193. .main_clk = "gpt2_fck",
  194. .prcm = {
  195. .omap2 = {
  196. .prcm_reg_id = 1,
  197. .module_bit = OMAP3430_EN_GPT2_SHIFT,
  198. .module_offs = OMAP3430_PER_MOD,
  199. .idlest_reg_id = 1,
  200. .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
  201. },
  202. },
  203. .class = &omap3xxx_timer_hwmod_class,
  204. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  205. };
  206. /* timer3 */
  207. static struct omap_hwmod omap3xxx_timer3_hwmod = {
  208. .name = "timer3",
  209. .mpu_irqs = omap2_timer3_mpu_irqs,
  210. .main_clk = "gpt3_fck",
  211. .prcm = {
  212. .omap2 = {
  213. .prcm_reg_id = 1,
  214. .module_bit = OMAP3430_EN_GPT3_SHIFT,
  215. .module_offs = OMAP3430_PER_MOD,
  216. .idlest_reg_id = 1,
  217. .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
  218. },
  219. },
  220. .class = &omap3xxx_timer_hwmod_class,
  221. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  222. };
  223. /* timer4 */
  224. static struct omap_hwmod omap3xxx_timer4_hwmod = {
  225. .name = "timer4",
  226. .mpu_irqs = omap2_timer4_mpu_irqs,
  227. .main_clk = "gpt4_fck",
  228. .prcm = {
  229. .omap2 = {
  230. .prcm_reg_id = 1,
  231. .module_bit = OMAP3430_EN_GPT4_SHIFT,
  232. .module_offs = OMAP3430_PER_MOD,
  233. .idlest_reg_id = 1,
  234. .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
  235. },
  236. },
  237. .class = &omap3xxx_timer_hwmod_class,
  238. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  239. };
  240. /* timer5 */
  241. static struct omap_hwmod omap3xxx_timer5_hwmod = {
  242. .name = "timer5",
  243. .mpu_irqs = omap2_timer5_mpu_irqs,
  244. .main_clk = "gpt5_fck",
  245. .prcm = {
  246. .omap2 = {
  247. .prcm_reg_id = 1,
  248. .module_bit = OMAP3430_EN_GPT5_SHIFT,
  249. .module_offs = OMAP3430_PER_MOD,
  250. .idlest_reg_id = 1,
  251. .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
  252. },
  253. },
  254. .dev_attr = &capability_dsp_dev_attr,
  255. .class = &omap3xxx_timer_hwmod_class,
  256. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  257. };
  258. /* timer6 */
  259. static struct omap_hwmod omap3xxx_timer6_hwmod = {
  260. .name = "timer6",
  261. .mpu_irqs = omap2_timer6_mpu_irqs,
  262. .main_clk = "gpt6_fck",
  263. .prcm = {
  264. .omap2 = {
  265. .prcm_reg_id = 1,
  266. .module_bit = OMAP3430_EN_GPT6_SHIFT,
  267. .module_offs = OMAP3430_PER_MOD,
  268. .idlest_reg_id = 1,
  269. .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
  270. },
  271. },
  272. .dev_attr = &capability_dsp_dev_attr,
  273. .class = &omap3xxx_timer_hwmod_class,
  274. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  275. };
  276. /* timer7 */
  277. static struct omap_hwmod omap3xxx_timer7_hwmod = {
  278. .name = "timer7",
  279. .mpu_irqs = omap2_timer7_mpu_irqs,
  280. .main_clk = "gpt7_fck",
  281. .prcm = {
  282. .omap2 = {
  283. .prcm_reg_id = 1,
  284. .module_bit = OMAP3430_EN_GPT7_SHIFT,
  285. .module_offs = OMAP3430_PER_MOD,
  286. .idlest_reg_id = 1,
  287. .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
  288. },
  289. },
  290. .dev_attr = &capability_dsp_dev_attr,
  291. .class = &omap3xxx_timer_hwmod_class,
  292. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  293. };
  294. /* timer8 */
  295. static struct omap_hwmod omap3xxx_timer8_hwmod = {
  296. .name = "timer8",
  297. .mpu_irqs = omap2_timer8_mpu_irqs,
  298. .main_clk = "gpt8_fck",
  299. .prcm = {
  300. .omap2 = {
  301. .prcm_reg_id = 1,
  302. .module_bit = OMAP3430_EN_GPT8_SHIFT,
  303. .module_offs = OMAP3430_PER_MOD,
  304. .idlest_reg_id = 1,
  305. .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
  306. },
  307. },
  308. .dev_attr = &capability_dsp_pwm_dev_attr,
  309. .class = &omap3xxx_timer_hwmod_class,
  310. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  311. };
  312. /* timer9 */
  313. static struct omap_hwmod omap3xxx_timer9_hwmod = {
  314. .name = "timer9",
  315. .mpu_irqs = omap2_timer9_mpu_irqs,
  316. .main_clk = "gpt9_fck",
  317. .prcm = {
  318. .omap2 = {
  319. .prcm_reg_id = 1,
  320. .module_bit = OMAP3430_EN_GPT9_SHIFT,
  321. .module_offs = OMAP3430_PER_MOD,
  322. .idlest_reg_id = 1,
  323. .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
  324. },
  325. },
  326. .dev_attr = &capability_pwm_dev_attr,
  327. .class = &omap3xxx_timer_hwmod_class,
  328. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  329. };
  330. /* timer10 */
  331. static struct omap_hwmod omap3xxx_timer10_hwmod = {
  332. .name = "timer10",
  333. .mpu_irqs = omap2_timer10_mpu_irqs,
  334. .main_clk = "gpt10_fck",
  335. .prcm = {
  336. .omap2 = {
  337. .prcm_reg_id = 1,
  338. .module_bit = OMAP3430_EN_GPT10_SHIFT,
  339. .module_offs = CORE_MOD,
  340. .idlest_reg_id = 1,
  341. .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
  342. },
  343. },
  344. .dev_attr = &capability_pwm_dev_attr,
  345. .class = &omap3xxx_timer_hwmod_class,
  346. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  347. };
  348. /* timer11 */
  349. static struct omap_hwmod omap3xxx_timer11_hwmod = {
  350. .name = "timer11",
  351. .mpu_irqs = omap2_timer11_mpu_irqs,
  352. .main_clk = "gpt11_fck",
  353. .prcm = {
  354. .omap2 = {
  355. .prcm_reg_id = 1,
  356. .module_bit = OMAP3430_EN_GPT11_SHIFT,
  357. .module_offs = CORE_MOD,
  358. .idlest_reg_id = 1,
  359. .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
  360. },
  361. },
  362. .dev_attr = &capability_pwm_dev_attr,
  363. .class = &omap3xxx_timer_hwmod_class,
  364. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  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. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  387. };
  388. /*
  389. * 'wd_timer' class
  390. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  391. * overflow condition
  392. */
  393. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  394. .rev_offs = 0x0000,
  395. .sysc_offs = 0x0010,
  396. .syss_offs = 0x0014,
  397. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  398. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  399. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  400. SYSS_HAS_RESET_STATUS),
  401. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  402. .sysc_fields = &omap_hwmod_sysc_type1,
  403. };
  404. /* I2C common */
  405. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  406. .rev_offs = 0x00,
  407. .sysc_offs = 0x20,
  408. .syss_offs = 0x10,
  409. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  410. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  411. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  412. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  413. .clockact = CLOCKACT_TEST_ICLK,
  414. .sysc_fields = &omap_hwmod_sysc_type1,
  415. };
  416. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  417. .name = "wd_timer",
  418. .sysc = &omap3xxx_wd_timer_sysc,
  419. .pre_shutdown = &omap2_wd_timer_disable,
  420. .reset = &omap2_wd_timer_reset,
  421. };
  422. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  423. .name = "wd_timer2",
  424. .class = &omap3xxx_wd_timer_hwmod_class,
  425. .main_clk = "wdt2_fck",
  426. .prcm = {
  427. .omap2 = {
  428. .prcm_reg_id = 1,
  429. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  430. .module_offs = WKUP_MOD,
  431. .idlest_reg_id = 1,
  432. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  433. },
  434. },
  435. /*
  436. * XXX: Use software supervised mode, HW supervised smartidle seems to
  437. * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
  438. */
  439. .flags = HWMOD_SWSUP_SIDLE,
  440. };
  441. /* UART1 */
  442. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  443. .name = "uart1",
  444. .mpu_irqs = omap2_uart1_mpu_irqs,
  445. .sdma_reqs = omap2_uart1_sdma_reqs,
  446. .main_clk = "uart1_fck",
  447. .prcm = {
  448. .omap2 = {
  449. .module_offs = CORE_MOD,
  450. .prcm_reg_id = 1,
  451. .module_bit = OMAP3430_EN_UART1_SHIFT,
  452. .idlest_reg_id = 1,
  453. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  454. },
  455. },
  456. .class = &omap2_uart_class,
  457. };
  458. /* UART2 */
  459. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  460. .name = "uart2",
  461. .mpu_irqs = omap2_uart2_mpu_irqs,
  462. .sdma_reqs = omap2_uart2_sdma_reqs,
  463. .main_clk = "uart2_fck",
  464. .prcm = {
  465. .omap2 = {
  466. .module_offs = CORE_MOD,
  467. .prcm_reg_id = 1,
  468. .module_bit = OMAP3430_EN_UART2_SHIFT,
  469. .idlest_reg_id = 1,
  470. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  471. },
  472. },
  473. .class = &omap2_uart_class,
  474. };
  475. /* UART3 */
  476. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  477. .name = "uart3",
  478. .mpu_irqs = omap2_uart3_mpu_irqs,
  479. .sdma_reqs = omap2_uart3_sdma_reqs,
  480. .main_clk = "uart3_fck",
  481. .prcm = {
  482. .omap2 = {
  483. .module_offs = OMAP3430_PER_MOD,
  484. .prcm_reg_id = 1,
  485. .module_bit = OMAP3430_EN_UART3_SHIFT,
  486. .idlest_reg_id = 1,
  487. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  488. },
  489. },
  490. .class = &omap2_uart_class,
  491. };
  492. /* UART4 */
  493. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  494. { .irq = 80 + OMAP_INTC_START, },
  495. { .irq = -1 },
  496. };
  497. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  498. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  499. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  500. { .dma_req = -1 }
  501. };
  502. static struct omap_hwmod omap36xx_uart4_hwmod = {
  503. .name = "uart4",
  504. .mpu_irqs = uart4_mpu_irqs,
  505. .sdma_reqs = uart4_sdma_reqs,
  506. .main_clk = "uart4_fck",
  507. .prcm = {
  508. .omap2 = {
  509. .module_offs = OMAP3430_PER_MOD,
  510. .prcm_reg_id = 1,
  511. .module_bit = OMAP3630_EN_UART4_SHIFT,
  512. .idlest_reg_id = 1,
  513. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  514. },
  515. },
  516. .class = &omap2_uart_class,
  517. };
  518. static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
  519. { .irq = 84 + OMAP_INTC_START, },
  520. { .irq = -1 },
  521. };
  522. static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
  523. { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
  524. { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
  525. { .dma_req = -1 }
  526. };
  527. /*
  528. * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
  529. * uart2_fck being enabled. So we add uart1_fck as an optional clock,
  530. * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
  531. * should not be needed. The functional clock structure of the AM35xx
  532. * UART4 is extremely unclear and opaque; it is unclear what the role
  533. * of uart1/2_fck is for the UART4. Any clarification from either
  534. * empirical testing or the AM3505/3517 hardware designers would be
  535. * most welcome.
  536. */
  537. static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
  538. { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
  539. };
  540. static struct omap_hwmod am35xx_uart4_hwmod = {
  541. .name = "uart4",
  542. .mpu_irqs = am35xx_uart4_mpu_irqs,
  543. .sdma_reqs = am35xx_uart4_sdma_reqs,
  544. .main_clk = "uart4_fck",
  545. .prcm = {
  546. .omap2 = {
  547. .module_offs = CORE_MOD,
  548. .prcm_reg_id = 1,
  549. .module_bit = AM35XX_EN_UART4_SHIFT,
  550. .idlest_reg_id = 1,
  551. .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
  552. },
  553. },
  554. .opt_clks = am35xx_uart4_opt_clks,
  555. .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
  556. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  557. .class = &omap2_uart_class,
  558. };
  559. static struct omap_hwmod_class i2c_class = {
  560. .name = "i2c",
  561. .sysc = &i2c_sysc,
  562. .rev = OMAP_I2C_IP_VERSION_1,
  563. .reset = &omap_i2c_reset,
  564. };
  565. static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
  566. { .name = "dispc", .dma_req = 5 },
  567. { .name = "dsi1", .dma_req = 74 },
  568. { .dma_req = -1 }
  569. };
  570. /* dss */
  571. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  572. /*
  573. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  574. * driver does not use these clocks.
  575. */
  576. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  577. { .role = "tv_clk", .clk = "dss_tv_fck" },
  578. /* required only on OMAP3430 */
  579. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  580. };
  581. static struct omap_hwmod omap3430es1_dss_core_hwmod = {
  582. .name = "dss_core",
  583. .class = &omap2_dss_hwmod_class,
  584. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  585. .sdma_reqs = omap3xxx_dss_sdma_chs,
  586. .prcm = {
  587. .omap2 = {
  588. .prcm_reg_id = 1,
  589. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  590. .module_offs = OMAP3430_DSS_MOD,
  591. .idlest_reg_id = 1,
  592. .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
  593. },
  594. },
  595. .opt_clks = dss_opt_clks,
  596. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  597. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  598. };
  599. static struct omap_hwmod omap3xxx_dss_core_hwmod = {
  600. .name = "dss_core",
  601. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  602. .class = &omap2_dss_hwmod_class,
  603. .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
  604. .sdma_reqs = omap3xxx_dss_sdma_chs,
  605. .prcm = {
  606. .omap2 = {
  607. .prcm_reg_id = 1,
  608. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  609. .module_offs = OMAP3430_DSS_MOD,
  610. .idlest_reg_id = 1,
  611. .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
  612. .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
  613. },
  614. },
  615. .opt_clks = dss_opt_clks,
  616. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  617. };
  618. /*
  619. * 'dispc' class
  620. * display controller
  621. */
  622. static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
  623. .rev_offs = 0x0000,
  624. .sysc_offs = 0x0010,
  625. .syss_offs = 0x0014,
  626. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  627. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  628. SYSC_HAS_ENAWAKEUP),
  629. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  630. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  631. .sysc_fields = &omap_hwmod_sysc_type1,
  632. };
  633. static struct omap_hwmod_class omap3_dispc_hwmod_class = {
  634. .name = "dispc",
  635. .sysc = &omap3_dispc_sysc,
  636. };
  637. static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
  638. .name = "dss_dispc",
  639. .class = &omap3_dispc_hwmod_class,
  640. .mpu_irqs = omap2_dispc_irqs,
  641. .main_clk = "dss1_alwon_fck",
  642. .prcm = {
  643. .omap2 = {
  644. .prcm_reg_id = 1,
  645. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  646. .module_offs = OMAP3430_DSS_MOD,
  647. },
  648. },
  649. .flags = HWMOD_NO_IDLEST,
  650. .dev_attr = &omap2_3_dss_dispc_dev_attr
  651. };
  652. /*
  653. * 'dsi' class
  654. * display serial interface controller
  655. */
  656. static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
  657. .name = "dsi",
  658. };
  659. static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
  660. { .irq = 25 + OMAP_INTC_START, },
  661. { .irq = -1 },
  662. };
  663. /* dss_dsi1 */
  664. static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
  665. { .role = "sys_clk", .clk = "dss2_alwon_fck" },
  666. };
  667. static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
  668. .name = "dss_dsi1",
  669. .class = &omap3xxx_dsi_hwmod_class,
  670. .mpu_irqs = omap3xxx_dsi1_irqs,
  671. .main_clk = "dss1_alwon_fck",
  672. .prcm = {
  673. .omap2 = {
  674. .prcm_reg_id = 1,
  675. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  676. .module_offs = OMAP3430_DSS_MOD,
  677. },
  678. },
  679. .opt_clks = dss_dsi1_opt_clks,
  680. .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
  681. .flags = HWMOD_NO_IDLEST,
  682. };
  683. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  684. { .role = "ick", .clk = "dss_ick" },
  685. };
  686. static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
  687. .name = "dss_rfbi",
  688. .class = &omap2_rfbi_hwmod_class,
  689. .main_clk = "dss1_alwon_fck",
  690. .prcm = {
  691. .omap2 = {
  692. .prcm_reg_id = 1,
  693. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  694. .module_offs = OMAP3430_DSS_MOD,
  695. },
  696. },
  697. .opt_clks = dss_rfbi_opt_clks,
  698. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  699. .flags = HWMOD_NO_IDLEST,
  700. };
  701. static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
  702. /* required only on OMAP3430 */
  703. { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
  704. };
  705. static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
  706. .name = "dss_venc",
  707. .class = &omap2_venc_hwmod_class,
  708. .main_clk = "dss_tv_fck",
  709. .prcm = {
  710. .omap2 = {
  711. .prcm_reg_id = 1,
  712. .module_bit = OMAP3430_EN_DSS1_SHIFT,
  713. .module_offs = OMAP3430_DSS_MOD,
  714. },
  715. },
  716. .opt_clks = dss_venc_opt_clks,
  717. .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
  718. .flags = HWMOD_NO_IDLEST,
  719. };
  720. /* I2C1 */
  721. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  722. .fifo_depth = 8, /* bytes */
  723. .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
  724. };
  725. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  726. .name = "i2c1",
  727. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  728. .mpu_irqs = omap2_i2c1_mpu_irqs,
  729. .sdma_reqs = omap2_i2c1_sdma_reqs,
  730. .main_clk = "i2c1_fck",
  731. .prcm = {
  732. .omap2 = {
  733. .module_offs = CORE_MOD,
  734. .prcm_reg_id = 1,
  735. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  736. .idlest_reg_id = 1,
  737. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  738. },
  739. },
  740. .class = &i2c_class,
  741. .dev_attr = &i2c1_dev_attr,
  742. };
  743. /* I2C2 */
  744. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  745. .fifo_depth = 8, /* bytes */
  746. .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
  747. };
  748. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  749. .name = "i2c2",
  750. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  751. .mpu_irqs = omap2_i2c2_mpu_irqs,
  752. .sdma_reqs = omap2_i2c2_sdma_reqs,
  753. .main_clk = "i2c2_fck",
  754. .prcm = {
  755. .omap2 = {
  756. .module_offs = CORE_MOD,
  757. .prcm_reg_id = 1,
  758. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  759. .idlest_reg_id = 1,
  760. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  761. },
  762. },
  763. .class = &i2c_class,
  764. .dev_attr = &i2c2_dev_attr,
  765. };
  766. /* I2C3 */
  767. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  768. .fifo_depth = 64, /* bytes */
  769. .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
  770. };
  771. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  772. { .irq = 61 + OMAP_INTC_START, },
  773. { .irq = -1 },
  774. };
  775. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  776. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  777. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  778. { .dma_req = -1 }
  779. };
  780. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  781. .name = "i2c3",
  782. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  783. .mpu_irqs = i2c3_mpu_irqs,
  784. .sdma_reqs = i2c3_sdma_reqs,
  785. .main_clk = "i2c3_fck",
  786. .prcm = {
  787. .omap2 = {
  788. .module_offs = CORE_MOD,
  789. .prcm_reg_id = 1,
  790. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  791. .idlest_reg_id = 1,
  792. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  793. },
  794. },
  795. .class = &i2c_class,
  796. .dev_attr = &i2c3_dev_attr,
  797. };
  798. /*
  799. * 'gpio' class
  800. * general purpose io module
  801. */
  802. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  803. .rev_offs = 0x0000,
  804. .sysc_offs = 0x0010,
  805. .syss_offs = 0x0014,
  806. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  807. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  808. SYSS_HAS_RESET_STATUS),
  809. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  810. .sysc_fields = &omap_hwmod_sysc_type1,
  811. };
  812. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  813. .name = "gpio",
  814. .sysc = &omap3xxx_gpio_sysc,
  815. .rev = 1,
  816. };
  817. /* gpio_dev_attr */
  818. static struct omap_gpio_dev_attr gpio_dev_attr = {
  819. .bank_width = 32,
  820. .dbck_flag = true,
  821. };
  822. /* gpio1 */
  823. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  824. { .role = "dbclk", .clk = "gpio1_dbck", },
  825. };
  826. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  827. .name = "gpio1",
  828. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  829. .mpu_irqs = omap2_gpio1_irqs,
  830. .main_clk = "gpio1_ick",
  831. .opt_clks = gpio1_opt_clks,
  832. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  833. .prcm = {
  834. .omap2 = {
  835. .prcm_reg_id = 1,
  836. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  837. .module_offs = WKUP_MOD,
  838. .idlest_reg_id = 1,
  839. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  840. },
  841. },
  842. .class = &omap3xxx_gpio_hwmod_class,
  843. .dev_attr = &gpio_dev_attr,
  844. };
  845. /* gpio2 */
  846. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  847. { .role = "dbclk", .clk = "gpio2_dbck", },
  848. };
  849. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  850. .name = "gpio2",
  851. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  852. .mpu_irqs = omap2_gpio2_irqs,
  853. .main_clk = "gpio2_ick",
  854. .opt_clks = gpio2_opt_clks,
  855. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  856. .prcm = {
  857. .omap2 = {
  858. .prcm_reg_id = 1,
  859. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  860. .module_offs = OMAP3430_PER_MOD,
  861. .idlest_reg_id = 1,
  862. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  863. },
  864. },
  865. .class = &omap3xxx_gpio_hwmod_class,
  866. .dev_attr = &gpio_dev_attr,
  867. };
  868. /* gpio3 */
  869. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  870. { .role = "dbclk", .clk = "gpio3_dbck", },
  871. };
  872. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  873. .name = "gpio3",
  874. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  875. .mpu_irqs = omap2_gpio3_irqs,
  876. .main_clk = "gpio3_ick",
  877. .opt_clks = gpio3_opt_clks,
  878. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  879. .prcm = {
  880. .omap2 = {
  881. .prcm_reg_id = 1,
  882. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  883. .module_offs = OMAP3430_PER_MOD,
  884. .idlest_reg_id = 1,
  885. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  886. },
  887. },
  888. .class = &omap3xxx_gpio_hwmod_class,
  889. .dev_attr = &gpio_dev_attr,
  890. };
  891. /* gpio4 */
  892. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  893. { .role = "dbclk", .clk = "gpio4_dbck", },
  894. };
  895. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  896. .name = "gpio4",
  897. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  898. .mpu_irqs = omap2_gpio4_irqs,
  899. .main_clk = "gpio4_ick",
  900. .opt_clks = gpio4_opt_clks,
  901. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  902. .prcm = {
  903. .omap2 = {
  904. .prcm_reg_id = 1,
  905. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  906. .module_offs = OMAP3430_PER_MOD,
  907. .idlest_reg_id = 1,
  908. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  909. },
  910. },
  911. .class = &omap3xxx_gpio_hwmod_class,
  912. .dev_attr = &gpio_dev_attr,
  913. };
  914. /* gpio5 */
  915. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  916. { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
  917. { .irq = -1 },
  918. };
  919. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  920. { .role = "dbclk", .clk = "gpio5_dbck", },
  921. };
  922. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  923. .name = "gpio5",
  924. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  925. .mpu_irqs = omap3xxx_gpio5_irqs,
  926. .main_clk = "gpio5_ick",
  927. .opt_clks = gpio5_opt_clks,
  928. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  929. .prcm = {
  930. .omap2 = {
  931. .prcm_reg_id = 1,
  932. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  933. .module_offs = OMAP3430_PER_MOD,
  934. .idlest_reg_id = 1,
  935. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  936. },
  937. },
  938. .class = &omap3xxx_gpio_hwmod_class,
  939. .dev_attr = &gpio_dev_attr,
  940. };
  941. /* gpio6 */
  942. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  943. { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
  944. { .irq = -1 },
  945. };
  946. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  947. { .role = "dbclk", .clk = "gpio6_dbck", },
  948. };
  949. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  950. .name = "gpio6",
  951. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  952. .mpu_irqs = omap3xxx_gpio6_irqs,
  953. .main_clk = "gpio6_ick",
  954. .opt_clks = gpio6_opt_clks,
  955. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  956. .prcm = {
  957. .omap2 = {
  958. .prcm_reg_id = 1,
  959. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  960. .module_offs = OMAP3430_PER_MOD,
  961. .idlest_reg_id = 1,
  962. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  963. },
  964. },
  965. .class = &omap3xxx_gpio_hwmod_class,
  966. .dev_attr = &gpio_dev_attr,
  967. };
  968. /* dma attributes */
  969. static struct omap_dma_dev_attr dma_dev_attr = {
  970. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  971. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  972. .lch_count = 32,
  973. };
  974. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  975. .rev_offs = 0x0000,
  976. .sysc_offs = 0x002c,
  977. .syss_offs = 0x0028,
  978. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  979. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  980. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  981. SYSS_HAS_RESET_STATUS),
  982. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  983. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  984. .sysc_fields = &omap_hwmod_sysc_type1,
  985. };
  986. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  987. .name = "dma",
  988. .sysc = &omap3xxx_dma_sysc,
  989. };
  990. /* dma_system */
  991. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  992. .name = "dma",
  993. .class = &omap3xxx_dma_hwmod_class,
  994. .mpu_irqs = omap2_dma_system_irqs,
  995. .main_clk = "core_l3_ick",
  996. .prcm = {
  997. .omap2 = {
  998. .module_offs = CORE_MOD,
  999. .prcm_reg_id = 1,
  1000. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1001. .idlest_reg_id = 1,
  1002. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1003. },
  1004. },
  1005. .dev_attr = &dma_dev_attr,
  1006. .flags = HWMOD_NO_IDLEST,
  1007. };
  1008. /*
  1009. * 'mcbsp' class
  1010. * multi channel buffered serial port controller
  1011. */
  1012. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
  1013. .sysc_offs = 0x008c,
  1014. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
  1015. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1016. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1017. .sysc_fields = &omap_hwmod_sysc_type1,
  1018. .clockact = 0x2,
  1019. };
  1020. static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
  1021. .name = "mcbsp",
  1022. .sysc = &omap3xxx_mcbsp_sysc,
  1023. .rev = MCBSP_CONFIG_TYPE3,
  1024. };
  1025. /* McBSP functional clock mapping */
  1026. static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
  1027. { .role = "pad_fck", .clk = "mcbsp_clks" },
  1028. { .role = "prcm_fck", .clk = "core_96m_fck" },
  1029. };
  1030. static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
  1031. { .role = "pad_fck", .clk = "mcbsp_clks" },
  1032. { .role = "prcm_fck", .clk = "per_96m_fck" },
  1033. };
  1034. /* mcbsp1 */
  1035. static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
  1036. { .name = "common", .irq = 16 + OMAP_INTC_START, },
  1037. { .name = "tx", .irq = 59 + OMAP_INTC_START, },
  1038. { .name = "rx", .irq = 60 + OMAP_INTC_START, },
  1039. { .irq = -1 },
  1040. };
  1041. static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  1042. .name = "mcbsp1",
  1043. .class = &omap3xxx_mcbsp_hwmod_class,
  1044. .mpu_irqs = omap3xxx_mcbsp1_irqs,
  1045. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1046. .main_clk = "mcbsp1_fck",
  1047. .prcm = {
  1048. .omap2 = {
  1049. .prcm_reg_id = 1,
  1050. .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
  1051. .module_offs = CORE_MOD,
  1052. .idlest_reg_id = 1,
  1053. .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
  1054. },
  1055. },
  1056. .opt_clks = mcbsp15_opt_clks,
  1057. .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
  1058. };
  1059. /* mcbsp2 */
  1060. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
  1061. { .name = "common", .irq = 17 + OMAP_INTC_START, },
  1062. { .name = "tx", .irq = 62 + OMAP_INTC_START, },
  1063. { .name = "rx", .irq = 63 + OMAP_INTC_START, },
  1064. { .irq = -1 },
  1065. };
  1066. static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
  1067. .sidetone = "mcbsp2_sidetone",
  1068. };
  1069. static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
  1070. .name = "mcbsp2",
  1071. .class = &omap3xxx_mcbsp_hwmod_class,
  1072. .mpu_irqs = omap3xxx_mcbsp2_irqs,
  1073. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1074. .main_clk = "mcbsp2_fck",
  1075. .prcm = {
  1076. .omap2 = {
  1077. .prcm_reg_id = 1,
  1078. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  1079. .module_offs = OMAP3430_PER_MOD,
  1080. .idlest_reg_id = 1,
  1081. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  1082. },
  1083. },
  1084. .opt_clks = mcbsp234_opt_clks,
  1085. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1086. .dev_attr = &omap34xx_mcbsp2_dev_attr,
  1087. };
  1088. /* mcbsp3 */
  1089. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
  1090. { .name = "common", .irq = 22 + OMAP_INTC_START, },
  1091. { .name = "tx", .irq = 89 + OMAP_INTC_START, },
  1092. { .name = "rx", .irq = 90 + OMAP_INTC_START, },
  1093. { .irq = -1 },
  1094. };
  1095. static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
  1096. .sidetone = "mcbsp3_sidetone",
  1097. };
  1098. static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
  1099. .name = "mcbsp3",
  1100. .class = &omap3xxx_mcbsp_hwmod_class,
  1101. .mpu_irqs = omap3xxx_mcbsp3_irqs,
  1102. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  1103. .main_clk = "mcbsp3_fck",
  1104. .prcm = {
  1105. .omap2 = {
  1106. .prcm_reg_id = 1,
  1107. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  1108. .module_offs = OMAP3430_PER_MOD,
  1109. .idlest_reg_id = 1,
  1110. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  1111. },
  1112. },
  1113. .opt_clks = mcbsp234_opt_clks,
  1114. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1115. .dev_attr = &omap34xx_mcbsp3_dev_attr,
  1116. };
  1117. /* mcbsp4 */
  1118. static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
  1119. { .name = "common", .irq = 23 + OMAP_INTC_START, },
  1120. { .name = "tx", .irq = 54 + OMAP_INTC_START, },
  1121. { .name = "rx", .irq = 55 + OMAP_INTC_START, },
  1122. { .irq = -1 },
  1123. };
  1124. static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
  1125. { .name = "rx", .dma_req = 20 },
  1126. { .name = "tx", .dma_req = 19 },
  1127. { .dma_req = -1 }
  1128. };
  1129. static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
  1130. .name = "mcbsp4",
  1131. .class = &omap3xxx_mcbsp_hwmod_class,
  1132. .mpu_irqs = omap3xxx_mcbsp4_irqs,
  1133. .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
  1134. .main_clk = "mcbsp4_fck",
  1135. .prcm = {
  1136. .omap2 = {
  1137. .prcm_reg_id = 1,
  1138. .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
  1139. .module_offs = OMAP3430_PER_MOD,
  1140. .idlest_reg_id = 1,
  1141. .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
  1142. },
  1143. },
  1144. .opt_clks = mcbsp234_opt_clks,
  1145. .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
  1146. };
  1147. /* mcbsp5 */
  1148. static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
  1149. { .name = "common", .irq = 27 + OMAP_INTC_START, },
  1150. { .name = "tx", .irq = 81 + OMAP_INTC_START, },
  1151. { .name = "rx", .irq = 82 + OMAP_INTC_START, },
  1152. { .irq = -1 },
  1153. };
  1154. static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
  1155. { .name = "rx", .dma_req = 22 },
  1156. { .name = "tx", .dma_req = 21 },
  1157. { .dma_req = -1 }
  1158. };
  1159. static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
  1160. .name = "mcbsp5",
  1161. .class = &omap3xxx_mcbsp_hwmod_class,
  1162. .mpu_irqs = omap3xxx_mcbsp5_irqs,
  1163. .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
  1164. .main_clk = "mcbsp5_fck",
  1165. .prcm = {
  1166. .omap2 = {
  1167. .prcm_reg_id = 1,
  1168. .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
  1169. .module_offs = CORE_MOD,
  1170. .idlest_reg_id = 1,
  1171. .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
  1172. },
  1173. },
  1174. .opt_clks = mcbsp15_opt_clks,
  1175. .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
  1176. };
  1177. /* 'mcbsp sidetone' class */
  1178. static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
  1179. .sysc_offs = 0x0010,
  1180. .sysc_flags = SYSC_HAS_AUTOIDLE,
  1181. .sysc_fields = &omap_hwmod_sysc_type1,
  1182. };
  1183. static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
  1184. .name = "mcbsp_sidetone",
  1185. .sysc = &omap3xxx_mcbsp_sidetone_sysc,
  1186. };
  1187. /* mcbsp2_sidetone */
  1188. static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
  1189. { .name = "irq", .irq = 4 + OMAP_INTC_START, },
  1190. { .irq = -1 },
  1191. };
  1192. static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  1193. .name = "mcbsp2_sidetone",
  1194. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  1195. .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
  1196. .main_clk = "mcbsp2_fck",
  1197. .prcm = {
  1198. .omap2 = {
  1199. .prcm_reg_id = 1,
  1200. .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
  1201. .module_offs = OMAP3430_PER_MOD,
  1202. .idlest_reg_id = 1,
  1203. .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
  1204. },
  1205. },
  1206. };
  1207. /* mcbsp3_sidetone */
  1208. static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
  1209. { .name = "irq", .irq = 5 + OMAP_INTC_START, },
  1210. { .irq = -1 },
  1211. };
  1212. static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
  1213. .name = "mcbsp3_sidetone",
  1214. .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
  1215. .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
  1216. .main_clk = "mcbsp3_fck",
  1217. .prcm = {
  1218. .omap2 = {
  1219. .prcm_reg_id = 1,
  1220. .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
  1221. .module_offs = OMAP3430_PER_MOD,
  1222. .idlest_reg_id = 1,
  1223. .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
  1224. },
  1225. },
  1226. };
  1227. /* SR common */
  1228. static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
  1229. .clkact_shift = 20,
  1230. };
  1231. static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
  1232. .sysc_offs = 0x24,
  1233. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
  1234. .clockact = CLOCKACT_TEST_ICLK,
  1235. .sysc_fields = &omap34xx_sr_sysc_fields,
  1236. };
  1237. static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
  1238. .name = "smartreflex",
  1239. .sysc = &omap34xx_sr_sysc,
  1240. .rev = 1,
  1241. };
  1242. static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
  1243. .sidle_shift = 24,
  1244. .enwkup_shift = 26,
  1245. };
  1246. static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
  1247. .sysc_offs = 0x38,
  1248. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1249. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1250. SYSC_NO_CACHE),
  1251. .sysc_fields = &omap36xx_sr_sysc_fields,
  1252. };
  1253. static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
  1254. .name = "smartreflex",
  1255. .sysc = &omap36xx_sr_sysc,
  1256. .rev = 2,
  1257. };
  1258. /* SR1 */
  1259. static struct omap_smartreflex_dev_attr sr1_dev_attr = {
  1260. .sensor_voltdm_name = "mpu_iva",
  1261. };
  1262. static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
  1263. { .irq = 18 + OMAP_INTC_START, },
  1264. { .irq = -1 },
  1265. };
  1266. static struct omap_hwmod omap34xx_sr1_hwmod = {
  1267. .name = "smartreflex_mpu_iva",
  1268. .class = &omap34xx_smartreflex_hwmod_class,
  1269. .main_clk = "sr1_fck",
  1270. .prcm = {
  1271. .omap2 = {
  1272. .prcm_reg_id = 1,
  1273. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1274. .module_offs = WKUP_MOD,
  1275. .idlest_reg_id = 1,
  1276. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1277. },
  1278. },
  1279. .dev_attr = &sr1_dev_attr,
  1280. .mpu_irqs = omap3_smartreflex_mpu_irqs,
  1281. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1282. };
  1283. static struct omap_hwmod omap36xx_sr1_hwmod = {
  1284. .name = "smartreflex_mpu_iva",
  1285. .class = &omap36xx_smartreflex_hwmod_class,
  1286. .main_clk = "sr1_fck",
  1287. .prcm = {
  1288. .omap2 = {
  1289. .prcm_reg_id = 1,
  1290. .module_bit = OMAP3430_EN_SR1_SHIFT,
  1291. .module_offs = WKUP_MOD,
  1292. .idlest_reg_id = 1,
  1293. .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
  1294. },
  1295. },
  1296. .dev_attr = &sr1_dev_attr,
  1297. .mpu_irqs = omap3_smartreflex_mpu_irqs,
  1298. };
  1299. /* SR2 */
  1300. static struct omap_smartreflex_dev_attr sr2_dev_attr = {
  1301. .sensor_voltdm_name = "core",
  1302. };
  1303. static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
  1304. { .irq = 19 + OMAP_INTC_START, },
  1305. { .irq = -1 },
  1306. };
  1307. static struct omap_hwmod omap34xx_sr2_hwmod = {
  1308. .name = "smartreflex_core",
  1309. .class = &omap34xx_smartreflex_hwmod_class,
  1310. .main_clk = "sr2_fck",
  1311. .prcm = {
  1312. .omap2 = {
  1313. .prcm_reg_id = 1,
  1314. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1315. .module_offs = WKUP_MOD,
  1316. .idlest_reg_id = 1,
  1317. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1318. },
  1319. },
  1320. .dev_attr = &sr2_dev_attr,
  1321. .mpu_irqs = omap3_smartreflex_core_irqs,
  1322. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  1323. };
  1324. static struct omap_hwmod omap36xx_sr2_hwmod = {
  1325. .name = "smartreflex_core",
  1326. .class = &omap36xx_smartreflex_hwmod_class,
  1327. .main_clk = "sr2_fck",
  1328. .prcm = {
  1329. .omap2 = {
  1330. .prcm_reg_id = 1,
  1331. .module_bit = OMAP3430_EN_SR2_SHIFT,
  1332. .module_offs = WKUP_MOD,
  1333. .idlest_reg_id = 1,
  1334. .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
  1335. },
  1336. },
  1337. .dev_attr = &sr2_dev_attr,
  1338. .mpu_irqs = omap3_smartreflex_core_irqs,
  1339. };
  1340. /*
  1341. * 'mailbox' class
  1342. * mailbox module allowing communication between the on-chip processors
  1343. * using a queued mailbox-interrupt mechanism.
  1344. */
  1345. static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
  1346. .rev_offs = 0x000,
  1347. .sysc_offs = 0x010,
  1348. .syss_offs = 0x014,
  1349. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1350. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1351. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1352. .sysc_fields = &omap_hwmod_sysc_type1,
  1353. };
  1354. static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
  1355. .name = "mailbox",
  1356. .sysc = &omap3xxx_mailbox_sysc,
  1357. };
  1358. static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  1359. { .irq = 26 + OMAP_INTC_START, },
  1360. { .irq = -1 },
  1361. };
  1362. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  1363. .name = "mailbox",
  1364. .class = &omap3xxx_mailbox_hwmod_class,
  1365. .mpu_irqs = omap3xxx_mailbox_irqs,
  1366. .main_clk = "mailboxes_ick",
  1367. .prcm = {
  1368. .omap2 = {
  1369. .prcm_reg_id = 1,
  1370. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  1371. .module_offs = CORE_MOD,
  1372. .idlest_reg_id = 1,
  1373. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  1374. },
  1375. },
  1376. };
  1377. /*
  1378. * 'mcspi' class
  1379. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1380. * bus
  1381. */
  1382. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1383. .rev_offs = 0x0000,
  1384. .sysc_offs = 0x0010,
  1385. .syss_offs = 0x0014,
  1386. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1387. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1388. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1389. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1390. .sysc_fields = &omap_hwmod_sysc_type1,
  1391. };
  1392. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1393. .name = "mcspi",
  1394. .sysc = &omap34xx_mcspi_sysc,
  1395. .rev = OMAP3_MCSPI_REV,
  1396. };
  1397. /* mcspi1 */
  1398. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1399. .num_chipselect = 4,
  1400. };
  1401. static struct omap_hwmod omap34xx_mcspi1 = {
  1402. .name = "mcspi1",
  1403. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1404. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1405. .main_clk = "mcspi1_fck",
  1406. .prcm = {
  1407. .omap2 = {
  1408. .module_offs = CORE_MOD,
  1409. .prcm_reg_id = 1,
  1410. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1411. .idlest_reg_id = 1,
  1412. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1413. },
  1414. },
  1415. .class = &omap34xx_mcspi_class,
  1416. .dev_attr = &omap_mcspi1_dev_attr,
  1417. };
  1418. /* mcspi2 */
  1419. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1420. .num_chipselect = 2,
  1421. };
  1422. static struct omap_hwmod omap34xx_mcspi2 = {
  1423. .name = "mcspi2",
  1424. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1425. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1426. .main_clk = "mcspi2_fck",
  1427. .prcm = {
  1428. .omap2 = {
  1429. .module_offs = CORE_MOD,
  1430. .prcm_reg_id = 1,
  1431. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1432. .idlest_reg_id = 1,
  1433. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1434. },
  1435. },
  1436. .class = &omap34xx_mcspi_class,
  1437. .dev_attr = &omap_mcspi2_dev_attr,
  1438. };
  1439. /* mcspi3 */
  1440. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1441. { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
  1442. { .irq = -1 },
  1443. };
  1444. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1445. { .name = "tx0", .dma_req = 15 },
  1446. { .name = "rx0", .dma_req = 16 },
  1447. { .name = "tx1", .dma_req = 23 },
  1448. { .name = "rx1", .dma_req = 24 },
  1449. { .dma_req = -1 }
  1450. };
  1451. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1452. .num_chipselect = 2,
  1453. };
  1454. static struct omap_hwmod omap34xx_mcspi3 = {
  1455. .name = "mcspi3",
  1456. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1457. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1458. .main_clk = "mcspi3_fck",
  1459. .prcm = {
  1460. .omap2 = {
  1461. .module_offs = CORE_MOD,
  1462. .prcm_reg_id = 1,
  1463. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1464. .idlest_reg_id = 1,
  1465. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1466. },
  1467. },
  1468. .class = &omap34xx_mcspi_class,
  1469. .dev_attr = &omap_mcspi3_dev_attr,
  1470. };
  1471. /* mcspi4 */
  1472. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1473. { .name = "irq", .irq = 48 + OMAP_INTC_START, },
  1474. { .irq = -1 },
  1475. };
  1476. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1477. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1478. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1479. { .dma_req = -1 }
  1480. };
  1481. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1482. .num_chipselect = 1,
  1483. };
  1484. static struct omap_hwmod omap34xx_mcspi4 = {
  1485. .name = "mcspi4",
  1486. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1487. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1488. .main_clk = "mcspi4_fck",
  1489. .prcm = {
  1490. .omap2 = {
  1491. .module_offs = CORE_MOD,
  1492. .prcm_reg_id = 1,
  1493. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1494. .idlest_reg_id = 1,
  1495. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1496. },
  1497. },
  1498. .class = &omap34xx_mcspi_class,
  1499. .dev_attr = &omap_mcspi4_dev_attr,
  1500. };
  1501. /* usbhsotg */
  1502. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  1503. .rev_offs = 0x0400,
  1504. .sysc_offs = 0x0404,
  1505. .syss_offs = 0x0408,
  1506. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1507. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1508. SYSC_HAS_AUTOIDLE),
  1509. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1510. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1511. .sysc_fields = &omap_hwmod_sysc_type1,
  1512. };
  1513. static struct omap_hwmod_class usbotg_class = {
  1514. .name = "usbotg",
  1515. .sysc = &omap3xxx_usbhsotg_sysc,
  1516. };
  1517. /* usb_otg_hs */
  1518. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  1519. { .name = "mc", .irq = 92 + OMAP_INTC_START, },
  1520. { .name = "dma", .irq = 93 + OMAP_INTC_START, },
  1521. { .irq = -1 },
  1522. };
  1523. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  1524. .name = "usb_otg_hs",
  1525. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  1526. .main_clk = "hsotgusb_ick",
  1527. .prcm = {
  1528. .omap2 = {
  1529. .prcm_reg_id = 1,
  1530. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  1531. .module_offs = CORE_MOD,
  1532. .idlest_reg_id = 1,
  1533. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  1534. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  1535. },
  1536. },
  1537. .class = &usbotg_class,
  1538. /*
  1539. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1540. * broken when autoidle is enabled
  1541. * workaround is to disable the autoidle bit at module level.
  1542. *
  1543. * Enabling the device in any other MIDLEMODE setting but force-idle
  1544. * causes core_pwrdm not enter idle states at least on OMAP3630.
  1545. * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
  1546. * signal when MIDLEMODE is set to force-idle.
  1547. */
  1548. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1549. | HWMOD_FORCE_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. /*
  3136. * According to Mark Greer, the MPU will not return from WFI
  3137. * when the EMAC signals an interrupt.
  3138. * http://www.spinics.net/lists/arm-kernel/msg174734.html
  3139. */
  3140. .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
  3141. };
  3142. /* l3_core -> davinci emac interface */
  3143. /*
  3144. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  3145. * but this will probably require some additional hwmod core support,
  3146. * so is left as a future to-do item.
  3147. */
  3148. static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
  3149. .master = &am35xx_emac_hwmod,
  3150. .slave = &omap3xxx_l3_main_hwmod,
  3151. .clk = "emac_ick",
  3152. .user = OCP_USER_MPU,
  3153. };
  3154. static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
  3155. {
  3156. .pa_start = AM35XX_IPSS_EMAC_BASE,
  3157. .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
  3158. .flags = ADDR_TYPE_RT,
  3159. },
  3160. { }
  3161. };
  3162. /* l4_core -> davinci emac */
  3163. /*
  3164. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  3165. * but this will probably require some additional hwmod core support,
  3166. * so is left as a future to-do item.
  3167. */
  3168. static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
  3169. .master = &omap3xxx_l4_core_hwmod,
  3170. .slave = &am35xx_emac_hwmod,
  3171. .clk = "emac_ick",
  3172. .addr = am35xx_emac_addrs,
  3173. .user = OCP_USER_MPU,
  3174. };
  3175. static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
  3176. .master = &omap3xxx_l3_main_hwmod,
  3177. .slave = &omap3xxx_gpmc_hwmod,
  3178. .clk = "core_l3_ick",
  3179. .addr = omap3xxx_gpmc_addrs,
  3180. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3181. };
  3182. static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
  3183. &omap3xxx_l3_main__l4_core,
  3184. &omap3xxx_l3_main__l4_per,
  3185. &omap3xxx_mpu__l3_main,
  3186. &omap3xxx_l3_main__l4_debugss,
  3187. &omap3xxx_l4_core__l4_wkup,
  3188. &omap3xxx_l4_core__mmc3,
  3189. &omap3_l4_core__uart1,
  3190. &omap3_l4_core__uart2,
  3191. &omap3_l4_per__uart3,
  3192. &omap3_l4_core__i2c1,
  3193. &omap3_l4_core__i2c2,
  3194. &omap3_l4_core__i2c3,
  3195. &omap3xxx_l4_wkup__l4_sec,
  3196. &omap3xxx_l4_wkup__timer1,
  3197. &omap3xxx_l4_per__timer2,
  3198. &omap3xxx_l4_per__timer3,
  3199. &omap3xxx_l4_per__timer4,
  3200. &omap3xxx_l4_per__timer5,
  3201. &omap3xxx_l4_per__timer6,
  3202. &omap3xxx_l4_per__timer7,
  3203. &omap3xxx_l4_per__timer8,
  3204. &omap3xxx_l4_per__timer9,
  3205. &omap3xxx_l4_core__timer10,
  3206. &omap3xxx_l4_core__timer11,
  3207. &omap3xxx_l4_wkup__wd_timer2,
  3208. &omap3xxx_l4_wkup__gpio1,
  3209. &omap3xxx_l4_per__gpio2,
  3210. &omap3xxx_l4_per__gpio3,
  3211. &omap3xxx_l4_per__gpio4,
  3212. &omap3xxx_l4_per__gpio5,
  3213. &omap3xxx_l4_per__gpio6,
  3214. &omap3xxx_dma_system__l3,
  3215. &omap3xxx_l4_core__dma_system,
  3216. &omap3xxx_l4_core__mcbsp1,
  3217. &omap3xxx_l4_per__mcbsp2,
  3218. &omap3xxx_l4_per__mcbsp3,
  3219. &omap3xxx_l4_per__mcbsp4,
  3220. &omap3xxx_l4_core__mcbsp5,
  3221. &omap3xxx_l4_per__mcbsp2_sidetone,
  3222. &omap3xxx_l4_per__mcbsp3_sidetone,
  3223. &omap34xx_l4_core__mcspi1,
  3224. &omap34xx_l4_core__mcspi2,
  3225. &omap34xx_l4_core__mcspi3,
  3226. &omap34xx_l4_core__mcspi4,
  3227. &omap3xxx_l4_wkup__counter_32k,
  3228. &omap3xxx_l3_main__gpmc,
  3229. NULL,
  3230. };
  3231. /* GP-only hwmod links */
  3232. static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
  3233. &omap3xxx_l4_sec__timer12,
  3234. NULL
  3235. };
  3236. /* 3430ES1-only hwmod links */
  3237. static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
  3238. &omap3430es1_dss__l3,
  3239. &omap3430es1_l4_core__dss,
  3240. NULL
  3241. };
  3242. /* 3430ES2+-only hwmod links */
  3243. static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
  3244. &omap3xxx_dss__l3,
  3245. &omap3xxx_l4_core__dss,
  3246. &omap3xxx_usbhsotg__l3,
  3247. &omap3xxx_l4_core__usbhsotg,
  3248. &omap3xxx_usb_host_hs__l3_main_2,
  3249. &omap3xxx_l4_core__usb_host_hs,
  3250. &omap3xxx_l4_core__usb_tll_hs,
  3251. NULL
  3252. };
  3253. /* <= 3430ES3-only hwmod links */
  3254. static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
  3255. &omap3xxx_l4_core__pre_es3_mmc1,
  3256. &omap3xxx_l4_core__pre_es3_mmc2,
  3257. NULL
  3258. };
  3259. /* 3430ES3+-only hwmod links */
  3260. static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
  3261. &omap3xxx_l4_core__es3plus_mmc1,
  3262. &omap3xxx_l4_core__es3plus_mmc2,
  3263. NULL
  3264. };
  3265. /* 34xx-only hwmod links (all ES revisions) */
  3266. static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
  3267. &omap3xxx_l3__iva,
  3268. &omap34xx_l4_core__sr1,
  3269. &omap34xx_l4_core__sr2,
  3270. &omap3xxx_l4_core__mailbox,
  3271. &omap3xxx_l4_core__hdq1w,
  3272. &omap3xxx_sad2d__l3,
  3273. &omap3xxx_l4_core__mmu_isp,
  3274. #ifdef CONFIG_OMAP_IOMMU_IVA2
  3275. &omap3xxx_l3_main__mmu_iva,
  3276. #endif
  3277. NULL
  3278. };
  3279. /* 36xx-only hwmod links (all ES revisions) */
  3280. static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
  3281. &omap3xxx_l3__iva,
  3282. &omap36xx_l4_per__uart4,
  3283. &omap3xxx_dss__l3,
  3284. &omap3xxx_l4_core__dss,
  3285. &omap36xx_l4_core__sr1,
  3286. &omap36xx_l4_core__sr2,
  3287. &omap3xxx_usbhsotg__l3,
  3288. &omap3xxx_l4_core__usbhsotg,
  3289. &omap3xxx_l4_core__mailbox,
  3290. &omap3xxx_usb_host_hs__l3_main_2,
  3291. &omap3xxx_l4_core__usb_host_hs,
  3292. &omap3xxx_l4_core__usb_tll_hs,
  3293. &omap3xxx_l4_core__es3plus_mmc1,
  3294. &omap3xxx_l4_core__es3plus_mmc2,
  3295. &omap3xxx_l4_core__hdq1w,
  3296. &omap3xxx_sad2d__l3,
  3297. &omap3xxx_l4_core__mmu_isp,
  3298. #ifdef CONFIG_OMAP_IOMMU_IVA2
  3299. &omap3xxx_l3_main__mmu_iva,
  3300. #endif
  3301. NULL
  3302. };
  3303. static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
  3304. &omap3xxx_dss__l3,
  3305. &omap3xxx_l4_core__dss,
  3306. &am35xx_usbhsotg__l3,
  3307. &am35xx_l4_core__usbhsotg,
  3308. &am35xx_l4_core__uart4,
  3309. &omap3xxx_usb_host_hs__l3_main_2,
  3310. &omap3xxx_l4_core__usb_host_hs,
  3311. &omap3xxx_l4_core__usb_tll_hs,
  3312. &omap3xxx_l4_core__es3plus_mmc1,
  3313. &omap3xxx_l4_core__es3plus_mmc2,
  3314. &omap3xxx_l4_core__hdq1w,
  3315. &am35xx_mdio__l3,
  3316. &am35xx_l4_core__mdio,
  3317. &am35xx_emac__l3,
  3318. &am35xx_l4_core__emac,
  3319. NULL
  3320. };
  3321. static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
  3322. &omap3xxx_l4_core__dss_dispc,
  3323. &omap3xxx_l4_core__dss_dsi1,
  3324. &omap3xxx_l4_core__dss_rfbi,
  3325. &omap3xxx_l4_core__dss_venc,
  3326. NULL
  3327. };
  3328. int __init omap3xxx_hwmod_init(void)
  3329. {
  3330. int r;
  3331. struct omap_hwmod_ocp_if **h = NULL;
  3332. unsigned int rev;
  3333. omap_hwmod_init();
  3334. /* Register hwmod links common to all OMAP3 */
  3335. r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
  3336. if (r < 0)
  3337. return r;
  3338. /* Register GP-only hwmod links. */
  3339. if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
  3340. r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
  3341. if (r < 0)
  3342. return r;
  3343. }
  3344. rev = omap_rev();
  3345. /*
  3346. * Register hwmod links common to individual OMAP3 families, all
  3347. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  3348. * All possible revisions should be included in this conditional.
  3349. */
  3350. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3351. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  3352. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  3353. h = omap34xx_hwmod_ocp_ifs;
  3354. } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
  3355. h = am35xx_hwmod_ocp_ifs;
  3356. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  3357. rev == OMAP3630_REV_ES1_2) {
  3358. h = omap36xx_hwmod_ocp_ifs;
  3359. } else {
  3360. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3361. return -EINVAL;
  3362. }
  3363. r = omap_hwmod_register_links(h);
  3364. if (r < 0)
  3365. return r;
  3366. /*
  3367. * Register hwmod links specific to certain ES levels of a
  3368. * particular family of silicon (e.g., 34xx ES1.0)
  3369. */
  3370. h = NULL;
  3371. if (rev == OMAP3430_REV_ES1_0) {
  3372. h = omap3430es1_hwmod_ocp_ifs;
  3373. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3374. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3375. rev == OMAP3430_REV_ES3_1_2) {
  3376. h = omap3430es2plus_hwmod_ocp_ifs;
  3377. }
  3378. if (h) {
  3379. r = omap_hwmod_register_links(h);
  3380. if (r < 0)
  3381. return r;
  3382. }
  3383. h = NULL;
  3384. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3385. rev == OMAP3430_REV_ES2_1) {
  3386. h = omap3430_pre_es3_hwmod_ocp_ifs;
  3387. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3388. rev == OMAP3430_REV_ES3_1_2) {
  3389. h = omap3430_es3plus_hwmod_ocp_ifs;
  3390. }
  3391. if (h)
  3392. r = omap_hwmod_register_links(h);
  3393. if (r < 0)
  3394. return r;
  3395. /*
  3396. * DSS code presumes that dss_core hwmod is handled first,
  3397. * _before_ any other DSS related hwmods so register common
  3398. * DSS hwmod links last to ensure that dss_core is already
  3399. * registered. Otherwise some change things may happen, for
  3400. * ex. if dispc is handled before dss_core and DSS is enabled
  3401. * in bootloader DISPC will be reset with outputs enabled
  3402. * which sometimes leads to unrecoverable L3 error. XXX The
  3403. * long-term fix to this is to ensure hwmods are set up in
  3404. * dependency order in the hwmod core code.
  3405. */
  3406. r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
  3407. return r;
  3408. }