blob: 5de2a0c2979d228d1da969cceeb986d2bd14ddb4 [file] [log] [blame]
Paul Walmsley2f334a32012-10-29 20:56:07 -06001/*
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 Holt7b6d8642013-07-08 16:01:40 -070015#include <linux/reboot.h>
Paul Walmsley2f334a32012-10-29 20:56:07 -060016
17#include "iomap.h"
18#include "common.h"
19#include "control.h"
20#include "prm3xxx.h"
21
22/* Global address base setup code */
23
24/**
25 * omap3xxx_restart - trigger a software restart of the SoC
26 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
27 * @cmd: passed from the userspace program rebooting the system (if provided)
28 *
29 * Resets the SoC. For @cmd, see the 'reboot' syscall in
30 * kernel/sys.c. No return value.
31 */
Robin Holt7b6d8642013-07-08 16:01:40 -070032void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
Paul Walmsley2f334a32012-10-29 20:56:07 -060033{
34 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
35 omap3xxx_prm_dpll3_reset(); /* never returns */
36 while (1);
37}