omap_hwmod_3xxx_data.c 95 KB

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