mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-03 02:16:09 +02:00

Debugging feature to enable time synchronised logging of: - the Message exchange over MU with FW. - IOCTL(s) - any user articulated debug messages. The logs are saved to a file in the linux filesystem. Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com> Acked-by: Rahul Kumar Yadav <rahulkumar.yadav@nxp.com> Acked-by: Vabhav Sharma <vabhav.sharma@nxp.com> Acked-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com>
52 lines
1.4 KiB
C
52 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright 2024 NXP
|
|
*/
|
|
|
|
#ifndef __ELE_COMMON_H__
|
|
#define __ELE_COMMON_H__
|
|
|
|
#include "se_ctrl.h"
|
|
|
|
#define ELE_SUCCESS_IND 0xD6
|
|
#define ELE_ABORT_ERR_CODE 0xFF29
|
|
|
|
#define IMX_ELE_FW_DIR "imx/ele/"
|
|
|
|
u32 se_add_msg_crc(u32 *msg, u32 msg_len);
|
|
int ele_msg_rcv(struct se_if_device_ctx *dev_ctx,
|
|
struct se_clbk_handle *se_clbk_hdl);
|
|
int ele_msg_send(struct se_if_device_ctx *dev_ctx,
|
|
void *tx_msg,
|
|
int tx_msg_sz);
|
|
int ele_msg_send_rcv(struct se_if_device_ctx *dev_ctx,
|
|
void *tx_msg,
|
|
int tx_msg_sz,
|
|
void *rx_msg,
|
|
int exp_rx_msg_sz);
|
|
void se_if_rx_callback(struct mbox_client *mbox_cl, void *msg);
|
|
int se_val_rsp_hdr_n_status(struct se_if_priv *priv,
|
|
struct se_api_msg *msg,
|
|
u8 msg_id,
|
|
u8 sz,
|
|
bool is_base_api);
|
|
|
|
/* Fill a command message header with a given command ID and length in bytes. */
|
|
static inline int se_fill_cmd_msg_hdr(struct se_if_priv *priv,
|
|
struct se_msg_hdr *hdr,
|
|
u8 cmd, u32 len,
|
|
bool is_base_api)
|
|
{
|
|
hdr->tag = priv->if_defs->cmd_tag;
|
|
hdr->ver = (is_base_api) ? priv->if_defs->base_api_ver : priv->if_defs->fw_api_ver;
|
|
hdr->command = cmd;
|
|
hdr->size = len >> 2;
|
|
|
|
return 0;
|
|
}
|
|
|
|
int se_save_imem_state(struct se_if_priv *priv, struct se_imem_buf *imem);
|
|
int se_restore_imem_state(struct se_if_priv *priv, struct se_imem_buf *imem);
|
|
|
|
#endif /*__ELE_COMMON_H__ */
|