Update Viresh Kumar's email address
[deliverable/linux.git] / arch / arm / mach-spear / restart.c
CommitLineData
dd1661e2
RK
1/*
2 * arch/arm/plat-spear/restart.c
3 *
4 * SPEAr platform specific restart functions
5 *
6 * Copyright (C) 2009 ST Microelectronics
da89947b 7 * Viresh Kumar <vireshk@kernel.org>
dd1661e2
RK
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13#include <linux/io.h>
da660b4a 14#include <linux/amba/sp810.h>
7b6d864b 15#include <linux/reboot.h>
9f97da78 16#include <asm/system_misc.h>
5019f0b1 17#include <mach/spear.h>
2b9c613c 18#include "generic.h"
dd1661e2 19
e3978dc7 20#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204)
7b6d864b 21void spear_restart(enum reboot_mode mode, const char *cmd)
dd1661e2 22{
7b6d864b 23 if (mode == REBOOT_SOFT) {
dd1661e2
RK
24 /* software reset, Jump into ROM at address 0 */
25 soft_restart(0);
26 } else {
27 /* hardware reset, Use on-chip reset capability */
e3978dc7
VK
28#ifdef CONFIG_ARCH_SPEAR13XX
29 writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES);
af63275b
AB
30#endif
31#if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX)
dd1661e2 32 sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
e3978dc7 33#endif
dd1661e2
RK
34 }
35}
This page took 0.233454 seconds and 5 git commands to generate.