omap_hwmod_3xxx_data.c 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * The data in this file should be completely autogeneratable from
  13. * the TI hardware database or other technical documentation.
  14. *
  15. * XXX these should be marked initdata for multi-OMAP kernels
  16. */
  17. #include <linux/i2c-omap.h>
  18. #include <linux/power/smartreflex.h>
  19. #include <linux/platform_data/gpio-omap.h>
  20. #include <linux/omap-dma.h>
  21. #include "l3_3xxx.h"
  22. #include "l4_3xxx.h"
  23. #include <linux/platform_data/asoc-ti-mcbsp.h>
  24. #include <linux/platform_data/spi-omap2-mcspi.h>
  25. #include <linux/platform_data/iommu-omap.h>
  26. #include <plat/dmtimer.h>
  27. #include "am35xx.h"
  28. #include "soc.h"
  29. #include "omap_hwmod.h"
  30. #include "omap_hwmod_common_data.h"
  31. #include "prm-regbits-34xx.h"
  32. #include "cm-regbits-34xx.h"
  33. #include "dma.h"
  34. #include "i2c.h"
  35. #include "mmc.h"
  36. #include "wd_timer.h"
  37. #include "serial.h"
  38. /*
  39. * OMAP3xxx hardware module integration data
  40. *
  41. * All of the data in this section should be autogeneratable from the
  42. * TI hardware database or other technical documentation. Data that
  43. * is driver-specific or driver-kernel integration-specific belongs
  44. * elsewhere.
  45. */
  46. /*
  47. * IP blocks
  48. */
  49. /* L3 */
  50. static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
  51. { .irq = 9 + OMAP_INTC_START, },
  52. { .irq = 10 + OMAP_INTC_START, },
  53. { .irq = -1 },
  54. };
  55. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  56. .name = "l3_main",
  57. .class = &l3_hwmod_class,
  58. .mpu_irqs = omap3xxx_l3_main_irqs,
  59. .flags = HWMOD_NO_IDLEST,
  60. };
  61. /* L4 CORE */
  62. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  63. .name = "l4_core",
  64. .class = &l4_hwmod_class,
  65. .flags = HWMOD_NO_IDLEST,
  66. };
  67. /* L4 PER */
  68. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  69. .name = "l4_per",
  70. .class = &l4_hwmod_class,
  71. .flags = HWMOD_NO_IDLEST,
  72. };
  73. /* L4 WKUP */
  74. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  75. .name = "l4_wkup",
  76. .class = &l4_hwmod_class,
  77. .flags = HWMOD_NO_IDLEST,
  78. };
  79. /* L4 SEC */
  80. static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
  81. .name = "l4_sec",
  82. .class = &l4_hwmod_class,
  83. .flags = HWMOD_NO_IDLEST,
  84. };
  85. /* MPU */
  86. static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
  87. { .name = "pmu", .irq = 3 + OMAP_INTC_START },
  88. { .irq = -1 }
  89. };
  90. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  91. .name = "mpu",
  92. .mpu_irqs = omap3xxx_mpu_irqs,
  93. .class = &mpu_hwmod_class,
  94. .main_clk = "arm_fck",
  95. };
  96. /* IVA2 (IVA2) */
  97. static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
  98. { .name = "logic", .rst_shift = 0, .st_shift = 8 },
  99. { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
  100. { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
  101. };
  102. static struct omap_hwmod omap3xxx_iva_hwmod = {
  103. .name = "iva",
  104. .class = &iva_hwmod_class,
  105. .clkdm_name = "iva2_clkdm",
  106. .rst_lines = omap3xxx_iva_resets,
  107. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
  108. .main_clk = "iva2_ck",
  109. .prcm = {
  110. .omap2 = {
  111. .module_offs = OMAP3430_IVA2_MOD,
  112. .prcm_reg_id = 1,
  113. .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
  114. .idlest_reg_id = 1,
  115. .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
  116. }
  117. },
  118. };
  119. /*
  120. * 'debugss' class
  121. * debug and emulation sub system
  122. */
  123. static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
  124. .name = "debugss",
  125. };
  126. /* debugss */
  127. static struct omap_hwmod omap3xxx_debugss_hwmod = {
  128. .name = "debugss",
  129. .class = &omap3xxx_debugss_hwmod_class,
  130. .clkdm_name = "emu_clkdm",
  131. .main_clk = "emu_src_ck",
  132. .flags = HWMOD_NO_IDLEST,
  133. };
  134. /* timer class */
  135. static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
  136. .rev_offs = 0x0000,
  137. .sysc_offs = 0x0010,
  138. .syss_offs = 0x0014,
  139. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  140. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  141. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
  142. SYSS_HAS_RESET_STATUS),
  143. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  144. .clockact = CLOCKACT_TEST_ICLK,
  145. .sysc_fields = &omap_hwmod_sysc_type1,
  146. };
  147. static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
  148. .name = "timer",
  149. .sysc = &omap3xxx_timer_sysc,
  150. };
  151. /* secure timers dev attribute */
  152. static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
  153. .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
  154. };
  155. /* always-on timers dev attribute */
  156. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  157. .timer_capability = OMAP_TIMER_ALWON,
  158. };
  159. /* pwm timers dev attribute */
  160. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  161. .timer_capability = OMAP_TIMER_HAS_PWM,
  162. };
  163. /* timers with DSP interrupt dev attribute */
  164. static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
  165. .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
  166. };
  167. /* pwm timers with DSP interrupt dev attribute */
  168. static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
  169. .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
  170. };
  171. /* timer1 */
  172. static struct omap_hwmod omap3xxx_timer1_hwmod = {
  173. .name = "timer1",
  174. .mpu_irqs = omap2_timer1_mpu_irqs,
  175. .main_clk = "gpt1_fck",
  176. .prcm = {
  177. .omap2 = {
  178. .prcm_reg_id = 1,
  179. .module_bit = OMAP3430_EN_GPT1_SHIFT,
  180. .module_offs = WKUP_MOD,
  181. .idlest_reg_id = 1,
  182. .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
  183. },
  184. },
  185. .dev_attr = &capability_alwon_dev_attr,
  186. .class = &omap3xxx_timer_hwmod_class,
  187. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  188. };
  189. /* timer2 */
  190. static struct omap_hwmod omap3xxx_timer2_hwmod = {
  191. .name = "timer2",
  192. .mpu_irqs = omap2_timer2_mpu_irqs,
  193. .main_clk = "gpt2_fck",
  194. .prcm = {
  195. .omap2 = {
  196. .prcm_reg_id = 1,
  197. .module_bit = OMAP3430_EN_GPT2_SHIFT,
  198. .module_offs = OMAP3430_PER_MOD,
  199. .idlest_reg_id = 1,
  200. .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
  201. },
  202. },
  203. .class = &omap3xxx_timer_hwmod_class,
  204. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  205. };
  206. /* timer3 */
  207. static struct omap_hwmod omap3xxx_timer3_hwmod = {
  208. .name = "timer3",
  209. .mpu_irqs = omap2_timer3_mpu_irqs,
  210. .main_clk = "gpt3_fck",
  211. .prcm = {
  212. .omap2 = {
  213. .prcm_reg_id = 1,
  214. .module_bit = OMAP3430_EN_GPT3_SHIFT,
  215. .module_offs = OMAP3430_PER_MOD,
  216. .idlest_reg_id = 1,
  217. .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
  218. },
  219. },
  220. .class = &omap3xxx_timer_hwmod_class,
  221. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  222. };
  223. /* timer4 */
  224. static struct omap_hwmod omap3xxx_timer4_hwmod = {
  225. .name = "timer4",
  226. .mpu_irqs = omap2_timer4_mpu_irqs,
  227. .main_clk = "gpt4_fck",
  228. .prcm = {
  229. .omap2 = {
  230. .prcm_reg_id = 1,
  231. .module_bit = OMAP3430_EN_GPT4_SHIFT,
  232. .module_offs = OMAP3430_PER_MOD,
  233. .idlest_reg_id = 1,
  234. .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
  235. },
  236. },
  237. .class = &omap3xxx_timer_hwmod_class,
  238. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  239. };
  240. /* timer5 */
  241. static struct omap_hwmod omap3xxx_timer5_hwmod = {
  242. .name = "timer5",
  243. .mpu_irqs = omap2_timer5_mpu_irqs,
  244. .main_clk = "gpt5_fck",
  245. .prcm = {
  246. .omap2 = {
  247. .prcm_reg_id = 1,
  248. .module_bit = OMAP3430_EN_GPT5_SHIFT,
  249. .module_offs = OMAP3430_PER_MOD,
  250. .idlest_reg_id = 1,
  251. .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
  252. },
  253. },
  254. .dev_attr = &capability_dsp_dev_attr,
  255. .class = &omap3xxx_timer_hwmod_class,
  256. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  257. };
  258. /* timer6 */
  259. static struct omap_hwmod omap3xxx_timer6_hwmod = {
  260. .name = "timer6",
  261. .mpu_irqs = omap2_timer6_mpu_irqs,
  262. .main_clk = "gpt6_fck",
  263. .prcm = {
  264. .omap2 = {
  265. .prcm_reg_id = 1,
  266. .module_bit = OMAP3430_EN_GPT6_SHIFT,
  267. .module_offs = OMAP3430_PER_MOD,
  268. .idlest_reg_id = 1,
  269. .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
  270. },
  271. },
  272. .dev_attr = &capability_dsp_dev_attr,
  273. .class = &omap3xxx_timer_hwmod_class,
  274. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  275. };
  276. /* timer7 */
  277. static struct omap_hwmod omap3xxx_timer7_hwmod = {
  278. .name = "timer7",
  279. .mpu_irqs = omap2_timer7_mpu_irqs,
  280. .main_clk = "gpt7_fck",
  281. .prcm = {
  282. .omap2 = {
  283. .prcm_reg_id = 1,
  284. .module_bit = OMAP3430_EN_GPT7_SHIFT,
  285. .module_offs = OMAP3430_PER_MOD,
  286. .idlest_reg_id = 1,
  287. .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
  288. },
  289. },
  290. .dev_attr = &capability_dsp_dev_attr,
  291. .class = &omap3xxx_timer_hwmod_class,
  292. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  293. };
  294. /* timer8 */
  295. static struct omap_hwmod omap3xxx_timer8_hwmod = {
  296. .name = "timer8",
  297. .mpu_irqs = omap2_timer8_mpu_irqs,
  298. .main_clk = "gpt8_fck",
  299. .prcm = {
  300. .omap2 = {
  301. .prcm_reg_id = 1,
  302. .module_bit = OMAP3430_EN_GPT8_SHIFT,
  303. .module_offs = OMAP3430_PER_MOD,
  304. .idlest_reg_id = 1,
  305. .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
  306. },
  307. },
  308. .dev_attr = &capability_dsp_pwm_dev_attr,
  309. .class = &omap3xxx_timer_hwmod_class,
  310. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  311. };
  312. /* timer9 */
  313. static struct omap_hwmod omap3xxx_timer9_hwmod = {
  314. .name = "timer9",
  315. .mpu_irqs = omap2_timer9_mpu_irqs,
  316. .main_clk = "gpt9_fck",
  317. .prcm = {
  318. .omap2 = {
  319. .prcm_reg_id = 1,
  320. .module_bit = OMAP3430_EN_GPT9_SHIFT,
  321. .module_offs = OMAP3430_PER_MOD,
  322. .idlest_reg_id = 1,
  323. .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
  324. },
  325. },
  326. .dev_attr = &capability_pwm_dev_attr,
  327. .class = &omap3xxx_timer_hwmod_class,
  328. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  329. };
  330. /* timer10 */
  331. static struct omap_hwmod omap3xxx_timer10_hwmod = {
  332. .name = "timer10",
  333. .mpu_irqs = omap2_timer10_mpu_irqs,
  334. .main_clk = "gpt10_fck",
  335. .prcm = {
  336. .omap2 = {
  337. .prcm_reg_id = 1,
  338. .module_bit = OMAP3430_EN_GPT10_SHIFT,
  339. .module_offs = CORE_MOD,
  340. .idlest_reg_id = 1,
  341. .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
  342. },
  343. },
  344. .dev_attr = &capability_pwm_dev_attr,
  345. .class = &omap3xxx_timer_hwmod_class,
  346. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  347. };
  348. /* timer11 */
  349. static struct omap_hwmod omap3xxx_timer11_hwmod = {
  350. .name = "timer11",
  351. .mpu_irqs = omap2_timer11_mpu_irqs,
  352. .main_clk = "gpt11_fck",
  353. .prcm = {
  354. .omap2 = {
  355. .prcm_reg_id = 1,
  356. .module_bit = OMAP3430_EN_GPT11_SHIFT,
  357. .module_offs = CORE_MOD,
  358. .idlest_reg_id = 1,
  359. .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
  360. },
  361. },
  362. .dev_attr = &capability_pwm_dev_attr,
  363. .class = &omap3xxx_timer_hwmod_class,
  364. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  365. };
  366. /* timer12 */
  367. static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
  368. { .irq = 95 + OMAP_INTC_START, },
  369. { .irq = -1 },
  370. };
  371. static struct omap_hwmod omap3xxx_timer12_hwmod = {
  372. .name = "timer12",
  373. .mpu_irqs = omap3xxx_timer12_mpu_irqs,
  374. .main_clk = "gpt12_fck",
  375. .prcm = {
  376. .omap2 = {
  377. .prcm_reg_id = 1,
  378. .module_bit = OMAP3430_EN_GPT12_SHIFT,
  379. .module_offs = WKUP_MOD,
  380. .idlest_reg_id = 1,
  381. .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
  382. },
  383. },
  384. .dev_attr = &capability_secure_dev_attr,
  385. .class = &omap3xxx_timer_hwmod_class,
  386. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  387. };
  388. /*
  389. * 'wd_timer' class
  390. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  391. * overflow condition
  392. */
  393. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  394. .rev_offs = 0x0000,
  395. .sysc_offs = 0x0010,
  396. .syss_offs = 0x0014,
  397. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  398. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  399. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  400. SYSS_HAS_RESET_STATUS),
  401. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  402. .sysc_fields = &omap_hwmod_sysc_type1,
  403. };
  404. /* I2C common */
  405. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  406. .rev_offs = 0x00,
  407. .sysc_offs = 0x20,
  408. .syss_offs = 0x10,
  409. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  410. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  411. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  412. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  413. .clockact = CLOCKACT_TEST_ICLK,
  414. .sysc_fields = &omap_hwmod_sysc_type1,
  415. };
  416. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  417. .name = "wd_timer",
  418. .sysc = &omap3xxx_wd_timer_sysc,
  419. .pre_shutdown = &omap2_wd_timer_disable,
  420. .reset = &omap2_wd_timer_reset,
  421. };
  422. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  423. .name = "wd_timer2",
  424. .class = &omap3xxx_wd_timer_hwmod_class,
  425. .main_clk = "wdt2_fck",
  426. .prcm = {
  427. .omap2 = {
  428. .prcm_reg_id = 1,
  429. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  430. .module_offs = WKUP_MOD,
  431. .idlest_reg_id = 1,
  432. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  433. },
  434. },
  435. /*
  436. * XXX: Use software supervised mode, HW supervised smartidle seems to
  437. * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
  438. */
  439. .flags = HWMOD_SWSUP_SIDLE,
  440. };
  441. /* UART1 */
  442. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  443. .name = "uart1",
  444. .mpu_irqs = omap2_uart1_mpu_irqs,
  445. .sdma_reqs = omap2_uart1_sdma_reqs,
  446. .main_clk = "uart1_fck",
  447. .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 = OMAP36XX_DMA_UART4_RX, },
  502. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  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 = AM35XX_DMA_UART4_RX, },
  528. { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
  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 = OMAP34XX_DMA_I2C3_TX },
  781. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  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_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
  1363. { .irq = 26 + OMAP_INTC_START, },
  1364. { .irq = -1 },
  1365. };
  1366. static struct omap_hwmod omap3xxx_mailbox_hwmod = {
  1367. .name = "mailbox",
  1368. .class = &omap3xxx_mailbox_hwmod_class,
  1369. .mpu_irqs = omap3xxx_mailbox_irqs,
  1370. .main_clk = "mailboxes_ick",
  1371. .prcm = {
  1372. .omap2 = {
  1373. .prcm_reg_id = 1,
  1374. .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
  1375. .module_offs = CORE_MOD,
  1376. .idlest_reg_id = 1,
  1377. .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
  1378. },
  1379. },
  1380. };
  1381. /*
  1382. * 'mcspi' class
  1383. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1384. * bus
  1385. */
  1386. static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
  1387. .rev_offs = 0x0000,
  1388. .sysc_offs = 0x0010,
  1389. .syss_offs = 0x0014,
  1390. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1391. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1392. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1393. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1394. .sysc_fields = &omap_hwmod_sysc_type1,
  1395. };
  1396. static struct omap_hwmod_class omap34xx_mcspi_class = {
  1397. .name = "mcspi",
  1398. .sysc = &omap34xx_mcspi_sysc,
  1399. .rev = OMAP3_MCSPI_REV,
  1400. };
  1401. /* mcspi1 */
  1402. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1403. .num_chipselect = 4,
  1404. };
  1405. static struct omap_hwmod omap34xx_mcspi1 = {
  1406. .name = "mcspi1",
  1407. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1408. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1409. .main_clk = "mcspi1_fck",
  1410. .prcm = {
  1411. .omap2 = {
  1412. .module_offs = CORE_MOD,
  1413. .prcm_reg_id = 1,
  1414. .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
  1415. .idlest_reg_id = 1,
  1416. .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
  1417. },
  1418. },
  1419. .class = &omap34xx_mcspi_class,
  1420. .dev_attr = &omap_mcspi1_dev_attr,
  1421. };
  1422. /* mcspi2 */
  1423. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1424. .num_chipselect = 2,
  1425. };
  1426. static struct omap_hwmod omap34xx_mcspi2 = {
  1427. .name = "mcspi2",
  1428. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1429. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1430. .main_clk = "mcspi2_fck",
  1431. .prcm = {
  1432. .omap2 = {
  1433. .module_offs = CORE_MOD,
  1434. .prcm_reg_id = 1,
  1435. .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
  1436. .idlest_reg_id = 1,
  1437. .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
  1438. },
  1439. },
  1440. .class = &omap34xx_mcspi_class,
  1441. .dev_attr = &omap_mcspi2_dev_attr,
  1442. };
  1443. /* mcspi3 */
  1444. static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
  1445. { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
  1446. { .irq = -1 },
  1447. };
  1448. static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
  1449. { .name = "tx0", .dma_req = 15 },
  1450. { .name = "rx0", .dma_req = 16 },
  1451. { .name = "tx1", .dma_req = 23 },
  1452. { .name = "rx1", .dma_req = 24 },
  1453. { .dma_req = -1 }
  1454. };
  1455. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1456. .num_chipselect = 2,
  1457. };
  1458. static struct omap_hwmod omap34xx_mcspi3 = {
  1459. .name = "mcspi3",
  1460. .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
  1461. .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
  1462. .main_clk = "mcspi3_fck",
  1463. .prcm = {
  1464. .omap2 = {
  1465. .module_offs = CORE_MOD,
  1466. .prcm_reg_id = 1,
  1467. .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
  1468. .idlest_reg_id = 1,
  1469. .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
  1470. },
  1471. },
  1472. .class = &omap34xx_mcspi_class,
  1473. .dev_attr = &omap_mcspi3_dev_attr,
  1474. };
  1475. /* mcspi4 */
  1476. static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
  1477. { .name = "irq", .irq = 48 + OMAP_INTC_START, },
  1478. { .irq = -1 },
  1479. };
  1480. static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
  1481. { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
  1482. { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
  1483. { .dma_req = -1 }
  1484. };
  1485. static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
  1486. .num_chipselect = 1,
  1487. };
  1488. static struct omap_hwmod omap34xx_mcspi4 = {
  1489. .name = "mcspi4",
  1490. .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
  1491. .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
  1492. .main_clk = "mcspi4_fck",
  1493. .prcm = {
  1494. .omap2 = {
  1495. .module_offs = CORE_MOD,
  1496. .prcm_reg_id = 1,
  1497. .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
  1498. .idlest_reg_id = 1,
  1499. .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
  1500. },
  1501. },
  1502. .class = &omap34xx_mcspi_class,
  1503. .dev_attr = &omap_mcspi4_dev_attr,
  1504. };
  1505. /* usbhsotg */
  1506. static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
  1507. .rev_offs = 0x0400,
  1508. .sysc_offs = 0x0404,
  1509. .syss_offs = 0x0408,
  1510. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1511. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1512. SYSC_HAS_AUTOIDLE),
  1513. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1514. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1515. .sysc_fields = &omap_hwmod_sysc_type1,
  1516. };
  1517. static struct omap_hwmod_class usbotg_class = {
  1518. .name = "usbotg",
  1519. .sysc = &omap3xxx_usbhsotg_sysc,
  1520. };
  1521. /* usb_otg_hs */
  1522. static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  1523. { .name = "mc", .irq = 92 + OMAP_INTC_START, },
  1524. { .name = "dma", .irq = 93 + OMAP_INTC_START, },
  1525. { .irq = -1 },
  1526. };
  1527. static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  1528. .name = "usb_otg_hs",
  1529. .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
  1530. .main_clk = "hsotgusb_ick",
  1531. .prcm = {
  1532. .omap2 = {
  1533. .prcm_reg_id = 1,
  1534. .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
  1535. .module_offs = CORE_MOD,
  1536. .idlest_reg_id = 1,
  1537. .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
  1538. .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
  1539. },
  1540. },
  1541. .class = &usbotg_class,
  1542. /*
  1543. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1544. * broken when autoidle is enabled
  1545. * workaround is to disable the autoidle bit at module level.
  1546. *
  1547. * Enabling the device in any other MIDLEMODE setting but force-idle
  1548. * causes core_pwrdm not enter idle states at least on OMAP3630.
  1549. * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
  1550. * signal when MIDLEMODE is set to force-idle.
  1551. */
  1552. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1553. | HWMOD_FORCE_MSTANDBY,
  1554. };
  1555. /* usb_otg_hs */
  1556. static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
  1557. { .name = "mc", .irq = 71 + OMAP_INTC_START, },
  1558. { .irq = -1 },
  1559. };
  1560. static struct omap_hwmod_class am35xx_usbotg_class = {
  1561. .name = "am35xx_usbotg",
  1562. };
  1563. static struct omap_hwmod am35xx_usbhsotg_hwmod = {
  1564. .name = "am35x_otg_hs",
  1565. .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
  1566. .main_clk = "hsotgusb_fck",
  1567. .class = &am35xx_usbotg_class,
  1568. .flags = HWMOD_NO_IDLEST,
  1569. };
  1570. /* MMC/SD/SDIO common */
  1571. static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
  1572. .rev_offs = 0x1fc,
  1573. .sysc_offs = 0x10,
  1574. .syss_offs = 0x14,
  1575. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1576. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1577. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1578. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1579. .sysc_fields = &omap_hwmod_sysc_type1,
  1580. };
  1581. static struct omap_hwmod_class omap34xx_mmc_class = {
  1582. .name = "mmc",
  1583. .sysc = &omap34xx_mmc_sysc,
  1584. };
  1585. /* MMC/SD/SDIO1 */
  1586. static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
  1587. { .irq = 83 + OMAP_INTC_START, },
  1588. { .irq = -1 },
  1589. };
  1590. static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
  1591. { .name = "tx", .dma_req = 61, },
  1592. { .name = "rx", .dma_req = 62, },
  1593. { .dma_req = -1 }
  1594. };
  1595. static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
  1596. { .role = "dbck", .clk = "omap_32k_fck", },
  1597. };
  1598. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1599. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1600. };
  1601. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  1602. static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
  1603. .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
  1604. OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
  1605. };
  1606. static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
  1607. .name = "mmc1",
  1608. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  1609. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  1610. .opt_clks = omap34xx_mmc1_opt_clks,
  1611. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  1612. .main_clk = "mmchs1_fck",
  1613. .prcm = {
  1614. .omap2 = {
  1615. .module_offs = CORE_MOD,
  1616. .prcm_reg_id = 1,
  1617. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  1618. .idlest_reg_id = 1,
  1619. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  1620. },
  1621. },
  1622. .dev_attr = &mmc1_pre_es3_dev_attr,
  1623. .class = &omap34xx_mmc_class,
  1624. };
  1625. static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
  1626. .name = "mmc1",
  1627. .mpu_irqs = omap34xx_mmc1_mpu_irqs,
  1628. .sdma_reqs = omap34xx_mmc1_sdma_reqs,
  1629. .opt_clks = omap34xx_mmc1_opt_clks,
  1630. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
  1631. .main_clk = "mmchs1_fck",
  1632. .prcm = {
  1633. .omap2 = {
  1634. .module_offs = CORE_MOD,
  1635. .prcm_reg_id = 1,
  1636. .module_bit = OMAP3430_EN_MMC1_SHIFT,
  1637. .idlest_reg_id = 1,
  1638. .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  1639. },
  1640. },
  1641. .dev_attr = &mmc1_dev_attr,
  1642. .class = &omap34xx_mmc_class,
  1643. };
  1644. /* MMC/SD/SDIO2 */
  1645. static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
  1646. { .irq = 86 + OMAP_INTC_START, },
  1647. { .irq = -1 },
  1648. };
  1649. static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
  1650. { .name = "tx", .dma_req = 47, },
  1651. { .name = "rx", .dma_req = 48, },
  1652. { .dma_req = -1 }
  1653. };
  1654. static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
  1655. { .role = "dbck", .clk = "omap_32k_fck", },
  1656. };
  1657. /* See 35xx errata 2.1.1.128 in SPRZ278F */
  1658. static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
  1659. .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
  1660. };
  1661. static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
  1662. .name = "mmc2",
  1663. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  1664. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  1665. .opt_clks = omap34xx_mmc2_opt_clks,
  1666. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  1667. .main_clk = "mmchs2_fck",
  1668. .prcm = {
  1669. .omap2 = {
  1670. .module_offs = CORE_MOD,
  1671. .prcm_reg_id = 1,
  1672. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  1673. .idlest_reg_id = 1,
  1674. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  1675. },
  1676. },
  1677. .dev_attr = &mmc2_pre_es3_dev_attr,
  1678. .class = &omap34xx_mmc_class,
  1679. };
  1680. static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
  1681. .name = "mmc2",
  1682. .mpu_irqs = omap34xx_mmc2_mpu_irqs,
  1683. .sdma_reqs = omap34xx_mmc2_sdma_reqs,
  1684. .opt_clks = omap34xx_mmc2_opt_clks,
  1685. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
  1686. .main_clk = "mmchs2_fck",
  1687. .prcm = {
  1688. .omap2 = {
  1689. .module_offs = CORE_MOD,
  1690. .prcm_reg_id = 1,
  1691. .module_bit = OMAP3430_EN_MMC2_SHIFT,
  1692. .idlest_reg_id = 1,
  1693. .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
  1694. },
  1695. },
  1696. .class = &omap34xx_mmc_class,
  1697. };
  1698. /* MMC/SD/SDIO3 */
  1699. static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
  1700. { .irq = 94 + OMAP_INTC_START, },
  1701. { .irq = -1 },
  1702. };
  1703. static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
  1704. { .name = "tx", .dma_req = 77, },
  1705. { .name = "rx", .dma_req = 78, },
  1706. { .dma_req = -1 }
  1707. };
  1708. static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
  1709. { .role = "dbck", .clk = "omap_32k_fck", },
  1710. };
  1711. static struct omap_hwmod omap3xxx_mmc3_hwmod = {
  1712. .name = "mmc3",
  1713. .mpu_irqs = omap34xx_mmc3_mpu_irqs,
  1714. .sdma_reqs = omap34xx_mmc3_sdma_reqs,
  1715. .opt_clks = omap34xx_mmc3_opt_clks,
  1716. .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
  1717. .main_clk = "mmchs3_fck",
  1718. .prcm = {
  1719. .omap2 = {
  1720. .prcm_reg_id = 1,
  1721. .module_bit = OMAP3430_EN_MMC3_SHIFT,
  1722. .idlest_reg_id = 1,
  1723. .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
  1724. },
  1725. },
  1726. .class = &omap34xx_mmc_class,
  1727. };
  1728. /*
  1729. * 'usb_host_hs' class
  1730. * high-speed multi-port usb host controller
  1731. */
  1732. static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
  1733. .rev_offs = 0x0000,
  1734. .sysc_offs = 0x0010,
  1735. .syss_offs = 0x0014,
  1736. .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  1737. SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
  1738. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1739. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1740. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1741. .sysc_fields = &omap_hwmod_sysc_type1,
  1742. };
  1743. static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
  1744. .name = "usb_host_hs",
  1745. .sysc = &omap3xxx_usb_host_hs_sysc,
  1746. };
  1747. static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
  1748. { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
  1749. };
  1750. static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
  1751. { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
  1752. { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
  1753. { .irq = -1 },
  1754. };
  1755. static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
  1756. .name = "usb_host_hs",
  1757. .class = &omap3xxx_usb_host_hs_hwmod_class,
  1758. .clkdm_name = "l3_init_clkdm",
  1759. .mpu_irqs = omap3xxx_usb_host_hs_irqs,
  1760. .main_clk = "usbhost_48m_fck",
  1761. .prcm = {
  1762. .omap2 = {
  1763. .module_offs = OMAP3430ES2_USBHOST_MOD,
  1764. .prcm_reg_id = 1,
  1765. .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
  1766. .idlest_reg_id = 1,
  1767. .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
  1768. .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
  1769. },
  1770. },
  1771. .opt_clks = omap3xxx_usb_host_hs_opt_clks,
  1772. .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
  1773. /*
  1774. * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
  1775. * id: i660
  1776. *
  1777. * Description:
  1778. * In the following configuration :
  1779. * - USBHOST module is set to smart-idle mode
  1780. * - PRCM asserts idle_req to the USBHOST module ( This typically
  1781. * happens when the system is going to a low power mode : all ports
  1782. * have been suspended, the master part of the USBHOST module has
  1783. * entered the standby state, and SW has cut the functional clocks)
  1784. * - an USBHOST interrupt occurs before the module is able to answer
  1785. * idle_ack, typically a remote wakeup IRQ.
  1786. * Then the USB HOST module will enter a deadlock situation where it
  1787. * is no more accessible nor functional.
  1788. *
  1789. * Workaround:
  1790. * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
  1791. */
  1792. /*
  1793. * Errata: USB host EHCI may stall when entering smart-standby mode
  1794. * Id: i571
  1795. *
  1796. * Description:
  1797. * When the USBHOST module is set to smart-standby mode, and when it is
  1798. * ready to enter the standby state (i.e. all ports are suspended and
  1799. * all attached devices are in suspend mode), then it can wrongly assert
  1800. * the Mstandby signal too early while there are still some residual OCP
  1801. * transactions ongoing. If this condition occurs, the internal state
  1802. * machine may go to an undefined state and the USB link may be stuck
  1803. * upon the next resume.
  1804. *
  1805. * Workaround:
  1806. * Don't use smart standby; use only force standby,
  1807. * hence HWMOD_SWSUP_MSTANDBY
  1808. */
  1809. /*
  1810. * During system boot; If the hwmod framework resets the module
  1811. * the module will have smart idle settings; which can lead to deadlock
  1812. * (above Errata Id:i660); so, dont reset the module during boot;
  1813. * Use HWMOD_INIT_NO_RESET.
  1814. */
  1815. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
  1816. HWMOD_INIT_NO_RESET,
  1817. };
  1818. /*
  1819. * 'usb_tll_hs' class
  1820. * usb_tll_hs module is the adapter on the usb_host_hs ports
  1821. */
  1822. static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
  1823. .rev_offs = 0x0000,
  1824. .sysc_offs = 0x0010,
  1825. .syss_offs = 0x0014,
  1826. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1827. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1828. SYSC_HAS_AUTOIDLE),
  1829. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1830. .sysc_fields = &omap_hwmod_sysc_type1,
  1831. };
  1832. static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
  1833. .name = "usb_tll_hs",
  1834. .sysc = &omap3xxx_usb_tll_hs_sysc,
  1835. };
  1836. static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
  1837. { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
  1838. { .irq = -1 },
  1839. };
  1840. static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
  1841. .name = "usb_tll_hs",
  1842. .class = &omap3xxx_usb_tll_hs_hwmod_class,
  1843. .clkdm_name = "l3_init_clkdm",
  1844. .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
  1845. .main_clk = "usbtll_fck",
  1846. .prcm = {
  1847. .omap2 = {
  1848. .module_offs = CORE_MOD,
  1849. .prcm_reg_id = 3,
  1850. .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
  1851. .idlest_reg_id = 3,
  1852. .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
  1853. },
  1854. },
  1855. };
  1856. static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
  1857. .name = "hdq1w",
  1858. .mpu_irqs = omap2_hdq1w_mpu_irqs,
  1859. .main_clk = "hdq_fck",
  1860. .prcm = {
  1861. .omap2 = {
  1862. .module_offs = CORE_MOD,
  1863. .prcm_reg_id = 1,
  1864. .module_bit = OMAP3430_EN_HDQ_SHIFT,
  1865. .idlest_reg_id = 1,
  1866. .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
  1867. },
  1868. },
  1869. .class = &omap2_hdq1w_class,
  1870. };
  1871. /* SAD2D */
  1872. static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
  1873. { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
  1874. { .name = "rst_modem_sw", .rst_shift = 1 },
  1875. };
  1876. static struct omap_hwmod_class omap3xxx_sad2d_class = {
  1877. .name = "sad2d",
  1878. };
  1879. static struct omap_hwmod omap3xxx_sad2d_hwmod = {
  1880. .name = "sad2d",
  1881. .rst_lines = omap3xxx_sad2d_resets,
  1882. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
  1883. .main_clk = "sad2d_ick",
  1884. .prcm = {
  1885. .omap2 = {
  1886. .module_offs = CORE_MOD,
  1887. .prcm_reg_id = 1,
  1888. .module_bit = OMAP3430_EN_SAD2D_SHIFT,
  1889. .idlest_reg_id = 1,
  1890. .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
  1891. },
  1892. },
  1893. .class = &omap3xxx_sad2d_class,
  1894. };
  1895. /*
  1896. * '32K sync counter' class
  1897. * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
  1898. */
  1899. static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
  1900. .rev_offs = 0x0000,
  1901. .sysc_offs = 0x0004,
  1902. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1903. .idlemodes = (SIDLE_FORCE | SIDLE_NO),
  1904. .sysc_fields = &omap_hwmod_sysc_type1,
  1905. };
  1906. static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
  1907. .name = "counter",
  1908. .sysc = &omap3xxx_counter_sysc,
  1909. };
  1910. static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
  1911. .name = "counter_32k",
  1912. .class = &omap3xxx_counter_hwmod_class,
  1913. .clkdm_name = "wkup_clkdm",
  1914. .flags = HWMOD_SWSUP_SIDLE,
  1915. .main_clk = "wkup_32k_fck",
  1916. .prcm = {
  1917. .omap2 = {
  1918. .module_offs = WKUP_MOD,
  1919. .prcm_reg_id = 1,
  1920. .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1921. .idlest_reg_id = 1,
  1922. .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
  1923. },
  1924. },
  1925. };
  1926. /*
  1927. * 'gpmc' class
  1928. * general purpose memory controller
  1929. */
  1930. static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
  1931. .rev_offs = 0x0000,
  1932. .sysc_offs = 0x0010,
  1933. .syss_offs = 0x0014,
  1934. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  1935. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1936. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1937. .sysc_fields = &omap_hwmod_sysc_type1,
  1938. };
  1939. static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
  1940. .name = "gpmc",
  1941. .sysc = &omap3xxx_gpmc_sysc,
  1942. };
  1943. static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
  1944. { .irq = 20 },
  1945. { .irq = -1 }
  1946. };
  1947. static struct omap_hwmod omap3xxx_gpmc_hwmod = {
  1948. .name = "gpmc",
  1949. .class = &omap3xxx_gpmc_hwmod_class,
  1950. .clkdm_name = "core_l3_clkdm",
  1951. .mpu_irqs = omap3xxx_gpmc_irqs,
  1952. .main_clk = "gpmc_fck",
  1953. /*
  1954. * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
  1955. * block. It is not being added due to any known bugs with
  1956. * resetting the GPMC IP block, but rather because any timings
  1957. * set by the bootloader are not being correctly programmed by
  1958. * the kernel from the board file or DT data.
  1959. * HWMOD_INIT_NO_RESET should be removed ASAP.
  1960. */
  1961. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
  1962. HWMOD_NO_IDLEST),
  1963. };
  1964. /*
  1965. * interfaces
  1966. */
  1967. /* L3 -> L4_CORE interface */
  1968. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  1969. .master = &omap3xxx_l3_main_hwmod,
  1970. .slave = &omap3xxx_l4_core_hwmod,
  1971. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1972. };
  1973. /* L3 -> L4_PER interface */
  1974. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  1975. .master = &omap3xxx_l3_main_hwmod,
  1976. .slave = &omap3xxx_l4_per_hwmod,
  1977. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1978. };
  1979. static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
  1980. {
  1981. .pa_start = 0x68000000,
  1982. .pa_end = 0x6800ffff,
  1983. .flags = ADDR_TYPE_RT,
  1984. },
  1985. { }
  1986. };
  1987. /* MPU -> L3 interface */
  1988. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  1989. .master = &omap3xxx_mpu_hwmod,
  1990. .slave = &omap3xxx_l3_main_hwmod,
  1991. .addr = omap3xxx_l3_main_addrs,
  1992. .user = OCP_USER_MPU,
  1993. };
  1994. static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
  1995. {
  1996. .pa_start = 0x54000000,
  1997. .pa_end = 0x547fffff,
  1998. .flags = ADDR_TYPE_RT,
  1999. },
  2000. { }
  2001. };
  2002. /* l3 -> debugss */
  2003. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
  2004. .master = &omap3xxx_l3_main_hwmod,
  2005. .slave = &omap3xxx_debugss_hwmod,
  2006. .addr = omap3xxx_l4_emu_addrs,
  2007. .user = OCP_USER_MPU,
  2008. };
  2009. /* DSS -> l3 */
  2010. static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
  2011. .master = &omap3430es1_dss_core_hwmod,
  2012. .slave = &omap3xxx_l3_main_hwmod,
  2013. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2014. };
  2015. static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
  2016. .master = &omap3xxx_dss_core_hwmod,
  2017. .slave = &omap3xxx_l3_main_hwmod,
  2018. .fw = {
  2019. .omap2 = {
  2020. .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
  2021. .flags = OMAP_FIREWALL_L3,
  2022. }
  2023. },
  2024. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2025. };
  2026. /* l3_core -> usbhsotg interface */
  2027. static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
  2028. .master = &omap3xxx_usbhsotg_hwmod,
  2029. .slave = &omap3xxx_l3_main_hwmod,
  2030. .clk = "core_l3_ick",
  2031. .user = OCP_USER_MPU,
  2032. };
  2033. /* l3_core -> am35xx_usbhsotg interface */
  2034. static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
  2035. .master = &am35xx_usbhsotg_hwmod,
  2036. .slave = &omap3xxx_l3_main_hwmod,
  2037. .clk = "hsotgusb_ick",
  2038. .user = OCP_USER_MPU,
  2039. };
  2040. /* l3_core -> sad2d interface */
  2041. static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
  2042. .master = &omap3xxx_sad2d_hwmod,
  2043. .slave = &omap3xxx_l3_main_hwmod,
  2044. .clk = "core_l3_ick",
  2045. .user = OCP_USER_MPU,
  2046. };
  2047. /* L4_CORE -> L4_WKUP interface */
  2048. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  2049. .master = &omap3xxx_l4_core_hwmod,
  2050. .slave = &omap3xxx_l4_wkup_hwmod,
  2051. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2052. };
  2053. /* L4 CORE -> MMC1 interface */
  2054. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
  2055. .master = &omap3xxx_l4_core_hwmod,
  2056. .slave = &omap3xxx_pre_es3_mmc1_hwmod,
  2057. .clk = "mmchs1_ick",
  2058. .addr = omap2430_mmc1_addr_space,
  2059. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2060. .flags = OMAP_FIREWALL_L4
  2061. };
  2062. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
  2063. .master = &omap3xxx_l4_core_hwmod,
  2064. .slave = &omap3xxx_es3plus_mmc1_hwmod,
  2065. .clk = "mmchs1_ick",
  2066. .addr = omap2430_mmc1_addr_space,
  2067. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2068. .flags = OMAP_FIREWALL_L4
  2069. };
  2070. /* L4 CORE -> MMC2 interface */
  2071. static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
  2072. .master = &omap3xxx_l4_core_hwmod,
  2073. .slave = &omap3xxx_pre_es3_mmc2_hwmod,
  2074. .clk = "mmchs2_ick",
  2075. .addr = omap2430_mmc2_addr_space,
  2076. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2077. .flags = OMAP_FIREWALL_L4
  2078. };
  2079. static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
  2080. .master = &omap3xxx_l4_core_hwmod,
  2081. .slave = &omap3xxx_es3plus_mmc2_hwmod,
  2082. .clk = "mmchs2_ick",
  2083. .addr = omap2430_mmc2_addr_space,
  2084. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2085. .flags = OMAP_FIREWALL_L4
  2086. };
  2087. /* L4 CORE -> MMC3 interface */
  2088. static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
  2089. {
  2090. .pa_start = 0x480ad000,
  2091. .pa_end = 0x480ad1ff,
  2092. .flags = ADDR_TYPE_RT,
  2093. },
  2094. { }
  2095. };
  2096. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
  2097. .master = &omap3xxx_l4_core_hwmod,
  2098. .slave = &omap3xxx_mmc3_hwmod,
  2099. .clk = "mmchs3_ick",
  2100. .addr = omap3xxx_mmc3_addr_space,
  2101. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2102. .flags = OMAP_FIREWALL_L4
  2103. };
  2104. /* L4 CORE -> UART1 interface */
  2105. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  2106. {
  2107. .pa_start = OMAP3_UART1_BASE,
  2108. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  2109. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2110. },
  2111. { }
  2112. };
  2113. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  2114. .master = &omap3xxx_l4_core_hwmod,
  2115. .slave = &omap3xxx_uart1_hwmod,
  2116. .clk = "uart1_ick",
  2117. .addr = omap3xxx_uart1_addr_space,
  2118. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2119. };
  2120. /* L4 CORE -> UART2 interface */
  2121. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  2122. {
  2123. .pa_start = OMAP3_UART2_BASE,
  2124. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  2125. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2126. },
  2127. { }
  2128. };
  2129. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  2130. .master = &omap3xxx_l4_core_hwmod,
  2131. .slave = &omap3xxx_uart2_hwmod,
  2132. .clk = "uart2_ick",
  2133. .addr = omap3xxx_uart2_addr_space,
  2134. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2135. };
  2136. /* L4 PER -> UART3 interface */
  2137. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  2138. {
  2139. .pa_start = OMAP3_UART3_BASE,
  2140. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  2141. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2142. },
  2143. { }
  2144. };
  2145. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  2146. .master = &omap3xxx_l4_per_hwmod,
  2147. .slave = &omap3xxx_uart3_hwmod,
  2148. .clk = "uart3_ick",
  2149. .addr = omap3xxx_uart3_addr_space,
  2150. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2151. };
  2152. /* L4 PER -> UART4 interface */
  2153. static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
  2154. {
  2155. .pa_start = OMAP3_UART4_BASE,
  2156. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  2157. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2158. },
  2159. { }
  2160. };
  2161. static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
  2162. .master = &omap3xxx_l4_per_hwmod,
  2163. .slave = &omap36xx_uart4_hwmod,
  2164. .clk = "uart4_ick",
  2165. .addr = omap36xx_uart4_addr_space,
  2166. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2167. };
  2168. /* AM35xx: L4 CORE -> UART4 interface */
  2169. static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
  2170. {
  2171. .pa_start = OMAP3_UART4_AM35XX_BASE,
  2172. .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
  2173. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  2174. },
  2175. { }
  2176. };
  2177. static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
  2178. .master = &omap3xxx_l4_core_hwmod,
  2179. .slave = &am35xx_uart4_hwmod,
  2180. .clk = "uart4_ick",
  2181. .addr = am35xx_uart4_addr_space,
  2182. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2183. };
  2184. /* L4 CORE -> I2C1 interface */
  2185. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  2186. .master = &omap3xxx_l4_core_hwmod,
  2187. .slave = &omap3xxx_i2c1_hwmod,
  2188. .clk = "i2c1_ick",
  2189. .addr = omap2_i2c1_addr_space,
  2190. .fw = {
  2191. .omap2 = {
  2192. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  2193. .l4_prot_group = 7,
  2194. .flags = OMAP_FIREWALL_L4,
  2195. }
  2196. },
  2197. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2198. };
  2199. /* L4 CORE -> I2C2 interface */
  2200. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  2201. .master = &omap3xxx_l4_core_hwmod,
  2202. .slave = &omap3xxx_i2c2_hwmod,
  2203. .clk = "i2c2_ick",
  2204. .addr = omap2_i2c2_addr_space,
  2205. .fw = {
  2206. .omap2 = {
  2207. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  2208. .l4_prot_group = 7,
  2209. .flags = OMAP_FIREWALL_L4,
  2210. }
  2211. },
  2212. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2213. };
  2214. /* L4 CORE -> I2C3 interface */
  2215. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  2216. {
  2217. .pa_start = 0x48060000,
  2218. .pa_end = 0x48060000 + SZ_128 - 1,
  2219. .flags = ADDR_TYPE_RT,
  2220. },
  2221. { }
  2222. };
  2223. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  2224. .master = &omap3xxx_l4_core_hwmod,
  2225. .slave = &omap3xxx_i2c3_hwmod,
  2226. .clk = "i2c3_ick",
  2227. .addr = omap3xxx_i2c3_addr_space,
  2228. .fw = {
  2229. .omap2 = {
  2230. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  2231. .l4_prot_group = 7,
  2232. .flags = OMAP_FIREWALL_L4,
  2233. }
  2234. },
  2235. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2236. };
  2237. /* L4 CORE -> SR1 interface */
  2238. static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
  2239. {
  2240. .pa_start = OMAP34XX_SR1_BASE,
  2241. .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
  2242. .flags = ADDR_TYPE_RT,
  2243. },
  2244. { }
  2245. };
  2246. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
  2247. .master = &omap3xxx_l4_core_hwmod,
  2248. .slave = &omap34xx_sr1_hwmod,
  2249. .clk = "sr_l4_ick",
  2250. .addr = omap3_sr1_addr_space,
  2251. .user = OCP_USER_MPU,
  2252. };
  2253. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
  2254. .master = &omap3xxx_l4_core_hwmod,
  2255. .slave = &omap36xx_sr1_hwmod,
  2256. .clk = "sr_l4_ick",
  2257. .addr = omap3_sr1_addr_space,
  2258. .user = OCP_USER_MPU,
  2259. };
  2260. /* L4 CORE -> SR1 interface */
  2261. static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
  2262. {
  2263. .pa_start = OMAP34XX_SR2_BASE,
  2264. .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
  2265. .flags = ADDR_TYPE_RT,
  2266. },
  2267. { }
  2268. };
  2269. static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
  2270. .master = &omap3xxx_l4_core_hwmod,
  2271. .slave = &omap34xx_sr2_hwmod,
  2272. .clk = "sr_l4_ick",
  2273. .addr = omap3_sr2_addr_space,
  2274. .user = OCP_USER_MPU,
  2275. };
  2276. static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
  2277. .master = &omap3xxx_l4_core_hwmod,
  2278. .slave = &omap36xx_sr2_hwmod,
  2279. .clk = "sr_l4_ick",
  2280. .addr = omap3_sr2_addr_space,
  2281. .user = OCP_USER_MPU,
  2282. };
  2283. static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
  2284. {
  2285. .pa_start = OMAP34XX_HSUSB_OTG_BASE,
  2286. .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
  2287. .flags = ADDR_TYPE_RT
  2288. },
  2289. { }
  2290. };
  2291. /* l4_core -> usbhsotg */
  2292. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
  2293. .master = &omap3xxx_l4_core_hwmod,
  2294. .slave = &omap3xxx_usbhsotg_hwmod,
  2295. .clk = "l4_ick",
  2296. .addr = omap3xxx_usbhsotg_addrs,
  2297. .user = OCP_USER_MPU,
  2298. };
  2299. static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
  2300. {
  2301. .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
  2302. .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
  2303. .flags = ADDR_TYPE_RT
  2304. },
  2305. { }
  2306. };
  2307. /* l4_core -> usbhsotg */
  2308. static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
  2309. .master = &omap3xxx_l4_core_hwmod,
  2310. .slave = &am35xx_usbhsotg_hwmod,
  2311. .clk = "hsotgusb_ick",
  2312. .addr = am35xx_usbhsotg_addrs,
  2313. .user = OCP_USER_MPU,
  2314. };
  2315. /* L4_WKUP -> L4_SEC interface */
  2316. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
  2317. .master = &omap3xxx_l4_wkup_hwmod,
  2318. .slave = &omap3xxx_l4_sec_hwmod,
  2319. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2320. };
  2321. /* IVA2 <- L3 interface */
  2322. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  2323. .master = &omap3xxx_l3_main_hwmod,
  2324. .slave = &omap3xxx_iva_hwmod,
  2325. .clk = "core_l3_ick",
  2326. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2327. };
  2328. static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
  2329. {
  2330. .pa_start = 0x48318000,
  2331. .pa_end = 0x48318000 + SZ_1K - 1,
  2332. .flags = ADDR_TYPE_RT
  2333. },
  2334. { }
  2335. };
  2336. /* l4_wkup -> timer1 */
  2337. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
  2338. .master = &omap3xxx_l4_wkup_hwmod,
  2339. .slave = &omap3xxx_timer1_hwmod,
  2340. .clk = "gpt1_ick",
  2341. .addr = omap3xxx_timer1_addrs,
  2342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2343. };
  2344. static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
  2345. {
  2346. .pa_start = 0x49032000,
  2347. .pa_end = 0x49032000 + SZ_1K - 1,
  2348. .flags = ADDR_TYPE_RT
  2349. },
  2350. { }
  2351. };
  2352. /* l4_per -> timer2 */
  2353. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
  2354. .master = &omap3xxx_l4_per_hwmod,
  2355. .slave = &omap3xxx_timer2_hwmod,
  2356. .clk = "gpt2_ick",
  2357. .addr = omap3xxx_timer2_addrs,
  2358. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2359. };
  2360. static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
  2361. {
  2362. .pa_start = 0x49034000,
  2363. .pa_end = 0x49034000 + SZ_1K - 1,
  2364. .flags = ADDR_TYPE_RT
  2365. },
  2366. { }
  2367. };
  2368. /* l4_per -> timer3 */
  2369. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
  2370. .master = &omap3xxx_l4_per_hwmod,
  2371. .slave = &omap3xxx_timer3_hwmod,
  2372. .clk = "gpt3_ick",
  2373. .addr = omap3xxx_timer3_addrs,
  2374. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2375. };
  2376. static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
  2377. {
  2378. .pa_start = 0x49036000,
  2379. .pa_end = 0x49036000 + SZ_1K - 1,
  2380. .flags = ADDR_TYPE_RT
  2381. },
  2382. { }
  2383. };
  2384. /* l4_per -> timer4 */
  2385. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
  2386. .master = &omap3xxx_l4_per_hwmod,
  2387. .slave = &omap3xxx_timer4_hwmod,
  2388. .clk = "gpt4_ick",
  2389. .addr = omap3xxx_timer4_addrs,
  2390. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2391. };
  2392. static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
  2393. {
  2394. .pa_start = 0x49038000,
  2395. .pa_end = 0x49038000 + SZ_1K - 1,
  2396. .flags = ADDR_TYPE_RT
  2397. },
  2398. { }
  2399. };
  2400. /* l4_per -> timer5 */
  2401. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
  2402. .master = &omap3xxx_l4_per_hwmod,
  2403. .slave = &omap3xxx_timer5_hwmod,
  2404. .clk = "gpt5_ick",
  2405. .addr = omap3xxx_timer5_addrs,
  2406. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2407. };
  2408. static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
  2409. {
  2410. .pa_start = 0x4903A000,
  2411. .pa_end = 0x4903A000 + SZ_1K - 1,
  2412. .flags = ADDR_TYPE_RT
  2413. },
  2414. { }
  2415. };
  2416. /* l4_per -> timer6 */
  2417. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
  2418. .master = &omap3xxx_l4_per_hwmod,
  2419. .slave = &omap3xxx_timer6_hwmod,
  2420. .clk = "gpt6_ick",
  2421. .addr = omap3xxx_timer6_addrs,
  2422. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2423. };
  2424. static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
  2425. {
  2426. .pa_start = 0x4903C000,
  2427. .pa_end = 0x4903C000 + SZ_1K - 1,
  2428. .flags = ADDR_TYPE_RT
  2429. },
  2430. { }
  2431. };
  2432. /* l4_per -> timer7 */
  2433. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
  2434. .master = &omap3xxx_l4_per_hwmod,
  2435. .slave = &omap3xxx_timer7_hwmod,
  2436. .clk = "gpt7_ick",
  2437. .addr = omap3xxx_timer7_addrs,
  2438. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2439. };
  2440. static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
  2441. {
  2442. .pa_start = 0x4903E000,
  2443. .pa_end = 0x4903E000 + SZ_1K - 1,
  2444. .flags = ADDR_TYPE_RT
  2445. },
  2446. { }
  2447. };
  2448. /* l4_per -> timer8 */
  2449. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
  2450. .master = &omap3xxx_l4_per_hwmod,
  2451. .slave = &omap3xxx_timer8_hwmod,
  2452. .clk = "gpt8_ick",
  2453. .addr = omap3xxx_timer8_addrs,
  2454. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2455. };
  2456. static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
  2457. {
  2458. .pa_start = 0x49040000,
  2459. .pa_end = 0x49040000 + SZ_1K - 1,
  2460. .flags = ADDR_TYPE_RT
  2461. },
  2462. { }
  2463. };
  2464. /* l4_per -> timer9 */
  2465. static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
  2466. .master = &omap3xxx_l4_per_hwmod,
  2467. .slave = &omap3xxx_timer9_hwmod,
  2468. .clk = "gpt9_ick",
  2469. .addr = omap3xxx_timer9_addrs,
  2470. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2471. };
  2472. /* l4_core -> timer10 */
  2473. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
  2474. .master = &omap3xxx_l4_core_hwmod,
  2475. .slave = &omap3xxx_timer10_hwmod,
  2476. .clk = "gpt10_ick",
  2477. .addr = omap2_timer10_addrs,
  2478. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2479. };
  2480. /* l4_core -> timer11 */
  2481. static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
  2482. .master = &omap3xxx_l4_core_hwmod,
  2483. .slave = &omap3xxx_timer11_hwmod,
  2484. .clk = "gpt11_ick",
  2485. .addr = omap2_timer11_addrs,
  2486. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2487. };
  2488. static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
  2489. {
  2490. .pa_start = 0x48304000,
  2491. .pa_end = 0x48304000 + SZ_1K - 1,
  2492. .flags = ADDR_TYPE_RT
  2493. },
  2494. { }
  2495. };
  2496. /* l4_core -> timer12 */
  2497. static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
  2498. .master = &omap3xxx_l4_sec_hwmod,
  2499. .slave = &omap3xxx_timer12_hwmod,
  2500. .clk = "gpt12_ick",
  2501. .addr = omap3xxx_timer12_addrs,
  2502. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2503. };
  2504. /* l4_wkup -> wd_timer2 */
  2505. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  2506. {
  2507. .pa_start = 0x48314000,
  2508. .pa_end = 0x4831407f,
  2509. .flags = ADDR_TYPE_RT
  2510. },
  2511. { }
  2512. };
  2513. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  2514. .master = &omap3xxx_l4_wkup_hwmod,
  2515. .slave = &omap3xxx_wd_timer2_hwmod,
  2516. .clk = "wdt2_ick",
  2517. .addr = omap3xxx_wd_timer2_addrs,
  2518. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2519. };
  2520. /* l4_core -> dss */
  2521. static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
  2522. .master = &omap3xxx_l4_core_hwmod,
  2523. .slave = &omap3430es1_dss_core_hwmod,
  2524. .clk = "dss_ick",
  2525. .addr = omap2_dss_addrs,
  2526. .fw = {
  2527. .omap2 = {
  2528. .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
  2529. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2530. .flags = OMAP_FIREWALL_L4,
  2531. }
  2532. },
  2533. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2534. };
  2535. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
  2536. .master = &omap3xxx_l4_core_hwmod,
  2537. .slave = &omap3xxx_dss_core_hwmod,
  2538. .clk = "dss_ick",
  2539. .addr = omap2_dss_addrs,
  2540. .fw = {
  2541. .omap2 = {
  2542. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
  2543. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2544. .flags = OMAP_FIREWALL_L4,
  2545. }
  2546. },
  2547. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2548. };
  2549. /* l4_core -> dss_dispc */
  2550. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
  2551. .master = &omap3xxx_l4_core_hwmod,
  2552. .slave = &omap3xxx_dss_dispc_hwmod,
  2553. .clk = "dss_ick",
  2554. .addr = omap2_dss_dispc_addrs,
  2555. .fw = {
  2556. .omap2 = {
  2557. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
  2558. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2559. .flags = OMAP_FIREWALL_L4,
  2560. }
  2561. },
  2562. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2563. };
  2564. static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
  2565. {
  2566. .pa_start = 0x4804FC00,
  2567. .pa_end = 0x4804FFFF,
  2568. .flags = ADDR_TYPE_RT
  2569. },
  2570. { }
  2571. };
  2572. /* l4_core -> dss_dsi1 */
  2573. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
  2574. .master = &omap3xxx_l4_core_hwmod,
  2575. .slave = &omap3xxx_dss_dsi1_hwmod,
  2576. .clk = "dss_ick",
  2577. .addr = omap3xxx_dss_dsi1_addrs,
  2578. .fw = {
  2579. .omap2 = {
  2580. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
  2581. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2582. .flags = OMAP_FIREWALL_L4,
  2583. }
  2584. },
  2585. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2586. };
  2587. /* l4_core -> dss_rfbi */
  2588. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
  2589. .master = &omap3xxx_l4_core_hwmod,
  2590. .slave = &omap3xxx_dss_rfbi_hwmod,
  2591. .clk = "dss_ick",
  2592. .addr = omap2_dss_rfbi_addrs,
  2593. .fw = {
  2594. .omap2 = {
  2595. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
  2596. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
  2597. .flags = OMAP_FIREWALL_L4,
  2598. }
  2599. },
  2600. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2601. };
  2602. /* l4_core -> dss_venc */
  2603. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
  2604. .master = &omap3xxx_l4_core_hwmod,
  2605. .slave = &omap3xxx_dss_venc_hwmod,
  2606. .clk = "dss_ick",
  2607. .addr = omap2_dss_venc_addrs,
  2608. .fw = {
  2609. .omap2 = {
  2610. .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
  2611. .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
  2612. .flags = OMAP_FIREWALL_L4,
  2613. }
  2614. },
  2615. .flags = OCPIF_SWSUP_IDLE,
  2616. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2617. };
  2618. /* l4_wkup -> gpio1 */
  2619. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  2620. {
  2621. .pa_start = 0x48310000,
  2622. .pa_end = 0x483101ff,
  2623. .flags = ADDR_TYPE_RT
  2624. },
  2625. { }
  2626. };
  2627. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  2628. .master = &omap3xxx_l4_wkup_hwmod,
  2629. .slave = &omap3xxx_gpio1_hwmod,
  2630. .addr = omap3xxx_gpio1_addrs,
  2631. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2632. };
  2633. /* l4_per -> gpio2 */
  2634. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  2635. {
  2636. .pa_start = 0x49050000,
  2637. .pa_end = 0x490501ff,
  2638. .flags = ADDR_TYPE_RT
  2639. },
  2640. { }
  2641. };
  2642. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  2643. .master = &omap3xxx_l4_per_hwmod,
  2644. .slave = &omap3xxx_gpio2_hwmod,
  2645. .addr = omap3xxx_gpio2_addrs,
  2646. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2647. };
  2648. /* l4_per -> gpio3 */
  2649. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  2650. {
  2651. .pa_start = 0x49052000,
  2652. .pa_end = 0x490521ff,
  2653. .flags = ADDR_TYPE_RT
  2654. },
  2655. { }
  2656. };
  2657. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  2658. .master = &omap3xxx_l4_per_hwmod,
  2659. .slave = &omap3xxx_gpio3_hwmod,
  2660. .addr = omap3xxx_gpio3_addrs,
  2661. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2662. };
  2663. /*
  2664. * 'mmu' class
  2665. * The memory management unit performs virtual to physical address translation
  2666. * for its requestors.
  2667. */
  2668. static struct omap_hwmod_class_sysconfig mmu_sysc = {
  2669. .rev_offs = 0x000,
  2670. .sysc_offs = 0x010,
  2671. .syss_offs = 0x014,
  2672. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2673. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  2674. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2675. .sysc_fields = &omap_hwmod_sysc_type1,
  2676. };
  2677. static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
  2678. .name = "mmu",
  2679. .sysc = &mmu_sysc,
  2680. };
  2681. /* mmu isp */
  2682. static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
  2683. .da_start = 0x0,
  2684. .da_end = 0xfffff000,
  2685. .nr_tlb_entries = 8,
  2686. };
  2687. static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
  2688. static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
  2689. { .irq = 24 },
  2690. { .irq = -1 }
  2691. };
  2692. static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
  2693. {
  2694. .pa_start = 0x480bd400,
  2695. .pa_end = 0x480bd47f,
  2696. .flags = ADDR_TYPE_RT,
  2697. },
  2698. { }
  2699. };
  2700. /* l4_core -> mmu isp */
  2701. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
  2702. .master = &omap3xxx_l4_core_hwmod,
  2703. .slave = &omap3xxx_mmu_isp_hwmod,
  2704. .addr = omap3xxx_mmu_isp_addrs,
  2705. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2706. };
  2707. static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
  2708. .name = "mmu_isp",
  2709. .class = &omap3xxx_mmu_hwmod_class,
  2710. .mpu_irqs = omap3xxx_mmu_isp_irqs,
  2711. .main_clk = "cam_ick",
  2712. .dev_attr = &mmu_isp_dev_attr,
  2713. .flags = HWMOD_NO_IDLEST,
  2714. };
  2715. #ifdef CONFIG_OMAP_IOMMU_IVA2
  2716. /* mmu iva */
  2717. static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
  2718. .da_start = 0x11000000,
  2719. .da_end = 0xfffff000,
  2720. .nr_tlb_entries = 32,
  2721. };
  2722. static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
  2723. static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
  2724. { .irq = 28 },
  2725. { .irq = -1 }
  2726. };
  2727. static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
  2728. { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
  2729. };
  2730. static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
  2731. {
  2732. .pa_start = 0x5d000000,
  2733. .pa_end = 0x5d00007f,
  2734. .flags = ADDR_TYPE_RT,
  2735. },
  2736. { }
  2737. };
  2738. /* l3_main -> iva mmu */
  2739. static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
  2740. .master = &omap3xxx_l3_main_hwmod,
  2741. .slave = &omap3xxx_mmu_iva_hwmod,
  2742. .addr = omap3xxx_mmu_iva_addrs,
  2743. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2744. };
  2745. static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
  2746. .name = "mmu_iva",
  2747. .class = &omap3xxx_mmu_hwmod_class,
  2748. .mpu_irqs = omap3xxx_mmu_iva_irqs,
  2749. .rst_lines = omap3xxx_mmu_iva_resets,
  2750. .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
  2751. .main_clk = "iva2_ck",
  2752. .prcm = {
  2753. .omap2 = {
  2754. .module_offs = OMAP3430_IVA2_MOD,
  2755. },
  2756. },
  2757. .dev_attr = &mmu_iva_dev_attr,
  2758. .flags = HWMOD_NO_IDLEST,
  2759. };
  2760. #endif
  2761. /* l4_per -> gpio4 */
  2762. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  2763. {
  2764. .pa_start = 0x49054000,
  2765. .pa_end = 0x490541ff,
  2766. .flags = ADDR_TYPE_RT
  2767. },
  2768. { }
  2769. };
  2770. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  2771. .master = &omap3xxx_l4_per_hwmod,
  2772. .slave = &omap3xxx_gpio4_hwmod,
  2773. .addr = omap3xxx_gpio4_addrs,
  2774. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2775. };
  2776. /* l4_per -> gpio5 */
  2777. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  2778. {
  2779. .pa_start = 0x49056000,
  2780. .pa_end = 0x490561ff,
  2781. .flags = ADDR_TYPE_RT
  2782. },
  2783. { }
  2784. };
  2785. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  2786. .master = &omap3xxx_l4_per_hwmod,
  2787. .slave = &omap3xxx_gpio5_hwmod,
  2788. .addr = omap3xxx_gpio5_addrs,
  2789. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2790. };
  2791. /* l4_per -> gpio6 */
  2792. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  2793. {
  2794. .pa_start = 0x49058000,
  2795. .pa_end = 0x490581ff,
  2796. .flags = ADDR_TYPE_RT
  2797. },
  2798. { }
  2799. };
  2800. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  2801. .master = &omap3xxx_l4_per_hwmod,
  2802. .slave = &omap3xxx_gpio6_hwmod,
  2803. .addr = omap3xxx_gpio6_addrs,
  2804. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2805. };
  2806. /* dma_system -> L3 */
  2807. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  2808. .master = &omap3xxx_dma_system_hwmod,
  2809. .slave = &omap3xxx_l3_main_hwmod,
  2810. .clk = "core_l3_ick",
  2811. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2812. };
  2813. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  2814. {
  2815. .pa_start = 0x48056000,
  2816. .pa_end = 0x48056fff,
  2817. .flags = ADDR_TYPE_RT
  2818. },
  2819. { }
  2820. };
  2821. /* l4_cfg -> dma_system */
  2822. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  2823. .master = &omap3xxx_l4_core_hwmod,
  2824. .slave = &omap3xxx_dma_system_hwmod,
  2825. .clk = "core_l4_ick",
  2826. .addr = omap3xxx_dma_system_addrs,
  2827. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2828. };
  2829. static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
  2830. {
  2831. .name = "mpu",
  2832. .pa_start = 0x48074000,
  2833. .pa_end = 0x480740ff,
  2834. .flags = ADDR_TYPE_RT
  2835. },
  2836. { }
  2837. };
  2838. /* l4_core -> mcbsp1 */
  2839. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
  2840. .master = &omap3xxx_l4_core_hwmod,
  2841. .slave = &omap3xxx_mcbsp1_hwmod,
  2842. .clk = "mcbsp1_ick",
  2843. .addr = omap3xxx_mcbsp1_addrs,
  2844. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2845. };
  2846. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
  2847. {
  2848. .name = "mpu",
  2849. .pa_start = 0x49022000,
  2850. .pa_end = 0x490220ff,
  2851. .flags = ADDR_TYPE_RT
  2852. },
  2853. { }
  2854. };
  2855. /* l4_per -> mcbsp2 */
  2856. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
  2857. .master = &omap3xxx_l4_per_hwmod,
  2858. .slave = &omap3xxx_mcbsp2_hwmod,
  2859. .clk = "mcbsp2_ick",
  2860. .addr = omap3xxx_mcbsp2_addrs,
  2861. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2862. };
  2863. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
  2864. {
  2865. .name = "mpu",
  2866. .pa_start = 0x49024000,
  2867. .pa_end = 0x490240ff,
  2868. .flags = ADDR_TYPE_RT
  2869. },
  2870. { }
  2871. };
  2872. /* l4_per -> mcbsp3 */
  2873. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
  2874. .master = &omap3xxx_l4_per_hwmod,
  2875. .slave = &omap3xxx_mcbsp3_hwmod,
  2876. .clk = "mcbsp3_ick",
  2877. .addr = omap3xxx_mcbsp3_addrs,
  2878. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2879. };
  2880. static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
  2881. {
  2882. .name = "mpu",
  2883. .pa_start = 0x49026000,
  2884. .pa_end = 0x490260ff,
  2885. .flags = ADDR_TYPE_RT
  2886. },
  2887. { }
  2888. };
  2889. /* l4_per -> mcbsp4 */
  2890. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
  2891. .master = &omap3xxx_l4_per_hwmod,
  2892. .slave = &omap3xxx_mcbsp4_hwmod,
  2893. .clk = "mcbsp4_ick",
  2894. .addr = omap3xxx_mcbsp4_addrs,
  2895. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2896. };
  2897. static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
  2898. {
  2899. .name = "mpu",
  2900. .pa_start = 0x48096000,
  2901. .pa_end = 0x480960ff,
  2902. .flags = ADDR_TYPE_RT
  2903. },
  2904. { }
  2905. };
  2906. /* l4_core -> mcbsp5 */
  2907. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
  2908. .master = &omap3xxx_l4_core_hwmod,
  2909. .slave = &omap3xxx_mcbsp5_hwmod,
  2910. .clk = "mcbsp5_ick",
  2911. .addr = omap3xxx_mcbsp5_addrs,
  2912. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2913. };
  2914. static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
  2915. {
  2916. .name = "sidetone",
  2917. .pa_start = 0x49028000,
  2918. .pa_end = 0x490280ff,
  2919. .flags = ADDR_TYPE_RT
  2920. },
  2921. { }
  2922. };
  2923. /* l4_per -> mcbsp2_sidetone */
  2924. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
  2925. .master = &omap3xxx_l4_per_hwmod,
  2926. .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
  2927. .clk = "mcbsp2_ick",
  2928. .addr = omap3xxx_mcbsp2_sidetone_addrs,
  2929. .user = OCP_USER_MPU,
  2930. };
  2931. static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
  2932. {
  2933. .name = "sidetone",
  2934. .pa_start = 0x4902A000,
  2935. .pa_end = 0x4902A0ff,
  2936. .flags = ADDR_TYPE_RT
  2937. },
  2938. { }
  2939. };
  2940. /* l4_per -> mcbsp3_sidetone */
  2941. static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
  2942. .master = &omap3xxx_l4_per_hwmod,
  2943. .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
  2944. .clk = "mcbsp3_ick",
  2945. .addr = omap3xxx_mcbsp3_sidetone_addrs,
  2946. .user = OCP_USER_MPU,
  2947. };
  2948. static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
  2949. {
  2950. .pa_start = 0x48094000,
  2951. .pa_end = 0x480941ff,
  2952. .flags = ADDR_TYPE_RT,
  2953. },
  2954. { }
  2955. };
  2956. /* l4_core -> mailbox */
  2957. static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
  2958. .master = &omap3xxx_l4_core_hwmod,
  2959. .slave = &omap3xxx_mailbox_hwmod,
  2960. .addr = omap3xxx_mailbox_addrs,
  2961. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2962. };
  2963. /* l4 core -> mcspi1 interface */
  2964. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
  2965. .master = &omap3xxx_l4_core_hwmod,
  2966. .slave = &omap34xx_mcspi1,
  2967. .clk = "mcspi1_ick",
  2968. .addr = omap2_mcspi1_addr_space,
  2969. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2970. };
  2971. /* l4 core -> mcspi2 interface */
  2972. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
  2973. .master = &omap3xxx_l4_core_hwmod,
  2974. .slave = &omap34xx_mcspi2,
  2975. .clk = "mcspi2_ick",
  2976. .addr = omap2_mcspi2_addr_space,
  2977. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2978. };
  2979. /* l4 core -> mcspi3 interface */
  2980. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
  2981. .master = &omap3xxx_l4_core_hwmod,
  2982. .slave = &omap34xx_mcspi3,
  2983. .clk = "mcspi3_ick",
  2984. .addr = omap2430_mcspi3_addr_space,
  2985. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2986. };
  2987. /* l4 core -> mcspi4 interface */
  2988. static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
  2989. {
  2990. .pa_start = 0x480ba000,
  2991. .pa_end = 0x480ba0ff,
  2992. .flags = ADDR_TYPE_RT,
  2993. },
  2994. { }
  2995. };
  2996. static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
  2997. .master = &omap3xxx_l4_core_hwmod,
  2998. .slave = &omap34xx_mcspi4,
  2999. .clk = "mcspi4_ick",
  3000. .addr = omap34xx_mcspi4_addr_space,
  3001. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3002. };
  3003. static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
  3004. .master = &omap3xxx_usb_host_hs_hwmod,
  3005. .slave = &omap3xxx_l3_main_hwmod,
  3006. .clk = "core_l3_ick",
  3007. .user = OCP_USER_MPU,
  3008. };
  3009. static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
  3010. {
  3011. .name = "uhh",
  3012. .pa_start = 0x48064000,
  3013. .pa_end = 0x480643ff,
  3014. .flags = ADDR_TYPE_RT
  3015. },
  3016. {
  3017. .name = "ohci",
  3018. .pa_start = 0x48064400,
  3019. .pa_end = 0x480647ff,
  3020. },
  3021. {
  3022. .name = "ehci",
  3023. .pa_start = 0x48064800,
  3024. .pa_end = 0x48064cff,
  3025. },
  3026. {}
  3027. };
  3028. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
  3029. .master = &omap3xxx_l4_core_hwmod,
  3030. .slave = &omap3xxx_usb_host_hs_hwmod,
  3031. .clk = "usbhost_ick",
  3032. .addr = omap3xxx_usb_host_hs_addrs,
  3033. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3034. };
  3035. static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
  3036. {
  3037. .name = "tll",
  3038. .pa_start = 0x48062000,
  3039. .pa_end = 0x48062fff,
  3040. .flags = ADDR_TYPE_RT
  3041. },
  3042. {}
  3043. };
  3044. static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
  3045. .master = &omap3xxx_l4_core_hwmod,
  3046. .slave = &omap3xxx_usb_tll_hs_hwmod,
  3047. .clk = "usbtll_ick",
  3048. .addr = omap3xxx_usb_tll_hs_addrs,
  3049. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3050. };
  3051. /* l4_core -> hdq1w interface */
  3052. static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
  3053. .master = &omap3xxx_l4_core_hwmod,
  3054. .slave = &omap3xxx_hdq1w_hwmod,
  3055. .clk = "hdq_ick",
  3056. .addr = omap2_hdq1w_addr_space,
  3057. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3058. .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
  3059. };
  3060. /* l4_wkup -> 32ksync_counter */
  3061. static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
  3062. {
  3063. .pa_start = 0x48320000,
  3064. .pa_end = 0x4832001f,
  3065. .flags = ADDR_TYPE_RT
  3066. },
  3067. { }
  3068. };
  3069. static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
  3070. {
  3071. .pa_start = 0x6e000000,
  3072. .pa_end = 0x6e000fff,
  3073. .flags = ADDR_TYPE_RT
  3074. },
  3075. { }
  3076. };
  3077. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
  3078. .master = &omap3xxx_l4_wkup_hwmod,
  3079. .slave = &omap3xxx_counter_32k_hwmod,
  3080. .clk = "omap_32ksync_ick",
  3081. .addr = omap3xxx_counter_32k_addrs,
  3082. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3083. };
  3084. /* am35xx has Davinci MDIO & EMAC */
  3085. static struct omap_hwmod_class am35xx_mdio_class = {
  3086. .name = "davinci_mdio",
  3087. };
  3088. static struct omap_hwmod am35xx_mdio_hwmod = {
  3089. .name = "davinci_mdio",
  3090. .class = &am35xx_mdio_class,
  3091. .flags = HWMOD_NO_IDLEST,
  3092. };
  3093. /*
  3094. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  3095. * but this will probably require some additional hwmod core support,
  3096. * so is left as a future to-do item.
  3097. */
  3098. static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
  3099. .master = &am35xx_mdio_hwmod,
  3100. .slave = &omap3xxx_l3_main_hwmod,
  3101. .clk = "emac_fck",
  3102. .user = OCP_USER_MPU,
  3103. };
  3104. static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
  3105. {
  3106. .pa_start = AM35XX_IPSS_MDIO_BASE,
  3107. .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
  3108. .flags = ADDR_TYPE_RT,
  3109. },
  3110. { }
  3111. };
  3112. /* l4_core -> davinci mdio */
  3113. /*
  3114. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  3115. * but this will probably require some additional hwmod core support,
  3116. * so is left as a future to-do item.
  3117. */
  3118. static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
  3119. .master = &omap3xxx_l4_core_hwmod,
  3120. .slave = &am35xx_mdio_hwmod,
  3121. .clk = "emac_fck",
  3122. .addr = am35xx_mdio_addrs,
  3123. .user = OCP_USER_MPU,
  3124. };
  3125. static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
  3126. { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
  3127. { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
  3128. { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
  3129. { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
  3130. { .irq = -1 },
  3131. };
  3132. static struct omap_hwmod_class am35xx_emac_class = {
  3133. .name = "davinci_emac",
  3134. };
  3135. static struct omap_hwmod am35xx_emac_hwmod = {
  3136. .name = "davinci_emac",
  3137. .mpu_irqs = am35xx_emac_mpu_irqs,
  3138. .class = &am35xx_emac_class,
  3139. /*
  3140. * According to Mark Greer, the MPU will not return from WFI
  3141. * when the EMAC signals an interrupt.
  3142. * http://www.spinics.net/lists/arm-kernel/msg174734.html
  3143. */
  3144. .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
  3145. };
  3146. /* l3_core -> davinci emac interface */
  3147. /*
  3148. * XXX Should be connected to an IPSS hwmod, not the L3 directly;
  3149. * but this will probably require some additional hwmod core support,
  3150. * so is left as a future to-do item.
  3151. */
  3152. static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
  3153. .master = &am35xx_emac_hwmod,
  3154. .slave = &omap3xxx_l3_main_hwmod,
  3155. .clk = "emac_ick",
  3156. .user = OCP_USER_MPU,
  3157. };
  3158. static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
  3159. {
  3160. .pa_start = AM35XX_IPSS_EMAC_BASE,
  3161. .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
  3162. .flags = ADDR_TYPE_RT,
  3163. },
  3164. { }
  3165. };
  3166. /* l4_core -> davinci emac */
  3167. /*
  3168. * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
  3169. * but this will probably require some additional hwmod core support,
  3170. * so is left as a future to-do item.
  3171. */
  3172. static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
  3173. .master = &omap3xxx_l4_core_hwmod,
  3174. .slave = &am35xx_emac_hwmod,
  3175. .clk = "emac_ick",
  3176. .addr = am35xx_emac_addrs,
  3177. .user = OCP_USER_MPU,
  3178. };
  3179. static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
  3180. .master = &omap3xxx_l3_main_hwmod,
  3181. .slave = &omap3xxx_gpmc_hwmod,
  3182. .clk = "core_l3_ick",
  3183. .addr = omap3xxx_gpmc_addrs,
  3184. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3185. };
  3186. /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
  3187. static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
  3188. .sidle_shift = 4,
  3189. .srst_shift = 1,
  3190. .autoidle_shift = 0,
  3191. };
  3192. static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
  3193. .rev_offs = 0x5c,
  3194. .sysc_offs = 0x60,
  3195. .syss_offs = 0x64,
  3196. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  3197. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  3198. .sysc_fields = &omap3_sham_sysc_fields,
  3199. };
  3200. static struct omap_hwmod_class omap3xxx_sham_class = {
  3201. .name = "sham",
  3202. .sysc = &omap3_sham_sysc,
  3203. };
  3204. static struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = {
  3205. { .irq = 49 + OMAP_INTC_START, },
  3206. { .irq = -1 }
  3207. };
  3208. static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = {
  3209. { .name = "rx", .dma_req = OMAP34XX_DMA_SHA1MD5_RX, },
  3210. { .dma_req = -1 }
  3211. };
  3212. static struct omap_hwmod omap3xxx_sham_hwmod = {
  3213. .name = "sham",
  3214. .mpu_irqs = omap3_sham_mpu_irqs,
  3215. .sdma_reqs = omap3_sham_sdma_reqs,
  3216. .main_clk = "sha12_ick",
  3217. .prcm = {
  3218. .omap2 = {
  3219. .module_offs = CORE_MOD,
  3220. .prcm_reg_id = 1,
  3221. .module_bit = OMAP3430_EN_SHA12_SHIFT,
  3222. .idlest_reg_id = 1,
  3223. .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
  3224. },
  3225. },
  3226. .class = &omap3xxx_sham_class,
  3227. };
  3228. static struct omap_hwmod_addr_space omap3xxx_sham_addrs[] = {
  3229. {
  3230. .pa_start = 0x480c3000,
  3231. .pa_end = 0x480c3000 + 0x64 - 1,
  3232. .flags = ADDR_TYPE_RT
  3233. },
  3234. { }
  3235. };
  3236. static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
  3237. .master = &omap3xxx_l4_core_hwmod,
  3238. .slave = &omap3xxx_sham_hwmod,
  3239. .clk = "sha12_ick",
  3240. .addr = omap3xxx_sham_addrs,
  3241. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3242. };
  3243. /* l4_core -> AES */
  3244. static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
  3245. .sidle_shift = 6,
  3246. .srst_shift = 1,
  3247. .autoidle_shift = 0,
  3248. };
  3249. static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
  3250. .rev_offs = 0x44,
  3251. .sysc_offs = 0x48,
  3252. .syss_offs = 0x4c,
  3253. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  3254. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  3255. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  3256. .sysc_fields = &omap3xxx_aes_sysc_fields,
  3257. };
  3258. static struct omap_hwmod_class omap3xxx_aes_class = {
  3259. .name = "aes",
  3260. .sysc = &omap3_aes_sysc,
  3261. };
  3262. static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = {
  3263. { .name = "tx", .dma_req = OMAP34XX_DMA_AES2_TX, },
  3264. { .name = "rx", .dma_req = OMAP34XX_DMA_AES2_RX, },
  3265. { .dma_req = -1 }
  3266. };
  3267. static struct omap_hwmod omap3xxx_aes_hwmod = {
  3268. .name = "aes",
  3269. .sdma_reqs = omap3_aes_sdma_reqs,
  3270. .main_clk = "aes2_ick",
  3271. .prcm = {
  3272. .omap2 = {
  3273. .module_offs = CORE_MOD,
  3274. .prcm_reg_id = 1,
  3275. .module_bit = OMAP3430_EN_AES2_SHIFT,
  3276. .idlest_reg_id = 1,
  3277. .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
  3278. },
  3279. },
  3280. .class = &omap3xxx_aes_class,
  3281. };
  3282. static struct omap_hwmod_addr_space omap3xxx_aes_addrs[] = {
  3283. {
  3284. .pa_start = 0x480c5000,
  3285. .pa_end = 0x480c5000 + 0x50 - 1,
  3286. .flags = ADDR_TYPE_RT
  3287. },
  3288. { }
  3289. };
  3290. static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
  3291. .master = &omap3xxx_l4_core_hwmod,
  3292. .slave = &omap3xxx_aes_hwmod,
  3293. .clk = "aes2_ick",
  3294. .addr = omap3xxx_aes_addrs,
  3295. .user = OCP_USER_MPU | OCP_USER_SDMA,
  3296. };
  3297. static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
  3298. &omap3xxx_l3_main__l4_core,
  3299. &omap3xxx_l3_main__l4_per,
  3300. &omap3xxx_mpu__l3_main,
  3301. &omap3xxx_l3_main__l4_debugss,
  3302. &omap3xxx_l4_core__l4_wkup,
  3303. &omap3xxx_l4_core__mmc3,
  3304. &omap3_l4_core__uart1,
  3305. &omap3_l4_core__uart2,
  3306. &omap3_l4_per__uart3,
  3307. &omap3_l4_core__i2c1,
  3308. &omap3_l4_core__i2c2,
  3309. &omap3_l4_core__i2c3,
  3310. &omap3xxx_l4_wkup__l4_sec,
  3311. &omap3xxx_l4_wkup__timer1,
  3312. &omap3xxx_l4_per__timer2,
  3313. &omap3xxx_l4_per__timer3,
  3314. &omap3xxx_l4_per__timer4,
  3315. &omap3xxx_l4_per__timer5,
  3316. &omap3xxx_l4_per__timer6,
  3317. &omap3xxx_l4_per__timer7,
  3318. &omap3xxx_l4_per__timer8,
  3319. &omap3xxx_l4_per__timer9,
  3320. &omap3xxx_l4_core__timer10,
  3321. &omap3xxx_l4_core__timer11,
  3322. &omap3xxx_l4_wkup__wd_timer2,
  3323. &omap3xxx_l4_wkup__gpio1,
  3324. &omap3xxx_l4_per__gpio2,
  3325. &omap3xxx_l4_per__gpio3,
  3326. &omap3xxx_l4_per__gpio4,
  3327. &omap3xxx_l4_per__gpio5,
  3328. &omap3xxx_l4_per__gpio6,
  3329. &omap3xxx_dma_system__l3,
  3330. &omap3xxx_l4_core__dma_system,
  3331. &omap3xxx_l4_core__mcbsp1,
  3332. &omap3xxx_l4_per__mcbsp2,
  3333. &omap3xxx_l4_per__mcbsp3,
  3334. &omap3xxx_l4_per__mcbsp4,
  3335. &omap3xxx_l4_core__mcbsp5,
  3336. &omap3xxx_l4_per__mcbsp2_sidetone,
  3337. &omap3xxx_l4_per__mcbsp3_sidetone,
  3338. &omap34xx_l4_core__mcspi1,
  3339. &omap34xx_l4_core__mcspi2,
  3340. &omap34xx_l4_core__mcspi3,
  3341. &omap34xx_l4_core__mcspi4,
  3342. &omap3xxx_l4_wkup__counter_32k,
  3343. &omap3xxx_l3_main__gpmc,
  3344. NULL,
  3345. };
  3346. /* GP-only hwmod links */
  3347. static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
  3348. &omap3xxx_l4_sec__timer12,
  3349. &omap3xxx_l4_core__sham,
  3350. &omap3xxx_l4_core__aes,
  3351. NULL
  3352. };
  3353. static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
  3354. &omap3xxx_l4_sec__timer12,
  3355. &omap3xxx_l4_core__sham,
  3356. &omap3xxx_l4_core__aes,
  3357. NULL
  3358. };
  3359. static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
  3360. &omap3xxx_l4_sec__timer12,
  3361. /*
  3362. * Apparently the SHA/MD5 and AES accelerator IP blocks are
  3363. * only present on some AM35xx chips, and no one knows which
  3364. * ones. See
  3365. * http://www.spinics.net/lists/arm-kernel/msg215466.html So
  3366. * if you need these IP blocks on an AM35xx, try uncommenting
  3367. * the following lines.
  3368. */
  3369. /* &omap3xxx_l4_core__sham, */
  3370. /* &omap3xxx_l4_core__aes, */
  3371. NULL
  3372. };
  3373. /* 3430ES1-only hwmod links */
  3374. static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
  3375. &omap3430es1_dss__l3,
  3376. &omap3430es1_l4_core__dss,
  3377. NULL
  3378. };
  3379. /* 3430ES2+-only hwmod links */
  3380. static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
  3381. &omap3xxx_dss__l3,
  3382. &omap3xxx_l4_core__dss,
  3383. &omap3xxx_usbhsotg__l3,
  3384. &omap3xxx_l4_core__usbhsotg,
  3385. &omap3xxx_usb_host_hs__l3_main_2,
  3386. &omap3xxx_l4_core__usb_host_hs,
  3387. &omap3xxx_l4_core__usb_tll_hs,
  3388. NULL
  3389. };
  3390. /* <= 3430ES3-only hwmod links */
  3391. static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
  3392. &omap3xxx_l4_core__pre_es3_mmc1,
  3393. &omap3xxx_l4_core__pre_es3_mmc2,
  3394. NULL
  3395. };
  3396. /* 3430ES3+-only hwmod links */
  3397. static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
  3398. &omap3xxx_l4_core__es3plus_mmc1,
  3399. &omap3xxx_l4_core__es3plus_mmc2,
  3400. NULL
  3401. };
  3402. /* 34xx-only hwmod links (all ES revisions) */
  3403. static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
  3404. &omap3xxx_l3__iva,
  3405. &omap34xx_l4_core__sr1,
  3406. &omap34xx_l4_core__sr2,
  3407. &omap3xxx_l4_core__mailbox,
  3408. &omap3xxx_l4_core__hdq1w,
  3409. &omap3xxx_sad2d__l3,
  3410. &omap3xxx_l4_core__mmu_isp,
  3411. #ifdef CONFIG_OMAP_IOMMU_IVA2
  3412. &omap3xxx_l3_main__mmu_iva,
  3413. #endif
  3414. NULL
  3415. };
  3416. /* 36xx-only hwmod links (all ES revisions) */
  3417. static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
  3418. &omap3xxx_l3__iva,
  3419. &omap36xx_l4_per__uart4,
  3420. &omap3xxx_dss__l3,
  3421. &omap3xxx_l4_core__dss,
  3422. &omap36xx_l4_core__sr1,
  3423. &omap36xx_l4_core__sr2,
  3424. &omap3xxx_usbhsotg__l3,
  3425. &omap3xxx_l4_core__usbhsotg,
  3426. &omap3xxx_l4_core__mailbox,
  3427. &omap3xxx_usb_host_hs__l3_main_2,
  3428. &omap3xxx_l4_core__usb_host_hs,
  3429. &omap3xxx_l4_core__usb_tll_hs,
  3430. &omap3xxx_l4_core__es3plus_mmc1,
  3431. &omap3xxx_l4_core__es3plus_mmc2,
  3432. &omap3xxx_l4_core__hdq1w,
  3433. &omap3xxx_sad2d__l3,
  3434. &omap3xxx_l4_core__mmu_isp,
  3435. #ifdef CONFIG_OMAP_IOMMU_IVA2
  3436. &omap3xxx_l3_main__mmu_iva,
  3437. #endif
  3438. NULL
  3439. };
  3440. static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
  3441. &omap3xxx_dss__l3,
  3442. &omap3xxx_l4_core__dss,
  3443. &am35xx_usbhsotg__l3,
  3444. &am35xx_l4_core__usbhsotg,
  3445. &am35xx_l4_core__uart4,
  3446. &omap3xxx_usb_host_hs__l3_main_2,
  3447. &omap3xxx_l4_core__usb_host_hs,
  3448. &omap3xxx_l4_core__usb_tll_hs,
  3449. &omap3xxx_l4_core__es3plus_mmc1,
  3450. &omap3xxx_l4_core__es3plus_mmc2,
  3451. &omap3xxx_l4_core__hdq1w,
  3452. &am35xx_mdio__l3,
  3453. &am35xx_l4_core__mdio,
  3454. &am35xx_emac__l3,
  3455. &am35xx_l4_core__emac,
  3456. NULL
  3457. };
  3458. static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
  3459. &omap3xxx_l4_core__dss_dispc,
  3460. &omap3xxx_l4_core__dss_dsi1,
  3461. &omap3xxx_l4_core__dss_rfbi,
  3462. &omap3xxx_l4_core__dss_venc,
  3463. NULL
  3464. };
  3465. int __init omap3xxx_hwmod_init(void)
  3466. {
  3467. int r;
  3468. struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL;
  3469. unsigned int rev;
  3470. omap_hwmod_init();
  3471. /* Register hwmod links common to all OMAP3 */
  3472. r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
  3473. if (r < 0)
  3474. return r;
  3475. rev = omap_rev();
  3476. /*
  3477. * Register hwmod links common to individual OMAP3 families, all
  3478. * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
  3479. * All possible revisions should be included in this conditional.
  3480. */
  3481. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3482. rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
  3483. rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
  3484. h = omap34xx_hwmod_ocp_ifs;
  3485. h_gp = omap34xx_gp_hwmod_ocp_ifs;
  3486. } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
  3487. h = am35xx_hwmod_ocp_ifs;
  3488. h_gp = am35xx_gp_hwmod_ocp_ifs;
  3489. } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
  3490. rev == OMAP3630_REV_ES1_2) {
  3491. h = omap36xx_hwmod_ocp_ifs;
  3492. h_gp = omap36xx_gp_hwmod_ocp_ifs;
  3493. } else {
  3494. WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
  3495. return -EINVAL;
  3496. }
  3497. r = omap_hwmod_register_links(h);
  3498. if (r < 0)
  3499. return r;
  3500. /* Register GP-only hwmod links. */
  3501. if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
  3502. r = omap_hwmod_register_links(h_gp);
  3503. if (r < 0)
  3504. return r;
  3505. }
  3506. /*
  3507. * Register hwmod links specific to certain ES levels of a
  3508. * particular family of silicon (e.g., 34xx ES1.0)
  3509. */
  3510. h = NULL;
  3511. if (rev == OMAP3430_REV_ES1_0) {
  3512. h = omap3430es1_hwmod_ocp_ifs;
  3513. } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
  3514. rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3515. rev == OMAP3430_REV_ES3_1_2) {
  3516. h = omap3430es2plus_hwmod_ocp_ifs;
  3517. }
  3518. if (h) {
  3519. r = omap_hwmod_register_links(h);
  3520. if (r < 0)
  3521. return r;
  3522. }
  3523. h = NULL;
  3524. if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
  3525. rev == OMAP3430_REV_ES2_1) {
  3526. h = omap3430_pre_es3_hwmod_ocp_ifs;
  3527. } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
  3528. rev == OMAP3430_REV_ES3_1_2) {
  3529. h = omap3430_es3plus_hwmod_ocp_ifs;
  3530. }
  3531. if (h)
  3532. r = omap_hwmod_register_links(h);
  3533. if (r < 0)
  3534. return r;
  3535. /*
  3536. * DSS code presumes that dss_core hwmod is handled first,
  3537. * _before_ any other DSS related hwmods so register common
  3538. * DSS hwmod links last to ensure that dss_core is already
  3539. * registered. Otherwise some change things may happen, for
  3540. * ex. if dispc is handled before dss_core and DSS is enabled
  3541. * in bootloader DISPC will be reset with outputs enabled
  3542. * which sometimes leads to unrecoverable L3 error. XXX The
  3543. * long-term fix to this is to ensure hwmods are set up in
  3544. * dependency order in the hwmod core code.
  3545. */
  3546. r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
  3547. return r;
  3548. }