xref: /openbmc/linux/arch/arm/mach-omap2/omap4-restart.c (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
2ab4c2e1bSAfzal Mohammed /*
3ab4c2e1bSAfzal Mohammed  * omap4-restart.c - Common to OMAP4 and OMAP5
4ab4c2e1bSAfzal Mohammed  */
5ab4c2e1bSAfzal Mohammed 
6ab4c2e1bSAfzal Mohammed #include <linux/types.h>
77b6d864bSRobin Holt #include <linux/reboot.h>
89e5d46b0SSekhar Nori #include "common.h"
961c8621eSTero Kristo #include "prm.h"
10ab4c2e1bSAfzal Mohammed 
11ab4c2e1bSAfzal Mohammed /**
12ab4c2e1bSAfzal Mohammed  * omap44xx_restart - trigger a software restart of the SoC
13ab4c2e1bSAfzal Mohammed  * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
14ab4c2e1bSAfzal Mohammed  * @cmd: passed from the userspace program rebooting the system (if provided)
15ab4c2e1bSAfzal Mohammed  *
16ab4c2e1bSAfzal Mohammed  * Resets the SoC.  For @cmd, see the 'reboot' syscall in
17ab4c2e1bSAfzal Mohammed  * kernel/sys.c.  No return value.
18ab4c2e1bSAfzal Mohammed  */
omap44xx_restart(enum reboot_mode mode,const char * cmd)197b6d864bSRobin Holt void omap44xx_restart(enum reboot_mode mode, const char *cmd)
20ab4c2e1bSAfzal Mohammed {
21ab4c2e1bSAfzal Mohammed 	/* XXX Should save 'cmd' into scratchpad for use after reboot */
2261c8621eSTero Kristo 	omap_prm_reset_system();
23ab4c2e1bSAfzal Mohammed }
24