Remove obsolete pre-release support code about two early versions of 8260.
authorkevlo <kevlo@openbsd.org>
Mon, 16 Aug 2021 14:54:50 +0000 (14:54 +0000)
committerkevlo <kevlo@openbsd.org>
Mon, 16 Aug 2021 14:54:50 +0000 (14:54 +0000)
No need to access iwx_read_prph and could get the rid of the obsolete comment.

See Linux commit 4adfaf9b2de3a04a9ee9adff6e000e8dbb37bed5

ok stsp@

sys/dev/pci/if_iwx.c
sys/dev/pci/if_iwxreg.h

index c3d401c..a214f1e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwx.c,v 1.90 2021/08/13 13:13:11 stsp Exp $        */
+/*     $OpenBSD: if_iwx.c,v 1.91 2021/08/16 14:54:50 kevlo Exp $       */
 
 /*
  * Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -9372,44 +9372,6 @@ iwx_attach(struct device *parent, struct device *self, void *aux)
                return;
        }
 
-       if (iwx_prepare_card_hw(sc) != 0) {
-               printf("%s: could not initialize hardware\n",
-                   DEVNAME(sc));
-               return;
-       }
-
-       /*
-        * In order to recognize C step the driver should read the
-        * chip version id located at the AUX bus MISC address.
-        */
-       IWX_SETBITS(sc, IWX_CSR_GP_CNTRL,
-                   IWX_CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
-       DELAY(2);
-
-       err = iwx_poll_bit(sc, IWX_CSR_GP_CNTRL,
-                          IWX_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
-                          IWX_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
-                          25000);
-       if (!err) {
-               printf("%s: Failed to wake up the nic\n", DEVNAME(sc));
-               return;
-       }
-
-       if (iwx_nic_lock(sc)) {
-               uint32_t hw_step = iwx_read_prph(sc, IWX_WFPM_CTRL_REG);
-               hw_step |= IWX_ENABLE_WFPM;
-               iwx_write_prph(sc, IWX_WFPM_CTRL_REG, hw_step);
-               hw_step = iwx_read_prph(sc, IWX_AUX_MISC_REG);
-               hw_step = (hw_step >> IWX_HW_STEP_LOCATION_BITS) & 0xF;
-               if (hw_step == 0x3)
-                       sc->sc_hw_rev = (sc->sc_hw_rev & 0xFFFFFFF3) |
-                                       (IWX_SILICON_C_STEP << 2);
-               iwx_nic_unlock(sc);
-       } else {
-               printf("%s: Failed to lock the nic\n", DEVNAME(sc));
-               return;
-       }
-
        /* Allocate DMA memory for loading firmware. */
        err = iwx_dma_contig_alloc(sc->sc_dmat, &sc->ctxt_info_dma,
            sizeof(struct iwx_context_info), 0);
index bd6a662..42dfb83 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwxreg.h,v 1.29 2021/07/29 12:01:45 stsp Exp $     */
+/*     $OpenBSD: if_iwxreg.h,v 1.30 2021/08/16 14:54:50 kevlo Exp $    */
 
 /*-
  * Based on BSD-licensed source modules in the Linux iwlwifi driver,
@@ -705,9 +705,6 @@ struct iwx_context_info {
 #define IWX_WFPM_AUX_CTL_AUX_IF_MAC_OWNER_MSK  0x08000000
 #define IWX_ENABLE_WFPM                                0x80000000
 
-#define IWX_AUX_MISC_REG                       0xa200b0
-#define IWX_HW_STEP_LOCATION_BITS              24
-
 #define IWX_AUX_MISC_MASTER1_EN                        0xa20818
 #define IWX_AUX_MISC_MASTER1_EN_SBE_MSK                0x1
 #define IWX_AUX_MISC_MASTER1_SMPHR_STATUS      0xa20800