omap_hwmod_2430_data.c 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2010 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/gpio.h>
  21. #include <plat/mcbsp.h>
  22. #include <plat/mcspi.h>
  23. #include <plat/dmtimer.h>
  24. #include <plat/mmc.h>
  25. #include <plat/l3_2xxx.h>
  26. #include "omap_hwmod_common_data.h"
  27. #include "prm-regbits-24xx.h"
  28. #include "cm-regbits-24xx.h"
  29. #include "wd_timer.h"
  30. /*
  31. * OMAP2430 hardware module integration data
  32. *
  33. * ALl of the data in this section should be autogeneratable from the
  34. * TI hardware database or other technical documentation. Data that
  35. * is driver-specific or driver-kernel integration-specific belongs
  36. * elsewhere.
  37. */
  38. static struct omap_hwmod omap2430_mpu_hwmod;
  39. static struct omap_hwmod omap2430_iva_hwmod;
  40. static struct omap_hwmod omap2430_l3_main_hwmod;
  41. static struct omap_hwmod omap2430_l4_core_hwmod;
  42. static struct omap_hwmod omap2430_dss_core_hwmod;
  43. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  44. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  45. static struct omap_hwmod omap2430_dss_venc_hwmod;
  46. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  47. static struct omap_hwmod omap2430_gpio1_hwmod;
  48. static struct omap_hwmod omap2430_gpio2_hwmod;
  49. static struct omap_hwmod omap2430_gpio3_hwmod;
  50. static struct omap_hwmod omap2430_gpio4_hwmod;
  51. static struct omap_hwmod omap2430_gpio5_hwmod;
  52. static struct omap_hwmod omap2430_dma_system_hwmod;
  53. static struct omap_hwmod omap2430_mcbsp1_hwmod;
  54. static struct omap_hwmod omap2430_mcbsp2_hwmod;
  55. static struct omap_hwmod omap2430_mcbsp3_hwmod;
  56. static struct omap_hwmod omap2430_mcbsp4_hwmod;
  57. static struct omap_hwmod omap2430_mcbsp5_hwmod;
  58. static struct omap_hwmod omap2430_mcspi1_hwmod;
  59. static struct omap_hwmod omap2430_mcspi2_hwmod;
  60. static struct omap_hwmod omap2430_mcspi3_hwmod;
  61. static struct omap_hwmod omap2430_mmc1_hwmod;
  62. static struct omap_hwmod omap2430_mmc2_hwmod;
  63. /* L3 -> L4_CORE interface */
  64. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  65. .master = &omap2430_l3_main_hwmod,
  66. .slave = &omap2430_l4_core_hwmod,
  67. .user = OCP_USER_MPU | OCP_USER_SDMA,
  68. };
  69. /* MPU -> L3 interface */
  70. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  71. .master = &omap2430_mpu_hwmod,
  72. .slave = &omap2430_l3_main_hwmod,
  73. .user = OCP_USER_MPU,
  74. };
  75. /* Slave interfaces on the L3 interconnect */
  76. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  77. &omap2430_mpu__l3_main,
  78. };
  79. /* DSS -> l3 */
  80. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  81. .master = &omap2430_dss_core_hwmod,
  82. .slave = &omap2430_l3_main_hwmod,
  83. .fw = {
  84. .omap2 = {
  85. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  86. .flags = OMAP_FIREWALL_L3,
  87. }
  88. },
  89. .user = OCP_USER_MPU | OCP_USER_SDMA,
  90. };
  91. /* Master interfaces on the L3 interconnect */
  92. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  93. &omap2430_l3_main__l4_core,
  94. };
  95. /* L3 */
  96. static struct omap_hwmod omap2430_l3_main_hwmod = {
  97. .name = "l3_main",
  98. .class = &l3_hwmod_class,
  99. .masters = omap2430_l3_main_masters,
  100. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  101. .slaves = omap2430_l3_main_slaves,
  102. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  103. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  104. .flags = HWMOD_NO_IDLEST,
  105. };
  106. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  107. static struct omap_hwmod omap2430_uart1_hwmod;
  108. static struct omap_hwmod omap2430_uart2_hwmod;
  109. static struct omap_hwmod omap2430_uart3_hwmod;
  110. static struct omap_hwmod omap2430_i2c1_hwmod;
  111. static struct omap_hwmod omap2430_i2c2_hwmod;
  112. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  113. /* l3_core -> usbhsotg interface */
  114. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  115. .master = &omap2430_usbhsotg_hwmod,
  116. .slave = &omap2430_l3_main_hwmod,
  117. .clk = "core_l3_ck",
  118. .user = OCP_USER_MPU,
  119. };
  120. /* I2C IP block address space length (in bytes) */
  121. #define OMAP2_I2C_AS_LEN 128
  122. /* L4 CORE -> I2C1 interface */
  123. static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
  124. {
  125. .pa_start = 0x48070000,
  126. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  127. .flags = ADDR_TYPE_RT,
  128. },
  129. };
  130. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  131. .master = &omap2430_l4_core_hwmod,
  132. .slave = &omap2430_i2c1_hwmod,
  133. .clk = "i2c1_ick",
  134. .addr = omap2430_i2c1_addr_space,
  135. .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
  136. .user = OCP_USER_MPU | OCP_USER_SDMA,
  137. };
  138. /* L4 CORE -> I2C2 interface */
  139. static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
  140. {
  141. .pa_start = 0x48072000,
  142. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  143. .flags = ADDR_TYPE_RT,
  144. },
  145. };
  146. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  147. .master = &omap2430_l4_core_hwmod,
  148. .slave = &omap2430_i2c2_hwmod,
  149. .clk = "i2c2_ick",
  150. .addr = omap2430_i2c2_addr_space,
  151. .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
  152. .user = OCP_USER_MPU | OCP_USER_SDMA,
  153. };
  154. /* L4_CORE -> L4_WKUP interface */
  155. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  156. .master = &omap2430_l4_core_hwmod,
  157. .slave = &omap2430_l4_wkup_hwmod,
  158. .user = OCP_USER_MPU | OCP_USER_SDMA,
  159. };
  160. /* L4 CORE -> UART1 interface */
  161. static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
  162. {
  163. .pa_start = OMAP2_UART1_BASE,
  164. .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
  165. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  166. },
  167. };
  168. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  169. .master = &omap2430_l4_core_hwmod,
  170. .slave = &omap2430_uart1_hwmod,
  171. .clk = "uart1_ick",
  172. .addr = omap2430_uart1_addr_space,
  173. .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
  174. .user = OCP_USER_MPU | OCP_USER_SDMA,
  175. };
  176. /* L4 CORE -> UART2 interface */
  177. static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
  178. {
  179. .pa_start = OMAP2_UART2_BASE,
  180. .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
  181. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  182. },
  183. };
  184. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  185. .master = &omap2430_l4_core_hwmod,
  186. .slave = &omap2430_uart2_hwmod,
  187. .clk = "uart2_ick",
  188. .addr = omap2430_uart2_addr_space,
  189. .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
  190. .user = OCP_USER_MPU | OCP_USER_SDMA,
  191. };
  192. /* L4 PER -> UART3 interface */
  193. static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
  194. {
  195. .pa_start = OMAP2_UART3_BASE,
  196. .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
  197. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  198. },
  199. };
  200. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  201. .master = &omap2430_l4_core_hwmod,
  202. .slave = &omap2430_uart3_hwmod,
  203. .clk = "uart3_ick",
  204. .addr = omap2430_uart3_addr_space,
  205. .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
  206. .user = OCP_USER_MPU | OCP_USER_SDMA,
  207. };
  208. /*
  209. * usbhsotg interface data
  210. */
  211. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  212. {
  213. .pa_start = OMAP243X_HS_BASE,
  214. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  215. .flags = ADDR_TYPE_RT
  216. },
  217. };
  218. /* l4_core ->usbhsotg interface */
  219. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  220. .master = &omap2430_l4_core_hwmod,
  221. .slave = &omap2430_usbhsotg_hwmod,
  222. .clk = "usb_l4_ick",
  223. .addr = omap2430_usbhsotg_addrs,
  224. .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs),
  225. .user = OCP_USER_MPU,
  226. };
  227. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
  228. &omap2430_usbhsotg__l3,
  229. };
  230. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
  231. &omap2430_l4_core__usbhsotg,
  232. };
  233. /* L4 CORE -> MMC1 interface */
  234. static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
  235. {
  236. .pa_start = 0x4809c000,
  237. .pa_end = 0x4809c1ff,
  238. .flags = ADDR_TYPE_RT,
  239. },
  240. };
  241. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
  242. .master = &omap2430_l4_core_hwmod,
  243. .slave = &omap2430_mmc1_hwmod,
  244. .clk = "mmchs1_ick",
  245. .addr = omap2430_mmc1_addr_space,
  246. .addr_cnt = ARRAY_SIZE(omap2430_mmc1_addr_space),
  247. .user = OCP_USER_MPU | OCP_USER_SDMA,
  248. };
  249. /* L4 CORE -> MMC2 interface */
  250. static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
  251. {
  252. .pa_start = 0x480b4000,
  253. .pa_end = 0x480b41ff,
  254. .flags = ADDR_TYPE_RT,
  255. },
  256. };
  257. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
  258. .master = &omap2430_l4_core_hwmod,
  259. .slave = &omap2430_mmc2_hwmod,
  260. .addr = omap2430_mmc2_addr_space,
  261. .clk = "mmchs2_ick",
  262. .addr_cnt = ARRAY_SIZE(omap2430_mmc2_addr_space),
  263. .user = OCP_USER_MPU | OCP_USER_SDMA,
  264. };
  265. /* Slave interfaces on the L4_CORE interconnect */
  266. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  267. &omap2430_l3_main__l4_core,
  268. };
  269. /* Master interfaces on the L4_CORE interconnect */
  270. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  271. &omap2430_l4_core__l4_wkup,
  272. &omap2430_l4_core__mmc1,
  273. &omap2430_l4_core__mmc2,
  274. };
  275. /* L4 CORE */
  276. static struct omap_hwmod omap2430_l4_core_hwmod = {
  277. .name = "l4_core",
  278. .class = &l4_hwmod_class,
  279. .masters = omap2430_l4_core_masters,
  280. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  281. .slaves = omap2430_l4_core_slaves,
  282. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  283. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  284. .flags = HWMOD_NO_IDLEST,
  285. };
  286. /* Slave interfaces on the L4_WKUP interconnect */
  287. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  288. &omap2430_l4_core__l4_wkup,
  289. &omap2_l4_core__uart1,
  290. &omap2_l4_core__uart2,
  291. &omap2_l4_core__uart3,
  292. };
  293. /* Master interfaces on the L4_WKUP interconnect */
  294. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  295. };
  296. /* l4 core -> mcspi1 interface */
  297. static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
  298. {
  299. .pa_start = 0x48098000,
  300. .pa_end = 0x480980ff,
  301. .flags = ADDR_TYPE_RT,
  302. },
  303. };
  304. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  305. .master = &omap2430_l4_core_hwmod,
  306. .slave = &omap2430_mcspi1_hwmod,
  307. .clk = "mcspi1_ick",
  308. .addr = omap2430_mcspi1_addr_space,
  309. .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space),
  310. .user = OCP_USER_MPU | OCP_USER_SDMA,
  311. };
  312. /* l4 core -> mcspi2 interface */
  313. static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
  314. {
  315. .pa_start = 0x4809a000,
  316. .pa_end = 0x4809a0ff,
  317. .flags = ADDR_TYPE_RT,
  318. },
  319. };
  320. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  321. .master = &omap2430_l4_core_hwmod,
  322. .slave = &omap2430_mcspi2_hwmod,
  323. .clk = "mcspi2_ick",
  324. .addr = omap2430_mcspi2_addr_space,
  325. .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space),
  326. .user = OCP_USER_MPU | OCP_USER_SDMA,
  327. };
  328. /* l4 core -> mcspi3 interface */
  329. static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
  330. {
  331. .pa_start = 0x480b8000,
  332. .pa_end = 0x480b80ff,
  333. .flags = ADDR_TYPE_RT,
  334. },
  335. };
  336. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  337. .master = &omap2430_l4_core_hwmod,
  338. .slave = &omap2430_mcspi3_hwmod,
  339. .clk = "mcspi3_ick",
  340. .addr = omap2430_mcspi3_addr_space,
  341. .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space),
  342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  343. };
  344. /* L4 WKUP */
  345. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  346. .name = "l4_wkup",
  347. .class = &l4_hwmod_class,
  348. .masters = omap2430_l4_wkup_masters,
  349. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  350. .slaves = omap2430_l4_wkup_slaves,
  351. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  352. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  353. .flags = HWMOD_NO_IDLEST,
  354. };
  355. /* Master interfaces on the MPU device */
  356. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  357. &omap2430_mpu__l3_main,
  358. };
  359. /* MPU */
  360. static struct omap_hwmod omap2430_mpu_hwmod = {
  361. .name = "mpu",
  362. .class = &mpu_hwmod_class,
  363. .main_clk = "mpu_ck",
  364. .masters = omap2430_mpu_masters,
  365. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  366. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  367. };
  368. /*
  369. * IVA2_1 interface data
  370. */
  371. /* IVA2 <- L3 interface */
  372. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  373. .master = &omap2430_l3_main_hwmod,
  374. .slave = &omap2430_iva_hwmod,
  375. .clk = "dsp_fck",
  376. .user = OCP_USER_MPU | OCP_USER_SDMA,
  377. };
  378. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  379. &omap2430_l3__iva,
  380. };
  381. /*
  382. * IVA2 (IVA2)
  383. */
  384. static struct omap_hwmod omap2430_iva_hwmod = {
  385. .name = "iva",
  386. .class = &iva_hwmod_class,
  387. .masters = omap2430_iva_masters,
  388. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  389. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  390. };
  391. /* Timer Common */
  392. static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
  393. .rev_offs = 0x0000,
  394. .sysc_offs = 0x0010,
  395. .syss_offs = 0x0014,
  396. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  397. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  398. SYSC_HAS_AUTOIDLE),
  399. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  400. .sysc_fields = &omap_hwmod_sysc_type1,
  401. };
  402. static struct omap_hwmod_class omap2430_timer_hwmod_class = {
  403. .name = "timer",
  404. .sysc = &omap2430_timer_sysc,
  405. .rev = OMAP_TIMER_IP_VERSION_1,
  406. };
  407. /* timer1 */
  408. static struct omap_hwmod omap2430_timer1_hwmod;
  409. static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = {
  410. { .irq = 37, },
  411. };
  412. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  413. {
  414. .pa_start = 0x49018000,
  415. .pa_end = 0x49018000 + SZ_1K - 1,
  416. .flags = ADDR_TYPE_RT
  417. },
  418. };
  419. /* l4_wkup -> timer1 */
  420. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  421. .master = &omap2430_l4_wkup_hwmod,
  422. .slave = &omap2430_timer1_hwmod,
  423. .clk = "gpt1_ick",
  424. .addr = omap2430_timer1_addrs,
  425. .addr_cnt = ARRAY_SIZE(omap2430_timer1_addrs),
  426. .user = OCP_USER_MPU | OCP_USER_SDMA,
  427. };
  428. /* timer1 slave port */
  429. static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
  430. &omap2430_l4_wkup__timer1,
  431. };
  432. /* timer1 hwmod */
  433. static struct omap_hwmod omap2430_timer1_hwmod = {
  434. .name = "timer1",
  435. .mpu_irqs = omap2430_timer1_mpu_irqs,
  436. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs),
  437. .main_clk = "gpt1_fck",
  438. .prcm = {
  439. .omap2 = {
  440. .prcm_reg_id = 1,
  441. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  442. .module_offs = WKUP_MOD,
  443. .idlest_reg_id = 1,
  444. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  445. },
  446. },
  447. .slaves = omap2430_timer1_slaves,
  448. .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
  449. .class = &omap2430_timer_hwmod_class,
  450. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  451. };
  452. /* timer2 */
  453. static struct omap_hwmod omap2430_timer2_hwmod;
  454. static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = {
  455. { .irq = 38, },
  456. };
  457. static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = {
  458. {
  459. .pa_start = 0x4802a000,
  460. .pa_end = 0x4802a000 + SZ_1K - 1,
  461. .flags = ADDR_TYPE_RT
  462. },
  463. };
  464. /* l4_core -> timer2 */
  465. static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
  466. .master = &omap2430_l4_core_hwmod,
  467. .slave = &omap2430_timer2_hwmod,
  468. .clk = "gpt2_ick",
  469. .addr = omap2430_timer2_addrs,
  470. .addr_cnt = ARRAY_SIZE(omap2430_timer2_addrs),
  471. .user = OCP_USER_MPU | OCP_USER_SDMA,
  472. };
  473. /* timer2 slave port */
  474. static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
  475. &omap2430_l4_core__timer2,
  476. };
  477. /* timer2 hwmod */
  478. static struct omap_hwmod omap2430_timer2_hwmod = {
  479. .name = "timer2",
  480. .mpu_irqs = omap2430_timer2_mpu_irqs,
  481. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs),
  482. .main_clk = "gpt2_fck",
  483. .prcm = {
  484. .omap2 = {
  485. .prcm_reg_id = 1,
  486. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  487. .module_offs = CORE_MOD,
  488. .idlest_reg_id = 1,
  489. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  490. },
  491. },
  492. .slaves = omap2430_timer2_slaves,
  493. .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
  494. .class = &omap2430_timer_hwmod_class,
  495. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  496. };
  497. /* timer3 */
  498. static struct omap_hwmod omap2430_timer3_hwmod;
  499. static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = {
  500. { .irq = 39, },
  501. };
  502. static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = {
  503. {
  504. .pa_start = 0x48078000,
  505. .pa_end = 0x48078000 + SZ_1K - 1,
  506. .flags = ADDR_TYPE_RT
  507. },
  508. };
  509. /* l4_core -> timer3 */
  510. static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
  511. .master = &omap2430_l4_core_hwmod,
  512. .slave = &omap2430_timer3_hwmod,
  513. .clk = "gpt3_ick",
  514. .addr = omap2430_timer3_addrs,
  515. .addr_cnt = ARRAY_SIZE(omap2430_timer3_addrs),
  516. .user = OCP_USER_MPU | OCP_USER_SDMA,
  517. };
  518. /* timer3 slave port */
  519. static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
  520. &omap2430_l4_core__timer3,
  521. };
  522. /* timer3 hwmod */
  523. static struct omap_hwmod omap2430_timer3_hwmod = {
  524. .name = "timer3",
  525. .mpu_irqs = omap2430_timer3_mpu_irqs,
  526. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs),
  527. .main_clk = "gpt3_fck",
  528. .prcm = {
  529. .omap2 = {
  530. .prcm_reg_id = 1,
  531. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  532. .module_offs = CORE_MOD,
  533. .idlest_reg_id = 1,
  534. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  535. },
  536. },
  537. .slaves = omap2430_timer3_slaves,
  538. .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
  539. .class = &omap2430_timer_hwmod_class,
  540. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  541. };
  542. /* timer4 */
  543. static struct omap_hwmod omap2430_timer4_hwmod;
  544. static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = {
  545. { .irq = 40, },
  546. };
  547. static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = {
  548. {
  549. .pa_start = 0x4807a000,
  550. .pa_end = 0x4807a000 + SZ_1K - 1,
  551. .flags = ADDR_TYPE_RT
  552. },
  553. };
  554. /* l4_core -> timer4 */
  555. static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
  556. .master = &omap2430_l4_core_hwmod,
  557. .slave = &omap2430_timer4_hwmod,
  558. .clk = "gpt4_ick",
  559. .addr = omap2430_timer4_addrs,
  560. .addr_cnt = ARRAY_SIZE(omap2430_timer4_addrs),
  561. .user = OCP_USER_MPU | OCP_USER_SDMA,
  562. };
  563. /* timer4 slave port */
  564. static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
  565. &omap2430_l4_core__timer4,
  566. };
  567. /* timer4 hwmod */
  568. static struct omap_hwmod omap2430_timer4_hwmod = {
  569. .name = "timer4",
  570. .mpu_irqs = omap2430_timer4_mpu_irqs,
  571. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs),
  572. .main_clk = "gpt4_fck",
  573. .prcm = {
  574. .omap2 = {
  575. .prcm_reg_id = 1,
  576. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  577. .module_offs = CORE_MOD,
  578. .idlest_reg_id = 1,
  579. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  580. },
  581. },
  582. .slaves = omap2430_timer4_slaves,
  583. .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
  584. .class = &omap2430_timer_hwmod_class,
  585. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  586. };
  587. /* timer5 */
  588. static struct omap_hwmod omap2430_timer5_hwmod;
  589. static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = {
  590. { .irq = 41, },
  591. };
  592. static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = {
  593. {
  594. .pa_start = 0x4807c000,
  595. .pa_end = 0x4807c000 + SZ_1K - 1,
  596. .flags = ADDR_TYPE_RT
  597. },
  598. };
  599. /* l4_core -> timer5 */
  600. static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
  601. .master = &omap2430_l4_core_hwmod,
  602. .slave = &omap2430_timer5_hwmod,
  603. .clk = "gpt5_ick",
  604. .addr = omap2430_timer5_addrs,
  605. .addr_cnt = ARRAY_SIZE(omap2430_timer5_addrs),
  606. .user = OCP_USER_MPU | OCP_USER_SDMA,
  607. };
  608. /* timer5 slave port */
  609. static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
  610. &omap2430_l4_core__timer5,
  611. };
  612. /* timer5 hwmod */
  613. static struct omap_hwmod omap2430_timer5_hwmod = {
  614. .name = "timer5",
  615. .mpu_irqs = omap2430_timer5_mpu_irqs,
  616. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs),
  617. .main_clk = "gpt5_fck",
  618. .prcm = {
  619. .omap2 = {
  620. .prcm_reg_id = 1,
  621. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  622. .module_offs = CORE_MOD,
  623. .idlest_reg_id = 1,
  624. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  625. },
  626. },
  627. .slaves = omap2430_timer5_slaves,
  628. .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
  629. .class = &omap2430_timer_hwmod_class,
  630. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  631. };
  632. /* timer6 */
  633. static struct omap_hwmod omap2430_timer6_hwmod;
  634. static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = {
  635. { .irq = 42, },
  636. };
  637. static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = {
  638. {
  639. .pa_start = 0x4807e000,
  640. .pa_end = 0x4807e000 + SZ_1K - 1,
  641. .flags = ADDR_TYPE_RT
  642. },
  643. };
  644. /* l4_core -> timer6 */
  645. static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
  646. .master = &omap2430_l4_core_hwmod,
  647. .slave = &omap2430_timer6_hwmod,
  648. .clk = "gpt6_ick",
  649. .addr = omap2430_timer6_addrs,
  650. .addr_cnt = ARRAY_SIZE(omap2430_timer6_addrs),
  651. .user = OCP_USER_MPU | OCP_USER_SDMA,
  652. };
  653. /* timer6 slave port */
  654. static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
  655. &omap2430_l4_core__timer6,
  656. };
  657. /* timer6 hwmod */
  658. static struct omap_hwmod omap2430_timer6_hwmod = {
  659. .name = "timer6",
  660. .mpu_irqs = omap2430_timer6_mpu_irqs,
  661. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs),
  662. .main_clk = "gpt6_fck",
  663. .prcm = {
  664. .omap2 = {
  665. .prcm_reg_id = 1,
  666. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  667. .module_offs = CORE_MOD,
  668. .idlest_reg_id = 1,
  669. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  670. },
  671. },
  672. .slaves = omap2430_timer6_slaves,
  673. .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
  674. .class = &omap2430_timer_hwmod_class,
  675. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  676. };
  677. /* timer7 */
  678. static struct omap_hwmod omap2430_timer7_hwmod;
  679. static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = {
  680. { .irq = 43, },
  681. };
  682. static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = {
  683. {
  684. .pa_start = 0x48080000,
  685. .pa_end = 0x48080000 + SZ_1K - 1,
  686. .flags = ADDR_TYPE_RT
  687. },
  688. };
  689. /* l4_core -> timer7 */
  690. static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
  691. .master = &omap2430_l4_core_hwmod,
  692. .slave = &omap2430_timer7_hwmod,
  693. .clk = "gpt7_ick",
  694. .addr = omap2430_timer7_addrs,
  695. .addr_cnt = ARRAY_SIZE(omap2430_timer7_addrs),
  696. .user = OCP_USER_MPU | OCP_USER_SDMA,
  697. };
  698. /* timer7 slave port */
  699. static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
  700. &omap2430_l4_core__timer7,
  701. };
  702. /* timer7 hwmod */
  703. static struct omap_hwmod omap2430_timer7_hwmod = {
  704. .name = "timer7",
  705. .mpu_irqs = omap2430_timer7_mpu_irqs,
  706. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs),
  707. .main_clk = "gpt7_fck",
  708. .prcm = {
  709. .omap2 = {
  710. .prcm_reg_id = 1,
  711. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  712. .module_offs = CORE_MOD,
  713. .idlest_reg_id = 1,
  714. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  715. },
  716. },
  717. .slaves = omap2430_timer7_slaves,
  718. .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
  719. .class = &omap2430_timer_hwmod_class,
  720. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  721. };
  722. /* timer8 */
  723. static struct omap_hwmod omap2430_timer8_hwmod;
  724. static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = {
  725. { .irq = 44, },
  726. };
  727. static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = {
  728. {
  729. .pa_start = 0x48082000,
  730. .pa_end = 0x48082000 + SZ_1K - 1,
  731. .flags = ADDR_TYPE_RT
  732. },
  733. };
  734. /* l4_core -> timer8 */
  735. static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
  736. .master = &omap2430_l4_core_hwmod,
  737. .slave = &omap2430_timer8_hwmod,
  738. .clk = "gpt8_ick",
  739. .addr = omap2430_timer8_addrs,
  740. .addr_cnt = ARRAY_SIZE(omap2430_timer8_addrs),
  741. .user = OCP_USER_MPU | OCP_USER_SDMA,
  742. };
  743. /* timer8 slave port */
  744. static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
  745. &omap2430_l4_core__timer8,
  746. };
  747. /* timer8 hwmod */
  748. static struct omap_hwmod omap2430_timer8_hwmod = {
  749. .name = "timer8",
  750. .mpu_irqs = omap2430_timer8_mpu_irqs,
  751. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs),
  752. .main_clk = "gpt8_fck",
  753. .prcm = {
  754. .omap2 = {
  755. .prcm_reg_id = 1,
  756. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  757. .module_offs = CORE_MOD,
  758. .idlest_reg_id = 1,
  759. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  760. },
  761. },
  762. .slaves = omap2430_timer8_slaves,
  763. .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
  764. .class = &omap2430_timer_hwmod_class,
  765. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  766. };
  767. /* timer9 */
  768. static struct omap_hwmod omap2430_timer9_hwmod;
  769. static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = {
  770. { .irq = 45, },
  771. };
  772. static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = {
  773. {
  774. .pa_start = 0x48084000,
  775. .pa_end = 0x48084000 + SZ_1K - 1,
  776. .flags = ADDR_TYPE_RT
  777. },
  778. };
  779. /* l4_core -> timer9 */
  780. static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
  781. .master = &omap2430_l4_core_hwmod,
  782. .slave = &omap2430_timer9_hwmod,
  783. .clk = "gpt9_ick",
  784. .addr = omap2430_timer9_addrs,
  785. .addr_cnt = ARRAY_SIZE(omap2430_timer9_addrs),
  786. .user = OCP_USER_MPU | OCP_USER_SDMA,
  787. };
  788. /* timer9 slave port */
  789. static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
  790. &omap2430_l4_core__timer9,
  791. };
  792. /* timer9 hwmod */
  793. static struct omap_hwmod omap2430_timer9_hwmod = {
  794. .name = "timer9",
  795. .mpu_irqs = omap2430_timer9_mpu_irqs,
  796. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs),
  797. .main_clk = "gpt9_fck",
  798. .prcm = {
  799. .omap2 = {
  800. .prcm_reg_id = 1,
  801. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  802. .module_offs = CORE_MOD,
  803. .idlest_reg_id = 1,
  804. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  805. },
  806. },
  807. .slaves = omap2430_timer9_slaves,
  808. .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
  809. .class = &omap2430_timer_hwmod_class,
  810. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  811. };
  812. /* timer10 */
  813. static struct omap_hwmod omap2430_timer10_hwmod;
  814. static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = {
  815. { .irq = 46, },
  816. };
  817. static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = {
  818. {
  819. .pa_start = 0x48086000,
  820. .pa_end = 0x48086000 + SZ_1K - 1,
  821. .flags = ADDR_TYPE_RT
  822. },
  823. };
  824. /* l4_core -> timer10 */
  825. static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
  826. .master = &omap2430_l4_core_hwmod,
  827. .slave = &omap2430_timer10_hwmod,
  828. .clk = "gpt10_ick",
  829. .addr = omap2430_timer10_addrs,
  830. .addr_cnt = ARRAY_SIZE(omap2430_timer10_addrs),
  831. .user = OCP_USER_MPU | OCP_USER_SDMA,
  832. };
  833. /* timer10 slave port */
  834. static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
  835. &omap2430_l4_core__timer10,
  836. };
  837. /* timer10 hwmod */
  838. static struct omap_hwmod omap2430_timer10_hwmod = {
  839. .name = "timer10",
  840. .mpu_irqs = omap2430_timer10_mpu_irqs,
  841. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs),
  842. .main_clk = "gpt10_fck",
  843. .prcm = {
  844. .omap2 = {
  845. .prcm_reg_id = 1,
  846. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  847. .module_offs = CORE_MOD,
  848. .idlest_reg_id = 1,
  849. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  850. },
  851. },
  852. .slaves = omap2430_timer10_slaves,
  853. .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
  854. .class = &omap2430_timer_hwmod_class,
  855. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  856. };
  857. /* timer11 */
  858. static struct omap_hwmod omap2430_timer11_hwmod;
  859. static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = {
  860. { .irq = 47, },
  861. };
  862. static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = {
  863. {
  864. .pa_start = 0x48088000,
  865. .pa_end = 0x48088000 + SZ_1K - 1,
  866. .flags = ADDR_TYPE_RT
  867. },
  868. };
  869. /* l4_core -> timer11 */
  870. static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
  871. .master = &omap2430_l4_core_hwmod,
  872. .slave = &omap2430_timer11_hwmod,
  873. .clk = "gpt11_ick",
  874. .addr = omap2430_timer11_addrs,
  875. .addr_cnt = ARRAY_SIZE(omap2430_timer11_addrs),
  876. .user = OCP_USER_MPU | OCP_USER_SDMA,
  877. };
  878. /* timer11 slave port */
  879. static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
  880. &omap2430_l4_core__timer11,
  881. };
  882. /* timer11 hwmod */
  883. static struct omap_hwmod omap2430_timer11_hwmod = {
  884. .name = "timer11",
  885. .mpu_irqs = omap2430_timer11_mpu_irqs,
  886. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs),
  887. .main_clk = "gpt11_fck",
  888. .prcm = {
  889. .omap2 = {
  890. .prcm_reg_id = 1,
  891. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  892. .module_offs = CORE_MOD,
  893. .idlest_reg_id = 1,
  894. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  895. },
  896. },
  897. .slaves = omap2430_timer11_slaves,
  898. .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
  899. .class = &omap2430_timer_hwmod_class,
  900. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  901. };
  902. /* timer12 */
  903. static struct omap_hwmod omap2430_timer12_hwmod;
  904. static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = {
  905. { .irq = 48, },
  906. };
  907. static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = {
  908. {
  909. .pa_start = 0x4808a000,
  910. .pa_end = 0x4808a000 + SZ_1K - 1,
  911. .flags = ADDR_TYPE_RT
  912. },
  913. };
  914. /* l4_core -> timer12 */
  915. static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
  916. .master = &omap2430_l4_core_hwmod,
  917. .slave = &omap2430_timer12_hwmod,
  918. .clk = "gpt12_ick",
  919. .addr = omap2430_timer12_addrs,
  920. .addr_cnt = ARRAY_SIZE(omap2430_timer12_addrs),
  921. .user = OCP_USER_MPU | OCP_USER_SDMA,
  922. };
  923. /* timer12 slave port */
  924. static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
  925. &omap2430_l4_core__timer12,
  926. };
  927. /* timer12 hwmod */
  928. static struct omap_hwmod omap2430_timer12_hwmod = {
  929. .name = "timer12",
  930. .mpu_irqs = omap2430_timer12_mpu_irqs,
  931. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs),
  932. .main_clk = "gpt12_fck",
  933. .prcm = {
  934. .omap2 = {
  935. .prcm_reg_id = 1,
  936. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  937. .module_offs = CORE_MOD,
  938. .idlest_reg_id = 1,
  939. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  940. },
  941. },
  942. .slaves = omap2430_timer12_slaves,
  943. .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
  944. .class = &omap2430_timer_hwmod_class,
  945. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  946. };
  947. /* l4_wkup -> wd_timer2 */
  948. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  949. {
  950. .pa_start = 0x49016000,
  951. .pa_end = 0x4901607f,
  952. .flags = ADDR_TYPE_RT
  953. },
  954. };
  955. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  956. .master = &omap2430_l4_wkup_hwmod,
  957. .slave = &omap2430_wd_timer2_hwmod,
  958. .clk = "mpu_wdt_ick",
  959. .addr = omap2430_wd_timer2_addrs,
  960. .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
  961. .user = OCP_USER_MPU | OCP_USER_SDMA,
  962. };
  963. /*
  964. * 'wd_timer' class
  965. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  966. * overflow condition
  967. */
  968. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  969. .rev_offs = 0x0,
  970. .sysc_offs = 0x0010,
  971. .syss_offs = 0x0014,
  972. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  973. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  974. .sysc_fields = &omap_hwmod_sysc_type1,
  975. };
  976. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  977. .name = "wd_timer",
  978. .sysc = &omap2430_wd_timer_sysc,
  979. .pre_shutdown = &omap2_wd_timer_disable
  980. };
  981. /* wd_timer2 */
  982. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  983. &omap2430_l4_wkup__wd_timer2,
  984. };
  985. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  986. .name = "wd_timer2",
  987. .class = &omap2430_wd_timer_hwmod_class,
  988. .main_clk = "mpu_wdt_fck",
  989. .prcm = {
  990. .omap2 = {
  991. .prcm_reg_id = 1,
  992. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  993. .module_offs = WKUP_MOD,
  994. .idlest_reg_id = 1,
  995. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  996. },
  997. },
  998. .slaves = omap2430_wd_timer2_slaves,
  999. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  1000. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1001. };
  1002. /* UART */
  1003. static struct omap_hwmod_class_sysconfig uart_sysc = {
  1004. .rev_offs = 0x50,
  1005. .sysc_offs = 0x54,
  1006. .syss_offs = 0x58,
  1007. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  1008. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1009. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1010. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1011. .sysc_fields = &omap_hwmod_sysc_type1,
  1012. };
  1013. static struct omap_hwmod_class uart_class = {
  1014. .name = "uart",
  1015. .sysc = &uart_sysc,
  1016. };
  1017. /* UART1 */
  1018. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  1019. { .irq = INT_24XX_UART1_IRQ, },
  1020. };
  1021. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  1022. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  1023. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  1024. };
  1025. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  1026. &omap2_l4_core__uart1,
  1027. };
  1028. static struct omap_hwmod omap2430_uart1_hwmod = {
  1029. .name = "uart1",
  1030. .mpu_irqs = uart1_mpu_irqs,
  1031. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  1032. .sdma_reqs = uart1_sdma_reqs,
  1033. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  1034. .main_clk = "uart1_fck",
  1035. .prcm = {
  1036. .omap2 = {
  1037. .module_offs = CORE_MOD,
  1038. .prcm_reg_id = 1,
  1039. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  1040. .idlest_reg_id = 1,
  1041. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  1042. },
  1043. },
  1044. .slaves = omap2430_uart1_slaves,
  1045. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  1046. .class = &uart_class,
  1047. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1048. };
  1049. /* UART2 */
  1050. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  1051. { .irq = INT_24XX_UART2_IRQ, },
  1052. };
  1053. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  1054. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  1055. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  1056. };
  1057. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  1058. &omap2_l4_core__uart2,
  1059. };
  1060. static struct omap_hwmod omap2430_uart2_hwmod = {
  1061. .name = "uart2",
  1062. .mpu_irqs = uart2_mpu_irqs,
  1063. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  1064. .sdma_reqs = uart2_sdma_reqs,
  1065. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  1066. .main_clk = "uart2_fck",
  1067. .prcm = {
  1068. .omap2 = {
  1069. .module_offs = CORE_MOD,
  1070. .prcm_reg_id = 1,
  1071. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  1072. .idlest_reg_id = 1,
  1073. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  1074. },
  1075. },
  1076. .slaves = omap2430_uart2_slaves,
  1077. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  1078. .class = &uart_class,
  1079. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1080. };
  1081. /* UART3 */
  1082. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  1083. { .irq = INT_24XX_UART3_IRQ, },
  1084. };
  1085. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  1086. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  1087. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  1088. };
  1089. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  1090. &omap2_l4_core__uart3,
  1091. };
  1092. static struct omap_hwmod omap2430_uart3_hwmod = {
  1093. .name = "uart3",
  1094. .mpu_irqs = uart3_mpu_irqs,
  1095. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  1096. .sdma_reqs = uart3_sdma_reqs,
  1097. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  1098. .main_clk = "uart3_fck",
  1099. .prcm = {
  1100. .omap2 = {
  1101. .module_offs = CORE_MOD,
  1102. .prcm_reg_id = 2,
  1103. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  1104. .idlest_reg_id = 2,
  1105. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  1106. },
  1107. },
  1108. .slaves = omap2430_uart3_slaves,
  1109. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  1110. .class = &uart_class,
  1111. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1112. };
  1113. /*
  1114. * 'dss' class
  1115. * display sub-system
  1116. */
  1117. static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
  1118. .rev_offs = 0x0000,
  1119. .sysc_offs = 0x0010,
  1120. .syss_offs = 0x0014,
  1121. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1122. .sysc_fields = &omap_hwmod_sysc_type1,
  1123. };
  1124. static struct omap_hwmod_class omap2430_dss_hwmod_class = {
  1125. .name = "dss",
  1126. .sysc = &omap2430_dss_sysc,
  1127. };
  1128. /* dss */
  1129. static struct omap_hwmod_irq_info omap2430_dss_irqs[] = {
  1130. { .irq = 25 },
  1131. };
  1132. static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
  1133. { .name = "dispc", .dma_req = 5 },
  1134. };
  1135. /* dss */
  1136. /* dss master ports */
  1137. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  1138. &omap2430_dss__l3,
  1139. };
  1140. static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
  1141. {
  1142. .pa_start = 0x48050000,
  1143. .pa_end = 0x480503FF,
  1144. .flags = ADDR_TYPE_RT
  1145. },
  1146. };
  1147. /* l4_core -> dss */
  1148. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  1149. .master = &omap2430_l4_core_hwmod,
  1150. .slave = &omap2430_dss_core_hwmod,
  1151. .clk = "dss_ick",
  1152. .addr = omap2430_dss_addrs,
  1153. .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs),
  1154. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1155. };
  1156. /* dss slave ports */
  1157. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  1158. &omap2430_l4_core__dss,
  1159. };
  1160. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  1161. { .role = "tv_clk", .clk = "dss_54m_fck" },
  1162. { .role = "sys_clk", .clk = "dss2_fck" },
  1163. };
  1164. static struct omap_hwmod omap2430_dss_core_hwmod = {
  1165. .name = "dss_core",
  1166. .class = &omap2430_dss_hwmod_class,
  1167. .main_clk = "dss1_fck", /* instead of dss_fck */
  1168. .mpu_irqs = omap2430_dss_irqs,
  1169. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dss_irqs),
  1170. .sdma_reqs = omap2430_dss_sdma_chs,
  1171. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
  1172. .prcm = {
  1173. .omap2 = {
  1174. .prcm_reg_id = 1,
  1175. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1176. .module_offs = CORE_MOD,
  1177. .idlest_reg_id = 1,
  1178. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  1179. },
  1180. },
  1181. .opt_clks = dss_opt_clks,
  1182. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1183. .slaves = omap2430_dss_slaves,
  1184. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  1185. .masters = omap2430_dss_masters,
  1186. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  1187. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1188. .flags = HWMOD_NO_IDLEST,
  1189. };
  1190. /*
  1191. * 'dispc' class
  1192. * display controller
  1193. */
  1194. static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
  1195. .rev_offs = 0x0000,
  1196. .sysc_offs = 0x0010,
  1197. .syss_offs = 0x0014,
  1198. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  1199. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1200. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1201. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1202. .sysc_fields = &omap_hwmod_sysc_type1,
  1203. };
  1204. static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
  1205. .name = "dispc",
  1206. .sysc = &omap2430_dispc_sysc,
  1207. };
  1208. static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
  1209. {
  1210. .pa_start = 0x48050400,
  1211. .pa_end = 0x480507FF,
  1212. .flags = ADDR_TYPE_RT
  1213. },
  1214. };
  1215. /* l4_core -> dss_dispc */
  1216. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  1217. .master = &omap2430_l4_core_hwmod,
  1218. .slave = &omap2430_dss_dispc_hwmod,
  1219. .clk = "dss_ick",
  1220. .addr = omap2430_dss_dispc_addrs,
  1221. .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs),
  1222. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1223. };
  1224. /* dss_dispc slave ports */
  1225. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  1226. &omap2430_l4_core__dss_dispc,
  1227. };
  1228. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  1229. .name = "dss_dispc",
  1230. .class = &omap2430_dispc_hwmod_class,
  1231. .main_clk = "dss1_fck",
  1232. .prcm = {
  1233. .omap2 = {
  1234. .prcm_reg_id = 1,
  1235. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1236. .module_offs = CORE_MOD,
  1237. .idlest_reg_id = 1,
  1238. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  1239. },
  1240. },
  1241. .slaves = omap2430_dss_dispc_slaves,
  1242. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  1243. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1244. .flags = HWMOD_NO_IDLEST,
  1245. };
  1246. /*
  1247. * 'rfbi' class
  1248. * remote frame buffer interface
  1249. */
  1250. static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
  1251. .rev_offs = 0x0000,
  1252. .sysc_offs = 0x0010,
  1253. .syss_offs = 0x0014,
  1254. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1255. SYSC_HAS_AUTOIDLE),
  1256. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1257. .sysc_fields = &omap_hwmod_sysc_type1,
  1258. };
  1259. static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
  1260. .name = "rfbi",
  1261. .sysc = &omap2430_rfbi_sysc,
  1262. };
  1263. static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
  1264. {
  1265. .pa_start = 0x48050800,
  1266. .pa_end = 0x48050BFF,
  1267. .flags = ADDR_TYPE_RT
  1268. },
  1269. };
  1270. /* l4_core -> dss_rfbi */
  1271. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  1272. .master = &omap2430_l4_core_hwmod,
  1273. .slave = &omap2430_dss_rfbi_hwmod,
  1274. .clk = "dss_ick",
  1275. .addr = omap2430_dss_rfbi_addrs,
  1276. .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
  1277. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1278. };
  1279. /* dss_rfbi slave ports */
  1280. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  1281. &omap2430_l4_core__dss_rfbi,
  1282. };
  1283. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  1284. .name = "dss_rfbi",
  1285. .class = &omap2430_rfbi_hwmod_class,
  1286. .main_clk = "dss1_fck",
  1287. .prcm = {
  1288. .omap2 = {
  1289. .prcm_reg_id = 1,
  1290. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1291. .module_offs = CORE_MOD,
  1292. },
  1293. },
  1294. .slaves = omap2430_dss_rfbi_slaves,
  1295. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  1296. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1297. .flags = HWMOD_NO_IDLEST,
  1298. };
  1299. /*
  1300. * 'venc' class
  1301. * video encoder
  1302. */
  1303. static struct omap_hwmod_class omap2430_venc_hwmod_class = {
  1304. .name = "venc",
  1305. };
  1306. /* dss_venc */
  1307. static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
  1308. {
  1309. .pa_start = 0x48050C00,
  1310. .pa_end = 0x48050FFF,
  1311. .flags = ADDR_TYPE_RT
  1312. },
  1313. };
  1314. /* l4_core -> dss_venc */
  1315. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  1316. .master = &omap2430_l4_core_hwmod,
  1317. .slave = &omap2430_dss_venc_hwmod,
  1318. .clk = "dss_54m_fck",
  1319. .addr = omap2430_dss_venc_addrs,
  1320. .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs),
  1321. .flags = OCPIF_SWSUP_IDLE,
  1322. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1323. };
  1324. /* dss_venc slave ports */
  1325. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  1326. &omap2430_l4_core__dss_venc,
  1327. };
  1328. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  1329. .name = "dss_venc",
  1330. .class = &omap2430_venc_hwmod_class,
  1331. .main_clk = "dss1_fck",
  1332. .prcm = {
  1333. .omap2 = {
  1334. .prcm_reg_id = 1,
  1335. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1336. .module_offs = CORE_MOD,
  1337. },
  1338. },
  1339. .slaves = omap2430_dss_venc_slaves,
  1340. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  1341. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1342. .flags = HWMOD_NO_IDLEST,
  1343. };
  1344. /* I2C common */
  1345. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1346. .rev_offs = 0x00,
  1347. .sysc_offs = 0x20,
  1348. .syss_offs = 0x10,
  1349. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1350. SYSS_HAS_RESET_STATUS),
  1351. .sysc_fields = &omap_hwmod_sysc_type1,
  1352. };
  1353. static struct omap_hwmod_class i2c_class = {
  1354. .name = "i2c",
  1355. .sysc = &i2c_sysc,
  1356. };
  1357. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1358. .fifo_depth = 8, /* bytes */
  1359. };
  1360. /* I2C1 */
  1361. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1362. { .irq = INT_24XX_I2C1_IRQ, },
  1363. };
  1364. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1365. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1366. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1367. };
  1368. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  1369. &omap2430_l4_core__i2c1,
  1370. };
  1371. static struct omap_hwmod omap2430_i2c1_hwmod = {
  1372. .name = "i2c1",
  1373. .mpu_irqs = i2c1_mpu_irqs,
  1374. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  1375. .sdma_reqs = i2c1_sdma_reqs,
  1376. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1377. .main_clk = "i2chs1_fck",
  1378. .prcm = {
  1379. .omap2 = {
  1380. /*
  1381. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  1382. * I2CHS IP's do not follow the usual pattern.
  1383. * prcm_reg_id alone cannot be used to program
  1384. * the iclk and fclk. Needs to be handled using
  1385. * additonal flags when clk handling is moved
  1386. * to hwmod framework.
  1387. */
  1388. .module_offs = CORE_MOD,
  1389. .prcm_reg_id = 1,
  1390. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  1391. .idlest_reg_id = 1,
  1392. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  1393. },
  1394. },
  1395. .slaves = omap2430_i2c1_slaves,
  1396. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  1397. .class = &i2c_class,
  1398. .dev_attr = &i2c_dev_attr,
  1399. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1400. };
  1401. /* I2C2 */
  1402. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1403. { .irq = INT_24XX_I2C2_IRQ, },
  1404. };
  1405. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1406. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1407. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1408. };
  1409. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  1410. &omap2430_l4_core__i2c2,
  1411. };
  1412. static struct omap_hwmod omap2430_i2c2_hwmod = {
  1413. .name = "i2c2",
  1414. .mpu_irqs = i2c2_mpu_irqs,
  1415. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  1416. .sdma_reqs = i2c2_sdma_reqs,
  1417. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1418. .main_clk = "i2chs2_fck",
  1419. .prcm = {
  1420. .omap2 = {
  1421. .module_offs = CORE_MOD,
  1422. .prcm_reg_id = 1,
  1423. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  1424. .idlest_reg_id = 1,
  1425. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  1426. },
  1427. },
  1428. .slaves = omap2430_i2c2_slaves,
  1429. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  1430. .class = &i2c_class,
  1431. .dev_attr = &i2c_dev_attr,
  1432. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1433. };
  1434. /* l4_wkup -> gpio1 */
  1435. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  1436. {
  1437. .pa_start = 0x4900C000,
  1438. .pa_end = 0x4900C1ff,
  1439. .flags = ADDR_TYPE_RT
  1440. },
  1441. };
  1442. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  1443. .master = &omap2430_l4_wkup_hwmod,
  1444. .slave = &omap2430_gpio1_hwmod,
  1445. .clk = "gpios_ick",
  1446. .addr = omap2430_gpio1_addr_space,
  1447. .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
  1448. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1449. };
  1450. /* l4_wkup -> gpio2 */
  1451. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  1452. {
  1453. .pa_start = 0x4900E000,
  1454. .pa_end = 0x4900E1ff,
  1455. .flags = ADDR_TYPE_RT
  1456. },
  1457. };
  1458. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  1459. .master = &omap2430_l4_wkup_hwmod,
  1460. .slave = &omap2430_gpio2_hwmod,
  1461. .clk = "gpios_ick",
  1462. .addr = omap2430_gpio2_addr_space,
  1463. .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
  1464. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1465. };
  1466. /* l4_wkup -> gpio3 */
  1467. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  1468. {
  1469. .pa_start = 0x49010000,
  1470. .pa_end = 0x490101ff,
  1471. .flags = ADDR_TYPE_RT
  1472. },
  1473. };
  1474. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  1475. .master = &omap2430_l4_wkup_hwmod,
  1476. .slave = &omap2430_gpio3_hwmod,
  1477. .clk = "gpios_ick",
  1478. .addr = omap2430_gpio3_addr_space,
  1479. .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
  1480. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1481. };
  1482. /* l4_wkup -> gpio4 */
  1483. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  1484. {
  1485. .pa_start = 0x49012000,
  1486. .pa_end = 0x490121ff,
  1487. .flags = ADDR_TYPE_RT
  1488. },
  1489. };
  1490. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  1491. .master = &omap2430_l4_wkup_hwmod,
  1492. .slave = &omap2430_gpio4_hwmod,
  1493. .clk = "gpios_ick",
  1494. .addr = omap2430_gpio4_addr_space,
  1495. .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
  1496. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1497. };
  1498. /* l4_core -> gpio5 */
  1499. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  1500. {
  1501. .pa_start = 0x480B6000,
  1502. .pa_end = 0x480B61ff,
  1503. .flags = ADDR_TYPE_RT
  1504. },
  1505. };
  1506. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  1507. .master = &omap2430_l4_core_hwmod,
  1508. .slave = &omap2430_gpio5_hwmod,
  1509. .clk = "gpio5_ick",
  1510. .addr = omap2430_gpio5_addr_space,
  1511. .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
  1512. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1513. };
  1514. /* gpio dev_attr */
  1515. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1516. .bank_width = 32,
  1517. .dbck_flag = false,
  1518. };
  1519. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  1520. .rev_offs = 0x0000,
  1521. .sysc_offs = 0x0010,
  1522. .syss_offs = 0x0014,
  1523. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1524. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1525. SYSS_HAS_RESET_STATUS),
  1526. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1527. .sysc_fields = &omap_hwmod_sysc_type1,
  1528. };
  1529. /*
  1530. * 'gpio' class
  1531. * general purpose io module
  1532. */
  1533. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  1534. .name = "gpio",
  1535. .sysc = &omap243x_gpio_sysc,
  1536. .rev = 0,
  1537. };
  1538. /* gpio1 */
  1539. static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
  1540. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  1541. };
  1542. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  1543. &omap2430_l4_wkup__gpio1,
  1544. };
  1545. static struct omap_hwmod omap2430_gpio1_hwmod = {
  1546. .name = "gpio1",
  1547. .mpu_irqs = omap243x_gpio1_irqs,
  1548. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
  1549. .main_clk = "gpios_fck",
  1550. .prcm = {
  1551. .omap2 = {
  1552. .prcm_reg_id = 1,
  1553. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1554. .module_offs = WKUP_MOD,
  1555. .idlest_reg_id = 1,
  1556. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1557. },
  1558. },
  1559. .slaves = omap2430_gpio1_slaves,
  1560. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  1561. .class = &omap243x_gpio_hwmod_class,
  1562. .dev_attr = &gpio_dev_attr,
  1563. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1564. };
  1565. /* gpio2 */
  1566. static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
  1567. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  1568. };
  1569. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  1570. &omap2430_l4_wkup__gpio2,
  1571. };
  1572. static struct omap_hwmod omap2430_gpio2_hwmod = {
  1573. .name = "gpio2",
  1574. .mpu_irqs = omap243x_gpio2_irqs,
  1575. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
  1576. .main_clk = "gpios_fck",
  1577. .prcm = {
  1578. .omap2 = {
  1579. .prcm_reg_id = 1,
  1580. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1581. .module_offs = WKUP_MOD,
  1582. .idlest_reg_id = 1,
  1583. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1584. },
  1585. },
  1586. .slaves = omap2430_gpio2_slaves,
  1587. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  1588. .class = &omap243x_gpio_hwmod_class,
  1589. .dev_attr = &gpio_dev_attr,
  1590. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1591. };
  1592. /* gpio3 */
  1593. static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
  1594. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  1595. };
  1596. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1597. &omap2430_l4_wkup__gpio3,
  1598. };
  1599. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1600. .name = "gpio3",
  1601. .mpu_irqs = omap243x_gpio3_irqs,
  1602. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
  1603. .main_clk = "gpios_fck",
  1604. .prcm = {
  1605. .omap2 = {
  1606. .prcm_reg_id = 1,
  1607. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1608. .module_offs = WKUP_MOD,
  1609. .idlest_reg_id = 1,
  1610. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1611. },
  1612. },
  1613. .slaves = omap2430_gpio3_slaves,
  1614. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1615. .class = &omap243x_gpio_hwmod_class,
  1616. .dev_attr = &gpio_dev_attr,
  1617. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1618. };
  1619. /* gpio4 */
  1620. static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
  1621. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  1622. };
  1623. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1624. &omap2430_l4_wkup__gpio4,
  1625. };
  1626. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1627. .name = "gpio4",
  1628. .mpu_irqs = omap243x_gpio4_irqs,
  1629. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
  1630. .main_clk = "gpios_fck",
  1631. .prcm = {
  1632. .omap2 = {
  1633. .prcm_reg_id = 1,
  1634. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1635. .module_offs = WKUP_MOD,
  1636. .idlest_reg_id = 1,
  1637. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1638. },
  1639. },
  1640. .slaves = omap2430_gpio4_slaves,
  1641. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1642. .class = &omap243x_gpio_hwmod_class,
  1643. .dev_attr = &gpio_dev_attr,
  1644. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1645. };
  1646. /* gpio5 */
  1647. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1648. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1649. };
  1650. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1651. &omap2430_l4_core__gpio5,
  1652. };
  1653. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1654. .name = "gpio5",
  1655. .mpu_irqs = omap243x_gpio5_irqs,
  1656. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
  1657. .main_clk = "gpio5_fck",
  1658. .prcm = {
  1659. .omap2 = {
  1660. .prcm_reg_id = 2,
  1661. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1662. .module_offs = CORE_MOD,
  1663. .idlest_reg_id = 2,
  1664. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1665. },
  1666. },
  1667. .slaves = omap2430_gpio5_slaves,
  1668. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1669. .class = &omap243x_gpio_hwmod_class,
  1670. .dev_attr = &gpio_dev_attr,
  1671. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1672. };
  1673. /* dma_system */
  1674. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1675. .rev_offs = 0x0000,
  1676. .sysc_offs = 0x002c,
  1677. .syss_offs = 0x0028,
  1678. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1679. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1680. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1681. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1682. .sysc_fields = &omap_hwmod_sysc_type1,
  1683. };
  1684. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1685. .name = "dma",
  1686. .sysc = &omap2430_dma_sysc,
  1687. };
  1688. /* dma attributes */
  1689. static struct omap_dma_dev_attr dma_dev_attr = {
  1690. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1691. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1692. .lch_count = 32,
  1693. };
  1694. static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
  1695. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1696. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1697. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1698. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1699. };
  1700. static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
  1701. {
  1702. .pa_start = 0x48056000,
  1703. .pa_end = 0x4a0560ff,
  1704. .flags = ADDR_TYPE_RT
  1705. },
  1706. };
  1707. /* dma_system -> L3 */
  1708. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1709. .master = &omap2430_dma_system_hwmod,
  1710. .slave = &omap2430_l3_main_hwmod,
  1711. .clk = "core_l3_ck",
  1712. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1713. };
  1714. /* dma_system master ports */
  1715. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1716. &omap2430_dma_system__l3,
  1717. };
  1718. /* l4_core -> dma_system */
  1719. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1720. .master = &omap2430_l4_core_hwmod,
  1721. .slave = &omap2430_dma_system_hwmod,
  1722. .clk = "sdma_ick",
  1723. .addr = omap2430_dma_system_addrs,
  1724. .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs),
  1725. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1726. };
  1727. /* dma_system slave ports */
  1728. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1729. &omap2430_l4_core__dma_system,
  1730. };
  1731. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1732. .name = "dma",
  1733. .class = &omap2430_dma_hwmod_class,
  1734. .mpu_irqs = omap2430_dma_system_irqs,
  1735. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
  1736. .main_clk = "core_l3_ck",
  1737. .slaves = omap2430_dma_system_slaves,
  1738. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1739. .masters = omap2430_dma_system_masters,
  1740. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1741. .dev_attr = &dma_dev_attr,
  1742. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1743. .flags = HWMOD_NO_IDLEST,
  1744. };
  1745. /*
  1746. * 'mailbox' class
  1747. * mailbox module allowing communication between the on-chip processors
  1748. * using a queued mailbox-interrupt mechanism.
  1749. */
  1750. static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
  1751. .rev_offs = 0x000,
  1752. .sysc_offs = 0x010,
  1753. .syss_offs = 0x014,
  1754. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1755. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1756. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1757. .sysc_fields = &omap_hwmod_sysc_type1,
  1758. };
  1759. static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
  1760. .name = "mailbox",
  1761. .sysc = &omap2430_mailbox_sysc,
  1762. };
  1763. /* mailbox */
  1764. static struct omap_hwmod omap2430_mailbox_hwmod;
  1765. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1766. { .irq = 26 },
  1767. };
  1768. static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
  1769. {
  1770. .pa_start = 0x48094000,
  1771. .pa_end = 0x480941ff,
  1772. .flags = ADDR_TYPE_RT,
  1773. },
  1774. };
  1775. /* l4_core -> mailbox */
  1776. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1777. .master = &omap2430_l4_core_hwmod,
  1778. .slave = &omap2430_mailbox_hwmod,
  1779. .addr = omap2430_mailbox_addrs,
  1780. .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
  1781. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1782. };
  1783. /* mailbox slave ports */
  1784. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1785. &omap2430_l4_core__mailbox,
  1786. };
  1787. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1788. .name = "mailbox",
  1789. .class = &omap2430_mailbox_hwmod_class,
  1790. .mpu_irqs = omap2430_mailbox_irqs,
  1791. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
  1792. .main_clk = "mailboxes_ick",
  1793. .prcm = {
  1794. .omap2 = {
  1795. .prcm_reg_id = 1,
  1796. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1797. .module_offs = CORE_MOD,
  1798. .idlest_reg_id = 1,
  1799. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1800. },
  1801. },
  1802. .slaves = omap2430_mailbox_slaves,
  1803. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1804. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1805. };
  1806. /*
  1807. * 'mcspi' class
  1808. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1809. * bus
  1810. */
  1811. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1812. .rev_offs = 0x0000,
  1813. .sysc_offs = 0x0010,
  1814. .syss_offs = 0x0014,
  1815. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1816. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1817. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1818. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1819. .sysc_fields = &omap_hwmod_sysc_type1,
  1820. };
  1821. static struct omap_hwmod_class omap2430_mcspi_class = {
  1822. .name = "mcspi",
  1823. .sysc = &omap2430_mcspi_sysc,
  1824. .rev = OMAP2_MCSPI_REV,
  1825. };
  1826. /* mcspi1 */
  1827. static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
  1828. { .irq = 65 },
  1829. };
  1830. static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
  1831. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1832. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1833. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1834. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1835. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1836. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1837. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1838. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1839. };
  1840. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1841. &omap2430_l4_core__mcspi1,
  1842. };
  1843. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1844. .num_chipselect = 4,
  1845. };
  1846. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1847. .name = "mcspi1_hwmod",
  1848. .mpu_irqs = omap2430_mcspi1_mpu_irqs,
  1849. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
  1850. .sdma_reqs = omap2430_mcspi1_sdma_reqs,
  1851. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
  1852. .main_clk = "mcspi1_fck",
  1853. .prcm = {
  1854. .omap2 = {
  1855. .module_offs = CORE_MOD,
  1856. .prcm_reg_id = 1,
  1857. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1858. .idlest_reg_id = 1,
  1859. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1860. },
  1861. },
  1862. .slaves = omap2430_mcspi1_slaves,
  1863. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1864. .class = &omap2430_mcspi_class,
  1865. .dev_attr = &omap_mcspi1_dev_attr,
  1866. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1867. };
  1868. /* mcspi2 */
  1869. static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
  1870. { .irq = 66 },
  1871. };
  1872. static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
  1873. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1874. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1875. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1876. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1877. };
  1878. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1879. &omap2430_l4_core__mcspi2,
  1880. };
  1881. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1882. .num_chipselect = 2,
  1883. };
  1884. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1885. .name = "mcspi2_hwmod",
  1886. .mpu_irqs = omap2430_mcspi2_mpu_irqs,
  1887. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
  1888. .sdma_reqs = omap2430_mcspi2_sdma_reqs,
  1889. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
  1890. .main_clk = "mcspi2_fck",
  1891. .prcm = {
  1892. .omap2 = {
  1893. .module_offs = CORE_MOD,
  1894. .prcm_reg_id = 1,
  1895. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1896. .idlest_reg_id = 1,
  1897. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1898. },
  1899. },
  1900. .slaves = omap2430_mcspi2_slaves,
  1901. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1902. .class = &omap2430_mcspi_class,
  1903. .dev_attr = &omap_mcspi2_dev_attr,
  1904. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1905. };
  1906. /* mcspi3 */
  1907. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1908. { .irq = 91 },
  1909. };
  1910. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1911. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1912. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1913. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1914. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1915. };
  1916. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1917. &omap2430_l4_core__mcspi3,
  1918. };
  1919. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1920. .num_chipselect = 2,
  1921. };
  1922. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1923. .name = "mcspi3_hwmod",
  1924. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1925. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
  1926. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1927. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
  1928. .main_clk = "mcspi3_fck",
  1929. .prcm = {
  1930. .omap2 = {
  1931. .module_offs = CORE_MOD,
  1932. .prcm_reg_id = 2,
  1933. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1934. .idlest_reg_id = 2,
  1935. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1936. },
  1937. },
  1938. .slaves = omap2430_mcspi3_slaves,
  1939. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1940. .class = &omap2430_mcspi_class,
  1941. .dev_attr = &omap_mcspi3_dev_attr,
  1942. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1943. };
  1944. /*
  1945. * usbhsotg
  1946. */
  1947. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1948. .rev_offs = 0x0400,
  1949. .sysc_offs = 0x0404,
  1950. .syss_offs = 0x0408,
  1951. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1952. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1953. SYSC_HAS_AUTOIDLE),
  1954. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1955. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1956. .sysc_fields = &omap_hwmod_sysc_type1,
  1957. };
  1958. static struct omap_hwmod_class usbotg_class = {
  1959. .name = "usbotg",
  1960. .sysc = &omap2430_usbhsotg_sysc,
  1961. };
  1962. /* usb_otg_hs */
  1963. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1964. { .name = "mc", .irq = 92 },
  1965. { .name = "dma", .irq = 93 },
  1966. };
  1967. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1968. .name = "usb_otg_hs",
  1969. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1970. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
  1971. .main_clk = "usbhs_ick",
  1972. .prcm = {
  1973. .omap2 = {
  1974. .prcm_reg_id = 1,
  1975. .module_bit = OMAP2430_EN_USBHS_MASK,
  1976. .module_offs = CORE_MOD,
  1977. .idlest_reg_id = 1,
  1978. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1979. },
  1980. },
  1981. .masters = omap2430_usbhsotg_masters,
  1982. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1983. .slaves = omap2430_usbhsotg_slaves,
  1984. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1985. .class = &usbotg_class,
  1986. /*
  1987. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1988. * broken when autoidle is enabled
  1989. * workaround is to disable the autoidle bit at module level.
  1990. */
  1991. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1992. | HWMOD_SWSUP_MSTANDBY,
  1993. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1994. };
  1995. /*
  1996. * 'mcbsp' class
  1997. * multi channel buffered serial port controller
  1998. */
  1999. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  2000. .rev_offs = 0x007C,
  2001. .sysc_offs = 0x008C,
  2002. .sysc_flags = (SYSC_HAS_SOFTRESET),
  2003. .sysc_fields = &omap_hwmod_sysc_type1,
  2004. };
  2005. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  2006. .name = "mcbsp",
  2007. .sysc = &omap2430_mcbsp_sysc,
  2008. .rev = MCBSP_CONFIG_TYPE2,
  2009. };
  2010. /* mcbsp1 */
  2011. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  2012. { .name = "tx", .irq = 59 },
  2013. { .name = "rx", .irq = 60 },
  2014. { .name = "ovr", .irq = 61 },
  2015. { .name = "common", .irq = 64 },
  2016. };
  2017. static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
  2018. { .name = "rx", .dma_req = 32 },
  2019. { .name = "tx", .dma_req = 31 },
  2020. };
  2021. static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
  2022. {
  2023. .name = "mpu",
  2024. .pa_start = 0x48074000,
  2025. .pa_end = 0x480740ff,
  2026. .flags = ADDR_TYPE_RT
  2027. },
  2028. };
  2029. /* l4_core -> mcbsp1 */
  2030. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  2031. .master = &omap2430_l4_core_hwmod,
  2032. .slave = &omap2430_mcbsp1_hwmod,
  2033. .clk = "mcbsp1_ick",
  2034. .addr = omap2430_mcbsp1_addrs,
  2035. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
  2036. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2037. };
  2038. /* mcbsp1 slave ports */
  2039. static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
  2040. &omap2430_l4_core__mcbsp1,
  2041. };
  2042. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  2043. .name = "mcbsp1",
  2044. .class = &omap2430_mcbsp_hwmod_class,
  2045. .mpu_irqs = omap2430_mcbsp1_irqs,
  2046. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
  2047. .sdma_reqs = omap2430_mcbsp1_sdma_chs,
  2048. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
  2049. .main_clk = "mcbsp1_fck",
  2050. .prcm = {
  2051. .omap2 = {
  2052. .prcm_reg_id = 1,
  2053. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  2054. .module_offs = CORE_MOD,
  2055. .idlest_reg_id = 1,
  2056. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  2057. },
  2058. },
  2059. .slaves = omap2430_mcbsp1_slaves,
  2060. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
  2061. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2062. };
  2063. /* mcbsp2 */
  2064. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  2065. { .name = "tx", .irq = 62 },
  2066. { .name = "rx", .irq = 63 },
  2067. { .name = "common", .irq = 16 },
  2068. };
  2069. static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
  2070. { .name = "rx", .dma_req = 34 },
  2071. { .name = "tx", .dma_req = 33 },
  2072. };
  2073. static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
  2074. {
  2075. .name = "mpu",
  2076. .pa_start = 0x48076000,
  2077. .pa_end = 0x480760ff,
  2078. .flags = ADDR_TYPE_RT
  2079. },
  2080. };
  2081. /* l4_core -> mcbsp2 */
  2082. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  2083. .master = &omap2430_l4_core_hwmod,
  2084. .slave = &omap2430_mcbsp2_hwmod,
  2085. .clk = "mcbsp2_ick",
  2086. .addr = omap2430_mcbsp2_addrs,
  2087. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
  2088. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2089. };
  2090. /* mcbsp2 slave ports */
  2091. static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
  2092. &omap2430_l4_core__mcbsp2,
  2093. };
  2094. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  2095. .name = "mcbsp2",
  2096. .class = &omap2430_mcbsp_hwmod_class,
  2097. .mpu_irqs = omap2430_mcbsp2_irqs,
  2098. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
  2099. .sdma_reqs = omap2430_mcbsp2_sdma_chs,
  2100. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
  2101. .main_clk = "mcbsp2_fck",
  2102. .prcm = {
  2103. .omap2 = {
  2104. .prcm_reg_id = 1,
  2105. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  2106. .module_offs = CORE_MOD,
  2107. .idlest_reg_id = 1,
  2108. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  2109. },
  2110. },
  2111. .slaves = omap2430_mcbsp2_slaves,
  2112. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
  2113. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2114. };
  2115. /* mcbsp3 */
  2116. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  2117. { .name = "tx", .irq = 89 },
  2118. { .name = "rx", .irq = 90 },
  2119. { .name = "common", .irq = 17 },
  2120. };
  2121. static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
  2122. { .name = "rx", .dma_req = 18 },
  2123. { .name = "tx", .dma_req = 17 },
  2124. };
  2125. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  2126. {
  2127. .name = "mpu",
  2128. .pa_start = 0x4808C000,
  2129. .pa_end = 0x4808C0ff,
  2130. .flags = ADDR_TYPE_RT
  2131. },
  2132. };
  2133. /* l4_core -> mcbsp3 */
  2134. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  2135. .master = &omap2430_l4_core_hwmod,
  2136. .slave = &omap2430_mcbsp3_hwmod,
  2137. .clk = "mcbsp3_ick",
  2138. .addr = omap2430_mcbsp3_addrs,
  2139. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
  2140. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2141. };
  2142. /* mcbsp3 slave ports */
  2143. static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
  2144. &omap2430_l4_core__mcbsp3,
  2145. };
  2146. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  2147. .name = "mcbsp3",
  2148. .class = &omap2430_mcbsp_hwmod_class,
  2149. .mpu_irqs = omap2430_mcbsp3_irqs,
  2150. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
  2151. .sdma_reqs = omap2430_mcbsp3_sdma_chs,
  2152. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
  2153. .main_clk = "mcbsp3_fck",
  2154. .prcm = {
  2155. .omap2 = {
  2156. .prcm_reg_id = 1,
  2157. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  2158. .module_offs = CORE_MOD,
  2159. .idlest_reg_id = 2,
  2160. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  2161. },
  2162. },
  2163. .slaves = omap2430_mcbsp3_slaves,
  2164. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
  2165. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2166. };
  2167. /* mcbsp4 */
  2168. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  2169. { .name = "tx", .irq = 54 },
  2170. { .name = "rx", .irq = 55 },
  2171. { .name = "common", .irq = 18 },
  2172. };
  2173. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  2174. { .name = "rx", .dma_req = 20 },
  2175. { .name = "tx", .dma_req = 19 },
  2176. };
  2177. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  2178. {
  2179. .name = "mpu",
  2180. .pa_start = 0x4808E000,
  2181. .pa_end = 0x4808E0ff,
  2182. .flags = ADDR_TYPE_RT
  2183. },
  2184. };
  2185. /* l4_core -> mcbsp4 */
  2186. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  2187. .master = &omap2430_l4_core_hwmod,
  2188. .slave = &omap2430_mcbsp4_hwmod,
  2189. .clk = "mcbsp4_ick",
  2190. .addr = omap2430_mcbsp4_addrs,
  2191. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
  2192. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2193. };
  2194. /* mcbsp4 slave ports */
  2195. static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
  2196. &omap2430_l4_core__mcbsp4,
  2197. };
  2198. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  2199. .name = "mcbsp4",
  2200. .class = &omap2430_mcbsp_hwmod_class,
  2201. .mpu_irqs = omap2430_mcbsp4_irqs,
  2202. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
  2203. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  2204. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
  2205. .main_clk = "mcbsp4_fck",
  2206. .prcm = {
  2207. .omap2 = {
  2208. .prcm_reg_id = 1,
  2209. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  2210. .module_offs = CORE_MOD,
  2211. .idlest_reg_id = 2,
  2212. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  2213. },
  2214. },
  2215. .slaves = omap2430_mcbsp4_slaves,
  2216. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
  2217. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2218. };
  2219. /* mcbsp5 */
  2220. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  2221. { .name = "tx", .irq = 81 },
  2222. { .name = "rx", .irq = 82 },
  2223. { .name = "common", .irq = 19 },
  2224. };
  2225. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  2226. { .name = "rx", .dma_req = 22 },
  2227. { .name = "tx", .dma_req = 21 },
  2228. };
  2229. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  2230. {
  2231. .name = "mpu",
  2232. .pa_start = 0x48096000,
  2233. .pa_end = 0x480960ff,
  2234. .flags = ADDR_TYPE_RT
  2235. },
  2236. };
  2237. /* l4_core -> mcbsp5 */
  2238. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  2239. .master = &omap2430_l4_core_hwmod,
  2240. .slave = &omap2430_mcbsp5_hwmod,
  2241. .clk = "mcbsp5_ick",
  2242. .addr = omap2430_mcbsp5_addrs,
  2243. .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
  2244. .user = OCP_USER_MPU | OCP_USER_SDMA,
  2245. };
  2246. /* mcbsp5 slave ports */
  2247. static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
  2248. &omap2430_l4_core__mcbsp5,
  2249. };
  2250. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  2251. .name = "mcbsp5",
  2252. .class = &omap2430_mcbsp_hwmod_class,
  2253. .mpu_irqs = omap2430_mcbsp5_irqs,
  2254. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
  2255. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  2256. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
  2257. .main_clk = "mcbsp5_fck",
  2258. .prcm = {
  2259. .omap2 = {
  2260. .prcm_reg_id = 1,
  2261. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  2262. .module_offs = CORE_MOD,
  2263. .idlest_reg_id = 2,
  2264. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  2265. },
  2266. },
  2267. .slaves = omap2430_mcbsp5_slaves,
  2268. .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
  2269. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2270. };
  2271. /* MMC/SD/SDIO common */
  2272. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  2273. .rev_offs = 0x1fc,
  2274. .sysc_offs = 0x10,
  2275. .syss_offs = 0x14,
  2276. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  2277. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  2278. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  2279. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  2280. .sysc_fields = &omap_hwmod_sysc_type1,
  2281. };
  2282. static struct omap_hwmod_class omap2430_mmc_class = {
  2283. .name = "mmc",
  2284. .sysc = &omap2430_mmc_sysc,
  2285. };
  2286. /* MMC/SD/SDIO1 */
  2287. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  2288. { .irq = 83 },
  2289. };
  2290. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  2291. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  2292. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  2293. };
  2294. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  2295. { .role = "dbck", .clk = "mmchsdb1_fck" },
  2296. };
  2297. static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
  2298. &omap2430_l4_core__mmc1,
  2299. };
  2300. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  2301. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  2302. };
  2303. static struct omap_hwmod omap2430_mmc1_hwmod = {
  2304. .name = "mmc1",
  2305. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  2306. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  2307. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
  2308. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  2309. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
  2310. .opt_clks = omap2430_mmc1_opt_clks,
  2311. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  2312. .main_clk = "mmchs1_fck",
  2313. .prcm = {
  2314. .omap2 = {
  2315. .module_offs = CORE_MOD,
  2316. .prcm_reg_id = 2,
  2317. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  2318. .idlest_reg_id = 2,
  2319. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  2320. },
  2321. },
  2322. .dev_attr = &mmc1_dev_attr,
  2323. .slaves = omap2430_mmc1_slaves,
  2324. .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
  2325. .class = &omap2430_mmc_class,
  2326. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2327. };
  2328. /* MMC/SD/SDIO2 */
  2329. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  2330. { .irq = 86 },
  2331. };
  2332. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  2333. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  2334. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  2335. };
  2336. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  2337. { .role = "dbck", .clk = "mmchsdb2_fck" },
  2338. };
  2339. static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
  2340. &omap2430_l4_core__mmc2,
  2341. };
  2342. static struct omap_hwmod omap2430_mmc2_hwmod = {
  2343. .name = "mmc2",
  2344. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  2345. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  2346. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
  2347. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  2348. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
  2349. .opt_clks = omap2430_mmc2_opt_clks,
  2350. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  2351. .main_clk = "mmchs2_fck",
  2352. .prcm = {
  2353. .omap2 = {
  2354. .module_offs = CORE_MOD,
  2355. .prcm_reg_id = 2,
  2356. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  2357. .idlest_reg_id = 2,
  2358. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  2359. },
  2360. },
  2361. .slaves = omap2430_mmc2_slaves,
  2362. .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
  2363. .class = &omap2430_mmc_class,
  2364. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  2365. };
  2366. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  2367. &omap2430_l3_main_hwmod,
  2368. &omap2430_l4_core_hwmod,
  2369. &omap2430_l4_wkup_hwmod,
  2370. &omap2430_mpu_hwmod,
  2371. &omap2430_iva_hwmod,
  2372. &omap2430_timer1_hwmod,
  2373. &omap2430_timer2_hwmod,
  2374. &omap2430_timer3_hwmod,
  2375. &omap2430_timer4_hwmod,
  2376. &omap2430_timer5_hwmod,
  2377. &omap2430_timer6_hwmod,
  2378. &omap2430_timer7_hwmod,
  2379. &omap2430_timer8_hwmod,
  2380. &omap2430_timer9_hwmod,
  2381. &omap2430_timer10_hwmod,
  2382. &omap2430_timer11_hwmod,
  2383. &omap2430_timer12_hwmod,
  2384. &omap2430_wd_timer2_hwmod,
  2385. &omap2430_uart1_hwmod,
  2386. &omap2430_uart2_hwmod,
  2387. &omap2430_uart3_hwmod,
  2388. /* dss class */
  2389. &omap2430_dss_core_hwmod,
  2390. &omap2430_dss_dispc_hwmod,
  2391. &omap2430_dss_rfbi_hwmod,
  2392. &omap2430_dss_venc_hwmod,
  2393. /* i2c class */
  2394. &omap2430_i2c1_hwmod,
  2395. &omap2430_i2c2_hwmod,
  2396. &omap2430_mmc1_hwmod,
  2397. &omap2430_mmc2_hwmod,
  2398. /* gpio class */
  2399. &omap2430_gpio1_hwmod,
  2400. &omap2430_gpio2_hwmod,
  2401. &omap2430_gpio3_hwmod,
  2402. &omap2430_gpio4_hwmod,
  2403. &omap2430_gpio5_hwmod,
  2404. /* dma_system class*/
  2405. &omap2430_dma_system_hwmod,
  2406. /* mcbsp class */
  2407. &omap2430_mcbsp1_hwmod,
  2408. &omap2430_mcbsp2_hwmod,
  2409. &omap2430_mcbsp3_hwmod,
  2410. &omap2430_mcbsp4_hwmod,
  2411. &omap2430_mcbsp5_hwmod,
  2412. /* mailbox class */
  2413. &omap2430_mailbox_hwmod,
  2414. /* mcspi class */
  2415. &omap2430_mcspi1_hwmod,
  2416. &omap2430_mcspi2_hwmod,
  2417. &omap2430_mcspi3_hwmod,
  2418. /* usbotg class*/
  2419. &omap2430_usbhsotg_hwmod,
  2420. NULL,
  2421. };
  2422. int __init omap2430_hwmod_init(void)
  2423. {
  2424. return omap_hwmod_register(omap2430_hwmods);
  2425. }