summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-04-26 21:06:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-04-26 21:06:09 +0000
commitbf998542c38e5272e4f15b1d26c81803d5c62017 (patch)
tree8b2106296b25811ecc50fd8a325f7d33efa7545e /sys/arch/mvme88k
parentcfa0db19831c29b2faddf07a6dcae0ab1f1708d6 (diff)
The dual-ported memory of the MVME376 boards is D32 addressable, say the
documentation, so we can use the MI {zero,copy{to,from}}buf_contig callbacks, which rely upon bcopy() and bzero(), instead of their d16_bcopy() and d16_bzero() equivalents. No functional change, except an unnoticeable speedup.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/dev/if_le.c50
-rw-r--r--sys/arch/mvme88k/dev/if_lereg.h18
-rw-r--r--sys/arch/mvme88k/dev/if_levar.h8
3 files changed, 17 insertions, 59 deletions
diff --git a/sys/arch/mvme88k/dev/if_le.c b/sys/arch/mvme88k/dev/if_le.c
index 30b800f533e..0c99c44bd51 100644
--- a/sys/arch/mvme88k/dev/if_le.c
+++ b/sys/arch/mvme88k/dev/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.12 2006/01/11 07:22:00 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.13 2006/04/26 21:06:08 miod Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
@@ -31,9 +31,6 @@
* @(#)if_le.c 8.2 (Berkeley) 10/30/93
*/
-/* This card lives in D16 space */
-#define __BUS_SPACE_RESTRICT_D16__
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -77,9 +74,6 @@ void vleetheraddr(struct am7990_softc *);
void vleinit(struct am7990_softc *);
void vlereset(struct am7990_softc *);
int vle_intr(void *);
-void vle_copyfrombuf_contig(struct am7990_softc *, void *, int, int);
-void vle_copytobuf_contig(struct am7990_softc *, void *, int, int);
-void vle_zerobuf_contig(struct am7990_softc *, int, int);
/* send command to the nvram controller */
void
@@ -213,38 +207,6 @@ vle_intr(sc)
return (rc);
}
-void
-vle_copytobuf_contig(sc, from, boff, len)
- struct am7990_softc *sc;
- void *from;
- int boff, len;
-{
- volatile caddr_t buf = sc->sc_mem;
-
- d16_bcopy(from, buf + boff, len);
-}
-
-void
-vle_copyfrombuf_contig(sc, to, boff, len)
- struct am7990_softc *sc;
- void *to;
- int boff, len;
-{
- volatile caddr_t buf = sc->sc_mem;
-
- d16_bcopy(buf + boff, to, len);
-}
-
-void
-vle_zerobuf_contig(sc, boff, len)
- struct am7990_softc *sc;
- int boff, len;
-{
- volatile caddr_t buf = sc->sc_mem;
-
- d16_bzero(buf + boff, len);
-}
-
int
lematch(parent, vcf, args)
struct device *parent;
@@ -343,11 +305,11 @@ leattach(parent, self, aux)
sc->sc_rdcsr = vlerdcsr;
sc->sc_wrcsr = vlewrcsr;
sc->sc_hwinit = vleinit;
- sc->sc_copytodesc = vle_copytobuf_contig;
- sc->sc_copyfromdesc = vle_copyfrombuf_contig;
- sc->sc_copytobuf = vle_copytobuf_contig;
- sc->sc_copyfrombuf = vle_copyfrombuf_contig;
- sc->sc_zerobuf = vle_zerobuf_contig;
+ sc->sc_copytodesc = am7990_copytobuf_contig;
+ sc->sc_copyfromdesc = am7990_copyfrombuf_contig;
+ sc->sc_copytobuf = am7990_copytobuf_contig;
+ sc->sc_copyfrombuf = am7990_copyfrombuf_contig;
+ sc->sc_zerobuf = am7990_zerobuf_contig;
/* get Ethernet address */
vleetheraddr(sc);
diff --git a/sys/arch/mvme88k/dev/if_lereg.h b/sys/arch/mvme88k/dev/if_lereg.h
index 40ffe14dbdd..6e76b8d3f0a 100644
--- a/sys/arch/mvme88k/dev/if_lereg.h
+++ b/sys/arch/mvme88k/dev/if_lereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lereg.h,v 1.3 2004/05/17 08:36:22 miod Exp $ */
+/* $OpenBSD: if_lereg.h,v 1.4 2006/04/26 21:06:08 miod Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
@@ -45,11 +45,11 @@ struct vlereg1 {
volatile u_int16_t ler1_ear; /* ethernet address register */
};
-#define NVRAM_EN 0x0008 /* NVRAM enable bit */
-#define INTR_EN 0x0010 /* Interrupt enable bit */
-#define PARITYB 0x0020 /* Parity clear bit */
-#define HW_RS 0x0040 /* Hardware reset bit */
-#define SYSFAILB 0x0080 /* SYSFAIL bit */
+#define NVRAM_EN 0x0008 /* NVRAM enable bit (active low) */
+#define INTR_EN 0x0010 /* interrupt enable bit (active low) */
+#define PARITYB 0x0020 /* parity error clear bit */
+#define HW_RS 0x0040 /* hardware reset bit (active low) */
+#define SYSFAILB 0x0080 /* SYSFAIL bit */
#define NVRAM_RWEL 0xe0 /* Reset write enable latch */
#define NVRAM_STO 0x60 /* Store ram to eeprom */
@@ -76,13 +76,9 @@ struct vlereg1 {
#define DISABLE_INTR WRITE_CSR_OR(INTR_EN)
#define RESET_HW \
do { \
- WRITE_CSR_AND(0xff00); \
WRITE_CSR_AND(HW_RS); \
CDELAY; \
} while (0)
#define SET_VEC(x) \
- do { \
- reg1->ler1_vec = 0; \
- reg1->ler1_vec |= (x); \
- } while (0)
+ reg1->ler1_vec |= (x)
#define SYSFAIL_CL WRITE_CSR_AND(SYSFAILB)
diff --git a/sys/arch/mvme88k/dev/if_levar.h b/sys/arch/mvme88k/dev/if_levar.h
index 534709fb992..3c90736903d 100644
--- a/sys/arch/mvme88k/dev/if_levar.h
+++ b/sys/arch/mvme88k/dev/if_levar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_levar.h,v 1.4 2004/07/30 19:02:05 miod Exp $ */
+/* $OpenBSD: if_levar.h,v 1.5 2006/04/26 21:06:08 miod Exp $ */
/* $NetBSD: if_levar.h,v 1.5 1996/05/07 01:27:32 thorpej Exp $ */
/*-
@@ -45,8 +45,8 @@
struct le_softc {
struct am7990_softc sc_am7990; /* glue to MI code */
struct intrhand sc_ih; /* interrupt vectoring */
- u_int16_t sc_csr; /* CSR image */
+ u_int sc_csr; /* CSR image */
void *sc_r1; /* LANCE registers */
- u_char sc_ipl;
- u_char sc_vec;
+ u_int sc_ipl;
+ u_int sc_vec;
};