From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
lorenzo.pieralisi@arm.com, keita.kobayashi.ym@renesas.com,
horms@verge.net.au, Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 04/04] ARM: shmobile: Remove r8a7791 non-DT APMU override
Date: Thu, 21 May 2015 10:22:21 +0900 [thread overview]
Message-ID: <20150521012221.25972.69124.sendpatchset@little-apple> (raw)
In-Reply-To: <20150521012138.25972.91336.sendpatchset@little-apple>
From: Magnus Damm <damm+renesas@opensource.se>
Adjust the r8a7791 SoC support code to not configure any non-DT SMP code
in case the DT-based enable-method has been installed already.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
arch/arm/mach-shmobile/r8a7791.h | 2 +-
arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
arch/arm/mach-shmobile/smp-r8a7791.c | 11 ++++++++++-
3 files changed, 12 insertions(+), 3 deletions(-)
--- 0001/arch/arm/mach-shmobile/r8a7791.h
+++ work/arch/arm/mach-shmobile/r8a7791.h 2015-05-20 22:52:00.602366518 +0900
@@ -1,6 +1,6 @@
#ifndef __ASM_R8A7791_H__
#define __ASM_R8A7791_H__
-extern struct smp_operations r8a7791_smp_ops;
+bool r8a7791_smp_init(void);
#endif /* __ASM_R8A7791_H__ */
--- 0001/arch/arm/mach-shmobile/setup-r8a7791.c
+++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2015-05-20 22:55:48.172366518 +0900
@@ -29,7 +29,7 @@ static const char *r8a7791_boards_compat
};
DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
- .smp = smp_ops(r8a7791_smp_ops),
+ .smp_init = r8a7791_smp_init,
.init_early = shmobile_init_delay,
.init_time = rcar_gen2_timer_init,
.init_late = shmobile_init_late,
--- 0001/arch/arm/mach-shmobile/smp-r8a7791.c
+++ work/arch/arm/mach-shmobile/smp-r8a7791.c 2015-05-20 22:57:53.502366518 +0900
@@ -54,7 +54,7 @@ static int r8a7791_smp_boot_secondary(un
return shmobile_smp_apmu_boot_secondary(cpu, idle);
}
-struct smp_operations r8a7791_smp_ops __initdata = {
+static struct smp_operations r8a7791_smp_ops __initdata = {
.smp_prepare_cpus = r8a7791_smp_prepare_cpus,
.smp_boot_secondary = r8a7791_smp_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
@@ -63,3 +63,12 @@ struct smp_operations r8a7791_smp_ops __
.cpu_kill = shmobile_smp_apmu_cpu_kill,
#endif
};
+
+bool __init r8a7791_smp_init(void)
+{
+ /* only setup when no other DT based method is detected */
+ if (!platform_can_secondary_boot())
+ smp_set_ops(&r8a7791_smp_ops);
+
+ return true;
+}
prev parent reply other threads:[~2015-05-21 1:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 1:21 [PATCH 00/04] ARM: shmobile: APMU DT support via SMP Enable method Magnus Damm
2015-05-21 1:21 ` [PATCH 01/04] devicetree: bindings: Renesas APMU and " Magnus Damm
2015-05-21 1:22 ` [PATCH 02/04] ARM: shmobile: Add APMU DT support via " Magnus Damm
2015-05-21 8:13 ` Geert Uytterhoeven
2015-08-23 7:23 ` Magnus Damm
2015-05-21 1:22 ` [PATCH 03/04] ARM: shmobile: Add APMU nodes to r8a7791 DTSI Magnus Damm
2015-05-21 1:22 ` Magnus Damm [this message]
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=20150521012221.25972.69124.sendpatchset@little-apple \
--to=magnus.damm@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=horms@verge.net.au \
--cc=keita.kobayashi.ym@renesas.com \
--cc=linux-sh@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
/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).