powerdomains2xxx_data.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * OMAP2XXX powerdomain definitions
  3. *
  4. * Copyright (C) 2007-2008, 2011 Texas Instruments, Inc.
  5. * Copyright (C) 2007-2011 Nokia Corporation
  6. *
  7. * Paul Walmsley, Jouni Högander
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/init.h>
  15. #include "soc.h"
  16. #include "powerdomain.h"
  17. #include "powerdomains2xxx_3xxx_data.h"
  18. #include "prcm-common.h"
  19. #include "prm2xxx_3xxx.h"
  20. #include "prm-regbits-24xx.h"
  21. /* 24XX powerdomains and dependencies */
  22. /* Powerdomains */
  23. static struct powerdomain dsp_pwrdm = {
  24. .name = "dsp_pwrdm",
  25. .prcm_offs = OMAP24XX_DSP_MOD,
  26. .pwrsts = PWRSTS_OFF_RET_ON,
  27. .pwrsts_logic_ret = PWRSTS_RET,
  28. .banks = 1,
  29. .pwrsts_mem_ret = {
  30. [0] = PWRSTS_RET,
  31. },
  32. .pwrsts_mem_on = {
  33. [0] = PWRSTS_ON,
  34. },
  35. .voltdm = { .name = "core" },
  36. };
  37. static struct powerdomain mpu_24xx_pwrdm = {
  38. .name = "mpu_pwrdm",
  39. .prcm_offs = MPU_MOD,
  40. .pwrsts = PWRSTS_OFF_RET_ON,
  41. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  42. .banks = 1,
  43. .pwrsts_mem_ret = {
  44. [0] = PWRSTS_RET,
  45. },
  46. .pwrsts_mem_on = {
  47. [0] = PWRSTS_ON,
  48. },
  49. .voltdm = { .name = "core" },
  50. };
  51. static struct powerdomain core_24xx_pwrdm = {
  52. .name = "core_pwrdm",
  53. .prcm_offs = CORE_MOD,
  54. .pwrsts = PWRSTS_OFF_RET_ON,
  55. .pwrsts_logic_ret = PWRSTS_RET,
  56. .banks = 3,
  57. .pwrsts_mem_ret = {
  58. [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
  59. [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
  60. [2] = PWRSTS_OFF_RET, /* MEM3RETSTATE */
  61. },
  62. .pwrsts_mem_on = {
  63. [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
  64. [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
  65. [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
  66. },
  67. .voltdm = { .name = "core" },
  68. };
  69. /*
  70. * 2430-specific powerdomains
  71. */
  72. /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
  73. static struct powerdomain mdm_pwrdm = {
  74. .name = "mdm_pwrdm",
  75. .prcm_offs = OMAP2430_MDM_MOD,
  76. .pwrsts = PWRSTS_OFF_RET_ON,
  77. .pwrsts_logic_ret = PWRSTS_RET,
  78. .banks = 1,
  79. .pwrsts_mem_ret = {
  80. [0] = PWRSTS_RET, /* MEMRETSTATE */
  81. },
  82. .pwrsts_mem_on = {
  83. [0] = PWRSTS_ON, /* MEMONSTATE */
  84. },
  85. .voltdm = { .name = "core" },
  86. };
  87. /*
  88. *
  89. */
  90. static struct powerdomain *powerdomains_omap24xx[] __initdata = {
  91. &wkup_omap2_pwrdm,
  92. &gfx_omap2_pwrdm,
  93. &dsp_pwrdm,
  94. &mpu_24xx_pwrdm,
  95. &core_24xx_pwrdm,
  96. NULL
  97. };
  98. static struct powerdomain *powerdomains_omap2430[] __initdata = {
  99. &mdm_pwrdm,
  100. NULL
  101. };
  102. void __init omap242x_powerdomains_init(void)
  103. {
  104. if (!cpu_is_omap2420())
  105. return;
  106. pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
  107. pwrdm_register_pwrdms(powerdomains_omap24xx);
  108. pwrdm_complete_init();
  109. }
  110. void __init omap243x_powerdomains_init(void)
  111. {
  112. if (!cpu_is_omap2430())
  113. return;
  114. pwrdm_register_platform_funcs(&omap2_pwrdm_operations);
  115. pwrdm_register_pwrdms(powerdomains_omap24xx);
  116. pwrdm_register_pwrdms(powerdomains_omap2430);
  117. pwrdm_complete_init();
  118. }