1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright(c) 2022, Intel Corporation. All rights reserved. 4 */ 5 6 #ifndef __INTEL_PXP_FW_INTERFACE_CMN_H__ 7 #define __INTEL_PXP_FW_INTERFACE_CMN_H__ 8 9 #include <linux/types.h> 10 11 #define PXP_APIVER(x, y) (((x) & 0xFFFF) << 16 | ((y) & 0xFFFF)) 12 13 /* 14 * there are a lot of status codes for PXP, but we only define the cross-API 15 * common ones that we actually can handle in the kernel driver. Other failure 16 * codes should be printed to error msg for debug. 17 */ 18 enum pxp_status { 19 PXP_STATUS_SUCCESS = 0x0, 20 PXP_STATUS_OP_NOT_PERMITTED = 0x4013 21 }; 22 23 /* Common PXP FW message header */ 24 struct pxp_cmd_header { 25 u32 api_version; 26 u32 command_id; 27 union { 28 u32 status; /* out */ 29 u32 stream_id; /* in */ 30 }; 31 /* Length of the message (excluding the header) */ 32 u32 buffer_len; 33 } __packed; 34 35 #endif /* __INTEL_PXP_FW_INTERFACE_CMN_H__ */ 36