Commit | Line | Data |
---|---|---|
d2912cb1 | 1 | // SPDX-License-Identifier: GPL-2.0-only |
14e067c1 JSB |
2 | /* |
3 | * am33xx-restart.c - Code common to all AM33xx machines. | |
14e067c1 JSB |
4 | */ |
5 | #include <linux/kernel.h> | |
7b6d864b | 6 | #include <linux/reboot.h> |
14e067c1 JSB |
7 | |
8 | #include "common.h" | |
61c8621e | 9 | #include "prm.h" |
14e067c1 JSB |
10 | |
11 | /** | |
884632ab | 12 | * am33xx_restart - trigger a software restart of the SoC |
14e067c1 JSB |
13 | * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c |
14 | * @cmd: passed from the userspace program rebooting the system (if provided) | |
15 | * | |
16 | * Resets the SoC. For @cmd, see the 'reboot' syscall in | |
17 | * kernel/sys.c. No return value. | |
18 | */ | |
7b6d864b | 19 | void am33xx_restart(enum reboot_mode mode, const char *cmd) |
14e067c1 | 20 | { |
6521f6a1 AS |
21 | /* TODO: Handle cmd if necessary */ |
22 | prm_reboot_mode = mode; | |
14e067c1 | 23 | |
61c8621e | 24 | omap_prm_reset_system(); |
14e067c1 | 25 | } |