mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-06-27 12:44:46 +00:00
soc: qcom: spss_utils: protect from event signaled twice
avoid event signaled twice. add ioctl to check if event was signaled. Change-Id: Ie75b9db86f2badddc08d65eee30ecd6a15795256 Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
80fded8cc1
commit
86d0cd334f
@ -19,22 +19,37 @@
|
||||
#define SPSS_IOC_MAGIC 'S'
|
||||
|
||||
/* ---------- set fw cmac --------------------------------- */
|
||||
#define NUM_SPU_UEFI_APPS 3
|
||||
#define NUM_SPU_UEFI_APPS 3
|
||||
#define CMAC_SIZE_IN_WORDS 4
|
||||
|
||||
struct spss_ioc_set_fw_cmac {
|
||||
uint32_t cmac[4];
|
||||
uint32_t app_cmacs[NUM_SPU_UEFI_APPS][4];
|
||||
uint32_t cmac[CMAC_SIZE_IN_WORDS];
|
||||
uint32_t app_cmacs[NUM_SPU_UEFI_APPS][CMAC_SIZE_IN_WORDS];
|
||||
} __packed;
|
||||
|
||||
#define SPSS_IOC_SET_FW_CMAC \
|
||||
_IOWR(SPSS_IOC_MAGIC, 1, struct spss_ioc_set_fw_cmac)
|
||||
|
||||
/* ---------- wait for event ------------------------------ */
|
||||
#define SPSS_NUM_EVENTS 8
|
||||
enum _spss_event_id {
|
||||
/* signaled from user */
|
||||
SPSS_EVENT_ID_PIL_CALLED = 0,
|
||||
SPSS_EVENT_ID_NVM_READY = 1,
|
||||
SPSS_EVENT_ID_SPU_READY = 2,
|
||||
SPSS_NUM_USER_EVENTS,
|
||||
|
||||
#define EVENT_STATUS_SIGNALED 0xAAAA
|
||||
#define EVENT_STATUS_TIMEOUT 0xEEE1
|
||||
#define EVENT_STATUS_ABORTED 0xEEE2
|
||||
/* signaled from kernel */
|
||||
SPSS_EVENT_ID_SPU_POWER_DOWN = 6,
|
||||
SPSS_EVENT_ID_SPU_POWER_UP = 7,
|
||||
SPSS_NUM_EVENTS,
|
||||
} spss_event_id;
|
||||
|
||||
enum _spss_event_status {
|
||||
EVENT_STATUS_SIGNALED = 0xAAAA,
|
||||
EVENT_STATUS_NOT_SIGNALED = 0xFFFF,
|
||||
EVENT_STATUS_TIMEOUT = 0xEEE1,
|
||||
EVENT_STATUS_ABORTED = 0xEEE2,
|
||||
} spss_event_status;
|
||||
|
||||
struct spss_ioc_wait_for_event {
|
||||
uint32_t event_id; /* input */
|
||||
@ -54,4 +69,13 @@ struct spss_ioc_signal_event {
|
||||
#define SPSS_IOC_SIGNAL_EVENT \
|
||||
_IOWR(SPSS_IOC_MAGIC, 3, struct spss_ioc_signal_event)
|
||||
|
||||
/* ---------- is event isgnaled ------------------------------ */
|
||||
struct spss_ioc_is_signaled {
|
||||
uint32_t event_id; /* input */
|
||||
uint32_t status; /* output */
|
||||
} __attribute__((packed));
|
||||
|
||||
#define SPSS_IOC_IS_EVENT_SIGNALED \
|
||||
_IOWR(SPSS_IOC_MAGIC, 4, struct spss_ioc_is_signaled)
|
||||
|
||||
#endif /* _UAPI_SPSS_UTILS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user