omap_hwmod_3xxx_data.c 96 KB

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