12f334a38SPaul Walmsley /* 22f334a38SPaul Walmsley * omap3-restart.c - Code common to all OMAP3xxx machines. 32f334a38SPaul Walmsley * 42f334a38SPaul Walmsley * Copyright (C) 2009, 2012 Texas Instruments 52f334a38SPaul Walmsley * Copyright (C) 2010 Nokia Corporation 62f334a38SPaul Walmsley * Tony Lindgren <tony@atomide.com> 72f334a38SPaul Walmsley * Santosh Shilimkar <santosh.shilimkar@ti.com> 82f334a38SPaul Walmsley * 92f334a38SPaul Walmsley * This program is free software; you can redistribute it and/or modify 102f334a38SPaul Walmsley * it under the terms of the GNU General Public License version 2 as 112f334a38SPaul Walmsley * published by the Free Software Foundation. 122f334a38SPaul Walmsley */ 132f334a38SPaul Walmsley #include <linux/kernel.h> 142f334a38SPaul Walmsley #include <linux/init.h> 157b6d864bSRobin Holt #include <linux/reboot.h> 162f334a38SPaul Walmsley 172f334a38SPaul Walmsley #include "control.h" 18*61c8621eSTero Kristo #include "prm.h" 192f334a38SPaul Walmsley 202f334a38SPaul Walmsley /* Global address base setup code */ 212f334a38SPaul Walmsley 222f334a38SPaul Walmsley /** 232f334a38SPaul Walmsley * omap3xxx_restart - trigger a software restart of the SoC 242f334a38SPaul Walmsley * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c 252f334a38SPaul Walmsley * @cmd: passed from the userspace program rebooting the system (if provided) 262f334a38SPaul Walmsley * 272f334a38SPaul Walmsley * Resets the SoC. For @cmd, see the 'reboot' syscall in 282f334a38SPaul Walmsley * kernel/sys.c. No return value. 292f334a38SPaul Walmsley */ 307b6d864bSRobin Holt void omap3xxx_restart(enum reboot_mode mode, const char *cmd) 312f334a38SPaul Walmsley { 322f334a38SPaul Walmsley omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); 33*61c8621eSTero Kristo omap_prm_reset_system(); 342f334a38SPaul Walmsley } 35