omap_hwmod_3xxx_data.c 95 KB

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