0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <linux/kernel.h>
0020 #include <linux/init.h>
0021
0022 #include "powerdomain.h"
0023
0024 #include "prcm-common.h"
0025 #include "prcm44xx.h"
0026 #include "prm-regbits-44xx.h"
0027 #include "prm44xx.h"
0028 #include "prcm_mpu44xx.h"
0029
0030
0031 static struct powerdomain core_44xx_pwrdm = {
0032 .name = "core_pwrdm",
0033 .voltdm = { .name = "core" },
0034 .prcm_offs = OMAP4430_PRM_CORE_INST,
0035 .prcm_partition = OMAP4430_PRM_PARTITION,
0036 .pwrsts = PWRSTS_RET_ON,
0037 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0038 .banks = 5,
0039 .pwrsts_mem_ret = {
0040 [0] = PWRSTS_OFF,
0041 [1] = PWRSTS_RET,
0042 [2] = PWRSTS_RET,
0043 [3] = PWRSTS_OFF_RET,
0044 [4] = PWRSTS_OFF_RET,
0045 },
0046 .pwrsts_mem_on = {
0047 [0] = PWRSTS_ON,
0048 [1] = PWRSTS_ON,
0049 [2] = PWRSTS_ON,
0050 [3] = PWRSTS_ON,
0051 [4] = PWRSTS_ON,
0052 },
0053 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0054 };
0055
0056
0057 static struct powerdomain gfx_44xx_pwrdm = {
0058 .name = "gfx_pwrdm",
0059 .voltdm = { .name = "core" },
0060 .prcm_offs = OMAP4430_PRM_GFX_INST,
0061 .prcm_partition = OMAP4430_PRM_PARTITION,
0062 .pwrsts = PWRSTS_OFF_ON,
0063 .banks = 1,
0064 .pwrsts_mem_ret = {
0065 [0] = PWRSTS_OFF,
0066 },
0067 .pwrsts_mem_on = {
0068 [0] = PWRSTS_ON,
0069 },
0070 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0071 };
0072
0073
0074 static struct powerdomain abe_44xx_pwrdm = {
0075 .name = "abe_pwrdm",
0076 .voltdm = { .name = "iva" },
0077 .prcm_offs = OMAP4430_PRM_ABE_INST,
0078 .prcm_partition = OMAP4430_PRM_PARTITION,
0079 .pwrsts = PWRSTS_OFF_RET_ON,
0080 .pwrsts_logic_ret = PWRSTS_OFF,
0081 .banks = 2,
0082 .pwrsts_mem_ret = {
0083 [0] = PWRSTS_RET,
0084 [1] = PWRSTS_OFF,
0085 },
0086 .pwrsts_mem_on = {
0087 [0] = PWRSTS_ON,
0088 [1] = PWRSTS_ON,
0089 },
0090 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0091 };
0092
0093
0094 static struct powerdomain dss_44xx_pwrdm = {
0095 .name = "dss_pwrdm",
0096 .voltdm = { .name = "core" },
0097 .prcm_offs = OMAP4430_PRM_DSS_INST,
0098 .prcm_partition = OMAP4430_PRM_PARTITION,
0099 .pwrsts = PWRSTS_OFF_RET_ON,
0100 .pwrsts_logic_ret = PWRSTS_OFF,
0101 .banks = 1,
0102 .pwrsts_mem_ret = {
0103 [0] = PWRSTS_OFF,
0104 },
0105 .pwrsts_mem_on = {
0106 [0] = PWRSTS_ON,
0107 },
0108 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0109 };
0110
0111
0112 static struct powerdomain tesla_44xx_pwrdm = {
0113 .name = "tesla_pwrdm",
0114 .voltdm = { .name = "iva" },
0115 .prcm_offs = OMAP4430_PRM_TESLA_INST,
0116 .prcm_partition = OMAP4430_PRM_PARTITION,
0117 .pwrsts = PWRSTS_OFF_RET_ON,
0118 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0119 .banks = 3,
0120 .pwrsts_mem_ret = {
0121 [0] = PWRSTS_RET,
0122 [1] = PWRSTS_OFF_RET,
0123 [2] = PWRSTS_OFF_RET,
0124 },
0125 .pwrsts_mem_on = {
0126 [0] = PWRSTS_ON,
0127 [1] = PWRSTS_ON,
0128 [2] = PWRSTS_ON,
0129 },
0130 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0131 };
0132
0133
0134 static struct powerdomain wkup_44xx_pwrdm = {
0135 .name = "wkup_pwrdm",
0136 .voltdm = { .name = "wakeup" },
0137 .prcm_offs = OMAP4430_PRM_WKUP_INST,
0138 .prcm_partition = OMAP4430_PRM_PARTITION,
0139 .pwrsts = PWRSTS_ON,
0140 .banks = 1,
0141 .pwrsts_mem_ret = {
0142 [0] = PWRSTS_OFF,
0143 },
0144 .pwrsts_mem_on = {
0145 [0] = PWRSTS_ON,
0146 },
0147 };
0148
0149
0150 static struct powerdomain cpu0_44xx_pwrdm = {
0151 .name = "cpu0_pwrdm",
0152 .voltdm = { .name = "mpu" },
0153 .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST,
0154 .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
0155 .pwrsts = PWRSTS_OFF_RET_ON,
0156 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0157 .banks = 1,
0158 .pwrsts_mem_ret = {
0159 [0] = PWRSTS_OFF_RET,
0160 },
0161 .pwrsts_mem_on = {
0162 [0] = PWRSTS_ON,
0163 },
0164 };
0165
0166
0167 static struct powerdomain cpu1_44xx_pwrdm = {
0168 .name = "cpu1_pwrdm",
0169 .voltdm = { .name = "mpu" },
0170 .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST,
0171 .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
0172 .pwrsts = PWRSTS_OFF_RET_ON,
0173 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0174 .banks = 1,
0175 .pwrsts_mem_ret = {
0176 [0] = PWRSTS_OFF_RET,
0177 },
0178 .pwrsts_mem_on = {
0179 [0] = PWRSTS_ON,
0180 },
0181 };
0182
0183
0184 static struct powerdomain emu_44xx_pwrdm = {
0185 .name = "emu_pwrdm",
0186 .voltdm = { .name = "wakeup" },
0187 .prcm_offs = OMAP4430_PRM_EMU_INST,
0188 .prcm_partition = OMAP4430_PRM_PARTITION,
0189 .pwrsts = PWRSTS_OFF_ON,
0190 .banks = 1,
0191 .pwrsts_mem_ret = {
0192 [0] = PWRSTS_OFF,
0193 },
0194 .pwrsts_mem_on = {
0195 [0] = PWRSTS_ON,
0196 },
0197 };
0198
0199
0200 static struct powerdomain mpu_44xx_pwrdm = {
0201 .name = "mpu_pwrdm",
0202 .voltdm = { .name = "mpu" },
0203 .prcm_offs = OMAP4430_PRM_MPU_INST,
0204 .prcm_partition = OMAP4430_PRM_PARTITION,
0205 .pwrsts = PWRSTS_RET_ON,
0206 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0207 .banks = 3,
0208 .pwrsts_mem_ret = {
0209 [0] = PWRSTS_OFF_RET,
0210 [1] = PWRSTS_OFF_RET,
0211 [2] = PWRSTS_RET,
0212 },
0213 .pwrsts_mem_on = {
0214 [0] = PWRSTS_ON,
0215 [1] = PWRSTS_ON,
0216 [2] = PWRSTS_ON,
0217 },
0218 };
0219
0220
0221 static struct powerdomain ivahd_44xx_pwrdm = {
0222 .name = "ivahd_pwrdm",
0223 .voltdm = { .name = "iva" },
0224 .prcm_offs = OMAP4430_PRM_IVAHD_INST,
0225 .prcm_partition = OMAP4430_PRM_PARTITION,
0226 .pwrsts = PWRSTS_OFF_RET_ON,
0227 .pwrsts_logic_ret = PWRSTS_OFF,
0228 .banks = 4,
0229 .pwrsts_mem_ret = {
0230 [0] = PWRSTS_OFF,
0231 [1] = PWRSTS_OFF_RET,
0232 [2] = PWRSTS_OFF_RET,
0233 [3] = PWRSTS_OFF_RET,
0234 },
0235 .pwrsts_mem_on = {
0236 [0] = PWRSTS_ON,
0237 [1] = PWRSTS_ON,
0238 [2] = PWRSTS_ON,
0239 [3] = PWRSTS_ON,
0240 },
0241 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0242 };
0243
0244
0245 static struct powerdomain cam_44xx_pwrdm = {
0246 .name = "cam_pwrdm",
0247 .voltdm = { .name = "core" },
0248 .prcm_offs = OMAP4430_PRM_CAM_INST,
0249 .prcm_partition = OMAP4430_PRM_PARTITION,
0250 .pwrsts = PWRSTS_OFF_ON,
0251 .banks = 1,
0252 .pwrsts_mem_ret = {
0253 [0] = PWRSTS_OFF,
0254 },
0255 .pwrsts_mem_on = {
0256 [0] = PWRSTS_ON,
0257 },
0258 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0259 };
0260
0261
0262 static struct powerdomain l3init_44xx_pwrdm = {
0263 .name = "l3init_pwrdm",
0264 .voltdm = { .name = "core" },
0265 .prcm_offs = OMAP4430_PRM_L3INIT_INST,
0266 .prcm_partition = OMAP4430_PRM_PARTITION,
0267 .pwrsts = PWRSTS_RET_ON,
0268 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0269 .banks = 1,
0270 .pwrsts_mem_ret = {
0271 [0] = PWRSTS_OFF,
0272 },
0273 .pwrsts_mem_on = {
0274 [0] = PWRSTS_ON,
0275 },
0276 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0277 };
0278
0279
0280 static struct powerdomain l4per_44xx_pwrdm = {
0281 .name = "l4per_pwrdm",
0282 .voltdm = { .name = "core" },
0283 .prcm_offs = OMAP4430_PRM_L4PER_INST,
0284 .prcm_partition = OMAP4430_PRM_PARTITION,
0285 .pwrsts = PWRSTS_RET_ON,
0286 .pwrsts_logic_ret = PWRSTS_OFF_RET,
0287 .banks = 2,
0288 .pwrsts_mem_ret = {
0289 [0] = PWRSTS_OFF,
0290 [1] = PWRSTS_RET,
0291 },
0292 .pwrsts_mem_on = {
0293 [0] = PWRSTS_ON,
0294 [1] = PWRSTS_ON,
0295 },
0296 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0297 };
0298
0299
0300
0301
0302
0303 static struct powerdomain always_on_core_44xx_pwrdm = {
0304 .name = "always_on_core_pwrdm",
0305 .voltdm = { .name = "core" },
0306 .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST,
0307 .prcm_partition = OMAP4430_PRM_PARTITION,
0308 .pwrsts = PWRSTS_ON,
0309 };
0310
0311
0312 static struct powerdomain cefuse_44xx_pwrdm = {
0313 .name = "cefuse_pwrdm",
0314 .voltdm = { .name = "core" },
0315 .prcm_offs = OMAP4430_PRM_CEFUSE_INST,
0316 .prcm_partition = OMAP4430_PRM_PARTITION,
0317 .pwrsts = PWRSTS_OFF_ON,
0318 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
0319 };
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329
0330 static struct powerdomain *powerdomains_omap44xx[] __initdata = {
0331 &core_44xx_pwrdm,
0332 &gfx_44xx_pwrdm,
0333 &abe_44xx_pwrdm,
0334 &dss_44xx_pwrdm,
0335 &tesla_44xx_pwrdm,
0336 &wkup_44xx_pwrdm,
0337 &cpu0_44xx_pwrdm,
0338 &cpu1_44xx_pwrdm,
0339 &emu_44xx_pwrdm,
0340 &mpu_44xx_pwrdm,
0341 &ivahd_44xx_pwrdm,
0342 &cam_44xx_pwrdm,
0343 &l3init_44xx_pwrdm,
0344 &l4per_44xx_pwrdm,
0345 &always_on_core_44xx_pwrdm,
0346 &cefuse_44xx_pwrdm,
0347 NULL
0348 };
0349
0350 void __init omap44xx_powerdomains_init(void)
0351 {
0352 pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
0353 pwrdm_register_pwrdms(powerdomains_omap44xx);
0354 pwrdm_complete_init();
0355 }