summaryrefslogtreecommitdiff
path: root/sys/dev/ic/bcw.c
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2007-03-12 22:29:39 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2007-03-12 22:29:39 +0000
commit889e4c72a2cb3f71bb60c8ac6cf8a7efed39f7e9 (patch)
tree7987c39fdbe1ac65fc06f115da3de2009bca925d /sys/dev/ic/bcw.c
parente2accbecd55c27c9a1a2365893c0f5d93219d012 (diff)
In bcw_init() check for real revision numbers now and fix a wrong
register (typo).
Diffstat (limited to 'sys/dev/ic/bcw.c')
-rw-r--r--sys/dev/ic/bcw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/bcw.c b/sys/dev/ic/bcw.c
index 00d6b4391c5..3e524e5e8f4 100644
--- a/sys/dev/ic/bcw.c
+++ b/sys/dev/ic/bcw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcw.c,v 1.69 2007/03/12 06:51:16 mglocker Exp $ */
+/* $OpenBSD: bcw.c,v 1.70 2007/03/12 22:29:38 mglocker Exp $ */
/*
* Copyright (c) 2006 Jon Simola <jsimola@gmail.com>
@@ -1812,7 +1812,7 @@ bcw_init(struct ifnet *ifp)
BCW_WRITE16(sc, 0x005e, val16);
}
BCW_WRITE(sc, 0x0100, 0x01000000);
- if (1) /* XXX current_core->rev */
+ if (sc->sc_core[sc->sc_currentcore].rev < 5)
BCW_WRITE(sc, 0x010c, 0x01000000);
val32 = BCW_READ(sc, BCW_SBF);
@@ -1836,14 +1836,14 @@ bcw_init(struct ifnet *ifp)
bcw_shm_write16(sc, BCW_SHM_CONTROL_SHARED, 0x0074, 0);
- if (1) { /* XXX core_rev */
+ if (sc->sc_core[sc->sc_currentcore].rev < 3) {
BCW_WRITE16(sc, 0x060e, 0);
BCW_WRITE16(sc, 0x0610, 0x8000);
BCW_WRITE16(sc, 0x0604, 0);
BCW_WRITE16(sc, 0x0606, 0x0200);
} else {
BCW_WRITE(sc, 0x0188, 0x80000000);
- BCW_WRITE(sc, 0x0606, 0x02000000);
+ BCW_WRITE(sc, 0x018c, 0x02000000);
}
BCW_WRITE(sc, BCW_GIR, 0x00004000);
BCW_WRITE(sc, BCW_DMA0_INT_MASK, 0x0001dc00);
@@ -1856,6 +1856,7 @@ bcw_init(struct ifnet *ifp)
val32 = BCW_READ(sc, BCW_CIR_SBTMSTATELOW);
val32 |= 0x00100000;
BCW_WRITE(sc, BCW_CIR_SBTMSTATELOW, val32);
+ /* TODO bcw_pctl_powerup_delay(sc) */
DPRINTF(("%s: Chip initialized\n", sc->sc_dev.dv_xname));