summaryrefslogtreecommitdiffstats
path: root/arch/sh/cpu
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2010-06-16 16:55:26 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2010-06-28 11:58:34 +0900
commit754613f740368f847a2261c5c41b034ff5c51b1c (patch)
treefb25150557d11066e81f8a8b2147c829a359293c /arch/sh/cpu
parent9a1e3e9fe3165130c228bc861bd96d49df708290 (diff)
downloadtalos-obmc-uboot-754613f740368f847a2261c5c41b034ff5c51b1c.tar.gz
talos-obmc-uboot-754613f740368f847a2261c5c41b034ff5c51b1c.zip
sh: Add trigger_address_error and support cpu reset
This add support cpu reset by trigger_address_error function. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'arch/sh/cpu')
-rw-r--r--arch/sh/cpu/sh2/watchdog.c8
-rw-r--r--arch/sh/cpu/sh3/watchdog.c7
-rw-r--r--arch/sh/cpu/sh4/watchdog.c4
3 files changed, 17 insertions, 2 deletions
diff --git a/arch/sh/cpu/sh2/watchdog.c b/arch/sh/cpu/sh2/watchdog.c
index de0254b446..0257d8d15d 100644
--- a/arch/sh/cpu/sh2/watchdog.c
+++ b/arch/sh/cpu/sh2/watchdog.c
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhoro@renesas.com>
- * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (C) 2008,2010 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
+ * Copyright (C) 2008,2010 Renesas Solutions Corp.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -20,6 +20,7 @@
#include <common.h>
#include <asm/processor.h>
+#include <asm/system.h>
int watchdog_init(void)
{
@@ -28,6 +29,9 @@ int watchdog_init(void)
void reset_cpu(unsigned long ignored)
{
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
while (1)
;
}
diff --git a/arch/sh/cpu/sh3/watchdog.c b/arch/sh/cpu/sh3/watchdog.c
index 92bea74719..90694f8664 100644
--- a/arch/sh/cpu/sh3/watchdog.c
+++ b/arch/sh/cpu/sh3/watchdog.c
@@ -1,4 +1,7 @@
/*
+ * (C) Copyright 2010
+ * Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
+ *
* (C) Copyright 2007
* Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
*
@@ -20,6 +23,7 @@
#include <common.h>
#include <asm/processor.h>
+#include <asm/system.h>
int watchdog_init(void)
{
@@ -28,6 +32,9 @@ int watchdog_init(void)
void reset_cpu(unsigned long ignored)
{
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
while (1)
;
}
diff --git a/arch/sh/cpu/sh4/watchdog.c b/arch/sh/cpu/sh4/watchdog.c
index f6924290f0..d7e1703e69 100644
--- a/arch/sh/cpu/sh4/watchdog.c
+++ b/arch/sh/cpu/sh4/watchdog.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <asm/processor.h>
+#include <asm/system.h>
#include <asm/io.h>
#define WDT_BASE WTCNT
@@ -66,6 +67,9 @@ int watchdog_disable(void)
void reset_cpu(unsigned long ignored)
{
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
while (1)
;
}
OpenPOWER on IntegriCloud