/** * enum ipc_mem_td_cs - Completion status of a TD * @IPC_MEM_TD_CS_INVALID: Initial status - td not yet used. * @IPC_MEM_TD_CS_PARTIAL_TRANSFER: More data pending -> next TD used for this * @IPC_MEM_TD_CS_END_TRANSFER: IO transfer is complete. * @IPC_MEM_TD_CS_OVERFLOW: IO transfer to small for the buff to write * @IPC_MEM_TD_CS_ABORT: TD marked as abort and shall be discarded * by AP. * @IPC_MEM_TD_CS_ERROR: General error.
*/ enum ipc_mem_td_cs {
IPC_MEM_TD_CS_INVALID,
IPC_MEM_TD_CS_PARTIAL_TRANSFER,
IPC_MEM_TD_CS_END_TRANSFER,
IPC_MEM_TD_CS_OVERFLOW,
IPC_MEM_TD_CS_ABORT,
IPC_MEM_TD_CS_ERROR,
};
/** * struct ipc_msg_prep_feature_set - struct for feature set argument for * message preparation * @reset_enable: 0=out-of-band, 1=in-band-crash notification
*/ struct ipc_msg_prep_feature_set {
u8 reset_enable;
};
/** * struct ipc_msg_prep_map - struct for map argument for message preparation * @region_id: Region to map * @addr: Pcie addr of region to map * @size: Size of the region to map
*/ struct ipc_msg_prep_map { unsignedint region_id; unsignedlong addr;
size_t size;
};
/** * struct ipc_msg_prep_unmap - struct for unmap argument for message preparation * @region_id: Region to unmap
*/ struct ipc_msg_prep_unmap { unsignedint region_id;
};
/** * enum ipc_msg_prep_type - Enum for message prepare actions * @IPC_MSG_PREP_SLEEP: Sleep message preparation type * @IPC_MSG_PREP_PIPE_OPEN: Pipe open message preparation type * @IPC_MSG_PREP_PIPE_CLOSE: Pipe close message preparation type * @IPC_MSG_PREP_FEATURE_SET: Feature set message preparation type * @IPC_MSG_PREP_MAP: Memory map message preparation type * @IPC_MSG_PREP_UNMAP: Memory unmap message preparation type
*/ enum ipc_msg_prep_type {
IPC_MSG_PREP_SLEEP,
IPC_MSG_PREP_PIPE_OPEN,
IPC_MSG_PREP_PIPE_CLOSE,
IPC_MSG_PREP_FEATURE_SET,
IPC_MSG_PREP_MAP,
IPC_MSG_PREP_UNMAP,
};
/** * struct ipc_rsp - Response to sent message * @completion: For waking up requestor * @status: Completion status
*/ struct ipc_rsp { struct completion completion; enum ipc_mem_msg_cs status;
};
/** * enum ipc_mem_msg - Type-definition of the messages. * @IPC_MEM_MSG_OPEN_PIPE: AP ->CP: Open a pipe * @IPC_MEM_MSG_CLOSE_PIPE: AP ->CP: Close a pipe * @IPC_MEM_MSG_ABORT_PIPE: AP ->CP: wait for completion of the * running transfer and abort all pending * IO-transfers for the pipe * @IPC_MEM_MSG_SLEEP: AP ->CP: host enter or exit sleep * @IPC_MEM_MSG_FEATURE_SET: AP ->CP: Intel feature configuration
*/ enum ipc_mem_msg {
IPC_MEM_MSG_OPEN_PIPE = 0x01,
IPC_MEM_MSG_CLOSE_PIPE = 0x02,
IPC_MEM_MSG_ABORT_PIPE = 0x03,
IPC_MEM_MSG_SLEEP = 0x04,
IPC_MEM_MSG_FEATURE_SET = 0xF0,
};
/** * struct ipc_mem_msg_open_pipe - Message structure for open pipe * @tdr_addr: Tdr address * @tdr_entries: Tdr entries * @pipe_nr: Pipe number * @type_of_message: Message type * @irq_vector: MSI vector number * @accumulation_backoff: Time in usec for data accumalation * @completion_status: Message Completion Status
*/ struct ipc_mem_msg_open_pipe {
__le64 tdr_addr;
__le16 tdr_entries;
u8 pipe_nr;
u8 type_of_message;
__le32 irq_vector;
__le32 accumulation_backoff;
__le32 completion_status;
};
/** * union ipc_mem_msg_entry - Union with all possible messages. * @open_pipe: Open pipe message struct * @close_pipe: Close pipe message struct * @abort_pipe: Abort pipe message struct * @host_sleep: Host sleep message struct * @feature_set: Featuer set message struct * @common: Used to access msg_type and to set the completion status
*/ union ipc_mem_msg_entry { struct ipc_mem_msg_open_pipe open_pipe; struct ipc_mem_msg_close_pipe close_pipe; struct ipc_mem_msg_abort_pipe abort_pipe; struct ipc_mem_msg_host_sleep host_sleep; struct ipc_mem_msg_feature_set feature_set; struct ipc_mem_msg_common common;
};
/* Transfer descriptor definition. */ struct ipc_protocol_td { union { /* 0 : 63 - 64-bit address of a buffer in host memory. */
dma_addr_t address; struct { /* 0 : 31 - 32 bit address */
__le32 address; /* 32 : 63 - corresponding descriptor */
__le32 desc;
} __packed shm;
} buffer;
/* 0 - 2nd byte - Size of the buffer. * The host provides the size of the buffer queued. * The EP device reads this value and shall update * it for downlink transfers to indicate the * amount of data written in buffer. * 3rd byte - This field provides the completion status * of the TD. When queuing the TD, the host sets * the status to 0. The EP device updates this * field when completing the TD.
*/
__le32 scs;
/* 0th - nr of following descriptors * 1 - 3rd byte - reserved
*/
__le32 next;
} __packed;
/** * ipc_protocol_msg_prep - Prepare message based upon message type * @ipc_imem: iosm_protocol instance * @msg_type: message prepare type * @args: message arguments * * Return: 0 on success and failure value on error
*/ int ipc_protocol_msg_prep(struct iosm_imem *ipc_imem, enum ipc_msg_prep_type msg_type, union ipc_msg_prep_args *args);
/** * ipc_protocol_msg_hp_update - Function for head pointer update * of message ring * @ipc_imem: iosm_protocol instance
*/ void ipc_protocol_msg_hp_update(struct iosm_imem *ipc_imem);
/** * ipc_protocol_msg_process - Function for processing responses * to IPC messages * @ipc_imem: iosm_protocol instance * @irq: IRQ vector * * Return: True on success, false if error
*/ bool ipc_protocol_msg_process(struct iosm_imem *ipc_imem, int irq);
/** * ipc_protocol_ul_td_send - Function for sending the data to CP * @ipc_protocol: iosm_protocol instance * @pipe: Pipe instance * @p_ul_list: uplink sk_buff list * * Return: true in success, false in case of error
*/ bool ipc_protocol_ul_td_send(struct iosm_protocol *ipc_protocol, struct ipc_pipe *pipe, struct sk_buff_head *p_ul_list);
/** * ipc_protocol_ul_td_process - Function for processing the sent data * @ipc_protocol: iosm_protocol instance * @pipe: Pipe instance * * Return: sk_buff instance
*/ struct sk_buff *ipc_protocol_ul_td_process(struct iosm_protocol *ipc_protocol, struct ipc_pipe *pipe);
/** * ipc_protocol_dl_td_prepare - Function for providing DL TDs to CP * @ipc_protocol: iosm_protocol instance * @pipe: Pipe instance * * Return: true in success, false in case of error
*/ bool ipc_protocol_dl_td_prepare(struct iosm_protocol *ipc_protocol, struct ipc_pipe *pipe);
/** * ipc_protocol_dl_td_process - Function for processing the DL data * @ipc_protocol: iosm_protocol instance * @pipe: Pipe instance * * Return: sk_buff instance
*/ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol, struct ipc_pipe *pipe);
/** * ipc_protocol_get_head_tail_index - Function for getting Head and Tail * pointer index of given pipe * @ipc_protocol: iosm_protocol instance * @pipe: Pipe Instance * @head: head pointer index of the given pipe * @tail: tail pointer index of the given pipe
*/ void ipc_protocol_get_head_tail_index(struct iosm_protocol *ipc_protocol, struct ipc_pipe *pipe, u32 *head,
u32 *tail); /** * ipc_protocol_get_ipc_status - Function for getting the IPC Status * @ipc_protocol: iosm_protocol instance * * Return: Returns IPC State
*/ enum ipc_mem_device_ipc_state ipc_protocol_get_ipc_status(struct iosm_protocol
*ipc_protocol);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.