]> git.ipfire.org Git - thirdparty/u-boot.git/blob - arch/arm/cpu/armv7/stv0991/reset.c
Makefile: Improve generated_defconfig file handling
[thirdparty/u-boot.git] / arch / arm / cpu / armv7 / stv0991 / reset.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Copyright (C) 2014, STMicroelectronics - All Rights Reserved
4 * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
5 */
6
7 #include <common.h>
8 #include <cpu_func.h>
9 #include <asm/io.h>
10 #include <asm/arch/stv0991_wdru.h>
11 #include <linux/delay.h>
12 void reset_cpu(void)
13 {
14 puts("System is going to reboot ...\n");
15 /*
16 * This 1 second delay will allow the above message
17 * to be printed before reset
18 */
19 udelay((1000 * 1000));
20
21 /* Setting bit 1 of the WDRU unit will reset the SoC */
22 writel(WDRU_RST_SYS, &stv0991_wd_ru_ptr->wdru_ctrl1);
23
24 /* system will restart */
25 while (1)
26 ;
27 }