Skip to content

Commit

Permalink
ARM: shmobile: sh73a0: Add restart callback
Browse files Browse the repository at this point in the history
Port the sh73a0 restart handling from the kzm9g-legacy board code to the
generic sh73a0 code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Geert Uytterhoeven authored and Simon Horman committed Nov 12, 2014
1 parent 950a3f0 commit cad9008
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm/mach-shmobile/setup-sh73a0.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,13 @@ void __init sh73a0_add_standard_devices_dt(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

#define RESCNT2 IOMEM(0xe6188020)
static void sh73a0_restart(enum reboot_mode mode, const char *cmd)
{
/* Do soft power on reset */
writel((1 << 31), RESCNT2);
}

static const char *sh73a0_boards_compat_dt[] __initdata = {
"renesas,sh73a0",
NULL,
Expand All @@ -786,6 +793,7 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
.init_early = sh73a0_init_delay,
.init_machine = sh73a0_add_standard_devices_dt,
.init_late = shmobile_init_late,
.restart = sh73a0_restart,
.dt_compat = sh73a0_boards_compat_dt,
MACHINE_END
#endif /* CONFIG_USE_OF */

0 comments on commit cad9008

Please sign in to comment.