2020-12-10 00:06:03 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
/*
|
2023-08-30 11:30:52 +03:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2020-12-10 00:06:03 +02:00
|
|
|
*/
|
2018-05-17 10:14:30 +03:00
|
|
|
#ifndef __iwl_dbg_tlv_h__
|
|
|
|
#define __iwl_dbg_tlv_h__
|
|
|
|
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/types.h>
|
2021-02-10 14:29:18 +02:00
|
|
|
#include <fw/file.h>
|
|
|
|
#include <fw/api/dbg-tlv.h>
|
2018-05-17 10:14:30 +03:00
|
|
|
|
2023-08-30 11:30:52 +03:00
|
|
|
#define IWL_DBG_TLV_MAX_PRESET 15
|
|
|
|
#define ENABLE_INI (IWL_DBG_TLV_MAX_PRESET + 1)
|
2022-03-04 13:21:19 +02:00
|
|
|
|
2018-05-17 10:14:30 +03:00
|
|
|
/**
|
2019-07-23 12:50:25 +03:00
|
|
|
* struct iwl_dbg_tlv_node - debug TLV node
|
|
|
|
* @list: list of &struct iwl_dbg_tlv_node
|
|
|
|
* @tlv: debug TLV
|
2018-05-17 10:14:30 +03:00
|
|
|
*/
|
2019-07-23 12:50:25 +03:00
|
|
|
struct iwl_dbg_tlv_node {
|
2019-06-10 16:14:20 +03:00
|
|
|
struct list_head list;
|
|
|
|
struct iwl_ucode_tlv tlv;
|
2018-05-17 10:14:30 +03:00
|
|
|
};
|
|
|
|
|
2019-07-22 13:04:16 +03:00
|
|
|
/**
|
|
|
|
* union iwl_dbg_tlv_tp_data - data that is given in a time point
|
|
|
|
* @fw_pkt: a packet received from the FW
|
|
|
|
*/
|
|
|
|
union iwl_dbg_tlv_tp_data {
|
|
|
|
struct iwl_rx_packet *fw_pkt;
|
|
|
|
};
|
|
|
|
|
2019-07-23 13:41:44 +03:00
|
|
|
/**
|
|
|
|
* struct iwl_dbg_tlv_time_point_data
|
|
|
|
* @trig_list: list of triggers
|
2019-07-23 14:26:49 +03:00
|
|
|
* @active_trig_list: list of active triggers
|
2019-07-23 13:41:44 +03:00
|
|
|
* @hcmd_list: list of host commands
|
2021-10-17 12:40:19 +03:00
|
|
|
* @config_list: list of configuration
|
2019-07-23 13:41:44 +03:00
|
|
|
*/
|
|
|
|
struct iwl_dbg_tlv_time_point_data {
|
|
|
|
struct list_head trig_list;
|
2019-07-23 14:26:49 +03:00
|
|
|
struct list_head active_trig_list;
|
2019-07-23 13:41:44 +03:00
|
|
|
struct list_head hcmd_list;
|
2021-10-17 12:40:19 +03:00
|
|
|
struct list_head config_list;
|
2019-07-23 13:41:44 +03:00
|
|
|
};
|
|
|
|
|
2018-05-17 10:14:30 +03:00
|
|
|
struct iwl_trans;
|
2019-06-13 16:41:35 +03:00
|
|
|
struct iwl_fw_runtime;
|
|
|
|
|
2019-06-13 15:01:07 +03:00
|
|
|
void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans);
|
|
|
|
void iwl_dbg_tlv_free(struct iwl_trans *trans);
|
2021-01-12 14:24:49 +01:00
|
|
|
void iwl_dbg_tlv_alloc(struct iwl_trans *trans, const struct iwl_ucode_tlv *tlv,
|
2019-06-30 10:23:26 +03:00
|
|
|
bool ext);
|
2019-07-23 13:41:44 +03:00
|
|
|
void iwl_dbg_tlv_init(struct iwl_trans *trans);
|
2021-08-02 17:09:39 +03:00
|
|
|
void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
|
|
|
|
enum iwl_fw_ini_time_point tp_id,
|
|
|
|
union iwl_dbg_tlv_tp_data *tp_data,
|
|
|
|
bool sync);
|
2023-12-07 04:50:10 +02:00
|
|
|
void iwl_dbg_tlv_init_cfg(struct iwl_fw_runtime *fwrt);
|
2021-08-02 17:09:39 +03:00
|
|
|
|
|
|
|
static inline void iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
|
|
|
|
enum iwl_fw_ini_time_point tp_id,
|
|
|
|
union iwl_dbg_tlv_tp_data *tp_data)
|
|
|
|
{
|
|
|
|
_iwl_dbg_tlv_time_point(fwrt, tp_id, tp_data, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void iwl_dbg_tlv_time_point_sync(struct iwl_fw_runtime *fwrt,
|
|
|
|
enum iwl_fw_ini_time_point tp_id,
|
|
|
|
union iwl_dbg_tlv_tp_data *tp_data)
|
|
|
|
{
|
|
|
|
_iwl_dbg_tlv_time_point(fwrt, tp_id, tp_data, true);
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:03:48 +03:00
|
|
|
void iwl_dbg_tlv_del_timers(struct iwl_trans *trans);
|
2018-05-17 10:14:30 +03:00
|
|
|
|
|
|
|
#endif /* __iwl_dbg_tlv_h__*/
|