1 // SPDX-License-Identifier: GPL-2.0
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>
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>
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
),
34 static int __init
ip30_reboot_setup(void)
36 _machine_restart
= ip30_machine_restart
;
41 subsys_initcall(ip30_reboot_setup
);