summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2005-11-24 12:25:08 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2005-11-24 12:25:08 +0000
commit8b5bfe4ceb6f18bc0d1bf9864e45b3f1a1d87539 (patch)
treeecd01252fd7356dc200ec979201724e88ee12819
parent33057b21b353811b3e5e45ec763b642580ef1c81 (diff)
don't redefine BGE_PCIMISCCTL_ENDIAN_WORDSWAP and lower the delay while
waiting for the firmware. tested and ok brad@
-rw-r--r--sys/dev/pci/if_bge.c8
-rw-r--r--sys/dev/pci/if_bgereg.h5
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 2172301074d..63357c5b90a 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.93 2005/11/19 23:04:48 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.94 2005/11/24 12:25:07 fgsch Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -2025,7 +2025,7 @@ bge_reset(struct bge_softc *sc)
pci_conf_write(pa->pa_pc, pa->pa_tag, BGE_PCI_MISC_CTL,
BGE_PCIMISCCTL_INDIRECT_ACCESS|BGE_PCIMISCCTL_MASK_PCI_INTR|
- BGE_HIF_SWAP_OPTIONS|BGE_PCIMISCCTL_PCISTATE_RW);
+ BGE_PCIMISCCTL_ENDIAN_WORDSWAP|BGE_PCIMISCCTL_PCISTATE_RW);
reset = BGE_MISCCFG_RESET_CORE_CLOCKS|(65<<1);
@@ -2061,7 +2061,7 @@ bge_reset(struct bge_softc *sc)
/* Reset some of the PCI state that got zapped by reset */
pci_conf_write(pa->pa_pc, pa->pa_tag, BGE_PCI_MISC_CTL,
BGE_PCIMISCCTL_INDIRECT_ACCESS|BGE_PCIMISCCTL_MASK_PCI_INTR|
- BGE_HIF_SWAP_OPTIONS|BGE_PCIMISCCTL_PCISTATE_RW);
+ BGE_PCIMISCCTL_ENDIAN_WORDSWAP|BGE_PCIMISCCTL_PCISTATE_RW);
pci_conf_write(pa->pa_pc, pa->pa_tag, BGE_PCI_CACHESZ, cachesize);
pci_conf_write(pa->pa_pc, pa->pa_tag, BGE_PCI_CMD, command);
bge_writereg_ind(sc, BGE_MISC_CFG, (65 << 1));
@@ -2086,7 +2086,7 @@ bge_reset(struct bge_softc *sc)
val = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM);
if (val == ~BGE_MAGIC_NUMBER)
break;
- DELAY(1000);
+ DELAY(10);
}
if (i == BGE_TIMEOUT) {
diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h
index 8ab2b8f0344..a5588017b0e 100644
--- a/sys/dev/pci/if_bgereg.h
+++ b/sys/dev/pci/if_bgereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bgereg.h,v 1.31 2005/11/19 23:04:48 brad Exp $ */
+/* $OpenBSD: if_bgereg.h,v 1.32 2005/11/24 12:25:07 fgsch Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -209,7 +209,6 @@
#define BGE_PCIMISCCTL_INDIRECT_ACCESS 0x00000080
#define BGE_PCIMISCCTL_ASICREV 0xFFFF0000
-#define BGE_HIF_SWAP_OPTIONS (BGE_PCIMISCCTL_ENDIAN_WORDSWAP)
#if BYTE_ORDER == LITTLE_ENDIAN
#define BGE_DMA_SWAP_OPTIONS \
BGE_MODECTL_WORDSWAP_NONFRAME| \
@@ -221,7 +220,7 @@
#endif
#define BGE_INIT \
- (BGE_HIF_SWAP_OPTIONS|BGE_PCIMISCCTL_CLEAR_INTA| \
+ (BGE_PCIMISCCTL_ENDIAN_WORDSWAP|BGE_PCIMISCCTL_CLEAR_INTA| \
BGE_PCIMISCCTL_MASK_PCI_INTR|BGE_PCIMISCCTL_INDIRECT_ACCESS)
#define BGE_CHIPID_BCM5700_A0 0x70000000