omap_hwmod_3xxx_data.c 83 KB

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