omap_hwmod_3xxx_data.c 82 KB

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