1 #ifndef _ESOC_CTRL_H_ 2 #define _ESOC_CTRL_H_ 3 4 #include <linux/types.h> 5 6 #define ESOC_CODE 0xCC 7 8 #define ESOC_CMD_EXE _IOW(ESOC_CODE, 1, unsigned int) 9 #define ESOC_WAIT_FOR_REQ _IOR(ESOC_CODE, 2, unsigned int) 10 #define ESOC_NOTIFY _IOW(ESOC_CODE, 3, unsigned int) 11 #define ESOC_GET_STATUS _IOR(ESOC_CODE, 4, unsigned int) 12 #define ESOC_GET_ERR_FATAL _IOR(ESOC_CODE, 5, unsigned int) 13 #define ESOC_WAIT_FOR_CRASH _IOR(ESOC_CODE, 6, unsigned int) 14 #define ESOC_REG_REQ_ENG _IO(ESOC_CODE, 7) 15 #define ESOC_REG_CMD_ENG _IO(ESOC_CODE, 8) 16 17 /*Link types for communication with external SOCs*/ 18 #define HSIC "HSIC" 19 #define HSICPCIe "HSIC+PCIe" 20 #define PCIe "PCIe" 21 #define ESOC_REQ_SEND_SHUTDOWN ESOC_REQ_SEND_SHUTDOWN 22 23 enum esoc_evt { 24 ESOC_RUN_STATE = 0x1, 25 ESOC_UNEXPECTED_RESET, 26 ESOC_ERR_FATAL, 27 ESOC_IN_DEBUG, 28 ESOC_REQ_ENG_ON, 29 ESOC_REQ_ENG_OFF, 30 ESOC_CMD_ENG_ON, 31 ESOC_CMD_ENG_OFF, 32 ESOC_INVALID_STATE, 33 }; 34 35 enum esoc_cmd { 36 ESOC_PWR_ON = 1, 37 ESOC_PWR_OFF, 38 ESOC_FORCE_PWR_OFF, 39 ESOC_RESET, 40 ESOC_PREPARE_DEBUG, 41 ESOC_EXE_DEBUG, 42 ESOC_EXIT_DEBUG, 43 }; 44 45 enum esoc_notify { 46 ESOC_IMG_XFER_DONE = 1, 47 ESOC_BOOT_DONE, 48 ESOC_BOOT_FAIL, 49 ESOC_IMG_XFER_RETRY, 50 ESOC_IMG_XFER_FAIL, 51 ESOC_UPGRADE_AVAILABLE, 52 ESOC_DEBUG_DONE, 53 ESOC_DEBUG_FAIL, 54 ESOC_PRIMARY_CRASH, 55 ESOC_PRIMARY_REBOOT, 56 }; 57 58 enum esoc_req { 59 ESOC_REQ_IMG = 1, 60 ESOC_REQ_DEBUG, 61 ESOC_REQ_SHUTDOWN, 62 ESOC_REQ_SEND_SHUTDOWN, 63 }; 64 65 #endif 66