omap_hwmod_3xxx_data.c 100 KB

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