omap_hwmod_3xxx_data.c 83 KB

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