Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2011-2012 Synopsys, Inc. (www.synopsys.com) |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <linux/kernel.h> |
| 7 | #include <linux/printk.h> |
| 8 | #include <linux/reboot.h> |
| 9 | #include <linux/pm.h> |
| 10 | |
| 11 | void machine_halt(void) |
| 12 | { |
| 13 | /* Halt the processor */ |
| 14 | __asm__ __volatile__("flag 1\n"); |
| 15 | } |
| 16 | |
| 17 | void machine_restart(char *__unused) |
| 18 | { |
| 19 | /* Soft reset : jump to reset vector */ |
| 20 | pr_info("Put your restart handler here\n"); |
| 21 | machine_halt(); |
| 22 | } |
| 23 | |
| 24 | void machine_power_off(void) |
| 25 | { |
| 26 | /* FIXME :: power off ??? */ |
| 27 | machine_halt(); |
| 28 | } |
| 29 | |
| 30 | void (*pm_power_off) (void) = NULL; |
Chen Gang | b6fe8e7 | 2013-10-28 11:49:47 +0800 | [diff] [blame] | 31 | EXPORT_SYMBOL(pm_power_off); |