Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / mips / mti-sead3 / sead3-reset.c
CommitLineData
3070033a
SH
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
7 */
8#include <linux/io.h>
9#include <linux/pm.h>
10
11#include <asm/reboot.h>
12#include <asm/mips-boards/generic.h>
13
14static void mips_machine_restart(char *command)
15{
16 unsigned int __iomem *softres_reg =
17 ioremap(SOFTRES_REG, sizeof(unsigned int));
18
19 __raw_writel(GORESET, softres_reg);
20}
21
22static void mips_machine_halt(void)
23{
24 unsigned int __iomem *softres_reg =
25 ioremap(SOFTRES_REG, sizeof(unsigned int));
26
27 __raw_writel(GORESET, softres_reg);
28}
29
30static int __init mips_reboot_setup(void)
31{
32 _machine_restart = mips_machine_restart;
33 _machine_halt = mips_machine_halt;
34 pm_power_off = mips_machine_halt;
35
36 return 0;
37}
38
39arch_initcall(mips_reboot_setup);