blob: 96573718a17646002b905709a5090ab17b141ac0 [file] [log] [blame]
Hanumant Singh35c8d872013-11-01 21:46:53 -07001#ifndef _UAPI_ESOC_CTRL_H_
2#define _UAPI_ESOC_CTRL_H_
3
4#define ESOC_CODE 0xCC
5
6#define ESOC_CMD_EXE _IOW(ESOC_CODE, 1, u32)
7#define ESOC_WAIT_FOR_REQ _IOR(ESOC_CODE, 2, u32)
8#define ESOC_NOTIFY _IOW(ESOC_CODE, 3, u32)
9#define ESOC_GET_STATUS _IOR(ESOC_CODE, 4, u32)
10#define ESOC_WAIT_FOR_CRASH _IOR(ESOC_CODE, 6, u32)
11#define ESOC_REG_REQ_ENG _IO(ESOC_CODE, 7)
12#define ESOC_REG_CMD_ENG _IO(ESOC_CODE, 8)
13
14enum esoc_evt {
15 ESOC_RUN_STATE = 0x1,
16 ESOC_UNEXPECTED_RESET,
17 ESOC_ERR_FATAL,
18 ESOC_IN_DEBUG,
19 ESOC_BOOT_FAIL,
20};
21
22enum esoc_cmd {
23 ESOC_PWR_ON = 1,
24 ESOC_PWR_OFF,
25 ESOC_RESET,
26 ESOC_PREPARE_DEBUG,
27 ESOC_EXE_DEBUG,
28 ESOC_EXIT_DEBUG,
29};
30
31enum esoc_notify {
32 ESOC_IMG_XFER_DONE = 1,
33 ESOC_IMG_XFER_RETRY,
34 ESOC_IMG_XFER_FAIL,
35 ESOC_UPGRADE_AVAILABLE,
36 ESOC_DEBUG_DONE,
37 ESOC_DEBUG_FAIL,
38};
39
40enum esoc_req {
41 ESOC_REQ_IMG = 1,
42 ESOC_REQ_DEBUG,
43 ESOC_REQ_SHUTDOWN,
44};
45
46#ifdef __KERNEL__
47/**
48 * struct esoc_handle: Handle for clients of esoc
49 * @name: name of the external soc.
50 * @link: link of external soc.
51 * @id: id of external soc.
52 */
53struct esoc_handle {
54 const char *name;
55 const char *link;
56 unsigned int id;
57};
58#endif
59#endif