omap_hwmod_3xxx_data.c 95 KB

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