]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iwlwifi: pcie: remove obsolete pre-release support code
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 9 Dec 2020 21:16:14 +0000 (23:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Dec 2020 22:11:19 +0000 (00:11 +0200)
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 <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.4a5665ccd8a6.Iff3879405c15758ba661c430e77dc2160ddada1c@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-prph.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 4417fefe834e22b5285090b97ce72fc244517191..6c44a49640bee35370eff4ae355261de04e67be4 100644 (file)
@@ -406,10 +406,6 @@ enum {
 #define CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM         0xA29890
 #define CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR     0xA29938
 
-enum {
-       HW_STEP_LOCATION_BITS = 24,
-};
-
 #define PREG_AUX_BUS_WPROT_0           0xA04CC0
 
 /* device family 9000 WPROT register */
index 7b5ece380fbfbc0aed3262789fd9eabc7dce9c54..8d2b8f8301c72bf5a8317a48f159fbc833aa63d0 100644 (file)
@@ -1006,7 +1006,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        const struct iwl_cfg *cfg_7265d __maybe_unused = NULL;
        struct iwl_trans *iwl_trans;
        struct iwl_trans_pcie *trans_pcie;
-       unsigned long flags;
        int i, ret;
        /*
         * 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)
                trans_pcie->num_rx_bufs = RX_QUEUE_SIZE;
        }
 
-       if (iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_8000 &&
-           iwl_trans_grab_nic_access(iwl_trans, &flags)) {
-               u32 hw_step;
-
-               hw_step = iwl_read_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG);
-               hw_step |= ENABLE_WFPM;
-               iwl_write_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG, hw_step);
-               hw_step = iwl_read_prph_no_grab(iwl_trans, CNVI_AUX_MISC_CHIP);
-               hw_step = (hw_step >> HW_STEP_LOCATION_BITS) & 0xF;
-               if (hw_step == 0x3)
-                       iwl_trans->hw_rev = (iwl_trans->hw_rev & 0xFFFFFFF3) |
-                               (SILICON_C_STEP << 2);
-               iwl_trans_release_nic_access(iwl_trans, &flags);
-       }
-
        pci_set_drvdata(pdev, iwl_trans);
        iwl_trans->drv = iwl_drv_start(iwl_trans);
 
index 431e1a00d8de1ee3b9403b95d07346e243c2f535..1099f8d1413c4f282ee10505884695db8cdcb286 100644 (file)
@@ -3536,26 +3536,10 @@ 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 (cfg_trans->device_family >= IWL_DEVICE_FAMILY_8000) {
+       if (cfg_trans->device_family >= IWL_DEVICE_FAMILY_8000)
                trans->hw_rev = (trans->hw_rev & 0xfff0) |
                                (CSR_HW_REV_STEP(trans->hw_rev << 2) << 2);
 
-               ret = iwl_pcie_prepare_card_hw(trans);
-               if (ret) {
-                       IWL_WARN(trans, "Exit HW not ready\n");
-                       goto out_no_pci;
-               }
-
-               /*
-                * in-order to recognize C step driver should read chip version
-                * id located at the AUX bus MISC address space.
-                */
-               ret = iwl_finish_nic_init(trans, cfg_trans);
-               if (ret)
-                       goto out_no_pci;
-
-       }
-
        IWL_DEBUG_INFO(trans, "HW REV: 0x%0x\n", trans->hw_rev);
 
        iwl_pcie_set_interrupt_capa(pdev, trans, cfg_trans);