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