• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 enum esoc_client_hook_prio {
23   ESOC_MHI_HOOK,
24   ESOC_MAX_HOOKS
25 };
26 struct esoc_link_data {
27   enum esoc_client_hook_prio prio;
28   __u64 link_id;
29 };
30 #define ESOC_CODE 0xCC
31 #define ESOC_CMD_EXE _IOW(ESOC_CODE, 1, unsigned int)
32 #define ESOC_WAIT_FOR_REQ _IOR(ESOC_CODE, 2, unsigned int)
33 #define ESOC_NOTIFY _IOW(ESOC_CODE, 3, unsigned int)
34 #define ESOC_GET_STATUS _IOR(ESOC_CODE, 4, unsigned int)
35 #define ESOC_GET_ERR_FATAL _IOR(ESOC_CODE, 5, unsigned int)
36 #define ESOC_WAIT_FOR_CRASH _IOR(ESOC_CODE, 6, unsigned int)
37 #define ESOC_REG_REQ_ENG _IO(ESOC_CODE, 7)
38 #define ESOC_REG_CMD_ENG _IO(ESOC_CODE, 8)
39 #define ESOC_GET_LINK_ID _IOWR(ESOC_CODE, 9, struct esoc_link_data)
40 #define ESOC_SET_BOOT_FAIL_ACT _IOW(ESOC_CODE, 10, unsigned int)
41 #define ESOC_SET_N_PON_TRIES _IOW(ESOC_CODE, 11, unsigned int)
42 #define ESOC_REQ_SEND_SHUTDOWN ESOC_REQ_SEND_SHUTDOWN
43 #define ESOC_REQ_CRASH_SHUTDOWN ESOC_REQ_CRASH_SHUTDOWN
44 #define ESOC_PON_RETRY ESOC_PON_RETRY
45 #define ESOC_BOOT_FAIL_ACTION
46 enum esoc_boot_fail_action {
47   BOOT_FAIL_ACTION_RETRY,
48   BOOT_FAIL_ACTION_COLD_RESET,
49   BOOT_FAIL_ACTION_SHUTDOWN,
50   BOOT_FAIL_ACTION_PANIC,
51   BOOT_FAIL_ACTION_NOP,
52   BOOT_FAIL_ACTION_S3_RESET,
53   BOOT_FAIL_ACTION_LAST,
54 };
55 enum esoc_evt {
56   ESOC_RUN_STATE = 0x1,
57   ESOC_UNEXPECTED_RESET,
58   ESOC_ERR_FATAL,
59   ESOC_IN_DEBUG,
60   ESOC_REQ_ENG_ON,
61   ESOC_REQ_ENG_OFF,
62   ESOC_CMD_ENG_ON,
63   ESOC_CMD_ENG_OFF,
64   ESOC_INVALID_STATE,
65   ESOC_RETRY_PON_EVT,
66   ESOC_BOOT_STATE,
67 };
68 enum esoc_cmd {
69   ESOC_PWR_ON = 1,
70   ESOC_PWR_OFF,
71   ESOC_FORCE_PWR_OFF,
72   ESOC_RESET,
73   ESOC_PREPARE_DEBUG,
74   ESOC_EXE_DEBUG,
75   ESOC_EXIT_DEBUG,
76 };
77 enum esoc_notify {
78   ESOC_IMG_XFER_DONE = 1,
79   ESOC_BOOT_DONE,
80   ESOC_BOOT_FAIL,
81   ESOC_IMG_XFER_RETRY,
82   ESOC_IMG_XFER_FAIL,
83   ESOC_UPGRADE_AVAILABLE,
84   ESOC_DEBUG_DONE,
85   ESOC_DEBUG_FAIL,
86   ESOC_PRIMARY_CRASH,
87   ESOC_PRIMARY_REBOOT,
88   ESOC_PON_RETRY,
89 };
90 enum esoc_req {
91   ESOC_REQ_IMG = 1,
92   ESOC_REQ_DEBUG,
93   ESOC_REQ_SHUTDOWN,
94   ESOC_REQ_SEND_SHUTDOWN,
95   ESOC_REQ_CRASH_SHUTDOWN,
96 };
97 #endif
98