omap_hwmod_3xxx_data.c 96 KB

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