diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2004-09-27 18:32:36 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2004-09-27 18:32:36 +0000 |
commit | 02454f88b0b85996acba961741273c33823922e4 (patch) | |
tree | fe3d77af105111eb9abc129d593170e3e55492d8 /sys/arch/sparc64/dev/fhc_central.c | |
parent | af48c30b9ae79597b2b945d233acc77c86902eca (diff) |
compute the board number of each fhc
Diffstat (limited to 'sys/arch/sparc64/dev/fhc_central.c')
-rw-r--r-- | sys/arch/sparc64/dev/fhc_central.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/fhc_central.c b/sys/arch/sparc64/dev/fhc_central.c index 8b3dc347dbf..95d5f78fe50 100644 --- a/sys/arch/sparc64/dev/fhc_central.c +++ b/sys/arch/sparc64/dev/fhc_central.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fhc_central.c,v 1.4 2004/09/27 18:15:32 jason Exp $ */ +/* $OpenBSD: fhc_central.c,v 1.5 2004/09/27 18:32:35 jason Exp $ */ /* * Copyright (c) 2004 Jason L. Wright (jason@thought.net). @@ -68,6 +68,7 @@ fhc_central_attach(parent, self, aux) { struct fhc_softc *sc = (struct fhc_softc *)self; struct central_attach_args *ca = aux; + u_int32_t board; sc->sc_node = ca->ca_node; sc->sc_bt = ca->ca_bustag; @@ -115,6 +116,9 @@ fhc_central_attach(parent, self, aux) return; } + board = bus_space_read_4(sc->sc_bt, sc->sc_preg, FHC_P_BSR); + sc->sc_board = ((board >> 16) & 0x1) | ((board >> 12) & 0xe); + fhc_attach(sc); return; } |