omap_hwmod_3xxx_data.c 93 KB

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