Home | History | Annotate | Download | only in linux
      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_BOOT_FAIL,
     25 };
     26 
     27 enum esoc_cmd {
     28 	ESOC_PWR_ON = 1,
     29 	ESOC_PWR_OFF,
     30 	ESOC_RESET,
     31 	ESOC_PREPARE_DEBUG,
     32 	ESOC_EXE_DEBUG,
     33 	ESOC_EXIT_DEBUG,
     34 };
     35 
     36 enum esoc_notify {
     37 	ESOC_IMG_XFER_DONE = 1,
     38 	ESOC_BOOT_DONE,
     39 	ESOC_IMG_XFER_RETRY,
     40 	ESOC_IMG_XFER_FAIL,
     41 	ESOC_UPGRADE_AVAILABLE,
     42 	ESOC_DEBUG_DONE,
     43 	ESOC_DEBUG_FAIL,
     44 	ESOC_PRIMARY_CRASH,
     45 	ESOC_PRIMARY_REBOOT,
     46 };
     47 
     48 enum esoc_req {
     49 	ESOC_REQ_IMG = 1,
     50 	ESOC_REQ_DEBUG,
     51 	ESOC_REQ_SHUTDOWN,
     52 };
     53 
     54 #ifdef __KERNEL__
     55 /**
     56  * struct esoc_handle: Handle for clients of esoc
     57  * @name: name of the external soc.
     58  * @link: link of external soc.
     59  * @id: id of external soc.
     60  */
     61 struct esoc_handle {
     62 	const char *name;
     63 	const char *link;
     64 	unsigned int id;
     65 };
     66 #endif
     67 #endif
     68