-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgpu_cfg_generator.h
More file actions
65 lines (60 loc) · 1.66 KB
/
gpu_cfg_generator.h
File metadata and controls
65 lines (60 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __GPU_CFG_GENERATOR_H
#define __GPU_CFG_GENERATOR_H
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#include "gpio_defines.h"
#include "config_definition.h"
#define C_TO_K(temp_c) ((temp_c) + 273)
#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"
#define BYTE_TO_BINARY(byte) \
((byte) & 0x80 ? '1' : '0'), \
((byte) & 0x40 ? '1' : '0'), \
((byte) & 0x20 ? '1' : '0'), \
((byte) & 0x10 ? '1' : '0'), \
((byte) & 0x08 ? '1' : '0'), \
((byte) & 0x04 ? '1' : '0'), \
((byte) & 0x02 ? '1' : '0'), \
((byte) & 0x01 ? '1' : '0')
#define CONFIG_AP_PWRSEQ_S0IX 1
enum power_state {
/* Steady states */
POWER_G3 = 0, /*
* System is off (not technically all the way into G3,
which means totally unpowered...)
*/
POWER_S5, /* System is soft-off */
POWER_S4, /* System is suspended to disk */
POWER_S3, /* Suspend; RAM on, processor is asleep */
POWER_S0, /* System is on */
#if CONFIG_AP_PWRSEQ_S0IX
POWER_S0ix,
#endif
/* Transitions */
POWER_G3S5, /* G3 -> S5 (at system init time) */
POWER_S5S3, /* S5 -> S3 (skips S4 on non-Intel systems) */
POWER_S3S0, /* S3 -> S0 */
POWER_S0S3, /* S0 -> S3 */
POWER_S3S5, /* S3 -> S5 (skips S4 on non-Intel systems) */
POWER_S5G3, /* S5 -> G3 */
POWER_S3S4, /* S3 -> S4 */
POWER_S4S3, /* S4 -> S3 */
POWER_S4S5, /* S4 -> S5 */
POWER_S5S4, /* S5 -> S4 */
#if CONFIG_AP_PWRSEQ_S0IX
POWER_S0ixS0, /* S0ix -> S0 */
POWER_S0S0ix, /* S0 -> S0ix */
#endif
};
#include <config_definition.h>
#include <r23m.h>
#include <gn22.h>
#include <ssd.h>
#include <pcie.h>
#endif /* __GPU_CFG_GENERATOR_H */