Paul Walmsley | 2f334a3 | 2012-10-29 20:56:07 -0600 | [diff] [blame] | 1 | /* |
| 2 | * omap3-restart.c - Code common to all OMAP3xxx machines. |
| 3 | * |
| 4 | * Copyright (C) 2009, 2012 Texas Instruments |
| 5 | * Copyright (C) 2010 Nokia Corporation |
| 6 | * Tony Lindgren <tony@atomide.com> |
| 7 | * Santosh Shilimkar <santosh.shilimkar@ti.com> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. |
| 12 | */ |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/init.h> |
Robin Holt | 7b6d864 | 2013-07-08 16:01:40 -0700 | [diff] [blame] | 15 | #include <linux/reboot.h> |
Paul Walmsley | 2f334a3 | 2012-10-29 20:56:07 -0600 | [diff] [blame] | 16 | |
Sekhar Nori | 9e5d46b | 2015-07-11 20:29:16 +0530 | [diff] [blame] | 17 | #include "common.h" |
Paul Walmsley | 2f334a3 | 2012-10-29 20:56:07 -0600 | [diff] [blame] | 18 | #include "control.h" |
Tero Kristo | 61c8621 | 2014-10-27 08:39:26 -0700 | [diff] [blame] | 19 | #include "prm.h" |
Paul Walmsley | 2f334a3 | 2012-10-29 20:56:07 -0600 | [diff] [blame] | 20 | |
| 21 | /* Global address base setup code */ |
| 22 | |
| 23 | /** |
| 24 | * omap3xxx_restart - trigger a software restart of the SoC |
| 25 | * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c |
| 26 | * @cmd: passed from the userspace program rebooting the system (if provided) |
| 27 | * |
| 28 | * Resets the SoC. For @cmd, see the 'reboot' syscall in |
| 29 | * kernel/sys.c. No return value. |
| 30 | */ |
Robin Holt | 7b6d864 | 2013-07-08 16:01:40 -0700 | [diff] [blame] | 31 | void omap3xxx_restart(enum reboot_mode mode, const char *cmd) |
Paul Walmsley | 2f334a3 | 2012-10-29 20:56:07 -0600 | [diff] [blame] | 32 | { |
| 33 | omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); |
Tero Kristo | 61c8621 | 2014-10-27 08:39:26 -0700 | [diff] [blame] | 34 | omap_prm_reset_system(); |
Paul Walmsley | 2f334a3 | 2012-10-29 20:56:07 -0600 | [diff] [blame] | 35 | } |