powerdomains44xx_data.c 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  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. .prcm_offs = OMAP4430_PRM_CORE_INST,
  33. .prcm_partition = OMAP4430_PRM_PARTITION,
  34. .pwrsts = PWRSTS_RET_ON,
  35. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  36. .banks = 5,
  37. .pwrsts_mem_ret = {
  38. [0] = PWRSTS_OFF, /* core_nret_bank */
  39. [1] = PWRSTS_RET, /* core_ocmram */
  40. [2] = PWRSTS_RET, /* core_other_bank */
  41. [3] = PWRSTS_OFF_RET, /* ducati_l2ram */
  42. [4] = PWRSTS_OFF_RET, /* ducati_unicache */
  43. },
  44. .pwrsts_mem_on = {
  45. [0] = PWRSTS_ON, /* core_nret_bank */
  46. [1] = PWRSTS_ON, /* core_ocmram */
  47. [2] = PWRSTS_ON, /* core_other_bank */
  48. [3] = PWRSTS_ON, /* ducati_l2ram */
  49. [4] = PWRSTS_ON, /* ducati_unicache */
  50. },
  51. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  52. };
  53. /* gfx_44xx_pwrdm: 3D accelerator power domain */
  54. static struct powerdomain gfx_44xx_pwrdm = {
  55. .name = "gfx_pwrdm",
  56. .prcm_offs = OMAP4430_PRM_GFX_INST,
  57. .prcm_partition = OMAP4430_PRM_PARTITION,
  58. .pwrsts = PWRSTS_OFF_ON,
  59. .banks = 1,
  60. .pwrsts_mem_ret = {
  61. [0] = PWRSTS_OFF, /* gfx_mem */
  62. },
  63. .pwrsts_mem_on = {
  64. [0] = PWRSTS_ON, /* gfx_mem */
  65. },
  66. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  67. };
  68. /* abe_44xx_pwrdm: Audio back end power domain */
  69. static struct powerdomain abe_44xx_pwrdm = {
  70. .name = "abe_pwrdm",
  71. .prcm_offs = OMAP4430_PRM_ABE_INST,
  72. .prcm_partition = OMAP4430_PRM_PARTITION,
  73. .pwrsts = PWRSTS_OFF_RET_ON,
  74. .pwrsts_logic_ret = PWRSTS_OFF,
  75. .banks = 2,
  76. .pwrsts_mem_ret = {
  77. [0] = PWRSTS_RET, /* aessmem */
  78. [1] = PWRSTS_OFF, /* periphmem */
  79. },
  80. .pwrsts_mem_on = {
  81. [0] = PWRSTS_ON, /* aessmem */
  82. [1] = PWRSTS_ON, /* periphmem */
  83. },
  84. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  85. };
  86. /* dss_44xx_pwrdm: Display subsystem power domain */
  87. static struct powerdomain dss_44xx_pwrdm = {
  88. .name = "dss_pwrdm",
  89. .prcm_offs = OMAP4430_PRM_DSS_INST,
  90. .prcm_partition = OMAP4430_PRM_PARTITION,
  91. .pwrsts = PWRSTS_OFF_RET_ON,
  92. .pwrsts_logic_ret = PWRSTS_OFF,
  93. .banks = 1,
  94. .pwrsts_mem_ret = {
  95. [0] = PWRSTS_OFF, /* dss_mem */
  96. },
  97. .pwrsts_mem_on = {
  98. [0] = PWRSTS_ON, /* dss_mem */
  99. },
  100. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  101. };
  102. /* tesla_44xx_pwrdm: Tesla processor power domain */
  103. static struct powerdomain tesla_44xx_pwrdm = {
  104. .name = "tesla_pwrdm",
  105. .prcm_offs = OMAP4430_PRM_TESLA_INST,
  106. .prcm_partition = OMAP4430_PRM_PARTITION,
  107. .pwrsts = PWRSTS_OFF_RET_ON,
  108. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  109. .banks = 3,
  110. .pwrsts_mem_ret = {
  111. [0] = PWRSTS_RET, /* tesla_edma */
  112. [1] = PWRSTS_OFF_RET, /* tesla_l1 */
  113. [2] = PWRSTS_OFF_RET, /* tesla_l2 */
  114. },
  115. .pwrsts_mem_on = {
  116. [0] = PWRSTS_ON, /* tesla_edma */
  117. [1] = PWRSTS_ON, /* tesla_l1 */
  118. [2] = PWRSTS_ON, /* tesla_l2 */
  119. },
  120. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  121. };
  122. /* wkup_44xx_pwrdm: Wake-up power domain */
  123. static struct powerdomain wkup_44xx_pwrdm = {
  124. .name = "wkup_pwrdm",
  125. .prcm_offs = OMAP4430_PRM_WKUP_INST,
  126. .prcm_partition = OMAP4430_PRM_PARTITION,
  127. .pwrsts = PWRSTS_ON,
  128. .banks = 1,
  129. .pwrsts_mem_ret = {
  130. [0] = PWRSTS_OFF, /* wkup_bank */
  131. },
  132. .pwrsts_mem_on = {
  133. [0] = PWRSTS_ON, /* wkup_bank */
  134. },
  135. };
  136. /* cpu0_44xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
  137. static struct powerdomain cpu0_44xx_pwrdm = {
  138. .name = "cpu0_pwrdm",
  139. .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST,
  140. .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
  141. .pwrsts = PWRSTS_OFF_RET_ON,
  142. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  143. .banks = 1,
  144. .pwrsts_mem_ret = {
  145. [0] = PWRSTS_OFF_RET, /* cpu0_l1 */
  146. },
  147. .pwrsts_mem_on = {
  148. [0] = PWRSTS_ON, /* cpu0_l1 */
  149. },
  150. };
  151. /* cpu1_44xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
  152. static struct powerdomain cpu1_44xx_pwrdm = {
  153. .name = "cpu1_pwrdm",
  154. .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST,
  155. .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
  156. .pwrsts = PWRSTS_OFF_RET_ON,
  157. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  158. .banks = 1,
  159. .pwrsts_mem_ret = {
  160. [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
  161. },
  162. .pwrsts_mem_on = {
  163. [0] = PWRSTS_ON, /* cpu1_l1 */
  164. },
  165. };
  166. /* emu_44xx_pwrdm: Emulation power domain */
  167. static struct powerdomain emu_44xx_pwrdm = {
  168. .name = "emu_pwrdm",
  169. .prcm_offs = OMAP4430_PRM_EMU_INST,
  170. .prcm_partition = OMAP4430_PRM_PARTITION,
  171. .pwrsts = PWRSTS_OFF_ON,
  172. .banks = 1,
  173. .pwrsts_mem_ret = {
  174. [0] = PWRSTS_OFF, /* emu_bank */
  175. },
  176. .pwrsts_mem_on = {
  177. [0] = PWRSTS_ON, /* emu_bank */
  178. },
  179. };
  180. /* mpu_44xx_pwrdm: Modena processor and the Neon coprocessor power domain */
  181. static struct powerdomain mpu_44xx_pwrdm = {
  182. .name = "mpu_pwrdm",
  183. .prcm_offs = OMAP4430_PRM_MPU_INST,
  184. .prcm_partition = OMAP4430_PRM_PARTITION,
  185. .pwrsts = PWRSTS_RET_ON,
  186. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  187. .banks = 3,
  188. .pwrsts_mem_ret = {
  189. [0] = PWRSTS_OFF_RET, /* mpu_l1 */
  190. [1] = PWRSTS_OFF_RET, /* mpu_l2 */
  191. [2] = PWRSTS_RET, /* mpu_ram */
  192. },
  193. .pwrsts_mem_on = {
  194. [0] = PWRSTS_ON, /* mpu_l1 */
  195. [1] = PWRSTS_ON, /* mpu_l2 */
  196. [2] = PWRSTS_ON, /* mpu_ram */
  197. },
  198. };
  199. /* ivahd_44xx_pwrdm: IVA-HD power domain */
  200. static struct powerdomain ivahd_44xx_pwrdm = {
  201. .name = "ivahd_pwrdm",
  202. .prcm_offs = OMAP4430_PRM_IVAHD_INST,
  203. .prcm_partition = OMAP4430_PRM_PARTITION,
  204. .pwrsts = PWRSTS_OFF_RET_ON,
  205. .pwrsts_logic_ret = PWRSTS_OFF,
  206. .banks = 4,
  207. .pwrsts_mem_ret = {
  208. [0] = PWRSTS_OFF, /* hwa_mem */
  209. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  210. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  211. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  212. },
  213. .pwrsts_mem_on = {
  214. [0] = PWRSTS_ON, /* hwa_mem */
  215. [1] = PWRSTS_ON, /* sl2_mem */
  216. [2] = PWRSTS_ON, /* tcm1_mem */
  217. [3] = PWRSTS_ON, /* tcm2_mem */
  218. },
  219. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  220. };
  221. /* cam_44xx_pwrdm: Camera subsystem power domain */
  222. static struct powerdomain cam_44xx_pwrdm = {
  223. .name = "cam_pwrdm",
  224. .prcm_offs = OMAP4430_PRM_CAM_INST,
  225. .prcm_partition = OMAP4430_PRM_PARTITION,
  226. .pwrsts = PWRSTS_OFF_ON,
  227. .banks = 1,
  228. .pwrsts_mem_ret = {
  229. [0] = PWRSTS_OFF, /* cam_mem */
  230. },
  231. .pwrsts_mem_on = {
  232. [0] = PWRSTS_ON, /* cam_mem */
  233. },
  234. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  235. };
  236. /* l3init_44xx_pwrdm: L3 initators pheripherals power domain */
  237. static struct powerdomain l3init_44xx_pwrdm = {
  238. .name = "l3init_pwrdm",
  239. .prcm_offs = OMAP4430_PRM_L3INIT_INST,
  240. .prcm_partition = OMAP4430_PRM_PARTITION,
  241. .pwrsts = PWRSTS_RET_ON,
  242. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  243. .banks = 1,
  244. .pwrsts_mem_ret = {
  245. [0] = PWRSTS_OFF, /* l3init_bank1 */
  246. },
  247. .pwrsts_mem_on = {
  248. [0] = PWRSTS_ON, /* l3init_bank1 */
  249. },
  250. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  251. };
  252. /* l4per_44xx_pwrdm: Target peripherals power domain */
  253. static struct powerdomain l4per_44xx_pwrdm = {
  254. .name = "l4per_pwrdm",
  255. .prcm_offs = OMAP4430_PRM_L4PER_INST,
  256. .prcm_partition = OMAP4430_PRM_PARTITION,
  257. .pwrsts = PWRSTS_RET_ON,
  258. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  259. .banks = 2,
  260. .pwrsts_mem_ret = {
  261. [0] = PWRSTS_OFF, /* nonretained_bank */
  262. [1] = PWRSTS_RET, /* retained_bank */
  263. },
  264. .pwrsts_mem_on = {
  265. [0] = PWRSTS_ON, /* nonretained_bank */
  266. [1] = PWRSTS_ON, /* retained_bank */
  267. },
  268. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  269. };
  270. /*
  271. * always_on_core_44xx_pwrdm: Always ON logic that sits in VDD_CORE voltage
  272. * domain
  273. */
  274. static struct powerdomain always_on_core_44xx_pwrdm = {
  275. .name = "always_on_core_pwrdm",
  276. .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST,
  277. .prcm_partition = OMAP4430_PRM_PARTITION,
  278. .pwrsts = PWRSTS_ON,
  279. };
  280. /* cefuse_44xx_pwrdm: Customer efuse controller power domain */
  281. static struct powerdomain cefuse_44xx_pwrdm = {
  282. .name = "cefuse_pwrdm",
  283. .prcm_offs = OMAP4430_PRM_CEFUSE_INST,
  284. .prcm_partition = OMAP4430_PRM_PARTITION,
  285. .pwrsts = PWRSTS_OFF_ON,
  286. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  287. };
  288. /*
  289. * The following power domains are not under SW control
  290. *
  291. * always_on_iva
  292. * always_on_mpu
  293. * stdefuse
  294. */
  295. /* As powerdomains are added or removed above, this list must also be changed */
  296. static struct powerdomain *powerdomains_omap44xx[] __initdata = {
  297. &core_44xx_pwrdm,
  298. &gfx_44xx_pwrdm,
  299. &abe_44xx_pwrdm,
  300. &dss_44xx_pwrdm,
  301. &tesla_44xx_pwrdm,
  302. &wkup_44xx_pwrdm,
  303. &cpu0_44xx_pwrdm,
  304. &cpu1_44xx_pwrdm,
  305. &emu_44xx_pwrdm,
  306. &mpu_44xx_pwrdm,
  307. &ivahd_44xx_pwrdm,
  308. &cam_44xx_pwrdm,
  309. &l3init_44xx_pwrdm,
  310. &l4per_44xx_pwrdm,
  311. &always_on_core_44xx_pwrdm,
  312. &cefuse_44xx_pwrdm,
  313. NULL
  314. };
  315. void __init omap44xx_powerdomains_init(void)
  316. {
  317. pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
  318. pwrdm_register_pwrdms(powerdomains_omap44xx);
  319. pwrdm_complete_init();
  320. }