Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (C) 2011-2012 Synopsys, Inc. (www.synopsys.com)
0004  */
0005 
0006 #include <linux/kernel.h>
0007 #include <linux/printk.h>
0008 #include <linux/reboot.h>
0009 #include <linux/pm.h>
0010 
0011 void machine_halt(void)
0012 {
0013     /* Halt the processor */
0014     __asm__ __volatile__("flag  1\n");
0015 }
0016 
0017 void machine_restart(char *__unused)
0018 {
0019     /* Soft reset : jump to reset vector */
0020     pr_info("Put your restart handler here\n");
0021     machine_halt();
0022 }
0023 
0024 void machine_power_off(void)
0025 {
0026     /* FIXME ::  power off ??? */
0027     machine_halt();
0028 }
0029 
0030 void (*pm_power_off) (void) = NULL;
0031 EXPORT_SYMBOL(pm_power_off);