omap_hwmod_2430_data.c 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187
  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/mcspi.h>
  22. #include <plat/dmtimer.h>
  23. #include <plat/l3_2xxx.h>
  24. #include "omap_hwmod_common_data.h"
  25. #include "prm-regbits-24xx.h"
  26. #include "cm-regbits-24xx.h"
  27. #include "wd_timer.h"
  28. /*
  29. * OMAP2430 hardware module integration data
  30. *
  31. * ALl of the data in this section should be autogeneratable from the
  32. * TI hardware database or other technical documentation. Data that
  33. * is driver-specific or driver-kernel integration-specific belongs
  34. * elsewhere.
  35. */
  36. static struct omap_hwmod omap2430_mpu_hwmod;
  37. static struct omap_hwmod omap2430_iva_hwmod;
  38. static struct omap_hwmod omap2430_l3_main_hwmod;
  39. static struct omap_hwmod omap2430_l4_core_hwmod;
  40. static struct omap_hwmod omap2430_dss_core_hwmod;
  41. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  42. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  43. static struct omap_hwmod omap2430_dss_venc_hwmod;
  44. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  45. static struct omap_hwmod omap2430_gpio1_hwmod;
  46. static struct omap_hwmod omap2430_gpio2_hwmod;
  47. static struct omap_hwmod omap2430_gpio3_hwmod;
  48. static struct omap_hwmod omap2430_gpio4_hwmod;
  49. static struct omap_hwmod omap2430_gpio5_hwmod;
  50. static struct omap_hwmod omap2430_dma_system_hwmod;
  51. static struct omap_hwmod omap2430_mcspi1_hwmod;
  52. static struct omap_hwmod omap2430_mcspi2_hwmod;
  53. static struct omap_hwmod omap2430_mcspi3_hwmod;
  54. /* L3 -> L4_CORE interface */
  55. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  56. .master = &omap2430_l3_main_hwmod,
  57. .slave = &omap2430_l4_core_hwmod,
  58. .user = OCP_USER_MPU | OCP_USER_SDMA,
  59. };
  60. /* MPU -> L3 interface */
  61. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  62. .master = &omap2430_mpu_hwmod,
  63. .slave = &omap2430_l3_main_hwmod,
  64. .user = OCP_USER_MPU,
  65. };
  66. /* Slave interfaces on the L3 interconnect */
  67. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  68. &omap2430_mpu__l3_main,
  69. };
  70. /* DSS -> l3 */
  71. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  72. .master = &omap2430_dss_core_hwmod,
  73. .slave = &omap2430_l3_main_hwmod,
  74. .fw = {
  75. .omap2 = {
  76. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  77. .flags = OMAP_FIREWALL_L3,
  78. }
  79. },
  80. .user = OCP_USER_MPU | OCP_USER_SDMA,
  81. };
  82. /* Master interfaces on the L3 interconnect */
  83. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  84. &omap2430_l3_main__l4_core,
  85. };
  86. /* L3 */
  87. static struct omap_hwmod omap2430_l3_main_hwmod = {
  88. .name = "l3_main",
  89. .class = &l3_hwmod_class,
  90. .masters = omap2430_l3_main_masters,
  91. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  92. .slaves = omap2430_l3_main_slaves,
  93. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  94. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  95. .flags = HWMOD_NO_IDLEST,
  96. };
  97. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  98. static struct omap_hwmod omap2430_uart1_hwmod;
  99. static struct omap_hwmod omap2430_uart2_hwmod;
  100. static struct omap_hwmod omap2430_uart3_hwmod;
  101. static struct omap_hwmod omap2430_i2c1_hwmod;
  102. static struct omap_hwmod omap2430_i2c2_hwmod;
  103. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  104. /* l3_core -> usbhsotg interface */
  105. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  106. .master = &omap2430_usbhsotg_hwmod,
  107. .slave = &omap2430_l3_main_hwmod,
  108. .clk = "core_l3_ck",
  109. .user = OCP_USER_MPU,
  110. };
  111. /* I2C IP block address space length (in bytes) */
  112. #define OMAP2_I2C_AS_LEN 128
  113. /* L4 CORE -> I2C1 interface */
  114. static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
  115. {
  116. .pa_start = 0x48070000,
  117. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  118. .flags = ADDR_TYPE_RT,
  119. },
  120. };
  121. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  122. .master = &omap2430_l4_core_hwmod,
  123. .slave = &omap2430_i2c1_hwmod,
  124. .clk = "i2c1_ick",
  125. .addr = omap2430_i2c1_addr_space,
  126. .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
  127. .user = OCP_USER_MPU | OCP_USER_SDMA,
  128. };
  129. /* L4 CORE -> I2C2 interface */
  130. static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
  131. {
  132. .pa_start = 0x48072000,
  133. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  134. .flags = ADDR_TYPE_RT,
  135. },
  136. };
  137. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  138. .master = &omap2430_l4_core_hwmod,
  139. .slave = &omap2430_i2c2_hwmod,
  140. .clk = "i2c2_ick",
  141. .addr = omap2430_i2c2_addr_space,
  142. .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
  143. .user = OCP_USER_MPU | OCP_USER_SDMA,
  144. };
  145. /* L4_CORE -> L4_WKUP interface */
  146. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  147. .master = &omap2430_l4_core_hwmod,
  148. .slave = &omap2430_l4_wkup_hwmod,
  149. .user = OCP_USER_MPU | OCP_USER_SDMA,
  150. };
  151. /* L4 CORE -> UART1 interface */
  152. static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
  153. {
  154. .pa_start = OMAP2_UART1_BASE,
  155. .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
  156. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  157. },
  158. };
  159. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  160. .master = &omap2430_l4_core_hwmod,
  161. .slave = &omap2430_uart1_hwmod,
  162. .clk = "uart1_ick",
  163. .addr = omap2430_uart1_addr_space,
  164. .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
  165. .user = OCP_USER_MPU | OCP_USER_SDMA,
  166. };
  167. /* L4 CORE -> UART2 interface */
  168. static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
  169. {
  170. .pa_start = OMAP2_UART2_BASE,
  171. .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
  172. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  173. },
  174. };
  175. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  176. .master = &omap2430_l4_core_hwmod,
  177. .slave = &omap2430_uart2_hwmod,
  178. .clk = "uart2_ick",
  179. .addr = omap2430_uart2_addr_space,
  180. .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
  181. .user = OCP_USER_MPU | OCP_USER_SDMA,
  182. };
  183. /* L4 PER -> UART3 interface */
  184. static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
  185. {
  186. .pa_start = OMAP2_UART3_BASE,
  187. .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
  188. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  189. },
  190. };
  191. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  192. .master = &omap2430_l4_core_hwmod,
  193. .slave = &omap2430_uart3_hwmod,
  194. .clk = "uart3_ick",
  195. .addr = omap2430_uart3_addr_space,
  196. .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
  197. .user = OCP_USER_MPU | OCP_USER_SDMA,
  198. };
  199. /*
  200. * usbhsotg interface data
  201. */
  202. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  203. {
  204. .pa_start = OMAP243X_HS_BASE,
  205. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  206. .flags = ADDR_TYPE_RT
  207. },
  208. };
  209. /* l4_core ->usbhsotg interface */
  210. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  211. .master = &omap2430_l4_core_hwmod,
  212. .slave = &omap2430_usbhsotg_hwmod,
  213. .clk = "usb_l4_ick",
  214. .addr = omap2430_usbhsotg_addrs,
  215. .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs),
  216. .user = OCP_USER_MPU,
  217. };
  218. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
  219. &omap2430_usbhsotg__l3,
  220. };
  221. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
  222. &omap2430_l4_core__usbhsotg,
  223. };
  224. /* Slave interfaces on the L4_CORE interconnect */
  225. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  226. &omap2430_l3_main__l4_core,
  227. };
  228. /* Master interfaces on the L4_CORE interconnect */
  229. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  230. &omap2430_l4_core__l4_wkup,
  231. };
  232. /* L4 CORE */
  233. static struct omap_hwmod omap2430_l4_core_hwmod = {
  234. .name = "l4_core",
  235. .class = &l4_hwmod_class,
  236. .masters = omap2430_l4_core_masters,
  237. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  238. .slaves = omap2430_l4_core_slaves,
  239. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  240. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  241. .flags = HWMOD_NO_IDLEST,
  242. };
  243. /* Slave interfaces on the L4_WKUP interconnect */
  244. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  245. &omap2430_l4_core__l4_wkup,
  246. &omap2_l4_core__uart1,
  247. &omap2_l4_core__uart2,
  248. &omap2_l4_core__uart3,
  249. };
  250. /* Master interfaces on the L4_WKUP interconnect */
  251. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  252. };
  253. /* l4 core -> mcspi1 interface */
  254. static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
  255. {
  256. .pa_start = 0x48098000,
  257. .pa_end = 0x480980ff,
  258. .flags = ADDR_TYPE_RT,
  259. },
  260. };
  261. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  262. .master = &omap2430_l4_core_hwmod,
  263. .slave = &omap2430_mcspi1_hwmod,
  264. .clk = "mcspi1_ick",
  265. .addr = omap2430_mcspi1_addr_space,
  266. .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space),
  267. .user = OCP_USER_MPU | OCP_USER_SDMA,
  268. };
  269. /* l4 core -> mcspi2 interface */
  270. static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
  271. {
  272. .pa_start = 0x4809a000,
  273. .pa_end = 0x4809a0ff,
  274. .flags = ADDR_TYPE_RT,
  275. },
  276. };
  277. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  278. .master = &omap2430_l4_core_hwmod,
  279. .slave = &omap2430_mcspi2_hwmod,
  280. .clk = "mcspi2_ick",
  281. .addr = omap2430_mcspi2_addr_space,
  282. .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space),
  283. .user = OCP_USER_MPU | OCP_USER_SDMA,
  284. };
  285. /* l4 core -> mcspi3 interface */
  286. static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
  287. {
  288. .pa_start = 0x480b8000,
  289. .pa_end = 0x480b80ff,
  290. .flags = ADDR_TYPE_RT,
  291. },
  292. };
  293. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  294. .master = &omap2430_l4_core_hwmod,
  295. .slave = &omap2430_mcspi3_hwmod,
  296. .clk = "mcspi3_ick",
  297. .addr = omap2430_mcspi3_addr_space,
  298. .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space),
  299. .user = OCP_USER_MPU | OCP_USER_SDMA,
  300. };
  301. /* L4 WKUP */
  302. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  303. .name = "l4_wkup",
  304. .class = &l4_hwmod_class,
  305. .masters = omap2430_l4_wkup_masters,
  306. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  307. .slaves = omap2430_l4_wkup_slaves,
  308. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  309. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  310. .flags = HWMOD_NO_IDLEST,
  311. };
  312. /* Master interfaces on the MPU device */
  313. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  314. &omap2430_mpu__l3_main,
  315. };
  316. /* MPU */
  317. static struct omap_hwmod omap2430_mpu_hwmod = {
  318. .name = "mpu",
  319. .class = &mpu_hwmod_class,
  320. .main_clk = "mpu_ck",
  321. .masters = omap2430_mpu_masters,
  322. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  323. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  324. };
  325. /*
  326. * IVA2_1 interface data
  327. */
  328. /* IVA2 <- L3 interface */
  329. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  330. .master = &omap2430_l3_main_hwmod,
  331. .slave = &omap2430_iva_hwmod,
  332. .clk = "dsp_fck",
  333. .user = OCP_USER_MPU | OCP_USER_SDMA,
  334. };
  335. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  336. &omap2430_l3__iva,
  337. };
  338. /*
  339. * IVA2 (IVA2)
  340. */
  341. static struct omap_hwmod omap2430_iva_hwmod = {
  342. .name = "iva",
  343. .class = &iva_hwmod_class,
  344. .masters = omap2430_iva_masters,
  345. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  346. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  347. };
  348. /* Timer Common */
  349. static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
  350. .rev_offs = 0x0000,
  351. .sysc_offs = 0x0010,
  352. .syss_offs = 0x0014,
  353. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  354. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  355. SYSC_HAS_AUTOIDLE),
  356. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  357. .sysc_fields = &omap_hwmod_sysc_type1,
  358. };
  359. static struct omap_hwmod_class omap2430_timer_hwmod_class = {
  360. .name = "timer",
  361. .sysc = &omap2430_timer_sysc,
  362. .rev = OMAP_TIMER_IP_VERSION_1,
  363. };
  364. /* timer1 */
  365. static struct omap_hwmod omap2430_timer1_hwmod;
  366. static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = {
  367. { .irq = 37, },
  368. };
  369. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  370. {
  371. .pa_start = 0x49018000,
  372. .pa_end = 0x49018000 + SZ_1K - 1,
  373. .flags = ADDR_TYPE_RT
  374. },
  375. };
  376. /* l4_wkup -> timer1 */
  377. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  378. .master = &omap2430_l4_wkup_hwmod,
  379. .slave = &omap2430_timer1_hwmod,
  380. .clk = "gpt1_ick",
  381. .addr = omap2430_timer1_addrs,
  382. .addr_cnt = ARRAY_SIZE(omap2430_timer1_addrs),
  383. .user = OCP_USER_MPU | OCP_USER_SDMA,
  384. };
  385. /* timer1 slave port */
  386. static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
  387. &omap2430_l4_wkup__timer1,
  388. };
  389. /* timer1 hwmod */
  390. static struct omap_hwmod omap2430_timer1_hwmod = {
  391. .name = "timer1",
  392. .mpu_irqs = omap2430_timer1_mpu_irqs,
  393. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs),
  394. .main_clk = "gpt1_fck",
  395. .prcm = {
  396. .omap2 = {
  397. .prcm_reg_id = 1,
  398. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  399. .module_offs = WKUP_MOD,
  400. .idlest_reg_id = 1,
  401. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  402. },
  403. },
  404. .slaves = omap2430_timer1_slaves,
  405. .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
  406. .class = &omap2430_timer_hwmod_class,
  407. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  408. };
  409. /* timer2 */
  410. static struct omap_hwmod omap2430_timer2_hwmod;
  411. static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = {
  412. { .irq = 38, },
  413. };
  414. static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = {
  415. {
  416. .pa_start = 0x4802a000,
  417. .pa_end = 0x4802a000 + SZ_1K - 1,
  418. .flags = ADDR_TYPE_RT
  419. },
  420. };
  421. /* l4_core -> timer2 */
  422. static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
  423. .master = &omap2430_l4_core_hwmod,
  424. .slave = &omap2430_timer2_hwmod,
  425. .clk = "gpt2_ick",
  426. .addr = omap2430_timer2_addrs,
  427. .addr_cnt = ARRAY_SIZE(omap2430_timer2_addrs),
  428. .user = OCP_USER_MPU | OCP_USER_SDMA,
  429. };
  430. /* timer2 slave port */
  431. static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
  432. &omap2430_l4_core__timer2,
  433. };
  434. /* timer2 hwmod */
  435. static struct omap_hwmod omap2430_timer2_hwmod = {
  436. .name = "timer2",
  437. .mpu_irqs = omap2430_timer2_mpu_irqs,
  438. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs),
  439. .main_clk = "gpt2_fck",
  440. .prcm = {
  441. .omap2 = {
  442. .prcm_reg_id = 1,
  443. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  444. .module_offs = CORE_MOD,
  445. .idlest_reg_id = 1,
  446. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  447. },
  448. },
  449. .slaves = omap2430_timer2_slaves,
  450. .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
  451. .class = &omap2430_timer_hwmod_class,
  452. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  453. };
  454. /* timer3 */
  455. static struct omap_hwmod omap2430_timer3_hwmod;
  456. static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = {
  457. { .irq = 39, },
  458. };
  459. static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = {
  460. {
  461. .pa_start = 0x48078000,
  462. .pa_end = 0x48078000 + SZ_1K - 1,
  463. .flags = ADDR_TYPE_RT
  464. },
  465. };
  466. /* l4_core -> timer3 */
  467. static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
  468. .master = &omap2430_l4_core_hwmod,
  469. .slave = &omap2430_timer3_hwmod,
  470. .clk = "gpt3_ick",
  471. .addr = omap2430_timer3_addrs,
  472. .addr_cnt = ARRAY_SIZE(omap2430_timer3_addrs),
  473. .user = OCP_USER_MPU | OCP_USER_SDMA,
  474. };
  475. /* timer3 slave port */
  476. static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
  477. &omap2430_l4_core__timer3,
  478. };
  479. /* timer3 hwmod */
  480. static struct omap_hwmod omap2430_timer3_hwmod = {
  481. .name = "timer3",
  482. .mpu_irqs = omap2430_timer3_mpu_irqs,
  483. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs),
  484. .main_clk = "gpt3_fck",
  485. .prcm = {
  486. .omap2 = {
  487. .prcm_reg_id = 1,
  488. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  489. .module_offs = CORE_MOD,
  490. .idlest_reg_id = 1,
  491. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  492. },
  493. },
  494. .slaves = omap2430_timer3_slaves,
  495. .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
  496. .class = &omap2430_timer_hwmod_class,
  497. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  498. };
  499. /* timer4 */
  500. static struct omap_hwmod omap2430_timer4_hwmod;
  501. static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = {
  502. { .irq = 40, },
  503. };
  504. static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = {
  505. {
  506. .pa_start = 0x4807a000,
  507. .pa_end = 0x4807a000 + SZ_1K - 1,
  508. .flags = ADDR_TYPE_RT
  509. },
  510. };
  511. /* l4_core -> timer4 */
  512. static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
  513. .master = &omap2430_l4_core_hwmod,
  514. .slave = &omap2430_timer4_hwmod,
  515. .clk = "gpt4_ick",
  516. .addr = omap2430_timer4_addrs,
  517. .addr_cnt = ARRAY_SIZE(omap2430_timer4_addrs),
  518. .user = OCP_USER_MPU | OCP_USER_SDMA,
  519. };
  520. /* timer4 slave port */
  521. static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
  522. &omap2430_l4_core__timer4,
  523. };
  524. /* timer4 hwmod */
  525. static struct omap_hwmod omap2430_timer4_hwmod = {
  526. .name = "timer4",
  527. .mpu_irqs = omap2430_timer4_mpu_irqs,
  528. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs),
  529. .main_clk = "gpt4_fck",
  530. .prcm = {
  531. .omap2 = {
  532. .prcm_reg_id = 1,
  533. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  534. .module_offs = CORE_MOD,
  535. .idlest_reg_id = 1,
  536. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  537. },
  538. },
  539. .slaves = omap2430_timer4_slaves,
  540. .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
  541. .class = &omap2430_timer_hwmod_class,
  542. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  543. };
  544. /* timer5 */
  545. static struct omap_hwmod omap2430_timer5_hwmod;
  546. static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = {
  547. { .irq = 41, },
  548. };
  549. static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = {
  550. {
  551. .pa_start = 0x4807c000,
  552. .pa_end = 0x4807c000 + SZ_1K - 1,
  553. .flags = ADDR_TYPE_RT
  554. },
  555. };
  556. /* l4_core -> timer5 */
  557. static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
  558. .master = &omap2430_l4_core_hwmod,
  559. .slave = &omap2430_timer5_hwmod,
  560. .clk = "gpt5_ick",
  561. .addr = omap2430_timer5_addrs,
  562. .addr_cnt = ARRAY_SIZE(omap2430_timer5_addrs),
  563. .user = OCP_USER_MPU | OCP_USER_SDMA,
  564. };
  565. /* timer5 slave port */
  566. static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
  567. &omap2430_l4_core__timer5,
  568. };
  569. /* timer5 hwmod */
  570. static struct omap_hwmod omap2430_timer5_hwmod = {
  571. .name = "timer5",
  572. .mpu_irqs = omap2430_timer5_mpu_irqs,
  573. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs),
  574. .main_clk = "gpt5_fck",
  575. .prcm = {
  576. .omap2 = {
  577. .prcm_reg_id = 1,
  578. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  579. .module_offs = CORE_MOD,
  580. .idlest_reg_id = 1,
  581. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  582. },
  583. },
  584. .slaves = omap2430_timer5_slaves,
  585. .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
  586. .class = &omap2430_timer_hwmod_class,
  587. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  588. };
  589. /* timer6 */
  590. static struct omap_hwmod omap2430_timer6_hwmod;
  591. static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = {
  592. { .irq = 42, },
  593. };
  594. static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = {
  595. {
  596. .pa_start = 0x4807e000,
  597. .pa_end = 0x4807e000 + SZ_1K - 1,
  598. .flags = ADDR_TYPE_RT
  599. },
  600. };
  601. /* l4_core -> timer6 */
  602. static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
  603. .master = &omap2430_l4_core_hwmod,
  604. .slave = &omap2430_timer6_hwmod,
  605. .clk = "gpt6_ick",
  606. .addr = omap2430_timer6_addrs,
  607. .addr_cnt = ARRAY_SIZE(omap2430_timer6_addrs),
  608. .user = OCP_USER_MPU | OCP_USER_SDMA,
  609. };
  610. /* timer6 slave port */
  611. static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
  612. &omap2430_l4_core__timer6,
  613. };
  614. /* timer6 hwmod */
  615. static struct omap_hwmod omap2430_timer6_hwmod = {
  616. .name = "timer6",
  617. .mpu_irqs = omap2430_timer6_mpu_irqs,
  618. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs),
  619. .main_clk = "gpt6_fck",
  620. .prcm = {
  621. .omap2 = {
  622. .prcm_reg_id = 1,
  623. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  624. .module_offs = CORE_MOD,
  625. .idlest_reg_id = 1,
  626. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  627. },
  628. },
  629. .slaves = omap2430_timer6_slaves,
  630. .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
  631. .class = &omap2430_timer_hwmod_class,
  632. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  633. };
  634. /* timer7 */
  635. static struct omap_hwmod omap2430_timer7_hwmod;
  636. static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = {
  637. { .irq = 43, },
  638. };
  639. static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = {
  640. {
  641. .pa_start = 0x48080000,
  642. .pa_end = 0x48080000 + SZ_1K - 1,
  643. .flags = ADDR_TYPE_RT
  644. },
  645. };
  646. /* l4_core -> timer7 */
  647. static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
  648. .master = &omap2430_l4_core_hwmod,
  649. .slave = &omap2430_timer7_hwmod,
  650. .clk = "gpt7_ick",
  651. .addr = omap2430_timer7_addrs,
  652. .addr_cnt = ARRAY_SIZE(omap2430_timer7_addrs),
  653. .user = OCP_USER_MPU | OCP_USER_SDMA,
  654. };
  655. /* timer7 slave port */
  656. static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
  657. &omap2430_l4_core__timer7,
  658. };
  659. /* timer7 hwmod */
  660. static struct omap_hwmod omap2430_timer7_hwmod = {
  661. .name = "timer7",
  662. .mpu_irqs = omap2430_timer7_mpu_irqs,
  663. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs),
  664. .main_clk = "gpt7_fck",
  665. .prcm = {
  666. .omap2 = {
  667. .prcm_reg_id = 1,
  668. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  669. .module_offs = CORE_MOD,
  670. .idlest_reg_id = 1,
  671. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  672. },
  673. },
  674. .slaves = omap2430_timer7_slaves,
  675. .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
  676. .class = &omap2430_timer_hwmod_class,
  677. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  678. };
  679. /* timer8 */
  680. static struct omap_hwmod omap2430_timer8_hwmod;
  681. static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = {
  682. { .irq = 44, },
  683. };
  684. static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = {
  685. {
  686. .pa_start = 0x48082000,
  687. .pa_end = 0x48082000 + SZ_1K - 1,
  688. .flags = ADDR_TYPE_RT
  689. },
  690. };
  691. /* l4_core -> timer8 */
  692. static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
  693. .master = &omap2430_l4_core_hwmod,
  694. .slave = &omap2430_timer8_hwmod,
  695. .clk = "gpt8_ick",
  696. .addr = omap2430_timer8_addrs,
  697. .addr_cnt = ARRAY_SIZE(omap2430_timer8_addrs),
  698. .user = OCP_USER_MPU | OCP_USER_SDMA,
  699. };
  700. /* timer8 slave port */
  701. static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
  702. &omap2430_l4_core__timer8,
  703. };
  704. /* timer8 hwmod */
  705. static struct omap_hwmod omap2430_timer8_hwmod = {
  706. .name = "timer8",
  707. .mpu_irqs = omap2430_timer8_mpu_irqs,
  708. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs),
  709. .main_clk = "gpt8_fck",
  710. .prcm = {
  711. .omap2 = {
  712. .prcm_reg_id = 1,
  713. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  714. .module_offs = CORE_MOD,
  715. .idlest_reg_id = 1,
  716. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  717. },
  718. },
  719. .slaves = omap2430_timer8_slaves,
  720. .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
  721. .class = &omap2430_timer_hwmod_class,
  722. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  723. };
  724. /* timer9 */
  725. static struct omap_hwmod omap2430_timer9_hwmod;
  726. static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = {
  727. { .irq = 45, },
  728. };
  729. static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = {
  730. {
  731. .pa_start = 0x48084000,
  732. .pa_end = 0x48084000 + SZ_1K - 1,
  733. .flags = ADDR_TYPE_RT
  734. },
  735. };
  736. /* l4_core -> timer9 */
  737. static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
  738. .master = &omap2430_l4_core_hwmod,
  739. .slave = &omap2430_timer9_hwmod,
  740. .clk = "gpt9_ick",
  741. .addr = omap2430_timer9_addrs,
  742. .addr_cnt = ARRAY_SIZE(omap2430_timer9_addrs),
  743. .user = OCP_USER_MPU | OCP_USER_SDMA,
  744. };
  745. /* timer9 slave port */
  746. static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
  747. &omap2430_l4_core__timer9,
  748. };
  749. /* timer9 hwmod */
  750. static struct omap_hwmod omap2430_timer9_hwmod = {
  751. .name = "timer9",
  752. .mpu_irqs = omap2430_timer9_mpu_irqs,
  753. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs),
  754. .main_clk = "gpt9_fck",
  755. .prcm = {
  756. .omap2 = {
  757. .prcm_reg_id = 1,
  758. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  759. .module_offs = CORE_MOD,
  760. .idlest_reg_id = 1,
  761. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  762. },
  763. },
  764. .slaves = omap2430_timer9_slaves,
  765. .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
  766. .class = &omap2430_timer_hwmod_class,
  767. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  768. };
  769. /* timer10 */
  770. static struct omap_hwmod omap2430_timer10_hwmod;
  771. static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = {
  772. { .irq = 46, },
  773. };
  774. static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = {
  775. {
  776. .pa_start = 0x48086000,
  777. .pa_end = 0x48086000 + SZ_1K - 1,
  778. .flags = ADDR_TYPE_RT
  779. },
  780. };
  781. /* l4_core -> timer10 */
  782. static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
  783. .master = &omap2430_l4_core_hwmod,
  784. .slave = &omap2430_timer10_hwmod,
  785. .clk = "gpt10_ick",
  786. .addr = omap2430_timer10_addrs,
  787. .addr_cnt = ARRAY_SIZE(omap2430_timer10_addrs),
  788. .user = OCP_USER_MPU | OCP_USER_SDMA,
  789. };
  790. /* timer10 slave port */
  791. static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
  792. &omap2430_l4_core__timer10,
  793. };
  794. /* timer10 hwmod */
  795. static struct omap_hwmod omap2430_timer10_hwmod = {
  796. .name = "timer10",
  797. .mpu_irqs = omap2430_timer10_mpu_irqs,
  798. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs),
  799. .main_clk = "gpt10_fck",
  800. .prcm = {
  801. .omap2 = {
  802. .prcm_reg_id = 1,
  803. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  804. .module_offs = CORE_MOD,
  805. .idlest_reg_id = 1,
  806. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  807. },
  808. },
  809. .slaves = omap2430_timer10_slaves,
  810. .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
  811. .class = &omap2430_timer_hwmod_class,
  812. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  813. };
  814. /* timer11 */
  815. static struct omap_hwmod omap2430_timer11_hwmod;
  816. static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = {
  817. { .irq = 47, },
  818. };
  819. static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = {
  820. {
  821. .pa_start = 0x48088000,
  822. .pa_end = 0x48088000 + SZ_1K - 1,
  823. .flags = ADDR_TYPE_RT
  824. },
  825. };
  826. /* l4_core -> timer11 */
  827. static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
  828. .master = &omap2430_l4_core_hwmod,
  829. .slave = &omap2430_timer11_hwmod,
  830. .clk = "gpt11_ick",
  831. .addr = omap2430_timer11_addrs,
  832. .addr_cnt = ARRAY_SIZE(omap2430_timer11_addrs),
  833. .user = OCP_USER_MPU | OCP_USER_SDMA,
  834. };
  835. /* timer11 slave port */
  836. static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
  837. &omap2430_l4_core__timer11,
  838. };
  839. /* timer11 hwmod */
  840. static struct omap_hwmod omap2430_timer11_hwmod = {
  841. .name = "timer11",
  842. .mpu_irqs = omap2430_timer11_mpu_irqs,
  843. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs),
  844. .main_clk = "gpt11_fck",
  845. .prcm = {
  846. .omap2 = {
  847. .prcm_reg_id = 1,
  848. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  849. .module_offs = CORE_MOD,
  850. .idlest_reg_id = 1,
  851. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  852. },
  853. },
  854. .slaves = omap2430_timer11_slaves,
  855. .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
  856. .class = &omap2430_timer_hwmod_class,
  857. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  858. };
  859. /* timer12 */
  860. static struct omap_hwmod omap2430_timer12_hwmod;
  861. static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = {
  862. { .irq = 48, },
  863. };
  864. static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = {
  865. {
  866. .pa_start = 0x4808a000,
  867. .pa_end = 0x4808a000 + SZ_1K - 1,
  868. .flags = ADDR_TYPE_RT
  869. },
  870. };
  871. /* l4_core -> timer12 */
  872. static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
  873. .master = &omap2430_l4_core_hwmod,
  874. .slave = &omap2430_timer12_hwmod,
  875. .clk = "gpt12_ick",
  876. .addr = omap2430_timer12_addrs,
  877. .addr_cnt = ARRAY_SIZE(omap2430_timer12_addrs),
  878. .user = OCP_USER_MPU | OCP_USER_SDMA,
  879. };
  880. /* timer12 slave port */
  881. static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
  882. &omap2430_l4_core__timer12,
  883. };
  884. /* timer12 hwmod */
  885. static struct omap_hwmod omap2430_timer12_hwmod = {
  886. .name = "timer12",
  887. .mpu_irqs = omap2430_timer12_mpu_irqs,
  888. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs),
  889. .main_clk = "gpt12_fck",
  890. .prcm = {
  891. .omap2 = {
  892. .prcm_reg_id = 1,
  893. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  894. .module_offs = CORE_MOD,
  895. .idlest_reg_id = 1,
  896. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  897. },
  898. },
  899. .slaves = omap2430_timer12_slaves,
  900. .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
  901. .class = &omap2430_timer_hwmod_class,
  902. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  903. };
  904. /* l4_wkup -> wd_timer2 */
  905. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  906. {
  907. .pa_start = 0x49016000,
  908. .pa_end = 0x4901607f,
  909. .flags = ADDR_TYPE_RT
  910. },
  911. };
  912. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  913. .master = &omap2430_l4_wkup_hwmod,
  914. .slave = &omap2430_wd_timer2_hwmod,
  915. .clk = "mpu_wdt_ick",
  916. .addr = omap2430_wd_timer2_addrs,
  917. .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
  918. .user = OCP_USER_MPU | OCP_USER_SDMA,
  919. };
  920. /*
  921. * 'wd_timer' class
  922. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  923. * overflow condition
  924. */
  925. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  926. .rev_offs = 0x0,
  927. .sysc_offs = 0x0010,
  928. .syss_offs = 0x0014,
  929. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  930. SYSC_HAS_AUTOIDLE),
  931. .sysc_fields = &omap_hwmod_sysc_type1,
  932. };
  933. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  934. .name = "wd_timer",
  935. .sysc = &omap2430_wd_timer_sysc,
  936. .pre_shutdown = &omap2_wd_timer_disable
  937. };
  938. /* wd_timer2 */
  939. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  940. &omap2430_l4_wkup__wd_timer2,
  941. };
  942. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  943. .name = "wd_timer2",
  944. .class = &omap2430_wd_timer_hwmod_class,
  945. .main_clk = "mpu_wdt_fck",
  946. .prcm = {
  947. .omap2 = {
  948. .prcm_reg_id = 1,
  949. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  950. .module_offs = WKUP_MOD,
  951. .idlest_reg_id = 1,
  952. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  953. },
  954. },
  955. .slaves = omap2430_wd_timer2_slaves,
  956. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  957. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  958. };
  959. /* UART */
  960. static struct omap_hwmod_class_sysconfig uart_sysc = {
  961. .rev_offs = 0x50,
  962. .sysc_offs = 0x54,
  963. .syss_offs = 0x58,
  964. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  965. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  966. SYSC_HAS_AUTOIDLE),
  967. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  968. .sysc_fields = &omap_hwmod_sysc_type1,
  969. };
  970. static struct omap_hwmod_class uart_class = {
  971. .name = "uart",
  972. .sysc = &uart_sysc,
  973. };
  974. /* UART1 */
  975. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  976. { .irq = INT_24XX_UART1_IRQ, },
  977. };
  978. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  979. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  980. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  981. };
  982. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  983. &omap2_l4_core__uart1,
  984. };
  985. static struct omap_hwmod omap2430_uart1_hwmod = {
  986. .name = "uart1",
  987. .mpu_irqs = uart1_mpu_irqs,
  988. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  989. .sdma_reqs = uart1_sdma_reqs,
  990. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  991. .main_clk = "uart1_fck",
  992. .prcm = {
  993. .omap2 = {
  994. .module_offs = CORE_MOD,
  995. .prcm_reg_id = 1,
  996. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  997. .idlest_reg_id = 1,
  998. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  999. },
  1000. },
  1001. .slaves = omap2430_uart1_slaves,
  1002. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  1003. .class = &uart_class,
  1004. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1005. };
  1006. /* UART2 */
  1007. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  1008. { .irq = INT_24XX_UART2_IRQ, },
  1009. };
  1010. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  1011. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  1012. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  1013. };
  1014. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  1015. &omap2_l4_core__uart2,
  1016. };
  1017. static struct omap_hwmod omap2430_uart2_hwmod = {
  1018. .name = "uart2",
  1019. .mpu_irqs = uart2_mpu_irqs,
  1020. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  1021. .sdma_reqs = uart2_sdma_reqs,
  1022. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  1023. .main_clk = "uart2_fck",
  1024. .prcm = {
  1025. .omap2 = {
  1026. .module_offs = CORE_MOD,
  1027. .prcm_reg_id = 1,
  1028. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  1029. .idlest_reg_id = 1,
  1030. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  1031. },
  1032. },
  1033. .slaves = omap2430_uart2_slaves,
  1034. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  1035. .class = &uart_class,
  1036. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1037. };
  1038. /* UART3 */
  1039. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  1040. { .irq = INT_24XX_UART3_IRQ, },
  1041. };
  1042. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  1043. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  1044. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  1045. };
  1046. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  1047. &omap2_l4_core__uart3,
  1048. };
  1049. static struct omap_hwmod omap2430_uart3_hwmod = {
  1050. .name = "uart3",
  1051. .mpu_irqs = uart3_mpu_irqs,
  1052. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  1053. .sdma_reqs = uart3_sdma_reqs,
  1054. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  1055. .main_clk = "uart3_fck",
  1056. .prcm = {
  1057. .omap2 = {
  1058. .module_offs = CORE_MOD,
  1059. .prcm_reg_id = 2,
  1060. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  1061. .idlest_reg_id = 2,
  1062. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  1063. },
  1064. },
  1065. .slaves = omap2430_uart3_slaves,
  1066. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  1067. .class = &uart_class,
  1068. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1069. };
  1070. /*
  1071. * 'dss' class
  1072. * display sub-system
  1073. */
  1074. static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
  1075. .rev_offs = 0x0000,
  1076. .sysc_offs = 0x0010,
  1077. .syss_offs = 0x0014,
  1078. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1079. .sysc_fields = &omap_hwmod_sysc_type1,
  1080. };
  1081. static struct omap_hwmod_class omap2430_dss_hwmod_class = {
  1082. .name = "dss",
  1083. .sysc = &omap2430_dss_sysc,
  1084. };
  1085. /* dss */
  1086. static struct omap_hwmod_irq_info omap2430_dss_irqs[] = {
  1087. { .irq = 25 },
  1088. };
  1089. static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
  1090. { .name = "dispc", .dma_req = 5 },
  1091. };
  1092. /* dss */
  1093. /* dss master ports */
  1094. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  1095. &omap2430_dss__l3,
  1096. };
  1097. static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
  1098. {
  1099. .pa_start = 0x48050000,
  1100. .pa_end = 0x480503FF,
  1101. .flags = ADDR_TYPE_RT
  1102. },
  1103. };
  1104. /* l4_core -> dss */
  1105. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  1106. .master = &omap2430_l4_core_hwmod,
  1107. .slave = &omap2430_dss_core_hwmod,
  1108. .clk = "dss_ick",
  1109. .addr = omap2430_dss_addrs,
  1110. .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs),
  1111. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1112. };
  1113. /* dss slave ports */
  1114. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  1115. &omap2430_l4_core__dss,
  1116. };
  1117. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  1118. { .role = "tv_clk", .clk = "dss_54m_fck" },
  1119. { .role = "sys_clk", .clk = "dss2_fck" },
  1120. };
  1121. static struct omap_hwmod omap2430_dss_core_hwmod = {
  1122. .name = "dss_core",
  1123. .class = &omap2430_dss_hwmod_class,
  1124. .main_clk = "dss1_fck", /* instead of dss_fck */
  1125. .mpu_irqs = omap2430_dss_irqs,
  1126. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dss_irqs),
  1127. .sdma_reqs = omap2430_dss_sdma_chs,
  1128. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
  1129. .prcm = {
  1130. .omap2 = {
  1131. .prcm_reg_id = 1,
  1132. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1133. .module_offs = CORE_MOD,
  1134. .idlest_reg_id = 1,
  1135. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  1136. },
  1137. },
  1138. .opt_clks = dss_opt_clks,
  1139. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  1140. .slaves = omap2430_dss_slaves,
  1141. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  1142. .masters = omap2430_dss_masters,
  1143. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  1144. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1145. .flags = HWMOD_NO_IDLEST,
  1146. };
  1147. /*
  1148. * 'dispc' class
  1149. * display controller
  1150. */
  1151. static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
  1152. .rev_offs = 0x0000,
  1153. .sysc_offs = 0x0010,
  1154. .syss_offs = 0x0014,
  1155. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  1156. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1157. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1158. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1159. .sysc_fields = &omap_hwmod_sysc_type1,
  1160. };
  1161. static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
  1162. .name = "dispc",
  1163. .sysc = &omap2430_dispc_sysc,
  1164. };
  1165. static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
  1166. {
  1167. .pa_start = 0x48050400,
  1168. .pa_end = 0x480507FF,
  1169. .flags = ADDR_TYPE_RT
  1170. },
  1171. };
  1172. /* l4_core -> dss_dispc */
  1173. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  1174. .master = &omap2430_l4_core_hwmod,
  1175. .slave = &omap2430_dss_dispc_hwmod,
  1176. .clk = "dss_ick",
  1177. .addr = omap2430_dss_dispc_addrs,
  1178. .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs),
  1179. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1180. };
  1181. /* dss_dispc slave ports */
  1182. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  1183. &omap2430_l4_core__dss_dispc,
  1184. };
  1185. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  1186. .name = "dss_dispc",
  1187. .class = &omap2430_dispc_hwmod_class,
  1188. .main_clk = "dss1_fck",
  1189. .prcm = {
  1190. .omap2 = {
  1191. .prcm_reg_id = 1,
  1192. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1193. .module_offs = CORE_MOD,
  1194. .idlest_reg_id = 1,
  1195. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  1196. },
  1197. },
  1198. .slaves = omap2430_dss_dispc_slaves,
  1199. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  1200. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1201. .flags = HWMOD_NO_IDLEST,
  1202. };
  1203. /*
  1204. * 'rfbi' class
  1205. * remote frame buffer interface
  1206. */
  1207. static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
  1208. .rev_offs = 0x0000,
  1209. .sysc_offs = 0x0010,
  1210. .syss_offs = 0x0014,
  1211. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  1212. SYSC_HAS_AUTOIDLE),
  1213. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1214. .sysc_fields = &omap_hwmod_sysc_type1,
  1215. };
  1216. static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
  1217. .name = "rfbi",
  1218. .sysc = &omap2430_rfbi_sysc,
  1219. };
  1220. static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
  1221. {
  1222. .pa_start = 0x48050800,
  1223. .pa_end = 0x48050BFF,
  1224. .flags = ADDR_TYPE_RT
  1225. },
  1226. };
  1227. /* l4_core -> dss_rfbi */
  1228. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  1229. .master = &omap2430_l4_core_hwmod,
  1230. .slave = &omap2430_dss_rfbi_hwmod,
  1231. .clk = "dss_ick",
  1232. .addr = omap2430_dss_rfbi_addrs,
  1233. .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
  1234. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1235. };
  1236. /* dss_rfbi slave ports */
  1237. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  1238. &omap2430_l4_core__dss_rfbi,
  1239. };
  1240. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  1241. .name = "dss_rfbi",
  1242. .class = &omap2430_rfbi_hwmod_class,
  1243. .main_clk = "dss1_fck",
  1244. .prcm = {
  1245. .omap2 = {
  1246. .prcm_reg_id = 1,
  1247. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1248. .module_offs = CORE_MOD,
  1249. },
  1250. },
  1251. .slaves = omap2430_dss_rfbi_slaves,
  1252. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  1253. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1254. .flags = HWMOD_NO_IDLEST,
  1255. };
  1256. /*
  1257. * 'venc' class
  1258. * video encoder
  1259. */
  1260. static struct omap_hwmod_class omap2430_venc_hwmod_class = {
  1261. .name = "venc",
  1262. };
  1263. /* dss_venc */
  1264. static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
  1265. {
  1266. .pa_start = 0x48050C00,
  1267. .pa_end = 0x48050FFF,
  1268. .flags = ADDR_TYPE_RT
  1269. },
  1270. };
  1271. /* l4_core -> dss_venc */
  1272. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  1273. .master = &omap2430_l4_core_hwmod,
  1274. .slave = &omap2430_dss_venc_hwmod,
  1275. .clk = "dss_54m_fck",
  1276. .addr = omap2430_dss_venc_addrs,
  1277. .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs),
  1278. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1279. };
  1280. /* dss_venc slave ports */
  1281. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  1282. &omap2430_l4_core__dss_venc,
  1283. };
  1284. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  1285. .name = "dss_venc",
  1286. .class = &omap2430_venc_hwmod_class,
  1287. .main_clk = "dss1_fck",
  1288. .prcm = {
  1289. .omap2 = {
  1290. .prcm_reg_id = 1,
  1291. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1292. .module_offs = CORE_MOD,
  1293. },
  1294. },
  1295. .slaves = omap2430_dss_venc_slaves,
  1296. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  1297. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1298. .flags = HWMOD_NO_IDLEST,
  1299. };
  1300. /* I2C common */
  1301. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1302. .rev_offs = 0x00,
  1303. .sysc_offs = 0x20,
  1304. .syss_offs = 0x10,
  1305. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1306. .sysc_fields = &omap_hwmod_sysc_type1,
  1307. };
  1308. static struct omap_hwmod_class i2c_class = {
  1309. .name = "i2c",
  1310. .sysc = &i2c_sysc,
  1311. };
  1312. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1313. .fifo_depth = 8, /* bytes */
  1314. };
  1315. /* I2C1 */
  1316. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1317. { .irq = INT_24XX_I2C1_IRQ, },
  1318. };
  1319. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1320. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1321. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1322. };
  1323. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  1324. &omap2430_l4_core__i2c1,
  1325. };
  1326. static struct omap_hwmod omap2430_i2c1_hwmod = {
  1327. .name = "i2c1",
  1328. .mpu_irqs = i2c1_mpu_irqs,
  1329. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  1330. .sdma_reqs = i2c1_sdma_reqs,
  1331. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  1332. .main_clk = "i2chs1_fck",
  1333. .prcm = {
  1334. .omap2 = {
  1335. /*
  1336. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  1337. * I2CHS IP's do not follow the usual pattern.
  1338. * prcm_reg_id alone cannot be used to program
  1339. * the iclk and fclk. Needs to be handled using
  1340. * additonal flags when clk handling is moved
  1341. * to hwmod framework.
  1342. */
  1343. .module_offs = CORE_MOD,
  1344. .prcm_reg_id = 1,
  1345. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  1346. .idlest_reg_id = 1,
  1347. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  1348. },
  1349. },
  1350. .slaves = omap2430_i2c1_slaves,
  1351. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  1352. .class = &i2c_class,
  1353. .dev_attr = &i2c_dev_attr,
  1354. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1355. };
  1356. /* I2C2 */
  1357. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1358. { .irq = INT_24XX_I2C2_IRQ, },
  1359. };
  1360. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1361. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1362. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1363. };
  1364. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  1365. &omap2430_l4_core__i2c2,
  1366. };
  1367. static struct omap_hwmod omap2430_i2c2_hwmod = {
  1368. .name = "i2c2",
  1369. .mpu_irqs = i2c2_mpu_irqs,
  1370. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  1371. .sdma_reqs = i2c2_sdma_reqs,
  1372. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  1373. .main_clk = "i2chs2_fck",
  1374. .prcm = {
  1375. .omap2 = {
  1376. .module_offs = CORE_MOD,
  1377. .prcm_reg_id = 1,
  1378. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  1379. .idlest_reg_id = 1,
  1380. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  1381. },
  1382. },
  1383. .slaves = omap2430_i2c2_slaves,
  1384. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  1385. .class = &i2c_class,
  1386. .dev_attr = &i2c_dev_attr,
  1387. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1388. };
  1389. /* l4_wkup -> gpio1 */
  1390. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  1391. {
  1392. .pa_start = 0x4900C000,
  1393. .pa_end = 0x4900C1ff,
  1394. .flags = ADDR_TYPE_RT
  1395. },
  1396. };
  1397. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  1398. .master = &omap2430_l4_wkup_hwmod,
  1399. .slave = &omap2430_gpio1_hwmod,
  1400. .clk = "gpios_ick",
  1401. .addr = omap2430_gpio1_addr_space,
  1402. .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
  1403. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1404. };
  1405. /* l4_wkup -> gpio2 */
  1406. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  1407. {
  1408. .pa_start = 0x4900E000,
  1409. .pa_end = 0x4900E1ff,
  1410. .flags = ADDR_TYPE_RT
  1411. },
  1412. };
  1413. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  1414. .master = &omap2430_l4_wkup_hwmod,
  1415. .slave = &omap2430_gpio2_hwmod,
  1416. .clk = "gpios_ick",
  1417. .addr = omap2430_gpio2_addr_space,
  1418. .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
  1419. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1420. };
  1421. /* l4_wkup -> gpio3 */
  1422. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  1423. {
  1424. .pa_start = 0x49010000,
  1425. .pa_end = 0x490101ff,
  1426. .flags = ADDR_TYPE_RT
  1427. },
  1428. };
  1429. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  1430. .master = &omap2430_l4_wkup_hwmod,
  1431. .slave = &omap2430_gpio3_hwmod,
  1432. .clk = "gpios_ick",
  1433. .addr = omap2430_gpio3_addr_space,
  1434. .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
  1435. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1436. };
  1437. /* l4_wkup -> gpio4 */
  1438. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  1439. {
  1440. .pa_start = 0x49012000,
  1441. .pa_end = 0x490121ff,
  1442. .flags = ADDR_TYPE_RT
  1443. },
  1444. };
  1445. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  1446. .master = &omap2430_l4_wkup_hwmod,
  1447. .slave = &omap2430_gpio4_hwmod,
  1448. .clk = "gpios_ick",
  1449. .addr = omap2430_gpio4_addr_space,
  1450. .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
  1451. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1452. };
  1453. /* l4_core -> gpio5 */
  1454. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  1455. {
  1456. .pa_start = 0x480B6000,
  1457. .pa_end = 0x480B61ff,
  1458. .flags = ADDR_TYPE_RT
  1459. },
  1460. };
  1461. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  1462. .master = &omap2430_l4_core_hwmod,
  1463. .slave = &omap2430_gpio5_hwmod,
  1464. .clk = "gpio5_ick",
  1465. .addr = omap2430_gpio5_addr_space,
  1466. .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
  1467. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1468. };
  1469. /* gpio dev_attr */
  1470. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1471. .bank_width = 32,
  1472. .dbck_flag = false,
  1473. };
  1474. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  1475. .rev_offs = 0x0000,
  1476. .sysc_offs = 0x0010,
  1477. .syss_offs = 0x0014,
  1478. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1479. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1480. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1481. .sysc_fields = &omap_hwmod_sysc_type1,
  1482. };
  1483. /*
  1484. * 'gpio' class
  1485. * general purpose io module
  1486. */
  1487. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  1488. .name = "gpio",
  1489. .sysc = &omap243x_gpio_sysc,
  1490. .rev = 0,
  1491. };
  1492. /* gpio1 */
  1493. static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
  1494. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  1495. };
  1496. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  1497. &omap2430_l4_wkup__gpio1,
  1498. };
  1499. static struct omap_hwmod omap2430_gpio1_hwmod = {
  1500. .name = "gpio1",
  1501. .mpu_irqs = omap243x_gpio1_irqs,
  1502. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
  1503. .main_clk = "gpios_fck",
  1504. .prcm = {
  1505. .omap2 = {
  1506. .prcm_reg_id = 1,
  1507. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1508. .module_offs = WKUP_MOD,
  1509. .idlest_reg_id = 1,
  1510. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1511. },
  1512. },
  1513. .slaves = omap2430_gpio1_slaves,
  1514. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  1515. .class = &omap243x_gpio_hwmod_class,
  1516. .dev_attr = &gpio_dev_attr,
  1517. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1518. };
  1519. /* gpio2 */
  1520. static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
  1521. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  1522. };
  1523. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  1524. &omap2430_l4_wkup__gpio2,
  1525. };
  1526. static struct omap_hwmod omap2430_gpio2_hwmod = {
  1527. .name = "gpio2",
  1528. .mpu_irqs = omap243x_gpio2_irqs,
  1529. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
  1530. .main_clk = "gpios_fck",
  1531. .prcm = {
  1532. .omap2 = {
  1533. .prcm_reg_id = 1,
  1534. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1535. .module_offs = WKUP_MOD,
  1536. .idlest_reg_id = 1,
  1537. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1538. },
  1539. },
  1540. .slaves = omap2430_gpio2_slaves,
  1541. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  1542. .class = &omap243x_gpio_hwmod_class,
  1543. .dev_attr = &gpio_dev_attr,
  1544. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1545. };
  1546. /* gpio3 */
  1547. static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
  1548. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  1549. };
  1550. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  1551. &omap2430_l4_wkup__gpio3,
  1552. };
  1553. static struct omap_hwmod omap2430_gpio3_hwmod = {
  1554. .name = "gpio3",
  1555. .mpu_irqs = omap243x_gpio3_irqs,
  1556. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
  1557. .main_clk = "gpios_fck",
  1558. .prcm = {
  1559. .omap2 = {
  1560. .prcm_reg_id = 1,
  1561. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1562. .module_offs = WKUP_MOD,
  1563. .idlest_reg_id = 1,
  1564. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1565. },
  1566. },
  1567. .slaves = omap2430_gpio3_slaves,
  1568. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1569. .class = &omap243x_gpio_hwmod_class,
  1570. .dev_attr = &gpio_dev_attr,
  1571. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1572. };
  1573. /* gpio4 */
  1574. static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
  1575. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  1576. };
  1577. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1578. &omap2430_l4_wkup__gpio4,
  1579. };
  1580. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1581. .name = "gpio4",
  1582. .mpu_irqs = omap243x_gpio4_irqs,
  1583. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
  1584. .main_clk = "gpios_fck",
  1585. .prcm = {
  1586. .omap2 = {
  1587. .prcm_reg_id = 1,
  1588. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1589. .module_offs = WKUP_MOD,
  1590. .idlest_reg_id = 1,
  1591. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1592. },
  1593. },
  1594. .slaves = omap2430_gpio4_slaves,
  1595. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1596. .class = &omap243x_gpio_hwmod_class,
  1597. .dev_attr = &gpio_dev_attr,
  1598. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1599. };
  1600. /* gpio5 */
  1601. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1602. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1603. };
  1604. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1605. &omap2430_l4_core__gpio5,
  1606. };
  1607. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1608. .name = "gpio5",
  1609. .mpu_irqs = omap243x_gpio5_irqs,
  1610. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
  1611. .main_clk = "gpio5_fck",
  1612. .prcm = {
  1613. .omap2 = {
  1614. .prcm_reg_id = 2,
  1615. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1616. .module_offs = CORE_MOD,
  1617. .idlest_reg_id = 2,
  1618. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1619. },
  1620. },
  1621. .slaves = omap2430_gpio5_slaves,
  1622. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1623. .class = &omap243x_gpio_hwmod_class,
  1624. .dev_attr = &gpio_dev_attr,
  1625. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1626. };
  1627. /* dma_system */
  1628. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1629. .rev_offs = 0x0000,
  1630. .sysc_offs = 0x002c,
  1631. .syss_offs = 0x0028,
  1632. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1633. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1634. SYSC_HAS_AUTOIDLE),
  1635. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1636. .sysc_fields = &omap_hwmod_sysc_type1,
  1637. };
  1638. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1639. .name = "dma",
  1640. .sysc = &omap2430_dma_sysc,
  1641. };
  1642. /* dma attributes */
  1643. static struct omap_dma_dev_attr dma_dev_attr = {
  1644. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1645. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1646. .lch_count = 32,
  1647. };
  1648. static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
  1649. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1650. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1651. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1652. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1653. };
  1654. static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
  1655. {
  1656. .pa_start = 0x48056000,
  1657. .pa_end = 0x4a0560ff,
  1658. .flags = ADDR_TYPE_RT
  1659. },
  1660. };
  1661. /* dma_system -> L3 */
  1662. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1663. .master = &omap2430_dma_system_hwmod,
  1664. .slave = &omap2430_l3_main_hwmod,
  1665. .clk = "core_l3_ck",
  1666. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1667. };
  1668. /* dma_system master ports */
  1669. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1670. &omap2430_dma_system__l3,
  1671. };
  1672. /* l4_core -> dma_system */
  1673. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1674. .master = &omap2430_l4_core_hwmod,
  1675. .slave = &omap2430_dma_system_hwmod,
  1676. .clk = "sdma_ick",
  1677. .addr = omap2430_dma_system_addrs,
  1678. .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs),
  1679. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1680. };
  1681. /* dma_system slave ports */
  1682. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1683. &omap2430_l4_core__dma_system,
  1684. };
  1685. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1686. .name = "dma",
  1687. .class = &omap2430_dma_hwmod_class,
  1688. .mpu_irqs = omap2430_dma_system_irqs,
  1689. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
  1690. .main_clk = "core_l3_ck",
  1691. .slaves = omap2430_dma_system_slaves,
  1692. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1693. .masters = omap2430_dma_system_masters,
  1694. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1695. .dev_attr = &dma_dev_attr,
  1696. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1697. .flags = HWMOD_NO_IDLEST,
  1698. };
  1699. /*
  1700. * 'mcspi' class
  1701. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1702. * bus
  1703. */
  1704. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1705. .rev_offs = 0x0000,
  1706. .sysc_offs = 0x0010,
  1707. .syss_offs = 0x0014,
  1708. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1709. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1710. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1711. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1712. .sysc_fields = &omap_hwmod_sysc_type1,
  1713. };
  1714. static struct omap_hwmod_class omap2430_mcspi_class = {
  1715. .name = "mcspi",
  1716. .sysc = &omap2430_mcspi_sysc,
  1717. .rev = OMAP2_MCSPI_REV,
  1718. };
  1719. /* mcspi1 */
  1720. static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
  1721. { .irq = 65 },
  1722. };
  1723. static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
  1724. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1725. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1726. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1727. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1728. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1729. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1730. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1731. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1732. };
  1733. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1734. &omap2430_l4_core__mcspi1,
  1735. };
  1736. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1737. .num_chipselect = 4,
  1738. };
  1739. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1740. .name = "mcspi1_hwmod",
  1741. .mpu_irqs = omap2430_mcspi1_mpu_irqs,
  1742. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
  1743. .sdma_reqs = omap2430_mcspi1_sdma_reqs,
  1744. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
  1745. .main_clk = "mcspi1_fck",
  1746. .prcm = {
  1747. .omap2 = {
  1748. .module_offs = CORE_MOD,
  1749. .prcm_reg_id = 1,
  1750. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1751. .idlest_reg_id = 1,
  1752. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1753. },
  1754. },
  1755. .slaves = omap2430_mcspi1_slaves,
  1756. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1757. .class = &omap2430_mcspi_class,
  1758. .dev_attr = &omap_mcspi1_dev_attr,
  1759. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1760. };
  1761. /* mcspi2 */
  1762. static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
  1763. { .irq = 66 },
  1764. };
  1765. static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
  1766. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1767. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1768. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1769. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1770. };
  1771. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1772. &omap2430_l4_core__mcspi2,
  1773. };
  1774. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1775. .num_chipselect = 2,
  1776. };
  1777. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1778. .name = "mcspi2_hwmod",
  1779. .mpu_irqs = omap2430_mcspi2_mpu_irqs,
  1780. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
  1781. .sdma_reqs = omap2430_mcspi2_sdma_reqs,
  1782. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
  1783. .main_clk = "mcspi2_fck",
  1784. .prcm = {
  1785. .omap2 = {
  1786. .module_offs = CORE_MOD,
  1787. .prcm_reg_id = 1,
  1788. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1789. .idlest_reg_id = 1,
  1790. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1791. },
  1792. },
  1793. .slaves = omap2430_mcspi2_slaves,
  1794. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1795. .class = &omap2430_mcspi_class,
  1796. .dev_attr = &omap_mcspi2_dev_attr,
  1797. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1798. };
  1799. /* mcspi3 */
  1800. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1801. { .irq = 91 },
  1802. };
  1803. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1804. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1805. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1806. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1807. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1808. };
  1809. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1810. &omap2430_l4_core__mcspi3,
  1811. };
  1812. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1813. .num_chipselect = 2,
  1814. };
  1815. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1816. .name = "mcspi3_hwmod",
  1817. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1818. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
  1819. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1820. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
  1821. .main_clk = "mcspi3_fck",
  1822. .prcm = {
  1823. .omap2 = {
  1824. .module_offs = CORE_MOD,
  1825. .prcm_reg_id = 2,
  1826. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1827. .idlest_reg_id = 2,
  1828. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1829. },
  1830. },
  1831. .slaves = omap2430_mcspi3_slaves,
  1832. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1833. .class = &omap2430_mcspi_class,
  1834. .dev_attr = &omap_mcspi3_dev_attr,
  1835. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1836. };
  1837. /*
  1838. * usbhsotg
  1839. */
  1840. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1841. .rev_offs = 0x0400,
  1842. .sysc_offs = 0x0404,
  1843. .syss_offs = 0x0408,
  1844. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1845. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1846. SYSC_HAS_AUTOIDLE),
  1847. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1848. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1849. .sysc_fields = &omap_hwmod_sysc_type1,
  1850. };
  1851. static struct omap_hwmod_class usbotg_class = {
  1852. .name = "usbotg",
  1853. .sysc = &omap2430_usbhsotg_sysc,
  1854. };
  1855. /* usb_otg_hs */
  1856. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1857. { .name = "mc", .irq = 92 },
  1858. { .name = "dma", .irq = 93 },
  1859. };
  1860. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1861. .name = "usb_otg_hs",
  1862. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1863. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
  1864. .main_clk = "usbhs_ick",
  1865. .prcm = {
  1866. .omap2 = {
  1867. .prcm_reg_id = 1,
  1868. .module_bit = OMAP2430_EN_USBHS_MASK,
  1869. .module_offs = CORE_MOD,
  1870. .idlest_reg_id = 1,
  1871. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1872. },
  1873. },
  1874. .masters = omap2430_usbhsotg_masters,
  1875. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1876. .slaves = omap2430_usbhsotg_slaves,
  1877. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1878. .class = &usbotg_class,
  1879. /*
  1880. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1881. * broken when autoidle is enabled
  1882. * workaround is to disable the autoidle bit at module level.
  1883. */
  1884. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1885. | HWMOD_SWSUP_MSTANDBY,
  1886. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1887. };
  1888. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  1889. &omap2430_l3_main_hwmod,
  1890. &omap2430_l4_core_hwmod,
  1891. &omap2430_l4_wkup_hwmod,
  1892. &omap2430_mpu_hwmod,
  1893. &omap2430_iva_hwmod,
  1894. &omap2430_timer1_hwmod,
  1895. &omap2430_timer2_hwmod,
  1896. &omap2430_timer3_hwmod,
  1897. &omap2430_timer4_hwmod,
  1898. &omap2430_timer5_hwmod,
  1899. &omap2430_timer6_hwmod,
  1900. &omap2430_timer7_hwmod,
  1901. &omap2430_timer8_hwmod,
  1902. &omap2430_timer9_hwmod,
  1903. &omap2430_timer10_hwmod,
  1904. &omap2430_timer11_hwmod,
  1905. &omap2430_timer12_hwmod,
  1906. &omap2430_wd_timer2_hwmod,
  1907. &omap2430_uart1_hwmod,
  1908. &omap2430_uart2_hwmod,
  1909. &omap2430_uart3_hwmod,
  1910. /* dss class */
  1911. &omap2430_dss_core_hwmod,
  1912. &omap2430_dss_dispc_hwmod,
  1913. &omap2430_dss_rfbi_hwmod,
  1914. &omap2430_dss_venc_hwmod,
  1915. /* i2c class */
  1916. &omap2430_i2c1_hwmod,
  1917. &omap2430_i2c2_hwmod,
  1918. /* gpio class */
  1919. &omap2430_gpio1_hwmod,
  1920. &omap2430_gpio2_hwmod,
  1921. &omap2430_gpio3_hwmod,
  1922. &omap2430_gpio4_hwmod,
  1923. &omap2430_gpio5_hwmod,
  1924. /* dma_system class*/
  1925. &omap2430_dma_system_hwmod,
  1926. /* mcspi class */
  1927. &omap2430_mcspi1_hwmod,
  1928. &omap2430_mcspi2_hwmod,
  1929. &omap2430_mcspi3_hwmod,
  1930. /* usbotg class*/
  1931. &omap2430_usbhsotg_hwmod,
  1932. NULL,
  1933. };
  1934. int __init omap2430_hwmod_init(void)
  1935. {
  1936. return omap_hwmod_init(omap2430_hwmods);
  1937. }