Skip to content

Commit

Permalink
sh: mach-sdk7786: reset controller reboot support.
Browse files Browse the repository at this point in the history
This wires up the machine_ops reboot call to use the system reset
controller.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Jan 20, 2010
1 parent fbb82b0 commit b51989b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/sh/boards/mach-sdk7786/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/machvec.h>
#include <asm/heartbeat.h>
#include <asm/sizes.h>
#include <asm/reboot.h>

static struct resource heartbeat_resource = {
.start = 0x07fff8b0,
Expand Down Expand Up @@ -159,6 +160,11 @@ static int sdk7786_clk_init(void)
return ret;
}

static void sdk7786_restart(char *cmd)
{
fpga_write_reg(0xa5a5, SRSTR);
}

/* Initialize the board */
static void __init sdk7786_setup(char **cmdline_p)
{
Expand All @@ -167,6 +173,8 @@ static void __init sdk7786_setup(char **cmdline_p)
sdk7786_fpga_init();

pr_info("\tPCB revision:\t%d\n", fpga_read_reg(PCBRR) & 0xf);

machine_ops.restart = sdk7786_restart;
}

/*
Expand Down

0 comments on commit b51989b

Please sign in to comment.