1*c121c506SVineet Gupta /* 2*c121c506SVineet Gupta * Copyright (C) 2011-2012 Synopsys, Inc. (www.synopsys.com) 3*c121c506SVineet Gupta * 4*c121c506SVineet Gupta * This program is free software; you can redistribute it and/or modify 5*c121c506SVineet Gupta * it under the terms of the GNU General Public License version 2 as 6*c121c506SVineet Gupta * published by the Free Software Foundation. 7*c121c506SVineet Gupta */ 8*c121c506SVineet Gupta 9*c121c506SVineet Gupta #include <linux/kernel.h> 10*c121c506SVineet Gupta #include <linux/printk.h> 11*c121c506SVineet Gupta #include <linux/reboot.h> 12*c121c506SVineet Gupta #include <linux/pm.h> 13*c121c506SVineet Gupta 14*c121c506SVineet Gupta void machine_halt(void) 15*c121c506SVineet Gupta { 16*c121c506SVineet Gupta /* Halt the processor */ 17*c121c506SVineet Gupta __asm__ __volatile__("flag 1\n"); 18*c121c506SVineet Gupta } 19*c121c506SVineet Gupta 20*c121c506SVineet Gupta void machine_restart(char *__unused) 21*c121c506SVineet Gupta { 22*c121c506SVineet Gupta /* Soft reset : jump to reset vector */ 23*c121c506SVineet Gupta pr_info("Put your restart handler here\n"); 24*c121c506SVineet Gupta machine_halt(); 25*c121c506SVineet Gupta } 26*c121c506SVineet Gupta 27*c121c506SVineet Gupta void machine_power_off(void) 28*c121c506SVineet Gupta { 29*c121c506SVineet Gupta /* FIXME :: power off ??? */ 30*c121c506SVineet Gupta machine_halt(); 31*c121c506SVineet Gupta } 32*c121c506SVineet Gupta 33*c121c506SVineet Gupta void (*pm_power_off) (void) = NULL; 34