omap_hwmod_3xxx_data.c 101 KB

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