1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/plat-spear/restart.c
5 * SPEAr platform specific restart functions
7 * Copyright (C) 2009 ST Microelectronics
8 * Viresh Kumar <vireshk@kernel.org>
11 #include <linux/amba/sp810.h>
12 #include <linux/reboot.h>
13 #include <asm/system_misc.h>
17 #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204)
18 void spear_restart(enum reboot_mode mode
, const char *cmd
)
20 if (mode
== REBOOT_SOFT
) {
21 /* software reset, Jump into ROM at address 0 */
24 /* hardware reset, Use on-chip reset capability */
25 #ifdef CONFIG_ARCH_SPEAR13XX
26 writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES
);
28 #if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX)
29 sysctl_soft_reset((void __iomem
*)VA_SPEAR_SYS_CTRL_BASE
);