diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 2004-08-10 13:47:46 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 2004-08-10 13:47:46 +0000 |
commit | 37c0124ed65ded9f588d41b5a295555649a26eb1 (patch) | |
tree | 07c7ba8db887075b9cc9ae2e81b7a92ffe25681f /sys/arch | |
parent | 50d1185e794dd49188d19226b8cb6912cec5c979 (diff) |
Add O2 built in ethernet.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sgi/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/sgi/conf/RAMDISK | 3 | ||||
-rw-r--r-- | sys/arch/sgi/dev/if_mec.c | 39 |
3 files changed, 5 insertions, 41 deletions
diff --git a/sys/arch/sgi/conf/GENERIC b/sys/arch/sgi/conf/GENERIC index d9f7465ac95..32a0007b4d2 100644 --- a/sys/arch/sgi/conf/GENERIC +++ b/sys/arch/sgi/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.4 2004/08/10 07:30:56 mickey Exp $ +# $OpenBSD: GENERIC,v 1.5 2004/08/10 13:47:45 pefo Exp $ # machine sgi mips64 @@ -48,7 +48,7 @@ macebus0 at mainbus0 # MACE controller localbus. # Localbus devices clock0 at macebus0 -#mec0 at macebus0 sys 0x18 base 0x00280000 irq 4 +mec0 at macebus0 sys 0x18 base 0x00280000 irq 4 com0 at macebus0 sys 0x18 base 0x00390000 irq 5 com1 at macebus0 sys 0x18 base 0x00398000 irq 5 diff --git a/sys/arch/sgi/conf/RAMDISK b/sys/arch/sgi/conf/RAMDISK index bff460c258c..55757e1d383 100644 --- a/sys/arch/sgi/conf/RAMDISK +++ b/sys/arch/sgi/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.3 2004/08/09 14:57:26 pefo Exp $ +# $OpenBSD: RAMDISK,v 1.4 2004/08/10 13:47:45 pefo Exp $ # machine sgi mips64 @@ -65,6 +65,7 @@ macebus0 at mainbus0 # MACE controller localbus. #### Localbus devices clock0 at macebus0 +mec0 at macebus0 sys 0x18 base 0x00280000 irq 4 com0 at macebus0 sys 0x18 base 0x00390000 irq 5 com1 at macebus0 sys 0x18 base 0x00398000 irq 5 diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index 3db7d5a2992..ec7471cbeef 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.1 2004/08/10 07:30:57 mickey Exp $ */ +/* $OpenBSD: if_mec.c,v 1.2 2004/08/10 13:47:45 pefo Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -106,8 +106,6 @@ #include <mips64/arcbios.h> #include <sgi/dev/if_mecreg.h> -#define MEC_DEBUG - #ifdef MEC_DEBUG #define MEC_DEBUG_RESET 0x01 #define MEC_DEBUG_START 0x02 @@ -334,8 +332,6 @@ void mec_statchg(struct device *); void mec_mediastatus(struct ifnet *, struct ifmediareq *); int mec_mediachange(struct ifnet *); -static void enaddr_aton(const char *, uint8_t *); - int mec_init(struct ifnet * ifp); void mec_start(struct ifnet *); void mec_watchdog(struct ifnet *); @@ -643,39 +639,6 @@ mec_mediachange(struct ifnet *ifp) return mii_mediachg(&sc->sc_mii); } -/* - * XXX - * maybe this function should be moved to common part - * (sgimips/machdep.c or elsewhere) for all on-board network devices. - */ -static void -enaddr_aton(const char *str, uint8_t *eaddr) -{ - int i; - char c; - - for (i = 0; i < ETHER_ADDR_LEN; i++) { - if (*str == ':') - str++; - - c = *str++; - if ('0' <= c && c <= '9') - eaddr[i] = (c - '0'); - else if ('A' <= c && c <= 'F') - eaddr[i] = c + 10 - 'A'; - else if ('a' <= c && c <= 'f') - eaddr[i] = c + 10 - 'a'; - - c = *str++; - if ('0' <= c && c <= '9') - eaddr[i] = (eaddr[i] << 4) | (c - '0'); - else if ('A' <= c && c <= 'F') - eaddr[i] = (eaddr[i] << 4) | (c + 10 - 'A'); - else if ('a' <= c && c <= 'f') - eaddr[i] = (eaddr[i] << 4) | (c + 10 - 'a'); - } -} - int mec_init(struct ifnet *ifp) { |