From: Viktor Barna <viktor.barna@xxxxxxxxxx> (Part of the split. Please, take a look at the cover letter for more details). Signed-off-by: Viktor Barna <viktor.barna@xxxxxxxxxx> --- drivers/net/wireless/celeno/cl8k/recovery.h | 39 +++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 drivers/net/wireless/celeno/cl8k/recovery.h diff --git a/drivers/net/wireless/celeno/cl8k/recovery.h b/drivers/net/wireless/celeno/cl8k/recovery.h new file mode 100644 index 000000000000..303259d5d802 --- /dev/null +++ b/drivers/net/wireless/celeno/cl8k/recovery.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ +/* Copyright(c) 2019-2022, Celeno Communications Ltd. */ + +#ifndef CL_RECOVERY_H +#define CL_RECOVERY_H + +#include <linux/types.h> + +enum recovery_reason { + RECOVERY_WAIT4CFM, + RECOVERY_UNRECOVERABLE_ASSERT, + RECOVERY_UNRECOVERABLE_ASSERT_NO_DUMP, + RECOVERY_ASSERT_STORM_DETECT, + RECOVERY_DRV_FAILED, +}; + +enum cl_fw_wd_mode { + FW_WD_DISABLE, + FW_WD_INTERNAL_RECOVERY, + FW_WD_DRV_RELOAD, +}; + +struct cl_recovery_db { + unsigned long last_restart; + u32 restart_cnt; + + u32 ela_en; + u32 ela_sel_a; + u32 ela_sel_b; + u32 ela_sel_c; + + bool in_recovery; +}; + +bool cl_recovery_in_progress(struct cl_hw *cl_hw); +void cl_recovery_reconfig_complete(struct cl_hw *cl_hw); +void cl_recovery_start(struct cl_hw *cl_hw, int reason); + +#endif /* CL_RECOVERY_H */ -- 2.36.1