2018-06-14 10:11:57 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) <2018> Intel Corporation
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HOST_PM_H
|
2018-12-06 20:12:59 +08:00
|
|
|
#define HOST_PM_H
|
2018-06-14 10:11:57 +08:00
|
|
|
|
2018-06-14 22:25:40 +08:00
|
|
|
#define BIT_SLP_TYPx 10U
|
|
|
|
#define BIT_SLP_EN 13U
|
2018-06-14 10:50:34 +08:00
|
|
|
#define BIT_WAK_STS 15U
|
|
|
|
|
2019-01-03 10:18:52 +08:00
|
|
|
struct cpu_state_info {
|
|
|
|
uint8_t px_cnt; /* count of all Px states */
|
|
|
|
const struct cpu_px_data *px_data;
|
|
|
|
uint8_t cx_cnt; /* count of all Cx entries */
|
|
|
|
const struct cpu_cx_data *cx_data;
|
|
|
|
};
|
|
|
|
|
2018-12-14 16:33:14 +08:00
|
|
|
void set_host_wake_vectors(void *vector_32, void *vector_64);
|
|
|
|
struct pm_s_state_data *get_host_sstate_data(void);
|
2018-10-12 14:33:04 +08:00
|
|
|
|
2018-12-14 16:33:14 +08:00
|
|
|
void host_enter_s3(struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
|
|
|
|
extern void asm_enter_s3(struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
|
2018-06-14 10:11:57 +08:00
|
|
|
extern void restore_s3_context(void);
|
2019-01-03 10:18:52 +08:00
|
|
|
struct cpu_state_info *get_cpu_pm_state_info(void);
|
2018-06-14 10:11:57 +08:00
|
|
|
|
2018-09-29 15:46:27 +08:00
|
|
|
#endif /* HOST_PM_H */
|