clk-3xxx-legacy.c 99 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657
  1. /*
  2. * OMAP3 Legacy clock data
  3. *
  4. * Copyright (C) 2014 Texas Instruments, Inc
  5. * Tero Kristo (t-kristo@ti.com)
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation version 2.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/kernel.h>
  17. #include <linux/clk.h>
  18. #include <linux/clk-provider.h>
  19. #include <linux/clk/ti.h>
  20. #include "clock.h"
  21. static struct ti_clk_fixed virt_12m_ck_data = {
  22. .frequency = 12000000,
  23. };
  24. static struct ti_clk virt_12m_ck = {
  25. .name = "virt_12m_ck",
  26. .type = TI_CLK_FIXED,
  27. .data = &virt_12m_ck_data,
  28. };
  29. static struct ti_clk_fixed virt_13m_ck_data = {
  30. .frequency = 13000000,
  31. };
  32. static struct ti_clk virt_13m_ck = {
  33. .name = "virt_13m_ck",
  34. .type = TI_CLK_FIXED,
  35. .data = &virt_13m_ck_data,
  36. };
  37. static struct ti_clk_fixed virt_19200000_ck_data = {
  38. .frequency = 19200000,
  39. };
  40. static struct ti_clk virt_19200000_ck = {
  41. .name = "virt_19200000_ck",
  42. .type = TI_CLK_FIXED,
  43. .data = &virt_19200000_ck_data,
  44. };
  45. static struct ti_clk_fixed virt_26000000_ck_data = {
  46. .frequency = 26000000,
  47. };
  48. static struct ti_clk virt_26000000_ck = {
  49. .name = "virt_26000000_ck",
  50. .type = TI_CLK_FIXED,
  51. .data = &virt_26000000_ck_data,
  52. };
  53. static struct ti_clk_fixed virt_38_4m_ck_data = {
  54. .frequency = 38400000,
  55. };
  56. static struct ti_clk virt_38_4m_ck = {
  57. .name = "virt_38_4m_ck",
  58. .type = TI_CLK_FIXED,
  59. .data = &virt_38_4m_ck_data,
  60. };
  61. static struct ti_clk_fixed virt_16_8m_ck_data = {
  62. .frequency = 16800000,
  63. };
  64. static struct ti_clk virt_16_8m_ck = {
  65. .name = "virt_16_8m_ck",
  66. .type = TI_CLK_FIXED,
  67. .data = &virt_16_8m_ck_data,
  68. };
  69. static const char *osc_sys_ck_parents[] = {
  70. "virt_12m_ck",
  71. "virt_13m_ck",
  72. "virt_19200000_ck",
  73. "virt_26000000_ck",
  74. "virt_38_4m_ck",
  75. "virt_16_8m_ck",
  76. };
  77. static struct ti_clk_mux osc_sys_ck_data = {
  78. .num_parents = ARRAY_SIZE(osc_sys_ck_parents),
  79. .reg = 0xd40,
  80. .module = TI_CLKM_PRM,
  81. .parents = osc_sys_ck_parents,
  82. };
  83. static struct ti_clk osc_sys_ck = {
  84. .name = "osc_sys_ck",
  85. .type = TI_CLK_MUX,
  86. .data = &osc_sys_ck_data,
  87. };
  88. static struct ti_clk_divider sys_ck_data = {
  89. .parent = "osc_sys_ck",
  90. .bit_shift = 6,
  91. .max_div = 3,
  92. .reg = 0x1270,
  93. .module = TI_CLKM_PRM,
  94. .flags = CLKF_INDEX_STARTS_AT_ONE,
  95. };
  96. static struct ti_clk sys_ck = {
  97. .name = "sys_ck",
  98. .type = TI_CLK_DIVIDER,
  99. .data = &sys_ck_data,
  100. };
  101. static const char *dpll3_ck_parents[] = {
  102. "sys_ck",
  103. "sys_ck",
  104. };
  105. static struct ti_clk_dpll dpll3_ck_data = {
  106. .num_parents = ARRAY_SIZE(dpll3_ck_parents),
  107. .control_reg = 0xd00,
  108. .idlest_reg = 0xd20,
  109. .mult_div1_reg = 0xd40,
  110. .autoidle_reg = 0xd30,
  111. .module = TI_CLKM_CM,
  112. .parents = dpll3_ck_parents,
  113. .flags = CLKF_CORE,
  114. .freqsel_mask = 0xf0,
  115. .div1_mask = 0x7f00,
  116. .idlest_mask = 0x1,
  117. .auto_recal_bit = 0x3,
  118. .max_divider = 0x80,
  119. .min_divider = 0x1,
  120. .recal_en_bit = 0x5,
  121. .max_multiplier = 0x7ff,
  122. .enable_mask = 0x7,
  123. .mult_mask = 0x7ff0000,
  124. .recal_st_bit = 0x5,
  125. .autoidle_mask = 0x7,
  126. };
  127. static struct ti_clk dpll3_ck = {
  128. .name = "dpll3_ck",
  129. .clkdm_name = "dpll3_clkdm",
  130. .type = TI_CLK_DPLL,
  131. .data = &dpll3_ck_data,
  132. };
  133. static struct ti_clk_divider dpll3_m2_ck_data = {
  134. .parent = "dpll3_ck",
  135. .bit_shift = 27,
  136. .max_div = 31,
  137. .reg = 0xd40,
  138. .module = TI_CLKM_CM,
  139. .flags = CLKF_INDEX_STARTS_AT_ONE,
  140. };
  141. static struct ti_clk dpll3_m2_ck = {
  142. .name = "dpll3_m2_ck",
  143. .type = TI_CLK_DIVIDER,
  144. .data = &dpll3_m2_ck_data,
  145. };
  146. static struct ti_clk_fixed_factor core_ck_data = {
  147. .parent = "dpll3_m2_ck",
  148. .div = 1,
  149. .mult = 1,
  150. };
  151. static struct ti_clk core_ck = {
  152. .name = "core_ck",
  153. .type = TI_CLK_FIXED_FACTOR,
  154. .data = &core_ck_data,
  155. };
  156. static struct ti_clk_divider l3_ick_data = {
  157. .parent = "core_ck",
  158. .max_div = 3,
  159. .reg = 0xa40,
  160. .module = TI_CLKM_CM,
  161. .flags = CLKF_INDEX_STARTS_AT_ONE,
  162. };
  163. static struct ti_clk l3_ick = {
  164. .name = "l3_ick",
  165. .type = TI_CLK_DIVIDER,
  166. .data = &l3_ick_data,
  167. };
  168. static struct ti_clk_fixed_factor security_l3_ick_data = {
  169. .parent = "l3_ick",
  170. .div = 1,
  171. .mult = 1,
  172. };
  173. static struct ti_clk security_l3_ick = {
  174. .name = "security_l3_ick",
  175. .type = TI_CLK_FIXED_FACTOR,
  176. .data = &security_l3_ick_data,
  177. };
  178. static struct ti_clk_fixed_factor wkup_l4_ick_data = {
  179. .parent = "sys_ck",
  180. .div = 1,
  181. .mult = 1,
  182. };
  183. static struct ti_clk wkup_l4_ick = {
  184. .name = "wkup_l4_ick",
  185. .type = TI_CLK_FIXED_FACTOR,
  186. .data = &wkup_l4_ick_data,
  187. };
  188. static struct ti_clk_gate usim_ick_data = {
  189. .parent = "wkup_l4_ick",
  190. .bit_shift = 9,
  191. .reg = 0xc10,
  192. .module = TI_CLKM_CM,
  193. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  194. };
  195. static struct ti_clk usim_ick = {
  196. .name = "usim_ick",
  197. .clkdm_name = "wkup_clkdm",
  198. .type = TI_CLK_GATE,
  199. .data = &usim_ick_data,
  200. };
  201. static struct ti_clk_gate dss2_alwon_fck_data = {
  202. .parent = "sys_ck",
  203. .bit_shift = 1,
  204. .reg = 0xe00,
  205. .module = TI_CLKM_CM,
  206. };
  207. static struct ti_clk dss2_alwon_fck = {
  208. .name = "dss2_alwon_fck",
  209. .clkdm_name = "dss_clkdm",
  210. .type = TI_CLK_GATE,
  211. .data = &dss2_alwon_fck_data,
  212. };
  213. static struct ti_clk_divider l4_ick_data = {
  214. .parent = "l3_ick",
  215. .bit_shift = 2,
  216. .max_div = 3,
  217. .reg = 0xa40,
  218. .module = TI_CLKM_CM,
  219. .flags = CLKF_INDEX_STARTS_AT_ONE,
  220. };
  221. static struct ti_clk l4_ick = {
  222. .name = "l4_ick",
  223. .type = TI_CLK_DIVIDER,
  224. .data = &l4_ick_data,
  225. };
  226. static struct ti_clk_fixed_factor core_l4_ick_data = {
  227. .parent = "l4_ick",
  228. .div = 1,
  229. .mult = 1,
  230. };
  231. static struct ti_clk core_l4_ick = {
  232. .name = "core_l4_ick",
  233. .type = TI_CLK_FIXED_FACTOR,
  234. .data = &core_l4_ick_data,
  235. };
  236. static struct ti_clk_gate mmchs2_ick_data = {
  237. .parent = "core_l4_ick",
  238. .bit_shift = 25,
  239. .reg = 0xa10,
  240. .module = TI_CLKM_CM,
  241. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  242. };
  243. static struct ti_clk mmchs2_ick = {
  244. .name = "mmchs2_ick",
  245. .clkdm_name = "core_l4_clkdm",
  246. .type = TI_CLK_GATE,
  247. .data = &mmchs2_ick_data,
  248. };
  249. static const char *dpll4_ck_parents[] = {
  250. "sys_ck",
  251. "sys_ck",
  252. };
  253. static struct ti_clk_dpll dpll4_ck_data = {
  254. .num_parents = ARRAY_SIZE(dpll4_ck_parents),
  255. .control_reg = 0xd00,
  256. .idlest_reg = 0xd20,
  257. .mult_div1_reg = 0xd44,
  258. .autoidle_reg = 0xd30,
  259. .module = TI_CLKM_CM,
  260. .parents = dpll4_ck_parents,
  261. .flags = CLKF_PER,
  262. .freqsel_mask = 0xf00000,
  263. .modes = 0x82,
  264. .div1_mask = 0x7f,
  265. .idlest_mask = 0x2,
  266. .auto_recal_bit = 0x13,
  267. .max_divider = 0x80,
  268. .min_divider = 0x1,
  269. .recal_en_bit = 0x6,
  270. .max_multiplier = 0x7ff,
  271. .enable_mask = 0x70000,
  272. .mult_mask = 0x7ff00,
  273. .recal_st_bit = 0x6,
  274. .autoidle_mask = 0x38,
  275. };
  276. static struct ti_clk dpll4_ck = {
  277. .name = "dpll4_ck",
  278. .clkdm_name = "dpll4_clkdm",
  279. .type = TI_CLK_DPLL,
  280. .data = &dpll4_ck_data,
  281. };
  282. static struct ti_clk_divider dpll4_m2_ck_data = {
  283. .parent = "dpll4_ck",
  284. .max_div = 63,
  285. .reg = 0xd48,
  286. .module = TI_CLKM_CM,
  287. .flags = CLKF_INDEX_STARTS_AT_ONE,
  288. };
  289. static struct ti_clk dpll4_m2_ck = {
  290. .name = "dpll4_m2_ck",
  291. .type = TI_CLK_DIVIDER,
  292. .data = &dpll4_m2_ck_data,
  293. };
  294. static struct ti_clk_fixed_factor dpll4_m2x2_mul_ck_data = {
  295. .parent = "dpll4_m2_ck",
  296. .div = 1,
  297. .mult = 2,
  298. };
  299. static struct ti_clk dpll4_m2x2_mul_ck = {
  300. .name = "dpll4_m2x2_mul_ck",
  301. .type = TI_CLK_FIXED_FACTOR,
  302. .data = &dpll4_m2x2_mul_ck_data,
  303. };
  304. static struct ti_clk_gate dpll4_m2x2_ck_data = {
  305. .parent = "dpll4_m2x2_mul_ck",
  306. .bit_shift = 0x1b,
  307. .reg = 0xd00,
  308. .module = TI_CLKM_CM,
  309. .flags = CLKF_SET_BIT_TO_DISABLE,
  310. };
  311. static struct ti_clk dpll4_m2x2_ck = {
  312. .name = "dpll4_m2x2_ck",
  313. .type = TI_CLK_GATE,
  314. .data = &dpll4_m2x2_ck_data,
  315. };
  316. static struct ti_clk_fixed_factor omap_96m_alwon_fck_data = {
  317. .parent = "dpll4_m2x2_ck",
  318. .div = 1,
  319. .mult = 1,
  320. };
  321. static struct ti_clk omap_96m_alwon_fck = {
  322. .name = "omap_96m_alwon_fck",
  323. .type = TI_CLK_FIXED_FACTOR,
  324. .data = &omap_96m_alwon_fck_data,
  325. };
  326. static struct ti_clk_fixed_factor cm_96m_fck_data = {
  327. .parent = "omap_96m_alwon_fck",
  328. .div = 1,
  329. .mult = 1,
  330. };
  331. static struct ti_clk cm_96m_fck = {
  332. .name = "cm_96m_fck",
  333. .type = TI_CLK_FIXED_FACTOR,
  334. .data = &cm_96m_fck_data,
  335. };
  336. static const char *omap_96m_fck_parents[] = {
  337. "cm_96m_fck",
  338. "sys_ck",
  339. };
  340. static struct ti_clk_mux omap_96m_fck_data = {
  341. .bit_shift = 6,
  342. .num_parents = ARRAY_SIZE(omap_96m_fck_parents),
  343. .reg = 0xd40,
  344. .module = TI_CLKM_CM,
  345. .parents = omap_96m_fck_parents,
  346. };
  347. static struct ti_clk omap_96m_fck = {
  348. .name = "omap_96m_fck",
  349. .type = TI_CLK_MUX,
  350. .data = &omap_96m_fck_data,
  351. };
  352. static struct ti_clk_fixed_factor core_96m_fck_data = {
  353. .parent = "omap_96m_fck",
  354. .div = 1,
  355. .mult = 1,
  356. };
  357. static struct ti_clk core_96m_fck = {
  358. .name = "core_96m_fck",
  359. .type = TI_CLK_FIXED_FACTOR,
  360. .data = &core_96m_fck_data,
  361. };
  362. static struct ti_clk_gate mspro_fck_data = {
  363. .parent = "core_96m_fck",
  364. .bit_shift = 23,
  365. .reg = 0xa00,
  366. .module = TI_CLKM_CM,
  367. .flags = CLKF_WAIT,
  368. };
  369. static struct ti_clk mspro_fck = {
  370. .name = "mspro_fck",
  371. .clkdm_name = "core_l4_clkdm",
  372. .type = TI_CLK_GATE,
  373. .data = &mspro_fck_data,
  374. };
  375. static struct ti_clk_gate dss_ick_3430es2_data = {
  376. .parent = "l4_ick",
  377. .bit_shift = 0,
  378. .reg = 0xe10,
  379. .module = TI_CLKM_CM,
  380. .flags = CLKF_DSS | CLKF_OMAP3 | CLKF_INTERFACE,
  381. };
  382. static struct ti_clk dss_ick_3430es2 = {
  383. .name = "dss_ick",
  384. .clkdm_name = "dss_clkdm",
  385. .type = TI_CLK_GATE,
  386. .data = &dss_ick_3430es2_data,
  387. };
  388. static struct ti_clk_gate uart4_ick_am35xx_data = {
  389. .parent = "core_l4_ick",
  390. .bit_shift = 23,
  391. .reg = 0xa10,
  392. .module = TI_CLKM_CM,
  393. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  394. };
  395. static struct ti_clk uart4_ick_am35xx = {
  396. .name = "uart4_ick_am35xx",
  397. .clkdm_name = "core_l4_clkdm",
  398. .type = TI_CLK_GATE,
  399. .data = &uart4_ick_am35xx_data,
  400. };
  401. static struct ti_clk_fixed_factor security_l4_ick2_data = {
  402. .parent = "l4_ick",
  403. .div = 1,
  404. .mult = 1,
  405. };
  406. static struct ti_clk security_l4_ick2 = {
  407. .name = "security_l4_ick2",
  408. .type = TI_CLK_FIXED_FACTOR,
  409. .data = &security_l4_ick2_data,
  410. };
  411. static struct ti_clk_gate aes1_ick_data = {
  412. .parent = "security_l4_ick2",
  413. .bit_shift = 3,
  414. .reg = 0xa14,
  415. .module = TI_CLKM_CM,
  416. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  417. };
  418. static struct ti_clk aes1_ick = {
  419. .name = "aes1_ick",
  420. .type = TI_CLK_GATE,
  421. .data = &aes1_ick_data,
  422. };
  423. static const char *dpll5_ck_parents[] = {
  424. "sys_ck",
  425. "sys_ck",
  426. };
  427. static struct ti_clk_dpll dpll5_ck_data = {
  428. .num_parents = ARRAY_SIZE(dpll5_ck_parents),
  429. .control_reg = 0xd04,
  430. .idlest_reg = 0xd24,
  431. .mult_div1_reg = 0xd4c,
  432. .autoidle_reg = 0xd34,
  433. .module = TI_CLKM_CM,
  434. .parents = dpll5_ck_parents,
  435. .freqsel_mask = 0xf0,
  436. .modes = 0x82,
  437. .div1_mask = 0x7f,
  438. .idlest_mask = 0x1,
  439. .auto_recal_bit = 0x3,
  440. .max_divider = 0x80,
  441. .min_divider = 0x1,
  442. .recal_en_bit = 0x19,
  443. .max_multiplier = 0x7ff,
  444. .enable_mask = 0x7,
  445. .mult_mask = 0x7ff00,
  446. .recal_st_bit = 0x19,
  447. .autoidle_mask = 0x7,
  448. };
  449. static struct ti_clk dpll5_ck = {
  450. .name = "dpll5_ck",
  451. .clkdm_name = "dpll5_clkdm",
  452. .type = TI_CLK_DPLL,
  453. .data = &dpll5_ck_data,
  454. };
  455. static struct ti_clk_divider dpll5_m2_ck_data = {
  456. .parent = "dpll5_ck",
  457. .max_div = 31,
  458. .reg = 0xd50,
  459. .module = TI_CLKM_CM,
  460. .flags = CLKF_INDEX_STARTS_AT_ONE,
  461. };
  462. static struct ti_clk dpll5_m2_ck = {
  463. .name = "dpll5_m2_ck",
  464. .type = TI_CLK_DIVIDER,
  465. .data = &dpll5_m2_ck_data,
  466. };
  467. static struct ti_clk_gate usbhost_120m_fck_data = {
  468. .parent = "dpll5_m2_ck",
  469. .bit_shift = 1,
  470. .reg = 0x1400,
  471. .module = TI_CLKM_CM,
  472. };
  473. static struct ti_clk usbhost_120m_fck = {
  474. .name = "usbhost_120m_fck",
  475. .clkdm_name = "usbhost_clkdm",
  476. .type = TI_CLK_GATE,
  477. .data = &usbhost_120m_fck_data,
  478. };
  479. static struct ti_clk_fixed_factor cm_96m_d2_fck_data = {
  480. .parent = "cm_96m_fck",
  481. .div = 2,
  482. .mult = 1,
  483. };
  484. static struct ti_clk cm_96m_d2_fck = {
  485. .name = "cm_96m_d2_fck",
  486. .type = TI_CLK_FIXED_FACTOR,
  487. .data = &cm_96m_d2_fck_data,
  488. };
  489. static struct ti_clk_fixed sys_altclk_data = {
  490. .frequency = 0x0,
  491. };
  492. static struct ti_clk sys_altclk = {
  493. .name = "sys_altclk",
  494. .type = TI_CLK_FIXED,
  495. .data = &sys_altclk_data,
  496. };
  497. static const char *omap_48m_fck_parents[] = {
  498. "cm_96m_d2_fck",
  499. "sys_altclk",
  500. };
  501. static struct ti_clk_mux omap_48m_fck_data = {
  502. .bit_shift = 3,
  503. .num_parents = ARRAY_SIZE(omap_48m_fck_parents),
  504. .reg = 0xd40,
  505. .module = TI_CLKM_CM,
  506. .parents = omap_48m_fck_parents,
  507. };
  508. static struct ti_clk omap_48m_fck = {
  509. .name = "omap_48m_fck",
  510. .type = TI_CLK_MUX,
  511. .data = &omap_48m_fck_data,
  512. };
  513. static struct ti_clk_fixed_factor core_48m_fck_data = {
  514. .parent = "omap_48m_fck",
  515. .div = 1,
  516. .mult = 1,
  517. };
  518. static struct ti_clk core_48m_fck = {
  519. .name = "core_48m_fck",
  520. .type = TI_CLK_FIXED_FACTOR,
  521. .data = &core_48m_fck_data,
  522. };
  523. static struct ti_clk_fixed mcbsp_clks_data = {
  524. .frequency = 0x0,
  525. };
  526. static struct ti_clk mcbsp_clks = {
  527. .name = "mcbsp_clks",
  528. .type = TI_CLK_FIXED,
  529. .data = &mcbsp_clks_data,
  530. };
  531. static struct ti_clk_gate mcbsp2_gate_fck_data = {
  532. .parent = "mcbsp_clks",
  533. .bit_shift = 0,
  534. .reg = 0x1000,
  535. .module = TI_CLKM_CM,
  536. };
  537. static struct ti_clk_fixed_factor per_96m_fck_data = {
  538. .parent = "omap_96m_alwon_fck",
  539. .div = 1,
  540. .mult = 1,
  541. };
  542. static struct ti_clk per_96m_fck = {
  543. .name = "per_96m_fck",
  544. .type = TI_CLK_FIXED_FACTOR,
  545. .data = &per_96m_fck_data,
  546. };
  547. static const char *mcbsp2_mux_fck_parents[] = {
  548. "per_96m_fck",
  549. "mcbsp_clks",
  550. };
  551. static struct ti_clk_mux mcbsp2_mux_fck_data = {
  552. .bit_shift = 6,
  553. .num_parents = ARRAY_SIZE(mcbsp2_mux_fck_parents),
  554. .reg = 0x274,
  555. .module = TI_CLKM_SCRM,
  556. .parents = mcbsp2_mux_fck_parents,
  557. };
  558. static struct ti_clk_composite mcbsp2_fck_data = {
  559. .mux = &mcbsp2_mux_fck_data,
  560. .gate = &mcbsp2_gate_fck_data,
  561. };
  562. static struct ti_clk mcbsp2_fck = {
  563. .name = "mcbsp2_fck",
  564. .type = TI_CLK_COMPOSITE,
  565. .data = &mcbsp2_fck_data,
  566. };
  567. static struct ti_clk_fixed_factor dpll3_m2x2_ck_data = {
  568. .parent = "dpll3_m2_ck",
  569. .div = 1,
  570. .mult = 2,
  571. };
  572. static struct ti_clk dpll3_m2x2_ck = {
  573. .name = "dpll3_m2x2_ck",
  574. .type = TI_CLK_FIXED_FACTOR,
  575. .data = &dpll3_m2x2_ck_data,
  576. };
  577. static struct ti_clk_fixed_factor corex2_fck_data = {
  578. .parent = "dpll3_m2x2_ck",
  579. .div = 1,
  580. .mult = 1,
  581. };
  582. static struct ti_clk corex2_fck = {
  583. .name = "corex2_fck",
  584. .type = TI_CLK_FIXED_FACTOR,
  585. .data = &corex2_fck_data,
  586. };
  587. static struct ti_clk_gate ssi_ssr_gate_fck_3430es1_data = {
  588. .parent = "corex2_fck",
  589. .bit_shift = 0,
  590. .reg = 0xa00,
  591. .module = TI_CLKM_CM,
  592. .flags = CLKF_NO_WAIT,
  593. };
  594. static int ssi_ssr_div_fck_3430es1_divs[] = {
  595. 0,
  596. 1,
  597. 2,
  598. 3,
  599. 4,
  600. 0,
  601. 6,
  602. 0,
  603. 8,
  604. };
  605. static struct ti_clk_divider ssi_ssr_div_fck_3430es1_data = {
  606. .num_dividers = ARRAY_SIZE(ssi_ssr_div_fck_3430es1_divs),
  607. .parent = "corex2_fck",
  608. .bit_shift = 8,
  609. .dividers = ssi_ssr_div_fck_3430es1_divs,
  610. .reg = 0xa40,
  611. .module = TI_CLKM_CM,
  612. };
  613. static struct ti_clk_composite ssi_ssr_fck_3430es1_data = {
  614. .gate = &ssi_ssr_gate_fck_3430es1_data,
  615. .divider = &ssi_ssr_div_fck_3430es1_data,
  616. };
  617. static struct ti_clk ssi_ssr_fck_3430es1 = {
  618. .name = "ssi_ssr_fck",
  619. .type = TI_CLK_COMPOSITE,
  620. .data = &ssi_ssr_fck_3430es1_data,
  621. };
  622. static struct ti_clk_fixed_factor ssi_sst_fck_3430es1_data = {
  623. .parent = "ssi_ssr_fck",
  624. .div = 2,
  625. .mult = 1,
  626. };
  627. static struct ti_clk ssi_sst_fck_3430es1 = {
  628. .name = "ssi_sst_fck",
  629. .type = TI_CLK_FIXED_FACTOR,
  630. .data = &ssi_sst_fck_3430es1_data,
  631. };
  632. static struct ti_clk_fixed omap_32k_fck_data = {
  633. .frequency = 32768,
  634. };
  635. static struct ti_clk omap_32k_fck = {
  636. .name = "omap_32k_fck",
  637. .type = TI_CLK_FIXED,
  638. .data = &omap_32k_fck_data,
  639. };
  640. static struct ti_clk_fixed_factor per_32k_alwon_fck_data = {
  641. .parent = "omap_32k_fck",
  642. .div = 1,
  643. .mult = 1,
  644. };
  645. static struct ti_clk per_32k_alwon_fck = {
  646. .name = "per_32k_alwon_fck",
  647. .type = TI_CLK_FIXED_FACTOR,
  648. .data = &per_32k_alwon_fck_data,
  649. };
  650. static struct ti_clk_gate gpio5_dbck_data = {
  651. .parent = "per_32k_alwon_fck",
  652. .bit_shift = 16,
  653. .reg = 0x1000,
  654. .module = TI_CLKM_CM,
  655. };
  656. static struct ti_clk gpio5_dbck = {
  657. .name = "gpio5_dbck",
  658. .clkdm_name = "per_clkdm",
  659. .type = TI_CLK_GATE,
  660. .data = &gpio5_dbck_data,
  661. };
  662. static struct ti_clk_gate gpt1_ick_data = {
  663. .parent = "wkup_l4_ick",
  664. .bit_shift = 0,
  665. .reg = 0xc10,
  666. .module = TI_CLKM_CM,
  667. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  668. };
  669. static struct ti_clk gpt1_ick = {
  670. .name = "gpt1_ick",
  671. .clkdm_name = "wkup_clkdm",
  672. .type = TI_CLK_GATE,
  673. .data = &gpt1_ick_data,
  674. };
  675. static struct ti_clk_gate mcspi3_fck_data = {
  676. .parent = "core_48m_fck",
  677. .bit_shift = 20,
  678. .reg = 0xa00,
  679. .module = TI_CLKM_CM,
  680. .flags = CLKF_WAIT,
  681. };
  682. static struct ti_clk mcspi3_fck = {
  683. .name = "mcspi3_fck",
  684. .clkdm_name = "core_l4_clkdm",
  685. .type = TI_CLK_GATE,
  686. .data = &mcspi3_fck_data,
  687. };
  688. static struct ti_clk_gate gpt2_gate_fck_data = {
  689. .parent = "sys_ck",
  690. .bit_shift = 3,
  691. .reg = 0x1000,
  692. .module = TI_CLKM_CM,
  693. };
  694. static const char *gpt2_mux_fck_parents[] = {
  695. "omap_32k_fck",
  696. "sys_ck",
  697. };
  698. static struct ti_clk_mux gpt2_mux_fck_data = {
  699. .num_parents = ARRAY_SIZE(gpt2_mux_fck_parents),
  700. .reg = 0x1040,
  701. .module = TI_CLKM_CM,
  702. .parents = gpt2_mux_fck_parents,
  703. };
  704. static struct ti_clk_composite gpt2_fck_data = {
  705. .mux = &gpt2_mux_fck_data,
  706. .gate = &gpt2_gate_fck_data,
  707. };
  708. static struct ti_clk gpt2_fck = {
  709. .name = "gpt2_fck",
  710. .type = TI_CLK_COMPOSITE,
  711. .data = &gpt2_fck_data,
  712. };
  713. static struct ti_clk_gate gpt10_ick_data = {
  714. .parent = "core_l4_ick",
  715. .bit_shift = 11,
  716. .reg = 0xa10,
  717. .module = TI_CLKM_CM,
  718. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  719. };
  720. static struct ti_clk gpt10_ick = {
  721. .name = "gpt10_ick",
  722. .clkdm_name = "core_l4_clkdm",
  723. .type = TI_CLK_GATE,
  724. .data = &gpt10_ick_data,
  725. };
  726. static struct ti_clk_gate uart2_fck_data = {
  727. .parent = "core_48m_fck",
  728. .bit_shift = 14,
  729. .reg = 0xa00,
  730. .module = TI_CLKM_CM,
  731. .flags = CLKF_WAIT,
  732. };
  733. static struct ti_clk uart2_fck = {
  734. .name = "uart2_fck",
  735. .clkdm_name = "core_l4_clkdm",
  736. .type = TI_CLK_GATE,
  737. .data = &uart2_fck_data,
  738. };
  739. static struct ti_clk_fixed_factor sr_l4_ick_data = {
  740. .parent = "l4_ick",
  741. .div = 1,
  742. .mult = 1,
  743. };
  744. static struct ti_clk sr_l4_ick = {
  745. .name = "sr_l4_ick",
  746. .type = TI_CLK_FIXED_FACTOR,
  747. .data = &sr_l4_ick_data,
  748. };
  749. static struct ti_clk_fixed_factor omap_96m_d8_fck_data = {
  750. .parent = "omap_96m_fck",
  751. .div = 8,
  752. .mult = 1,
  753. };
  754. static struct ti_clk omap_96m_d8_fck = {
  755. .name = "omap_96m_d8_fck",
  756. .type = TI_CLK_FIXED_FACTOR,
  757. .data = &omap_96m_d8_fck_data,
  758. };
  759. static struct ti_clk_divider dpll4_m5_ck_data = {
  760. .parent = "dpll4_ck",
  761. .max_div = 63,
  762. .reg = 0xf40,
  763. .module = TI_CLKM_CM,
  764. .flags = CLKF_INDEX_STARTS_AT_ONE,
  765. };
  766. static struct ti_clk dpll4_m5_ck = {
  767. .name = "dpll4_m5_ck",
  768. .type = TI_CLK_DIVIDER,
  769. .data = &dpll4_m5_ck_data,
  770. };
  771. static struct ti_clk_fixed_factor dpll4_m5x2_mul_ck_data = {
  772. .parent = "dpll4_m5_ck",
  773. .div = 1,
  774. .mult = 2,
  775. .flags = CLKF_SET_RATE_PARENT,
  776. };
  777. static struct ti_clk dpll4_m5x2_mul_ck = {
  778. .name = "dpll4_m5x2_mul_ck",
  779. .type = TI_CLK_FIXED_FACTOR,
  780. .data = &dpll4_m5x2_mul_ck_data,
  781. };
  782. static struct ti_clk_gate dpll4_m5x2_ck_data = {
  783. .parent = "dpll4_m5x2_mul_ck",
  784. .bit_shift = 0x1e,
  785. .reg = 0xd00,
  786. .module = TI_CLKM_CM,
  787. .flags = CLKF_SET_BIT_TO_DISABLE,
  788. };
  789. static struct ti_clk dpll4_m5x2_ck = {
  790. .name = "dpll4_m5x2_ck",
  791. .type = TI_CLK_GATE,
  792. .data = &dpll4_m5x2_ck_data,
  793. };
  794. static struct ti_clk_gate cam_mclk_data = {
  795. .parent = "dpll4_m5x2_ck",
  796. .bit_shift = 0,
  797. .reg = 0xf00,
  798. .module = TI_CLKM_CM,
  799. .flags = CLKF_SET_RATE_PARENT,
  800. };
  801. static struct ti_clk cam_mclk = {
  802. .name = "cam_mclk",
  803. .type = TI_CLK_GATE,
  804. .data = &cam_mclk_data,
  805. };
  806. static struct ti_clk_gate mcbsp3_gate_fck_data = {
  807. .parent = "mcbsp_clks",
  808. .bit_shift = 1,
  809. .reg = 0x1000,
  810. .module = TI_CLKM_CM,
  811. };
  812. static const char *mcbsp3_mux_fck_parents[] = {
  813. "per_96m_fck",
  814. "mcbsp_clks",
  815. };
  816. static struct ti_clk_mux mcbsp3_mux_fck_data = {
  817. .num_parents = ARRAY_SIZE(mcbsp3_mux_fck_parents),
  818. .reg = 0x2d8,
  819. .module = TI_CLKM_SCRM,
  820. .parents = mcbsp3_mux_fck_parents,
  821. };
  822. static struct ti_clk_composite mcbsp3_fck_data = {
  823. .mux = &mcbsp3_mux_fck_data,
  824. .gate = &mcbsp3_gate_fck_data,
  825. };
  826. static struct ti_clk mcbsp3_fck = {
  827. .name = "mcbsp3_fck",
  828. .type = TI_CLK_COMPOSITE,
  829. .data = &mcbsp3_fck_data,
  830. };
  831. static struct ti_clk_gate csi2_96m_fck_data = {
  832. .parent = "core_96m_fck",
  833. .bit_shift = 1,
  834. .reg = 0xf00,
  835. .module = TI_CLKM_CM,
  836. };
  837. static struct ti_clk csi2_96m_fck = {
  838. .name = "csi2_96m_fck",
  839. .clkdm_name = "cam_clkdm",
  840. .type = TI_CLK_GATE,
  841. .data = &csi2_96m_fck_data,
  842. };
  843. static struct ti_clk_gate gpt9_gate_fck_data = {
  844. .parent = "sys_ck",
  845. .bit_shift = 10,
  846. .reg = 0x1000,
  847. .module = TI_CLKM_CM,
  848. };
  849. static const char *gpt9_mux_fck_parents[] = {
  850. "omap_32k_fck",
  851. "sys_ck",
  852. };
  853. static struct ti_clk_mux gpt9_mux_fck_data = {
  854. .bit_shift = 7,
  855. .num_parents = ARRAY_SIZE(gpt9_mux_fck_parents),
  856. .reg = 0x1040,
  857. .module = TI_CLKM_CM,
  858. .parents = gpt9_mux_fck_parents,
  859. };
  860. static struct ti_clk_composite gpt9_fck_data = {
  861. .mux = &gpt9_mux_fck_data,
  862. .gate = &gpt9_gate_fck_data,
  863. };
  864. static struct ti_clk gpt9_fck = {
  865. .name = "gpt9_fck",
  866. .type = TI_CLK_COMPOSITE,
  867. .data = &gpt9_fck_data,
  868. };
  869. static struct ti_clk_divider dpll3_m3_ck_data = {
  870. .parent = "dpll3_ck",
  871. .bit_shift = 16,
  872. .max_div = 31,
  873. .reg = 0x1140,
  874. .module = TI_CLKM_CM,
  875. .flags = CLKF_INDEX_STARTS_AT_ONE,
  876. };
  877. static struct ti_clk dpll3_m3_ck = {
  878. .name = "dpll3_m3_ck",
  879. .type = TI_CLK_DIVIDER,
  880. .data = &dpll3_m3_ck_data,
  881. };
  882. static struct ti_clk_fixed_factor dpll3_m3x2_mul_ck_data = {
  883. .parent = "dpll3_m3_ck",
  884. .div = 1,
  885. .mult = 2,
  886. };
  887. static struct ti_clk dpll3_m3x2_mul_ck = {
  888. .name = "dpll3_m3x2_mul_ck",
  889. .type = TI_CLK_FIXED_FACTOR,
  890. .data = &dpll3_m3x2_mul_ck_data,
  891. };
  892. static struct ti_clk_gate sr2_fck_data = {
  893. .parent = "sys_ck",
  894. .bit_shift = 7,
  895. .reg = 0xc00,
  896. .module = TI_CLKM_CM,
  897. .flags = CLKF_WAIT,
  898. };
  899. static struct ti_clk sr2_fck = {
  900. .name = "sr2_fck",
  901. .clkdm_name = "wkup_clkdm",
  902. .type = TI_CLK_GATE,
  903. .data = &sr2_fck_data,
  904. };
  905. static struct ti_clk_fixed pclk_ck_data = {
  906. .frequency = 27000000,
  907. };
  908. static struct ti_clk pclk_ck = {
  909. .name = "pclk_ck",
  910. .type = TI_CLK_FIXED,
  911. .data = &pclk_ck_data,
  912. };
  913. static struct ti_clk_gate wdt2_ick_data = {
  914. .parent = "wkup_l4_ick",
  915. .bit_shift = 5,
  916. .reg = 0xc10,
  917. .module = TI_CLKM_CM,
  918. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  919. };
  920. static struct ti_clk wdt2_ick = {
  921. .name = "wdt2_ick",
  922. .clkdm_name = "wkup_clkdm",
  923. .type = TI_CLK_GATE,
  924. .data = &wdt2_ick_data,
  925. };
  926. static struct ti_clk_fixed_factor core_l3_ick_data = {
  927. .parent = "l3_ick",
  928. .div = 1,
  929. .mult = 1,
  930. };
  931. static struct ti_clk core_l3_ick = {
  932. .name = "core_l3_ick",
  933. .type = TI_CLK_FIXED_FACTOR,
  934. .data = &core_l3_ick_data,
  935. };
  936. static struct ti_clk_gate mcspi4_fck_data = {
  937. .parent = "core_48m_fck",
  938. .bit_shift = 21,
  939. .reg = 0xa00,
  940. .module = TI_CLKM_CM,
  941. .flags = CLKF_WAIT,
  942. };
  943. static struct ti_clk mcspi4_fck = {
  944. .name = "mcspi4_fck",
  945. .clkdm_name = "core_l4_clkdm",
  946. .type = TI_CLK_GATE,
  947. .data = &mcspi4_fck_data,
  948. };
  949. static struct ti_clk_fixed_factor per_48m_fck_data = {
  950. .parent = "omap_48m_fck",
  951. .div = 1,
  952. .mult = 1,
  953. };
  954. static struct ti_clk per_48m_fck = {
  955. .name = "per_48m_fck",
  956. .type = TI_CLK_FIXED_FACTOR,
  957. .data = &per_48m_fck_data,
  958. };
  959. static struct ti_clk_gate uart4_fck_data = {
  960. .parent = "per_48m_fck",
  961. .bit_shift = 18,
  962. .reg = 0x1000,
  963. .module = TI_CLKM_CM,
  964. .flags = CLKF_WAIT,
  965. };
  966. static struct ti_clk uart4_fck = {
  967. .name = "uart4_fck",
  968. .clkdm_name = "per_clkdm",
  969. .type = TI_CLK_GATE,
  970. .data = &uart4_fck_data,
  971. };
  972. static struct ti_clk_fixed_factor omap_96m_d10_fck_data = {
  973. .parent = "omap_96m_fck",
  974. .div = 10,
  975. .mult = 1,
  976. };
  977. static struct ti_clk omap_96m_d10_fck = {
  978. .name = "omap_96m_d10_fck",
  979. .type = TI_CLK_FIXED_FACTOR,
  980. .data = &omap_96m_d10_fck_data,
  981. };
  982. static struct ti_clk_gate usim_gate_fck_data = {
  983. .parent = "omap_96m_fck",
  984. .bit_shift = 9,
  985. .reg = 0xc00,
  986. .module = TI_CLKM_CM,
  987. };
  988. static struct ti_clk_fixed_factor per_l4_ick_data = {
  989. .parent = "l4_ick",
  990. .div = 1,
  991. .mult = 1,
  992. };
  993. static struct ti_clk per_l4_ick = {
  994. .name = "per_l4_ick",
  995. .type = TI_CLK_FIXED_FACTOR,
  996. .data = &per_l4_ick_data,
  997. };
  998. static struct ti_clk_gate gpt5_ick_data = {
  999. .parent = "per_l4_ick",
  1000. .bit_shift = 6,
  1001. .reg = 0x1010,
  1002. .module = TI_CLKM_CM,
  1003. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1004. };
  1005. static struct ti_clk gpt5_ick = {
  1006. .name = "gpt5_ick",
  1007. .clkdm_name = "per_clkdm",
  1008. .type = TI_CLK_GATE,
  1009. .data = &gpt5_ick_data,
  1010. };
  1011. static struct ti_clk_gate mcspi2_ick_data = {
  1012. .parent = "core_l4_ick",
  1013. .bit_shift = 19,
  1014. .reg = 0xa10,
  1015. .module = TI_CLKM_CM,
  1016. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1017. };
  1018. static struct ti_clk mcspi2_ick = {
  1019. .name = "mcspi2_ick",
  1020. .clkdm_name = "core_l4_clkdm",
  1021. .type = TI_CLK_GATE,
  1022. .data = &mcspi2_ick_data,
  1023. };
  1024. static struct ti_clk_fixed_factor ssi_l4_ick_data = {
  1025. .parent = "l4_ick",
  1026. .div = 1,
  1027. .mult = 1,
  1028. };
  1029. static struct ti_clk ssi_l4_ick = {
  1030. .name = "ssi_l4_ick",
  1031. .clkdm_name = "core_l4_clkdm",
  1032. .type = TI_CLK_FIXED_FACTOR,
  1033. .data = &ssi_l4_ick_data,
  1034. };
  1035. static struct ti_clk_gate ssi_ick_3430es1_data = {
  1036. .parent = "ssi_l4_ick",
  1037. .bit_shift = 0,
  1038. .reg = 0xa10,
  1039. .module = TI_CLKM_CM,
  1040. .flags = CLKF_OMAP3 | CLKF_NO_WAIT | CLKF_INTERFACE,
  1041. };
  1042. static struct ti_clk ssi_ick_3430es1 = {
  1043. .name = "ssi_ick",
  1044. .clkdm_name = "core_l4_clkdm",
  1045. .type = TI_CLK_GATE,
  1046. .data = &ssi_ick_3430es1_data,
  1047. };
  1048. static struct ti_clk_gate i2c2_fck_data = {
  1049. .parent = "core_96m_fck",
  1050. .bit_shift = 16,
  1051. .reg = 0xa00,
  1052. .module = TI_CLKM_CM,
  1053. .flags = CLKF_WAIT,
  1054. };
  1055. static struct ti_clk i2c2_fck = {
  1056. .name = "i2c2_fck",
  1057. .clkdm_name = "core_l4_clkdm",
  1058. .type = TI_CLK_GATE,
  1059. .data = &i2c2_fck_data,
  1060. };
  1061. static struct ti_clk_divider dpll1_fck_data = {
  1062. .parent = "core_ck",
  1063. .bit_shift = 19,
  1064. .max_div = 7,
  1065. .reg = 0x940,
  1066. .module = TI_CLKM_CM,
  1067. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1068. };
  1069. static struct ti_clk dpll1_fck = {
  1070. .name = "dpll1_fck",
  1071. .type = TI_CLK_DIVIDER,
  1072. .data = &dpll1_fck_data,
  1073. };
  1074. static const char *dpll1_ck_parents[] = {
  1075. "sys_ck",
  1076. "dpll1_fck",
  1077. };
  1078. static struct ti_clk_dpll dpll1_ck_data = {
  1079. .num_parents = ARRAY_SIZE(dpll1_ck_parents),
  1080. .control_reg = 0x904,
  1081. .idlest_reg = 0x924,
  1082. .mult_div1_reg = 0x940,
  1083. .autoidle_reg = 0x934,
  1084. .module = TI_CLKM_CM,
  1085. .parents = dpll1_ck_parents,
  1086. .freqsel_mask = 0xf0,
  1087. .modes = 0xa0,
  1088. .div1_mask = 0x7f,
  1089. .idlest_mask = 0x1,
  1090. .auto_recal_bit = 0x3,
  1091. .max_divider = 0x80,
  1092. .min_divider = 0x1,
  1093. .recal_en_bit = 0x7,
  1094. .max_multiplier = 0x7ff,
  1095. .enable_mask = 0x7,
  1096. .mult_mask = 0x7ff00,
  1097. .recal_st_bit = 0x7,
  1098. .autoidle_mask = 0x7,
  1099. };
  1100. static struct ti_clk dpll1_ck = {
  1101. .name = "dpll1_ck",
  1102. .clkdm_name = "dpll1_clkdm",
  1103. .type = TI_CLK_DPLL,
  1104. .data = &dpll1_ck_data,
  1105. };
  1106. static struct ti_clk_fixed secure_32k_fck_data = {
  1107. .frequency = 32768,
  1108. };
  1109. static struct ti_clk secure_32k_fck = {
  1110. .name = "secure_32k_fck",
  1111. .type = TI_CLK_FIXED,
  1112. .data = &secure_32k_fck_data,
  1113. };
  1114. static struct ti_clk_gate gpio5_ick_data = {
  1115. .parent = "per_l4_ick",
  1116. .bit_shift = 16,
  1117. .reg = 0x1010,
  1118. .module = TI_CLKM_CM,
  1119. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1120. };
  1121. static struct ti_clk gpio5_ick = {
  1122. .name = "gpio5_ick",
  1123. .clkdm_name = "per_clkdm",
  1124. .type = TI_CLK_GATE,
  1125. .data = &gpio5_ick_data,
  1126. };
  1127. static struct ti_clk_divider dpll4_m4_ck_data = {
  1128. .parent = "dpll4_ck",
  1129. .max_div = 32,
  1130. .reg = 0xe40,
  1131. .module = TI_CLKM_CM,
  1132. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1133. };
  1134. static struct ti_clk dpll4_m4_ck = {
  1135. .name = "dpll4_m4_ck",
  1136. .type = TI_CLK_DIVIDER,
  1137. .data = &dpll4_m4_ck_data,
  1138. };
  1139. static struct ti_clk_fixed_factor dpll4_m4x2_mul_ck_data = {
  1140. .parent = "dpll4_m4_ck",
  1141. .div = 1,
  1142. .mult = 2,
  1143. .flags = CLKF_SET_RATE_PARENT,
  1144. };
  1145. static struct ti_clk dpll4_m4x2_mul_ck = {
  1146. .name = "dpll4_m4x2_mul_ck",
  1147. .type = TI_CLK_FIXED_FACTOR,
  1148. .data = &dpll4_m4x2_mul_ck_data,
  1149. };
  1150. static struct ti_clk_gate dpll4_m4x2_ck_data = {
  1151. .parent = "dpll4_m4x2_mul_ck",
  1152. .bit_shift = 0x1d,
  1153. .reg = 0xd00,
  1154. .module = TI_CLKM_CM,
  1155. .flags = CLKF_SET_RATE_PARENT | CLKF_SET_BIT_TO_DISABLE,
  1156. };
  1157. static struct ti_clk dpll4_m4x2_ck = {
  1158. .name = "dpll4_m4x2_ck",
  1159. .type = TI_CLK_GATE,
  1160. .data = &dpll4_m4x2_ck_data,
  1161. };
  1162. static struct ti_clk_gate dss1_alwon_fck_3430es2_data = {
  1163. .parent = "dpll4_m4x2_ck",
  1164. .bit_shift = 0,
  1165. .reg = 0xe00,
  1166. .module = TI_CLKM_CM,
  1167. .flags = CLKF_DSS | CLKF_SET_RATE_PARENT,
  1168. };
  1169. static struct ti_clk dss1_alwon_fck_3430es2 = {
  1170. .name = "dss1_alwon_fck",
  1171. .clkdm_name = "dss_clkdm",
  1172. .type = TI_CLK_GATE,
  1173. .data = &dss1_alwon_fck_3430es2_data,
  1174. };
  1175. static struct ti_clk_gate uart3_ick_data = {
  1176. .parent = "per_l4_ick",
  1177. .bit_shift = 11,
  1178. .reg = 0x1010,
  1179. .module = TI_CLKM_CM,
  1180. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1181. };
  1182. static struct ti_clk uart3_ick = {
  1183. .name = "uart3_ick",
  1184. .clkdm_name = "per_clkdm",
  1185. .type = TI_CLK_GATE,
  1186. .data = &uart3_ick_data,
  1187. };
  1188. static struct ti_clk_divider dpll4_m3_ck_data = {
  1189. .parent = "dpll4_ck",
  1190. .bit_shift = 8,
  1191. .max_div = 32,
  1192. .reg = 0xe40,
  1193. .module = TI_CLKM_CM,
  1194. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1195. };
  1196. static struct ti_clk dpll4_m3_ck = {
  1197. .name = "dpll4_m3_ck",
  1198. .type = TI_CLK_DIVIDER,
  1199. .data = &dpll4_m3_ck_data,
  1200. };
  1201. static struct ti_clk_gate mcbsp3_ick_data = {
  1202. .parent = "per_l4_ick",
  1203. .bit_shift = 1,
  1204. .reg = 0x1010,
  1205. .module = TI_CLKM_CM,
  1206. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1207. };
  1208. static struct ti_clk mcbsp3_ick = {
  1209. .name = "mcbsp3_ick",
  1210. .clkdm_name = "per_clkdm",
  1211. .type = TI_CLK_GATE,
  1212. .data = &mcbsp3_ick_data,
  1213. };
  1214. static struct ti_clk_gate gpio3_dbck_data = {
  1215. .parent = "per_32k_alwon_fck",
  1216. .bit_shift = 14,
  1217. .reg = 0x1000,
  1218. .module = TI_CLKM_CM,
  1219. };
  1220. static struct ti_clk gpio3_dbck = {
  1221. .name = "gpio3_dbck",
  1222. .clkdm_name = "per_clkdm",
  1223. .type = TI_CLK_GATE,
  1224. .data = &gpio3_dbck_data,
  1225. };
  1226. static struct ti_clk_gate fac_ick_data = {
  1227. .parent = "core_l4_ick",
  1228. .bit_shift = 8,
  1229. .reg = 0xa10,
  1230. .module = TI_CLKM_CM,
  1231. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1232. };
  1233. static struct ti_clk fac_ick = {
  1234. .name = "fac_ick",
  1235. .clkdm_name = "core_l4_clkdm",
  1236. .type = TI_CLK_GATE,
  1237. .data = &fac_ick_data,
  1238. };
  1239. static struct ti_clk_gate clkout2_src_gate_ck_data = {
  1240. .parent = "core_ck",
  1241. .bit_shift = 7,
  1242. .reg = 0xd70,
  1243. .module = TI_CLKM_CM,
  1244. .flags = CLKF_NO_WAIT,
  1245. };
  1246. static struct ti_clk_fixed_factor dpll4_m3x2_mul_ck_data = {
  1247. .parent = "dpll4_m3_ck",
  1248. .div = 1,
  1249. .mult = 2,
  1250. };
  1251. static struct ti_clk dpll4_m3x2_mul_ck = {
  1252. .name = "dpll4_m3x2_mul_ck",
  1253. .type = TI_CLK_FIXED_FACTOR,
  1254. .data = &dpll4_m3x2_mul_ck_data,
  1255. };
  1256. static struct ti_clk_gate dpll4_m3x2_ck_data = {
  1257. .parent = "dpll4_m3x2_mul_ck",
  1258. .bit_shift = 0x1c,
  1259. .reg = 0xd00,
  1260. .module = TI_CLKM_CM,
  1261. .flags = CLKF_SET_BIT_TO_DISABLE,
  1262. };
  1263. static struct ti_clk dpll4_m3x2_ck = {
  1264. .name = "dpll4_m3x2_ck",
  1265. .type = TI_CLK_GATE,
  1266. .data = &dpll4_m3x2_ck_data,
  1267. };
  1268. static const char *omap_54m_fck_parents[] = {
  1269. "dpll4_m3x2_ck",
  1270. "sys_altclk",
  1271. };
  1272. static struct ti_clk_mux omap_54m_fck_data = {
  1273. .bit_shift = 5,
  1274. .num_parents = ARRAY_SIZE(omap_54m_fck_parents),
  1275. .reg = 0xd40,
  1276. .module = TI_CLKM_CM,
  1277. .parents = omap_54m_fck_parents,
  1278. };
  1279. static struct ti_clk omap_54m_fck = {
  1280. .name = "omap_54m_fck",
  1281. .type = TI_CLK_MUX,
  1282. .data = &omap_54m_fck_data,
  1283. };
  1284. static const char *clkout2_src_mux_ck_parents[] = {
  1285. "core_ck",
  1286. "sys_ck",
  1287. "cm_96m_fck",
  1288. "omap_54m_fck",
  1289. };
  1290. static struct ti_clk_mux clkout2_src_mux_ck_data = {
  1291. .num_parents = ARRAY_SIZE(clkout2_src_mux_ck_parents),
  1292. .reg = 0xd70,
  1293. .module = TI_CLKM_CM,
  1294. .parents = clkout2_src_mux_ck_parents,
  1295. };
  1296. static struct ti_clk_composite clkout2_src_ck_data = {
  1297. .mux = &clkout2_src_mux_ck_data,
  1298. .gate = &clkout2_src_gate_ck_data,
  1299. };
  1300. static struct ti_clk clkout2_src_ck = {
  1301. .name = "clkout2_src_ck",
  1302. .type = TI_CLK_COMPOSITE,
  1303. .data = &clkout2_src_ck_data,
  1304. };
  1305. static struct ti_clk_gate i2c1_fck_data = {
  1306. .parent = "core_96m_fck",
  1307. .bit_shift = 15,
  1308. .reg = 0xa00,
  1309. .module = TI_CLKM_CM,
  1310. .flags = CLKF_WAIT,
  1311. };
  1312. static struct ti_clk i2c1_fck = {
  1313. .name = "i2c1_fck",
  1314. .clkdm_name = "core_l4_clkdm",
  1315. .type = TI_CLK_GATE,
  1316. .data = &i2c1_fck_data,
  1317. };
  1318. static struct ti_clk_gate wdt3_fck_data = {
  1319. .parent = "per_32k_alwon_fck",
  1320. .bit_shift = 12,
  1321. .reg = 0x1000,
  1322. .module = TI_CLKM_CM,
  1323. .flags = CLKF_WAIT,
  1324. };
  1325. static struct ti_clk wdt3_fck = {
  1326. .name = "wdt3_fck",
  1327. .clkdm_name = "per_clkdm",
  1328. .type = TI_CLK_GATE,
  1329. .data = &wdt3_fck_data,
  1330. };
  1331. static struct ti_clk_gate gpt7_gate_fck_data = {
  1332. .parent = "sys_ck",
  1333. .bit_shift = 8,
  1334. .reg = 0x1000,
  1335. .module = TI_CLKM_CM,
  1336. };
  1337. static const char *gpt7_mux_fck_parents[] = {
  1338. "omap_32k_fck",
  1339. "sys_ck",
  1340. };
  1341. static struct ti_clk_mux gpt7_mux_fck_data = {
  1342. .bit_shift = 5,
  1343. .num_parents = ARRAY_SIZE(gpt7_mux_fck_parents),
  1344. .reg = 0x1040,
  1345. .module = TI_CLKM_CM,
  1346. .parents = gpt7_mux_fck_parents,
  1347. };
  1348. static struct ti_clk_composite gpt7_fck_data = {
  1349. .mux = &gpt7_mux_fck_data,
  1350. .gate = &gpt7_gate_fck_data,
  1351. };
  1352. static struct ti_clk gpt7_fck = {
  1353. .name = "gpt7_fck",
  1354. .type = TI_CLK_COMPOSITE,
  1355. .data = &gpt7_fck_data,
  1356. };
  1357. static struct ti_clk_gate usb_l4_gate_ick_data = {
  1358. .parent = "l4_ick",
  1359. .bit_shift = 5,
  1360. .reg = 0xa10,
  1361. .module = TI_CLKM_CM,
  1362. .flags = CLKF_INTERFACE,
  1363. };
  1364. static struct ti_clk_divider usb_l4_div_ick_data = {
  1365. .parent = "l4_ick",
  1366. .bit_shift = 4,
  1367. .max_div = 1,
  1368. .reg = 0xa40,
  1369. .module = TI_CLKM_CM,
  1370. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1371. };
  1372. static struct ti_clk_composite usb_l4_ick_data = {
  1373. .gate = &usb_l4_gate_ick_data,
  1374. .divider = &usb_l4_div_ick_data,
  1375. };
  1376. static struct ti_clk usb_l4_ick = {
  1377. .name = "usb_l4_ick",
  1378. .type = TI_CLK_COMPOSITE,
  1379. .data = &usb_l4_ick_data,
  1380. };
  1381. static struct ti_clk_gate uart4_ick_data = {
  1382. .parent = "per_l4_ick",
  1383. .bit_shift = 18,
  1384. .reg = 0x1010,
  1385. .module = TI_CLKM_CM,
  1386. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1387. };
  1388. static struct ti_clk uart4_ick = {
  1389. .name = "uart4_ick",
  1390. .clkdm_name = "per_clkdm",
  1391. .type = TI_CLK_GATE,
  1392. .data = &uart4_ick_data,
  1393. };
  1394. static struct ti_clk_fixed dummy_ck_data = {
  1395. .frequency = 0,
  1396. };
  1397. static struct ti_clk dummy_ck = {
  1398. .name = "dummy_ck",
  1399. .type = TI_CLK_FIXED,
  1400. .data = &dummy_ck_data,
  1401. };
  1402. static const char *gpt3_mux_fck_parents[] = {
  1403. "omap_32k_fck",
  1404. "sys_ck",
  1405. };
  1406. static struct ti_clk_mux gpt3_mux_fck_data = {
  1407. .bit_shift = 1,
  1408. .num_parents = ARRAY_SIZE(gpt3_mux_fck_parents),
  1409. .reg = 0x1040,
  1410. .module = TI_CLKM_CM,
  1411. .parents = gpt3_mux_fck_parents,
  1412. };
  1413. static struct ti_clk_gate gpt9_ick_data = {
  1414. .parent = "per_l4_ick",
  1415. .bit_shift = 10,
  1416. .reg = 0x1010,
  1417. .module = TI_CLKM_CM,
  1418. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1419. };
  1420. static struct ti_clk gpt9_ick = {
  1421. .name = "gpt9_ick",
  1422. .clkdm_name = "per_clkdm",
  1423. .type = TI_CLK_GATE,
  1424. .data = &gpt9_ick_data,
  1425. };
  1426. static struct ti_clk_gate gpt10_gate_fck_data = {
  1427. .parent = "sys_ck",
  1428. .bit_shift = 11,
  1429. .reg = 0xa00,
  1430. .module = TI_CLKM_CM,
  1431. };
  1432. static struct ti_clk_gate dss_ick_3430es1_data = {
  1433. .parent = "l4_ick",
  1434. .bit_shift = 0,
  1435. .reg = 0xe10,
  1436. .module = TI_CLKM_CM,
  1437. .flags = CLKF_OMAP3 | CLKF_NO_WAIT | CLKF_INTERFACE,
  1438. };
  1439. static struct ti_clk dss_ick_3430es1 = {
  1440. .name = "dss_ick",
  1441. .clkdm_name = "dss_clkdm",
  1442. .type = TI_CLK_GATE,
  1443. .data = &dss_ick_3430es1_data,
  1444. };
  1445. static struct ti_clk_gate gpt11_ick_data = {
  1446. .parent = "core_l4_ick",
  1447. .bit_shift = 12,
  1448. .reg = 0xa10,
  1449. .module = TI_CLKM_CM,
  1450. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1451. };
  1452. static struct ti_clk gpt11_ick = {
  1453. .name = "gpt11_ick",
  1454. .clkdm_name = "core_l4_clkdm",
  1455. .type = TI_CLK_GATE,
  1456. .data = &gpt11_ick_data,
  1457. };
  1458. static struct ti_clk_divider dpll2_fck_data = {
  1459. .parent = "core_ck",
  1460. .bit_shift = 19,
  1461. .max_div = 7,
  1462. .reg = 0x40,
  1463. .module = TI_CLKM_CM,
  1464. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1465. };
  1466. static struct ti_clk dpll2_fck = {
  1467. .name = "dpll2_fck",
  1468. .type = TI_CLK_DIVIDER,
  1469. .data = &dpll2_fck_data,
  1470. };
  1471. static struct ti_clk_gate uart1_fck_data = {
  1472. .parent = "core_48m_fck",
  1473. .bit_shift = 13,
  1474. .reg = 0xa00,
  1475. .module = TI_CLKM_CM,
  1476. .flags = CLKF_WAIT,
  1477. };
  1478. static struct ti_clk uart1_fck = {
  1479. .name = "uart1_fck",
  1480. .clkdm_name = "core_l4_clkdm",
  1481. .type = TI_CLK_GATE,
  1482. .data = &uart1_fck_data,
  1483. };
  1484. static struct ti_clk_gate hsotgusb_ick_3430es1_data = {
  1485. .parent = "core_l3_ick",
  1486. .bit_shift = 4,
  1487. .reg = 0xa10,
  1488. .module = TI_CLKM_CM,
  1489. .flags = CLKF_OMAP3 | CLKF_NO_WAIT | CLKF_INTERFACE,
  1490. };
  1491. static struct ti_clk hsotgusb_ick_3430es1 = {
  1492. .name = "hsotgusb_ick_3430es1",
  1493. .clkdm_name = "core_l3_clkdm",
  1494. .type = TI_CLK_GATE,
  1495. .data = &hsotgusb_ick_3430es1_data,
  1496. };
  1497. static struct ti_clk_gate gpio2_ick_data = {
  1498. .parent = "per_l4_ick",
  1499. .bit_shift = 13,
  1500. .reg = 0x1010,
  1501. .module = TI_CLKM_CM,
  1502. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1503. };
  1504. static struct ti_clk gpio2_ick = {
  1505. .name = "gpio2_ick",
  1506. .clkdm_name = "per_clkdm",
  1507. .type = TI_CLK_GATE,
  1508. .data = &gpio2_ick_data,
  1509. };
  1510. static struct ti_clk_gate mmchs1_ick_data = {
  1511. .parent = "core_l4_ick",
  1512. .bit_shift = 24,
  1513. .reg = 0xa10,
  1514. .module = TI_CLKM_CM,
  1515. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1516. };
  1517. static struct ti_clk mmchs1_ick = {
  1518. .name = "mmchs1_ick",
  1519. .clkdm_name = "core_l4_clkdm",
  1520. .type = TI_CLK_GATE,
  1521. .data = &mmchs1_ick_data,
  1522. };
  1523. static struct ti_clk_gate modem_fck_data = {
  1524. .parent = "sys_ck",
  1525. .bit_shift = 31,
  1526. .reg = 0xa00,
  1527. .module = TI_CLKM_CM,
  1528. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1529. };
  1530. static struct ti_clk modem_fck = {
  1531. .name = "modem_fck",
  1532. .clkdm_name = "d2d_clkdm",
  1533. .type = TI_CLK_GATE,
  1534. .data = &modem_fck_data,
  1535. };
  1536. static struct ti_clk_gate mcbsp4_ick_data = {
  1537. .parent = "per_l4_ick",
  1538. .bit_shift = 2,
  1539. .reg = 0x1010,
  1540. .module = TI_CLKM_CM,
  1541. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1542. };
  1543. static struct ti_clk mcbsp4_ick = {
  1544. .name = "mcbsp4_ick",
  1545. .clkdm_name = "per_clkdm",
  1546. .type = TI_CLK_GATE,
  1547. .data = &mcbsp4_ick_data,
  1548. };
  1549. static struct ti_clk_gate gpio1_ick_data = {
  1550. .parent = "wkup_l4_ick",
  1551. .bit_shift = 3,
  1552. .reg = 0xc10,
  1553. .module = TI_CLKM_CM,
  1554. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1555. };
  1556. static struct ti_clk gpio1_ick = {
  1557. .name = "gpio1_ick",
  1558. .clkdm_name = "wkup_clkdm",
  1559. .type = TI_CLK_GATE,
  1560. .data = &gpio1_ick_data,
  1561. };
  1562. static const char *gpt6_mux_fck_parents[] = {
  1563. "omap_32k_fck",
  1564. "sys_ck",
  1565. };
  1566. static struct ti_clk_mux gpt6_mux_fck_data = {
  1567. .bit_shift = 4,
  1568. .num_parents = ARRAY_SIZE(gpt6_mux_fck_parents),
  1569. .reg = 0x1040,
  1570. .module = TI_CLKM_CM,
  1571. .parents = gpt6_mux_fck_parents,
  1572. };
  1573. static struct ti_clk_fixed_factor dpll1_x2_ck_data = {
  1574. .parent = "dpll1_ck",
  1575. .div = 1,
  1576. .mult = 2,
  1577. };
  1578. static struct ti_clk dpll1_x2_ck = {
  1579. .name = "dpll1_x2_ck",
  1580. .type = TI_CLK_FIXED_FACTOR,
  1581. .data = &dpll1_x2_ck_data,
  1582. };
  1583. static struct ti_clk_divider dpll1_x2m2_ck_data = {
  1584. .parent = "dpll1_x2_ck",
  1585. .max_div = 31,
  1586. .reg = 0x944,
  1587. .module = TI_CLKM_CM,
  1588. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1589. };
  1590. static struct ti_clk dpll1_x2m2_ck = {
  1591. .name = "dpll1_x2m2_ck",
  1592. .type = TI_CLK_DIVIDER,
  1593. .data = &dpll1_x2m2_ck_data,
  1594. };
  1595. static struct ti_clk_fixed_factor mpu_ck_data = {
  1596. .parent = "dpll1_x2m2_ck",
  1597. .div = 1,
  1598. .mult = 1,
  1599. };
  1600. static struct ti_clk mpu_ck = {
  1601. .name = "mpu_ck",
  1602. .type = TI_CLK_FIXED_FACTOR,
  1603. .data = &mpu_ck_data,
  1604. };
  1605. static struct ti_clk_divider arm_fck_data = {
  1606. .parent = "mpu_ck",
  1607. .max_div = 2,
  1608. .reg = 0x924,
  1609. .module = TI_CLKM_CM,
  1610. };
  1611. static struct ti_clk arm_fck = {
  1612. .name = "arm_fck",
  1613. .type = TI_CLK_DIVIDER,
  1614. .data = &arm_fck_data,
  1615. };
  1616. static struct ti_clk_fixed_factor core_d3_ck_data = {
  1617. .parent = "core_ck",
  1618. .div = 3,
  1619. .mult = 1,
  1620. };
  1621. static struct ti_clk core_d3_ck = {
  1622. .name = "core_d3_ck",
  1623. .type = TI_CLK_FIXED_FACTOR,
  1624. .data = &core_d3_ck_data,
  1625. };
  1626. static struct ti_clk_gate gpt11_gate_fck_data = {
  1627. .parent = "sys_ck",
  1628. .bit_shift = 12,
  1629. .reg = 0xa00,
  1630. .module = TI_CLKM_CM,
  1631. };
  1632. static const char *gpt11_mux_fck_parents[] = {
  1633. "omap_32k_fck",
  1634. "sys_ck",
  1635. };
  1636. static struct ti_clk_mux gpt11_mux_fck_data = {
  1637. .bit_shift = 7,
  1638. .num_parents = ARRAY_SIZE(gpt11_mux_fck_parents),
  1639. .reg = 0xa40,
  1640. .module = TI_CLKM_CM,
  1641. .parents = gpt11_mux_fck_parents,
  1642. };
  1643. static struct ti_clk_composite gpt11_fck_data = {
  1644. .mux = &gpt11_mux_fck_data,
  1645. .gate = &gpt11_gate_fck_data,
  1646. };
  1647. static struct ti_clk gpt11_fck = {
  1648. .name = "gpt11_fck",
  1649. .type = TI_CLK_COMPOSITE,
  1650. .data = &gpt11_fck_data,
  1651. };
  1652. static struct ti_clk_fixed_factor core_d6_ck_data = {
  1653. .parent = "core_ck",
  1654. .div = 6,
  1655. .mult = 1,
  1656. };
  1657. static struct ti_clk core_d6_ck = {
  1658. .name = "core_d6_ck",
  1659. .type = TI_CLK_FIXED_FACTOR,
  1660. .data = &core_d6_ck_data,
  1661. };
  1662. static struct ti_clk_gate uart4_fck_am35xx_data = {
  1663. .parent = "core_48m_fck",
  1664. .bit_shift = 23,
  1665. .reg = 0xa00,
  1666. .module = TI_CLKM_CM,
  1667. .flags = CLKF_WAIT,
  1668. };
  1669. static struct ti_clk uart4_fck_am35xx = {
  1670. .name = "uart4_fck_am35xx",
  1671. .clkdm_name = "core_l4_clkdm",
  1672. .type = TI_CLK_GATE,
  1673. .data = &uart4_fck_am35xx_data,
  1674. };
  1675. static struct ti_clk_gate dpll3_m3x2_ck_data = {
  1676. .parent = "dpll3_m3x2_mul_ck",
  1677. .bit_shift = 0xc,
  1678. .reg = 0xd00,
  1679. .module = TI_CLKM_CM,
  1680. .flags = CLKF_SET_BIT_TO_DISABLE,
  1681. };
  1682. static struct ti_clk dpll3_m3x2_ck = {
  1683. .name = "dpll3_m3x2_ck",
  1684. .type = TI_CLK_GATE,
  1685. .data = &dpll3_m3x2_ck_data,
  1686. };
  1687. static struct ti_clk_fixed_factor emu_core_alwon_ck_data = {
  1688. .parent = "dpll3_m3x2_ck",
  1689. .div = 1,
  1690. .mult = 1,
  1691. };
  1692. static struct ti_clk emu_core_alwon_ck = {
  1693. .name = "emu_core_alwon_ck",
  1694. .type = TI_CLK_FIXED_FACTOR,
  1695. .data = &emu_core_alwon_ck_data,
  1696. };
  1697. static struct ti_clk_divider dpll4_m6_ck_data = {
  1698. .parent = "dpll4_ck",
  1699. .bit_shift = 24,
  1700. .max_div = 63,
  1701. .reg = 0x1140,
  1702. .module = TI_CLKM_CM,
  1703. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1704. };
  1705. static struct ti_clk dpll4_m6_ck = {
  1706. .name = "dpll4_m6_ck",
  1707. .type = TI_CLK_DIVIDER,
  1708. .data = &dpll4_m6_ck_data,
  1709. };
  1710. static struct ti_clk_fixed_factor dpll4_m6x2_mul_ck_data = {
  1711. .parent = "dpll4_m6_ck",
  1712. .div = 1,
  1713. .mult = 2,
  1714. };
  1715. static struct ti_clk dpll4_m6x2_mul_ck = {
  1716. .name = "dpll4_m6x2_mul_ck",
  1717. .type = TI_CLK_FIXED_FACTOR,
  1718. .data = &dpll4_m6x2_mul_ck_data,
  1719. };
  1720. static struct ti_clk_gate dpll4_m6x2_ck_data = {
  1721. .parent = "dpll4_m6x2_mul_ck",
  1722. .bit_shift = 0x1f,
  1723. .reg = 0xd00,
  1724. .module = TI_CLKM_CM,
  1725. .flags = CLKF_SET_BIT_TO_DISABLE,
  1726. };
  1727. static struct ti_clk dpll4_m6x2_ck = {
  1728. .name = "dpll4_m6x2_ck",
  1729. .type = TI_CLK_GATE,
  1730. .data = &dpll4_m6x2_ck_data,
  1731. };
  1732. static struct ti_clk_fixed_factor emu_per_alwon_ck_data = {
  1733. .parent = "dpll4_m6x2_ck",
  1734. .div = 1,
  1735. .mult = 1,
  1736. };
  1737. static struct ti_clk emu_per_alwon_ck = {
  1738. .name = "emu_per_alwon_ck",
  1739. .type = TI_CLK_FIXED_FACTOR,
  1740. .data = &emu_per_alwon_ck_data,
  1741. };
  1742. static struct ti_clk_fixed_factor emu_mpu_alwon_ck_data = {
  1743. .parent = "mpu_ck",
  1744. .div = 1,
  1745. .mult = 1,
  1746. };
  1747. static struct ti_clk emu_mpu_alwon_ck = {
  1748. .name = "emu_mpu_alwon_ck",
  1749. .type = TI_CLK_FIXED_FACTOR,
  1750. .data = &emu_mpu_alwon_ck_data,
  1751. };
  1752. static const char *emu_src_mux_ck_parents[] = {
  1753. "sys_ck",
  1754. "emu_core_alwon_ck",
  1755. "emu_per_alwon_ck",
  1756. "emu_mpu_alwon_ck",
  1757. };
  1758. static struct ti_clk_mux emu_src_mux_ck_data = {
  1759. .num_parents = ARRAY_SIZE(emu_src_mux_ck_parents),
  1760. .reg = 0x1140,
  1761. .module = TI_CLKM_CM,
  1762. .parents = emu_src_mux_ck_parents,
  1763. };
  1764. static struct ti_clk emu_src_mux_ck = {
  1765. .name = "emu_src_mux_ck",
  1766. .type = TI_CLK_MUX,
  1767. .data = &emu_src_mux_ck_data,
  1768. };
  1769. static struct ti_clk_gate emu_src_ck_data = {
  1770. .parent = "emu_src_mux_ck",
  1771. .flags = CLKF_CLKDM,
  1772. };
  1773. static struct ti_clk emu_src_ck = {
  1774. .name = "emu_src_ck",
  1775. .clkdm_name = "emu_clkdm",
  1776. .type = TI_CLK_GATE,
  1777. .data = &emu_src_ck_data,
  1778. };
  1779. static struct ti_clk_divider atclk_fck_data = {
  1780. .parent = "emu_src_ck",
  1781. .bit_shift = 4,
  1782. .max_div = 3,
  1783. .reg = 0x1140,
  1784. .module = TI_CLKM_CM,
  1785. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1786. };
  1787. static struct ti_clk atclk_fck = {
  1788. .name = "atclk_fck",
  1789. .type = TI_CLK_DIVIDER,
  1790. .data = &atclk_fck_data,
  1791. };
  1792. static struct ti_clk_gate ipss_ick_data = {
  1793. .parent = "core_l3_ick",
  1794. .bit_shift = 4,
  1795. .reg = 0xa10,
  1796. .module = TI_CLKM_CM,
  1797. .flags = CLKF_AM35XX | CLKF_INTERFACE,
  1798. };
  1799. static struct ti_clk ipss_ick = {
  1800. .name = "ipss_ick",
  1801. .clkdm_name = "core_l3_clkdm",
  1802. .type = TI_CLK_GATE,
  1803. .data = &ipss_ick_data,
  1804. };
  1805. static struct ti_clk_gate emac_ick_data = {
  1806. .parent = "ipss_ick",
  1807. .bit_shift = 1,
  1808. .reg = 0x59c,
  1809. .module = TI_CLKM_SCRM,
  1810. .flags = CLKF_AM35XX,
  1811. };
  1812. static struct ti_clk emac_ick = {
  1813. .name = "emac_ick",
  1814. .clkdm_name = "core_l3_clkdm",
  1815. .type = TI_CLK_GATE,
  1816. .data = &emac_ick_data,
  1817. };
  1818. static struct ti_clk_gate vpfe_ick_data = {
  1819. .parent = "ipss_ick",
  1820. .bit_shift = 2,
  1821. .reg = 0x59c,
  1822. .module = TI_CLKM_SCRM,
  1823. .flags = CLKF_AM35XX,
  1824. };
  1825. static struct ti_clk vpfe_ick = {
  1826. .name = "vpfe_ick",
  1827. .clkdm_name = "core_l3_clkdm",
  1828. .type = TI_CLK_GATE,
  1829. .data = &vpfe_ick_data,
  1830. };
  1831. static const char *dpll2_ck_parents[] = {
  1832. "sys_ck",
  1833. "dpll2_fck",
  1834. };
  1835. static struct ti_clk_dpll dpll2_ck_data = {
  1836. .num_parents = ARRAY_SIZE(dpll2_ck_parents),
  1837. .control_reg = 0x4,
  1838. .idlest_reg = 0x24,
  1839. .mult_div1_reg = 0x40,
  1840. .autoidle_reg = 0x34,
  1841. .module = TI_CLKM_CM,
  1842. .parents = dpll2_ck_parents,
  1843. .freqsel_mask = 0xf0,
  1844. .modes = 0xa2,
  1845. .div1_mask = 0x7f,
  1846. .idlest_mask = 0x1,
  1847. .auto_recal_bit = 0x3,
  1848. .max_divider = 0x80,
  1849. .min_divider = 0x1,
  1850. .recal_en_bit = 0x8,
  1851. .max_multiplier = 0x7ff,
  1852. .enable_mask = 0x7,
  1853. .mult_mask = 0x7ff00,
  1854. .recal_st_bit = 0x8,
  1855. .autoidle_mask = 0x7,
  1856. };
  1857. static struct ti_clk dpll2_ck = {
  1858. .name = "dpll2_ck",
  1859. .clkdm_name = "dpll2_clkdm",
  1860. .type = TI_CLK_DPLL,
  1861. .data = &dpll2_ck_data,
  1862. };
  1863. static struct ti_clk_divider dpll2_m2_ck_data = {
  1864. .parent = "dpll2_ck",
  1865. .max_div = 31,
  1866. .reg = 0x44,
  1867. .module = TI_CLKM_CM,
  1868. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1869. };
  1870. static struct ti_clk dpll2_m2_ck = {
  1871. .name = "dpll2_m2_ck",
  1872. .type = TI_CLK_DIVIDER,
  1873. .data = &dpll2_m2_ck_data,
  1874. };
  1875. static const char *mcbsp4_mux_fck_parents[] = {
  1876. "per_96m_fck",
  1877. "mcbsp_clks",
  1878. };
  1879. static struct ti_clk_mux mcbsp4_mux_fck_data = {
  1880. .bit_shift = 2,
  1881. .num_parents = ARRAY_SIZE(mcbsp4_mux_fck_parents),
  1882. .reg = 0x2d8,
  1883. .module = TI_CLKM_SCRM,
  1884. .parents = mcbsp4_mux_fck_parents,
  1885. };
  1886. static const char *mcbsp1_mux_fck_parents[] = {
  1887. "core_96m_fck",
  1888. "mcbsp_clks",
  1889. };
  1890. static struct ti_clk_mux mcbsp1_mux_fck_data = {
  1891. .bit_shift = 2,
  1892. .num_parents = ARRAY_SIZE(mcbsp1_mux_fck_parents),
  1893. .reg = 0x274,
  1894. .module = TI_CLKM_SCRM,
  1895. .parents = mcbsp1_mux_fck_parents,
  1896. };
  1897. static struct ti_clk_gate gpt8_gate_fck_data = {
  1898. .parent = "sys_ck",
  1899. .bit_shift = 9,
  1900. .reg = 0x1000,
  1901. .module = TI_CLKM_CM,
  1902. };
  1903. static struct ti_clk_gate gpt8_ick_data = {
  1904. .parent = "per_l4_ick",
  1905. .bit_shift = 9,
  1906. .reg = 0x1010,
  1907. .module = TI_CLKM_CM,
  1908. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1909. };
  1910. static struct ti_clk gpt8_ick = {
  1911. .name = "gpt8_ick",
  1912. .clkdm_name = "per_clkdm",
  1913. .type = TI_CLK_GATE,
  1914. .data = &gpt8_ick_data,
  1915. };
  1916. static const char *gpt10_mux_fck_parents[] = {
  1917. "omap_32k_fck",
  1918. "sys_ck",
  1919. };
  1920. static struct ti_clk_mux gpt10_mux_fck_data = {
  1921. .bit_shift = 6,
  1922. .num_parents = ARRAY_SIZE(gpt10_mux_fck_parents),
  1923. .reg = 0xa40,
  1924. .module = TI_CLKM_CM,
  1925. .parents = gpt10_mux_fck_parents,
  1926. };
  1927. static struct ti_clk_gate mmchs3_ick_data = {
  1928. .parent = "core_l4_ick",
  1929. .bit_shift = 30,
  1930. .reg = 0xa10,
  1931. .module = TI_CLKM_CM,
  1932. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1933. };
  1934. static struct ti_clk mmchs3_ick = {
  1935. .name = "mmchs3_ick",
  1936. .clkdm_name = "core_l4_clkdm",
  1937. .type = TI_CLK_GATE,
  1938. .data = &mmchs3_ick_data,
  1939. };
  1940. static struct ti_clk_gate gpio3_ick_data = {
  1941. .parent = "per_l4_ick",
  1942. .bit_shift = 14,
  1943. .reg = 0x1010,
  1944. .module = TI_CLKM_CM,
  1945. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1946. };
  1947. static struct ti_clk gpio3_ick = {
  1948. .name = "gpio3_ick",
  1949. .clkdm_name = "per_clkdm",
  1950. .type = TI_CLK_GATE,
  1951. .data = &gpio3_ick_data,
  1952. };
  1953. static const char *traceclk_src_fck_parents[] = {
  1954. "sys_ck",
  1955. "emu_core_alwon_ck",
  1956. "emu_per_alwon_ck",
  1957. "emu_mpu_alwon_ck",
  1958. };
  1959. static struct ti_clk_mux traceclk_src_fck_data = {
  1960. .bit_shift = 2,
  1961. .num_parents = ARRAY_SIZE(traceclk_src_fck_parents),
  1962. .reg = 0x1140,
  1963. .module = TI_CLKM_CM,
  1964. .parents = traceclk_src_fck_parents,
  1965. };
  1966. static struct ti_clk traceclk_src_fck = {
  1967. .name = "traceclk_src_fck",
  1968. .type = TI_CLK_MUX,
  1969. .data = &traceclk_src_fck_data,
  1970. };
  1971. static struct ti_clk_divider traceclk_fck_data = {
  1972. .parent = "traceclk_src_fck",
  1973. .bit_shift = 11,
  1974. .max_div = 7,
  1975. .reg = 0x1140,
  1976. .module = TI_CLKM_CM,
  1977. .flags = CLKF_INDEX_STARTS_AT_ONE,
  1978. };
  1979. static struct ti_clk traceclk_fck = {
  1980. .name = "traceclk_fck",
  1981. .type = TI_CLK_DIVIDER,
  1982. .data = &traceclk_fck_data,
  1983. };
  1984. static struct ti_clk_gate mcbsp5_gate_fck_data = {
  1985. .parent = "mcbsp_clks",
  1986. .bit_shift = 10,
  1987. .reg = 0xa00,
  1988. .module = TI_CLKM_CM,
  1989. };
  1990. static struct ti_clk_gate sad2d_ick_data = {
  1991. .parent = "l3_ick",
  1992. .bit_shift = 3,
  1993. .reg = 0xa10,
  1994. .module = TI_CLKM_CM,
  1995. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  1996. };
  1997. static struct ti_clk sad2d_ick = {
  1998. .name = "sad2d_ick",
  1999. .clkdm_name = "d2d_clkdm",
  2000. .type = TI_CLK_GATE,
  2001. .data = &sad2d_ick_data,
  2002. };
  2003. static const char *gpt1_mux_fck_parents[] = {
  2004. "omap_32k_fck",
  2005. "sys_ck",
  2006. };
  2007. static struct ti_clk_mux gpt1_mux_fck_data = {
  2008. .num_parents = ARRAY_SIZE(gpt1_mux_fck_parents),
  2009. .reg = 0xc40,
  2010. .module = TI_CLKM_CM,
  2011. .parents = gpt1_mux_fck_parents,
  2012. };
  2013. static struct ti_clk_gate hecc_ck_data = {
  2014. .parent = "sys_ck",
  2015. .bit_shift = 3,
  2016. .reg = 0x59c,
  2017. .module = TI_CLKM_SCRM,
  2018. .flags = CLKF_AM35XX,
  2019. };
  2020. static struct ti_clk hecc_ck = {
  2021. .name = "hecc_ck",
  2022. .clkdm_name = "core_l3_clkdm",
  2023. .type = TI_CLK_GATE,
  2024. .data = &hecc_ck_data,
  2025. };
  2026. static struct ti_clk_gate gpt1_gate_fck_data = {
  2027. .parent = "sys_ck",
  2028. .bit_shift = 0,
  2029. .reg = 0xc00,
  2030. .module = TI_CLKM_CM,
  2031. };
  2032. static struct ti_clk_composite gpt1_fck_data = {
  2033. .mux = &gpt1_mux_fck_data,
  2034. .gate = &gpt1_gate_fck_data,
  2035. };
  2036. static struct ti_clk gpt1_fck = {
  2037. .name = "gpt1_fck",
  2038. .type = TI_CLK_COMPOSITE,
  2039. .data = &gpt1_fck_data,
  2040. };
  2041. static struct ti_clk_gate dpll4_m2x2_ck_omap36xx_data = {
  2042. .parent = "dpll4_m2x2_mul_ck",
  2043. .bit_shift = 0x1b,
  2044. .reg = 0xd00,
  2045. .module = TI_CLKM_CM,
  2046. .flags = CLKF_HSDIV | CLKF_SET_BIT_TO_DISABLE,
  2047. };
  2048. static struct ti_clk dpll4_m2x2_ck_omap36xx = {
  2049. .name = "dpll4_m2x2_ck",
  2050. .type = TI_CLK_GATE,
  2051. .data = &dpll4_m2x2_ck_omap36xx_data,
  2052. .patch = &dpll4_m2x2_ck,
  2053. };
  2054. static struct ti_clk_divider gfx_l3_fck_data = {
  2055. .parent = "l3_ick",
  2056. .max_div = 7,
  2057. .reg = 0xb40,
  2058. .module = TI_CLKM_CM,
  2059. .flags = CLKF_INDEX_STARTS_AT_ONE,
  2060. };
  2061. static struct ti_clk gfx_l3_fck = {
  2062. .name = "gfx_l3_fck",
  2063. .type = TI_CLK_DIVIDER,
  2064. .data = &gfx_l3_fck_data,
  2065. };
  2066. static struct ti_clk_gate gfx_cg1_ck_data = {
  2067. .parent = "gfx_l3_fck",
  2068. .bit_shift = 1,
  2069. .reg = 0xb00,
  2070. .module = TI_CLKM_CM,
  2071. .flags = CLKF_WAIT,
  2072. };
  2073. static struct ti_clk gfx_cg1_ck = {
  2074. .name = "gfx_cg1_ck",
  2075. .clkdm_name = "gfx_3430es1_clkdm",
  2076. .type = TI_CLK_GATE,
  2077. .data = &gfx_cg1_ck_data,
  2078. };
  2079. static struct ti_clk_gate mailboxes_ick_data = {
  2080. .parent = "core_l4_ick",
  2081. .bit_shift = 7,
  2082. .reg = 0xa10,
  2083. .module = TI_CLKM_CM,
  2084. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2085. };
  2086. static struct ti_clk mailboxes_ick = {
  2087. .name = "mailboxes_ick",
  2088. .clkdm_name = "core_l4_clkdm",
  2089. .type = TI_CLK_GATE,
  2090. .data = &mailboxes_ick_data,
  2091. };
  2092. static struct ti_clk_gate sha11_ick_data = {
  2093. .parent = "security_l4_ick2",
  2094. .bit_shift = 1,
  2095. .reg = 0xa14,
  2096. .module = TI_CLKM_CM,
  2097. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2098. };
  2099. static struct ti_clk sha11_ick = {
  2100. .name = "sha11_ick",
  2101. .type = TI_CLK_GATE,
  2102. .data = &sha11_ick_data,
  2103. };
  2104. static struct ti_clk_gate hsotgusb_ick_am35xx_data = {
  2105. .parent = "ipss_ick",
  2106. .bit_shift = 0,
  2107. .reg = 0x59c,
  2108. .module = TI_CLKM_SCRM,
  2109. .flags = CLKF_AM35XX,
  2110. };
  2111. static struct ti_clk hsotgusb_ick_am35xx = {
  2112. .name = "hsotgusb_ick_am35xx",
  2113. .clkdm_name = "core_l3_clkdm",
  2114. .type = TI_CLK_GATE,
  2115. .data = &hsotgusb_ick_am35xx_data,
  2116. };
  2117. static struct ti_clk_gate mmchs3_fck_data = {
  2118. .parent = "core_96m_fck",
  2119. .bit_shift = 30,
  2120. .reg = 0xa00,
  2121. .module = TI_CLKM_CM,
  2122. .flags = CLKF_WAIT,
  2123. };
  2124. static struct ti_clk mmchs3_fck = {
  2125. .name = "mmchs3_fck",
  2126. .clkdm_name = "core_l4_clkdm",
  2127. .type = TI_CLK_GATE,
  2128. .data = &mmchs3_fck_data,
  2129. };
  2130. static struct ti_clk_divider pclk_fck_data = {
  2131. .parent = "emu_src_ck",
  2132. .bit_shift = 8,
  2133. .max_div = 7,
  2134. .reg = 0x1140,
  2135. .module = TI_CLKM_CM,
  2136. .flags = CLKF_INDEX_STARTS_AT_ONE,
  2137. };
  2138. static struct ti_clk pclk_fck = {
  2139. .name = "pclk_fck",
  2140. .type = TI_CLK_DIVIDER,
  2141. .data = &pclk_fck_data,
  2142. };
  2143. static const char *dpll4_ck_omap36xx_parents[] = {
  2144. "sys_ck",
  2145. "sys_ck",
  2146. };
  2147. static struct ti_clk_dpll dpll4_ck_omap36xx_data = {
  2148. .num_parents = ARRAY_SIZE(dpll4_ck_omap36xx_parents),
  2149. .control_reg = 0xd00,
  2150. .idlest_reg = 0xd20,
  2151. .mult_div1_reg = 0xd44,
  2152. .autoidle_reg = 0xd30,
  2153. .module = TI_CLKM_CM,
  2154. .parents = dpll4_ck_omap36xx_parents,
  2155. .modes = 0x82,
  2156. .div1_mask = 0x7f,
  2157. .idlest_mask = 0x2,
  2158. .auto_recal_bit = 0x13,
  2159. .max_divider = 0x80,
  2160. .min_divider = 0x1,
  2161. .recal_en_bit = 0x6,
  2162. .max_multiplier = 0xfff,
  2163. .enable_mask = 0x70000,
  2164. .mult_mask = 0xfff00,
  2165. .recal_st_bit = 0x6,
  2166. .autoidle_mask = 0x38,
  2167. .sddiv_mask = 0xff000000,
  2168. .dco_mask = 0xe00000,
  2169. .flags = CLKF_PER | CLKF_J_TYPE,
  2170. };
  2171. static struct ti_clk dpll4_ck_omap36xx = {
  2172. .name = "dpll4_ck",
  2173. .type = TI_CLK_DPLL,
  2174. .data = &dpll4_ck_omap36xx_data,
  2175. .patch = &dpll4_ck,
  2176. };
  2177. static struct ti_clk_gate uart3_fck_data = {
  2178. .parent = "per_48m_fck",
  2179. .bit_shift = 11,
  2180. .reg = 0x1000,
  2181. .module = TI_CLKM_CM,
  2182. .flags = CLKF_WAIT,
  2183. };
  2184. static struct ti_clk uart3_fck = {
  2185. .name = "uart3_fck",
  2186. .clkdm_name = "per_clkdm",
  2187. .type = TI_CLK_GATE,
  2188. .data = &uart3_fck_data,
  2189. };
  2190. static struct ti_clk_fixed_factor wkup_32k_fck_data = {
  2191. .parent = "omap_32k_fck",
  2192. .div = 1,
  2193. .mult = 1,
  2194. };
  2195. static struct ti_clk wkup_32k_fck = {
  2196. .name = "wkup_32k_fck",
  2197. .type = TI_CLK_FIXED_FACTOR,
  2198. .data = &wkup_32k_fck_data,
  2199. };
  2200. static struct ti_clk_gate sys_clkout1_data = {
  2201. .parent = "osc_sys_ck",
  2202. .bit_shift = 7,
  2203. .reg = 0xd70,
  2204. .module = TI_CLKM_PRM,
  2205. };
  2206. static struct ti_clk sys_clkout1 = {
  2207. .name = "sys_clkout1",
  2208. .type = TI_CLK_GATE,
  2209. .data = &sys_clkout1_data,
  2210. };
  2211. static struct ti_clk_fixed_factor gpmc_fck_data = {
  2212. .parent = "core_l3_ick",
  2213. .div = 1,
  2214. .mult = 1,
  2215. };
  2216. static struct ti_clk gpmc_fck = {
  2217. .name = "gpmc_fck",
  2218. .type = TI_CLK_FIXED_FACTOR,
  2219. .data = &gpmc_fck_data,
  2220. };
  2221. static struct ti_clk_fixed_factor dpll5_m2_d20_ck_data = {
  2222. .parent = "dpll5_m2_ck",
  2223. .div = 20,
  2224. .mult = 1,
  2225. };
  2226. static struct ti_clk dpll5_m2_d20_ck = {
  2227. .name = "dpll5_m2_d20_ck",
  2228. .type = TI_CLK_FIXED_FACTOR,
  2229. .data = &dpll5_m2_d20_ck_data,
  2230. };
  2231. static struct ti_clk_gate dpll4_m5x2_ck_omap36xx_data = {
  2232. .parent = "dpll4_m5x2_mul_ck",
  2233. .bit_shift = 0x1e,
  2234. .reg = 0xd00,
  2235. .module = TI_CLKM_CM,
  2236. .flags = CLKF_HSDIV | CLKF_SET_RATE_PARENT | CLKF_SET_BIT_TO_DISABLE,
  2237. };
  2238. static struct ti_clk dpll4_m5x2_ck_omap36xx = {
  2239. .name = "dpll4_m5x2_ck",
  2240. .type = TI_CLK_GATE,
  2241. .data = &dpll4_m5x2_ck_omap36xx_data,
  2242. .patch = &dpll4_m5x2_ck,
  2243. };
  2244. static struct ti_clk_gate ssi_ssr_gate_fck_3430es2_data = {
  2245. .parent = "corex2_fck",
  2246. .bit_shift = 0,
  2247. .reg = 0xa00,
  2248. .module = TI_CLKM_CM,
  2249. .flags = CLKF_NO_WAIT,
  2250. };
  2251. static struct ti_clk_gate uart1_ick_data = {
  2252. .parent = "core_l4_ick",
  2253. .bit_shift = 13,
  2254. .reg = 0xa10,
  2255. .module = TI_CLKM_CM,
  2256. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2257. };
  2258. static struct ti_clk uart1_ick = {
  2259. .name = "uart1_ick",
  2260. .clkdm_name = "core_l4_clkdm",
  2261. .type = TI_CLK_GATE,
  2262. .data = &uart1_ick_data,
  2263. };
  2264. static struct ti_clk_gate iva2_ck_data = {
  2265. .parent = "dpll2_m2_ck",
  2266. .bit_shift = 0,
  2267. .reg = 0x0,
  2268. .module = TI_CLKM_CM,
  2269. .flags = CLKF_WAIT,
  2270. };
  2271. static struct ti_clk iva2_ck = {
  2272. .name = "iva2_ck",
  2273. .clkdm_name = "iva2_clkdm",
  2274. .type = TI_CLK_GATE,
  2275. .data = &iva2_ck_data,
  2276. };
  2277. static struct ti_clk_gate pka_ick_data = {
  2278. .parent = "security_l3_ick",
  2279. .bit_shift = 4,
  2280. .reg = 0xa14,
  2281. .module = TI_CLKM_CM,
  2282. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2283. };
  2284. static struct ti_clk pka_ick = {
  2285. .name = "pka_ick",
  2286. .type = TI_CLK_GATE,
  2287. .data = &pka_ick_data,
  2288. };
  2289. static struct ti_clk_gate gpt12_ick_data = {
  2290. .parent = "wkup_l4_ick",
  2291. .bit_shift = 1,
  2292. .reg = 0xc10,
  2293. .module = TI_CLKM_CM,
  2294. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2295. };
  2296. static struct ti_clk gpt12_ick = {
  2297. .name = "gpt12_ick",
  2298. .clkdm_name = "wkup_clkdm",
  2299. .type = TI_CLK_GATE,
  2300. .data = &gpt12_ick_data,
  2301. };
  2302. static const char *mcbsp5_mux_fck_parents[] = {
  2303. "core_96m_fck",
  2304. "mcbsp_clks",
  2305. };
  2306. static struct ti_clk_mux mcbsp5_mux_fck_data = {
  2307. .bit_shift = 4,
  2308. .num_parents = ARRAY_SIZE(mcbsp5_mux_fck_parents),
  2309. .reg = 0x2d8,
  2310. .module = TI_CLKM_SCRM,
  2311. .parents = mcbsp5_mux_fck_parents,
  2312. };
  2313. static struct ti_clk_composite mcbsp5_fck_data = {
  2314. .mux = &mcbsp5_mux_fck_data,
  2315. .gate = &mcbsp5_gate_fck_data,
  2316. };
  2317. static struct ti_clk mcbsp5_fck = {
  2318. .name = "mcbsp5_fck",
  2319. .type = TI_CLK_COMPOSITE,
  2320. .data = &mcbsp5_fck_data,
  2321. };
  2322. static struct ti_clk_gate usbhost_48m_fck_data = {
  2323. .parent = "omap_48m_fck",
  2324. .bit_shift = 0,
  2325. .reg = 0x1400,
  2326. .module = TI_CLKM_CM,
  2327. .flags = CLKF_DSS,
  2328. };
  2329. static struct ti_clk usbhost_48m_fck = {
  2330. .name = "usbhost_48m_fck",
  2331. .clkdm_name = "usbhost_clkdm",
  2332. .type = TI_CLK_GATE,
  2333. .data = &usbhost_48m_fck_data,
  2334. };
  2335. static struct ti_clk_gate des1_ick_data = {
  2336. .parent = "security_l4_ick2",
  2337. .bit_shift = 0,
  2338. .reg = 0xa14,
  2339. .module = TI_CLKM_CM,
  2340. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2341. };
  2342. static struct ti_clk des1_ick = {
  2343. .name = "des1_ick",
  2344. .type = TI_CLK_GATE,
  2345. .data = &des1_ick_data,
  2346. };
  2347. static struct ti_clk_gate sgx_gate_fck_data = {
  2348. .parent = "core_ck",
  2349. .bit_shift = 1,
  2350. .reg = 0xb00,
  2351. .module = TI_CLKM_CM,
  2352. };
  2353. static struct ti_clk_fixed_factor core_d4_ck_data = {
  2354. .parent = "core_ck",
  2355. .div = 4,
  2356. .mult = 1,
  2357. };
  2358. static struct ti_clk core_d4_ck = {
  2359. .name = "core_d4_ck",
  2360. .type = TI_CLK_FIXED_FACTOR,
  2361. .data = &core_d4_ck_data,
  2362. };
  2363. static struct ti_clk_fixed_factor omap_192m_alwon_fck_data = {
  2364. .parent = "dpll4_m2x2_ck",
  2365. .div = 1,
  2366. .mult = 1,
  2367. };
  2368. static struct ti_clk omap_192m_alwon_fck = {
  2369. .name = "omap_192m_alwon_fck",
  2370. .type = TI_CLK_FIXED_FACTOR,
  2371. .data = &omap_192m_alwon_fck_data,
  2372. };
  2373. static struct ti_clk_fixed_factor core_d2_ck_data = {
  2374. .parent = "core_ck",
  2375. .div = 2,
  2376. .mult = 1,
  2377. };
  2378. static struct ti_clk core_d2_ck = {
  2379. .name = "core_d2_ck",
  2380. .type = TI_CLK_FIXED_FACTOR,
  2381. .data = &core_d2_ck_data,
  2382. };
  2383. static struct ti_clk_fixed_factor corex2_d3_fck_data = {
  2384. .parent = "corex2_fck",
  2385. .div = 3,
  2386. .mult = 1,
  2387. };
  2388. static struct ti_clk corex2_d3_fck = {
  2389. .name = "corex2_d3_fck",
  2390. .type = TI_CLK_FIXED_FACTOR,
  2391. .data = &corex2_d3_fck_data,
  2392. };
  2393. static struct ti_clk_fixed_factor corex2_d5_fck_data = {
  2394. .parent = "corex2_fck",
  2395. .div = 5,
  2396. .mult = 1,
  2397. };
  2398. static struct ti_clk corex2_d5_fck = {
  2399. .name = "corex2_d5_fck",
  2400. .type = TI_CLK_FIXED_FACTOR,
  2401. .data = &corex2_d5_fck_data,
  2402. };
  2403. static const char *sgx_mux_fck_parents[] = {
  2404. "core_d3_ck",
  2405. "core_d4_ck",
  2406. "core_d6_ck",
  2407. "cm_96m_fck",
  2408. "omap_192m_alwon_fck",
  2409. "core_d2_ck",
  2410. "corex2_d3_fck",
  2411. "corex2_d5_fck",
  2412. };
  2413. static struct ti_clk_mux sgx_mux_fck_data = {
  2414. .num_parents = ARRAY_SIZE(sgx_mux_fck_parents),
  2415. .reg = 0xb40,
  2416. .module = TI_CLKM_CM,
  2417. .parents = sgx_mux_fck_parents,
  2418. };
  2419. static struct ti_clk_composite sgx_fck_data = {
  2420. .mux = &sgx_mux_fck_data,
  2421. .gate = &sgx_gate_fck_data,
  2422. };
  2423. static struct ti_clk sgx_fck = {
  2424. .name = "sgx_fck",
  2425. .type = TI_CLK_COMPOSITE,
  2426. .data = &sgx_fck_data,
  2427. };
  2428. static struct ti_clk_gate mcspi1_fck_data = {
  2429. .parent = "core_48m_fck",
  2430. .bit_shift = 18,
  2431. .reg = 0xa00,
  2432. .module = TI_CLKM_CM,
  2433. .flags = CLKF_WAIT,
  2434. };
  2435. static struct ti_clk mcspi1_fck = {
  2436. .name = "mcspi1_fck",
  2437. .clkdm_name = "core_l4_clkdm",
  2438. .type = TI_CLK_GATE,
  2439. .data = &mcspi1_fck_data,
  2440. };
  2441. static struct ti_clk_gate mmchs2_fck_data = {
  2442. .parent = "core_96m_fck",
  2443. .bit_shift = 25,
  2444. .reg = 0xa00,
  2445. .module = TI_CLKM_CM,
  2446. .flags = CLKF_WAIT,
  2447. };
  2448. static struct ti_clk mmchs2_fck = {
  2449. .name = "mmchs2_fck",
  2450. .clkdm_name = "core_l4_clkdm",
  2451. .type = TI_CLK_GATE,
  2452. .data = &mmchs2_fck_data,
  2453. };
  2454. static struct ti_clk_gate mcspi2_fck_data = {
  2455. .parent = "core_48m_fck",
  2456. .bit_shift = 19,
  2457. .reg = 0xa00,
  2458. .module = TI_CLKM_CM,
  2459. .flags = CLKF_WAIT,
  2460. };
  2461. static struct ti_clk mcspi2_fck = {
  2462. .name = "mcspi2_fck",
  2463. .clkdm_name = "core_l4_clkdm",
  2464. .type = TI_CLK_GATE,
  2465. .data = &mcspi2_fck_data,
  2466. };
  2467. static struct ti_clk_gate vpfe_fck_data = {
  2468. .parent = "pclk_ck",
  2469. .bit_shift = 10,
  2470. .reg = 0x59c,
  2471. .module = TI_CLKM_SCRM,
  2472. };
  2473. static struct ti_clk vpfe_fck = {
  2474. .name = "vpfe_fck",
  2475. .type = TI_CLK_GATE,
  2476. .data = &vpfe_fck_data,
  2477. };
  2478. static struct ti_clk_gate gpt4_gate_fck_data = {
  2479. .parent = "sys_ck",
  2480. .bit_shift = 5,
  2481. .reg = 0x1000,
  2482. .module = TI_CLKM_CM,
  2483. };
  2484. static struct ti_clk_gate mcbsp1_gate_fck_data = {
  2485. .parent = "mcbsp_clks",
  2486. .bit_shift = 9,
  2487. .reg = 0xa00,
  2488. .module = TI_CLKM_CM,
  2489. };
  2490. static struct ti_clk_gate gpt5_gate_fck_data = {
  2491. .parent = "sys_ck",
  2492. .bit_shift = 6,
  2493. .reg = 0x1000,
  2494. .module = TI_CLKM_CM,
  2495. };
  2496. static const char *gpt5_mux_fck_parents[] = {
  2497. "omap_32k_fck",
  2498. "sys_ck",
  2499. };
  2500. static struct ti_clk_mux gpt5_mux_fck_data = {
  2501. .bit_shift = 3,
  2502. .num_parents = ARRAY_SIZE(gpt5_mux_fck_parents),
  2503. .reg = 0x1040,
  2504. .module = TI_CLKM_CM,
  2505. .parents = gpt5_mux_fck_parents,
  2506. };
  2507. static struct ti_clk_composite gpt5_fck_data = {
  2508. .mux = &gpt5_mux_fck_data,
  2509. .gate = &gpt5_gate_fck_data,
  2510. };
  2511. static struct ti_clk gpt5_fck = {
  2512. .name = "gpt5_fck",
  2513. .type = TI_CLK_COMPOSITE,
  2514. .data = &gpt5_fck_data,
  2515. };
  2516. static struct ti_clk_gate ts_fck_data = {
  2517. .parent = "omap_32k_fck",
  2518. .bit_shift = 1,
  2519. .reg = 0xa08,
  2520. .module = TI_CLKM_CM,
  2521. };
  2522. static struct ti_clk ts_fck = {
  2523. .name = "ts_fck",
  2524. .clkdm_name = "core_l4_clkdm",
  2525. .type = TI_CLK_GATE,
  2526. .data = &ts_fck_data,
  2527. };
  2528. static struct ti_clk_fixed_factor wdt1_fck_data = {
  2529. .parent = "secure_32k_fck",
  2530. .div = 1,
  2531. .mult = 1,
  2532. };
  2533. static struct ti_clk wdt1_fck = {
  2534. .name = "wdt1_fck",
  2535. .type = TI_CLK_FIXED_FACTOR,
  2536. .data = &wdt1_fck_data,
  2537. };
  2538. static struct ti_clk_gate dpll4_m6x2_ck_omap36xx_data = {
  2539. .parent = "dpll4_m6x2_mul_ck",
  2540. .bit_shift = 0x1f,
  2541. .reg = 0xd00,
  2542. .module = TI_CLKM_CM,
  2543. .flags = CLKF_HSDIV | CLKF_SET_BIT_TO_DISABLE,
  2544. };
  2545. static struct ti_clk dpll4_m6x2_ck_omap36xx = {
  2546. .name = "dpll4_m6x2_ck",
  2547. .type = TI_CLK_GATE,
  2548. .data = &dpll4_m6x2_ck_omap36xx_data,
  2549. .patch = &dpll4_m6x2_ck,
  2550. };
  2551. static const char *gpt4_mux_fck_parents[] = {
  2552. "omap_32k_fck",
  2553. "sys_ck",
  2554. };
  2555. static struct ti_clk_mux gpt4_mux_fck_data = {
  2556. .bit_shift = 2,
  2557. .num_parents = ARRAY_SIZE(gpt4_mux_fck_parents),
  2558. .reg = 0x1040,
  2559. .module = TI_CLKM_CM,
  2560. .parents = gpt4_mux_fck_parents,
  2561. };
  2562. static struct ti_clk_gate usbhost_ick_data = {
  2563. .parent = "l4_ick",
  2564. .bit_shift = 0,
  2565. .reg = 0x1410,
  2566. .module = TI_CLKM_CM,
  2567. .flags = CLKF_DSS | CLKF_OMAP3 | CLKF_INTERFACE,
  2568. };
  2569. static struct ti_clk usbhost_ick = {
  2570. .name = "usbhost_ick",
  2571. .clkdm_name = "usbhost_clkdm",
  2572. .type = TI_CLK_GATE,
  2573. .data = &usbhost_ick_data,
  2574. };
  2575. static struct ti_clk_gate mcbsp2_ick_data = {
  2576. .parent = "per_l4_ick",
  2577. .bit_shift = 0,
  2578. .reg = 0x1010,
  2579. .module = TI_CLKM_CM,
  2580. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2581. };
  2582. static struct ti_clk mcbsp2_ick = {
  2583. .name = "mcbsp2_ick",
  2584. .clkdm_name = "per_clkdm",
  2585. .type = TI_CLK_GATE,
  2586. .data = &mcbsp2_ick_data,
  2587. };
  2588. static struct ti_clk_gate omapctrl_ick_data = {
  2589. .parent = "core_l4_ick",
  2590. .bit_shift = 6,
  2591. .reg = 0xa10,
  2592. .module = TI_CLKM_CM,
  2593. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2594. };
  2595. static struct ti_clk omapctrl_ick = {
  2596. .name = "omapctrl_ick",
  2597. .clkdm_name = "core_l4_clkdm",
  2598. .type = TI_CLK_GATE,
  2599. .data = &omapctrl_ick_data,
  2600. };
  2601. static struct ti_clk_fixed_factor omap_96m_d4_fck_data = {
  2602. .parent = "omap_96m_fck",
  2603. .div = 4,
  2604. .mult = 1,
  2605. };
  2606. static struct ti_clk omap_96m_d4_fck = {
  2607. .name = "omap_96m_d4_fck",
  2608. .type = TI_CLK_FIXED_FACTOR,
  2609. .data = &omap_96m_d4_fck_data,
  2610. };
  2611. static struct ti_clk_gate gpt6_ick_data = {
  2612. .parent = "per_l4_ick",
  2613. .bit_shift = 7,
  2614. .reg = 0x1010,
  2615. .module = TI_CLKM_CM,
  2616. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2617. };
  2618. static struct ti_clk gpt6_ick = {
  2619. .name = "gpt6_ick",
  2620. .clkdm_name = "per_clkdm",
  2621. .type = TI_CLK_GATE,
  2622. .data = &gpt6_ick_data,
  2623. };
  2624. static struct ti_clk_gate dpll3_m3x2_ck_omap36xx_data = {
  2625. .parent = "dpll3_m3x2_mul_ck",
  2626. .bit_shift = 0xc,
  2627. .reg = 0xd00,
  2628. .module = TI_CLKM_CM,
  2629. .flags = CLKF_HSDIV | CLKF_SET_BIT_TO_DISABLE,
  2630. };
  2631. static struct ti_clk dpll3_m3x2_ck_omap36xx = {
  2632. .name = "dpll3_m3x2_ck",
  2633. .type = TI_CLK_GATE,
  2634. .data = &dpll3_m3x2_ck_omap36xx_data,
  2635. .patch = &dpll3_m3x2_ck,
  2636. };
  2637. static struct ti_clk_gate i2c3_ick_data = {
  2638. .parent = "core_l4_ick",
  2639. .bit_shift = 17,
  2640. .reg = 0xa10,
  2641. .module = TI_CLKM_CM,
  2642. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2643. };
  2644. static struct ti_clk i2c3_ick = {
  2645. .name = "i2c3_ick",
  2646. .clkdm_name = "core_l4_clkdm",
  2647. .type = TI_CLK_GATE,
  2648. .data = &i2c3_ick_data,
  2649. };
  2650. static struct ti_clk_gate gpio6_ick_data = {
  2651. .parent = "per_l4_ick",
  2652. .bit_shift = 17,
  2653. .reg = 0x1010,
  2654. .module = TI_CLKM_CM,
  2655. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2656. };
  2657. static struct ti_clk gpio6_ick = {
  2658. .name = "gpio6_ick",
  2659. .clkdm_name = "per_clkdm",
  2660. .type = TI_CLK_GATE,
  2661. .data = &gpio6_ick_data,
  2662. };
  2663. static struct ti_clk_gate mspro_ick_data = {
  2664. .parent = "core_l4_ick",
  2665. .bit_shift = 23,
  2666. .reg = 0xa10,
  2667. .module = TI_CLKM_CM,
  2668. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2669. };
  2670. static struct ti_clk mspro_ick = {
  2671. .name = "mspro_ick",
  2672. .clkdm_name = "core_l4_clkdm",
  2673. .type = TI_CLK_GATE,
  2674. .data = &mspro_ick_data,
  2675. };
  2676. static struct ti_clk_composite mcbsp1_fck_data = {
  2677. .mux = &mcbsp1_mux_fck_data,
  2678. .gate = &mcbsp1_gate_fck_data,
  2679. };
  2680. static struct ti_clk mcbsp1_fck = {
  2681. .name = "mcbsp1_fck",
  2682. .type = TI_CLK_COMPOSITE,
  2683. .data = &mcbsp1_fck_data,
  2684. };
  2685. static struct ti_clk_gate gpt3_gate_fck_data = {
  2686. .parent = "sys_ck",
  2687. .bit_shift = 4,
  2688. .reg = 0x1000,
  2689. .module = TI_CLKM_CM,
  2690. };
  2691. static struct ti_clk_fixed rmii_ck_data = {
  2692. .frequency = 50000000,
  2693. };
  2694. static struct ti_clk rmii_ck = {
  2695. .name = "rmii_ck",
  2696. .type = TI_CLK_FIXED,
  2697. .data = &rmii_ck_data,
  2698. };
  2699. static struct ti_clk_gate gpt6_gate_fck_data = {
  2700. .parent = "sys_ck",
  2701. .bit_shift = 7,
  2702. .reg = 0x1000,
  2703. .module = TI_CLKM_CM,
  2704. };
  2705. static struct ti_clk_composite gpt6_fck_data = {
  2706. .mux = &gpt6_mux_fck_data,
  2707. .gate = &gpt6_gate_fck_data,
  2708. };
  2709. static struct ti_clk gpt6_fck = {
  2710. .name = "gpt6_fck",
  2711. .type = TI_CLK_COMPOSITE,
  2712. .data = &gpt6_fck_data,
  2713. };
  2714. static struct ti_clk_fixed_factor dpll5_m2_d4_ck_data = {
  2715. .parent = "dpll5_m2_ck",
  2716. .div = 4,
  2717. .mult = 1,
  2718. };
  2719. static struct ti_clk dpll5_m2_d4_ck = {
  2720. .name = "dpll5_m2_d4_ck",
  2721. .type = TI_CLK_FIXED_FACTOR,
  2722. .data = &dpll5_m2_d4_ck_data,
  2723. };
  2724. static struct ti_clk_fixed_factor sys_d2_ck_data = {
  2725. .parent = "sys_ck",
  2726. .div = 2,
  2727. .mult = 1,
  2728. };
  2729. static struct ti_clk sys_d2_ck = {
  2730. .name = "sys_d2_ck",
  2731. .type = TI_CLK_FIXED_FACTOR,
  2732. .data = &sys_d2_ck_data,
  2733. };
  2734. static struct ti_clk_fixed_factor omap_96m_d2_fck_data = {
  2735. .parent = "omap_96m_fck",
  2736. .div = 2,
  2737. .mult = 1,
  2738. };
  2739. static struct ti_clk omap_96m_d2_fck = {
  2740. .name = "omap_96m_d2_fck",
  2741. .type = TI_CLK_FIXED_FACTOR,
  2742. .data = &omap_96m_d2_fck_data,
  2743. };
  2744. static struct ti_clk_fixed_factor dpll5_m2_d8_ck_data = {
  2745. .parent = "dpll5_m2_ck",
  2746. .div = 8,
  2747. .mult = 1,
  2748. };
  2749. static struct ti_clk dpll5_m2_d8_ck = {
  2750. .name = "dpll5_m2_d8_ck",
  2751. .type = TI_CLK_FIXED_FACTOR,
  2752. .data = &dpll5_m2_d8_ck_data,
  2753. };
  2754. static struct ti_clk_fixed_factor dpll5_m2_d16_ck_data = {
  2755. .parent = "dpll5_m2_ck",
  2756. .div = 16,
  2757. .mult = 1,
  2758. };
  2759. static struct ti_clk dpll5_m2_d16_ck = {
  2760. .name = "dpll5_m2_d16_ck",
  2761. .type = TI_CLK_FIXED_FACTOR,
  2762. .data = &dpll5_m2_d16_ck_data,
  2763. };
  2764. static const char *usim_mux_fck_parents[] = {
  2765. "sys_ck",
  2766. "sys_d2_ck",
  2767. "omap_96m_d2_fck",
  2768. "omap_96m_d4_fck",
  2769. "omap_96m_d8_fck",
  2770. "omap_96m_d10_fck",
  2771. "dpll5_m2_d4_ck",
  2772. "dpll5_m2_d8_ck",
  2773. "dpll5_m2_d16_ck",
  2774. "dpll5_m2_d20_ck",
  2775. };
  2776. static struct ti_clk_mux usim_mux_fck_data = {
  2777. .bit_shift = 3,
  2778. .num_parents = ARRAY_SIZE(usim_mux_fck_parents),
  2779. .reg = 0xc40,
  2780. .module = TI_CLKM_CM,
  2781. .parents = usim_mux_fck_parents,
  2782. .flags = CLKF_INDEX_STARTS_AT_ONE,
  2783. };
  2784. static struct ti_clk_composite usim_fck_data = {
  2785. .mux = &usim_mux_fck_data,
  2786. .gate = &usim_gate_fck_data,
  2787. };
  2788. static struct ti_clk usim_fck = {
  2789. .name = "usim_fck",
  2790. .type = TI_CLK_COMPOSITE,
  2791. .data = &usim_fck_data,
  2792. };
  2793. static int ssi_ssr_div_fck_3430es2_divs[] = {
  2794. 0,
  2795. 1,
  2796. 2,
  2797. 3,
  2798. 4,
  2799. 0,
  2800. 6,
  2801. 0,
  2802. 8,
  2803. };
  2804. static struct ti_clk_divider ssi_ssr_div_fck_3430es2_data = {
  2805. .num_dividers = ARRAY_SIZE(ssi_ssr_div_fck_3430es2_divs),
  2806. .parent = "corex2_fck",
  2807. .bit_shift = 8,
  2808. .dividers = ssi_ssr_div_fck_3430es2_divs,
  2809. .reg = 0xa40,
  2810. .module = TI_CLKM_CM,
  2811. };
  2812. static struct ti_clk_composite ssi_ssr_fck_3430es2_data = {
  2813. .gate = &ssi_ssr_gate_fck_3430es2_data,
  2814. .divider = &ssi_ssr_div_fck_3430es2_data,
  2815. };
  2816. static struct ti_clk ssi_ssr_fck_3430es2 = {
  2817. .name = "ssi_ssr_fck",
  2818. .type = TI_CLK_COMPOSITE,
  2819. .data = &ssi_ssr_fck_3430es2_data,
  2820. };
  2821. static struct ti_clk_gate dss1_alwon_fck_3430es1_data = {
  2822. .parent = "dpll4_m4x2_ck",
  2823. .bit_shift = 0,
  2824. .reg = 0xe00,
  2825. .module = TI_CLKM_CM,
  2826. .flags = CLKF_SET_RATE_PARENT,
  2827. };
  2828. static struct ti_clk dss1_alwon_fck_3430es1 = {
  2829. .name = "dss1_alwon_fck",
  2830. .clkdm_name = "dss_clkdm",
  2831. .type = TI_CLK_GATE,
  2832. .data = &dss1_alwon_fck_3430es1_data,
  2833. };
  2834. static struct ti_clk_gate gpt3_ick_data = {
  2835. .parent = "per_l4_ick",
  2836. .bit_shift = 4,
  2837. .reg = 0x1010,
  2838. .module = TI_CLKM_CM,
  2839. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2840. };
  2841. static struct ti_clk gpt3_ick = {
  2842. .name = "gpt3_ick",
  2843. .clkdm_name = "per_clkdm",
  2844. .type = TI_CLK_GATE,
  2845. .data = &gpt3_ick_data,
  2846. };
  2847. static struct ti_clk_fixed_factor omap_12m_fck_data = {
  2848. .parent = "omap_48m_fck",
  2849. .div = 4,
  2850. .mult = 1,
  2851. };
  2852. static struct ti_clk omap_12m_fck = {
  2853. .name = "omap_12m_fck",
  2854. .type = TI_CLK_FIXED_FACTOR,
  2855. .data = &omap_12m_fck_data,
  2856. };
  2857. static struct ti_clk_fixed_factor core_12m_fck_data = {
  2858. .parent = "omap_12m_fck",
  2859. .div = 1,
  2860. .mult = 1,
  2861. };
  2862. static struct ti_clk core_12m_fck = {
  2863. .name = "core_12m_fck",
  2864. .type = TI_CLK_FIXED_FACTOR,
  2865. .data = &core_12m_fck_data,
  2866. };
  2867. static struct ti_clk_gate hdq_fck_data = {
  2868. .parent = "core_12m_fck",
  2869. .bit_shift = 22,
  2870. .reg = 0xa00,
  2871. .module = TI_CLKM_CM,
  2872. .flags = CLKF_WAIT,
  2873. };
  2874. static struct ti_clk hdq_fck = {
  2875. .name = "hdq_fck",
  2876. .clkdm_name = "core_l4_clkdm",
  2877. .type = TI_CLK_GATE,
  2878. .data = &hdq_fck_data,
  2879. };
  2880. static struct ti_clk_gate usbtll_fck_data = {
  2881. .parent = "dpll5_m2_ck",
  2882. .bit_shift = 2,
  2883. .reg = 0xa08,
  2884. .module = TI_CLKM_CM,
  2885. .flags = CLKF_WAIT,
  2886. };
  2887. static struct ti_clk usbtll_fck = {
  2888. .name = "usbtll_fck",
  2889. .clkdm_name = "core_l4_clkdm",
  2890. .type = TI_CLK_GATE,
  2891. .data = &usbtll_fck_data,
  2892. };
  2893. static struct ti_clk_gate hsotgusb_fck_am35xx_data = {
  2894. .parent = "sys_ck",
  2895. .bit_shift = 8,
  2896. .reg = 0x59c,
  2897. .module = TI_CLKM_SCRM,
  2898. };
  2899. static struct ti_clk hsotgusb_fck_am35xx = {
  2900. .name = "hsotgusb_fck_am35xx",
  2901. .clkdm_name = "core_l3_clkdm",
  2902. .type = TI_CLK_GATE,
  2903. .data = &hsotgusb_fck_am35xx_data,
  2904. };
  2905. static struct ti_clk_gate hsotgusb_ick_3430es2_data = {
  2906. .parent = "core_l3_ick",
  2907. .bit_shift = 4,
  2908. .reg = 0xa10,
  2909. .module = TI_CLKM_CM,
  2910. .flags = CLKF_HSOTGUSB | CLKF_OMAP3 | CLKF_INTERFACE,
  2911. };
  2912. static struct ti_clk hsotgusb_ick_3430es2 = {
  2913. .name = "hsotgusb_ick_3430es2",
  2914. .clkdm_name = "core_l3_clkdm",
  2915. .type = TI_CLK_GATE,
  2916. .data = &hsotgusb_ick_3430es2_data,
  2917. };
  2918. static struct ti_clk_gate gfx_l3_ck_data = {
  2919. .parent = "l3_ick",
  2920. .bit_shift = 0,
  2921. .reg = 0xb10,
  2922. .module = TI_CLKM_CM,
  2923. .flags = CLKF_WAIT,
  2924. };
  2925. static struct ti_clk gfx_l3_ck = {
  2926. .name = "gfx_l3_ck",
  2927. .clkdm_name = "gfx_3430es1_clkdm",
  2928. .type = TI_CLK_GATE,
  2929. .data = &gfx_l3_ck_data,
  2930. };
  2931. static struct ti_clk_fixed_factor gfx_l3_ick_data = {
  2932. .parent = "gfx_l3_ck",
  2933. .div = 1,
  2934. .mult = 1,
  2935. };
  2936. static struct ti_clk gfx_l3_ick = {
  2937. .name = "gfx_l3_ick",
  2938. .type = TI_CLK_FIXED_FACTOR,
  2939. .data = &gfx_l3_ick_data,
  2940. };
  2941. static struct ti_clk_gate mcbsp1_ick_data = {
  2942. .parent = "core_l4_ick",
  2943. .bit_shift = 9,
  2944. .reg = 0xa10,
  2945. .module = TI_CLKM_CM,
  2946. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2947. };
  2948. static struct ti_clk mcbsp1_ick = {
  2949. .name = "mcbsp1_ick",
  2950. .clkdm_name = "core_l4_clkdm",
  2951. .type = TI_CLK_GATE,
  2952. .data = &mcbsp1_ick_data,
  2953. };
  2954. static struct ti_clk_fixed_factor gpt12_fck_data = {
  2955. .parent = "secure_32k_fck",
  2956. .div = 1,
  2957. .mult = 1,
  2958. };
  2959. static struct ti_clk gpt12_fck = {
  2960. .name = "gpt12_fck",
  2961. .type = TI_CLK_FIXED_FACTOR,
  2962. .data = &gpt12_fck_data,
  2963. };
  2964. static struct ti_clk_gate gfx_cg2_ck_data = {
  2965. .parent = "gfx_l3_fck",
  2966. .bit_shift = 2,
  2967. .reg = 0xb00,
  2968. .module = TI_CLKM_CM,
  2969. .flags = CLKF_WAIT,
  2970. };
  2971. static struct ti_clk gfx_cg2_ck = {
  2972. .name = "gfx_cg2_ck",
  2973. .clkdm_name = "gfx_3430es1_clkdm",
  2974. .type = TI_CLK_GATE,
  2975. .data = &gfx_cg2_ck_data,
  2976. };
  2977. static struct ti_clk_gate i2c2_ick_data = {
  2978. .parent = "core_l4_ick",
  2979. .bit_shift = 16,
  2980. .reg = 0xa10,
  2981. .module = TI_CLKM_CM,
  2982. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  2983. };
  2984. static struct ti_clk i2c2_ick = {
  2985. .name = "i2c2_ick",
  2986. .clkdm_name = "core_l4_clkdm",
  2987. .type = TI_CLK_GATE,
  2988. .data = &i2c2_ick_data,
  2989. };
  2990. static struct ti_clk_gate gpio4_dbck_data = {
  2991. .parent = "per_32k_alwon_fck",
  2992. .bit_shift = 15,
  2993. .reg = 0x1000,
  2994. .module = TI_CLKM_CM,
  2995. };
  2996. static struct ti_clk gpio4_dbck = {
  2997. .name = "gpio4_dbck",
  2998. .clkdm_name = "per_clkdm",
  2999. .type = TI_CLK_GATE,
  3000. .data = &gpio4_dbck_data,
  3001. };
  3002. static struct ti_clk_gate i2c3_fck_data = {
  3003. .parent = "core_96m_fck",
  3004. .bit_shift = 17,
  3005. .reg = 0xa00,
  3006. .module = TI_CLKM_CM,
  3007. .flags = CLKF_WAIT,
  3008. };
  3009. static struct ti_clk i2c3_fck = {
  3010. .name = "i2c3_fck",
  3011. .clkdm_name = "core_l4_clkdm",
  3012. .type = TI_CLK_GATE,
  3013. .data = &i2c3_fck_data,
  3014. };
  3015. static struct ti_clk_composite gpt3_fck_data = {
  3016. .mux = &gpt3_mux_fck_data,
  3017. .gate = &gpt3_gate_fck_data,
  3018. };
  3019. static struct ti_clk gpt3_fck = {
  3020. .name = "gpt3_fck",
  3021. .type = TI_CLK_COMPOSITE,
  3022. .data = &gpt3_fck_data,
  3023. };
  3024. static struct ti_clk_gate i2c1_ick_data = {
  3025. .parent = "core_l4_ick",
  3026. .bit_shift = 15,
  3027. .reg = 0xa10,
  3028. .module = TI_CLKM_CM,
  3029. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3030. };
  3031. static struct ti_clk i2c1_ick = {
  3032. .name = "i2c1_ick",
  3033. .clkdm_name = "core_l4_clkdm",
  3034. .type = TI_CLK_GATE,
  3035. .data = &i2c1_ick_data,
  3036. };
  3037. static struct ti_clk_gate omap_32ksync_ick_data = {
  3038. .parent = "wkup_l4_ick",
  3039. .bit_shift = 2,
  3040. .reg = 0xc10,
  3041. .module = TI_CLKM_CM,
  3042. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3043. };
  3044. static struct ti_clk omap_32ksync_ick = {
  3045. .name = "omap_32ksync_ick",
  3046. .clkdm_name = "wkup_clkdm",
  3047. .type = TI_CLK_GATE,
  3048. .data = &omap_32ksync_ick_data,
  3049. };
  3050. static struct ti_clk_gate aes2_ick_data = {
  3051. .parent = "core_l4_ick",
  3052. .bit_shift = 28,
  3053. .reg = 0xa10,
  3054. .module = TI_CLKM_CM,
  3055. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3056. };
  3057. static struct ti_clk aes2_ick = {
  3058. .name = "aes2_ick",
  3059. .clkdm_name = "core_l4_clkdm",
  3060. .type = TI_CLK_GATE,
  3061. .data = &aes2_ick_data,
  3062. };
  3063. static const char *gpt8_mux_fck_parents[] = {
  3064. "omap_32k_fck",
  3065. "sys_ck",
  3066. };
  3067. static struct ti_clk_mux gpt8_mux_fck_data = {
  3068. .bit_shift = 6,
  3069. .num_parents = ARRAY_SIZE(gpt8_mux_fck_parents),
  3070. .reg = 0x1040,
  3071. .module = TI_CLKM_CM,
  3072. .parents = gpt8_mux_fck_parents,
  3073. };
  3074. static struct ti_clk_composite gpt8_fck_data = {
  3075. .mux = &gpt8_mux_fck_data,
  3076. .gate = &gpt8_gate_fck_data,
  3077. };
  3078. static struct ti_clk gpt8_fck = {
  3079. .name = "gpt8_fck",
  3080. .type = TI_CLK_COMPOSITE,
  3081. .data = &gpt8_fck_data,
  3082. };
  3083. static struct ti_clk_gate mcbsp4_gate_fck_data = {
  3084. .parent = "mcbsp_clks",
  3085. .bit_shift = 2,
  3086. .reg = 0x1000,
  3087. .module = TI_CLKM_CM,
  3088. };
  3089. static struct ti_clk_composite mcbsp4_fck_data = {
  3090. .mux = &mcbsp4_mux_fck_data,
  3091. .gate = &mcbsp4_gate_fck_data,
  3092. };
  3093. static struct ti_clk mcbsp4_fck = {
  3094. .name = "mcbsp4_fck",
  3095. .type = TI_CLK_COMPOSITE,
  3096. .data = &mcbsp4_fck_data,
  3097. };
  3098. static struct ti_clk_gate gpio2_dbck_data = {
  3099. .parent = "per_32k_alwon_fck",
  3100. .bit_shift = 13,
  3101. .reg = 0x1000,
  3102. .module = TI_CLKM_CM,
  3103. };
  3104. static struct ti_clk gpio2_dbck = {
  3105. .name = "gpio2_dbck",
  3106. .clkdm_name = "per_clkdm",
  3107. .type = TI_CLK_GATE,
  3108. .data = &gpio2_dbck_data,
  3109. };
  3110. static struct ti_clk_gate usbtll_ick_data = {
  3111. .parent = "core_l4_ick",
  3112. .bit_shift = 2,
  3113. .reg = 0xa18,
  3114. .module = TI_CLKM_CM,
  3115. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3116. };
  3117. static struct ti_clk usbtll_ick = {
  3118. .name = "usbtll_ick",
  3119. .clkdm_name = "core_l4_clkdm",
  3120. .type = TI_CLK_GATE,
  3121. .data = &usbtll_ick_data,
  3122. };
  3123. static struct ti_clk_gate mcspi4_ick_data = {
  3124. .parent = "core_l4_ick",
  3125. .bit_shift = 21,
  3126. .reg = 0xa10,
  3127. .module = TI_CLKM_CM,
  3128. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3129. };
  3130. static struct ti_clk mcspi4_ick = {
  3131. .name = "mcspi4_ick",
  3132. .clkdm_name = "core_l4_clkdm",
  3133. .type = TI_CLK_GATE,
  3134. .data = &mcspi4_ick_data,
  3135. };
  3136. static struct ti_clk_gate dss_96m_fck_data = {
  3137. .parent = "omap_96m_fck",
  3138. .bit_shift = 2,
  3139. .reg = 0xe00,
  3140. .module = TI_CLKM_CM,
  3141. };
  3142. static struct ti_clk dss_96m_fck = {
  3143. .name = "dss_96m_fck",
  3144. .clkdm_name = "dss_clkdm",
  3145. .type = TI_CLK_GATE,
  3146. .data = &dss_96m_fck_data,
  3147. };
  3148. static struct ti_clk_divider rm_ick_data = {
  3149. .parent = "l4_ick",
  3150. .bit_shift = 1,
  3151. .max_div = 3,
  3152. .reg = 0xc40,
  3153. .module = TI_CLKM_CM,
  3154. .flags = CLKF_INDEX_STARTS_AT_ONE,
  3155. };
  3156. static struct ti_clk rm_ick = {
  3157. .name = "rm_ick",
  3158. .type = TI_CLK_DIVIDER,
  3159. .data = &rm_ick_data,
  3160. };
  3161. static struct ti_clk_gate hdq_ick_data = {
  3162. .parent = "core_l4_ick",
  3163. .bit_shift = 22,
  3164. .reg = 0xa10,
  3165. .module = TI_CLKM_CM,
  3166. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3167. };
  3168. static struct ti_clk hdq_ick = {
  3169. .name = "hdq_ick",
  3170. .clkdm_name = "core_l4_clkdm",
  3171. .type = TI_CLK_GATE,
  3172. .data = &hdq_ick_data,
  3173. };
  3174. static struct ti_clk_fixed_factor dpll3_x2_ck_data = {
  3175. .parent = "dpll3_ck",
  3176. .div = 1,
  3177. .mult = 2,
  3178. };
  3179. static struct ti_clk dpll3_x2_ck = {
  3180. .name = "dpll3_x2_ck",
  3181. .type = TI_CLK_FIXED_FACTOR,
  3182. .data = &dpll3_x2_ck_data,
  3183. };
  3184. static struct ti_clk_gate mad2d_ick_data = {
  3185. .parent = "l3_ick",
  3186. .bit_shift = 3,
  3187. .reg = 0xa18,
  3188. .module = TI_CLKM_CM,
  3189. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3190. };
  3191. static struct ti_clk mad2d_ick = {
  3192. .name = "mad2d_ick",
  3193. .clkdm_name = "d2d_clkdm",
  3194. .type = TI_CLK_GATE,
  3195. .data = &mad2d_ick_data,
  3196. };
  3197. static struct ti_clk_gate fshostusb_fck_data = {
  3198. .parent = "core_48m_fck",
  3199. .bit_shift = 5,
  3200. .reg = 0xa00,
  3201. .module = TI_CLKM_CM,
  3202. .flags = CLKF_WAIT,
  3203. };
  3204. static struct ti_clk fshostusb_fck = {
  3205. .name = "fshostusb_fck",
  3206. .clkdm_name = "core_l4_clkdm",
  3207. .type = TI_CLK_GATE,
  3208. .data = &fshostusb_fck_data,
  3209. };
  3210. static struct ti_clk_gate sr1_fck_data = {
  3211. .parent = "sys_ck",
  3212. .bit_shift = 6,
  3213. .reg = 0xc00,
  3214. .module = TI_CLKM_CM,
  3215. .flags = CLKF_WAIT,
  3216. };
  3217. static struct ti_clk sr1_fck = {
  3218. .name = "sr1_fck",
  3219. .clkdm_name = "wkup_clkdm",
  3220. .type = TI_CLK_GATE,
  3221. .data = &sr1_fck_data,
  3222. };
  3223. static struct ti_clk_gate des2_ick_data = {
  3224. .parent = "core_l4_ick",
  3225. .bit_shift = 26,
  3226. .reg = 0xa10,
  3227. .module = TI_CLKM_CM,
  3228. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3229. };
  3230. static struct ti_clk des2_ick = {
  3231. .name = "des2_ick",
  3232. .clkdm_name = "core_l4_clkdm",
  3233. .type = TI_CLK_GATE,
  3234. .data = &des2_ick_data,
  3235. };
  3236. static struct ti_clk_gate sdrc_ick_data = {
  3237. .parent = "core_l3_ick",
  3238. .bit_shift = 1,
  3239. .reg = 0xa10,
  3240. .module = TI_CLKM_CM,
  3241. .flags = CLKF_WAIT,
  3242. };
  3243. static struct ti_clk sdrc_ick = {
  3244. .name = "sdrc_ick",
  3245. .clkdm_name = "core_l3_clkdm",
  3246. .type = TI_CLK_GATE,
  3247. .data = &sdrc_ick_data,
  3248. };
  3249. static struct ti_clk_composite gpt4_fck_data = {
  3250. .mux = &gpt4_mux_fck_data,
  3251. .gate = &gpt4_gate_fck_data,
  3252. };
  3253. static struct ti_clk gpt4_fck = {
  3254. .name = "gpt4_fck",
  3255. .type = TI_CLK_COMPOSITE,
  3256. .data = &gpt4_fck_data,
  3257. };
  3258. static struct ti_clk_gate dpll4_m3x2_ck_omap36xx_data = {
  3259. .parent = "dpll4_m3x2_mul_ck",
  3260. .bit_shift = 0x1c,
  3261. .reg = 0xd00,
  3262. .module = TI_CLKM_CM,
  3263. .flags = CLKF_HSDIV | CLKF_SET_BIT_TO_DISABLE,
  3264. };
  3265. static struct ti_clk dpll4_m3x2_ck_omap36xx = {
  3266. .name = "dpll4_m3x2_ck",
  3267. .type = TI_CLK_GATE,
  3268. .data = &dpll4_m3x2_ck_omap36xx_data,
  3269. .patch = &dpll4_m3x2_ck,
  3270. };
  3271. static struct ti_clk_gate cpefuse_fck_data = {
  3272. .parent = "sys_ck",
  3273. .bit_shift = 0,
  3274. .reg = 0xa08,
  3275. .module = TI_CLKM_CM,
  3276. };
  3277. static struct ti_clk cpefuse_fck = {
  3278. .name = "cpefuse_fck",
  3279. .clkdm_name = "core_l4_clkdm",
  3280. .type = TI_CLK_GATE,
  3281. .data = &cpefuse_fck_data,
  3282. };
  3283. static struct ti_clk_gate mcspi3_ick_data = {
  3284. .parent = "core_l4_ick",
  3285. .bit_shift = 20,
  3286. .reg = 0xa10,
  3287. .module = TI_CLKM_CM,
  3288. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3289. };
  3290. static struct ti_clk mcspi3_ick = {
  3291. .name = "mcspi3_ick",
  3292. .clkdm_name = "core_l4_clkdm",
  3293. .type = TI_CLK_GATE,
  3294. .data = &mcspi3_ick_data,
  3295. };
  3296. static struct ti_clk_fixed_factor ssi_sst_fck_3430es2_data = {
  3297. .parent = "ssi_ssr_fck",
  3298. .div = 2,
  3299. .mult = 1,
  3300. };
  3301. static struct ti_clk ssi_sst_fck_3430es2 = {
  3302. .name = "ssi_sst_fck",
  3303. .type = TI_CLK_FIXED_FACTOR,
  3304. .data = &ssi_sst_fck_3430es2_data,
  3305. };
  3306. static struct ti_clk_gate gpio1_dbck_data = {
  3307. .parent = "wkup_32k_fck",
  3308. .bit_shift = 3,
  3309. .reg = 0xc00,
  3310. .module = TI_CLKM_CM,
  3311. };
  3312. static struct ti_clk gpio1_dbck = {
  3313. .name = "gpio1_dbck",
  3314. .clkdm_name = "wkup_clkdm",
  3315. .type = TI_CLK_GATE,
  3316. .data = &gpio1_dbck_data,
  3317. };
  3318. static struct ti_clk_gate gpt4_ick_data = {
  3319. .parent = "per_l4_ick",
  3320. .bit_shift = 5,
  3321. .reg = 0x1010,
  3322. .module = TI_CLKM_CM,
  3323. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3324. };
  3325. static struct ti_clk gpt4_ick = {
  3326. .name = "gpt4_ick",
  3327. .clkdm_name = "per_clkdm",
  3328. .type = TI_CLK_GATE,
  3329. .data = &gpt4_ick_data,
  3330. };
  3331. static struct ti_clk_gate gpt2_ick_data = {
  3332. .parent = "per_l4_ick",
  3333. .bit_shift = 3,
  3334. .reg = 0x1010,
  3335. .module = TI_CLKM_CM,
  3336. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3337. };
  3338. static struct ti_clk gpt2_ick = {
  3339. .name = "gpt2_ick",
  3340. .clkdm_name = "per_clkdm",
  3341. .type = TI_CLK_GATE,
  3342. .data = &gpt2_ick_data,
  3343. };
  3344. static struct ti_clk_gate mmchs1_fck_data = {
  3345. .parent = "core_96m_fck",
  3346. .bit_shift = 24,
  3347. .reg = 0xa00,
  3348. .module = TI_CLKM_CM,
  3349. .flags = CLKF_WAIT,
  3350. };
  3351. static struct ti_clk mmchs1_fck = {
  3352. .name = "mmchs1_fck",
  3353. .clkdm_name = "core_l4_clkdm",
  3354. .type = TI_CLK_GATE,
  3355. .data = &mmchs1_fck_data,
  3356. };
  3357. static struct ti_clk_fixed dummy_apb_pclk_data = {
  3358. .frequency = 0x0,
  3359. };
  3360. static struct ti_clk dummy_apb_pclk = {
  3361. .name = "dummy_apb_pclk",
  3362. .type = TI_CLK_FIXED,
  3363. .data = &dummy_apb_pclk_data,
  3364. };
  3365. static struct ti_clk_gate gpio6_dbck_data = {
  3366. .parent = "per_32k_alwon_fck",
  3367. .bit_shift = 17,
  3368. .reg = 0x1000,
  3369. .module = TI_CLKM_CM,
  3370. };
  3371. static struct ti_clk gpio6_dbck = {
  3372. .name = "gpio6_dbck",
  3373. .clkdm_name = "per_clkdm",
  3374. .type = TI_CLK_GATE,
  3375. .data = &gpio6_dbck_data,
  3376. };
  3377. static struct ti_clk_gate uart2_ick_data = {
  3378. .parent = "core_l4_ick",
  3379. .bit_shift = 14,
  3380. .reg = 0xa10,
  3381. .module = TI_CLKM_CM,
  3382. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3383. };
  3384. static struct ti_clk uart2_ick = {
  3385. .name = "uart2_ick",
  3386. .clkdm_name = "core_l4_clkdm",
  3387. .type = TI_CLK_GATE,
  3388. .data = &uart2_ick_data,
  3389. };
  3390. static struct ti_clk_fixed_factor dpll4_x2_ck_data = {
  3391. .parent = "dpll4_ck",
  3392. .div = 1,
  3393. .mult = 2,
  3394. };
  3395. static struct ti_clk dpll4_x2_ck = {
  3396. .name = "dpll4_x2_ck",
  3397. .type = TI_CLK_FIXED_FACTOR,
  3398. .data = &dpll4_x2_ck_data,
  3399. };
  3400. static struct ti_clk_gate gpt7_ick_data = {
  3401. .parent = "per_l4_ick",
  3402. .bit_shift = 8,
  3403. .reg = 0x1010,
  3404. .module = TI_CLKM_CM,
  3405. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3406. };
  3407. static struct ti_clk gpt7_ick = {
  3408. .name = "gpt7_ick",
  3409. .clkdm_name = "per_clkdm",
  3410. .type = TI_CLK_GATE,
  3411. .data = &gpt7_ick_data,
  3412. };
  3413. static struct ti_clk_gate dss_tv_fck_data = {
  3414. .parent = "omap_54m_fck",
  3415. .bit_shift = 2,
  3416. .reg = 0xe00,
  3417. .module = TI_CLKM_CM,
  3418. };
  3419. static struct ti_clk dss_tv_fck = {
  3420. .name = "dss_tv_fck",
  3421. .clkdm_name = "dss_clkdm",
  3422. .type = TI_CLK_GATE,
  3423. .data = &dss_tv_fck_data,
  3424. };
  3425. static struct ti_clk_gate mcbsp5_ick_data = {
  3426. .parent = "core_l4_ick",
  3427. .bit_shift = 10,
  3428. .reg = 0xa10,
  3429. .module = TI_CLKM_CM,
  3430. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3431. };
  3432. static struct ti_clk mcbsp5_ick = {
  3433. .name = "mcbsp5_ick",
  3434. .clkdm_name = "core_l4_clkdm",
  3435. .type = TI_CLK_GATE,
  3436. .data = &mcbsp5_ick_data,
  3437. };
  3438. static struct ti_clk_gate mcspi1_ick_data = {
  3439. .parent = "core_l4_ick",
  3440. .bit_shift = 18,
  3441. .reg = 0xa10,
  3442. .module = TI_CLKM_CM,
  3443. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3444. };
  3445. static struct ti_clk mcspi1_ick = {
  3446. .name = "mcspi1_ick",
  3447. .clkdm_name = "core_l4_clkdm",
  3448. .type = TI_CLK_GATE,
  3449. .data = &mcspi1_ick_data,
  3450. };
  3451. static struct ti_clk_gate d2d_26m_fck_data = {
  3452. .parent = "sys_ck",
  3453. .bit_shift = 3,
  3454. .reg = 0xa00,
  3455. .module = TI_CLKM_CM,
  3456. .flags = CLKF_WAIT,
  3457. };
  3458. static struct ti_clk d2d_26m_fck = {
  3459. .name = "d2d_26m_fck",
  3460. .clkdm_name = "d2d_clkdm",
  3461. .type = TI_CLK_GATE,
  3462. .data = &d2d_26m_fck_data,
  3463. };
  3464. static struct ti_clk_gate wdt3_ick_data = {
  3465. .parent = "per_l4_ick",
  3466. .bit_shift = 12,
  3467. .reg = 0x1010,
  3468. .module = TI_CLKM_CM,
  3469. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3470. };
  3471. static struct ti_clk wdt3_ick = {
  3472. .name = "wdt3_ick",
  3473. .clkdm_name = "per_clkdm",
  3474. .type = TI_CLK_GATE,
  3475. .data = &wdt3_ick_data,
  3476. };
  3477. static struct ti_clk_divider pclkx2_fck_data = {
  3478. .parent = "emu_src_ck",
  3479. .bit_shift = 6,
  3480. .max_div = 3,
  3481. .reg = 0x1140,
  3482. .module = TI_CLKM_CM,
  3483. .flags = CLKF_INDEX_STARTS_AT_ONE,
  3484. };
  3485. static struct ti_clk pclkx2_fck = {
  3486. .name = "pclkx2_fck",
  3487. .type = TI_CLK_DIVIDER,
  3488. .data = &pclkx2_fck_data,
  3489. };
  3490. static struct ti_clk_gate sha12_ick_data = {
  3491. .parent = "core_l4_ick",
  3492. .bit_shift = 27,
  3493. .reg = 0xa10,
  3494. .module = TI_CLKM_CM,
  3495. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3496. };
  3497. static struct ti_clk sha12_ick = {
  3498. .name = "sha12_ick",
  3499. .clkdm_name = "core_l4_clkdm",
  3500. .type = TI_CLK_GATE,
  3501. .data = &sha12_ick_data,
  3502. };
  3503. static struct ti_clk_gate emac_fck_data = {
  3504. .parent = "rmii_ck",
  3505. .bit_shift = 9,
  3506. .reg = 0x59c,
  3507. .module = TI_CLKM_SCRM,
  3508. };
  3509. static struct ti_clk emac_fck = {
  3510. .name = "emac_fck",
  3511. .type = TI_CLK_GATE,
  3512. .data = &emac_fck_data,
  3513. };
  3514. static struct ti_clk_composite gpt10_fck_data = {
  3515. .mux = &gpt10_mux_fck_data,
  3516. .gate = &gpt10_gate_fck_data,
  3517. };
  3518. static struct ti_clk gpt10_fck = {
  3519. .name = "gpt10_fck",
  3520. .type = TI_CLK_COMPOSITE,
  3521. .data = &gpt10_fck_data,
  3522. };
  3523. static struct ti_clk_gate wdt2_fck_data = {
  3524. .parent = "wkup_32k_fck",
  3525. .bit_shift = 5,
  3526. .reg = 0xc00,
  3527. .module = TI_CLKM_CM,
  3528. .flags = CLKF_WAIT,
  3529. };
  3530. static struct ti_clk wdt2_fck = {
  3531. .name = "wdt2_fck",
  3532. .clkdm_name = "wkup_clkdm",
  3533. .type = TI_CLK_GATE,
  3534. .data = &wdt2_fck_data,
  3535. };
  3536. static struct ti_clk_gate cam_ick_data = {
  3537. .parent = "l4_ick",
  3538. .bit_shift = 0,
  3539. .reg = 0xf10,
  3540. .module = TI_CLKM_CM,
  3541. .flags = CLKF_OMAP3 | CLKF_NO_WAIT | CLKF_INTERFACE,
  3542. };
  3543. static struct ti_clk cam_ick = {
  3544. .name = "cam_ick",
  3545. .clkdm_name = "cam_clkdm",
  3546. .type = TI_CLK_GATE,
  3547. .data = &cam_ick_data,
  3548. };
  3549. static struct ti_clk_gate ssi_ick_3430es2_data = {
  3550. .parent = "ssi_l4_ick",
  3551. .bit_shift = 0,
  3552. .reg = 0xa10,
  3553. .module = TI_CLKM_CM,
  3554. .flags = CLKF_SSI | CLKF_OMAP3 | CLKF_INTERFACE,
  3555. };
  3556. static struct ti_clk ssi_ick_3430es2 = {
  3557. .name = "ssi_ick",
  3558. .clkdm_name = "core_l4_clkdm",
  3559. .type = TI_CLK_GATE,
  3560. .data = &ssi_ick_3430es2_data,
  3561. };
  3562. static struct ti_clk_gate gpio4_ick_data = {
  3563. .parent = "per_l4_ick",
  3564. .bit_shift = 15,
  3565. .reg = 0x1010,
  3566. .module = TI_CLKM_CM,
  3567. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3568. };
  3569. static struct ti_clk gpio4_ick = {
  3570. .name = "gpio4_ick",
  3571. .clkdm_name = "per_clkdm",
  3572. .type = TI_CLK_GATE,
  3573. .data = &gpio4_ick_data,
  3574. };
  3575. static struct ti_clk_gate wdt1_ick_data = {
  3576. .parent = "wkup_l4_ick",
  3577. .bit_shift = 4,
  3578. .reg = 0xc10,
  3579. .module = TI_CLKM_CM,
  3580. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3581. };
  3582. static struct ti_clk wdt1_ick = {
  3583. .name = "wdt1_ick",
  3584. .clkdm_name = "wkup_clkdm",
  3585. .type = TI_CLK_GATE,
  3586. .data = &wdt1_ick_data,
  3587. };
  3588. static struct ti_clk_gate rng_ick_data = {
  3589. .parent = "security_l4_ick2",
  3590. .bit_shift = 2,
  3591. .reg = 0xa14,
  3592. .module = TI_CLKM_CM,
  3593. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3594. };
  3595. static struct ti_clk rng_ick = {
  3596. .name = "rng_ick",
  3597. .type = TI_CLK_GATE,
  3598. .data = &rng_ick_data,
  3599. };
  3600. static struct ti_clk_gate icr_ick_data = {
  3601. .parent = "core_l4_ick",
  3602. .bit_shift = 29,
  3603. .reg = 0xa10,
  3604. .module = TI_CLKM_CM,
  3605. .flags = CLKF_OMAP3 | CLKF_INTERFACE,
  3606. };
  3607. static struct ti_clk icr_ick = {
  3608. .name = "icr_ick",
  3609. .clkdm_name = "core_l4_clkdm",
  3610. .type = TI_CLK_GATE,
  3611. .data = &icr_ick_data,
  3612. };
  3613. static struct ti_clk_gate sgx_ick_data = {
  3614. .parent = "l3_ick",
  3615. .bit_shift = 0,
  3616. .reg = 0xb10,
  3617. .module = TI_CLKM_CM,
  3618. .flags = CLKF_WAIT,
  3619. };
  3620. static struct ti_clk sgx_ick = {
  3621. .name = "sgx_ick",
  3622. .clkdm_name = "sgx_clkdm",
  3623. .type = TI_CLK_GATE,
  3624. .data = &sgx_ick_data,
  3625. };
  3626. static struct ti_clk_divider sys_clkout2_data = {
  3627. .parent = "clkout2_src_ck",
  3628. .bit_shift = 3,
  3629. .max_div = 64,
  3630. .reg = 0xd70,
  3631. .module = TI_CLKM_CM,
  3632. .flags = CLKF_INDEX_POWER_OF_TWO,
  3633. };
  3634. static struct ti_clk sys_clkout2 = {
  3635. .name = "sys_clkout2",
  3636. .type = TI_CLK_DIVIDER,
  3637. .data = &sys_clkout2_data,
  3638. };
  3639. static struct ti_clk_alias omap34xx_omap36xx_clks[] = {
  3640. CLK(NULL, "security_l4_ick2", &security_l4_ick2),
  3641. CLK(NULL, "aes1_ick", &aes1_ick),
  3642. CLK("omap_rng", "ick", &rng_ick),
  3643. CLK("omap3-rom-rng", "ick", &rng_ick),
  3644. CLK(NULL, "sha11_ick", &sha11_ick),
  3645. CLK(NULL, "des1_ick", &des1_ick),
  3646. CLK(NULL, "cam_mclk", &cam_mclk),
  3647. CLK(NULL, "cam_ick", &cam_ick),
  3648. CLK(NULL, "csi2_96m_fck", &csi2_96m_fck),
  3649. CLK(NULL, "security_l3_ick", &security_l3_ick),
  3650. CLK(NULL, "pka_ick", &pka_ick),
  3651. CLK(NULL, "icr_ick", &icr_ick),
  3652. CLK(NULL, "des2_ick", &des2_ick),
  3653. CLK(NULL, "mspro_ick", &mspro_ick),
  3654. CLK(NULL, "mailboxes_ick", &mailboxes_ick),
  3655. CLK(NULL, "ssi_l4_ick", &ssi_l4_ick),
  3656. CLK(NULL, "sr1_fck", &sr1_fck),
  3657. CLK(NULL, "sr2_fck", &sr2_fck),
  3658. CLK(NULL, "sr_l4_ick", &sr_l4_ick),
  3659. CLK(NULL, "dpll2_fck", &dpll2_fck),
  3660. CLK(NULL, "dpll2_ck", &dpll2_ck),
  3661. CLK(NULL, "dpll2_m2_ck", &dpll2_m2_ck),
  3662. CLK(NULL, "iva2_ck", &iva2_ck),
  3663. CLK(NULL, "modem_fck", &modem_fck),
  3664. CLK(NULL, "sad2d_ick", &sad2d_ick),
  3665. CLK(NULL, "mad2d_ick", &mad2d_ick),
  3666. CLK(NULL, "mspro_fck", &mspro_fck),
  3667. { NULL },
  3668. };
  3669. static struct ti_clk_alias omap36xx_omap3430es2plus_clks[] = {
  3670. CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2),
  3671. CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es2),
  3672. CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2),
  3673. CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es2),
  3674. CLK(NULL, "ssi_ick", &ssi_ick_3430es2),
  3675. CLK(NULL, "sys_d2_ck", &sys_d2_ck),
  3676. CLK(NULL, "omap_96m_d2_fck", &omap_96m_d2_fck),
  3677. CLK(NULL, "omap_96m_d4_fck", &omap_96m_d4_fck),
  3678. CLK(NULL, "omap_96m_d8_fck", &omap_96m_d8_fck),
  3679. CLK(NULL, "omap_96m_d10_fck", &omap_96m_d10_fck),
  3680. CLK(NULL, "dpll5_m2_d4_ck", &dpll5_m2_d4_ck),
  3681. CLK(NULL, "dpll5_m2_d8_ck", &dpll5_m2_d8_ck),
  3682. CLK(NULL, "dpll5_m2_d16_ck", &dpll5_m2_d16_ck),
  3683. CLK(NULL, "dpll5_m2_d20_ck", &dpll5_m2_d20_ck),
  3684. CLK(NULL, "usim_fck", &usim_fck),
  3685. CLK(NULL, "usim_ick", &usim_ick),
  3686. { NULL },
  3687. };
  3688. static struct ti_clk_alias omap3xxx_clks[] = {
  3689. CLK(NULL, "apb_pclk", &dummy_apb_pclk),
  3690. CLK(NULL, "omap_32k_fck", &omap_32k_fck),
  3691. CLK(NULL, "virt_12m_ck", &virt_12m_ck),
  3692. CLK(NULL, "virt_13m_ck", &virt_13m_ck),
  3693. CLK(NULL, "virt_19200000_ck", &virt_19200000_ck),
  3694. CLK(NULL, "virt_26000000_ck", &virt_26000000_ck),
  3695. CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck),
  3696. CLK(NULL, "virt_16_8m_ck", &virt_16_8m_ck),
  3697. CLK(NULL, "osc_sys_ck", &osc_sys_ck),
  3698. CLK("twl", "fck", &osc_sys_ck),
  3699. CLK(NULL, "sys_ck", &sys_ck),
  3700. CLK(NULL, "timer_sys_ck", &sys_ck),
  3701. CLK(NULL, "dpll4_ck", &dpll4_ck),
  3702. CLK(NULL, "dpll4_m2_ck", &dpll4_m2_ck),
  3703. CLK(NULL, "dpll4_m2x2_mul_ck", &dpll4_m2x2_mul_ck),
  3704. CLK(NULL, "dpll4_m2x2_ck", &dpll4_m2x2_ck),
  3705. CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck),
  3706. CLK(NULL, "dpll3_ck", &dpll3_ck),
  3707. CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck),
  3708. CLK(NULL, "dpll3_m3x2_mul_ck", &dpll3_m3x2_mul_ck),
  3709. CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck),
  3710. CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck),
  3711. CLK(NULL, "sys_altclk", &sys_altclk),
  3712. CLK(NULL, "sys_clkout1", &sys_clkout1),
  3713. CLK(NULL, "dpll3_m2_ck", &dpll3_m2_ck),
  3714. CLK(NULL, "core_ck", &core_ck),
  3715. CLK(NULL, "dpll1_fck", &dpll1_fck),
  3716. CLK(NULL, "dpll1_ck", &dpll1_ck),
  3717. CLK(NULL, "cpufreq_ck", &dpll1_ck),
  3718. CLK(NULL, "dpll1_x2_ck", &dpll1_x2_ck),
  3719. CLK(NULL, "dpll1_x2m2_ck", &dpll1_x2m2_ck),
  3720. CLK(NULL, "dpll3_x2_ck", &dpll3_x2_ck),
  3721. CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck),
  3722. CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck),
  3723. CLK(NULL, "cm_96m_fck", &cm_96m_fck),
  3724. CLK(NULL, "omap_96m_fck", &omap_96m_fck),
  3725. CLK(NULL, "dpll4_m3_ck", &dpll4_m3_ck),
  3726. CLK(NULL, "dpll4_m3x2_mul_ck", &dpll4_m3x2_mul_ck),
  3727. CLK(NULL, "dpll4_m3x2_ck", &dpll4_m3x2_ck),
  3728. CLK(NULL, "omap_54m_fck", &omap_54m_fck),
  3729. CLK(NULL, "cm_96m_d2_fck", &cm_96m_d2_fck),
  3730. CLK(NULL, "omap_48m_fck", &omap_48m_fck),
  3731. CLK(NULL, "omap_12m_fck", &omap_12m_fck),
  3732. CLK(NULL, "dpll4_m4_ck", &dpll4_m4_ck),
  3733. CLK(NULL, "dpll4_m4x2_mul_ck", &dpll4_m4x2_mul_ck),
  3734. CLK(NULL, "dpll4_m4x2_ck", &dpll4_m4x2_ck),
  3735. CLK(NULL, "dpll4_m5_ck", &dpll4_m5_ck),
  3736. CLK(NULL, "dpll4_m5x2_mul_ck", &dpll4_m5x2_mul_ck),
  3737. CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck),
  3738. CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck),
  3739. CLK(NULL, "dpll4_m6x2_mul_ck", &dpll4_m6x2_mul_ck),
  3740. CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck),
  3741. CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck),
  3742. CLK(NULL, "clkout2_src_ck", &clkout2_src_ck),
  3743. CLK(NULL, "sys_clkout2", &sys_clkout2),
  3744. CLK(NULL, "corex2_fck", &corex2_fck),
  3745. CLK(NULL, "mpu_ck", &mpu_ck),
  3746. CLK(NULL, "arm_fck", &arm_fck),
  3747. CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck),
  3748. CLK(NULL, "l3_ick", &l3_ick),
  3749. CLK(NULL, "l4_ick", &l4_ick),
  3750. CLK(NULL, "rm_ick", &rm_ick),
  3751. CLK(NULL, "timer_32k_ck", &omap_32k_fck),
  3752. CLK(NULL, "gpt10_fck", &gpt10_fck),
  3753. CLK(NULL, "gpt11_fck", &gpt11_fck),
  3754. CLK(NULL, "core_96m_fck", &core_96m_fck),
  3755. CLK(NULL, "mmchs2_fck", &mmchs2_fck),
  3756. CLK(NULL, "mmchs1_fck", &mmchs1_fck),
  3757. CLK(NULL, "i2c3_fck", &i2c3_fck),
  3758. CLK(NULL, "i2c2_fck", &i2c2_fck),
  3759. CLK(NULL, "i2c1_fck", &i2c1_fck),
  3760. CLK(NULL, "core_48m_fck", &core_48m_fck),
  3761. CLK(NULL, "mcspi4_fck", &mcspi4_fck),
  3762. CLK(NULL, "mcspi3_fck", &mcspi3_fck),
  3763. CLK(NULL, "mcspi2_fck", &mcspi2_fck),
  3764. CLK(NULL, "mcspi1_fck", &mcspi1_fck),
  3765. CLK(NULL, "uart2_fck", &uart2_fck),
  3766. CLK(NULL, "uart1_fck", &uart1_fck),
  3767. CLK(NULL, "core_12m_fck", &core_12m_fck),
  3768. CLK("omap_hdq.0", "fck", &hdq_fck),
  3769. CLK(NULL, "hdq_fck", &hdq_fck),
  3770. CLK(NULL, "core_l3_ick", &core_l3_ick),
  3771. CLK(NULL, "sdrc_ick", &sdrc_ick),
  3772. CLK(NULL, "gpmc_fck", &gpmc_fck),
  3773. CLK(NULL, "core_l4_ick", &core_l4_ick),
  3774. CLK("omap_hsmmc.1", "ick", &mmchs2_ick),
  3775. CLK("omap_hsmmc.0", "ick", &mmchs1_ick),
  3776. CLK(NULL, "mmchs2_ick", &mmchs2_ick),
  3777. CLK(NULL, "mmchs1_ick", &mmchs1_ick),
  3778. CLK("omap_hdq.0", "ick", &hdq_ick),
  3779. CLK(NULL, "hdq_ick", &hdq_ick),
  3780. CLK("omap2_mcspi.4", "ick", &mcspi4_ick),
  3781. CLK("omap2_mcspi.3", "ick", &mcspi3_ick),
  3782. CLK("omap2_mcspi.2", "ick", &mcspi2_ick),
  3783. CLK("omap2_mcspi.1", "ick", &mcspi1_ick),
  3784. CLK(NULL, "mcspi4_ick", &mcspi4_ick),
  3785. CLK(NULL, "mcspi3_ick", &mcspi3_ick),
  3786. CLK(NULL, "mcspi2_ick", &mcspi2_ick),
  3787. CLK(NULL, "mcspi1_ick", &mcspi1_ick),
  3788. CLK("omap_i2c.3", "ick", &i2c3_ick),
  3789. CLK("omap_i2c.2", "ick", &i2c2_ick),
  3790. CLK("omap_i2c.1", "ick", &i2c1_ick),
  3791. CLK(NULL, "i2c3_ick", &i2c3_ick),
  3792. CLK(NULL, "i2c2_ick", &i2c2_ick),
  3793. CLK(NULL, "i2c1_ick", &i2c1_ick),
  3794. CLK(NULL, "uart2_ick", &uart2_ick),
  3795. CLK(NULL, "uart1_ick", &uart1_ick),
  3796. CLK(NULL, "gpt11_ick", &gpt11_ick),
  3797. CLK(NULL, "gpt10_ick", &gpt10_ick),
  3798. CLK(NULL, "mcbsp5_ick", &mcbsp5_ick),
  3799. CLK(NULL, "mcbsp1_ick", &mcbsp1_ick),
  3800. CLK(NULL, "omapctrl_ick", &omapctrl_ick),
  3801. CLK(NULL, "dss_tv_fck", &dss_tv_fck),
  3802. CLK(NULL, "dss_96m_fck", &dss_96m_fck),
  3803. CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck),
  3804. CLK(NULL, "init_60m_fclk", &dummy_ck),
  3805. CLK(NULL, "gpt1_fck", &gpt1_fck),
  3806. CLK(NULL, "aes2_ick", &aes2_ick),
  3807. CLK(NULL, "wkup_32k_fck", &wkup_32k_fck),
  3808. CLK(NULL, "gpio1_dbck", &gpio1_dbck),
  3809. CLK(NULL, "sha12_ick", &sha12_ick),
  3810. CLK(NULL, "wdt2_fck", &wdt2_fck),
  3811. CLK(NULL, "wkup_l4_ick", &wkup_l4_ick),
  3812. CLK("omap_wdt", "ick", &wdt2_ick),
  3813. CLK(NULL, "wdt2_ick", &wdt2_ick),
  3814. CLK(NULL, "wdt1_ick", &wdt1_ick),
  3815. CLK(NULL, "gpio1_ick", &gpio1_ick),
  3816. CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick),
  3817. CLK(NULL, "gpt12_ick", &gpt12_ick),
  3818. CLK(NULL, "gpt1_ick", &gpt1_ick),
  3819. CLK(NULL, "per_96m_fck", &per_96m_fck),
  3820. CLK(NULL, "per_48m_fck", &per_48m_fck),
  3821. CLK(NULL, "uart3_fck", &uart3_fck),
  3822. CLK(NULL, "gpt2_fck", &gpt2_fck),
  3823. CLK(NULL, "gpt3_fck", &gpt3_fck),
  3824. CLK(NULL, "gpt4_fck", &gpt4_fck),
  3825. CLK(NULL, "gpt5_fck", &gpt5_fck),
  3826. CLK(NULL, "gpt6_fck", &gpt6_fck),
  3827. CLK(NULL, "gpt7_fck", &gpt7_fck),
  3828. CLK(NULL, "gpt8_fck", &gpt8_fck),
  3829. CLK(NULL, "gpt9_fck", &gpt9_fck),
  3830. CLK(NULL, "per_32k_alwon_fck", &per_32k_alwon_fck),
  3831. CLK(NULL, "gpio6_dbck", &gpio6_dbck),
  3832. CLK(NULL, "gpio5_dbck", &gpio5_dbck),
  3833. CLK(NULL, "gpio4_dbck", &gpio4_dbck),
  3834. CLK(NULL, "gpio3_dbck", &gpio3_dbck),
  3835. CLK(NULL, "gpio2_dbck", &gpio2_dbck),
  3836. CLK(NULL, "wdt3_fck", &wdt3_fck),
  3837. CLK(NULL, "per_l4_ick", &per_l4_ick),
  3838. CLK(NULL, "gpio6_ick", &gpio6_ick),
  3839. CLK(NULL, "gpio5_ick", &gpio5_ick),
  3840. CLK(NULL, "gpio4_ick", &gpio4_ick),
  3841. CLK(NULL, "gpio3_ick", &gpio3_ick),
  3842. CLK(NULL, "gpio2_ick", &gpio2_ick),
  3843. CLK(NULL, "wdt3_ick", &wdt3_ick),
  3844. CLK(NULL, "uart3_ick", &uart3_ick),
  3845. CLK(NULL, "uart4_ick", &uart4_ick),
  3846. CLK(NULL, "gpt9_ick", &gpt9_ick),
  3847. CLK(NULL, "gpt8_ick", &gpt8_ick),
  3848. CLK(NULL, "gpt7_ick", &gpt7_ick),
  3849. CLK(NULL, "gpt6_ick", &gpt6_ick),
  3850. CLK(NULL, "gpt5_ick", &gpt5_ick),
  3851. CLK(NULL, "gpt4_ick", &gpt4_ick),
  3852. CLK(NULL, "gpt3_ick", &gpt3_ick),
  3853. CLK(NULL, "gpt2_ick", &gpt2_ick),
  3854. CLK(NULL, "mcbsp_clks", &mcbsp_clks),
  3855. CLK("omap-mcbsp.1", "ick", &mcbsp1_ick),
  3856. CLK("omap-mcbsp.2", "ick", &mcbsp2_ick),
  3857. CLK("omap-mcbsp.3", "ick", &mcbsp3_ick),
  3858. CLK("omap-mcbsp.4", "ick", &mcbsp4_ick),
  3859. CLK("omap-mcbsp.5", "ick", &mcbsp5_ick),
  3860. CLK(NULL, "mcbsp1_ick", &mcbsp1_ick),
  3861. CLK(NULL, "mcbsp2_ick", &mcbsp2_ick),
  3862. CLK(NULL, "mcbsp3_ick", &mcbsp3_ick),
  3863. CLK(NULL, "mcbsp4_ick", &mcbsp4_ick),
  3864. CLK(NULL, "mcbsp5_ick", &mcbsp5_ick),
  3865. CLK(NULL, "mcbsp1_fck", &mcbsp1_fck),
  3866. CLK(NULL, "mcbsp2_fck", &mcbsp2_fck),
  3867. CLK(NULL, "mcbsp3_fck", &mcbsp3_fck),
  3868. CLK(NULL, "mcbsp4_fck", &mcbsp4_fck),
  3869. CLK(NULL, "mcbsp5_fck", &mcbsp5_fck),
  3870. CLK(NULL, "emu_src_mux_ck", &emu_src_mux_ck),
  3871. CLK("etb", "emu_src_ck", &emu_src_ck),
  3872. CLK(NULL, "emu_src_mux_ck", &emu_src_mux_ck),
  3873. CLK(NULL, "emu_src_ck", &emu_src_ck),
  3874. CLK(NULL, "pclk_fck", &pclk_fck),
  3875. CLK(NULL, "pclkx2_fck", &pclkx2_fck),
  3876. CLK(NULL, "atclk_fck", &atclk_fck),
  3877. CLK(NULL, "traceclk_src_fck", &traceclk_src_fck),
  3878. CLK(NULL, "traceclk_fck", &traceclk_fck),
  3879. CLK(NULL, "secure_32k_fck", &secure_32k_fck),
  3880. CLK(NULL, "gpt12_fck", &gpt12_fck),
  3881. CLK(NULL, "wdt1_fck", &wdt1_fck),
  3882. { NULL },
  3883. };
  3884. static struct ti_clk_alias omap36xx_am35xx_omap3430es2plus_clks[] = {
  3885. CLK(NULL, "dpll5_ck", &dpll5_ck),
  3886. CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck),
  3887. CLK(NULL, "core_d3_ck", &core_d3_ck),
  3888. CLK(NULL, "core_d4_ck", &core_d4_ck),
  3889. CLK(NULL, "core_d6_ck", &core_d6_ck),
  3890. CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck),
  3891. CLK(NULL, "core_d2_ck", &core_d2_ck),
  3892. CLK(NULL, "corex2_d3_fck", &corex2_d3_fck),
  3893. CLK(NULL, "corex2_d5_fck", &corex2_d5_fck),
  3894. CLK(NULL, "sgx_fck", &sgx_fck),
  3895. CLK(NULL, "sgx_ick", &sgx_ick),
  3896. CLK(NULL, "cpefuse_fck", &cpefuse_fck),
  3897. CLK(NULL, "ts_fck", &ts_fck),
  3898. CLK(NULL, "usbtll_fck", &usbtll_fck),
  3899. CLK(NULL, "usbtll_ick", &usbtll_ick),
  3900. CLK("omap_hsmmc.2", "ick", &mmchs3_ick),
  3901. CLK(NULL, "mmchs3_ick", &mmchs3_ick),
  3902. CLK(NULL, "mmchs3_fck", &mmchs3_fck),
  3903. CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es2),
  3904. CLK("omapdss_dss", "ick", &dss_ick_3430es2),
  3905. CLK(NULL, "dss_ick", &dss_ick_3430es2),
  3906. CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck),
  3907. CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck),
  3908. CLK(NULL, "usbhost_ick", &usbhost_ick),
  3909. { NULL },
  3910. };
  3911. static struct ti_clk_alias omap3430es1_clks[] = {
  3912. CLK(NULL, "gfx_l3_ck", &gfx_l3_ck),
  3913. CLK(NULL, "gfx_l3_fck", &gfx_l3_fck),
  3914. CLK(NULL, "gfx_l3_ick", &gfx_l3_ick),
  3915. CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck),
  3916. CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck),
  3917. CLK(NULL, "d2d_26m_fck", &d2d_26m_fck),
  3918. CLK(NULL, "fshostusb_fck", &fshostusb_fck),
  3919. CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1),
  3920. CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1),
  3921. CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1),
  3922. CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es1),
  3923. CLK(NULL, "fac_ick", &fac_ick),
  3924. CLK(NULL, "ssi_ick", &ssi_ick_3430es1),
  3925. CLK(NULL, "usb_l4_ick", &usb_l4_ick),
  3926. CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es1),
  3927. CLK("omapdss_dss", "ick", &dss_ick_3430es1),
  3928. CLK(NULL, "dss_ick", &dss_ick_3430es1),
  3929. { NULL },
  3930. };
  3931. static struct ti_clk_alias omap36xx_clks[] = {
  3932. CLK(NULL, "uart4_fck", &uart4_fck),
  3933. { NULL },
  3934. };
  3935. static struct ti_clk_alias am35xx_clks[] = {
  3936. CLK(NULL, "ipss_ick", &ipss_ick),
  3937. CLK(NULL, "rmii_ck", &rmii_ck),
  3938. CLK(NULL, "pclk_ck", &pclk_ck),
  3939. CLK(NULL, "emac_ick", &emac_ick),
  3940. CLK(NULL, "emac_fck", &emac_fck),
  3941. CLK("davinci_emac.0", NULL, &emac_ick),
  3942. CLK("davinci_mdio.0", NULL, &emac_fck),
  3943. CLK("vpfe-capture", "master", &vpfe_ick),
  3944. CLK("vpfe-capture", "slave", &vpfe_fck),
  3945. CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx),
  3946. CLK(NULL, "hsotgusb_fck", &hsotgusb_fck_am35xx),
  3947. CLK(NULL, "hecc_ck", &hecc_ck),
  3948. CLK(NULL, "uart4_ick", &uart4_ick_am35xx),
  3949. CLK(NULL, "uart4_fck", &uart4_fck_am35xx),
  3950. { NULL },
  3951. };
  3952. static struct ti_clk *omap36xx_clk_patches[] = {
  3953. &dpll4_m3x2_ck_omap36xx,
  3954. &dpll3_m3x2_ck_omap36xx,
  3955. &dpll4_m6x2_ck_omap36xx,
  3956. &dpll4_m2x2_ck_omap36xx,
  3957. &dpll4_m5x2_ck_omap36xx,
  3958. &dpll4_ck_omap36xx,
  3959. NULL,
  3960. };
  3961. static const char *enable_init_clks[] = {
  3962. "sdrc_ick",
  3963. "gpmc_fck",
  3964. "omapctrl_ick",
  3965. };
  3966. static void __init omap3_clk_legacy_common_init(void)
  3967. {
  3968. omap2_clk_disable_autoidle_all();
  3969. omap2_clk_enable_init_clocks(enable_init_clks,
  3970. ARRAY_SIZE(enable_init_clks));
  3971. pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
  3972. (clk_get_rate(osc_sys_ck.clk) / 1000000),
  3973. (clk_get_rate(osc_sys_ck.clk) / 100000) % 10,
  3974. (clk_get_rate(core_ck.clk) / 1000000),
  3975. (clk_get_rate(arm_fck.clk) / 1000000));
  3976. }
  3977. int __init omap3430es1_clk_legacy_init(void)
  3978. {
  3979. int r;
  3980. r = ti_clk_register_legacy_clks(omap3430es1_clks);
  3981. r |= ti_clk_register_legacy_clks(omap34xx_omap36xx_clks);
  3982. r |= ti_clk_register_legacy_clks(omap3xxx_clks);
  3983. omap3_clk_legacy_common_init();
  3984. return r;
  3985. }
  3986. int __init omap3430_clk_legacy_init(void)
  3987. {
  3988. int r;
  3989. r = ti_clk_register_legacy_clks(omap34xx_omap36xx_clks);
  3990. r |= ti_clk_register_legacy_clks(omap36xx_omap3430es2plus_clks);
  3991. r |= ti_clk_register_legacy_clks(omap36xx_am35xx_omap3430es2plus_clks);
  3992. r |= ti_clk_register_legacy_clks(omap3xxx_clks);
  3993. omap3_clk_legacy_common_init();
  3994. omap3_clk_lock_dpll5();
  3995. return r;
  3996. }
  3997. int __init omap36xx_clk_legacy_init(void)
  3998. {
  3999. int r;
  4000. ti_clk_patch_legacy_clks(omap36xx_clk_patches);
  4001. r = ti_clk_register_legacy_clks(omap36xx_clks);
  4002. r |= ti_clk_register_legacy_clks(omap36xx_omap3430es2plus_clks);
  4003. r |= ti_clk_register_legacy_clks(omap34xx_omap36xx_clks);
  4004. r |= ti_clk_register_legacy_clks(omap36xx_am35xx_omap3430es2plus_clks);
  4005. r |= ti_clk_register_legacy_clks(omap3xxx_clks);
  4006. omap3_clk_legacy_common_init();
  4007. omap3_clk_lock_dpll5();
  4008. return r;
  4009. }
  4010. int __init am35xx_clk_legacy_init(void)
  4011. {
  4012. int r;
  4013. r = ti_clk_register_legacy_clks(am35xx_clks);
  4014. r |= ti_clk_register_legacy_clks(omap36xx_am35xx_omap3430es2plus_clks);
  4015. r |= ti_clk_register_legacy_clks(omap3xxx_clks);
  4016. omap3_clk_legacy_common_init();
  4017. omap3_clk_lock_dpll5();
  4018. return r;
  4019. }