[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1398388572-30239-5-git-send-email-cw00.choi@samsung.com>
Date: Fri, 25 Apr 2014 10:16:09 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: kgene.kim@...sung.com, t.figa@...sung.com
Cc: linux-kernel@...r.kernel.org, linux@....linux.org.uk,
ben-linux@...ff.org, arnd@...db.de, olof@...om.net,
marc.zyngier@....com, thomas.abraham@...aro.org,
kyungmin.park@...sung.com, cw00.choi@...sung.com,
inki.dae@...sung.com, sw0312.kim@...sung.com,
hyunhee.kim@...sung.com, yj44.cho@...sung.com,
chanho61.park@...sung.com, sajjan.linux@...il.com,
tushar.behera@...aro.org, sachin.kamat@...aro.org,
linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org
Subject: [PATCHv4 4/7] ARM: EXYNOS: Enter a15 lowpower mode for Exynos3250
based on Cortex-a7
This patch decide proper lowpower mode of either a15 or a9 according to own ID
from Main ID register.
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Marc Zynigier <marc.zyngier@....com>
Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
Acked-by: Kyungmin Park <kyungmin.park@...sung.com>
---
arch/arm/mach-exynos/hotplug.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 5eead53..acf3119 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -135,16 +135,21 @@ 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
- * number by reading the Main ID register and then perform the
- * appropriate sequence for entering low power.
+ * Prepare the CPU for shutting down. The required sequence of
+ * operations depends on core type. CPUID part number can be used to
+ * determine the right way.
*/
- asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc");
- if ((primary_part & 0xfff0) == 0xc0f0)
+ primary_part = read_cpuid_part_number();
+
+ switch (primary_part) {
+ case ARM_CPU_PART_CORTEX_A7:
+ case ARM_CPU_PART_CORTEX_A15:
cpu_enter_lowpower_a15();
- else
+ break;
+ default:
cpu_enter_lowpower_a9();
+ break;
+ }
platform_do_lowpower(cpu, &spurious);
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists