diff options
author | Kevin Lo <kevlo@cvs.openbsd.org> | 2021-08-16 14:54:51 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@cvs.openbsd.org> | 2021-08-16 14:54:51 +0000 |
commit | 46b2238dc1fd0084c42d00d3fa4804d5b7517cee (patch) | |
tree | af67ef08e19acaa446f01e9964967af11915f050 /sys | |
parent | 5d6cf71ee476af75c393bedc04157244f8f70004 (diff) |
Remove obsolete pre-release support code about two early versions of 8260.
No need to access iwx_read_prph and could get the rid of the obsolete comment.
See Linux commit 4adfaf9b2de3a04a9ee9adff6e000e8dbb37bed5
ok stsp@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_iwx.c | 40 | ||||
-rw-r--r-- | sys/dev/pci/if_iwxreg.h | 5 |
2 files changed, 2 insertions, 43 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index c3d401c1a0c..a214f1eef6f 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -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); diff --git a/sys/dev/pci/if_iwxreg.h b/sys/dev/pci/if_iwxreg.h index bd6a662accb..42dfb8332b0 100644 --- a/sys/dev/pci/if_iwxreg.h +++ b/sys/dev/pci/if_iwxreg.h @@ -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 |