From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/27] ARM: EXYNOS:: Enter a15 lowpower mode for Exynos3250 based on Cortex-a7
Date: Thu, 10 Apr 2014 10:51:15 +0100 [thread overview]
Message-ID: <87d2gp3430.fsf@approximate.cambridge.arm.com> (raw)
In-Reply-To: <1397122124-15690-7-git-send-email-cw00.choi@samsung.com> (Chanwoo Choi's message of "Thu, 10 Apr 2014 10:28:23 +0100")
On Thu, Apr 10 2014 at 10:28:23 am BST, Chanwoo Choi <cw00.choi@samsung.com> wrote:
> This patch decide proper lowpower mode of either a15 or a9 according to own ID
> from Main ID register.
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-exynos/hotplug.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
> index 5eead53..36d3db6 100644
> --- a/arch/arm/mach-exynos/hotplug.c
> +++ b/arch/arm/mach-exynos/hotplug.c
> @@ -135,13 +135,20 @@ void __ref exynos_cpu_die(unsigned int cpu)
> int primary_part = 0;
>
> /*
> - * we're ready for shutdown now, so do it.
> - * Exynos4 is A9 based while Exynos5 is A15; check the CPU part
> + * we're ready for shutdown now, so do it. Exynos4 is A9 based
> + * while Exynos5 is A15/Exynos7 is A7; check the CPU part
> * number by reading the Main ID register and then perform the
> * appropriate sequence for entering low power.
> */
> asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc");
While you're touching that code, how about using:
primary_part = read_cpuid(CPUID_ID);
> - if ((primary_part & 0xfff0) == 0xc0f0)
> +
> + /*
> + * Main ID register of Cortex series
> + * - Cortex-a7 : 0x410F_C07x
> + * - Cortex-a15 : 0x410F_C0Fx
> + */
> + primary_part = primary_part & 0xfff0;
> + if (primary_part == 0xc0f0 || primary_part == 0xc070)
ARM_CPU_PART_CORTEX_A15, ARM_CPU_PART_CORTEX_A7
> cpu_enter_lowpower_a15();
> else
> cpu_enter_lowpower_a9();
Thanks,
M.
--
Jazz is not dead. It just smells funny.
next prev parent reply other threads:[~2014-04-10 9:51 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 9:28 [PATCH 00/27] Support new Exynos3250 SoC based on Cortex-A7 dual core Chanwoo Choi
2014-04-10 9:28 ` [PATCH 01/27] ARM: EXYNOS: Add Exynos3250 SoC ID Chanwoo Choi
2014-04-10 9:43 ` Arnd Bergmann
2014-04-11 1:31 ` Chanwoo Choi
2014-04-14 6:20 ` Chanwoo Choi
2014-04-10 9:28 ` [PATCH 02/27] ARM: EXYNOS: Add IO mapping for non-secure SYSRAM of Exynos3250 Chanwoo Choi
2014-04-10 9:45 ` Arnd Bergmann
2014-04-10 9:57 ` Chanho Park
2014-04-10 9:28 ` [PATCH 03/27] ARM: EXYNOS: Add IO mapping for PMU " Chanwoo Choi
2014-04-10 9:46 ` Arnd Bergmann
2014-04-14 6:04 ` Chanwoo Choi
2014-04-10 9:28 ` [PATCH 04/27] ARM: EXYNOS: Support secondary CPU boot of Exynos4212 Chanwoo Choi
2014-04-10 9:28 ` [PATCH 05/27] ARM: EXYNOS: Support secondary CPU boot of Exynos3250 Chanwoo Choi
2014-04-10 9:28 ` [PATCH 06/27] ARM: EXYNOS:: Enter a15 lowpower mode for Exynos3250 based on Cortex-a7 Chanwoo Choi
2014-04-10 9:40 ` Arnd Bergmann
2014-04-10 10:38 ` Chanwoo Choi
2014-04-10 9:51 ` Marc Zyngier [this message]
2014-04-10 10:56 ` Chanwoo Choi
2014-04-10 12:07 ` Marc Zyngier
2014-04-11 0:36 ` Chanwoo Choi
2014-04-10 9:28 ` [PATCH 07/27] irqchip: Declare cortex-a7's irqchip to initialize gic from dt Chanwoo Choi
2014-04-10 10:04 ` Marc Zyngier
2014-04-10 10:09 ` armdev
2014-04-10 10:21 ` Marc Zyngier
2014-04-10 10:30 ` armdev
2014-04-10 10:41 ` Marc Zyngier
2014-04-10 10:42 ` armdev
2014-04-10 10:50 ` Marc Zyngier
2014-04-10 10:37 ` Chanho Park
2014-04-10 10:46 ` Marc Zyngier
2014-04-10 13:02 ` Mark Rutland
2014-04-10 9:28 ` [PATCH 08/27] pinctrl: exynos: Add driver data for Exynos3250 Chanwoo Choi
2014-04-10 18:42 ` Linus Walleij
2014-04-10 19:17 ` Tomasz Figa
2014-04-11 0:44 ` Chanwoo Choi
2014-04-10 9:32 ` [PATCH 00/27] Support new Exynos3250 SoC based on Cortex-A7 dual core Chanwoo Choi
-- strict thread matches above, loose matches on Subject: below --
2014-04-10 9:37 Chanwoo Choi
2014-04-10 9:37 ` [PATCH 06/27] ARM: EXYNOS:: Enter a15 lowpower mode for Exynos3250 based on Cortex-a7 Chanwoo Choi
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=87d2gp3430.fsf@approximate.cambridge.arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).