omap_hwmod_3xxx_data.c 82 KB

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