Linux Audio

Check our new training course

Loading...
v3.15
 
 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>
15#include <linux/reboot.h>
16
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 */
32void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
33{
34	omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
35	omap3xxx_prm_dpll3_reset(); /* never returns */
36	while (1);
37}
v6.2
 1// SPDX-License-Identifier: GPL-2.0-only
 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>
 
 
 
 
 9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/reboot.h>
13
 
14#include "common.h"
15#include "control.h"
16#include "prm.h"
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 */
28void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
29{
30	omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
31	omap_prm_reset_system();
 
32}