powerdomains2xxx_data.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * OMAP2XXX powerdomain definitions
  3. *
  4. * Copyright (C) 2007-2008 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 "powerdomain.h"
  16. #include "powerdomains2xxx_3xxx_data.h"
  17. #include "prcm-common.h"
  18. #include "prm2xxx_3xxx.h"
  19. #include "prm-regbits-24xx.h"
  20. /* 24XX powerdomains and dependencies */
  21. /* Powerdomains */
  22. static struct powerdomain dsp_pwrdm = {
  23. .name = "dsp_pwrdm",
  24. .prcm_offs = OMAP24XX_DSP_MOD,
  25. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
  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. };
  36. static struct powerdomain mpu_24xx_pwrdm = {
  37. .name = "mpu_pwrdm",
  38. .prcm_offs = MPU_MOD,
  39. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
  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. };
  50. static struct powerdomain core_24xx_pwrdm = {
  51. .name = "core_pwrdm",
  52. .prcm_offs = CORE_MOD,
  53. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX),
  54. .pwrsts = PWRSTS_OFF_RET_ON,
  55. .banks = 3,
  56. .pwrsts_mem_ret = {
  57. [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
  58. [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
  59. [2] = PWRSTS_OFF_RET, /* MEM3RETSTATE */
  60. },
  61. .pwrsts_mem_on = {
  62. [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
  63. [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
  64. [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
  65. },
  66. };
  67. /*
  68. * 2430-specific powerdomains
  69. */
  70. #ifdef CONFIG_SOC_OMAP2430
  71. /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */
  72. static struct powerdomain mdm_pwrdm = {
  73. .name = "mdm_pwrdm",
  74. .prcm_offs = OMAP2430_MDM_MOD,
  75. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  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. };
  86. #endif /* CONFIG_SOC_OMAP2430 */
  87. /* As powerdomains are added or removed above, this list must also be changed */
  88. static struct powerdomain *powerdomains_omap2xxx[] __initdata = {
  89. &wkup_omap2_pwrdm,
  90. &gfx_omap2_pwrdm,
  91. #ifdef CONFIG_ARCH_OMAP2
  92. &dsp_pwrdm,
  93. &mpu_24xx_pwrdm,
  94. &core_24xx_pwrdm,
  95. #endif
  96. #ifdef CONFIG_SOC_OMAP2430
  97. &mdm_pwrdm,
  98. #endif
  99. NULL
  100. };
  101. void __init omap2xxx_powerdomains_init(void)
  102. {
  103. pwrdm_init(powerdomains_omap2xxx, &omap2_pwrdm_operations);
  104. }