omap_hwmod_44xx_data.c 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. /*
  2. * Hardware modules present on the OMAP44xx chips
  3. *
  4. * Copyright (C) 2009-2010 Texas Instruments, Inc.
  5. * Copyright (C) 2009-2010 Nokia Corporation
  6. *
  7. * Paul Walmsley
  8. * Benoit Cousson
  9. *
  10. * This file is automatically generated from the OMAP hardware databases.
  11. * We respectfully ask that any modifications to this file be coordinated
  12. * with the public linux-omap@vger.kernel.org mailing list and the
  13. * authors above to ensure that the autogeneration scripts are kept
  14. * up-to-date with the file contents.
  15. *
  16. * This program is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License version 2 as
  18. * published by the Free Software Foundation.
  19. */
  20. #include <linux/io.h>
  21. #include <plat/omap_hwmod.h>
  22. #include <plat/cpu.h>
  23. #include "omap_hwmod_common_data.h"
  24. #include "cm.h"
  25. #include "prm-regbits-44xx.h"
  26. /* Base offset for all OMAP4 interrupts external to MPUSS */
  27. #define OMAP44XX_IRQ_GIC_START 32
  28. /* Base offset for all OMAP4 dma requests */
  29. #define OMAP44XX_DMA_REQ_START 1
  30. /* Backward references (IPs with Bus Master capability) */
  31. static struct omap_hwmod omap44xx_dmm_hwmod;
  32. static struct omap_hwmod omap44xx_emif_fw_hwmod;
  33. static struct omap_hwmod omap44xx_l3_instr_hwmod;
  34. static struct omap_hwmod omap44xx_l3_main_1_hwmod;
  35. static struct omap_hwmod omap44xx_l3_main_2_hwmod;
  36. static struct omap_hwmod omap44xx_l3_main_3_hwmod;
  37. static struct omap_hwmod omap44xx_l4_abe_hwmod;
  38. static struct omap_hwmod omap44xx_l4_cfg_hwmod;
  39. static struct omap_hwmod omap44xx_l4_per_hwmod;
  40. static struct omap_hwmod omap44xx_l4_wkup_hwmod;
  41. static struct omap_hwmod omap44xx_mpu_hwmod;
  42. static struct omap_hwmod omap44xx_mpu_private_hwmod;
  43. /*
  44. * Interconnects omap_hwmod structures
  45. * hwmods that compose the global OMAP interconnect
  46. */
  47. /*
  48. * 'dmm' class
  49. * instance(s): dmm
  50. */
  51. static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
  52. .name = "dmm",
  53. };
  54. /* dmm interface data */
  55. /* l3_main_1 -> dmm */
  56. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
  57. .master = &omap44xx_l3_main_1_hwmod,
  58. .slave = &omap44xx_dmm_hwmod,
  59. .clk = "l3_div_ck",
  60. .user = OCP_USER_MPU | OCP_USER_SDMA,
  61. };
  62. /* mpu -> dmm */
  63. static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
  64. .master = &omap44xx_mpu_hwmod,
  65. .slave = &omap44xx_dmm_hwmod,
  66. .clk = "l3_div_ck",
  67. .user = OCP_USER_MPU | OCP_USER_SDMA,
  68. };
  69. /* dmm slave ports */
  70. static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
  71. &omap44xx_l3_main_1__dmm,
  72. &omap44xx_mpu__dmm,
  73. };
  74. static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
  75. { .irq = 113 + OMAP44XX_IRQ_GIC_START },
  76. };
  77. static struct omap_hwmod omap44xx_dmm_hwmod = {
  78. .name = "dmm",
  79. .class = &omap44xx_dmm_hwmod_class,
  80. .slaves = omap44xx_dmm_slaves,
  81. .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
  82. .mpu_irqs = omap44xx_dmm_irqs,
  83. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs),
  84. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  85. };
  86. /*
  87. * 'emif_fw' class
  88. * instance(s): emif_fw
  89. */
  90. static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
  91. .name = "emif_fw",
  92. };
  93. /* emif_fw interface data */
  94. /* dmm -> emif_fw */
  95. static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
  96. .master = &omap44xx_dmm_hwmod,
  97. .slave = &omap44xx_emif_fw_hwmod,
  98. .clk = "l3_div_ck",
  99. .user = OCP_USER_MPU | OCP_USER_SDMA,
  100. };
  101. /* l4_cfg -> emif_fw */
  102. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
  103. .master = &omap44xx_l4_cfg_hwmod,
  104. .slave = &omap44xx_emif_fw_hwmod,
  105. .clk = "l4_div_ck",
  106. .user = OCP_USER_MPU | OCP_USER_SDMA,
  107. };
  108. /* emif_fw slave ports */
  109. static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
  110. &omap44xx_dmm__emif_fw,
  111. &omap44xx_l4_cfg__emif_fw,
  112. };
  113. static struct omap_hwmod omap44xx_emif_fw_hwmod = {
  114. .name = "emif_fw",
  115. .class = &omap44xx_emif_fw_hwmod_class,
  116. .slaves = omap44xx_emif_fw_slaves,
  117. .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
  118. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  119. };
  120. /*
  121. * 'l3' class
  122. * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
  123. */
  124. static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
  125. .name = "l3",
  126. };
  127. /* l3_instr interface data */
  128. /* l3_main_3 -> l3_instr */
  129. static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
  130. .master = &omap44xx_l3_main_3_hwmod,
  131. .slave = &omap44xx_l3_instr_hwmod,
  132. .clk = "l3_div_ck",
  133. .user = OCP_USER_MPU | OCP_USER_SDMA,
  134. };
  135. /* l3_instr slave ports */
  136. static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
  137. &omap44xx_l3_main_3__l3_instr,
  138. };
  139. static struct omap_hwmod omap44xx_l3_instr_hwmod = {
  140. .name = "l3_instr",
  141. .class = &omap44xx_l3_hwmod_class,
  142. .slaves = omap44xx_l3_instr_slaves,
  143. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
  144. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  145. };
  146. /* l3_main_2 -> l3_main_1 */
  147. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
  148. .master = &omap44xx_l3_main_2_hwmod,
  149. .slave = &omap44xx_l3_main_1_hwmod,
  150. .clk = "l3_div_ck",
  151. .user = OCP_USER_MPU | OCP_USER_SDMA,
  152. };
  153. /* l4_cfg -> l3_main_1 */
  154. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
  155. .master = &omap44xx_l4_cfg_hwmod,
  156. .slave = &omap44xx_l3_main_1_hwmod,
  157. .clk = "l4_div_ck",
  158. .user = OCP_USER_MPU | OCP_USER_SDMA,
  159. };
  160. /* mpu -> l3_main_1 */
  161. static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
  162. .master = &omap44xx_mpu_hwmod,
  163. .slave = &omap44xx_l3_main_1_hwmod,
  164. .clk = "l3_div_ck",
  165. .user = OCP_USER_MPU | OCP_USER_SDMA,
  166. };
  167. /* l3_main_1 slave ports */
  168. static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
  169. &omap44xx_l3_main_2__l3_main_1,
  170. &omap44xx_l4_cfg__l3_main_1,
  171. &omap44xx_mpu__l3_main_1,
  172. };
  173. static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
  174. .name = "l3_main_1",
  175. .class = &omap44xx_l3_hwmod_class,
  176. .slaves = omap44xx_l3_main_1_slaves,
  177. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
  178. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  179. };
  180. /* l3_main_2 interface data */
  181. /* l3_main_1 -> l3_main_2 */
  182. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
  183. .master = &omap44xx_l3_main_1_hwmod,
  184. .slave = &omap44xx_l3_main_2_hwmod,
  185. .clk = "l3_div_ck",
  186. .user = OCP_USER_MPU | OCP_USER_SDMA,
  187. };
  188. /* l4_cfg -> l3_main_2 */
  189. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
  190. .master = &omap44xx_l4_cfg_hwmod,
  191. .slave = &omap44xx_l3_main_2_hwmod,
  192. .clk = "l4_div_ck",
  193. .user = OCP_USER_MPU | OCP_USER_SDMA,
  194. };
  195. /* l3_main_2 slave ports */
  196. static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
  197. &omap44xx_l3_main_1__l3_main_2,
  198. &omap44xx_l4_cfg__l3_main_2,
  199. };
  200. static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
  201. .name = "l3_main_2",
  202. .class = &omap44xx_l3_hwmod_class,
  203. .slaves = omap44xx_l3_main_2_slaves,
  204. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
  205. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  206. };
  207. /* l3_main_3 interface data */
  208. /* l3_main_1 -> l3_main_3 */
  209. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
  210. .master = &omap44xx_l3_main_1_hwmod,
  211. .slave = &omap44xx_l3_main_3_hwmod,
  212. .clk = "l3_div_ck",
  213. .user = OCP_USER_MPU | OCP_USER_SDMA,
  214. };
  215. /* l3_main_2 -> l3_main_3 */
  216. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
  217. .master = &omap44xx_l3_main_2_hwmod,
  218. .slave = &omap44xx_l3_main_3_hwmod,
  219. .clk = "l3_div_ck",
  220. .user = OCP_USER_MPU | OCP_USER_SDMA,
  221. };
  222. /* l4_cfg -> l3_main_3 */
  223. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
  224. .master = &omap44xx_l4_cfg_hwmod,
  225. .slave = &omap44xx_l3_main_3_hwmod,
  226. .clk = "l4_div_ck",
  227. .user = OCP_USER_MPU | OCP_USER_SDMA,
  228. };
  229. /* l3_main_3 slave ports */
  230. static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
  231. &omap44xx_l3_main_1__l3_main_3,
  232. &omap44xx_l3_main_2__l3_main_3,
  233. &omap44xx_l4_cfg__l3_main_3,
  234. };
  235. static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
  236. .name = "l3_main_3",
  237. .class = &omap44xx_l3_hwmod_class,
  238. .slaves = omap44xx_l3_main_3_slaves,
  239. .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
  240. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  241. };
  242. /*
  243. * 'l4' class
  244. * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
  245. */
  246. static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
  247. .name = "l4",
  248. };
  249. /* l4_abe interface data */
  250. /* l3_main_1 -> l4_abe */
  251. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
  252. .master = &omap44xx_l3_main_1_hwmod,
  253. .slave = &omap44xx_l4_abe_hwmod,
  254. .clk = "l3_div_ck",
  255. .user = OCP_USER_MPU | OCP_USER_SDMA,
  256. };
  257. /* mpu -> l4_abe */
  258. static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
  259. .master = &omap44xx_mpu_hwmod,
  260. .slave = &omap44xx_l4_abe_hwmod,
  261. .clk = "ocp_abe_iclk",
  262. .user = OCP_USER_MPU | OCP_USER_SDMA,
  263. };
  264. /* l4_abe slave ports */
  265. static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
  266. &omap44xx_l3_main_1__l4_abe,
  267. &omap44xx_mpu__l4_abe,
  268. };
  269. static struct omap_hwmod omap44xx_l4_abe_hwmod = {
  270. .name = "l4_abe",
  271. .class = &omap44xx_l4_hwmod_class,
  272. .slaves = omap44xx_l4_abe_slaves,
  273. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
  274. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  275. };
  276. /* l4_cfg interface data */
  277. /* l3_main_1 -> l4_cfg */
  278. static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
  279. .master = &omap44xx_l3_main_1_hwmod,
  280. .slave = &omap44xx_l4_cfg_hwmod,
  281. .clk = "l3_div_ck",
  282. .user = OCP_USER_MPU | OCP_USER_SDMA,
  283. };
  284. /* l4_cfg slave ports */
  285. static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
  286. &omap44xx_l3_main_1__l4_cfg,
  287. };
  288. static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
  289. .name = "l4_cfg",
  290. .class = &omap44xx_l4_hwmod_class,
  291. .slaves = omap44xx_l4_cfg_slaves,
  292. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
  293. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  294. };
  295. /* l4_per interface data */
  296. /* l3_main_2 -> l4_per */
  297. static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
  298. .master = &omap44xx_l3_main_2_hwmod,
  299. .slave = &omap44xx_l4_per_hwmod,
  300. .clk = "l3_div_ck",
  301. .user = OCP_USER_MPU | OCP_USER_SDMA,
  302. };
  303. /* l4_per slave ports */
  304. static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
  305. &omap44xx_l3_main_2__l4_per,
  306. };
  307. static struct omap_hwmod omap44xx_l4_per_hwmod = {
  308. .name = "l4_per",
  309. .class = &omap44xx_l4_hwmod_class,
  310. .slaves = omap44xx_l4_per_slaves,
  311. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
  312. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  313. };
  314. /* l4_wkup interface data */
  315. /* l4_cfg -> l4_wkup */
  316. static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
  317. .master = &omap44xx_l4_cfg_hwmod,
  318. .slave = &omap44xx_l4_wkup_hwmod,
  319. .clk = "l4_div_ck",
  320. .user = OCP_USER_MPU | OCP_USER_SDMA,
  321. };
  322. /* l4_wkup slave ports */
  323. static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
  324. &omap44xx_l4_cfg__l4_wkup,
  325. };
  326. static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
  327. .name = "l4_wkup",
  328. .class = &omap44xx_l4_hwmod_class,
  329. .slaves = omap44xx_l4_wkup_slaves,
  330. .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
  331. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  332. };
  333. /*
  334. * 'mpu_bus' class
  335. * instance(s): mpu_private
  336. */
  337. static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
  338. .name = "mpu_bus",
  339. };
  340. /* mpu_private interface data */
  341. /* mpu -> mpu_private */
  342. static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
  343. .master = &omap44xx_mpu_hwmod,
  344. .slave = &omap44xx_mpu_private_hwmod,
  345. .clk = "l3_div_ck",
  346. .user = OCP_USER_MPU | OCP_USER_SDMA,
  347. };
  348. /* mpu_private slave ports */
  349. static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
  350. &omap44xx_mpu__mpu_private,
  351. };
  352. static struct omap_hwmod omap44xx_mpu_private_hwmod = {
  353. .name = "mpu_private",
  354. .class = &omap44xx_mpu_bus_hwmod_class,
  355. .slaves = omap44xx_mpu_private_slaves,
  356. .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
  357. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  358. };
  359. /*
  360. * 'mpu' class
  361. * mpu sub-system
  362. */
  363. static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
  364. .name = "mpu",
  365. };
  366. /* mpu */
  367. static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
  368. { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
  369. { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
  370. { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
  371. };
  372. /* mpu master ports */
  373. static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
  374. &omap44xx_mpu__l3_main_1,
  375. &omap44xx_mpu__l4_abe,
  376. &omap44xx_mpu__dmm,
  377. };
  378. static struct omap_hwmod omap44xx_mpu_hwmod = {
  379. .name = "mpu",
  380. .class = &omap44xx_mpu_hwmod_class,
  381. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  382. .mpu_irqs = omap44xx_mpu_irqs,
  383. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs),
  384. .main_clk = "dpll_mpu_m2_ck",
  385. .prcm = {
  386. .omap4 = {
  387. .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL,
  388. },
  389. },
  390. .masters = omap44xx_mpu_masters,
  391. .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
  392. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  393. };
  394. /*
  395. * 'wd_timer' class
  396. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  397. * overflow condition
  398. */
  399. static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
  400. .rev_offs = 0x0000,
  401. .sysc_offs = 0x0010,
  402. .syss_offs = 0x0014,
  403. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  404. SYSC_HAS_SOFTRESET),
  405. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  406. .sysc_fields = &omap_hwmod_sysc_type1,
  407. };
  408. /*
  409. * 'uart' class
  410. * universal asynchronous receiver/transmitter (uart)
  411. */
  412. static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
  413. .rev_offs = 0x0050,
  414. .sysc_offs = 0x0054,
  415. .syss_offs = 0x0058,
  416. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  417. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  418. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  419. .sysc_fields = &omap_hwmod_sysc_type1,
  420. };
  421. static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
  422. .name = "wd_timer",
  423. .sysc = &omap44xx_wd_timer_sysc,
  424. };
  425. /* wd_timer2 */
  426. static struct omap_hwmod omap44xx_wd_timer2_hwmod;
  427. static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
  428. { .irq = 80 + OMAP44XX_IRQ_GIC_START },
  429. };
  430. static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
  431. {
  432. .pa_start = 0x4a314000,
  433. .pa_end = 0x4a31407f,
  434. .flags = ADDR_TYPE_RT
  435. },
  436. };
  437. static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
  438. .name = "uart",
  439. .sysc = &omap44xx_uart_sysc,
  440. };
  441. /* uart1 */
  442. static struct omap_hwmod omap44xx_uart1_hwmod;
  443. static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
  444. { .irq = 72 + OMAP44XX_IRQ_GIC_START },
  445. };
  446. static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
  447. { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
  448. { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
  449. };
  450. static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
  451. {
  452. .pa_start = 0x4806a000,
  453. .pa_end = 0x4806a0ff,
  454. .flags = ADDR_TYPE_RT
  455. },
  456. };
  457. /* l4_per -> uart1 */
  458. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
  459. .master = &omap44xx_l4_per_hwmod,
  460. .slave = &omap44xx_uart1_hwmod,
  461. .clk = "l4_div_ck",
  462. .addr = omap44xx_uart1_addrs,
  463. .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs),
  464. .user = OCP_USER_MPU | OCP_USER_SDMA,
  465. };
  466. /* uart1 slave ports */
  467. static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
  468. &omap44xx_l4_per__uart1,
  469. };
  470. static struct omap_hwmod omap44xx_uart1_hwmod = {
  471. .name = "uart1",
  472. .class = &omap44xx_uart_hwmod_class,
  473. .mpu_irqs = omap44xx_uart1_irqs,
  474. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs),
  475. .sdma_reqs = omap44xx_uart1_sdma_reqs,
  476. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
  477. .main_clk = "uart1_fck",
  478. .prcm = {
  479. .omap4 = {
  480. .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
  481. },
  482. },
  483. .slaves = omap44xx_uart1_slaves,
  484. .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
  485. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  486. };
  487. /* uart2 */
  488. static struct omap_hwmod omap44xx_uart2_hwmod;
  489. static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
  490. { .irq = 73 + OMAP44XX_IRQ_GIC_START },
  491. };
  492. static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
  493. { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
  494. { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
  495. };
  496. static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
  497. {
  498. .pa_start = 0x4806c000,
  499. .pa_end = 0x4806c0ff,
  500. .flags = ADDR_TYPE_RT
  501. },
  502. };
  503. /* l4_wkup -> wd_timer2 */
  504. static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
  505. .master = &omap44xx_l4_wkup_hwmod,
  506. .slave = &omap44xx_wd_timer2_hwmod,
  507. .clk = "l4_wkup_clk_mux_ck",
  508. .addr = omap44xx_wd_timer2_addrs,
  509. .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs),
  510. .user = OCP_USER_MPU | OCP_USER_SDMA,
  511. };
  512. /* wd_timer2 slave ports */
  513. static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
  514. &omap44xx_l4_wkup__wd_timer2,
  515. };
  516. static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
  517. .name = "wd_timer2",
  518. .class = &omap44xx_wd_timer_hwmod_class,
  519. .mpu_irqs = omap44xx_wd_timer2_irqs,
  520. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs),
  521. .main_clk = "wd_timer2_fck",
  522. .prcm = {
  523. .omap4 = {
  524. .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
  525. },
  526. },
  527. .slaves = omap44xx_wd_timer2_slaves,
  528. .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
  529. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  530. };
  531. /* wd_timer3 */
  532. static struct omap_hwmod omap44xx_wd_timer3_hwmod;
  533. static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
  534. { .irq = 36 + OMAP44XX_IRQ_GIC_START },
  535. };
  536. static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
  537. {
  538. .pa_start = 0x40130000,
  539. .pa_end = 0x4013007f,
  540. .flags = ADDR_TYPE_RT
  541. },
  542. };
  543. /* l4_per -> uart2 */
  544. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
  545. .master = &omap44xx_l4_per_hwmod,
  546. .slave = &omap44xx_uart2_hwmod,
  547. .clk = "l4_div_ck",
  548. .addr = omap44xx_uart2_addrs,
  549. .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs),
  550. .user = OCP_USER_MPU | OCP_USER_SDMA,
  551. };
  552. /* uart2 slave ports */
  553. static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
  554. &omap44xx_l4_per__uart2,
  555. };
  556. static struct omap_hwmod omap44xx_uart2_hwmod = {
  557. .name = "uart2",
  558. .class = &omap44xx_uart_hwmod_class,
  559. .mpu_irqs = omap44xx_uart2_irqs,
  560. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs),
  561. .sdma_reqs = omap44xx_uart2_sdma_reqs,
  562. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
  563. .main_clk = "uart2_fck",
  564. .prcm = {
  565. .omap4 = {
  566. .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
  567. },
  568. },
  569. .slaves = omap44xx_uart2_slaves,
  570. .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
  571. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  572. };
  573. /* uart3 */
  574. static struct omap_hwmod omap44xx_uart3_hwmod;
  575. static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
  576. { .irq = 74 + OMAP44XX_IRQ_GIC_START },
  577. };
  578. static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
  579. { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
  580. { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
  581. };
  582. static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
  583. {
  584. .pa_start = 0x48020000,
  585. .pa_end = 0x480200ff,
  586. .flags = ADDR_TYPE_RT
  587. },
  588. };
  589. /* l4_abe -> wd_timer3 */
  590. static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
  591. .master = &omap44xx_l4_abe_hwmod,
  592. .slave = &omap44xx_wd_timer3_hwmod,
  593. .clk = "ocp_abe_iclk",
  594. .addr = omap44xx_wd_timer3_addrs,
  595. .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs),
  596. .user = OCP_USER_MPU,
  597. };
  598. /* l4_abe -> wd_timer3 (dma) */
  599. static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
  600. {
  601. .pa_start = 0x49030000,
  602. .pa_end = 0x4903007f,
  603. .flags = ADDR_TYPE_RT
  604. },
  605. };
  606. /* l4_per -> uart3 */
  607. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
  608. .master = &omap44xx_l4_per_hwmod,
  609. .slave = &omap44xx_uart3_hwmod,
  610. .clk = "l4_div_ck",
  611. .addr = omap44xx_uart3_addrs,
  612. .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs),
  613. .user = OCP_USER_MPU | OCP_USER_SDMA,
  614. };
  615. /* uart3 slave ports */
  616. static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
  617. &omap44xx_l4_per__uart3,
  618. };
  619. static struct omap_hwmod omap44xx_uart3_hwmod = {
  620. .name = "uart3",
  621. .class = &omap44xx_uart_hwmod_class,
  622. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  623. .mpu_irqs = omap44xx_uart3_irqs,
  624. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs),
  625. .sdma_reqs = omap44xx_uart3_sdma_reqs,
  626. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
  627. .main_clk = "uart3_fck",
  628. .prcm = {
  629. .omap4 = {
  630. .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
  631. },
  632. },
  633. .slaves = omap44xx_uart3_slaves,
  634. .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
  635. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  636. };
  637. /* uart4 */
  638. static struct omap_hwmod omap44xx_uart4_hwmod;
  639. static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
  640. { .irq = 70 + OMAP44XX_IRQ_GIC_START },
  641. };
  642. static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
  643. { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
  644. { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
  645. };
  646. static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
  647. {
  648. .pa_start = 0x4806e000,
  649. .pa_end = 0x4806e0ff,
  650. .flags = ADDR_TYPE_RT
  651. },
  652. };
  653. static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
  654. .master = &omap44xx_l4_abe_hwmod,
  655. .slave = &omap44xx_wd_timer3_hwmod,
  656. .clk = "ocp_abe_iclk",
  657. .addr = omap44xx_wd_timer3_dma_addrs,
  658. .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs),
  659. .user = OCP_USER_SDMA,
  660. };
  661. /* wd_timer3 slave ports */
  662. static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
  663. &omap44xx_l4_abe__wd_timer3,
  664. &omap44xx_l4_abe__wd_timer3_dma,
  665. };
  666. static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
  667. .name = "wd_timer3",
  668. .class = &omap44xx_wd_timer_hwmod_class,
  669. .mpu_irqs = omap44xx_wd_timer3_irqs,
  670. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs),
  671. .main_clk = "wd_timer3_fck",
  672. .prcm = {
  673. .omap4 = {
  674. .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
  675. },
  676. },
  677. .slaves = omap44xx_wd_timer3_slaves,
  678. .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
  679. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  680. };
  681. /* l4_per -> uart4 */
  682. static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
  683. .master = &omap44xx_l4_per_hwmod,
  684. .slave = &omap44xx_uart4_hwmod,
  685. .clk = "l4_div_ck",
  686. .addr = omap44xx_uart4_addrs,
  687. .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs),
  688. .user = OCP_USER_MPU | OCP_USER_SDMA,
  689. };
  690. /* uart4 slave ports */
  691. static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
  692. &omap44xx_l4_per__uart4,
  693. };
  694. static struct omap_hwmod omap44xx_uart4_hwmod = {
  695. .name = "uart4",
  696. .class = &omap44xx_uart_hwmod_class,
  697. .mpu_irqs = omap44xx_uart4_irqs,
  698. .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs),
  699. .sdma_reqs = omap44xx_uart4_sdma_reqs,
  700. .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
  701. .main_clk = "uart4_fck",
  702. .prcm = {
  703. .omap4 = {
  704. .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
  705. },
  706. },
  707. .slaves = omap44xx_uart4_slaves,
  708. .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
  709. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  710. };
  711. static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
  712. /* dmm class */
  713. &omap44xx_dmm_hwmod,
  714. /* emif_fw class */
  715. &omap44xx_emif_fw_hwmod,
  716. /* l3 class */
  717. &omap44xx_l3_instr_hwmod,
  718. &omap44xx_l3_main_1_hwmod,
  719. &omap44xx_l3_main_2_hwmod,
  720. &omap44xx_l3_main_3_hwmod,
  721. /* l4 class */
  722. &omap44xx_l4_abe_hwmod,
  723. &omap44xx_l4_cfg_hwmod,
  724. &omap44xx_l4_per_hwmod,
  725. &omap44xx_l4_wkup_hwmod,
  726. /* mpu_bus class */
  727. &omap44xx_mpu_private_hwmod,
  728. /* mpu class */
  729. &omap44xx_mpu_hwmod,
  730. /* wd_timer class */
  731. &omap44xx_wd_timer2_hwmod,
  732. &omap44xx_wd_timer3_hwmod,
  733. /* uart class */
  734. &omap44xx_uart1_hwmod,
  735. &omap44xx_uart2_hwmod,
  736. &omap44xx_uart3_hwmod,
  737. &omap44xx_uart4_hwmod,
  738. NULL,
  739. };
  740. int __init omap44xx_hwmod_init(void)
  741. {
  742. return omap_hwmod_init(omap44xx_hwmods);
  743. }