treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / sgi-ip30 / ip30-power.c
blob120b3f3d5108bbe08d69a594122125e0a9da9b1c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * ip30-power.c: Software powerdown and reset handling for IP30 architecture.
5 * Copyright (C) 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
6 * 2014 Joshua Kinard <kumba@gentoo.org>
7 * 2009 Johannes Dickgreber <tanzy@gmx.de>
8 */
10 #include <linux/init.h>
11 #include <linux/kernel.h>
12 #include <linux/module.h>
13 #include <linux/sched.h>
14 #include <linux/notifier.h>
15 #include <linux/delay.h>
16 #include <linux/rtc/ds1685.h>
17 #include <linux/interrupt.h>
18 #include <linux/pm.h>
20 #include <asm/reboot.h>
21 #include <asm/sgi/heart.h>
23 static void __noreturn ip30_machine_restart(char *cmd)
26 * Execute HEART cold reset
27 * Yes, it's cold-HEARTed!
29 heart_write((heart_read(&heart_regs->mode) | HM_COLD_RST),
30 &heart_regs->mode);
31 unreachable();
34 static int __init ip30_reboot_setup(void)
36 _machine_restart = ip30_machine_restart;
38 return 0;
41 subsys_initcall(ip30_reboot_setup);