omap_hwmod_3xxx_data.c 82 KB

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