mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
9a3b4ceb37
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
41 lines
947 B
C
41 lines
947 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2002
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
*
|
|
* (C) Copyright 2002
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
* Alex Zuepke <azu@sysgo.de>
|
|
*
|
|
* (C) Copyright 2002
|
|
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
|
|
*
|
|
* (C) Copyright 2009
|
|
* Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <cpu_func.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/imx-regs.h>
|
|
|
|
/*
|
|
* Reset the cpu by setting up the watchdog timer and let it time out
|
|
*/
|
|
void reset_cpu(ulong ignored)
|
|
{
|
|
struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
|
|
/* Disable watchdog and set Time-Out field to 0 */
|
|
writew(0x0000, ®s->wcr);
|
|
|
|
/* Write Service Sequence */
|
|
writew(0x5555, ®s->wsr);
|
|
writew(0xAAAA, ®s->wsr);
|
|
|
|
/* Enable watchdog */
|
|
writew(WCR_WDE, ®s->wcr);
|
|
|
|
while (1);
|
|
/*NOTREACHED*/
|
|
}
|