Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/dev sync with mecreg change, ie. make this ...
details: https://anonhg.NetBSD.org/src/rev/799de18a55c8
branches: trunk
changeset: 540868:799de18a55c8
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Dec 26 22:25:12 2002 +0000
description:
sync with mecreg change, ie. make this compile
diffstat:
sys/arch/sgimips/dev/if_mec.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (63 lines):
diff -r 56abc5bb1d2b -r 799de18a55c8 sys/arch/sgimips/dev/if_mec.c
--- a/sys/arch/sgimips/dev/if_mec.c Thu Dec 26 22:24:46 2002 +0000
+++ b/sys/arch/sgimips/dev/if_mec.c Thu Dec 26 22:25:12 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mec.c,v 1.9 2002/10/02 15:52:32 thorpej Exp $ */
+/* $NetBSD: if_mec.c,v 1.10 2002/12/26 22:25:12 pooka Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -146,7 +146,8 @@
printf(": MAC-110 Ethernet, ");
command = bus_space_read_8(sc->sc_st, sc->sc_sh, MEC_MAC_CONTROL);
- printf("rev %lld\n", (command & MAC_REVISION) >> MAC_REVISION_SHIFT);
+ printf("rev %lld\n",
+ (command & MEC_MAC_REVISION) >> MEC_MAC_REVISION_SHIFT);
/*
* The firmware has left us the station address.
@@ -213,17 +214,17 @@
return 0;
bus_space_write_8(sc->sc_st, sc->sc_sh, MEC_PHY_ADDRESS,
- phy << PHY_ADDR_DEVSHIFT | reg);
+ phy << MEC_PHY_ADDR_DEVSHIFT | reg);
- bus_space_write_8(sc->sc_st, sc->sc_sh, MEC_PHY_READ_INITATE, 1);
+ bus_space_write_8(sc->sc_st, sc->sc_sh, MEC_PHY_READ_INITIATE, 1);
for (i = 0; i < 20; i++) {
delay(30);
val = bus_space_read_8(sc->sc_st, sc->sc_sh, MEC_PHY_DATA);
- if ((val & PHY_DATA_BUSY) == 0)
- return (int)val & PHY_DATA_VALUE;
+ if ((val & MEC_PHY_DATA_BUSY) == 0)
+ return (int)val & MEC_PHY_DATA_VALUE;
}
return 0;
@@ -240,10 +241,10 @@
return;
bus_space_write_8(sc->sc_st, sc->sc_sh, MEC_PHY_ADDRESS,
- phy << PHY_ADDR_DEVSHIFT | reg);
+ phy << MEC_PHY_ADDR_DEVSHIFT | reg);
bus_space_write_8(sc->sc_st, sc->sc_sh, MEC_PHY_DATA,
- val & PHY_DATA_VALUE);
+ val & MEC_PHY_DATA_VALUE);
(void)mec_mii_wait(sc);
@@ -263,7 +264,7 @@
busy = bus_space_read_8(sc->sc_st, sc->sc_sh, MEC_PHY_DATA);
- if ((busy & PHY_DATA_BUSY) == 0)
+ if ((busy & MEC_PHY_DATA_BUSY) == 0)
return 0;
if (busy == 0xffff)
return 0;
Home |
Main Index |
Thread Index |
Old Index