Skip to content

Commit 4adfaf9

Browse files
egrumbachlucacoelho
authored andcommitted
iwlwifi: pcie: remove obsolete pre-release support code
We no longer need code that was introduced to differentiate between two early versions of 8260. We can remove this convoluted way to get the hardware version that was needed because of a bug in the register's configuration. Moreover, since we no longer need to access the PRPH registers, we no longer need to wake up the device, request ownership, etc... Remove all that. This allows us to get the rid of the obsolete comment about the AUX bus MISC address space which should have been moved when this code was moved away from here. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20201209231352.4a5665ccd8a6.Iff3879405c15758ba661c430e77dc2160ddada1c@changeid Signed-off-by: Luca Coelho <[email protected]>
1 parent 3b25f1a commit 4adfaf9

File tree

3 files changed

+1
-37
lines changed

3 files changed

+1
-37
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-prph.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,6 @@ enum {
406406
#define CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM 0xA29890
407407
#define CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR 0xA29938
408408

409-
enum {
410-
HW_STEP_LOCATION_BITS = 24,
411-
};
412-
413409
#define PREG_AUX_BUS_WPROT_0 0xA04CC0
414410

415411
/* device family 9000 WPROT register */

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
10061006
const struct iwl_cfg *cfg_7265d __maybe_unused = NULL;
10071007
struct iwl_trans *iwl_trans;
10081008
struct iwl_trans_pcie *trans_pcie;
1009-
unsigned long flags;
10101009
int i, ret;
10111010
/*
10121011
* This is needed for backwards compatibility with the old
@@ -1136,21 +1135,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11361135
trans_pcie->num_rx_bufs = RX_QUEUE_SIZE;
11371136
}
11381137

1139-
if (iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_8000 &&
1140-
iwl_trans_grab_nic_access(iwl_trans, &flags)) {
1141-
u32 hw_step;
1142-
1143-
hw_step = iwl_read_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG);
1144-
hw_step |= ENABLE_WFPM;
1145-
iwl_write_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG, hw_step);
1146-
hw_step = iwl_read_prph_no_grab(iwl_trans, CNVI_AUX_MISC_CHIP);
1147-
hw_step = (hw_step >> HW_STEP_LOCATION_BITS) & 0xF;
1148-
if (hw_step == 0x3)
1149-
iwl_trans->hw_rev = (iwl_trans->hw_rev & 0xFFFFFFF3) |
1150-
(SILICON_C_STEP << 2);
1151-
iwl_trans_release_nic_access(iwl_trans, &flags);
1152-
}
1153-
11541138
pci_set_drvdata(pdev, iwl_trans);
11551139
iwl_trans->drv = iwl_drv_start(iwl_trans);
11561140

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3536,26 +3536,10 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
35363536
* "dash" value). To keep hw_rev backwards compatible - we'll store it
35373537
* in the old format.
35383538
*/
3539-
if (cfg_trans->device_family >= IWL_DEVICE_FAMILY_8000) {
3539+
if (cfg_trans->device_family >= IWL_DEVICE_FAMILY_8000)
35403540
trans->hw_rev = (trans->hw_rev & 0xfff0) |
35413541
(CSR_HW_REV_STEP(trans->hw_rev << 2) << 2);
35423542

3543-
ret = iwl_pcie_prepare_card_hw(trans);
3544-
if (ret) {
3545-
IWL_WARN(trans, "Exit HW not ready\n");
3546-
goto out_no_pci;
3547-
}
3548-
3549-
/*
3550-
* in-order to recognize C step driver should read chip version
3551-
* id located at the AUX bus MISC address space.
3552-
*/
3553-
ret = iwl_finish_nic_init(trans, cfg_trans);
3554-
if (ret)
3555-
goto out_no_pci;
3556-
3557-
}
3558-
35593543
IWL_DEBUG_INFO(trans, "HW REV: 0x%0x\n", trans->hw_rev);
35603544

35613545
iwl_pcie_set_interrupt_capa(pdev, trans, cfg_trans);

0 commit comments

Comments
 (0)