]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/arm/cpu/arm926ejs/spear/reset.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[thirdparty/u-boot.git] / arch / arm / cpu / arm926ejs / spear / reset.c
CommitLineData
81c0ebf6
VK
1/*
2 * (C) Copyright 2009
3 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
81c0ebf6
VK
6 */
7
8#include <common.h>
9#include <asm/io.h>
10#include <asm/arch/hardware.h>
11#include <asm/arch/spr_syscntl.h>
12
13void reset_cpu(ulong ignored)
14{
15 struct syscntl_regs *syscntl_regs_p =
16 (struct syscntl_regs *)CONFIG_SPEAR_SYSCNTLBASE;
17
18 printf("System is going to reboot ...\n");
19
20 /*
21 * This 1 second delay will allow the above message
22 * to be printed before reset
23 */
24 udelay((1000 * 1000));
25
26 /* Going into slow mode before resetting SOC */
27 writel(0x02, &syscntl_regs_p->scctrl);
28
29 /*
30 * Writing any value to the system status register will
31 * reset the SoC
32 */
33 writel(0x00, &syscntl_regs_p->scsysstat);
34
35 /* system will restart */
36 while (1)
37 ;
38}