mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-16 09:48:16 +00:00
1a4596601f
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
40 lines
918 B
C
40 lines
918 B
C
/*
|
|
* (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>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.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(0, ®s->wcr);
|
|
|
|
/* Write Service Sequence */
|
|
writew(WSR_UNLOCK1, ®s->wsr);
|
|
writew(WSR_UNLOCK2, ®s->wsr);
|
|
|
|
/* Enable watchdog */
|
|
writew(WCR_WDE, ®s->wcr);
|
|
|
|
while (1) ;
|
|
}
|