mirror of https://gitee.com/openkylin/linux.git
iwlwifi: add 9000 and A000 device families
Add two new device families to differentiate them from 8000. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
de8ba41b5e
commit
6e58487322
|
@ -128,7 +128,7 @@ static const struct iwl_tt_params iwl9000_tt_params = {
|
|||
#define IWL_DEVICE_9000 \
|
||||
.ucode_api_max = IWL9000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL9000_UCODE_API_MIN, \
|
||||
.device_family = IWL_DEVICE_FAMILY_8000, \
|
||||
.device_family = IWL_DEVICE_FAMILY_9000, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.base_params = &iwl9000_base_params, \
|
||||
|
|
|
@ -103,7 +103,7 @@ static const struct iwl_ht_params iwl_a000_ht_params = {
|
|||
#define IWL_DEVICE_A000 \
|
||||
.ucode_api_max = IWL_A000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_A000_UCODE_API_MIN, \
|
||||
.device_family = IWL_DEVICE_FAMILY_8000, \
|
||||
.device_family = IWL_DEVICE_FAMILY_A000, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.base_params = &iwl_a000_base_params, \
|
||||
|
|
|
@ -88,6 +88,8 @@ enum iwl_device_family {
|
|||
IWL_DEVICE_FAMILY_6150,
|
||||
IWL_DEVICE_FAMILY_7000,
|
||||
IWL_DEVICE_FAMILY_8000,
|
||||
IWL_DEVICE_FAMILY_9000,
|
||||
IWL_DEVICE_FAMILY_A000,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -215,7 +215,7 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
|
|||
char tag[8];
|
||||
const char *fw_pre_name;
|
||||
|
||||
if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000 &&
|
||||
if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
|
||||
CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP)
|
||||
fw_pre_name = cfg->fw_name_pre_next_step;
|
||||
else if (drv->trans->cfg->integrated &&
|
||||
|
|
|
@ -241,12 +241,12 @@ IWL_EXPORT_SYMBOL(iwl_clear_bits_prph);
|
|||
|
||||
void iwl_force_nmi(struct iwl_trans *trans)
|
||||
{
|
||||
if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) {
|
||||
if (trans->cfg->device_family < IWL_DEVICE_FAMILY_8000) {
|
||||
iwl_write_prph(trans, DEVICE_SET_NMI_REG,
|
||||
DEVICE_SET_NMI_VAL_DRV);
|
||||
iwl_write_prph(trans, DEVICE_SET_NMI_REG,
|
||||
DEVICE_SET_NMI_VAL_HW);
|
||||
} else if (trans->cfg->gen2) {
|
||||
} else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_A000) {
|
||||
iwl_write_prph(trans, UREG_NIC_SET_NMI_DRIVER,
|
||||
DEVICE_SET_NMI_8000_VAL);
|
||||
} else {
|
||||
|
|
|
@ -1008,7 +1008,7 @@ static ssize_t iwl_dbgfs_cont_recording_write(struct iwl_mvm *mvm,
|
|||
return -EOPNOTSUPP;
|
||||
|
||||
if (dest->monitor_mode != SMEM_MODE ||
|
||||
trans->cfg->device_family != IWL_DEVICE_FAMILY_8000)
|
||||
trans->cfg->device_family < IWL_DEVICE_FAMILY_8000)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ret = kstrtoint(buf, 0, &rec_mode);
|
||||
|
|
|
@ -644,12 +644,12 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
|
|||
if (ret) {
|
||||
struct iwl_trans *trans = mvm->trans;
|
||||
|
||||
if (trans->cfg->gen2)
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_A000)
|
||||
IWL_ERR(mvm,
|
||||
"SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n",
|
||||
iwl_read_prph(trans, UMAG_SB_CPU_1_STATUS),
|
||||
iwl_read_prph(trans, UMAG_SB_CPU_2_STATUS));
|
||||
else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
else if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000)
|
||||
IWL_ERR(mvm,
|
||||
"SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n",
|
||||
iwl_read_prph(trans, SB_CPU_1_STATUS),
|
||||
|
|
|
@ -447,8 +447,9 @@ int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm)
|
|||
le32_to_cpu(dword_buff[3]));
|
||||
|
||||
/* nvm file validation, dword_buff[2] holds the file version */
|
||||
if ((CSR_HW_REV_STEP(mvm->trans->hw_rev) == SILICON_C_STEP &&
|
||||
le32_to_cpu(dword_buff[2]) < 0xE4A)) {
|
||||
if (mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000 &&
|
||||
CSR_HW_REV_STEP(mvm->trans->hw_rev) == SILICON_C_STEP &&
|
||||
le32_to_cpu(dword_buff[2]) < 0xE4A) {
|
||||
ret = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -173,13 +173,14 @@ static void iwl_mvm_nic_config(struct iwl_op_mode *op_mode)
|
|||
~CSR_HW_IF_CONFIG_REG_MSK_PHY_TYPE);
|
||||
|
||||
/*
|
||||
* TODO: Bits 7-8 of CSR in 8000 HW family set the ADC sampling, and
|
||||
* shouldn't be set to any non-zero value. The same is supposed to be
|
||||
* true of the other HW, but unsetting them (such as the 7260) causes
|
||||
* automatic tests to fail on seemingly unrelated errors. Need to
|
||||
* further investigate this, but for now we'll separate cases.
|
||||
* TODO: Bits 7-8 of CSR in 8000 HW family and higher set the ADC
|
||||
* sampling, and shouldn't be set to any non-zero value.
|
||||
* The same is supposed to be true of the other HW, but unsetting
|
||||
* them (such as the 7260) causes automatic tests to fail on seemingly
|
||||
* unrelated errors. Need to further investigate this, but for now
|
||||
* we'll separate cases.
|
||||
*/
|
||||
if (mvm->trans->cfg->device_family != IWL_DEVICE_FAMILY_8000)
|
||||
if (mvm->trans->cfg->device_family < IWL_DEVICE_FAMILY_8000)
|
||||
reg_val |= CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI;
|
||||
|
||||
iwl_trans_set_bits_mask(mvm->trans, CSR_HW_IF_CONFIG_REG,
|
||||
|
|
|
@ -245,7 +245,7 @@ static int iwl_pcie_apm_init(struct iwl_trans *trans)
|
|||
*/
|
||||
|
||||
/* Disable L0S exit timer (platform NMI Work/Around) */
|
||||
if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000)
|
||||
if (trans->cfg->device_family < IWL_DEVICE_FAMILY_8000)
|
||||
iwl_set_bit(trans, CSR_GIO_CHICKEN_BITS,
|
||||
CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER);
|
||||
|
||||
|
@ -478,7 +478,7 @@ static void iwl_pcie_apm_stop(struct iwl_trans *trans, bool op_mode_leave)
|
|||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000)
|
||||
iwl_set_bits_prph(trans, APMG_PCIDEV_STT_REG,
|
||||
APMG_PCIDEV_STT_VAL_WAKE_ME);
|
||||
else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) {
|
||||
else if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000) {
|
||||
iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
|
||||
CSR_RESET_LINK_PWR_MGMT_DISABLED);
|
||||
iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG,
|
||||
|
@ -892,7 +892,7 @@ void iwl_pcie_apply_destination(struct iwl_trans *trans)
|
|||
if (dest->monitor_mode == EXTERNAL_MODE && trans_pcie->fw_mon_size) {
|
||||
iwl_write_prph(trans, le32_to_cpu(dest->base_reg),
|
||||
trans_pcie->fw_mon_phys >> dest->base_shift);
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000)
|
||||
iwl_write_prph(trans, le32_to_cpu(dest->end_reg),
|
||||
(trans_pcie->fw_mon_phys +
|
||||
trans_pcie->fw_mon_size - 256) >>
|
||||
|
@ -1318,7 +1318,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans *trans,
|
|||
iwl_write32(trans, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
|
||||
|
||||
/* Load the given image to the HW */
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000)
|
||||
ret = iwl_pcie_load_given_ucode_8000(trans, fw);
|
||||
else
|
||||
ret = iwl_pcie_load_given_ucode(trans, fw);
|
||||
|
@ -1435,7 +1435,7 @@ static int iwl_trans_pcie_d3_resume(struct iwl_trans *trans,
|
|||
iwl_set_bit(trans, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
|
||||
iwl_set_bit(trans, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
|
||||
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000)
|
||||
udelay(2);
|
||||
|
||||
ret = iwl_poll_bit(trans, CSR_GP_CNTRL,
|
||||
|
@ -1822,7 +1822,7 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans,
|
|||
/* this bit wakes up the NIC */
|
||||
__iwl_trans_pcie_set_bit(trans, CSR_GP_CNTRL,
|
||||
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000)
|
||||
udelay(2);
|
||||
|
||||
/*
|
||||
|
@ -2726,7 +2726,7 @@ static struct iwl_trans_dump_data
|
|||
trans->dbg_dest_tlv->end_shift;
|
||||
|
||||
/* Make "end" point to the actual end */
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000 ||
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000 ||
|
||||
trans->dbg_dest_tlv->monitor_mode == MARBH_MODE)
|
||||
end += (1 << trans->dbg_dest_tlv->end_shift);
|
||||
monitor_len = end - base;
|
||||
|
@ -3029,7 +3029,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
|
|||
* "dash" value). To keep hw_rev backwards compatible - we'll store it
|
||||
* in the old format.
|
||||
*/
|
||||
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) {
|
||||
if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000) {
|
||||
unsigned long flags;
|
||||
|
||||
trans->hw_rev = (trans->hw_rev & 0xfff0) |
|
||||
|
|
|
@ -762,7 +762,7 @@ void iwl_pcie_tx_start(struct iwl_trans *trans, u32 scd_base_addr)
|
|||
reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN);
|
||||
|
||||
/* Enable L1-Active */
|
||||
if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000)
|
||||
if (trans->cfg->device_family < IWL_DEVICE_FAMILY_8000)
|
||||
iwl_clear_bits_prph(trans, APMG_PCIDEV_STT_REG,
|
||||
APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue