Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea695b7c authored by Shaul Triebitz's avatar Shaul Triebitz Committed by Luca Coelho
Browse files

iwlwifi: align to new periphery address space for AX210 family



In AX210 family, UMAC periphery address space moved from
0xA00000 to 0xD00000.

Signed-off-by: default avatarShaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent d4f4793c
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
 * GPL LICENSE SUMMARY
 *
 * Copyright(c) 2015-2017 Intel Deutschland GmbH
 * Copyright (C) 2018 Intel Corporation
 * Copyright (C) 2018-2019 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
@@ -20,7 +20,7 @@
 * BSD LICENSE
 *
 * Copyright(c) 2015-2017 Intel Deutschland GmbH
 * Copyright (C) 2018 Intel Corporation
 * Copyright (C) 2018-2019 Intel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
@@ -179,6 +179,10 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
	.d3_debug_data_base_addr = 0x401000,				\
	.d3_debug_data_length = 60 * 1024

#define IWL_DEVICE_AX200_COMMON						\
	IWL_DEVICE_22000_COMMON,					\
	.umac_prph_offset = 0x300000

#define IWL_DEVICE_22500						\
	IWL_DEVICE_22000_COMMON,					\
	.device_family = IWL_DEVICE_FAMILY_22000,			\
@@ -192,7 +196,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
	.csr = &iwl_csr_v2

#define IWL_DEVICE_AX210						\
	IWL_DEVICE_22000_COMMON,					\
	IWL_DEVICE_AX200_COMMON,					\
	.device_family = IWL_DEVICE_FAMILY_AX210,			\
	.base_params = &iwl_22000_base_params,				\
	.csr = &iwl_csr_v1,						\
+8 −4
Original line number Diff line number Diff line
@@ -242,7 +242,8 @@ static void iwl_fw_dump_rxf(struct iwl_fw_runtime *fwrt,
				  cfg->lmac[0].rxfifo1_size, 0, 0);
		/* Pull RXF2 */
		iwl_fwrt_dump_rxf(fwrt, dump_data, cfg->rxfifo2_size,
				  RXF_DIFF_FROM_PREV, 1);
				  RXF_DIFF_FROM_PREV +
				  fwrt->trans->cfg->umac_prph_offset, 1);
		/* Pull LMAC2 RXF1 */
		if (fwrt->smem_cfg.num_lmacs > 1)
			iwl_fwrt_dump_rxf(fwrt, dump_data,
@@ -1140,7 +1141,8 @@ iwl_dump_ini_mon_dram_iter(struct iwl_fw_runtime *fwrt,
			   struct iwl_fw_ini_region_cfg *reg,
			   int idx)
{
	u32 start_addr = iwl_read_prph(fwrt->trans, MON_BUFF_BASE_ADDR_VER2);
	u32 start_addr = iwl_read_umac_prph(fwrt->trans,
					    MON_BUFF_BASE_ADDR_VER2);

	if (start_addr == 0x5a5a5a5a)
		return -1;
@@ -1173,8 +1175,10 @@ static struct iwl_fw_ini_error_dump_range
		IWL_ERR(fwrt, "Failed to get DRAM monitor header\n");
		return NULL;
	}
	write_ptr = iwl_read_prph_no_grab(fwrt->trans, MON_BUFF_WRPTR_VER2);
	cycle_cnt = iwl_read_prph_no_grab(fwrt->trans, MON_BUFF_CYCLE_CNT_VER2);
	write_ptr = iwl_read_umac_prph_no_grab(fwrt->trans,
					       MON_BUFF_WRPTR_VER2);
	cycle_cnt = iwl_read_umac_prph_no_grab(fwrt->trans,
					       MON_BUFF_CYCLE_CNT_VER2);
	iwl_trans_release_nic_access(fwrt->trans, &flags);

	mon_dump->write_ptr = cpu_to_le32(write_ptr);
+8 −8
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
 * Copyright(c) 2018        Intel Corporation
 * Copyright(c) 2018 - 2019 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
 * Copyright(c) 2018        Intel Corporation
 * Copyright(c) 2018 - 2019 Intel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
@@ -299,13 +299,13 @@ _iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
	}

	if (params) {
		params->in_sample = iwl_read_prph(trans, DBGC_IN_SAMPLE);
		params->out_ctrl = iwl_read_prph(trans, DBGC_OUT_CTRL);
		params->in_sample = iwl_read_umac_prph(trans, DBGC_IN_SAMPLE);
		params->out_ctrl = iwl_read_umac_prph(trans, DBGC_OUT_CTRL);
	}

	iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
	iwl_write_umac_prph(trans, DBGC_IN_SAMPLE, 0);
	udelay(100);
	iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
	iwl_write_umac_prph(trans, DBGC_OUT_CTRL, 0);
#ifdef CONFIG_IWLWIFI_DEBUGFS
	trans->dbg_rec_on = false;
#endif
@@ -333,9 +333,9 @@ _iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
		iwl_clear_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
		iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
	} else {
		iwl_write_prph(trans, DBGC_IN_SAMPLE, params->in_sample);
		iwl_write_umac_prph(trans, DBGC_IN_SAMPLE, params->in_sample);
		udelay(100);
		iwl_write_prph(trans, DBGC_OUT_CTRL, params->out_ctrl);
		iwl_write_umac_prph(trans, DBGC_OUT_CTRL, params->out_ctrl);
	}
}

+4 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *
 * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
 * Copyright (C) 2016 - 2017 Intel Deutschland GmbH
 * Copyright(c) 2018 Intel Corporation
 * Copyright(c) 2018 - 2019 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
@@ -29,7 +29,7 @@
 *
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright (C) 2016 - 2017 Intel Deutschland GmbH
 * Copyright(c) 2018 Intel Corporation
 * Copyright(c) 2018 - 2019 Intel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
@@ -382,6 +382,7 @@ struct iwl_csr_params {
 * @d3_debug_data_length: length of the D3 debug data
 * @bisr_workaround: BISR hardware workaround (for 22260 series devices)
 * @min_txq_size: minimum number of slots required in a TX queue
 * @umac_prph_offset: offset to add to UMAC periphery address
 *
 * We enable the driver to be backward compatible wrt. hardware features.
 * API differences in uCode shouldn't be handled here but through TLVs
@@ -448,6 +449,7 @@ struct iwl_cfg {
	u32 d3_debug_data_base_addr;
	u32 d3_debug_data_length;
	u32 min_txq_size;
	u32 umac_prph_offset;
};

extern const struct iwl_csr_params iwl_csr_v1;
+4 −4
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *
 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
 * Copyright (C) 2018 Intel Corporation
 * Copyright(C) 2018 - 2019 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
@@ -29,7 +29,7 @@
 *
 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
 * Copyright (C) 2018 Intel Corporation
 * Copyright (C) 2018 - 2019 Intel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
@@ -308,7 +308,7 @@ void iwl_force_nmi(struct iwl_trans *trans)
		iwl_write_prph(trans, DEVICE_SET_NMI_REG,
			       DEVICE_SET_NMI_VAL_DRV);
	else
		iwl_write_prph(trans, UREG_NIC_SET_NMI_DRIVER,
		iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER,
				UREG_NIC_SET_NMI_DRIVER_NMI_FROM_DRIVER_MSK);
}
IWL_EXPORT_SYMBOL(iwl_force_nmi);
Loading