clockdomains7xx_data.c 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. /*
  2. * DRA7xx Clock domains framework
  3. *
  4. * Copyright (C) 2009-2013 Texas Instruments, Inc.
  5. * Copyright (C) 2009-2011 Nokia Corporation
  6. *
  7. * Generated by code originally written by:
  8. * Abhijit Pagare (abhijitpagare@ti.com)
  9. * Benoit Cousson (b-cousson@ti.com)
  10. * Paul Walmsley (paul@pwsan.com)
  11. *
  12. * This file is automatically generated from the OMAP hardware databases.
  13. * We respectfully ask that any modifications to this file be coordinated
  14. * with the public linux-omap@vger.kernel.org mailing list and the
  15. * authors above to ensure that the autogeneration scripts are kept
  16. * up-to-date with the file contents.
  17. *
  18. * This program is free software; you can redistribute it and/or modify
  19. * it under the terms of the GNU General Public License version 2 as
  20. * published by the Free Software Foundation.
  21. */
  22. #include <linux/kernel.h>
  23. #include <linux/io.h>
  24. #include "clockdomain.h"
  25. #include "cm1_7xx.h"
  26. #include "cm2_7xx.h"
  27. #include "cm-regbits-7xx.h"
  28. #include "prm7xx.h"
  29. #include "prcm44xx.h"
  30. #include "prcm_mpu7xx.h"
  31. /* Static Dependencies for DRA7xx Clock Domains */
  32. static struct clkdm_dep cam_wkup_sleep_deps[] = {
  33. { .clkdm_name = "emif_clkdm" },
  34. { NULL },
  35. };
  36. static struct clkdm_dep dma_wkup_sleep_deps[] = {
  37. { .clkdm_name = "dss_clkdm" },
  38. { .clkdm_name = "emif_clkdm" },
  39. { .clkdm_name = "ipu_clkdm" },
  40. { .clkdm_name = "ipu1_clkdm" },
  41. { .clkdm_name = "ipu2_clkdm" },
  42. { .clkdm_name = "iva_clkdm" },
  43. { .clkdm_name = "l3init_clkdm" },
  44. { .clkdm_name = "l4cfg_clkdm" },
  45. { .clkdm_name = "l4per_clkdm" },
  46. { .clkdm_name = "l4per2_clkdm" },
  47. { .clkdm_name = "l4per3_clkdm" },
  48. { .clkdm_name = "l4sec_clkdm" },
  49. { .clkdm_name = "pcie_clkdm" },
  50. { .clkdm_name = "wkupaon_clkdm" },
  51. { NULL },
  52. };
  53. static struct clkdm_dep dsp1_wkup_sleep_deps[] = {
  54. { .clkdm_name = "atl_clkdm" },
  55. { .clkdm_name = "cam_clkdm" },
  56. { .clkdm_name = "dsp2_clkdm" },
  57. { .clkdm_name = "dss_clkdm" },
  58. { .clkdm_name = "emif_clkdm" },
  59. { .clkdm_name = "eve1_clkdm" },
  60. { .clkdm_name = "eve2_clkdm" },
  61. { .clkdm_name = "eve3_clkdm" },
  62. { .clkdm_name = "eve4_clkdm" },
  63. { .clkdm_name = "gmac_clkdm" },
  64. { .clkdm_name = "gpu_clkdm" },
  65. { .clkdm_name = "ipu_clkdm" },
  66. { .clkdm_name = "ipu1_clkdm" },
  67. { .clkdm_name = "ipu2_clkdm" },
  68. { .clkdm_name = "iva_clkdm" },
  69. { .clkdm_name = "l3init_clkdm" },
  70. { .clkdm_name = "l4per_clkdm" },
  71. { .clkdm_name = "l4per2_clkdm" },
  72. { .clkdm_name = "l4per3_clkdm" },
  73. { .clkdm_name = "l4sec_clkdm" },
  74. { .clkdm_name = "pcie_clkdm" },
  75. { .clkdm_name = "vpe_clkdm" },
  76. { .clkdm_name = "wkupaon_clkdm" },
  77. { NULL },
  78. };
  79. static struct clkdm_dep dsp2_wkup_sleep_deps[] = {
  80. { .clkdm_name = "atl_clkdm" },
  81. { .clkdm_name = "cam_clkdm" },
  82. { .clkdm_name = "dsp1_clkdm" },
  83. { .clkdm_name = "dss_clkdm" },
  84. { .clkdm_name = "emif_clkdm" },
  85. { .clkdm_name = "eve1_clkdm" },
  86. { .clkdm_name = "eve2_clkdm" },
  87. { .clkdm_name = "eve3_clkdm" },
  88. { .clkdm_name = "eve4_clkdm" },
  89. { .clkdm_name = "gmac_clkdm" },
  90. { .clkdm_name = "gpu_clkdm" },
  91. { .clkdm_name = "ipu_clkdm" },
  92. { .clkdm_name = "ipu1_clkdm" },
  93. { .clkdm_name = "ipu2_clkdm" },
  94. { .clkdm_name = "iva_clkdm" },
  95. { .clkdm_name = "l3init_clkdm" },
  96. { .clkdm_name = "l4per_clkdm" },
  97. { .clkdm_name = "l4per2_clkdm" },
  98. { .clkdm_name = "l4per3_clkdm" },
  99. { .clkdm_name = "l4sec_clkdm" },
  100. { .clkdm_name = "pcie_clkdm" },
  101. { .clkdm_name = "vpe_clkdm" },
  102. { .clkdm_name = "wkupaon_clkdm" },
  103. { NULL },
  104. };
  105. static struct clkdm_dep dss_wkup_sleep_deps[] = {
  106. { .clkdm_name = "emif_clkdm" },
  107. { .clkdm_name = "iva_clkdm" },
  108. { NULL },
  109. };
  110. static struct clkdm_dep eve1_wkup_sleep_deps[] = {
  111. { .clkdm_name = "emif_clkdm" },
  112. { .clkdm_name = "eve2_clkdm" },
  113. { .clkdm_name = "eve3_clkdm" },
  114. { .clkdm_name = "eve4_clkdm" },
  115. { .clkdm_name = "iva_clkdm" },
  116. { NULL },
  117. };
  118. static struct clkdm_dep eve2_wkup_sleep_deps[] = {
  119. { .clkdm_name = "emif_clkdm" },
  120. { .clkdm_name = "eve1_clkdm" },
  121. { .clkdm_name = "eve3_clkdm" },
  122. { .clkdm_name = "eve4_clkdm" },
  123. { .clkdm_name = "iva_clkdm" },
  124. { NULL },
  125. };
  126. static struct clkdm_dep eve3_wkup_sleep_deps[] = {
  127. { .clkdm_name = "emif_clkdm" },
  128. { .clkdm_name = "eve1_clkdm" },
  129. { .clkdm_name = "eve2_clkdm" },
  130. { .clkdm_name = "eve4_clkdm" },
  131. { .clkdm_name = "iva_clkdm" },
  132. { NULL },
  133. };
  134. static struct clkdm_dep eve4_wkup_sleep_deps[] = {
  135. { .clkdm_name = "emif_clkdm" },
  136. { .clkdm_name = "eve1_clkdm" },
  137. { .clkdm_name = "eve2_clkdm" },
  138. { .clkdm_name = "eve3_clkdm" },
  139. { .clkdm_name = "iva_clkdm" },
  140. { NULL },
  141. };
  142. static struct clkdm_dep gmac_wkup_sleep_deps[] = {
  143. { .clkdm_name = "emif_clkdm" },
  144. { .clkdm_name = "l4per2_clkdm" },
  145. { NULL },
  146. };
  147. static struct clkdm_dep gpu_wkup_sleep_deps[] = {
  148. { .clkdm_name = "emif_clkdm" },
  149. { .clkdm_name = "iva_clkdm" },
  150. { NULL },
  151. };
  152. static struct clkdm_dep ipu1_wkup_sleep_deps[] = {
  153. { .clkdm_name = "atl_clkdm" },
  154. { .clkdm_name = "dsp1_clkdm" },
  155. { .clkdm_name = "dsp2_clkdm" },
  156. { .clkdm_name = "dss_clkdm" },
  157. { .clkdm_name = "emif_clkdm" },
  158. { .clkdm_name = "eve1_clkdm" },
  159. { .clkdm_name = "eve2_clkdm" },
  160. { .clkdm_name = "eve3_clkdm" },
  161. { .clkdm_name = "eve4_clkdm" },
  162. { .clkdm_name = "gmac_clkdm" },
  163. { .clkdm_name = "gpu_clkdm" },
  164. { .clkdm_name = "ipu_clkdm" },
  165. { .clkdm_name = "ipu2_clkdm" },
  166. { .clkdm_name = "iva_clkdm" },
  167. { .clkdm_name = "l3init_clkdm" },
  168. { .clkdm_name = "l3main1_clkdm" },
  169. { .clkdm_name = "l4cfg_clkdm" },
  170. { .clkdm_name = "l4per_clkdm" },
  171. { .clkdm_name = "l4per2_clkdm" },
  172. { .clkdm_name = "l4per3_clkdm" },
  173. { .clkdm_name = "l4sec_clkdm" },
  174. { .clkdm_name = "pcie_clkdm" },
  175. { .clkdm_name = "vpe_clkdm" },
  176. { .clkdm_name = "wkupaon_clkdm" },
  177. { NULL },
  178. };
  179. static struct clkdm_dep ipu2_wkup_sleep_deps[] = {
  180. { .clkdm_name = "atl_clkdm" },
  181. { .clkdm_name = "dsp1_clkdm" },
  182. { .clkdm_name = "dsp2_clkdm" },
  183. { .clkdm_name = "dss_clkdm" },
  184. { .clkdm_name = "emif_clkdm" },
  185. { .clkdm_name = "eve1_clkdm" },
  186. { .clkdm_name = "eve2_clkdm" },
  187. { .clkdm_name = "eve3_clkdm" },
  188. { .clkdm_name = "eve4_clkdm" },
  189. { .clkdm_name = "gmac_clkdm" },
  190. { .clkdm_name = "gpu_clkdm" },
  191. { .clkdm_name = "ipu_clkdm" },
  192. { .clkdm_name = "ipu1_clkdm" },
  193. { .clkdm_name = "iva_clkdm" },
  194. { .clkdm_name = "l3init_clkdm" },
  195. { .clkdm_name = "l3main1_clkdm" },
  196. { .clkdm_name = "l4cfg_clkdm" },
  197. { .clkdm_name = "l4per_clkdm" },
  198. { .clkdm_name = "l4per2_clkdm" },
  199. { .clkdm_name = "l4per3_clkdm" },
  200. { .clkdm_name = "l4sec_clkdm" },
  201. { .clkdm_name = "pcie_clkdm" },
  202. { .clkdm_name = "vpe_clkdm" },
  203. { .clkdm_name = "wkupaon_clkdm" },
  204. { NULL },
  205. };
  206. static struct clkdm_dep iva_wkup_sleep_deps[] = {
  207. { .clkdm_name = "emif_clkdm" },
  208. { NULL },
  209. };
  210. static struct clkdm_dep l3init_wkup_sleep_deps[] = {
  211. { .clkdm_name = "emif_clkdm" },
  212. { .clkdm_name = "iva_clkdm" },
  213. { .clkdm_name = "l4cfg_clkdm" },
  214. { .clkdm_name = "l4per_clkdm" },
  215. { .clkdm_name = "l4per3_clkdm" },
  216. { .clkdm_name = "l4sec_clkdm" },
  217. { .clkdm_name = "wkupaon_clkdm" },
  218. { NULL },
  219. };
  220. static struct clkdm_dep l4per2_wkup_sleep_deps[] = {
  221. { .clkdm_name = "dsp1_clkdm" },
  222. { .clkdm_name = "dsp2_clkdm" },
  223. { .clkdm_name = "ipu1_clkdm" },
  224. { .clkdm_name = "ipu2_clkdm" },
  225. { NULL },
  226. };
  227. static struct clkdm_dep l4sec_wkup_sleep_deps[] = {
  228. { .clkdm_name = "emif_clkdm" },
  229. { .clkdm_name = "l4per_clkdm" },
  230. { NULL },
  231. };
  232. static struct clkdm_dep mpu_wkup_sleep_deps[] = {
  233. { .clkdm_name = "cam_clkdm" },
  234. { .clkdm_name = "dsp1_clkdm" },
  235. { .clkdm_name = "dsp2_clkdm" },
  236. { .clkdm_name = "dss_clkdm" },
  237. { .clkdm_name = "emif_clkdm" },
  238. { .clkdm_name = "eve1_clkdm" },
  239. { .clkdm_name = "eve2_clkdm" },
  240. { .clkdm_name = "eve3_clkdm" },
  241. { .clkdm_name = "eve4_clkdm" },
  242. { .clkdm_name = "gmac_clkdm" },
  243. { .clkdm_name = "gpu_clkdm" },
  244. { .clkdm_name = "ipu_clkdm" },
  245. { .clkdm_name = "ipu1_clkdm" },
  246. { .clkdm_name = "ipu2_clkdm" },
  247. { .clkdm_name = "iva_clkdm" },
  248. { .clkdm_name = "l3init_clkdm" },
  249. { .clkdm_name = "l3main1_clkdm" },
  250. { .clkdm_name = "l4cfg_clkdm" },
  251. { .clkdm_name = "l4per_clkdm" },
  252. { .clkdm_name = "l4per2_clkdm" },
  253. { .clkdm_name = "l4per3_clkdm" },
  254. { .clkdm_name = "l4sec_clkdm" },
  255. { .clkdm_name = "pcie_clkdm" },
  256. { .clkdm_name = "vpe_clkdm" },
  257. { .clkdm_name = "wkupaon_clkdm" },
  258. { NULL },
  259. };
  260. static struct clkdm_dep pcie_wkup_sleep_deps[] = {
  261. { .clkdm_name = "atl_clkdm" },
  262. { .clkdm_name = "cam_clkdm" },
  263. { .clkdm_name = "dsp1_clkdm" },
  264. { .clkdm_name = "dsp2_clkdm" },
  265. { .clkdm_name = "dss_clkdm" },
  266. { .clkdm_name = "emif_clkdm" },
  267. { .clkdm_name = "eve1_clkdm" },
  268. { .clkdm_name = "eve2_clkdm" },
  269. { .clkdm_name = "eve3_clkdm" },
  270. { .clkdm_name = "eve4_clkdm" },
  271. { .clkdm_name = "gmac_clkdm" },
  272. { .clkdm_name = "gpu_clkdm" },
  273. { .clkdm_name = "ipu_clkdm" },
  274. { .clkdm_name = "ipu1_clkdm" },
  275. { .clkdm_name = "iva_clkdm" },
  276. { .clkdm_name = "l3init_clkdm" },
  277. { .clkdm_name = "l4cfg_clkdm" },
  278. { .clkdm_name = "l4per_clkdm" },
  279. { .clkdm_name = "l4per2_clkdm" },
  280. { .clkdm_name = "l4per3_clkdm" },
  281. { .clkdm_name = "l4sec_clkdm" },
  282. { .clkdm_name = "vpe_clkdm" },
  283. { NULL },
  284. };
  285. static struct clkdm_dep vpe_wkup_sleep_deps[] = {
  286. { .clkdm_name = "emif_clkdm" },
  287. { .clkdm_name = "l4per3_clkdm" },
  288. { NULL },
  289. };
  290. static struct clockdomain l4per3_7xx_clkdm = {
  291. .name = "l4per3_clkdm",
  292. .pwrdm = { .name = "l4per_pwrdm" },
  293. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  294. .cm_inst = DRA7XX_CM_CORE_L4PER_INST,
  295. .clkdm_offs = DRA7XX_CM_CORE_L4PER_L4PER3_CDOFFS,
  296. .dep_bit = DRA7XX_L4PER3_STATDEP_SHIFT,
  297. .flags = CLKDM_CAN_HWSUP_SWSUP,
  298. };
  299. static struct clockdomain l4per2_7xx_clkdm = {
  300. .name = "l4per2_clkdm",
  301. .pwrdm = { .name = "l4per_pwrdm" },
  302. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  303. .cm_inst = DRA7XX_CM_CORE_L4PER_INST,
  304. .clkdm_offs = DRA7XX_CM_CORE_L4PER_L4PER2_CDOFFS,
  305. .dep_bit = DRA7XX_L4PER2_STATDEP_SHIFT,
  306. .wkdep_srcs = l4per2_wkup_sleep_deps,
  307. .sleepdep_srcs = l4per2_wkup_sleep_deps,
  308. .flags = CLKDM_CAN_SWSUP,
  309. };
  310. static struct clockdomain mpu0_7xx_clkdm = {
  311. .name = "mpu0_clkdm",
  312. .pwrdm = { .name = "cpu0_pwrdm" },
  313. .prcm_partition = DRA7XX_MPU_PRCM_PARTITION,
  314. .cm_inst = DRA7XX_MPU_PRCM_CM_C0_INST,
  315. .clkdm_offs = DRA7XX_MPU_PRCM_CM_C0_CPU0_CDOFFS,
  316. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  317. };
  318. static struct clockdomain iva_7xx_clkdm = {
  319. .name = "iva_clkdm",
  320. .pwrdm = { .name = "iva_pwrdm" },
  321. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  322. .cm_inst = DRA7XX_CM_CORE_IVA_INST,
  323. .clkdm_offs = DRA7XX_CM_CORE_IVA_IVA_CDOFFS,
  324. .dep_bit = DRA7XX_IVA_STATDEP_SHIFT,
  325. .wkdep_srcs = iva_wkup_sleep_deps,
  326. .sleepdep_srcs = iva_wkup_sleep_deps,
  327. .flags = CLKDM_CAN_HWSUP_SWSUP,
  328. };
  329. static struct clockdomain coreaon_7xx_clkdm = {
  330. .name = "coreaon_clkdm",
  331. .pwrdm = { .name = "coreaon_pwrdm" },
  332. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  333. .cm_inst = DRA7XX_CM_CORE_COREAON_INST,
  334. .clkdm_offs = DRA7XX_CM_CORE_COREAON_COREAON_CDOFFS,
  335. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  336. };
  337. static struct clockdomain ipu1_7xx_clkdm = {
  338. .name = "ipu1_clkdm",
  339. .pwrdm = { .name = "ipu_pwrdm" },
  340. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  341. .cm_inst = DRA7XX_CM_CORE_AON_IPU_INST,
  342. .clkdm_offs = DRA7XX_CM_CORE_AON_IPU_IPU1_CDOFFS,
  343. .dep_bit = DRA7XX_IPU1_STATDEP_SHIFT,
  344. .wkdep_srcs = ipu1_wkup_sleep_deps,
  345. .sleepdep_srcs = ipu1_wkup_sleep_deps,
  346. .flags = CLKDM_CAN_HWSUP_SWSUP,
  347. };
  348. static struct clockdomain ipu2_7xx_clkdm = {
  349. .name = "ipu2_clkdm",
  350. .pwrdm = { .name = "core_pwrdm" },
  351. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  352. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  353. .clkdm_offs = DRA7XX_CM_CORE_CORE_IPU2_CDOFFS,
  354. .dep_bit = DRA7XX_IPU2_STATDEP_SHIFT,
  355. .wkdep_srcs = ipu2_wkup_sleep_deps,
  356. .sleepdep_srcs = ipu2_wkup_sleep_deps,
  357. .flags = CLKDM_CAN_HWSUP_SWSUP,
  358. };
  359. static struct clockdomain l3init_7xx_clkdm = {
  360. .name = "l3init_clkdm",
  361. .pwrdm = { .name = "l3init_pwrdm" },
  362. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  363. .cm_inst = DRA7XX_CM_CORE_L3INIT_INST,
  364. .clkdm_offs = DRA7XX_CM_CORE_L3INIT_L3INIT_CDOFFS,
  365. .dep_bit = DRA7XX_L3INIT_STATDEP_SHIFT,
  366. .wkdep_srcs = l3init_wkup_sleep_deps,
  367. .sleepdep_srcs = l3init_wkup_sleep_deps,
  368. .flags = CLKDM_CAN_HWSUP_SWSUP,
  369. };
  370. static struct clockdomain l4sec_7xx_clkdm = {
  371. .name = "l4sec_clkdm",
  372. .pwrdm = { .name = "l4per_pwrdm" },
  373. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  374. .cm_inst = DRA7XX_CM_CORE_L4PER_INST,
  375. .clkdm_offs = DRA7XX_CM_CORE_L4PER_L4SEC_CDOFFS,
  376. .dep_bit = DRA7XX_L4SEC_STATDEP_SHIFT,
  377. .wkdep_srcs = l4sec_wkup_sleep_deps,
  378. .sleepdep_srcs = l4sec_wkup_sleep_deps,
  379. .flags = CLKDM_CAN_HWSUP_SWSUP,
  380. };
  381. static struct clockdomain l3main1_7xx_clkdm = {
  382. .name = "l3main1_clkdm",
  383. .pwrdm = { .name = "core_pwrdm" },
  384. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  385. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  386. .clkdm_offs = DRA7XX_CM_CORE_CORE_L3MAIN1_CDOFFS,
  387. .dep_bit = DRA7XX_L3MAIN1_STATDEP_SHIFT,
  388. .flags = CLKDM_CAN_HWSUP,
  389. };
  390. static struct clockdomain vpe_7xx_clkdm = {
  391. .name = "vpe_clkdm",
  392. .pwrdm = { .name = "vpe_pwrdm" },
  393. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  394. .cm_inst = DRA7XX_CM_CORE_AON_VPE_INST,
  395. .clkdm_offs = DRA7XX_CM_CORE_AON_VPE_VPE_CDOFFS,
  396. .dep_bit = DRA7XX_VPE_STATDEP_SHIFT,
  397. .wkdep_srcs = vpe_wkup_sleep_deps,
  398. .sleepdep_srcs = vpe_wkup_sleep_deps,
  399. .flags = CLKDM_CAN_HWSUP_SWSUP,
  400. };
  401. static struct clockdomain mpu_7xx_clkdm = {
  402. .name = "mpu_clkdm",
  403. .pwrdm = { .name = "mpu_pwrdm" },
  404. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  405. .cm_inst = DRA7XX_CM_CORE_AON_MPU_INST,
  406. .clkdm_offs = DRA7XX_CM_CORE_AON_MPU_MPU_CDOFFS,
  407. .wkdep_srcs = mpu_wkup_sleep_deps,
  408. .sleepdep_srcs = mpu_wkup_sleep_deps,
  409. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  410. };
  411. static struct clockdomain custefuse_7xx_clkdm = {
  412. .name = "custefuse_clkdm",
  413. .pwrdm = { .name = "custefuse_pwrdm" },
  414. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  415. .cm_inst = DRA7XX_CM_CORE_CUSTEFUSE_INST,
  416. .clkdm_offs = DRA7XX_CM_CORE_CUSTEFUSE_CUSTEFUSE_CDOFFS,
  417. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  418. };
  419. static struct clockdomain ipu_7xx_clkdm = {
  420. .name = "ipu_clkdm",
  421. .pwrdm = { .name = "ipu_pwrdm" },
  422. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  423. .cm_inst = DRA7XX_CM_CORE_AON_IPU_INST,
  424. .clkdm_offs = DRA7XX_CM_CORE_AON_IPU_IPU_CDOFFS,
  425. .dep_bit = DRA7XX_IPU_STATDEP_SHIFT,
  426. .flags = CLKDM_CAN_SWSUP,
  427. };
  428. static struct clockdomain mpu1_7xx_clkdm = {
  429. .name = "mpu1_clkdm",
  430. .pwrdm = { .name = "cpu1_pwrdm" },
  431. .prcm_partition = DRA7XX_MPU_PRCM_PARTITION,
  432. .cm_inst = DRA7XX_MPU_PRCM_CM_C1_INST,
  433. .clkdm_offs = DRA7XX_MPU_PRCM_CM_C1_CPU1_CDOFFS,
  434. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  435. };
  436. static struct clockdomain gmac_7xx_clkdm = {
  437. .name = "gmac_clkdm",
  438. .pwrdm = { .name = "l3init_pwrdm" },
  439. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  440. .cm_inst = DRA7XX_CM_CORE_L3INIT_INST,
  441. .clkdm_offs = DRA7XX_CM_CORE_L3INIT_GMAC_CDOFFS,
  442. .dep_bit = DRA7XX_GMAC_STATDEP_SHIFT,
  443. .wkdep_srcs = gmac_wkup_sleep_deps,
  444. .sleepdep_srcs = gmac_wkup_sleep_deps,
  445. .flags = CLKDM_CAN_HWSUP_SWSUP,
  446. };
  447. static struct clockdomain l4cfg_7xx_clkdm = {
  448. .name = "l4cfg_clkdm",
  449. .pwrdm = { .name = "core_pwrdm" },
  450. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  451. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  452. .clkdm_offs = DRA7XX_CM_CORE_CORE_L4CFG_CDOFFS,
  453. .dep_bit = DRA7XX_L4CFG_STATDEP_SHIFT,
  454. .flags = CLKDM_CAN_HWSUP,
  455. };
  456. static struct clockdomain dma_7xx_clkdm = {
  457. .name = "dma_clkdm",
  458. .pwrdm = { .name = "core_pwrdm" },
  459. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  460. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  461. .clkdm_offs = DRA7XX_CM_CORE_CORE_DMA_CDOFFS,
  462. .wkdep_srcs = dma_wkup_sleep_deps,
  463. .sleepdep_srcs = dma_wkup_sleep_deps,
  464. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  465. };
  466. static struct clockdomain rtc_7xx_clkdm = {
  467. .name = "rtc_clkdm",
  468. .pwrdm = { .name = "rtc_pwrdm" },
  469. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  470. .cm_inst = DRA7XX_CM_CORE_AON_RTC_INST,
  471. .clkdm_offs = DRA7XX_CM_CORE_AON_RTC_RTC_CDOFFS,
  472. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  473. };
  474. static struct clockdomain pcie_7xx_clkdm = {
  475. .name = "pcie_clkdm",
  476. .pwrdm = { .name = "l3init_pwrdm" },
  477. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  478. .cm_inst = DRA7XX_CM_CORE_L3INIT_INST,
  479. .clkdm_offs = DRA7XX_CM_CORE_L3INIT_PCIE_CDOFFS,
  480. .dep_bit = DRA7XX_PCIE_STATDEP_SHIFT,
  481. .wkdep_srcs = pcie_wkup_sleep_deps,
  482. .sleepdep_srcs = pcie_wkup_sleep_deps,
  483. .flags = CLKDM_CAN_SWSUP,
  484. };
  485. static struct clockdomain atl_7xx_clkdm = {
  486. .name = "atl_clkdm",
  487. .pwrdm = { .name = "core_pwrdm" },
  488. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  489. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  490. .clkdm_offs = DRA7XX_CM_CORE_CORE_ATL_CDOFFS,
  491. .dep_bit = DRA7XX_ATL_STATDEP_SHIFT,
  492. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  493. };
  494. static struct clockdomain l3instr_7xx_clkdm = {
  495. .name = "l3instr_clkdm",
  496. .pwrdm = { .name = "core_pwrdm" },
  497. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  498. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  499. .clkdm_offs = DRA7XX_CM_CORE_CORE_L3INSTR_CDOFFS,
  500. };
  501. static struct clockdomain dss_7xx_clkdm = {
  502. .name = "dss_clkdm",
  503. .pwrdm = { .name = "dss_pwrdm" },
  504. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  505. .cm_inst = DRA7XX_CM_CORE_DSS_INST,
  506. .clkdm_offs = DRA7XX_CM_CORE_DSS_DSS_CDOFFS,
  507. .dep_bit = DRA7XX_DSS_STATDEP_SHIFT,
  508. .wkdep_srcs = dss_wkup_sleep_deps,
  509. .sleepdep_srcs = dss_wkup_sleep_deps,
  510. .flags = CLKDM_CAN_HWSUP_SWSUP,
  511. };
  512. static struct clockdomain emif_7xx_clkdm = {
  513. .name = "emif_clkdm",
  514. .pwrdm = { .name = "core_pwrdm" },
  515. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  516. .cm_inst = DRA7XX_CM_CORE_CORE_INST,
  517. .clkdm_offs = DRA7XX_CM_CORE_CORE_EMIF_CDOFFS,
  518. .dep_bit = DRA7XX_EMIF_STATDEP_SHIFT,
  519. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  520. };
  521. static struct clockdomain emu_7xx_clkdm = {
  522. .name = "emu_clkdm",
  523. .pwrdm = { .name = "emu_pwrdm" },
  524. .prcm_partition = DRA7XX_PRM_PARTITION,
  525. .cm_inst = DRA7XX_PRM_EMU_CM_INST,
  526. .clkdm_offs = DRA7XX_PRM_EMU_CM_EMU_CDOFFS,
  527. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  528. };
  529. static struct clockdomain dsp2_7xx_clkdm = {
  530. .name = "dsp2_clkdm",
  531. .pwrdm = { .name = "dsp2_pwrdm" },
  532. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  533. .cm_inst = DRA7XX_CM_CORE_AON_DSP2_INST,
  534. .clkdm_offs = DRA7XX_CM_CORE_AON_DSP2_DSP2_CDOFFS,
  535. .dep_bit = DRA7XX_DSP2_STATDEP_SHIFT,
  536. .wkdep_srcs = dsp2_wkup_sleep_deps,
  537. .sleepdep_srcs = dsp2_wkup_sleep_deps,
  538. .flags = CLKDM_CAN_HWSUP_SWSUP,
  539. };
  540. static struct clockdomain dsp1_7xx_clkdm = {
  541. .name = "dsp1_clkdm",
  542. .pwrdm = { .name = "dsp1_pwrdm" },
  543. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  544. .cm_inst = DRA7XX_CM_CORE_AON_DSP1_INST,
  545. .clkdm_offs = DRA7XX_CM_CORE_AON_DSP1_DSP1_CDOFFS,
  546. .dep_bit = DRA7XX_DSP1_STATDEP_SHIFT,
  547. .wkdep_srcs = dsp1_wkup_sleep_deps,
  548. .sleepdep_srcs = dsp1_wkup_sleep_deps,
  549. .flags = CLKDM_CAN_HWSUP_SWSUP,
  550. };
  551. static struct clockdomain cam_7xx_clkdm = {
  552. .name = "cam_clkdm",
  553. .pwrdm = { .name = "cam_pwrdm" },
  554. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  555. .cm_inst = DRA7XX_CM_CORE_CAM_INST,
  556. .clkdm_offs = DRA7XX_CM_CORE_CAM_CAM_CDOFFS,
  557. .dep_bit = DRA7XX_CAM_STATDEP_SHIFT,
  558. .wkdep_srcs = cam_wkup_sleep_deps,
  559. .sleepdep_srcs = cam_wkup_sleep_deps,
  560. .flags = CLKDM_CAN_HWSUP_SWSUP,
  561. };
  562. static struct clockdomain l4per_7xx_clkdm = {
  563. .name = "l4per_clkdm",
  564. .pwrdm = { .name = "l4per_pwrdm" },
  565. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  566. .cm_inst = DRA7XX_CM_CORE_L4PER_INST,
  567. .clkdm_offs = DRA7XX_CM_CORE_L4PER_L4PER_CDOFFS,
  568. .dep_bit = DRA7XX_L4PER_STATDEP_SHIFT,
  569. .flags = CLKDM_CAN_HWSUP_SWSUP,
  570. };
  571. static struct clockdomain gpu_7xx_clkdm = {
  572. .name = "gpu_clkdm",
  573. .pwrdm = { .name = "gpu_pwrdm" },
  574. .prcm_partition = DRA7XX_CM_CORE_PARTITION,
  575. .cm_inst = DRA7XX_CM_CORE_GPU_INST,
  576. .clkdm_offs = DRA7XX_CM_CORE_GPU_GPU_CDOFFS,
  577. .dep_bit = DRA7XX_GPU_STATDEP_SHIFT,
  578. .wkdep_srcs = gpu_wkup_sleep_deps,
  579. .sleepdep_srcs = gpu_wkup_sleep_deps,
  580. .flags = CLKDM_CAN_HWSUP_SWSUP,
  581. };
  582. static struct clockdomain eve4_7xx_clkdm = {
  583. .name = "eve4_clkdm",
  584. .pwrdm = { .name = "eve4_pwrdm" },
  585. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  586. .cm_inst = DRA7XX_CM_CORE_AON_EVE4_INST,
  587. .clkdm_offs = DRA7XX_CM_CORE_AON_EVE4_EVE4_CDOFFS,
  588. .dep_bit = DRA7XX_EVE4_STATDEP_SHIFT,
  589. .wkdep_srcs = eve4_wkup_sleep_deps,
  590. .sleepdep_srcs = eve4_wkup_sleep_deps,
  591. .flags = CLKDM_CAN_HWSUP_SWSUP,
  592. };
  593. static struct clockdomain eve2_7xx_clkdm = {
  594. .name = "eve2_clkdm",
  595. .pwrdm = { .name = "eve2_pwrdm" },
  596. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  597. .cm_inst = DRA7XX_CM_CORE_AON_EVE2_INST,
  598. .clkdm_offs = DRA7XX_CM_CORE_AON_EVE2_EVE2_CDOFFS,
  599. .dep_bit = DRA7XX_EVE2_STATDEP_SHIFT,
  600. .wkdep_srcs = eve2_wkup_sleep_deps,
  601. .sleepdep_srcs = eve2_wkup_sleep_deps,
  602. .flags = CLKDM_CAN_HWSUP_SWSUP,
  603. };
  604. static struct clockdomain eve3_7xx_clkdm = {
  605. .name = "eve3_clkdm",
  606. .pwrdm = { .name = "eve3_pwrdm" },
  607. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  608. .cm_inst = DRA7XX_CM_CORE_AON_EVE3_INST,
  609. .clkdm_offs = DRA7XX_CM_CORE_AON_EVE3_EVE3_CDOFFS,
  610. .dep_bit = DRA7XX_EVE3_STATDEP_SHIFT,
  611. .wkdep_srcs = eve3_wkup_sleep_deps,
  612. .sleepdep_srcs = eve3_wkup_sleep_deps,
  613. .flags = CLKDM_CAN_HWSUP_SWSUP,
  614. };
  615. static struct clockdomain wkupaon_7xx_clkdm = {
  616. .name = "wkupaon_clkdm",
  617. .pwrdm = { .name = "wkupaon_pwrdm" },
  618. .prcm_partition = DRA7XX_PRM_PARTITION,
  619. .cm_inst = DRA7XX_PRM_WKUPAON_CM_INST,
  620. .clkdm_offs = DRA7XX_PRM_WKUPAON_CM_WKUPAON_CDOFFS,
  621. .dep_bit = DRA7XX_WKUPAON_STATDEP_SHIFT,
  622. .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
  623. };
  624. static struct clockdomain eve1_7xx_clkdm = {
  625. .name = "eve1_clkdm",
  626. .pwrdm = { .name = "eve1_pwrdm" },
  627. .prcm_partition = DRA7XX_CM_CORE_AON_PARTITION,
  628. .cm_inst = DRA7XX_CM_CORE_AON_EVE1_INST,
  629. .clkdm_offs = DRA7XX_CM_CORE_AON_EVE1_EVE1_CDOFFS,
  630. .dep_bit = DRA7XX_EVE1_STATDEP_SHIFT,
  631. .wkdep_srcs = eve1_wkup_sleep_deps,
  632. .sleepdep_srcs = eve1_wkup_sleep_deps,
  633. .flags = CLKDM_CAN_HWSUP_SWSUP,
  634. };
  635. /* As clockdomains are added or removed above, this list must also be changed */
  636. static struct clockdomain *clockdomains_dra7xx[] __initdata = {
  637. &l4per3_7xx_clkdm,
  638. &l4per2_7xx_clkdm,
  639. &mpu0_7xx_clkdm,
  640. &iva_7xx_clkdm,
  641. &coreaon_7xx_clkdm,
  642. &ipu1_7xx_clkdm,
  643. &ipu2_7xx_clkdm,
  644. &l3init_7xx_clkdm,
  645. &l4sec_7xx_clkdm,
  646. &l3main1_7xx_clkdm,
  647. &vpe_7xx_clkdm,
  648. &mpu_7xx_clkdm,
  649. &custefuse_7xx_clkdm,
  650. &ipu_7xx_clkdm,
  651. &mpu1_7xx_clkdm,
  652. &gmac_7xx_clkdm,
  653. &l4cfg_7xx_clkdm,
  654. &dma_7xx_clkdm,
  655. &rtc_7xx_clkdm,
  656. &pcie_7xx_clkdm,
  657. &atl_7xx_clkdm,
  658. &l3instr_7xx_clkdm,
  659. &dss_7xx_clkdm,
  660. &emif_7xx_clkdm,
  661. &emu_7xx_clkdm,
  662. &dsp2_7xx_clkdm,
  663. &dsp1_7xx_clkdm,
  664. &cam_7xx_clkdm,
  665. &l4per_7xx_clkdm,
  666. &gpu_7xx_clkdm,
  667. &eve4_7xx_clkdm,
  668. &eve2_7xx_clkdm,
  669. &eve3_7xx_clkdm,
  670. &wkupaon_7xx_clkdm,
  671. &eve1_7xx_clkdm,
  672. NULL
  673. };
  674. void __init dra7xx_clockdomains_init(void)
  675. {
  676. clkdm_register_platform_funcs(&omap4_clkdm_operations);
  677. clkdm_register_clkdms(clockdomains_dra7xx);
  678. clkdm_complete_init();
  679. }