From: nicolas.pitre@linaro.org (Nicolas Pitre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: TC2: test the MCPM loopback during boot
Date: Tue, 24 Jun 2014 00:11:10 -0400 [thread overview]
Message-ID: <1403583071-5650-3-git-send-email-nicolas.pitre@linaro.org> (raw)
In-Reply-To: <1403583071-5650-1-git-send-email-nicolas.pitre@linaro.org>
This is not strictly needed on TC2 but still a good thing to exercise
that code.
Signed-off-by: nicolas Pitre <nico@linaro.org>
---
arch/arm/mach-vexpress/tc2_pm.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c
index b743a0ae02..54a9fff77c 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-vexpress/tc2_pm.c
@@ -323,6 +323,21 @@ static void __naked tc2_pm_power_up_setup(unsigned int affinity_level)
" b cci_enable_port_for_self ");
}
+static void __init tc2_cache_off(void)
+{
+ pr_info("TC2: disabling cache during MCPM loopback test\n");
+ if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A15) {
+ /* disable L2 prefetching on the Cortex-A15 */
+ asm volatile(
+ "mcr p15, 1, %0, c15, c0, 3 \n\t"
+ "isb \n\t"
+ "dsb "
+ : : "r" (0x400) );
+ }
+ v7_exit_coherency_flush(all);
+ cci_disable_port_by_cpu(read_cpuid_mpidr());
+}
+
static int __init tc2_pm_init(void)
{
int ret, irq;
@@ -370,6 +385,8 @@ static int __init tc2_pm_init(void)
ret = mcpm_platform_register(&tc2_pm_power_ops);
if (!ret) {
mcpm_sync_init(tc2_pm_power_up_setup);
+ /* test if we can (re)enable the CCI on our own */
+ BUG_ON(mcpm_loopback(tc2_cache_off) != 0);
pr_info("TC2 power management initialized\n");
}
return ret;
--
1.8.4.108.g55ea5f6
next prev parent reply other threads:[~2014-06-24 4:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 4:11 [PATCH 0/3] MCPM: clarify boot CPU situation wrt CCI Nicolas Pitre
2014-06-24 4:11 ` [PATCH 1/3] ARM: MCPM: provide infrastructure to allow for MCPM loopback Nicolas Pitre
2014-06-24 16:12 ` Doug Anderson
2014-06-24 4:11 ` Nicolas Pitre [this message]
2014-06-24 4:11 ` [PATCH 3/3] ARM: exynos: activate the CCI on boot CPU/cluster with the " Nicolas Pitre
2014-06-24 8:22 ` Tushar Behera
2014-06-24 16:15 ` Doug Anderson
2014-06-24 17:50 ` Nicolas Pitre
2014-06-24 15:35 ` [PATCH 0/3] MCPM: clarify boot CPU situation wrt CCI Kevin Hilman
2014-06-24 22:57 ` Doug Anderson
2014-06-26 2:41 ` Kevin Hilman
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=1403583071-5650-3-git-send-email-nicolas.pitre@linaro.org \
--to=nicolas.pitre@linaro.org \
--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).