• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 Imagination Technologies
3  * Author: Paul Burton <paul.burton@imgtec.com>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation;  either version 2 of the  License, or (at your
8  * option) any later version.
9  */
10 
11 #ifndef __ASM_MIPS_MACH_MALTA_PM_H__
12 #define __ASM_MIPS_MACH_MALTA_PM_H__
13 
14 #include <asm/mips-boards/piix4.h>
15 
16 #ifdef CONFIG_MIPS_MALTA_PM
17 
18 /**
19  * mips_pm_suspend - enter a suspend state
20  * @state: the state to enter, one of PIIX4_FUNC3IO_PMCNTRL_SUS_TYP_*
21  *
22  * Enters a suspend state via the Malta's PIIX4. If the state to be entered
23  * is one which loses context (eg. SOFF) then this function will never
24  * return.
25  */
26 extern int mips_pm_suspend(unsigned state);
27 
28 #else /* !CONFIG_MIPS_MALTA_PM */
29 
mips_pm_suspend(unsigned state)30 static inline int mips_pm_suspend(unsigned state)
31 {
32 	return -EINVAL;
33 }
34 
35 #endif /* !CONFIG_MIPS_MALTA_PM */
36 
37 #endif /* __ASM_MIPS_MACH_MALTA_PM_H__ */
38