1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-only 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * omap3-restart.c - Code common to all OMAP3xxx machines. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2009, 2012 Texas Instruments 6*4882a593Smuzhiyun * Copyright (C) 2010 Nokia Corporation 7*4882a593Smuzhiyun * Tony Lindgren <tony@atomide.com> 8*4882a593Smuzhiyun * Santosh Shilimkar <santosh.shilimkar@ti.com> 9*4882a593Smuzhiyun */ 10*4882a593Smuzhiyun #include <linux/kernel.h> 11*4882a593Smuzhiyun #include <linux/init.h> 12*4882a593Smuzhiyun #include <linux/reboot.h> 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun #include "common.h" 15*4882a593Smuzhiyun #include "control.h" 16*4882a593Smuzhiyun #include "prm.h" 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun /* Global address base setup code */ 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun /** 21*4882a593Smuzhiyun * omap3xxx_restart - trigger a software restart of the SoC 22*4882a593Smuzhiyun * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c 23*4882a593Smuzhiyun * @cmd: passed from the userspace program rebooting the system (if provided) 24*4882a593Smuzhiyun * 25*4882a593Smuzhiyun * Resets the SoC. For @cmd, see the 'reboot' syscall in 26*4882a593Smuzhiyun * kernel/sys.c. No return value. 27*4882a593Smuzhiyun */ omap3xxx_restart(enum reboot_mode mode,const char * cmd)28*4882a593Smuzhiyunvoid omap3xxx_restart(enum reboot_mode mode, const char *cmd) 29*4882a593Smuzhiyun { 30*4882a593Smuzhiyun omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); 31*4882a593Smuzhiyun omap_prm_reset_system(); 32*4882a593Smuzhiyun } 33