iwlwifi: dbg: add DRAM monitor support for AX210 device family
Allows to perform monitor dumping on AX210 device family Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:

committed by
Luca Coelho

parent
a15d4f3b3c
commit
c88580e1a9
@@ -3012,10 +3012,14 @@ static void
|
||||
iwl_trans_pcie_dump_pointers(struct iwl_trans *trans,
|
||||
struct iwl_fw_error_dump_fw_mon *fw_mon_data)
|
||||
{
|
||||
u32 base, write_ptr, wrap_cnt;
|
||||
u32 base, base_high, write_ptr, write_ptr_val, wrap_cnt;
|
||||
|
||||
/* If there was a dest TLV - use the values from there */
|
||||
if (trans->ini_valid) {
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
base = DBGC_CUR_DBGBUF_BASE_ADDR_LSB;
|
||||
base_high = DBGC_CUR_DBGBUF_BASE_ADDR_MSB;
|
||||
write_ptr = DBGC_CUR_DBGBUF_STATUS;
|
||||
wrap_cnt = DBGC_DBGBUF_WRAP_AROUND;
|
||||
} else if (trans->ini_valid) {
|
||||
base = iwl_umac_prph(trans, MON_BUFF_BASE_ADDR_VER2);
|
||||
write_ptr = iwl_umac_prph(trans, MON_BUFF_WRPTR_VER2);
|
||||
wrap_cnt = iwl_umac_prph(trans, MON_BUFF_CYCLE_CNT_VER2);
|
||||
@@ -3028,12 +3032,18 @@ iwl_trans_pcie_dump_pointers(struct iwl_trans *trans,
|
||||
write_ptr = MON_BUFF_WRPTR;
|
||||
wrap_cnt = MON_BUFF_CYCLE_CNT;
|
||||
}
|
||||
fw_mon_data->fw_mon_wr_ptr =
|
||||
cpu_to_le32(iwl_read_prph(trans, write_ptr));
|
||||
|
||||
write_ptr_val = iwl_read_prph(trans, write_ptr);
|
||||
fw_mon_data->fw_mon_cycle_cnt =
|
||||
cpu_to_le32(iwl_read_prph(trans, wrap_cnt));
|
||||
fw_mon_data->fw_mon_base_ptr =
|
||||
cpu_to_le32(iwl_read_prph(trans, base));
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
fw_mon_data->fw_mon_base_high_ptr =
|
||||
cpu_to_le32(iwl_read_prph(trans, base_high));
|
||||
write_ptr_val &= DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK;
|
||||
}
|
||||
fw_mon_data->fw_mon_wr_ptr = cpu_to_le32(write_ptr_val);
|
||||
}
|
||||
|
||||
static u32
|
||||
@@ -3044,9 +3054,10 @@ iwl_trans_pcie_dump_monitor(struct iwl_trans *trans,
|
||||
u32 len = 0;
|
||||
|
||||
if ((trans->num_blocks &&
|
||||
trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) ||
|
||||
(trans->dbg_dest_tlv && !trans->ini_valid) ||
|
||||
(trans->ini_valid && trans->num_blocks)) {
|
||||
(trans->cfg->device_family == IWL_DEVICE_FAMILY_7000 ||
|
||||
trans->cfg->device_family >= IWL_DEVICE_FAMILY_AX210 ||
|
||||
trans->ini_valid)) ||
|
||||
(trans->dbg_dest_tlv && !trans->ini_valid)) {
|
||||
struct iwl_fw_error_dump_fw_mon *fw_mon_data;
|
||||
|
||||
(*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_FW_MONITOR);
|
||||
|
Reference in New Issue
Block a user