linux-imx/drivers/firmware/imx/se_msg_sqfl_ctrl.h
Pankaj Gupta 9773681cdd LF-14060: drivers: firmware: imx: enforce msg-seq flow
New kernel feature to enforce the msg-seq flow:
- Once started before the first API,
- will continue for all the intermediate participating API(s),
- will halt after the last API successfully exchanged.

Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Tested-by: Ye Li <ye.li@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2025-05-28 10:39:39 +08:00

27 lines
663 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2024 NXP
*/
#ifndef SE_MSG_SQFL_CTRL_H
#define SE_MSG_SQFL_CTRL_H
#include <linux/mutex.h>
struct se_msg_seq_ctrl {
/*
* lock to ensure one message sequence flow,
* completes un-interrupted.
*/
struct mutex se_msg_sq_lk;
void *exp_tx_msg;
};
void se_start_enforce_msg_seq_flow(struct se_msg_seq_ctrl *se_msg_sq_ctl);
void se_continue_to_enforce_msg_seq_flow(struct se_msg_seq_ctrl *se_msg_sq_ctl,
void *tx_msg);
void se_halt_to_enforce_msg_seq_flow(struct se_msg_seq_ctrl *se_msg_sq_ctl);
void se_qualify_msg_seq_flow(struct se_msg_seq_ctrl *se_msg_sq_ctl,
void *tx_msg);
#endif