powerdomains7xx_data.c 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. /*
  2. * DRA7xx Power 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/init.h>
  24. #include "powerdomain.h"
  25. #include "prcm-common.h"
  26. #include "prcm44xx.h"
  27. #include "prm7xx.h"
  28. #include "prcm_mpu7xx.h"
  29. /* iva_7xx_pwrdm: IVA-HD power domain */
  30. static struct powerdomain iva_7xx_pwrdm = {
  31. .name = "iva_pwrdm",
  32. .prcm_offs = DRA7XX_PRM_IVA_INST,
  33. .prcm_partition = DRA7XX_PRM_PARTITION,
  34. .pwrsts = PWRSTS_OFF_ON,
  35. .banks = 4,
  36. .pwrsts_mem_on = {
  37. [0] = PWRSTS_ON, /* hwa_mem */
  38. [1] = PWRSTS_ON, /* sl2_mem */
  39. [2] = PWRSTS_ON, /* tcm1_mem */
  40. [3] = PWRSTS_ON, /* tcm2_mem */
  41. },
  42. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  43. };
  44. /* rtc_7xx_pwrdm: */
  45. static struct powerdomain rtc_7xx_pwrdm = {
  46. .name = "rtc_pwrdm",
  47. .prcm_offs = DRA7XX_PRM_RTC_INST,
  48. .prcm_partition = DRA7XX_PRM_PARTITION,
  49. .pwrsts = PWRSTS_ON,
  50. };
  51. /* custefuse_7xx_pwrdm: Customer efuse controller power domain */
  52. static struct powerdomain custefuse_7xx_pwrdm = {
  53. .name = "custefuse_pwrdm",
  54. .prcm_offs = DRA7XX_PRM_CUSTEFUSE_INST,
  55. .prcm_partition = DRA7XX_PRM_PARTITION,
  56. .pwrsts = PWRSTS_OFF_ON,
  57. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  58. };
  59. /* ipu_7xx_pwrdm: Audio back end power domain */
  60. static struct powerdomain ipu_7xx_pwrdm = {
  61. .name = "ipu_pwrdm",
  62. .prcm_offs = DRA7XX_PRM_IPU_INST,
  63. .prcm_partition = DRA7XX_PRM_PARTITION,
  64. .pwrsts = PWRSTS_OFF_ON,
  65. .banks = 2,
  66. .pwrsts_mem_on = {
  67. [0] = PWRSTS_ON, /* aessmem */
  68. [1] = PWRSTS_ON, /* periphmem */
  69. },
  70. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  71. };
  72. /* dss_7xx_pwrdm: Display subsystem power domain */
  73. static struct powerdomain dss_7xx_pwrdm = {
  74. .name = "dss_pwrdm",
  75. .prcm_offs = DRA7XX_PRM_DSS_INST,
  76. .prcm_partition = DRA7XX_PRM_PARTITION,
  77. .pwrsts = PWRSTS_OFF_ON,
  78. .banks = 1,
  79. .pwrsts_mem_on = {
  80. [0] = PWRSTS_ON, /* dss_mem */
  81. },
  82. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  83. };
  84. /* l4per_7xx_pwrdm: Target peripherals power domain */
  85. static struct powerdomain l4per_7xx_pwrdm = {
  86. .name = "l4per_pwrdm",
  87. .prcm_offs = DRA7XX_PRM_L4PER_INST,
  88. .prcm_partition = DRA7XX_PRM_PARTITION,
  89. .pwrsts = PWRSTS_ON,
  90. .banks = 2,
  91. .pwrsts_mem_on = {
  92. [0] = PWRSTS_ON, /* nonretained_bank */
  93. [1] = PWRSTS_ON, /* retained_bank */
  94. },
  95. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  96. };
  97. /* gpu_7xx_pwrdm: 3D accelerator power domain */
  98. static struct powerdomain gpu_7xx_pwrdm = {
  99. .name = "gpu_pwrdm",
  100. .prcm_offs = DRA7XX_PRM_GPU_INST,
  101. .prcm_partition = DRA7XX_PRM_PARTITION,
  102. .pwrsts = PWRSTS_OFF_ON,
  103. .banks = 1,
  104. .pwrsts_mem_on = {
  105. [0] = PWRSTS_ON, /* gpu_mem */
  106. },
  107. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  108. };
  109. /* wkupaon_7xx_pwrdm: Wake-up power domain */
  110. static struct powerdomain wkupaon_7xx_pwrdm = {
  111. .name = "wkupaon_pwrdm",
  112. .prcm_offs = DRA7XX_PRM_WKUPAON_INST,
  113. .prcm_partition = DRA7XX_PRM_PARTITION,
  114. .pwrsts = PWRSTS_ON,
  115. .banks = 1,
  116. .pwrsts_mem_on = {
  117. [0] = PWRSTS_ON, /* wkup_bank */
  118. },
  119. };
  120. /* core_7xx_pwrdm: CORE power domain */
  121. static struct powerdomain core_7xx_pwrdm = {
  122. .name = "core_pwrdm",
  123. .prcm_offs = DRA7XX_PRM_CORE_INST,
  124. .prcm_partition = DRA7XX_PRM_PARTITION,
  125. .pwrsts = PWRSTS_ON,
  126. .banks = 5,
  127. .pwrsts_mem_on = {
  128. [0] = PWRSTS_ON, /* core_nret_bank */
  129. [1] = PWRSTS_ON, /* core_ocmram */
  130. [2] = PWRSTS_ON, /* core_other_bank */
  131. [3] = PWRSTS_ON, /* ipu_l2ram */
  132. [4] = PWRSTS_ON, /* ipu_unicache */
  133. },
  134. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  135. };
  136. /* coreaon_7xx_pwrdm: Always ON logic that sits in VDD_CORE voltage domain */
  137. static struct powerdomain coreaon_7xx_pwrdm = {
  138. .name = "coreaon_pwrdm",
  139. .prcm_offs = DRA7XX_PRM_COREAON_INST,
  140. .prcm_partition = DRA7XX_PRM_PARTITION,
  141. .pwrsts = PWRSTS_ON,
  142. };
  143. /* cpu0_7xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
  144. static struct powerdomain cpu0_7xx_pwrdm = {
  145. .name = "cpu0_pwrdm",
  146. .prcm_offs = DRA7XX_MPU_PRCM_PRM_C0_INST,
  147. .prcm_partition = DRA7XX_MPU_PRCM_PARTITION,
  148. .pwrsts = PWRSTS_RET_ON,
  149. .pwrsts_logic_ret = PWRSTS_RET,
  150. .banks = 1,
  151. .pwrsts_mem_ret = {
  152. [0] = PWRSTS_OFF_RET, /* cpu0_l1 */
  153. },
  154. .pwrsts_mem_on = {
  155. [0] = PWRSTS_ON, /* cpu0_l1 */
  156. },
  157. };
  158. /* cpu1_7xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
  159. static struct powerdomain cpu1_7xx_pwrdm = {
  160. .name = "cpu1_pwrdm",
  161. .prcm_offs = DRA7XX_MPU_PRCM_PRM_C1_INST,
  162. .prcm_partition = DRA7XX_MPU_PRCM_PARTITION,
  163. .pwrsts = PWRSTS_RET_ON,
  164. .pwrsts_logic_ret = PWRSTS_RET,
  165. .banks = 1,
  166. .pwrsts_mem_ret = {
  167. [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
  168. },
  169. .pwrsts_mem_on = {
  170. [0] = PWRSTS_ON, /* cpu1_l1 */
  171. },
  172. };
  173. /* vpe_7xx_pwrdm: */
  174. static struct powerdomain vpe_7xx_pwrdm = {
  175. .name = "vpe_pwrdm",
  176. .prcm_offs = DRA7XX_PRM_VPE_INST,
  177. .prcm_partition = DRA7XX_PRM_PARTITION,
  178. .pwrsts = PWRSTS_OFF_ON,
  179. .banks = 1,
  180. .pwrsts_mem_on = {
  181. [0] = PWRSTS_ON, /* vpe_bank */
  182. },
  183. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  184. };
  185. /* mpu_7xx_pwrdm: Modena processor and the Neon coprocessor power domain */
  186. static struct powerdomain mpu_7xx_pwrdm = {
  187. .name = "mpu_pwrdm",
  188. .prcm_offs = DRA7XX_PRM_MPU_INST,
  189. .prcm_partition = DRA7XX_PRM_PARTITION,
  190. .pwrsts = PWRSTS_RET_ON,
  191. .pwrsts_logic_ret = PWRSTS_RET,
  192. .banks = 2,
  193. .pwrsts_mem_ret = {
  194. [0] = PWRSTS_OFF_RET, /* mpu_l2 */
  195. [1] = PWRSTS_RET, /* mpu_ram */
  196. },
  197. .pwrsts_mem_on = {
  198. [0] = PWRSTS_ON, /* mpu_l2 */
  199. [1] = PWRSTS_ON, /* mpu_ram */
  200. },
  201. };
  202. /* l3init_7xx_pwrdm: L3 initators pheripherals power domain */
  203. static struct powerdomain l3init_7xx_pwrdm = {
  204. .name = "l3init_pwrdm",
  205. .prcm_offs = DRA7XX_PRM_L3INIT_INST,
  206. .prcm_partition = DRA7XX_PRM_PARTITION,
  207. .pwrsts = PWRSTS_ON,
  208. .banks = 3,
  209. .pwrsts_mem_on = {
  210. [0] = PWRSTS_ON, /* gmac_bank */
  211. [1] = PWRSTS_ON, /* l3init_bank1 */
  212. [2] = PWRSTS_ON, /* l3init_bank2 */
  213. },
  214. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  215. };
  216. /* eve3_7xx_pwrdm: */
  217. static struct powerdomain eve3_7xx_pwrdm = {
  218. .name = "eve3_pwrdm",
  219. .prcm_offs = DRA7XX_PRM_EVE3_INST,
  220. .prcm_partition = DRA7XX_PRM_PARTITION,
  221. .pwrsts = PWRSTS_OFF_ON,
  222. .banks = 1,
  223. .pwrsts_mem_on = {
  224. [0] = PWRSTS_ON, /* eve3_bank */
  225. },
  226. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  227. };
  228. /* emu_7xx_pwrdm: Emulation power domain */
  229. static struct powerdomain emu_7xx_pwrdm = {
  230. .name = "emu_pwrdm",
  231. .prcm_offs = DRA7XX_PRM_EMU_INST,
  232. .prcm_partition = DRA7XX_PRM_PARTITION,
  233. .pwrsts = PWRSTS_OFF_ON,
  234. .banks = 1,
  235. .pwrsts_mem_on = {
  236. [0] = PWRSTS_ON, /* emu_bank */
  237. },
  238. };
  239. /* dsp2_7xx_pwrdm: */
  240. static struct powerdomain dsp2_7xx_pwrdm = {
  241. .name = "dsp2_pwrdm",
  242. .prcm_offs = DRA7XX_PRM_DSP2_INST,
  243. .prcm_partition = DRA7XX_PRM_PARTITION,
  244. .pwrsts = PWRSTS_OFF_ON,
  245. .banks = 3,
  246. .pwrsts_mem_on = {
  247. [0] = PWRSTS_ON, /* dsp2_edma */
  248. [1] = PWRSTS_ON, /* dsp2_l1 */
  249. [2] = PWRSTS_ON, /* dsp2_l2 */
  250. },
  251. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  252. };
  253. /* dsp1_7xx_pwrdm: Tesla processor power domain */
  254. static struct powerdomain dsp1_7xx_pwrdm = {
  255. .name = "dsp1_pwrdm",
  256. .prcm_offs = DRA7XX_PRM_DSP1_INST,
  257. .prcm_partition = DRA7XX_PRM_PARTITION,
  258. .pwrsts = PWRSTS_OFF_ON,
  259. .banks = 3,
  260. .pwrsts_mem_on = {
  261. [0] = PWRSTS_ON, /* dsp1_edma */
  262. [1] = PWRSTS_ON, /* dsp1_l1 */
  263. [2] = PWRSTS_ON, /* dsp1_l2 */
  264. },
  265. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  266. };
  267. /* cam_7xx_pwrdm: Camera subsystem power domain */
  268. static struct powerdomain cam_7xx_pwrdm = {
  269. .name = "cam_pwrdm",
  270. .prcm_offs = DRA7XX_PRM_CAM_INST,
  271. .prcm_partition = DRA7XX_PRM_PARTITION,
  272. .pwrsts = PWRSTS_OFF_ON,
  273. .banks = 1,
  274. .pwrsts_mem_on = {
  275. [0] = PWRSTS_ON, /* vip_bank */
  276. },
  277. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  278. };
  279. /* eve4_7xx_pwrdm: */
  280. static struct powerdomain eve4_7xx_pwrdm = {
  281. .name = "eve4_pwrdm",
  282. .prcm_offs = DRA7XX_PRM_EVE4_INST,
  283. .prcm_partition = DRA7XX_PRM_PARTITION,
  284. .pwrsts = PWRSTS_OFF_ON,
  285. .banks = 1,
  286. .pwrsts_mem_on = {
  287. [0] = PWRSTS_ON, /* eve4_bank */
  288. },
  289. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  290. };
  291. /* eve2_7xx_pwrdm: */
  292. static struct powerdomain eve2_7xx_pwrdm = {
  293. .name = "eve2_pwrdm",
  294. .prcm_offs = DRA7XX_PRM_EVE2_INST,
  295. .prcm_partition = DRA7XX_PRM_PARTITION,
  296. .pwrsts = PWRSTS_OFF_ON,
  297. .banks = 1,
  298. .pwrsts_mem_on = {
  299. [0] = PWRSTS_ON, /* eve2_bank */
  300. },
  301. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  302. };
  303. /* eve1_7xx_pwrdm: */
  304. static struct powerdomain eve1_7xx_pwrdm = {
  305. .name = "eve1_pwrdm",
  306. .prcm_offs = DRA7XX_PRM_EVE1_INST,
  307. .prcm_partition = DRA7XX_PRM_PARTITION,
  308. .pwrsts = PWRSTS_OFF_ON,
  309. .banks = 1,
  310. .pwrsts_mem_on = {
  311. [0] = PWRSTS_ON, /* eve1_bank */
  312. },
  313. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  314. };
  315. /*
  316. * The following power domains are not under SW control
  317. *
  318. * mpuaon
  319. * mmaon
  320. */
  321. /* As powerdomains are added or removed above, this list must also be changed */
  322. static struct powerdomain *powerdomains_dra7xx[] __initdata = {
  323. &iva_7xx_pwrdm,
  324. &rtc_7xx_pwrdm,
  325. &custefuse_7xx_pwrdm,
  326. &ipu_7xx_pwrdm,
  327. &dss_7xx_pwrdm,
  328. &l4per_7xx_pwrdm,
  329. &gpu_7xx_pwrdm,
  330. &wkupaon_7xx_pwrdm,
  331. &core_7xx_pwrdm,
  332. &coreaon_7xx_pwrdm,
  333. &cpu0_7xx_pwrdm,
  334. &cpu1_7xx_pwrdm,
  335. &vpe_7xx_pwrdm,
  336. &mpu_7xx_pwrdm,
  337. &l3init_7xx_pwrdm,
  338. &eve3_7xx_pwrdm,
  339. &emu_7xx_pwrdm,
  340. &dsp2_7xx_pwrdm,
  341. &dsp1_7xx_pwrdm,
  342. &cam_7xx_pwrdm,
  343. &eve4_7xx_pwrdm,
  344. &eve2_7xx_pwrdm,
  345. &eve1_7xx_pwrdm,
  346. NULL
  347. };
  348. void __init dra7xx_powerdomains_init(void)
  349. {
  350. pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
  351. pwrdm_register_pwrdms(powerdomains_dra7xx);
  352. pwrdm_complete_init();
  353. }