omap_hwmod_2420_data.c 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845
  1. /*
  2. * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
  3. *
  4. * Copyright (C) 2009-2011 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 <plat/l4_2xxx.h>
  25. #include "omap_hwmod_common_data.h"
  26. #include "cm-regbits-24xx.h"
  27. #include "prm-regbits-24xx.h"
  28. #include "wd_timer.h"
  29. /*
  30. * OMAP2420 hardware module integration data
  31. *
  32. * ALl of the data in this section should be autogeneratable from the
  33. * TI hardware database or other technical documentation. Data that
  34. * is driver-specific or driver-kernel integration-specific belongs
  35. * elsewhere.
  36. */
  37. static struct omap_hwmod omap2420_mpu_hwmod;
  38. static struct omap_hwmod omap2420_iva_hwmod;
  39. static struct omap_hwmod omap2420_l3_main_hwmod;
  40. static struct omap_hwmod omap2420_l4_core_hwmod;
  41. static struct omap_hwmod omap2420_dss_core_hwmod;
  42. static struct omap_hwmod omap2420_dss_dispc_hwmod;
  43. static struct omap_hwmod omap2420_dss_rfbi_hwmod;
  44. static struct omap_hwmod omap2420_dss_venc_hwmod;
  45. static struct omap_hwmod omap2420_wd_timer2_hwmod;
  46. static struct omap_hwmod omap2420_gpio1_hwmod;
  47. static struct omap_hwmod omap2420_gpio2_hwmod;
  48. static struct omap_hwmod omap2420_gpio3_hwmod;
  49. static struct omap_hwmod omap2420_gpio4_hwmod;
  50. static struct omap_hwmod omap2420_dma_system_hwmod;
  51. static struct omap_hwmod omap2420_mcspi1_hwmod;
  52. static struct omap_hwmod omap2420_mcspi2_hwmod;
  53. /* L3 -> L4_CORE interface */
  54. static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
  55. .master = &omap2420_l3_main_hwmod,
  56. .slave = &omap2420_l4_core_hwmod,
  57. .user = OCP_USER_MPU | OCP_USER_SDMA,
  58. };
  59. /* MPU -> L3 interface */
  60. static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
  61. .master = &omap2420_mpu_hwmod,
  62. .slave = &omap2420_l3_main_hwmod,
  63. .user = OCP_USER_MPU,
  64. };
  65. /* Slave interfaces on the L3 interconnect */
  66. static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
  67. &omap2420_mpu__l3_main,
  68. };
  69. /* DSS -> l3 */
  70. static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
  71. .master = &omap2420_dss_core_hwmod,
  72. .slave = &omap2420_l3_main_hwmod,
  73. .fw = {
  74. .omap2 = {
  75. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  76. .flags = OMAP_FIREWALL_L3,
  77. }
  78. },
  79. .user = OCP_USER_MPU | OCP_USER_SDMA,
  80. };
  81. /* Master interfaces on the L3 interconnect */
  82. static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
  83. &omap2420_l3_main__l4_core,
  84. };
  85. /* L3 */
  86. static struct omap_hwmod omap2420_l3_main_hwmod = {
  87. .name = "l3_main",
  88. .class = &l3_hwmod_class,
  89. .masters = omap2420_l3_main_masters,
  90. .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
  91. .slaves = omap2420_l3_main_slaves,
  92. .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
  93. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  94. .flags = HWMOD_NO_IDLEST,
  95. };
  96. static struct omap_hwmod omap2420_l4_wkup_hwmod;
  97. static struct omap_hwmod omap2420_uart1_hwmod;
  98. static struct omap_hwmod omap2420_uart2_hwmod;
  99. static struct omap_hwmod omap2420_uart3_hwmod;
  100. static struct omap_hwmod omap2420_i2c1_hwmod;
  101. static struct omap_hwmod omap2420_i2c2_hwmod;
  102. static struct omap_hwmod omap2420_mcbsp1_hwmod;
  103. static struct omap_hwmod omap2420_mcbsp2_hwmod;
  104. /* l4 core -> mcspi1 interface */
  105. static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
  106. .master = &omap2420_l4_core_hwmod,
  107. .slave = &omap2420_mcspi1_hwmod,
  108. .clk = "mcspi1_ick",
  109. .addr = omap2_mcspi1_addr_space,
  110. .user = OCP_USER_MPU | OCP_USER_SDMA,
  111. };
  112. /* l4 core -> mcspi2 interface */
  113. static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
  114. .master = &omap2420_l4_core_hwmod,
  115. .slave = &omap2420_mcspi2_hwmod,
  116. .clk = "mcspi2_ick",
  117. .addr = omap2_mcspi2_addr_space,
  118. .user = OCP_USER_MPU | OCP_USER_SDMA,
  119. };
  120. /* L4_CORE -> L4_WKUP interface */
  121. static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
  122. .master = &omap2420_l4_core_hwmod,
  123. .slave = &omap2420_l4_wkup_hwmod,
  124. .user = OCP_USER_MPU | OCP_USER_SDMA,
  125. };
  126. /* L4 CORE -> UART1 interface */
  127. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  128. .master = &omap2420_l4_core_hwmod,
  129. .slave = &omap2420_uart1_hwmod,
  130. .clk = "uart1_ick",
  131. .addr = omap2xxx_uart1_addr_space,
  132. .user = OCP_USER_MPU | OCP_USER_SDMA,
  133. };
  134. /* L4 CORE -> UART2 interface */
  135. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  136. .master = &omap2420_l4_core_hwmod,
  137. .slave = &omap2420_uart2_hwmod,
  138. .clk = "uart2_ick",
  139. .addr = omap2xxx_uart2_addr_space,
  140. .user = OCP_USER_MPU | OCP_USER_SDMA,
  141. };
  142. /* L4 PER -> UART3 interface */
  143. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  144. .master = &omap2420_l4_core_hwmod,
  145. .slave = &omap2420_uart3_hwmod,
  146. .clk = "uart3_ick",
  147. .addr = omap2xxx_uart3_addr_space,
  148. .user = OCP_USER_MPU | OCP_USER_SDMA,
  149. };
  150. /* L4 CORE -> I2C1 interface */
  151. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
  152. .master = &omap2420_l4_core_hwmod,
  153. .slave = &omap2420_i2c1_hwmod,
  154. .clk = "i2c1_ick",
  155. .addr = omap2_i2c1_addr_space,
  156. .user = OCP_USER_MPU | OCP_USER_SDMA,
  157. };
  158. /* L4 CORE -> I2C2 interface */
  159. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
  160. .master = &omap2420_l4_core_hwmod,
  161. .slave = &omap2420_i2c2_hwmod,
  162. .clk = "i2c2_ick",
  163. .addr = omap2_i2c2_addr_space,
  164. .user = OCP_USER_MPU | OCP_USER_SDMA,
  165. };
  166. /* Slave interfaces on the L4_CORE interconnect */
  167. static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
  168. &omap2420_l3_main__l4_core,
  169. };
  170. /* Master interfaces on the L4_CORE interconnect */
  171. static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
  172. &omap2420_l4_core__l4_wkup,
  173. &omap2_l4_core__uart1,
  174. &omap2_l4_core__uart2,
  175. &omap2_l4_core__uart3,
  176. &omap2420_l4_core__i2c1,
  177. &omap2420_l4_core__i2c2
  178. };
  179. /* L4 CORE */
  180. static struct omap_hwmod omap2420_l4_core_hwmod = {
  181. .name = "l4_core",
  182. .class = &l4_hwmod_class,
  183. .masters = omap2420_l4_core_masters,
  184. .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
  185. .slaves = omap2420_l4_core_slaves,
  186. .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
  187. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  188. .flags = HWMOD_NO_IDLEST,
  189. };
  190. /* Slave interfaces on the L4_WKUP interconnect */
  191. static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
  192. &omap2420_l4_core__l4_wkup,
  193. };
  194. /* Master interfaces on the L4_WKUP interconnect */
  195. static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
  196. };
  197. /* L4 WKUP */
  198. static struct omap_hwmod omap2420_l4_wkup_hwmod = {
  199. .name = "l4_wkup",
  200. .class = &l4_hwmod_class,
  201. .masters = omap2420_l4_wkup_masters,
  202. .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
  203. .slaves = omap2420_l4_wkup_slaves,
  204. .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
  205. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  206. .flags = HWMOD_NO_IDLEST,
  207. };
  208. /* Master interfaces on the MPU device */
  209. static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
  210. &omap2420_mpu__l3_main,
  211. };
  212. /* MPU */
  213. static struct omap_hwmod omap2420_mpu_hwmod = {
  214. .name = "mpu",
  215. .class = &mpu_hwmod_class,
  216. .main_clk = "mpu_ck",
  217. .masters = omap2420_mpu_masters,
  218. .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
  219. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  220. };
  221. /*
  222. * IVA1 interface data
  223. */
  224. /* IVA <- L3 interface */
  225. static struct omap_hwmod_ocp_if omap2420_l3__iva = {
  226. .master = &omap2420_l3_main_hwmod,
  227. .slave = &omap2420_iva_hwmod,
  228. .clk = "iva1_ifck",
  229. .user = OCP_USER_MPU | OCP_USER_SDMA,
  230. };
  231. static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
  232. &omap2420_l3__iva,
  233. };
  234. /*
  235. * IVA2 (IVA2)
  236. */
  237. static struct omap_hwmod omap2420_iva_hwmod = {
  238. .name = "iva",
  239. .class = &iva_hwmod_class,
  240. .masters = omap2420_iva_masters,
  241. .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
  242. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  243. };
  244. /* Timer Common */
  245. static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
  246. .rev_offs = 0x0000,
  247. .sysc_offs = 0x0010,
  248. .syss_offs = 0x0014,
  249. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  250. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  251. SYSC_HAS_AUTOIDLE),
  252. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  253. .sysc_fields = &omap_hwmod_sysc_type1,
  254. };
  255. static struct omap_hwmod_class omap2420_timer_hwmod_class = {
  256. .name = "timer",
  257. .sysc = &omap2420_timer_sysc,
  258. .rev = OMAP_TIMER_IP_VERSION_1,
  259. };
  260. /* timer1 */
  261. static struct omap_hwmod omap2420_timer1_hwmod;
  262. static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
  263. {
  264. .pa_start = 0x48028000,
  265. .pa_end = 0x48028000 + SZ_1K - 1,
  266. .flags = ADDR_TYPE_RT
  267. },
  268. { }
  269. };
  270. /* l4_wkup -> timer1 */
  271. static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
  272. .master = &omap2420_l4_wkup_hwmod,
  273. .slave = &omap2420_timer1_hwmod,
  274. .clk = "gpt1_ick",
  275. .addr = omap2420_timer1_addrs,
  276. .user = OCP_USER_MPU | OCP_USER_SDMA,
  277. };
  278. /* timer1 slave port */
  279. static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
  280. &omap2420_l4_wkup__timer1,
  281. };
  282. /* timer1 hwmod */
  283. static struct omap_hwmod omap2420_timer1_hwmod = {
  284. .name = "timer1",
  285. .mpu_irqs = omap2_timer1_mpu_irqs,
  286. .main_clk = "gpt1_fck",
  287. .prcm = {
  288. .omap2 = {
  289. .prcm_reg_id = 1,
  290. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  291. .module_offs = WKUP_MOD,
  292. .idlest_reg_id = 1,
  293. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  294. },
  295. },
  296. .slaves = omap2420_timer1_slaves,
  297. .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
  298. .class = &omap2420_timer_hwmod_class,
  299. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  300. };
  301. /* timer2 */
  302. static struct omap_hwmod omap2420_timer2_hwmod;
  303. /* l4_core -> timer2 */
  304. static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
  305. .master = &omap2420_l4_core_hwmod,
  306. .slave = &omap2420_timer2_hwmod,
  307. .clk = "gpt2_ick",
  308. .addr = omap2xxx_timer2_addrs,
  309. .user = OCP_USER_MPU | OCP_USER_SDMA,
  310. };
  311. /* timer2 slave port */
  312. static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
  313. &omap2420_l4_core__timer2,
  314. };
  315. /* timer2 hwmod */
  316. static struct omap_hwmod omap2420_timer2_hwmod = {
  317. .name = "timer2",
  318. .mpu_irqs = omap2_timer2_mpu_irqs,
  319. .main_clk = "gpt2_fck",
  320. .prcm = {
  321. .omap2 = {
  322. .prcm_reg_id = 1,
  323. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  324. .module_offs = CORE_MOD,
  325. .idlest_reg_id = 1,
  326. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  327. },
  328. },
  329. .slaves = omap2420_timer2_slaves,
  330. .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
  331. .class = &omap2420_timer_hwmod_class,
  332. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  333. };
  334. /* timer3 */
  335. static struct omap_hwmod omap2420_timer3_hwmod;
  336. /* l4_core -> timer3 */
  337. static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
  338. .master = &omap2420_l4_core_hwmod,
  339. .slave = &omap2420_timer3_hwmod,
  340. .clk = "gpt3_ick",
  341. .addr = omap2xxx_timer3_addrs,
  342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  343. };
  344. /* timer3 slave port */
  345. static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
  346. &omap2420_l4_core__timer3,
  347. };
  348. /* timer3 hwmod */
  349. static struct omap_hwmod omap2420_timer3_hwmod = {
  350. .name = "timer3",
  351. .mpu_irqs = omap2_timer3_mpu_irqs,
  352. .main_clk = "gpt3_fck",
  353. .prcm = {
  354. .omap2 = {
  355. .prcm_reg_id = 1,
  356. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  357. .module_offs = CORE_MOD,
  358. .idlest_reg_id = 1,
  359. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  360. },
  361. },
  362. .slaves = omap2420_timer3_slaves,
  363. .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
  364. .class = &omap2420_timer_hwmod_class,
  365. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  366. };
  367. /* timer4 */
  368. static struct omap_hwmod omap2420_timer4_hwmod;
  369. /* l4_core -> timer4 */
  370. static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
  371. .master = &omap2420_l4_core_hwmod,
  372. .slave = &omap2420_timer4_hwmod,
  373. .clk = "gpt4_ick",
  374. .addr = omap2xxx_timer4_addrs,
  375. .user = OCP_USER_MPU | OCP_USER_SDMA,
  376. };
  377. /* timer4 slave port */
  378. static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
  379. &omap2420_l4_core__timer4,
  380. };
  381. /* timer4 hwmod */
  382. static struct omap_hwmod omap2420_timer4_hwmod = {
  383. .name = "timer4",
  384. .mpu_irqs = omap2_timer4_mpu_irqs,
  385. .main_clk = "gpt4_fck",
  386. .prcm = {
  387. .omap2 = {
  388. .prcm_reg_id = 1,
  389. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  390. .module_offs = CORE_MOD,
  391. .idlest_reg_id = 1,
  392. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  393. },
  394. },
  395. .slaves = omap2420_timer4_slaves,
  396. .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
  397. .class = &omap2420_timer_hwmod_class,
  398. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  399. };
  400. /* timer5 */
  401. static struct omap_hwmod omap2420_timer5_hwmod;
  402. /* l4_core -> timer5 */
  403. static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
  404. .master = &omap2420_l4_core_hwmod,
  405. .slave = &omap2420_timer5_hwmod,
  406. .clk = "gpt5_ick",
  407. .addr = omap2xxx_timer5_addrs,
  408. .user = OCP_USER_MPU | OCP_USER_SDMA,
  409. };
  410. /* timer5 slave port */
  411. static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
  412. &omap2420_l4_core__timer5,
  413. };
  414. /* timer5 hwmod */
  415. static struct omap_hwmod omap2420_timer5_hwmod = {
  416. .name = "timer5",
  417. .mpu_irqs = omap2_timer5_mpu_irqs,
  418. .main_clk = "gpt5_fck",
  419. .prcm = {
  420. .omap2 = {
  421. .prcm_reg_id = 1,
  422. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  423. .module_offs = CORE_MOD,
  424. .idlest_reg_id = 1,
  425. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  426. },
  427. },
  428. .slaves = omap2420_timer5_slaves,
  429. .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
  430. .class = &omap2420_timer_hwmod_class,
  431. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  432. };
  433. /* timer6 */
  434. static struct omap_hwmod omap2420_timer6_hwmod;
  435. /* l4_core -> timer6 */
  436. static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
  437. .master = &omap2420_l4_core_hwmod,
  438. .slave = &omap2420_timer6_hwmod,
  439. .clk = "gpt6_ick",
  440. .addr = omap2xxx_timer6_addrs,
  441. .user = OCP_USER_MPU | OCP_USER_SDMA,
  442. };
  443. /* timer6 slave port */
  444. static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
  445. &omap2420_l4_core__timer6,
  446. };
  447. /* timer6 hwmod */
  448. static struct omap_hwmod omap2420_timer6_hwmod = {
  449. .name = "timer6",
  450. .mpu_irqs = omap2_timer6_mpu_irqs,
  451. .main_clk = "gpt6_fck",
  452. .prcm = {
  453. .omap2 = {
  454. .prcm_reg_id = 1,
  455. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  456. .module_offs = CORE_MOD,
  457. .idlest_reg_id = 1,
  458. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  459. },
  460. },
  461. .slaves = omap2420_timer6_slaves,
  462. .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
  463. .class = &omap2420_timer_hwmod_class,
  464. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  465. };
  466. /* timer7 */
  467. static struct omap_hwmod omap2420_timer7_hwmod;
  468. /* l4_core -> timer7 */
  469. static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
  470. .master = &omap2420_l4_core_hwmod,
  471. .slave = &omap2420_timer7_hwmod,
  472. .clk = "gpt7_ick",
  473. .addr = omap2xxx_timer7_addrs,
  474. .user = OCP_USER_MPU | OCP_USER_SDMA,
  475. };
  476. /* timer7 slave port */
  477. static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
  478. &omap2420_l4_core__timer7,
  479. };
  480. /* timer7 hwmod */
  481. static struct omap_hwmod omap2420_timer7_hwmod = {
  482. .name = "timer7",
  483. .mpu_irqs = omap2_timer7_mpu_irqs,
  484. .main_clk = "gpt7_fck",
  485. .prcm = {
  486. .omap2 = {
  487. .prcm_reg_id = 1,
  488. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  489. .module_offs = CORE_MOD,
  490. .idlest_reg_id = 1,
  491. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  492. },
  493. },
  494. .slaves = omap2420_timer7_slaves,
  495. .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
  496. .class = &omap2420_timer_hwmod_class,
  497. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  498. };
  499. /* timer8 */
  500. static struct omap_hwmod omap2420_timer8_hwmod;
  501. /* l4_core -> timer8 */
  502. static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
  503. .master = &omap2420_l4_core_hwmod,
  504. .slave = &omap2420_timer8_hwmod,
  505. .clk = "gpt8_ick",
  506. .addr = omap2xxx_timer8_addrs,
  507. .user = OCP_USER_MPU | OCP_USER_SDMA,
  508. };
  509. /* timer8 slave port */
  510. static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
  511. &omap2420_l4_core__timer8,
  512. };
  513. /* timer8 hwmod */
  514. static struct omap_hwmod omap2420_timer8_hwmod = {
  515. .name = "timer8",
  516. .mpu_irqs = omap2_timer8_mpu_irqs,
  517. .main_clk = "gpt8_fck",
  518. .prcm = {
  519. .omap2 = {
  520. .prcm_reg_id = 1,
  521. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  522. .module_offs = CORE_MOD,
  523. .idlest_reg_id = 1,
  524. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  525. },
  526. },
  527. .slaves = omap2420_timer8_slaves,
  528. .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
  529. .class = &omap2420_timer_hwmod_class,
  530. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  531. };
  532. /* timer9 */
  533. static struct omap_hwmod omap2420_timer9_hwmod;
  534. /* l4_core -> timer9 */
  535. static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
  536. .master = &omap2420_l4_core_hwmod,
  537. .slave = &omap2420_timer9_hwmod,
  538. .clk = "gpt9_ick",
  539. .addr = omap2xxx_timer9_addrs,
  540. .user = OCP_USER_MPU | OCP_USER_SDMA,
  541. };
  542. /* timer9 slave port */
  543. static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
  544. &omap2420_l4_core__timer9,
  545. };
  546. /* timer9 hwmod */
  547. static struct omap_hwmod omap2420_timer9_hwmod = {
  548. .name = "timer9",
  549. .mpu_irqs = omap2_timer9_mpu_irqs,
  550. .main_clk = "gpt9_fck",
  551. .prcm = {
  552. .omap2 = {
  553. .prcm_reg_id = 1,
  554. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  555. .module_offs = CORE_MOD,
  556. .idlest_reg_id = 1,
  557. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  558. },
  559. },
  560. .slaves = omap2420_timer9_slaves,
  561. .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
  562. .class = &omap2420_timer_hwmod_class,
  563. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  564. };
  565. /* timer10 */
  566. static struct omap_hwmod omap2420_timer10_hwmod;
  567. /* l4_core -> timer10 */
  568. static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
  569. .master = &omap2420_l4_core_hwmod,
  570. .slave = &omap2420_timer10_hwmod,
  571. .clk = "gpt10_ick",
  572. .addr = omap2_timer10_addrs,
  573. .user = OCP_USER_MPU | OCP_USER_SDMA,
  574. };
  575. /* timer10 slave port */
  576. static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
  577. &omap2420_l4_core__timer10,
  578. };
  579. /* timer10 hwmod */
  580. static struct omap_hwmod omap2420_timer10_hwmod = {
  581. .name = "timer10",
  582. .mpu_irqs = omap2_timer10_mpu_irqs,
  583. .main_clk = "gpt10_fck",
  584. .prcm = {
  585. .omap2 = {
  586. .prcm_reg_id = 1,
  587. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  588. .module_offs = CORE_MOD,
  589. .idlest_reg_id = 1,
  590. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  591. },
  592. },
  593. .slaves = omap2420_timer10_slaves,
  594. .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
  595. .class = &omap2420_timer_hwmod_class,
  596. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  597. };
  598. /* timer11 */
  599. static struct omap_hwmod omap2420_timer11_hwmod;
  600. /* l4_core -> timer11 */
  601. static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
  602. .master = &omap2420_l4_core_hwmod,
  603. .slave = &omap2420_timer11_hwmod,
  604. .clk = "gpt11_ick",
  605. .addr = omap2_timer11_addrs,
  606. .user = OCP_USER_MPU | OCP_USER_SDMA,
  607. };
  608. /* timer11 slave port */
  609. static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
  610. &omap2420_l4_core__timer11,
  611. };
  612. /* timer11 hwmod */
  613. static struct omap_hwmod omap2420_timer11_hwmod = {
  614. .name = "timer11",
  615. .mpu_irqs = omap2_timer11_mpu_irqs,
  616. .main_clk = "gpt11_fck",
  617. .prcm = {
  618. .omap2 = {
  619. .prcm_reg_id = 1,
  620. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  621. .module_offs = CORE_MOD,
  622. .idlest_reg_id = 1,
  623. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  624. },
  625. },
  626. .slaves = omap2420_timer11_slaves,
  627. .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
  628. .class = &omap2420_timer_hwmod_class,
  629. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  630. };
  631. /* timer12 */
  632. static struct omap_hwmod omap2420_timer12_hwmod;
  633. /* l4_core -> timer12 */
  634. static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
  635. .master = &omap2420_l4_core_hwmod,
  636. .slave = &omap2420_timer12_hwmod,
  637. .clk = "gpt12_ick",
  638. .addr = omap2xxx_timer12_addrs,
  639. .user = OCP_USER_MPU | OCP_USER_SDMA,
  640. };
  641. /* timer12 slave port */
  642. static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
  643. &omap2420_l4_core__timer12,
  644. };
  645. /* timer12 hwmod */
  646. static struct omap_hwmod omap2420_timer12_hwmod = {
  647. .name = "timer12",
  648. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  649. .main_clk = "gpt12_fck",
  650. .prcm = {
  651. .omap2 = {
  652. .prcm_reg_id = 1,
  653. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  654. .module_offs = CORE_MOD,
  655. .idlest_reg_id = 1,
  656. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  657. },
  658. },
  659. .slaves = omap2420_timer12_slaves,
  660. .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
  661. .class = &omap2420_timer_hwmod_class,
  662. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  663. };
  664. /* l4_wkup -> wd_timer2 */
  665. static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
  666. {
  667. .pa_start = 0x48022000,
  668. .pa_end = 0x4802207f,
  669. .flags = ADDR_TYPE_RT
  670. },
  671. { }
  672. };
  673. static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
  674. .master = &omap2420_l4_wkup_hwmod,
  675. .slave = &omap2420_wd_timer2_hwmod,
  676. .clk = "mpu_wdt_ick",
  677. .addr = omap2420_wd_timer2_addrs,
  678. .user = OCP_USER_MPU | OCP_USER_SDMA,
  679. };
  680. /*
  681. * 'wd_timer' class
  682. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  683. * overflow condition
  684. */
  685. static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
  686. .rev_offs = 0x0000,
  687. .sysc_offs = 0x0010,
  688. .syss_offs = 0x0014,
  689. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  690. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  691. .sysc_fields = &omap_hwmod_sysc_type1,
  692. };
  693. static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
  694. .name = "wd_timer",
  695. .sysc = &omap2420_wd_timer_sysc,
  696. .pre_shutdown = &omap2_wd_timer_disable
  697. };
  698. /* wd_timer2 */
  699. static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
  700. &omap2420_l4_wkup__wd_timer2,
  701. };
  702. static struct omap_hwmod omap2420_wd_timer2_hwmod = {
  703. .name = "wd_timer2",
  704. .class = &omap2420_wd_timer_hwmod_class,
  705. .main_clk = "mpu_wdt_fck",
  706. .prcm = {
  707. .omap2 = {
  708. .prcm_reg_id = 1,
  709. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  710. .module_offs = WKUP_MOD,
  711. .idlest_reg_id = 1,
  712. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  713. },
  714. },
  715. .slaves = omap2420_wd_timer2_slaves,
  716. .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
  717. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  718. };
  719. /* UART */
  720. static struct omap_hwmod_class_sysconfig uart_sysc = {
  721. .rev_offs = 0x50,
  722. .sysc_offs = 0x54,
  723. .syss_offs = 0x58,
  724. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  725. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  726. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  727. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  728. .sysc_fields = &omap_hwmod_sysc_type1,
  729. };
  730. static struct omap_hwmod_class uart_class = {
  731. .name = "uart",
  732. .sysc = &uart_sysc,
  733. };
  734. /* UART1 */
  735. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  736. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  737. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  738. { .dma_req = -1 }
  739. };
  740. static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
  741. &omap2_l4_core__uart1,
  742. };
  743. static struct omap_hwmod omap2420_uart1_hwmod = {
  744. .name = "uart1",
  745. .mpu_irqs = omap2_uart1_mpu_irqs,
  746. .sdma_reqs = uart1_sdma_reqs,
  747. .main_clk = "uart1_fck",
  748. .prcm = {
  749. .omap2 = {
  750. .module_offs = CORE_MOD,
  751. .prcm_reg_id = 1,
  752. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  753. .idlest_reg_id = 1,
  754. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  755. },
  756. },
  757. .slaves = omap2420_uart1_slaves,
  758. .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
  759. .class = &uart_class,
  760. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  761. };
  762. /* UART2 */
  763. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  764. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  765. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  766. { .dma_req = -1 }
  767. };
  768. static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
  769. &omap2_l4_core__uart2,
  770. };
  771. static struct omap_hwmod omap2420_uart2_hwmod = {
  772. .name = "uart2",
  773. .mpu_irqs = omap2_uart2_mpu_irqs,
  774. .sdma_reqs = uart2_sdma_reqs,
  775. .main_clk = "uart2_fck",
  776. .prcm = {
  777. .omap2 = {
  778. .module_offs = CORE_MOD,
  779. .prcm_reg_id = 1,
  780. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  781. .idlest_reg_id = 1,
  782. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  783. },
  784. },
  785. .slaves = omap2420_uart2_slaves,
  786. .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
  787. .class = &uart_class,
  788. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  789. };
  790. /* UART3 */
  791. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  792. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  793. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  794. { .dma_req = -1 }
  795. };
  796. static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
  797. &omap2_l4_core__uart3,
  798. };
  799. static struct omap_hwmod omap2420_uart3_hwmod = {
  800. .name = "uart3",
  801. .mpu_irqs = omap2_uart3_mpu_irqs,
  802. .sdma_reqs = uart3_sdma_reqs,
  803. .main_clk = "uart3_fck",
  804. .prcm = {
  805. .omap2 = {
  806. .module_offs = CORE_MOD,
  807. .prcm_reg_id = 2,
  808. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  809. .idlest_reg_id = 2,
  810. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  811. },
  812. },
  813. .slaves = omap2420_uart3_slaves,
  814. .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
  815. .class = &uart_class,
  816. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  817. };
  818. /*
  819. * 'dss' class
  820. * display sub-system
  821. */
  822. static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = {
  823. .rev_offs = 0x0000,
  824. .sysc_offs = 0x0010,
  825. .syss_offs = 0x0014,
  826. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  827. .sysc_fields = &omap_hwmod_sysc_type1,
  828. };
  829. static struct omap_hwmod_class omap2420_dss_hwmod_class = {
  830. .name = "dss",
  831. .sysc = &omap2420_dss_sysc,
  832. };
  833. static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = {
  834. { .name = "dispc", .dma_req = 5 },
  835. { .dma_req = -1 }
  836. };
  837. /* dss */
  838. /* dss master ports */
  839. static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
  840. &omap2420_dss__l3,
  841. };
  842. /* l4_core -> dss */
  843. static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
  844. .master = &omap2420_l4_core_hwmod,
  845. .slave = &omap2420_dss_core_hwmod,
  846. .clk = "dss_ick",
  847. .addr = omap2_dss_addrs,
  848. .fw = {
  849. .omap2 = {
  850. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
  851. .flags = OMAP_FIREWALL_L4,
  852. }
  853. },
  854. .user = OCP_USER_MPU | OCP_USER_SDMA,
  855. };
  856. /* dss slave ports */
  857. static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
  858. &omap2420_l4_core__dss,
  859. };
  860. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  861. { .role = "tv_clk", .clk = "dss_54m_fck" },
  862. { .role = "sys_clk", .clk = "dss2_fck" },
  863. };
  864. static struct omap_hwmod omap2420_dss_core_hwmod = {
  865. .name = "dss_core",
  866. .class = &omap2420_dss_hwmod_class,
  867. .main_clk = "dss1_fck", /* instead of dss_fck */
  868. .sdma_reqs = omap2420_dss_sdma_chs,
  869. .prcm = {
  870. .omap2 = {
  871. .prcm_reg_id = 1,
  872. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  873. .module_offs = CORE_MOD,
  874. .idlest_reg_id = 1,
  875. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  876. },
  877. },
  878. .opt_clks = dss_opt_clks,
  879. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  880. .slaves = omap2420_dss_slaves,
  881. .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
  882. .masters = omap2420_dss_masters,
  883. .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
  884. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  885. .flags = HWMOD_NO_IDLEST,
  886. };
  887. /*
  888. * 'dispc' class
  889. * display controller
  890. */
  891. static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = {
  892. .rev_offs = 0x0000,
  893. .sysc_offs = 0x0010,
  894. .syss_offs = 0x0014,
  895. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  896. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  897. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  898. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  899. .sysc_fields = &omap_hwmod_sysc_type1,
  900. };
  901. static struct omap_hwmod_class omap2420_dispc_hwmod_class = {
  902. .name = "dispc",
  903. .sysc = &omap2420_dispc_sysc,
  904. };
  905. /* l4_core -> dss_dispc */
  906. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
  907. .master = &omap2420_l4_core_hwmod,
  908. .slave = &omap2420_dss_dispc_hwmod,
  909. .clk = "dss_ick",
  910. .addr = omap2_dss_dispc_addrs,
  911. .fw = {
  912. .omap2 = {
  913. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
  914. .flags = OMAP_FIREWALL_L4,
  915. }
  916. },
  917. .user = OCP_USER_MPU | OCP_USER_SDMA,
  918. };
  919. /* dss_dispc slave ports */
  920. static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
  921. &omap2420_l4_core__dss_dispc,
  922. };
  923. static struct omap_hwmod omap2420_dss_dispc_hwmod = {
  924. .name = "dss_dispc",
  925. .class = &omap2420_dispc_hwmod_class,
  926. .mpu_irqs = omap2_dispc_irqs,
  927. .main_clk = "dss1_fck",
  928. .prcm = {
  929. .omap2 = {
  930. .prcm_reg_id = 1,
  931. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  932. .module_offs = CORE_MOD,
  933. .idlest_reg_id = 1,
  934. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  935. },
  936. },
  937. .slaves = omap2420_dss_dispc_slaves,
  938. .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
  939. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  940. .flags = HWMOD_NO_IDLEST,
  941. };
  942. /*
  943. * 'rfbi' class
  944. * remote frame buffer interface
  945. */
  946. static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = {
  947. .rev_offs = 0x0000,
  948. .sysc_offs = 0x0010,
  949. .syss_offs = 0x0014,
  950. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  951. SYSC_HAS_AUTOIDLE),
  952. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  953. .sysc_fields = &omap_hwmod_sysc_type1,
  954. };
  955. static struct omap_hwmod_class omap2420_rfbi_hwmod_class = {
  956. .name = "rfbi",
  957. .sysc = &omap2420_rfbi_sysc,
  958. };
  959. /* l4_core -> dss_rfbi */
  960. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
  961. .master = &omap2420_l4_core_hwmod,
  962. .slave = &omap2420_dss_rfbi_hwmod,
  963. .clk = "dss_ick",
  964. .addr = omap2_dss_rfbi_addrs,
  965. .fw = {
  966. .omap2 = {
  967. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
  968. .flags = OMAP_FIREWALL_L4,
  969. }
  970. },
  971. .user = OCP_USER_MPU | OCP_USER_SDMA,
  972. };
  973. /* dss_rfbi slave ports */
  974. static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
  975. &omap2420_l4_core__dss_rfbi,
  976. };
  977. static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
  978. .name = "dss_rfbi",
  979. .class = &omap2420_rfbi_hwmod_class,
  980. .main_clk = "dss1_fck",
  981. .prcm = {
  982. .omap2 = {
  983. .prcm_reg_id = 1,
  984. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  985. .module_offs = CORE_MOD,
  986. },
  987. },
  988. .slaves = omap2420_dss_rfbi_slaves,
  989. .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
  990. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  991. .flags = HWMOD_NO_IDLEST,
  992. };
  993. /*
  994. * 'venc' class
  995. * video encoder
  996. */
  997. static struct omap_hwmod_class omap2420_venc_hwmod_class = {
  998. .name = "venc",
  999. };
  1000. /* l4_core -> dss_venc */
  1001. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
  1002. .master = &omap2420_l4_core_hwmod,
  1003. .slave = &omap2420_dss_venc_hwmod,
  1004. .clk = "dss_54m_fck",
  1005. .addr = omap2_dss_venc_addrs,
  1006. .fw = {
  1007. .omap2 = {
  1008. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
  1009. .flags = OMAP_FIREWALL_L4,
  1010. }
  1011. },
  1012. .flags = OCPIF_SWSUP_IDLE,
  1013. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1014. };
  1015. /* dss_venc slave ports */
  1016. static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
  1017. &omap2420_l4_core__dss_venc,
  1018. };
  1019. static struct omap_hwmod omap2420_dss_venc_hwmod = {
  1020. .name = "dss_venc",
  1021. .class = &omap2420_venc_hwmod_class,
  1022. .main_clk = "dss1_fck",
  1023. .prcm = {
  1024. .omap2 = {
  1025. .prcm_reg_id = 1,
  1026. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1027. .module_offs = CORE_MOD,
  1028. },
  1029. },
  1030. .slaves = omap2420_dss_venc_slaves,
  1031. .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
  1032. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1033. .flags = HWMOD_NO_IDLEST,
  1034. };
  1035. /* I2C common */
  1036. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1037. .rev_offs = 0x00,
  1038. .sysc_offs = 0x20,
  1039. .syss_offs = 0x10,
  1040. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1041. .sysc_fields = &omap_hwmod_sysc_type1,
  1042. };
  1043. static struct omap_hwmod_class i2c_class = {
  1044. .name = "i2c",
  1045. .sysc = &i2c_sysc,
  1046. };
  1047. static struct omap_i2c_dev_attr i2c_dev_attr;
  1048. /* I2C1 */
  1049. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  1050. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  1051. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  1052. { .dma_req = -1 }
  1053. };
  1054. static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
  1055. &omap2420_l4_core__i2c1,
  1056. };
  1057. static struct omap_hwmod omap2420_i2c1_hwmod = {
  1058. .name = "i2c1",
  1059. .mpu_irqs = omap2_i2c1_mpu_irqs,
  1060. .sdma_reqs = i2c1_sdma_reqs,
  1061. .main_clk = "i2c1_fck",
  1062. .prcm = {
  1063. .omap2 = {
  1064. .module_offs = CORE_MOD,
  1065. .prcm_reg_id = 1,
  1066. .module_bit = OMAP2420_EN_I2C1_SHIFT,
  1067. .idlest_reg_id = 1,
  1068. .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
  1069. },
  1070. },
  1071. .slaves = omap2420_i2c1_slaves,
  1072. .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
  1073. .class = &i2c_class,
  1074. .dev_attr = &i2c_dev_attr,
  1075. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1076. .flags = HWMOD_16BIT_REG,
  1077. };
  1078. /* I2C2 */
  1079. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  1080. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  1081. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  1082. { .dma_req = -1 }
  1083. };
  1084. static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
  1085. &omap2420_l4_core__i2c2,
  1086. };
  1087. static struct omap_hwmod omap2420_i2c2_hwmod = {
  1088. .name = "i2c2",
  1089. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1090. .sdma_reqs = i2c2_sdma_reqs,
  1091. .main_clk = "i2c2_fck",
  1092. .prcm = {
  1093. .omap2 = {
  1094. .module_offs = CORE_MOD,
  1095. .prcm_reg_id = 1,
  1096. .module_bit = OMAP2420_EN_I2C2_SHIFT,
  1097. .idlest_reg_id = 1,
  1098. .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
  1099. },
  1100. },
  1101. .slaves = omap2420_i2c2_slaves,
  1102. .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
  1103. .class = &i2c_class,
  1104. .dev_attr = &i2c_dev_attr,
  1105. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1106. .flags = HWMOD_16BIT_REG,
  1107. };
  1108. /* l4_wkup -> gpio1 */
  1109. static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
  1110. {
  1111. .pa_start = 0x48018000,
  1112. .pa_end = 0x480181ff,
  1113. .flags = ADDR_TYPE_RT
  1114. },
  1115. { }
  1116. };
  1117. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
  1118. .master = &omap2420_l4_wkup_hwmod,
  1119. .slave = &omap2420_gpio1_hwmod,
  1120. .clk = "gpios_ick",
  1121. .addr = omap2420_gpio1_addr_space,
  1122. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1123. };
  1124. /* l4_wkup -> gpio2 */
  1125. static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
  1126. {
  1127. .pa_start = 0x4801a000,
  1128. .pa_end = 0x4801a1ff,
  1129. .flags = ADDR_TYPE_RT
  1130. },
  1131. { }
  1132. };
  1133. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
  1134. .master = &omap2420_l4_wkup_hwmod,
  1135. .slave = &omap2420_gpio2_hwmod,
  1136. .clk = "gpios_ick",
  1137. .addr = omap2420_gpio2_addr_space,
  1138. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1139. };
  1140. /* l4_wkup -> gpio3 */
  1141. static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
  1142. {
  1143. .pa_start = 0x4801c000,
  1144. .pa_end = 0x4801c1ff,
  1145. .flags = ADDR_TYPE_RT
  1146. },
  1147. { }
  1148. };
  1149. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
  1150. .master = &omap2420_l4_wkup_hwmod,
  1151. .slave = &omap2420_gpio3_hwmod,
  1152. .clk = "gpios_ick",
  1153. .addr = omap2420_gpio3_addr_space,
  1154. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1155. };
  1156. /* l4_wkup -> gpio4 */
  1157. static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
  1158. {
  1159. .pa_start = 0x4801e000,
  1160. .pa_end = 0x4801e1ff,
  1161. .flags = ADDR_TYPE_RT
  1162. },
  1163. { }
  1164. };
  1165. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
  1166. .master = &omap2420_l4_wkup_hwmod,
  1167. .slave = &omap2420_gpio4_hwmod,
  1168. .clk = "gpios_ick",
  1169. .addr = omap2420_gpio4_addr_space,
  1170. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1171. };
  1172. /* gpio dev_attr */
  1173. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1174. .bank_width = 32,
  1175. .dbck_flag = false,
  1176. };
  1177. static struct omap_hwmod_class_sysconfig omap242x_gpio_sysc = {
  1178. .rev_offs = 0x0000,
  1179. .sysc_offs = 0x0010,
  1180. .syss_offs = 0x0014,
  1181. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1182. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1183. SYSS_HAS_RESET_STATUS),
  1184. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1185. .sysc_fields = &omap_hwmod_sysc_type1,
  1186. };
  1187. /*
  1188. * 'gpio' class
  1189. * general purpose io module
  1190. */
  1191. static struct omap_hwmod_class omap242x_gpio_hwmod_class = {
  1192. .name = "gpio",
  1193. .sysc = &omap242x_gpio_sysc,
  1194. .rev = 0,
  1195. };
  1196. /* gpio1 */
  1197. static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
  1198. &omap2420_l4_wkup__gpio1,
  1199. };
  1200. static struct omap_hwmod omap2420_gpio1_hwmod = {
  1201. .name = "gpio1",
  1202. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1203. .mpu_irqs = omap2_gpio1_irqs,
  1204. .main_clk = "gpios_fck",
  1205. .prcm = {
  1206. .omap2 = {
  1207. .prcm_reg_id = 1,
  1208. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1209. .module_offs = WKUP_MOD,
  1210. .idlest_reg_id = 1,
  1211. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1212. },
  1213. },
  1214. .slaves = omap2420_gpio1_slaves,
  1215. .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
  1216. .class = &omap242x_gpio_hwmod_class,
  1217. .dev_attr = &gpio_dev_attr,
  1218. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1219. };
  1220. /* gpio2 */
  1221. static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
  1222. &omap2420_l4_wkup__gpio2,
  1223. };
  1224. static struct omap_hwmod omap2420_gpio2_hwmod = {
  1225. .name = "gpio2",
  1226. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1227. .mpu_irqs = omap2_gpio2_irqs,
  1228. .main_clk = "gpios_fck",
  1229. .prcm = {
  1230. .omap2 = {
  1231. .prcm_reg_id = 1,
  1232. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1233. .module_offs = WKUP_MOD,
  1234. .idlest_reg_id = 1,
  1235. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1236. },
  1237. },
  1238. .slaves = omap2420_gpio2_slaves,
  1239. .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
  1240. .class = &omap242x_gpio_hwmod_class,
  1241. .dev_attr = &gpio_dev_attr,
  1242. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1243. };
  1244. /* gpio3 */
  1245. static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
  1246. &omap2420_l4_wkup__gpio3,
  1247. };
  1248. static struct omap_hwmod omap2420_gpio3_hwmod = {
  1249. .name = "gpio3",
  1250. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1251. .mpu_irqs = omap2_gpio3_irqs,
  1252. .main_clk = "gpios_fck",
  1253. .prcm = {
  1254. .omap2 = {
  1255. .prcm_reg_id = 1,
  1256. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1257. .module_offs = WKUP_MOD,
  1258. .idlest_reg_id = 1,
  1259. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1260. },
  1261. },
  1262. .slaves = omap2420_gpio3_slaves,
  1263. .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
  1264. .class = &omap242x_gpio_hwmod_class,
  1265. .dev_attr = &gpio_dev_attr,
  1266. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1267. };
  1268. /* gpio4 */
  1269. static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
  1270. &omap2420_l4_wkup__gpio4,
  1271. };
  1272. static struct omap_hwmod omap2420_gpio4_hwmod = {
  1273. .name = "gpio4",
  1274. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1275. .mpu_irqs = omap2_gpio4_irqs,
  1276. .main_clk = "gpios_fck",
  1277. .prcm = {
  1278. .omap2 = {
  1279. .prcm_reg_id = 1,
  1280. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1281. .module_offs = WKUP_MOD,
  1282. .idlest_reg_id = 1,
  1283. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1284. },
  1285. },
  1286. .slaves = omap2420_gpio4_slaves,
  1287. .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
  1288. .class = &omap242x_gpio_hwmod_class,
  1289. .dev_attr = &gpio_dev_attr,
  1290. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1291. };
  1292. /* system dma */
  1293. static struct omap_hwmod_class_sysconfig omap2420_dma_sysc = {
  1294. .rev_offs = 0x0000,
  1295. .sysc_offs = 0x002c,
  1296. .syss_offs = 0x0028,
  1297. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1298. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1299. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1300. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1301. .sysc_fields = &omap_hwmod_sysc_type1,
  1302. };
  1303. static struct omap_hwmod_class omap2420_dma_hwmod_class = {
  1304. .name = "dma",
  1305. .sysc = &omap2420_dma_sysc,
  1306. };
  1307. /* dma attributes */
  1308. static struct omap_dma_dev_attr dma_dev_attr = {
  1309. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1310. IS_CSSA_32 | IS_CDSA_32,
  1311. .lch_count = 32,
  1312. };
  1313. /* dma_system -> L3 */
  1314. static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
  1315. .master = &omap2420_dma_system_hwmod,
  1316. .slave = &omap2420_l3_main_hwmod,
  1317. .clk = "core_l3_ck",
  1318. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1319. };
  1320. /* dma_system master ports */
  1321. static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
  1322. &omap2420_dma_system__l3,
  1323. };
  1324. /* l4_core -> dma_system */
  1325. static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
  1326. .master = &omap2420_l4_core_hwmod,
  1327. .slave = &omap2420_dma_system_hwmod,
  1328. .clk = "sdma_ick",
  1329. .addr = omap2_dma_system_addrs,
  1330. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1331. };
  1332. /* dma_system slave ports */
  1333. static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
  1334. &omap2420_l4_core__dma_system,
  1335. };
  1336. static struct omap_hwmod omap2420_dma_system_hwmod = {
  1337. .name = "dma",
  1338. .class = &omap2420_dma_hwmod_class,
  1339. .mpu_irqs = omap2_dma_system_irqs,
  1340. .main_clk = "core_l3_ck",
  1341. .slaves = omap2420_dma_system_slaves,
  1342. .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
  1343. .masters = omap2420_dma_system_masters,
  1344. .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
  1345. .dev_attr = &dma_dev_attr,
  1346. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1347. .flags = HWMOD_NO_IDLEST,
  1348. };
  1349. /*
  1350. * 'mailbox' class
  1351. * mailbox module allowing communication between the on-chip processors
  1352. * using a queued mailbox-interrupt mechanism.
  1353. */
  1354. static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = {
  1355. .rev_offs = 0x000,
  1356. .sysc_offs = 0x010,
  1357. .syss_offs = 0x014,
  1358. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1359. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1360. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1361. .sysc_fields = &omap_hwmod_sysc_type1,
  1362. };
  1363. static struct omap_hwmod_class omap2420_mailbox_hwmod_class = {
  1364. .name = "mailbox",
  1365. .sysc = &omap2420_mailbox_sysc,
  1366. };
  1367. /* mailbox */
  1368. static struct omap_hwmod omap2420_mailbox_hwmod;
  1369. static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
  1370. { .name = "dsp", .irq = 26 },
  1371. { .name = "iva", .irq = 34 },
  1372. { .irq = -1 }
  1373. };
  1374. /* l4_core -> mailbox */
  1375. static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
  1376. .master = &omap2420_l4_core_hwmod,
  1377. .slave = &omap2420_mailbox_hwmod,
  1378. .addr = omap2_mailbox_addrs,
  1379. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1380. };
  1381. /* mailbox slave ports */
  1382. static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
  1383. &omap2420_l4_core__mailbox,
  1384. };
  1385. static struct omap_hwmod omap2420_mailbox_hwmod = {
  1386. .name = "mailbox",
  1387. .class = &omap2420_mailbox_hwmod_class,
  1388. .mpu_irqs = omap2420_mailbox_irqs,
  1389. .main_clk = "mailboxes_ick",
  1390. .prcm = {
  1391. .omap2 = {
  1392. .prcm_reg_id = 1,
  1393. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1394. .module_offs = CORE_MOD,
  1395. .idlest_reg_id = 1,
  1396. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1397. },
  1398. },
  1399. .slaves = omap2420_mailbox_slaves,
  1400. .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
  1401. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1402. };
  1403. /*
  1404. * 'mcspi' class
  1405. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1406. * bus
  1407. */
  1408. static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = {
  1409. .rev_offs = 0x0000,
  1410. .sysc_offs = 0x0010,
  1411. .syss_offs = 0x0014,
  1412. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1413. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1414. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1415. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1416. .sysc_fields = &omap_hwmod_sysc_type1,
  1417. };
  1418. static struct omap_hwmod_class omap2420_mcspi_class = {
  1419. .name = "mcspi",
  1420. .sysc = &omap2420_mcspi_sysc,
  1421. .rev = OMAP2_MCSPI_REV,
  1422. };
  1423. /* mcspi1 */
  1424. static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = {
  1425. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1426. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1427. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1428. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1429. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1430. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1431. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1432. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1433. { .dma_req = -1 }
  1434. };
  1435. static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
  1436. &omap2420_l4_core__mcspi1,
  1437. };
  1438. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1439. .num_chipselect = 4,
  1440. };
  1441. static struct omap_hwmod omap2420_mcspi1_hwmod = {
  1442. .name = "mcspi1_hwmod",
  1443. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1444. .sdma_reqs = omap2420_mcspi1_sdma_reqs,
  1445. .main_clk = "mcspi1_fck",
  1446. .prcm = {
  1447. .omap2 = {
  1448. .module_offs = CORE_MOD,
  1449. .prcm_reg_id = 1,
  1450. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1451. .idlest_reg_id = 1,
  1452. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1453. },
  1454. },
  1455. .slaves = omap2420_mcspi1_slaves,
  1456. .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
  1457. .class = &omap2420_mcspi_class,
  1458. .dev_attr = &omap_mcspi1_dev_attr,
  1459. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1460. };
  1461. /* mcspi2 */
  1462. static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = {
  1463. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1464. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1465. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1466. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1467. { .dma_req = -1 }
  1468. };
  1469. static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
  1470. &omap2420_l4_core__mcspi2,
  1471. };
  1472. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1473. .num_chipselect = 2,
  1474. };
  1475. static struct omap_hwmod omap2420_mcspi2_hwmod = {
  1476. .name = "mcspi2_hwmod",
  1477. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1478. .sdma_reqs = omap2420_mcspi2_sdma_reqs,
  1479. .main_clk = "mcspi2_fck",
  1480. .prcm = {
  1481. .omap2 = {
  1482. .module_offs = CORE_MOD,
  1483. .prcm_reg_id = 1,
  1484. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1485. .idlest_reg_id = 1,
  1486. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1487. },
  1488. },
  1489. .slaves = omap2420_mcspi2_slaves,
  1490. .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
  1491. .class = &omap2420_mcspi_class,
  1492. .dev_attr = &omap_mcspi2_dev_attr,
  1493. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1494. };
  1495. /*
  1496. * 'mcbsp' class
  1497. * multi channel buffered serial port controller
  1498. */
  1499. static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
  1500. .name = "mcbsp",
  1501. };
  1502. /* mcbsp1 */
  1503. static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
  1504. { .name = "tx", .irq = 59 },
  1505. { .name = "rx", .irq = 60 },
  1506. { .irq = -1 }
  1507. };
  1508. static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
  1509. { .name = "rx", .dma_req = 32 },
  1510. { .name = "tx", .dma_req = 31 },
  1511. { .dma_req = -1 }
  1512. };
  1513. /* l4_core -> mcbsp1 */
  1514. static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
  1515. .master = &omap2420_l4_core_hwmod,
  1516. .slave = &omap2420_mcbsp1_hwmod,
  1517. .clk = "mcbsp1_ick",
  1518. .addr = omap2_mcbsp1_addrs,
  1519. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1520. };
  1521. /* mcbsp1 slave ports */
  1522. static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
  1523. &omap2420_l4_core__mcbsp1,
  1524. };
  1525. static struct omap_hwmod omap2420_mcbsp1_hwmod = {
  1526. .name = "mcbsp1",
  1527. .class = &omap2420_mcbsp_hwmod_class,
  1528. .mpu_irqs = omap2420_mcbsp1_irqs,
  1529. .sdma_reqs = omap2420_mcbsp1_sdma_chs,
  1530. .main_clk = "mcbsp1_fck",
  1531. .prcm = {
  1532. .omap2 = {
  1533. .prcm_reg_id = 1,
  1534. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1535. .module_offs = CORE_MOD,
  1536. .idlest_reg_id = 1,
  1537. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1538. },
  1539. },
  1540. .slaves = omap2420_mcbsp1_slaves,
  1541. .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
  1542. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1543. };
  1544. /* mcbsp2 */
  1545. static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
  1546. { .name = "tx", .irq = 62 },
  1547. { .name = "rx", .irq = 63 },
  1548. { .irq = -1 }
  1549. };
  1550. static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
  1551. { .name = "rx", .dma_req = 34 },
  1552. { .name = "tx", .dma_req = 33 },
  1553. { .dma_req = -1 }
  1554. };
  1555. /* l4_core -> mcbsp2 */
  1556. static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
  1557. .master = &omap2420_l4_core_hwmod,
  1558. .slave = &omap2420_mcbsp2_hwmod,
  1559. .clk = "mcbsp2_ick",
  1560. .addr = omap2xxx_mcbsp2_addrs,
  1561. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1562. };
  1563. /* mcbsp2 slave ports */
  1564. static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
  1565. &omap2420_l4_core__mcbsp2,
  1566. };
  1567. static struct omap_hwmod omap2420_mcbsp2_hwmod = {
  1568. .name = "mcbsp2",
  1569. .class = &omap2420_mcbsp_hwmod_class,
  1570. .mpu_irqs = omap2420_mcbsp2_irqs,
  1571. .sdma_reqs = omap2420_mcbsp2_sdma_chs,
  1572. .main_clk = "mcbsp2_fck",
  1573. .prcm = {
  1574. .omap2 = {
  1575. .prcm_reg_id = 1,
  1576. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1577. .module_offs = CORE_MOD,
  1578. .idlest_reg_id = 1,
  1579. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1580. },
  1581. },
  1582. .slaves = omap2420_mcbsp2_slaves,
  1583. .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
  1584. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1585. };
  1586. static __initdata struct omap_hwmod *omap2420_hwmods[] = {
  1587. &omap2420_l3_main_hwmod,
  1588. &omap2420_l4_core_hwmod,
  1589. &omap2420_l4_wkup_hwmod,
  1590. &omap2420_mpu_hwmod,
  1591. &omap2420_iva_hwmod,
  1592. &omap2420_timer1_hwmod,
  1593. &omap2420_timer2_hwmod,
  1594. &omap2420_timer3_hwmod,
  1595. &omap2420_timer4_hwmod,
  1596. &omap2420_timer5_hwmod,
  1597. &omap2420_timer6_hwmod,
  1598. &omap2420_timer7_hwmod,
  1599. &omap2420_timer8_hwmod,
  1600. &omap2420_timer9_hwmod,
  1601. &omap2420_timer10_hwmod,
  1602. &omap2420_timer11_hwmod,
  1603. &omap2420_timer12_hwmod,
  1604. &omap2420_wd_timer2_hwmod,
  1605. &omap2420_uart1_hwmod,
  1606. &omap2420_uart2_hwmod,
  1607. &omap2420_uart3_hwmod,
  1608. /* dss class */
  1609. &omap2420_dss_core_hwmod,
  1610. &omap2420_dss_dispc_hwmod,
  1611. &omap2420_dss_rfbi_hwmod,
  1612. &omap2420_dss_venc_hwmod,
  1613. /* i2c class */
  1614. &omap2420_i2c1_hwmod,
  1615. &omap2420_i2c2_hwmod,
  1616. /* gpio class */
  1617. &omap2420_gpio1_hwmod,
  1618. &omap2420_gpio2_hwmod,
  1619. &omap2420_gpio3_hwmod,
  1620. &omap2420_gpio4_hwmod,
  1621. /* dma_system class*/
  1622. &omap2420_dma_system_hwmod,
  1623. /* mailbox class */
  1624. &omap2420_mailbox_hwmod,
  1625. /* mcbsp class */
  1626. &omap2420_mcbsp1_hwmod,
  1627. &omap2420_mcbsp2_hwmod,
  1628. /* mcspi class */
  1629. &omap2420_mcspi1_hwmod,
  1630. &omap2420_mcspi2_hwmod,
  1631. NULL,
  1632. };
  1633. int __init omap2420_hwmod_init(void)
  1634. {
  1635. return omap_hwmod_register(omap2420_hwmods);
  1636. }