2 * Copyright (C) 2012-2014 Panasonic Corporation
3 * Copyright (C) 2015-2016 Socionext Inc.
4 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
6 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/secure.h>
15 /* If PSCI is enabled, this is used for SYSTEM_RESET function */
16 #ifdef CONFIG_ARMV7_PSCI
17 #define __SECURE __secure
22 void __SECURE reset_cpu(unsigned long ignored)
26 writel(5, SC_IRQTIMSET); /* default value */
28 tmp = readl(SC_SLFRSTSEL);
29 tmp &= ~0x3; /* mask [1:0] */
30 tmp |= 0x0; /* XRST reboot */
31 writel(tmp, SC_SLFRSTSEL);
33 tmp = readl(SC_SLFRSTCTL);
35 writel(tmp, SC_SLFRSTCTL);