Afzal Mohammed | ab4c2e1 | 2013-05-27 20:05:19 +0530 | [diff] [blame] | 1 | /* |
| 2 | * omap4-restart.c - Common to OMAP4 and OMAP5 |
| 3 | * |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | */ |
| 9 | |
| 10 | #include <linux/types.h> |
Robin Holt | 7b6d864 | 2013-07-08 16:01:40 -0700 | [diff] [blame] | 11 | #include <linux/reboot.h> |
Sekhar Nori | 9e5d46b | 2015-07-11 20:29:16 +0530 | [diff] [blame] | 12 | #include "common.h" |
Tero Kristo | 61c8621 | 2014-10-27 08:39:26 -0700 | [diff] [blame] | 13 | #include "prm.h" |
Afzal Mohammed | ab4c2e1 | 2013-05-27 20:05:19 +0530 | [diff] [blame] | 14 | |
| 15 | /** |
| 16 | * omap44xx_restart - trigger a software restart of the SoC |
| 17 | * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c |
| 18 | * @cmd: passed from the userspace program rebooting the system (if provided) |
| 19 | * |
| 20 | * Resets the SoC. For @cmd, see the 'reboot' syscall in |
| 21 | * kernel/sys.c. No return value. |
| 22 | */ |
Robin Holt | 7b6d864 | 2013-07-08 16:01:40 -0700 | [diff] [blame] | 23 | void omap44xx_restart(enum reboot_mode mode, const char *cmd) |
Afzal Mohammed | ab4c2e1 | 2013-05-27 20:05:19 +0530 | [diff] [blame] | 24 | { |
| 25 | /* XXX Should save 'cmd' into scratchpad for use after reboot */ |
Tero Kristo | 61c8621 | 2014-10-27 08:39:26 -0700 | [diff] [blame] | 26 | omap_prm_reset_system(); |
Afzal Mohammed | ab4c2e1 | 2013-05-27 20:05:19 +0530 | [diff] [blame] | 27 | } |