From: Nishanth Menon <nm@ti.com> To: Santosh Shilimkar <santosh.shilimkar@ti.com>, Tony Lindgren <tony@atomide.com>, Tero Kristo <t-kristo@ti.com>, Paul Walmsley <paul@pwsan.com> Cc: "Kevin Hilman" <khilman@deeprootsystems.com>, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Keerthy <j-keerthy@ti.com>, "Benoît Cousson" <bcousson@baylibre.com>, "Nishanth Menon" <nm@ti.com> Subject: [PATCH 04/10] ARM: OMAP5 / DRA7: PM: Enable Mercury retention mode on CPUx powerdomains Date: Fri, 22 Aug 2014 09:02:28 -0500 [thread overview] Message-ID: <1408716154-26101-5-git-send-email-nm@ti.com> (raw) In-Reply-To: <1408716154-26101-1-git-send-email-nm@ti.com> From: Santosh Shilimkar <santosh.shilimkar@ti.com> 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> --- This has a minor checkpatch warning for aligning with '(', but that when fixed results in over 80 char warning. So choose '(' check instead :D. arch/arm/mach-omap2/omap-mpuss-lowpower.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 63a1dd7..fad6e8c 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) /* + * Enable Mercury Fast HG retention mode by default. + */ +static void enable_mercury_retention_mode(void) +{ + u32 reg; + + reg = omap4_prcm_mpu_read_inst_reg(OMAP54XX_PRCM_MPU_DEVICE_INST, + OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); + /* Enable HG_EN, HG_RAMPUP = fast mode */ + reg |= BIT(24) | BIT(25); + omap4_prcm_mpu_write_inst_reg(reg, OMAP54XX_PRCM_MPU_DEVICE_INST, + OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); +} + +/* * Initialise OMAP4 MPUSS */ int __init omap4_mpuss_init(void) @@ -397,6 +412,7 @@ int __init omap4_mpuss_init(void) cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET; } else if (soc_is_omap54xx() || soc_is_dra7xx()) { cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET; + enable_mercury_retention_mode(); } return 0; -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/10] ARM: OMAP5 / DRA7: PM: Enable Mercury retention mode on CPUx powerdomains Date: Fri, 22 Aug 2014 09:02:28 -0500 [thread overview] Message-ID: <1408716154-26101-5-git-send-email-nm@ti.com> (raw) In-Reply-To: <1408716154-26101-1-git-send-email-nm@ti.com> From: Santosh Shilimkar <santosh.shilimkar@ti.com> 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 at ti.com: minor consolidation] Signed-off-by: Nishanth Menon <nm@ti.com> --- This has a minor checkpatch warning for aligning with '(', but that when fixed results in over 80 char warning. So choose '(' check instead :D. arch/arm/mach-omap2/omap-mpuss-lowpower.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 63a1dd7..fad6e8c 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) /* + * Enable Mercury Fast HG retention mode by default. + */ +static void enable_mercury_retention_mode(void) +{ + u32 reg; + + reg = omap4_prcm_mpu_read_inst_reg(OMAP54XX_PRCM_MPU_DEVICE_INST, + OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); + /* Enable HG_EN, HG_RAMPUP = fast mode */ + reg |= BIT(24) | BIT(25); + omap4_prcm_mpu_write_inst_reg(reg, OMAP54XX_PRCM_MPU_DEVICE_INST, + OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET); +} + +/* * Initialise OMAP4 MPUSS */ int __init omap4_mpuss_init(void) @@ -397,6 +412,7 @@ int __init omap4_mpuss_init(void) cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET; } else if (soc_is_omap54xx() || soc_is_dra7xx()) { cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET; + enable_mercury_retention_mode(); } return 0; -- 1.7.9.5
next prev parent reply other threads:[~2014-08-22 14:05 UTC|newest] Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-22 14:02 [PATCH 00/10] ARM: OMAP5 / DRA7: Add framework for suspend and cpuidle Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 01/10] ARM: OMAP5 / DRA7: PM: Update CPU context register offset Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 02/10] ARM: OMAP5 / DRA7: PM: Set MPUSS-EMIF clock-domain static dependency Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-27 18:44 ` Kevin Hilman 2014-08-27 18:44 ` Kevin Hilman 2014-08-22 14:02 ` [PATCH 03/10] ARM: OMAP5 / DRA7: PM / wakeupgen: Enables ES2 PM mode by default Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon [this message] 2014-08-22 14:02 ` [PATCH 04/10] ARM: OMAP5 / DRA7: PM: Enable Mercury retention mode on CPUx powerdomains Nishanth Menon 2014-08-22 14:02 ` [PATCH 05/10] ARM: OMAP5 / DRA7: PM: Avoid all SAR saves Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 06/10] ARM: OMAP5 / DRA7: PM: Provide a dummy startup function for CPU hotplug Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 07/10] ARM: OMAP5 / DRA7: Enable CPU RET on suspend Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-27 18:58 ` Kevin Hilman 2014-08-27 18:58 ` Kevin Hilman 2014-08-27 19:05 ` Nishanth Menon 2014-08-27 19:05 ` Nishanth Menon 2014-08-27 19:41 ` Tony Lindgren 2014-08-27 19:41 ` Tony Lindgren 2014-08-27 19:43 ` Santosh Shilimkar 2014-08-27 19:43 ` Santosh Shilimkar 2014-08-27 19:45 ` Nishanth Menon 2014-08-27 19:45 ` Nishanth Menon 2014-09-05 21:15 ` Nishanth Menon 2014-09-05 21:15 ` Nishanth Menon 2014-09-05 21:30 ` Tony Lindgren 2014-09-05 21:30 ` Tony Lindgren 2014-09-08 17:23 ` Grazvydas Ignotas 2014-09-08 17:23 ` Grazvydas Ignotas 2014-09-08 18:34 ` Nishanth Menon 2014-09-08 18:34 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 08/10] ARM: OMAP5/DRA7: PM: cpuidle MPU CSWR support Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-27 19:13 ` Kevin Hilman 2014-08-27 19:13 ` Kevin Hilman 2014-08-27 19:35 ` Nishanth Menon 2014-08-27 19:35 ` Nishanth Menon 2014-08-27 19:41 ` Santosh Shilimkar 2014-08-27 19:41 ` Santosh Shilimkar 2014-08-27 20:22 ` Kevin Hilman 2014-08-27 20:22 ` Kevin Hilman 2014-09-05 21:18 ` Nishanth Menon 2014-09-05 21:18 ` Nishanth Menon 2014-09-05 21:18 ` Nishanth Menon 2014-09-16 16:34 ` Nishanth Menon 2014-09-16 16:34 ` Nishanth Menon 2014-09-16 16:34 ` Nishanth Menon 2014-09-17 18:49 ` Daniel Lezcano 2014-09-17 18:49 ` Daniel Lezcano 2014-09-17 18:49 ` Daniel Lezcano 2014-09-17 23:20 ` Shilimkar, Santosh 2014-09-17 23:20 ` Shilimkar, Santosh 2014-09-17 23:20 ` Shilimkar, Santosh 2014-09-18 0:22 ` Daniel Lezcano 2014-09-18 0:22 ` Daniel Lezcano 2014-09-18 0:42 ` Shilimkar, Santosh 2014-09-18 0:42 ` Shilimkar, Santosh 2014-09-18 0:42 ` Shilimkar, Santosh 2014-09-18 13:41 ` Nishanth Menon 2014-09-18 13:41 ` Nishanth Menon 2014-09-18 13:50 ` Nishanth Menon 2014-09-18 13:50 ` Nishanth Menon 2014-09-22 13:02 ` Nishanth Menon 2014-09-22 13:02 ` Nishanth Menon 2014-09-22 13:17 ` Nishanth Menon 2014-09-22 13:17 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 09/10] ARM: OMAP5: Add hook in SoC initcalls to enable pm initialization Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` [PATCH 10/10] ARM: DRA7: " Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-22 14:02 ` Nishanth Menon 2014-08-25 16:36 ` [PATCH 00/10] ARM: OMAP5 / DRA7: Add framework for suspend and cpuidle Nishanth Menon 2014-08-25 16:36 ` Nishanth Menon 2014-08-27 19:15 ` Kevin Hilman 2014-08-27 19:15 ` Kevin Hilman 2014-09-08 16:29 ` Nishanth Menon 2014-09-08 16:29 ` Nishanth Menon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1408716154-26101-5-git-send-email-nm@ti.com \ --to=nm@ti.com \ --cc=bcousson@baylibre.com \ --cc=j-keerthy@ti.com \ --cc=khilman@deeprootsystems.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=paul@pwsan.com \ --cc=santosh.shilimkar@ti.com \ --cc=t-kristo@ti.com \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.