linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/05] ARM: shmobile: r8a7740: Add restart callback
@ 2014-08-28  3:35 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2014-08-28  3:35 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm+renesas@opensource.se>

Port the r8a7740 restart handling from the Armadillo code
to the r8a7740 generic multiplatform case.

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

 arch/arm/mach-shmobile/setup-r8a7740.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- 0001/arch/arm/mach-shmobile/setup-r8a7740.c
+++ work/arch/arm/mach-shmobile/setup-r8a7740.c	2014-08-27 18:40:36.000000000 +0900
@@ -823,6 +823,13 @@ static void __init r8a7740_generic_init(
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
+#define RESCNT2 IOMEM(0xe6188020)
+static void r8a7740_restart(enum reboot_mode mode, const char *cmd)
+{
+	/* Do soft power on reset */
+	writel(1 << 31, RESCNT2);
+}
+
 static const char *r8a7740_boards_compat_dt[] __initdata = {
 	"renesas,r8a7740",
 	NULL,
@@ -835,6 +842,7 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8
 	.init_machine	= r8a7740_generic_init,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a7740_boards_compat_dt,
+	.restart	= r8a7740_restart,
 MACHINE_END
 
 #endif /* CONFIG_USE_OF */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-28  3:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28  3:35 [PATCH 03/05] ARM: shmobile: r8a7740: Add restart callback Magnus Damm

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).