]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/arm/cpu/arm926ejs/mx27/reset.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / arch / arm / cpu / arm926ejs / mx27 / reset.c
CommitLineData
1dc4da74
IY
1/*
2 * (C) Copyright 2002
3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
5 *
6 * (C) Copyright 2002
7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
8 * Alex Zuepke <azu@sysgo.de>
9 *
10 * (C) Copyright 2002
11 * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
12 *
13 * (C) Copyright 2009
14 * Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
15 *
1a459660 16 * SPDX-License-Identifier: GPL-2.0+
1dc4da74
IY
17 */
18
19#include <common.h>
20#include <asm/io.h>
21#include <asm/arch/imx-regs.h>
22
23/*
24 * Reset the cpu by setting up the watchdog timer and let it time out
25 */
77f11a99 26void reset_cpu(ulong ignored)
1dc4da74
IY
27{
28 struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
29 /* Disable watchdog and set Time-Out field to 0 */
30 writel(0x00000000, &regs->wcr);
31
32 /* Write Service Sequence */
33 writel(0x00005555, &regs->wsr);
34 writel(0x0000AAAA, &regs->wsr);
35
36 /* Enable watchdog */
37 writel(WCR_WDE, &regs->wcr);
38
39 while (1);
40 /*NOTREACHED*/
41}