diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2012-04-12 07:31:52 -0400 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-09-08 12:38:41 -0400 |
commit | 6d846c46683a4a8a54fbd30b0ff1434a7d898026 (patch) | |
tree | 14a62fe743a92c4df4ea25d5b1bdbe90cd3e70b1 /arch | |
parent | 4664d4d86012c4a51b9f40d0d72e27e39205e874 (diff) |
ARM: OMAP5 / DRA7: PM: Enable Mercury retention mode on CPUx powerdomains
In addition to the standard power-management technique, the OMAP5 / DRA7
MPU subsystem also employs an SR3-APG (mercury) power management
technology to reduce leakage.
It allows for full logic and memories retention on MPU_C0 and MPU_C1 and
is controlled by the PRCM_MPU. Only "Fast-mode" is supported on the
OMAP5 and DRA7 family of processors.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
[nm@ti.com: minor consolidation]
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/omap-mpuss-lowpower.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 63a1dd708d80..fad6e8c7e69e 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
@@ -321,6 +321,21 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) | |||
321 | 321 | ||
322 | 322 | ||
323 | /* | 323 | /* |
324 | * Enable Mercury Fast HG retention mode by default. | ||
325 | */ | ||
326 | static void enable_mercury_retention_mode(void) | ||
327 | { | ||
328 | u32 reg; | ||
329 | |||
330 | reg = omap4_prcm_mpu_read_inst_reg(OMAP54XX_PRCM_MPU_DEVICE_INST, | ||
331 | OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); | ||
332 | /* Enable HG_EN, HG_RAMPUP = fast mode */ | ||
333 | reg |= BIT(24) | BIT(25); | ||
334 | omap4_prcm_mpu_write_inst_reg(reg, OMAP54XX_PRCM_MPU_DEVICE_INST, | ||
335 | OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); | ||
336 | } | ||
337 | |||
338 | /* | ||
324 | * Initialise OMAP4 MPUSS | 339 | * Initialise OMAP4 MPUSS |
325 | */ | 340 | */ |
326 | int __init omap4_mpuss_init(void) | 341 | int __init omap4_mpuss_init(void) |
@@ -397,6 +412,7 @@ int __init omap4_mpuss_init(void) | |||
397 | cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET; | 412 | cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET; |
398 | } else if (soc_is_omap54xx() || soc_is_dra7xx()) { | 413 | } else if (soc_is_omap54xx() || soc_is_dra7xx()) { |
399 | cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET; | 414 | cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET; |
415 | enable_mercury_retention_mode(); | ||
400 | } | 416 | } |
401 | 417 | ||
402 | return 0; | 418 | return 0; |