linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: magnus.damm@gmail.com (Magnus Damm)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops()
Date: Fri, 09 Aug 2013 18:50:21 +0900	[thread overview]
Message-ID: <20130809095021.6530.8841.sendpatchset@w520> (raw)
In-Reply-To: <20130809094748.6530.16511.sendpatchset@w520>

From: Magnus Damm <damm@opensource.se>

Rename sh73a0_init_delay() into sh73a0_init_early()
to make the function name show that more than just
delay setup will happen.

Also, instead of specifying the smp ops in DT_MACHINE
convert the sh73a0 SoC code to install the smp ops
from sh73a0_init_early().

The sh73a0_add_early_devices() function also gets
updated to call sh73a0_init_early(). This way the
smp ops will be installed in both DT and C cases.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-kzm9g-reference.c |    3 +--
 arch/arm/mach-shmobile/board-kzm9g.c           |    1 -
 arch/arm/mach-shmobile/include/mach/sh73a0.h   |    2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c          |   11 +++++++----
 4 files changed, 9 insertions(+), 8 deletions(-)

--- 0011/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c	2013-08-09 17:44:10.000000000 +0900
@@ -54,9 +54,8 @@ static const char *kzm9g_boards_compat_d
 };
 
 DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
-	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
-	.init_early	= sh73a0_init_delay,
+	.init_early	= sh73a0_init_early,
 	.init_machine	= kzm_init,
 	.dt_compat	= kzm9g_boards_compat_dt,
 MACHINE_END
--- 0001/arch/arm/mach-shmobile/board-kzm9g.c
+++ work/arch/arm/mach-shmobile/board-kzm9g.c	2013-08-09 17:44:01.000000000 +0900
@@ -904,7 +904,6 @@ static const char *kzm9g_boards_compat_d
 };
 
 DT_MACHINE_START(KZM9G_DT, "kzm9g")
-	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_add_early_devices,
 	.nr_irqs	= NR_IRQS_LEGACY,
--- 0010/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h	2013-08-09 17:42:03.000000000 +0900
@@ -71,7 +71,7 @@ enum {
 #define SH73A0_PINT0_IRQ(irq) ((irq) + 700)
 #define SH73A0_PINT1_IRQ(irq) ((irq) + 732)
 
-extern void sh73a0_init_delay(void);
+extern void sh73a0_init_early(void);
 extern void sh73a0_init_irq(void);
 extern void sh73a0_map_io(void);
 extern void sh73a0_earlytimer_init(void);
--- 0011/arch/arm/mach-shmobile/setup-sh73a0.c
+++ work/arch/arm/mach-shmobile/setup-sh73a0.c	2013-08-09 17:43:43.000000000 +0900
@@ -919,9 +919,12 @@ void __init sh73a0_add_standard_devices(
 			    ARRAY_SIZE(sh73a0_late_devices));
 }
 
-void __init sh73a0_init_delay(void)
+void __init sh73a0_init_early(void)
 {
 	shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */
+#ifdef CONFIG_SMP
+	smp_set_ops(&sh73a0_smp_ops);
+#endif
 }
 
 /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
@@ -929,7 +932,6 @@ void __init __weak sh73a0_register_twd(v
 
 void __init sh73a0_earlytimer_init(void)
 {
-	sh73a0_init_delay();
 	sh73a0_clock_init();
 	shmobile_earlytimer_init();
 	sh73a0_register_twd();
@@ -937,6 +939,8 @@ void __init sh73a0_earlytimer_init(void)
 
 void __init sh73a0_add_early_devices(void)
 {
+	sh73a0_init_early();
+
 	early_platform_add_devices(sh73a0_devices_dt,
 				   ARRAY_SIZE(sh73a0_devices_dt));
 	early_platform_add_devices(sh73a0_early_devices,
@@ -954,9 +958,8 @@ static const char *sh73a0_boards_compat_
 };
 
 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
-	.smp		= smp_ops(sh73a0_smp_ops),
 	.map_io		= sh73a0_map_io,
-	.init_early	= sh73a0_init_delay,
+	.init_early	= sh73a0_init_early,
 	.dt_compat	= sh73a0_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */

      parent reply	other threads:[~2013-08-09  9:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-09  9:47 [PATCH 00/14] ARM: shmobile: Cleanups and machine descriptor rework Magnus Damm
2013-08-09  9:47 ` [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case Magnus Damm
2013-08-09  9:48 ` [PATCH 02/14] ARM: shmobile: r8a7740: " Magnus Damm
2013-08-09  9:48 ` [PATCH 03/14] ARM: shmobile: sh7372: " Magnus Damm
2013-08-09  9:48 ` [PATCH 04/14] ARM: shmobile: sh73a0: " Magnus Damm
2013-08-09 10:47   ` Laurent Pinchart
2013-08-28  6:40     ` Magnus Damm
2013-08-28 12:08       ` Laurent Pinchart
2013-08-28 12:19         ` Magnus Damm
2013-08-30  0:30           ` Laurent Pinchart
2013-08-30  6:58             ` Magnus Damm
2013-08-09  9:48 ` [PATCH 05/14] ARM: shmobile: Remove r8a7740_add_early_devices_dt() Magnus Damm
2013-08-09  9:48 ` [PATCH 06/14] ARM: shmobile: Remove sh73a0_init_irq_dt() Magnus Damm
2013-08-09  9:49 ` [PATCH 07/14] ARM: shmobile: Remove r8a7779 ->nr_irqs Magnus Damm
2013-08-09  9:49 ` [PATCH 08/14] ARM: shmobile: Remove sh73a0 ->nr_irqs Magnus Damm
2013-08-09  9:49 ` [PATCH 09/14] ARM: shmobile: Rename to sh7372_init_early() Magnus Damm
2013-08-09 10:40   ` Laurent Pinchart
2013-08-09  9:49 ` [PATCH 10/14] ARM: shmobile: Rename to emev2_init_early(), use smp_set_ops() Magnus Damm
2013-08-09 10:41   ` Laurent Pinchart
2013-08-28  7:03     ` Magnus Damm
2013-08-28  7:53       ` Laurent Pinchart
2013-08-09  9:49 ` [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), " Magnus Damm
2013-08-09  9:49 ` [PATCH 12/14] ARM: shmobile: Rename to r8a7740_init_early() Magnus Damm
2013-08-09  9:50 ` [PATCH 13/14] ARM: shmobile: Rename to r8a7778_init_early() Magnus Damm
2013-08-09  9:50 ` 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=20130809095021.6530.8841.sendpatchset@w520 \
    --to=magnus.damm@gmail.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).