From: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: shmobile: smp-r8a7790: remove the obsolete RESCNT register
Date: Thu, 11 Jul 2013 09:51:39 +0000 [thread overview]
Message-ID: <51DE802B.6090401@renesas.com> (raw)
In-Reply-To: <51DE7FF4.5050800@renesas.com>
I should have notice this one, sorry for bothering you in v4 again.
The RESCNT register, which is supposed to be used to control clock supply
to CA15/CA7 clusters by manipulating dedicated MSTP bits, turned out that
it doesn't do anything good for clock supply to clusters. It was listed
in the datasheet v0.5, but it's now obsolete in the datasheet v0.6.
This patch removes the defines and routines related to RESCNT.
Note that, this patch removes r8a7790_deassert_reset(0) call in
r8a7790_smp_prepare_cpus at the time. As we already know, it's pointless
to deassert reset to CPU#0 (boot CPU) in the kernel initialization. It
was just there to set r8a7790_clst[0].use_count to 1 on start-up to keep
.use_count balanced.
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
---
arch/arm/mach-shmobile/smp-r8a7790.c | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
index a1696f4..1ab4c04 100644
--- a/arch/arm/mach-shmobile/smp-r8a7790.c
+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
@@ -25,7 +25,6 @@
#define CA7BAR 0x0030
#define CA15RESCNT 0x0040
#define CA7RESCNT 0x0044
-#define RESCNT 0x0050
#define APMU 0xe6150000
#define CA15WUPCR 0x2010
@@ -39,20 +38,16 @@ static struct {
unsigned int cabar;
unsigned int carescnt;
unsigned int carescnt_magic;
- unsigned int rescnt_bit;
- unsigned int use_count;
} r8a7790_clst[R8A7790_CLST_NR] = {
[R8A7790_CLST_CA15] = {
.cabar = CA15BAR,
.carescnt = CA15RESCNT,
.carescnt_magic = 0xa5a50000,
- .rescnt_bit = 1,
},
[R8A7790_CLST_CA7] = {
.cabar = CA7BAR,
.carescnt = CA7RESCNT,
.carescnt_magic = 0x5a5a0000,
- .rescnt_bit = 0,
},
};
@@ -71,12 +66,6 @@ static void r8a7790_deassert_reset(unsigned int cpu)
writel_relaxed(bar, p + r8a7790_clst[clst_id].cabar);
writel_relaxed(bar | 0x10, p + r8a7790_clst[clst_id].cabar);
- /* enable clocks for cluster */
- if (r8a7790_clst[clst_id].use_count++ = 0) {
- mask = 1 << r8a7790_clst[clst_id].rescnt_bit;
- writel_relaxed(readl_relaxed(p + RESCNT) & ~mask, p + RESCNT);
- }
-
/* enable per-core clocks */
mask = BIT(3 - r8a7790_cpu_id(cpu));
magic = r8a7790_clst[clst_id].carescnt_magic;
@@ -100,15 +89,6 @@ static void r8a7790_assert_reset(unsigned int cpu)
carescnt = p + r8a7790_clst[clst_id].carescnt;
writel_relaxed((readl_relaxed(carescnt) | mask) | magic, carescnt);
- /* disable clocks for cluster */
- if (r8a7790_clst[clst_id].use_count = 1) {
- mask = 1 << r8a7790_clst[clst_id].rescnt_bit;
- writel_relaxed(readl_relaxed(p + RESCNT) | mask, p + RESCNT);
- }
-
- if (r8a7790_clst[clst_id].use_count > 0)
- r8a7790_clst[clst_id].use_count--;
-
iounmap(p);
}
@@ -145,8 +125,6 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
r8a7790_assert_reset(k);
r8a7790_power_on(k);
}
-
- r8a7790_deassert_reset(0);
}
static int __cpuinit r8a7790_boot_secondary(unsigned int cpu,
--
1.8.3.2
next prev parent reply other threads:[~2013-07-11 9:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 9:59 [PATCH] ARM: shmobile: r8a7790 SMP prototype v1 (CA15 x 4) Magnus Damm
2013-06-26 23:58 ` [PATCH] ARM: shmobile: r8a7790 SMP prototype v2 Magnus Damm
2013-06-27 8:43 ` Russell King - ARM Linux
2013-07-08 4:48 ` Magnus Damm
2013-06-27 12:01 ` Arnd Bergmann
2013-07-08 4:52 ` Magnus Damm
2013-07-08 23:21 ` Arnd Bergmann
2013-07-09 1:29 ` Magnus Damm
2013-07-01 6:13 ` [PATCH] ARM: shmobile: r8a7790 SMP prototype v3 Magnus Damm
2013-07-08 2:24 ` Shinya Kuribayashi
2013-07-08 4:57 ` Magnus Damm
2013-07-10 10:41 ` [PATCH] ARM: shmobile: r8a7790 SMP prototype v4 Magnus Damm
2013-07-11 9:50 ` Shinya Kuribayashi
2013-07-11 9:51 ` Shinya Kuribayashi [this message]
2013-07-11 9:52 ` [PATCH 2/4] ARM: shmobile: smp-r8a7790: rename s/carescnt/rescnt/g Shinya Kuribayashi
2013-07-11 9:52 ` [PATCH 3/4] ARM: shmobile: smp-r8a7790: rename s/cabar/bar/g as well Shinya Kuribayashi
2013-07-11 9:52 ` [PATCH 4/4] ARM: shmobile: smp-r8a7790: power up a CPU core at .smp_boot_secondary stage Shinya Kuribayashi
2013-07-17 20:49 ` [PATCH] ARM: shmobile: r8a7790 SMP prototype v5 Magnus Damm
2013-07-18 0:32 ` Shinya Kuribayashi
2013-07-19 2:29 ` Simon Horman
2013-07-23 4:31 ` Simon Horman
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=51DE802B.6090401@renesas.com \
--to=shinya.kuribayashi.px@renesas.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).