1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2021, Microchip
4  */
5 
6 #ifndef AT91_PM_H
7 #define AT91_PM_H
8 
9 #define	AT91_PM_STANDBY		0x00
10 #define AT91_PM_ULP0		0x01
11 #define AT91_PM_ULP0_FAST	0x02
12 #define AT91_PM_ULP1		0x03
13 #define	AT91_PM_BACKUP		0x04
14 
15 #ifndef __ASSEMBLER__
16 
17 #include <kernel/thread.h>
18 #include <sm/sm.h>
19 #include <tee_api_types.h>
20 #include <types_ext.h>
21 
22 struct at91_pm_data {
23 	vaddr_t shdwc;
24 	vaddr_t securam;
25 	vaddr_t secumod;
26 	vaddr_t sfrbu;
27 	vaddr_t pmc;
28 	vaddr_t ramc;
29 	unsigned int mode;
30 	const void *fdt;
31 };
32 
33 void at91_pm_suspend_in_sram(struct at91_pm_data *pm_data);
34 void at91_pm_cpu_resume(void);
35 extern uint32_t at91_pm_suspend_in_sram_sz;
36 
37 void at91_pm_resume(struct at91_pm_data *pm_data);
38 
39 #endif /* __ASSEMBLER__ */
40 
41 #endif /* AT91_PM_H */
42