From: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH RFC v2 7/7] ARM: shmobile: Use separate CPUCMCR addresses for CA15/CA7
Date: Mon, 29 Sep 2014 05:06:01 +0000 [thread overview]
Message-ID: <5428E8B9.1060209@renesas.com> (raw)
It turned out that the CPUCMCR common address was not worked for CA7.
Change to use separate CPUCMCR addresses for CA15 and CA7.
Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
---
arch/arm/mach-shmobile/platsmp-apmu.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 82db155..08718b3 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -36,9 +36,11 @@ static struct {
#define WUPCR_OFFS 0x10
#define PSTR_OFFS 0x40
#define CPUNCR_OFFS(n) (0x100 + (0x10 * (n)))
-#define CPUCMCR 0xe6154184
+#define CPUCMCR_CA7 0xe6151184
+#define CPUCMCR_CA15 0xe6152184
-void __iomem *cpucmcr;
+void __iomem *cpucmcr_ca7;
+void __iomem *cpucmcr_ca15;
static int __maybe_unused apmu_power_on(void __iomem *p, int bit)
{
@@ -254,13 +256,14 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
*/
gic_cpu_if_down();
- writel_relaxed(0x2, cpucmcr);
if (read_cpuid_part() = ARM_CPU_PART_CORTEX_A15) {
+ writel_relaxed(0x2, cpucmcr_ca15);
is_a15_l2shutdown = 1;
asm volatile("mrc p15, 1, %0, c9 , c0, 2"
: "=r" (l2ctlr_value));
pr_debug("%s: l2ctlr: 0x%08x\n", __func__, l2ctlr_value);
} else {
+ writel_relaxed(0x2, cpucmcr_ca7);
is_a15_l2shutdown = 0;
}
@@ -268,7 +271,11 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
cpu_leave_lowpower();
- writel_relaxed(0x0, cpucmcr);
+ if (read_cpuid_part() = ARM_CPU_PART_CORTEX_A15)
+ writel_relaxed(0x0, cpucmcr_ca15);
+ else
+ writel_relaxed(0x0, cpucmcr_ca7);
+
rcar_sysc_clear_event_status();
is_a15_l2shutdown = 0;
@@ -277,7 +284,9 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
void __init shmobile_smp_apmu_suspend_init(void)
{
- cpucmcr = ioremap_nocache(CPUCMCR, 0x4);
+ cpucmcr_ca7 = ioremap_nocache(CPUCMCR_CA7, 0x4);
+ cpucmcr_ca15 = ioremap_nocache(CPUCMCR_CA15, 0x4);
+
shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
}
#endif
--
1.7.9.5
reply other threads:[~2014-09-29 5:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5428E8B9.1060209@renesas.com \
--to=khiem.nguyen.xt@renesas.com \
--cc=linux-sh@vger.kernel.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 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.