omap_hwmod_3xxx_data.c 88 KB

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