omap_hwmod_2420_data.c 50 KB

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