powerdomains44xx_data.c 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. /*
  2. * OMAP4 Power domains framework
  3. *
  4. * Copyright (C) 2009-2011 Texas Instruments, Inc.
  5. * Copyright (C) 2009-2011 Nokia Corporation
  6. *
  7. * Abhijit Pagare (abhijitpagare@ti.com)
  8. * Benoit Cousson (b-cousson@ti.com)
  9. * Paul Walmsley (paul@pwsan.com)
  10. *
  11. * This file is automatically generated from the OMAP hardware databases.
  12. * We respectfully ask that any modifications to this file be coordinated
  13. * with the public linux-omap@vger.kernel.org mailing list and the
  14. * authors above to ensure that the autogeneration scripts are kept
  15. * up-to-date with the file contents.
  16. *
  17. * This program is free software; you can redistribute it and/or modify
  18. * it under the terms of the GNU General Public License version 2 as
  19. * published by the Free Software Foundation.
  20. */
  21. #include <linux/kernel.h>
  22. #include <linux/init.h>
  23. #include "powerdomain.h"
  24. #include "prcm-common.h"
  25. #include "prcm44xx.h"
  26. #include "prm-regbits-44xx.h"
  27. #include "prm44xx.h"
  28. #include "prcm_mpu44xx.h"
  29. /* core_44xx_pwrdm: CORE power domain */
  30. static struct powerdomain core_44xx_pwrdm = {
  31. .name = "core_pwrdm",
  32. .voltdm = { .name = "core" },
  33. .prcm_offs = OMAP4430_PRM_CORE_INST,
  34. .prcm_partition = OMAP4430_PRM_PARTITION,
  35. .pwrsts = PWRSTS_RET_ON,
  36. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  37. .banks = 5,
  38. .pwrsts_mem_ret = {
  39. [0] = PWRSTS_OFF, /* core_nret_bank */
  40. [1] = PWRSTS_RET, /* core_ocmram */
  41. [2] = PWRSTS_RET, /* core_other_bank */
  42. [3] = PWRSTS_OFF_RET, /* ducati_l2ram */
  43. [4] = PWRSTS_OFF_RET, /* ducati_unicache */
  44. },
  45. .pwrsts_mem_on = {
  46. [0] = PWRSTS_ON, /* core_nret_bank */
  47. [1] = PWRSTS_ON, /* core_ocmram */
  48. [2] = PWRSTS_ON, /* core_other_bank */
  49. [3] = PWRSTS_ON, /* ducati_l2ram */
  50. [4] = PWRSTS_ON, /* ducati_unicache */
  51. },
  52. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  53. };
  54. /* gfx_44xx_pwrdm: 3D accelerator power domain */
  55. static struct powerdomain gfx_44xx_pwrdm = {
  56. .name = "gfx_pwrdm",
  57. .voltdm = { .name = "core" },
  58. .prcm_offs = OMAP4430_PRM_GFX_INST,
  59. .prcm_partition = OMAP4430_PRM_PARTITION,
  60. .pwrsts = PWRSTS_OFF_ON,
  61. .banks = 1,
  62. .pwrsts_mem_ret = {
  63. [0] = PWRSTS_OFF, /* gfx_mem */
  64. },
  65. .pwrsts_mem_on = {
  66. [0] = PWRSTS_ON, /* gfx_mem */
  67. },
  68. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  69. };
  70. /* abe_44xx_pwrdm: Audio back end power domain */
  71. static struct powerdomain abe_44xx_pwrdm = {
  72. .name = "abe_pwrdm",
  73. .voltdm = { .name = "iva" },
  74. .prcm_offs = OMAP4430_PRM_ABE_INST,
  75. .prcm_partition = OMAP4430_PRM_PARTITION,
  76. .pwrsts = PWRSTS_OFF_RET_ON,
  77. .pwrsts_logic_ret = PWRSTS_OFF,
  78. .banks = 2,
  79. .pwrsts_mem_ret = {
  80. [0] = PWRSTS_RET, /* aessmem */
  81. [1] = PWRSTS_OFF, /* periphmem */
  82. },
  83. .pwrsts_mem_on = {
  84. [0] = PWRSTS_ON, /* aessmem */
  85. [1] = PWRSTS_ON, /* periphmem */
  86. },
  87. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  88. };
  89. /* dss_44xx_pwrdm: Display subsystem power domain */
  90. static struct powerdomain dss_44xx_pwrdm = {
  91. .name = "dss_pwrdm",
  92. .voltdm = { .name = "core" },
  93. .prcm_offs = OMAP4430_PRM_DSS_INST,
  94. .prcm_partition = OMAP4430_PRM_PARTITION,
  95. .pwrsts = PWRSTS_OFF_RET_ON,
  96. .pwrsts_logic_ret = PWRSTS_OFF,
  97. .banks = 1,
  98. .pwrsts_mem_ret = {
  99. [0] = PWRSTS_OFF, /* dss_mem */
  100. },
  101. .pwrsts_mem_on = {
  102. [0] = PWRSTS_ON, /* dss_mem */
  103. },
  104. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  105. };
  106. /* tesla_44xx_pwrdm: Tesla processor power domain */
  107. static struct powerdomain tesla_44xx_pwrdm = {
  108. .name = "tesla_pwrdm",
  109. .voltdm = { .name = "iva" },
  110. .prcm_offs = OMAP4430_PRM_TESLA_INST,
  111. .prcm_partition = OMAP4430_PRM_PARTITION,
  112. .pwrsts = PWRSTS_OFF_RET_ON,
  113. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  114. .banks = 3,
  115. .pwrsts_mem_ret = {
  116. [0] = PWRSTS_RET, /* tesla_edma */
  117. [1] = PWRSTS_OFF_RET, /* tesla_l1 */
  118. [2] = PWRSTS_OFF_RET, /* tesla_l2 */
  119. },
  120. .pwrsts_mem_on = {
  121. [0] = PWRSTS_ON, /* tesla_edma */
  122. [1] = PWRSTS_ON, /* tesla_l1 */
  123. [2] = PWRSTS_ON, /* tesla_l2 */
  124. },
  125. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  126. };
  127. /* wkup_44xx_pwrdm: Wake-up power domain */
  128. static struct powerdomain wkup_44xx_pwrdm = {
  129. .name = "wkup_pwrdm",
  130. .voltdm = { .name = "wakeup" },
  131. .prcm_offs = OMAP4430_PRM_WKUP_INST,
  132. .prcm_partition = OMAP4430_PRM_PARTITION,
  133. .pwrsts = PWRSTS_ON,
  134. .banks = 1,
  135. .pwrsts_mem_ret = {
  136. [0] = PWRSTS_OFF, /* wkup_bank */
  137. },
  138. .pwrsts_mem_on = {
  139. [0] = PWRSTS_ON, /* wkup_bank */
  140. },
  141. };
  142. /* cpu0_44xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
  143. static struct powerdomain cpu0_44xx_pwrdm = {
  144. .name = "cpu0_pwrdm",
  145. .voltdm = { .name = "mpu" },
  146. .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST,
  147. .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
  148. .pwrsts = PWRSTS_OFF_RET_ON,
  149. .pwrsts_logic_ret = PWRSTS_OFF_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_44xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
  159. static struct powerdomain cpu1_44xx_pwrdm = {
  160. .name = "cpu1_pwrdm",
  161. .voltdm = { .name = "mpu" },
  162. .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST,
  163. .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
  164. .pwrsts = PWRSTS_OFF_RET_ON,
  165. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  166. .banks = 1,
  167. .pwrsts_mem_ret = {
  168. [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
  169. },
  170. .pwrsts_mem_on = {
  171. [0] = PWRSTS_ON, /* cpu1_l1 */
  172. },
  173. };
  174. /* emu_44xx_pwrdm: Emulation power domain */
  175. static struct powerdomain emu_44xx_pwrdm = {
  176. .name = "emu_pwrdm",
  177. .voltdm = { .name = "wakeup" },
  178. .prcm_offs = OMAP4430_PRM_EMU_INST,
  179. .prcm_partition = OMAP4430_PRM_PARTITION,
  180. .pwrsts = PWRSTS_OFF_ON,
  181. .banks = 1,
  182. .pwrsts_mem_ret = {
  183. [0] = PWRSTS_OFF, /* emu_bank */
  184. },
  185. .pwrsts_mem_on = {
  186. [0] = PWRSTS_ON, /* emu_bank */
  187. },
  188. };
  189. /* mpu_44xx_pwrdm: Modena processor and the Neon coprocessor power domain */
  190. static struct powerdomain mpu_44xx_pwrdm = {
  191. .name = "mpu_pwrdm",
  192. .voltdm = { .name = "mpu" },
  193. .prcm_offs = OMAP4430_PRM_MPU_INST,
  194. .prcm_partition = OMAP4430_PRM_PARTITION,
  195. .pwrsts = PWRSTS_RET_ON,
  196. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  197. .banks = 3,
  198. .pwrsts_mem_ret = {
  199. [0] = PWRSTS_OFF_RET, /* mpu_l1 */
  200. [1] = PWRSTS_OFF_RET, /* mpu_l2 */
  201. [2] = PWRSTS_RET, /* mpu_ram */
  202. },
  203. .pwrsts_mem_on = {
  204. [0] = PWRSTS_ON, /* mpu_l1 */
  205. [1] = PWRSTS_ON, /* mpu_l2 */
  206. [2] = PWRSTS_ON, /* mpu_ram */
  207. },
  208. };
  209. /* ivahd_44xx_pwrdm: IVA-HD power domain */
  210. static struct powerdomain ivahd_44xx_pwrdm = {
  211. .name = "ivahd_pwrdm",
  212. .voltdm = { .name = "iva" },
  213. .prcm_offs = OMAP4430_PRM_IVAHD_INST,
  214. .prcm_partition = OMAP4430_PRM_PARTITION,
  215. .pwrsts = PWRSTS_OFF_RET_ON,
  216. .pwrsts_logic_ret = PWRSTS_OFF,
  217. .banks = 4,
  218. .pwrsts_mem_ret = {
  219. [0] = PWRSTS_OFF, /* hwa_mem */
  220. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  221. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  222. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  223. },
  224. .pwrsts_mem_on = {
  225. [0] = PWRSTS_ON, /* hwa_mem */
  226. [1] = PWRSTS_ON, /* sl2_mem */
  227. [2] = PWRSTS_ON, /* tcm1_mem */
  228. [3] = PWRSTS_ON, /* tcm2_mem */
  229. },
  230. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  231. };
  232. /* cam_44xx_pwrdm: Camera subsystem power domain */
  233. static struct powerdomain cam_44xx_pwrdm = {
  234. .name = "cam_pwrdm",
  235. .voltdm = { .name = "core" },
  236. .prcm_offs = OMAP4430_PRM_CAM_INST,
  237. .prcm_partition = OMAP4430_PRM_PARTITION,
  238. .pwrsts = PWRSTS_OFF_ON,
  239. .banks = 1,
  240. .pwrsts_mem_ret = {
  241. [0] = PWRSTS_OFF, /* cam_mem */
  242. },
  243. .pwrsts_mem_on = {
  244. [0] = PWRSTS_ON, /* cam_mem */
  245. },
  246. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  247. };
  248. /* l3init_44xx_pwrdm: L3 initators pheripherals power domain */
  249. static struct powerdomain l3init_44xx_pwrdm = {
  250. .name = "l3init_pwrdm",
  251. .voltdm = { .name = "core" },
  252. .prcm_offs = OMAP4430_PRM_L3INIT_INST,
  253. .prcm_partition = OMAP4430_PRM_PARTITION,
  254. .pwrsts = PWRSTS_RET_ON,
  255. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  256. .banks = 1,
  257. .pwrsts_mem_ret = {
  258. [0] = PWRSTS_OFF, /* l3init_bank1 */
  259. },
  260. .pwrsts_mem_on = {
  261. [0] = PWRSTS_ON, /* l3init_bank1 */
  262. },
  263. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  264. };
  265. /* l4per_44xx_pwrdm: Target peripherals power domain */
  266. static struct powerdomain l4per_44xx_pwrdm = {
  267. .name = "l4per_pwrdm",
  268. .voltdm = { .name = "core" },
  269. .prcm_offs = OMAP4430_PRM_L4PER_INST,
  270. .prcm_partition = OMAP4430_PRM_PARTITION,
  271. .pwrsts = PWRSTS_RET_ON,
  272. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  273. .banks = 2,
  274. .pwrsts_mem_ret = {
  275. [0] = PWRSTS_OFF, /* nonretained_bank */
  276. [1] = PWRSTS_RET, /* retained_bank */
  277. },
  278. .pwrsts_mem_on = {
  279. [0] = PWRSTS_ON, /* nonretained_bank */
  280. [1] = PWRSTS_ON, /* retained_bank */
  281. },
  282. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  283. };
  284. /*
  285. * always_on_core_44xx_pwrdm: Always ON logic that sits in VDD_CORE voltage
  286. * domain
  287. */
  288. static struct powerdomain always_on_core_44xx_pwrdm = {
  289. .name = "always_on_core_pwrdm",
  290. .voltdm = { .name = "core" },
  291. .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST,
  292. .prcm_partition = OMAP4430_PRM_PARTITION,
  293. .pwrsts = PWRSTS_ON,
  294. };
  295. /* cefuse_44xx_pwrdm: Customer efuse controller power domain */
  296. static struct powerdomain cefuse_44xx_pwrdm = {
  297. .name = "cefuse_pwrdm",
  298. .voltdm = { .name = "core" },
  299. .prcm_offs = OMAP4430_PRM_CEFUSE_INST,
  300. .prcm_partition = OMAP4430_PRM_PARTITION,
  301. .pwrsts = PWRSTS_OFF_ON,
  302. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  303. };
  304. /*
  305. * The following power domains are not under SW control
  306. *
  307. * always_on_iva
  308. * always_on_mpu
  309. * stdefuse
  310. */
  311. /* As powerdomains are added or removed above, this list must also be changed */
  312. static struct powerdomain *powerdomains_omap44xx[] __initdata = {
  313. &core_44xx_pwrdm,
  314. &gfx_44xx_pwrdm,
  315. &abe_44xx_pwrdm,
  316. &dss_44xx_pwrdm,
  317. &tesla_44xx_pwrdm,
  318. &wkup_44xx_pwrdm,
  319. &cpu0_44xx_pwrdm,
  320. &cpu1_44xx_pwrdm,
  321. &emu_44xx_pwrdm,
  322. &mpu_44xx_pwrdm,
  323. &ivahd_44xx_pwrdm,
  324. &cam_44xx_pwrdm,
  325. &l3init_44xx_pwrdm,
  326. &l4per_44xx_pwrdm,
  327. &always_on_core_44xx_pwrdm,
  328. &cefuse_44xx_pwrdm,
  329. NULL
  330. };
  331. void __init omap44xx_powerdomains_init(void)
  332. {
  333. pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
  334. pwrdm_register_pwrdms(powerdomains_omap44xx);
  335. pwrdm_complete_init();
  336. }