omap_hwmod_3xxx_data.c 95 KB

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