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>
/*
- * 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
#include <common.h>
#include <asm/processor.h>
+#include <asm/system.h>
int watchdog_init(void)
{
void reset_cpu(unsigned long ignored)
{
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
while (1)
;
}
/*
+ * (C) Copyright 2010
+ * Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
+ *
* (C) Copyright 2007
* Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
*
#include <common.h>
#include <asm/processor.h>
+#include <asm/system.h>
int watchdog_init(void)
{
void reset_cpu(unsigned long ignored)
{
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
while (1)
;
}
#include <common.h>
#include <asm/processor.h>
+#include <asm/system.h>
#include <asm/io.h>
#define WDT_BASE WTCNT
void reset_cpu(unsigned long ignored)
{
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
while (1)
;
}
#define arch_align_stack(x) (x)
+static inline void trigger_address_error(void)
+{
+ __asm__ __volatile__ (
+ "ldc %0, sr\n\t"
+ "mov.l @%1, %0"
+ :
+ : "r" (0x10000000), "r" (0x80000001)
+ );
+}
+
#endif