xref: /linux/arch/arc/kernel/reset.c (revision d2912cb1)
1*d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
2c121c506SVineet Gupta /*
3c121c506SVineet Gupta  * Copyright (C) 2011-2012 Synopsys, Inc. (www.synopsys.com)
4c121c506SVineet Gupta  */
5c121c506SVineet Gupta 
6c121c506SVineet Gupta #include <linux/kernel.h>
7c121c506SVineet Gupta #include <linux/printk.h>
8c121c506SVineet Gupta #include <linux/reboot.h>
9c121c506SVineet Gupta #include <linux/pm.h>
10c121c506SVineet Gupta 
machine_halt(void)11c121c506SVineet Gupta void machine_halt(void)
12c121c506SVineet Gupta {
13c121c506SVineet Gupta 	/* Halt the processor */
14c121c506SVineet Gupta 	__asm__ __volatile__("flag  1\n");
15c121c506SVineet Gupta }
16c121c506SVineet Gupta 
machine_restart(char * __unused)17c121c506SVineet Gupta void machine_restart(char *__unused)
18c121c506SVineet Gupta {
19c121c506SVineet Gupta 	/* Soft reset : jump to reset vector */
20c121c506SVineet Gupta 	pr_info("Put your restart handler here\n");
21c121c506SVineet Gupta 	machine_halt();
22c121c506SVineet Gupta }
23c121c506SVineet Gupta 
machine_power_off(void)24c121c506SVineet Gupta void machine_power_off(void)
25c121c506SVineet Gupta {
26c121c506SVineet Gupta 	/* FIXME ::  power off ??? */
27c121c506SVineet Gupta 	machine_halt();
28c121c506SVineet Gupta }
29c121c506SVineet Gupta 
30c121c506SVineet Gupta void (*pm_power_off) (void) = NULL;
31b6fe8e7cSChen Gang EXPORT_SYMBOL(pm_power_off);
32