1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _ESOC_CTRL_H_
20 #define _ESOC_CTRL_H_
21 #include <linux/types.h>
22 #define ESOC_CODE 0xCC
23 #define ESOC_CMD_EXE _IOW(ESOC_CODE, 1, unsigned int)
24 #define ESOC_WAIT_FOR_REQ _IOR(ESOC_CODE, 2, unsigned int)
25 #define ESOC_NOTIFY _IOW(ESOC_CODE, 3, unsigned int)
26 #define ESOC_GET_STATUS _IOR(ESOC_CODE, 4, unsigned int)
27 #define ESOC_GET_ERR_FATAL _IOR(ESOC_CODE, 5, unsigned int)
28 #define ESOC_WAIT_FOR_CRASH _IOR(ESOC_CODE, 6, unsigned int)
29 #define ESOC_REG_REQ_ENG _IO(ESOC_CODE, 7)
30 #define ESOC_REG_CMD_ENG _IO(ESOC_CODE, 8)
31 #define ESOC_GET_LINK_ID _IOWR(ESOC_CODE, 9, __u64)
32 #define ESOC_SET_BOOT_FAIL_ACT _IOW(ESOC_CODE, 10, unsigned int)
33 #define ESOC_SET_N_PON_TRIES _IOW(ESOC_CODE, 11, unsigned int)
34 #define ESOC_REQ_SEND_SHUTDOWN ESOC_REQ_SEND_SHUTDOWN
35 #define ESOC_REQ_CRASH_SHUTDOWN ESOC_REQ_CRASH_SHUTDOWN
36 #define ESOC_PON_RETRY ESOC_PON_RETRY
37 #define ESOC_BOOT_FAIL_ACTION
38 #define ESOC_LINK_ID
39 enum esoc_boot_fail_action {
40   BOOT_FAIL_ACTION_RETRY,
41   BOOT_FAIL_ACTION_COLD_RESET,
42   BOOT_FAIL_ACTION_SHUTDOWN,
43   BOOT_FAIL_ACTION_PANIC,
44   BOOT_FAIL_ACTION_NOP,
45   BOOT_FAIL_ACTION_S3_RESET,
46   BOOT_FAIL_ACTION_LAST,
47 };
48 enum esoc_evt {
49   ESOC_RUN_STATE = 0x1,
50   ESOC_UNEXPECTED_RESET,
51   ESOC_ERR_FATAL,
52   ESOC_IN_DEBUG,
53   ESOC_REQ_ENG_ON,
54   ESOC_REQ_ENG_OFF,
55   ESOC_CMD_ENG_ON,
56   ESOC_CMD_ENG_OFF,
57   ESOC_INVALID_STATE,
58   ESOC_RETRY_PON_EVT,
59 };
60 enum esoc_cmd {
61   ESOC_PWR_ON = 1,
62   ESOC_PWR_OFF,
63   ESOC_FORCE_PWR_OFF,
64   ESOC_RESET,
65   ESOC_PREPARE_DEBUG,
66   ESOC_EXE_DEBUG,
67   ESOC_EXIT_DEBUG,
68 };
69 enum esoc_notify {
70   ESOC_IMG_XFER_DONE = 1,
71   ESOC_BOOT_DONE,
72   ESOC_BOOT_FAIL,
73   ESOC_IMG_XFER_RETRY,
74   ESOC_IMG_XFER_FAIL,
75   ESOC_UPGRADE_AVAILABLE,
76   ESOC_DEBUG_DONE,
77   ESOC_DEBUG_FAIL,
78   ESOC_PRIMARY_CRASH,
79   ESOC_PRIMARY_REBOOT,
80   ESOC_PON_RETRY,
81 };
82 enum esoc_req {
83   ESOC_REQ_IMG = 1,
84   ESOC_REQ_DEBUG,
85   ESOC_REQ_SHUTDOWN,
86   ESOC_REQ_SEND_SHUTDOWN,
87   ESOC_REQ_CRASH_SHUTDOWN,
88 };
89 #endif
90