1 #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 14 /*Link types for communication with external SOCs*/ 15 #define HSIC "HSIC" 16 #define HSICPCIe "HSIC+PCIe" 17 #define PCIe "PCIe" 18 19 enum esoc_evt { 20 ESOC_RUN_STATE = 0x1, 21 ESOC_UNEXPECTED_RESET, 22 ESOC_ERR_FATAL, 23 ESOC_IN_DEBUG, 24 ESOC_REQ_ENG_ON, 25 ESOC_REQ_ENG_OFF, 26 ESOC_CMD_ENG_ON, 27 ESOC_CMD_ENG_OFF, 28 ESOC_INVALID_STATE, 29 }; 30 31 enum esoc_cmd { 32 ESOC_PWR_ON = 1, 33 ESOC_PWR_OFF, 34 ESOC_FORCE_PWR_OFF, 35 ESOC_RESET, 36 ESOC_PREPARE_DEBUG, 37 ESOC_EXE_DEBUG, 38 ESOC_EXIT_DEBUG, 39 }; 40 41 enum esoc_notify { 42 ESOC_IMG_XFER_DONE = 1, 43 ESOC_BOOT_DONE, 44 ESOC_BOOT_FAIL, 45 ESOC_IMG_XFER_RETRY, 46 ESOC_IMG_XFER_FAIL, 47 ESOC_UPGRADE_AVAILABLE, 48 ESOC_DEBUG_DONE, 49 ESOC_DEBUG_FAIL, 50 ESOC_PRIMARY_CRASH, 51 ESOC_PRIMARY_REBOOT, 52 }; 53 54 enum esoc_req { 55 ESOC_REQ_IMG = 1, 56 ESOC_REQ_DEBUG, 57 ESOC_REQ_SHUTDOWN, 58 }; 59 60 #ifdef __KERNEL__ 61 /** 62 * struct esoc_handle: Handle for clients of esoc 63 * @name: name of the external soc. 64 * @link: link of external soc. 65 * @id: id of external soc. 66 */ 67 struct esoc_handle { 68 const char *name; 69 const char *link; 70 unsigned int id; 71 }; 72 #endif 73 #endif 74