xref: /OK3568_Linux_fs/u-boot/arch/arm/include/asm/suspend.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * (C) Copyright 2017 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef SUSPEND_H
8 #define SUSPEND_H
9 #include <common.h>
10 #include <asm-generic/global_data.h>
11 
12 /* suspend/resume core functions */
13 void cpu_suspend_save(struct pm_ctx *ptr, unsigned long sp);
14 void cpu_do_suspend(unsigned long *ptr);
15 
16 void cpu_resume(void);
17 void cpu_do_resume(void);
18 
19 /*
20  * Exported to platform suspend, arg will be passed to fn as r0
21  * Return value: 0  - cpu resumed from suspended state.
22  *               -1 - cpu not suspended.
23  */
24 int cpu_suspend(unsigned long arg, int (*fn)(unsigned long));
25 #endif
26