blob: 77d4477c8dc5bb4c9ae3501a0e8500c81dc287e9 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Vikas Manocha33913c52014-11-18 10:42:22 -08002/*
Patrice Chotardcc551162017-10-23 09:53:59 +02003 * Copyright (C) 2014, STMicroelectronics - All Rights Reserved
4 * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
Vikas Manocha33913c52014-11-18 10:42:22 -08005 */
6
7#include <common.h>
Simon Glassafb02152019-12-28 10:45:01 -07008#include <cpu_func.h>
Vikas Manocha33913c52014-11-18 10:42:22 -08009#include <asm/io.h>
10#include <asm/arch/stv0991_wdru.h>
Simon Glassdbd79542020-05-10 11:40:11 -060011#include <linux/delay.h>
Harald Seiler6f14d5f2020-12-15 16:47:52 +010012void reset_cpu(void)
Vikas Manocha33913c52014-11-18 10:42:22 -080013{
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}