diff --git a/sys/arch/algor/dev/mcclock_mainbus.c b/sys/arch/algor/dev/mcclock_mainbus.c index bc4a1d299b9c..cb5cb80c6e64 100644 --- a/sys/arch/algor/dev/mcclock_mainbus.c +++ b/sys/arch/algor/dev/mcclock_mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_mainbus.c,v 1.8 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock_mainbus.c,v 1.9 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_mainbus.c,v 1.8 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_mainbus.c,v 1.9 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -43,31 +43,31 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_mainbus.c,v 1.8 2008/01/10 15:17:40 tsutsui #include #include -int mcclock_mainbus_match(struct device *, struct cfdata *, void *); -void mcclock_mainbus_attach(struct device *, struct device *, void *); +int mcclock_mainbus_match(device_t, cfdata_t, void *); +void mcclock_mainbus_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_mainbus, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_mainbus, sizeof(struct mc146818_softc), mcclock_mainbus_match, mcclock_mainbus_attach, NULL, NULL); void mcclock_mainbus_write(struct mc146818_softc *, u_int, u_int); u_int mcclock_mainbus_read(struct mc146818_softc *, u_int); int -mcclock_mainbus_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_mainbus_match(device_t parent, cfdata_t cf, void *aux) { struct mainbus_attach_args *ma = aux; - if (strcmp(ma->ma_name, match->cf_name) == 0) + if (strcmp(ma->ma_name, cf->cf_name) == 0) return (1); return (0); } void -mcclock_mainbus_attach(struct device *parent, struct device *self, void *aux) +mcclock_mainbus_attach(device_t parent, device_t self, void *aux) { + struct mc146818_softc *sc = device_private(self); struct mainbus_attach_args *ma = aux; - struct mc146818_softc *sc = (struct mc146818_softc *)self; sc->sc_bst = ma->ma_st; if (bus_space_map(sc->sc_bst, ma->ma_addr, 2, 0, &sc->sc_bsh)) diff --git a/sys/arch/algor/isa/mcclock_isa.c b/sys/arch/algor/isa/mcclock_isa.c index b5f058154797..138b77a0e5fc 100644 --- a/sys/arch/algor/isa/mcclock_isa.c +++ b/sys/arch/algor/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.10 2008/01/10 15:17:41 tsutsui Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.11 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.10 2008/01/10 15:17:41 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.11 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -44,17 +44,17 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.10 2008/01/10 15:17:41 tsutsui Exp #include -int mcclock_isa_match(struct device *, struct cfdata *, void *); -void mcclock_isa_attach(struct device *, struct device *, void *); +int mcclock_isa_match(device_t, cfdata_t, void *); +void mcclock_isa_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_isa, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_isa, sizeof(struct mc146818_softc), mcclock_isa_match, mcclock_isa_attach, NULL, NULL); void mcclock_isa_write(struct mc146818_softc *, u_int, u_int); u_int mcclock_isa_read(struct mc146818_softc *, u_int); int -mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_isa_match(device_t parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; @@ -93,10 +93,10 @@ mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_isa_attach(struct device *parent, struct device *self, void *aux) +mcclock_isa_attach(device_t parent, device_t self, void *aux) { + struct mc146818_softc *sc = device_private(self); struct isa_attach_args *ia = aux; - struct mc146818_softc *sc = (struct mc146818_softc *)self; sc->sc_bst = ia->ia_iot; if (bus_space_map(sc->sc_bst, ia->ia_io[0].ir_addr, diff --git a/sys/arch/alpha/isa/mcclock_isa.c b/sys/arch/alpha/isa/mcclock_isa.c index efa292ae8c2e..ae21673a2a5a 100644 --- a/sys/arch/alpha/isa/mcclock_isa.c +++ b/sys/arch/alpha/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.17 2007/10/17 19:52:58 garbled Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.18 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.17 2007/10/17 19:52:58 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.18 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -46,17 +46,17 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.17 2007/10/17 19:52:58 garbled Exp #include -int mcclock_isa_match(struct device *, struct cfdata *, void *); -void mcclock_isa_attach(struct device *, struct device *, void *); +int mcclock_isa_match(device_t, cfdata_t, void *); +void mcclock_isa_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_isa, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_isa, sizeof(struct mc146818_softc), mcclock_isa_match, mcclock_isa_attach, NULL, NULL); void mcclock_isa_write(struct mc146818_softc *, u_int, u_int); u_int mcclock_isa_read(struct mc146818_softc *, u_int); int -mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_isa_match(device_t parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; @@ -95,10 +95,10 @@ mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_isa_attach(struct device *parent, struct device *self, void *aux) +mcclock_isa_attach(device_t parent, device_t self, void *aux) { + struct mc146818_softc *sc = device_private(self); struct isa_attach_args *ia = aux; - struct mc146818_softc *sc = (void *)self; sc->sc_bst = ia->ia_iot; if (bus_space_map(sc->sc_bst, ia->ia_io[0].ir_addr, diff --git a/sys/arch/alpha/jensenio/mcclock_jensenio.c b/sys/arch/alpha/jensenio/mcclock_jensenio.c index 350d930fac95..b9ab2fd9cfbf 100644 --- a/sys/arch/alpha/jensenio/mcclock_jensenio.c +++ b/sys/arch/alpha/jensenio/mcclock_jensenio.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_jensenio.c,v 1.6 2007/10/17 19:52:59 garbled Exp $ */ +/* $NetBSD: mcclock_jensenio.c,v 1.7 2008/03/28 19:05:49 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_jensenio.c,v 1.6 2007/10/17 19:52:59 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_jensenio.c,v 1.7 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -89,10 +89,10 @@ struct mcclock_jensenio_softc { bus_space_handle_t sc_std_rtc_ioh; }; -int mcclock_jensenio_match(struct device *, struct cfdata *, void *); -void mcclock_jensenio_attach(struct device *, struct device *, void *); +int mcclock_jensenio_match(device_t, cfdata_t, void *); +void mcclock_jensenio_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_jensenio, sizeof (struct mcclock_jensenio_softc), +CFATTACH_DECL_NEW(mcclock_jensenio, sizeof(struct mcclock_jensenio_softc), mcclock_jensenio_match, mcclock_jensenio_attach, NULL, NULL); void mcclock_jensenio_write(struct mc146818_softc *, u_int, u_int); @@ -100,22 +100,22 @@ u_int mcclock_jensenio_read(struct mc146818_softc *, u_int); int -mcclock_jensenio_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_jensenio_match(device_t parent, cfdata_t cf, void *aux) { struct jensenio_attach_args *ja = aux; /* Always present. */ - if (strcmp(ja->ja_name, match->cf_name) == 0) + if (strcmp(ja->ja_name, cf->cf_name) == 0) return (1); return (0); } void -mcclock_jensenio_attach(struct device *parent, struct device *self, void *aux) +mcclock_jensenio_attach(device_t parent, device_t self, void *aux) { + struct mcclock_jensenio_softc *jsc = device_private(self); struct jensenio_attach_args *ja = aux; - struct mcclock_jensenio_softc *jsc = (void *)self; struct mc146818_softc *sc = &jsc->sc_mc146818; sc->sc_bst = ja->ja_iot; diff --git a/sys/arch/alpha/tc/mcclock_ioasic.c b/sys/arch/alpha/tc/mcclock_ioasic.c index 9fd9a2a67e0c..e521fbc8610b 100644 --- a/sys/arch/alpha/tc/mcclock_ioasic.c +++ b/sys/arch/alpha/tc/mcclock_ioasic.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_ioasic.c,v 1.13 2007/10/17 19:52:59 garbled Exp $ */ +/* $NetBSD: mcclock_ioasic.c,v 1.14 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.13 2007/10/17 19:52:59 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.14 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -58,17 +58,17 @@ struct mcclock_ioasic_softc { struct mcclock_ioasic_clockdatum *sc_dp; }; -int mcclock_ioasic_match(struct device *, struct cfdata *, void *); -void mcclock_ioasic_attach(struct device *, struct device *, void *); +int mcclock_ioasic_match(device_t, cfdata_t, void *); +void mcclock_ioasic_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_ioasic, sizeof(struct mcclock_ioasic_softc), +CFATTACH_DECL_NEW(mcclock_ioasic, sizeof(struct mcclock_ioasic_softc), mcclock_ioasic_match, mcclock_ioasic_attach, NULL, NULL); void mcclock_ioasic_write(struct mc146818_softc *, u_int, u_int); u_int mcclock_ioasic_read(struct mc146818_softc *, u_int); int -mcclock_ioasic_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_ioasic_match(device_t parent, cfdata_t cf, void *aux) { struct ioasicdev_attach_args *d = aux; @@ -79,10 +79,10 @@ mcclock_ioasic_match(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_ioasic_attach(struct device *parent, struct device *self, void *aux) +mcclock_ioasic_attach(device_t parent, device_t self, void *aux) { + struct mcclock_ioasic_softc *isc = device_private(self); struct ioasicdev_attach_args *ioasicdev = aux; - struct mcclock_ioasic_softc *isc = (void *)self; struct mc146818_softc *sc = &isc->sc_mc146818; /* XXX no bus_space(9) for TURBOchannel yet */ diff --git a/sys/arch/alpha/tlsb/mcclock_tlsb.c b/sys/arch/alpha/tlsb/mcclock_tlsb.c index bfd7a5e4bfeb..e88bea7b7b4a 100644 --- a/sys/arch/alpha/tlsb/mcclock_tlsb.c +++ b/sys/arch/alpha/tlsb/mcclock_tlsb.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_tlsb.c,v 1.14 2007/10/17 19:52:59 garbled Exp $ */ +/* $NetBSD: mcclock_tlsb.c,v 1.15 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1997 by Matthew Jacob @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_tlsb.c,v 1.14 2007/10/17 19:52:59 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_tlsb.c,v 1.15 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -65,10 +65,10 @@ struct mcclock_tlsb_softc { unsigned long regbase; }; -int mcclock_tlsb_match(struct device *, struct cfdata *, void *); -void mcclock_tlsb_attach(struct device *, struct device *, void *); +int mcclock_tlsb_match(device_t, cfdata_t, void *); +void mcclock_tlsb_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_tlsb, sizeof (struct mcclock_tlsb_softc), +CFATTACH_DECL_NEW(mcclock_tlsb, sizeof(struct mcclock_tlsb_softc), mcclock_tlsb_match, mcclock_tlsb_attach, NULL, NULL); static void mcclock_tlsb_write(struct mc146818_softc *, u_int, u_int); @@ -76,7 +76,7 @@ static u_int mcclock_tlsb_read(struct mc146818_softc *, u_int); int -mcclock_tlsb_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_tlsb_match(device_t parent, cfdata_t cf, void *aux) { struct gbus_attach_args *ga = aux; @@ -86,10 +86,10 @@ mcclock_tlsb_match(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_tlsb_attach(struct device *parent, struct device *self, void *aux) +mcclock_tlsb_attach(device_t parent, device_t self, void *aux) { + struct mcclock_tlsb_softc *tsc = device_private(self); struct gbus_attach_args *ga = aux; - struct mcclock_tlsb_softc *tsc = (void *)self; struct mc146818_softc *sc = &tsc->sc_mc146818; /* XXX Should be bus.h'd, so we can accommodate the kn7aa. */ diff --git a/sys/arch/arc/isa/mcclock_isa.c b/sys/arch/arc/isa/mcclock_isa.c index 86a606cbd289..81626c4f7150 100644 --- a/sys/arch/arc/isa/mcclock_isa.c +++ b/sys/arch/arc/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.11 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.12 2008/03/28 19:05:49 tsutsui Exp $ */ /* $OpenBSD: clock_mc.c,v 1.9 1998/03/16 09:38:26 pefo Exp $ */ /* NetBSD: clock_mc.c,v 1.2 1995/06/28 04:30:30 cgd Exp */ @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.11 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.12 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -97,10 +97,10 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.11 2008/01/10 15:17:40 tsutsui Exp #include -int mcclock_isa_match(struct device *, struct cfdata *, void *); -void mcclock_isa_attach(struct device *, struct device *, void *); +int mcclock_isa_match(device_t, cfdata_t, void *); +void mcclock_isa_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_isa, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_isa, sizeof(struct mc146818_softc), mcclock_isa_match, mcclock_isa_attach, NULL, NULL); /* Deskstation clock access code */ @@ -110,7 +110,7 @@ static void mc_isa_write(struct mc146818_softc *, u_int, u_int); int mcclock_isa_conf = 0; int -mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_isa_match(device_t parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; @@ -152,9 +152,9 @@ mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_isa_attach(struct device *parent, struct device *self, void *aux) +mcclock_isa_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (void *)self; + struct mc146818_softc *sc = device_private(self); struct isa_attach_args *ia = aux; sc->sc_bst = ia->ia_iot; @@ -168,7 +168,7 @@ mcclock_isa_attach(struct device *parent, struct device *self, void *aux) mc146818_attach(sc); - printf("\n"); + aprint_normal("\n"); /* Turn interrupts off, just in case. */ mc_isa_write(sc, MC_REGB, MC_REGB_BINARY | MC_REGB_24HR); diff --git a/sys/arch/arc/jazz/mcclock_jazzio.c b/sys/arch/arc/jazz/mcclock_jazzio.c index 119eb62eea2e..4d452a0efd7e 100644 --- a/sys/arch/arc/jazz/mcclock_jazzio.c +++ b/sys/arch/arc/jazz/mcclock_jazzio.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_jazzio.c,v 1.9 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock_jazzio.c,v 1.10 2008/03/28 19:05:49 tsutsui Exp $ */ /* $OpenBSD: clock_mc.c,v 1.9 1998/03/16 09:38:26 pefo Exp $ */ /* NetBSD: clock_mc.c,v 1.2 1995/06/28 04:30:30 cgd Exp */ @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_jazzio.c,v 1.9 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_jazzio.c,v 1.10 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -96,17 +96,17 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_jazzio.c,v 1.9 2008/01/10 15:17:40 tsutsui E #include #include -int mcclock_jazzio_match(struct device *, struct cfdata *, void *); -void mcclock_jazzio_attach(struct device *, struct device *, void *); +int mcclock_jazzio_match(device_t, cfdata_t, void *); +void mcclock_jazzio_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_jazzio, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_jazzio, sizeof(struct mc146818_softc), mcclock_jazzio_match, mcclock_jazzio_attach, NULL, NULL); struct mcclock_jazzio_config *mcclock_jazzio_conf = NULL; static int mcclock_jazzio_found = 0; int -mcclock_jazzio_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_jazzio_match(device_t parent, cfdata_t cf, void *aux) { struct jazzio_attach_args *ja = aux; @@ -121,9 +121,9 @@ mcclock_jazzio_match(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_jazzio_attach(struct device *parent, struct device *self, void *aux) +mcclock_jazzio_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (void *)self; + struct mc146818_softc *sc = device_private(self); struct jazzio_attach_args *ja = aux; if (mcclock_jazzio_conf == NULL) @@ -132,7 +132,7 @@ mcclock_jazzio_attach(struct device *parent, struct device *self, void *aux) sc->sc_bst = ja->ja_bust; if (bus_space_map(sc->sc_bst, ja->ja_addr, mcclock_jazzio_conf->mjc_iosize, 0, &sc->sc_bsh)) { - printf(": unable to map I/O space\n"); + aprint_error(": unable to map I/O space\n"); return; } @@ -142,7 +142,7 @@ mcclock_jazzio_attach(struct device *parent, struct device *self, void *aux) mc146818_attach(sc); - printf("\n"); + aprint_normal("\n"); /* Turn interrupts off, just in case. */ (*sc->sc_mcwrite)(sc, MC_REGB, MC_REGB_BINARY | MC_REGB_24HR); diff --git a/sys/arch/bebox/isa/mcclock_isa.c b/sys/arch/bebox/isa/mcclock_isa.c index 39f058049635..f9286bf73b59 100644 --- a/sys/arch/bebox/isa/mcclock_isa.c +++ b/sys/arch/bebox/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.3 2008/03/28 19:05:49 tsutsui Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -117,7 +117,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.3 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -139,10 +139,10 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp * appears that some systems use that. */ -static int mcclock_isa_probe(struct device *, struct cfdata *, void *); -static void mcclock_isa_attach(struct device *, struct device *, void *); +static int mcclock_isa_probe(device_t, cfdata_t, void *); +static void mcclock_isa_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_isa, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_isa, sizeof(struct mc146818_softc), mcclock_isa_probe, mcclock_isa_attach, NULL, NULL); static unsigned @@ -162,7 +162,7 @@ mcclock_isa_write(struct mc146818_softc *sc, unsigned reg, unsigned datum) } int -mcclock_isa_probe(struct device *parent, struct cfdata *match, void *aux) +mcclock_isa_probe(device_t parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; @@ -205,15 +205,15 @@ mcclock_isa_probe(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_isa_attach(struct device *parent, struct device *self, void *aux) +mcclock_isa_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (struct mc146818_softc *)self; + struct mc146818_softc *sc = device_private(self); struct isa_attach_args *ia = aux; sc->sc_bst = ia->ia_iot; if (bus_space_map(sc->sc_bst, ia->ia_io[0].ir_addr, ia->ia_io[0].ir_size, 0, &sc->sc_bsh)) { - printf(": can't map registers!\n"); + aprint_error(": can't map registers!\n"); return; } @@ -241,5 +241,5 @@ mcclock_isa_attach(struct device *parent, struct device *self, void *aux) sc->sc_setcent = mcclock_isa_setcent; #endif mc146818_attach(sc); - printf("\n"); + aprint_normal("\n"); } diff --git a/sys/arch/cobalt/dev/mcclock.c b/sys/arch/cobalt/dev/mcclock.c index 33e3082dee19..7f4fd4f257d5 100644 --- a/sys/arch/cobalt/dev/mcclock.c +++ b/sys/arch/cobalt/dev/mcclock.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock.c,v 1.3 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.3 2008/03/28 19:05:49 tsutsui Exp $"); #include /* RCS ID & Copyright macro defns */ @@ -46,10 +46,10 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $"); #define MCCLOCK_NPORTS 2 -static int mcclock_match(struct device *, struct cfdata *, void *); -static void mcclock_attach(struct device *, struct device *, void *); +static int mcclock_match(device_t, cfdata_t, void *); +static void mcclock_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock, sizeof (struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock, sizeof (struct mc146818_softc), mcclock_match, mcclock_attach, NULL, NULL); static void mcclock_write(struct mc146818_softc *, u_int, u_int); @@ -57,7 +57,7 @@ static u_int mcclock_read(struct mc146818_softc *, u_int); static int -mcclock_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_match(device_t parent, cfdata_t cf, void *aux) { static int mcclock_found; @@ -70,9 +70,9 @@ mcclock_match(struct device *parent, struct cfdata *match, void *aux) } static void -mcclock_attach(struct device *parent, struct device *self, void *aux) +mcclock_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (void *)self; + struct mc146818_softc *sc = device_private(self); struct mainbus_attach_args *ma = aux; sc->sc_bst = ma->ma_iot; @@ -88,7 +88,7 @@ mcclock_attach(struct device *parent, struct device *self, void *aux) sc->sc_flag = MC146818_BCD; mc146818_attach(sc); - printf("\n"); + aprint_normal("\n"); (*sc->sc_mcwrite)(sc, MC_REGB, MC_REGB_24HR); } diff --git a/sys/arch/evbarm/tsarm/tsrtc.c b/sys/arch/evbarm/tsarm/tsrtc.c index 5dd8080f22f1..0940f4483907 100644 --- a/sys/arch/evbarm/tsarm/tsrtc.c +++ b/sys/arch/evbarm/tsarm/tsrtc.c @@ -1,4 +1,4 @@ -/* $NetBSD: tsrtc.c,v 1.3 2008/01/10 15:17:41 tsutsui Exp $ */ +/* $NetBSD: tsrtc.c,v 1.4 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tsrtc.c,v 1.3 2008/01/10 15:17:41 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tsrtc.c,v 1.4 2008/03/28 19:05:49 tsutsui Exp $"); #include /* RCS ID & Copyright macro defns */ @@ -46,8 +46,8 @@ __KERNEL_RCSID(0, "$NetBSD: tsrtc.c,v 1.3 2008/01/10 15:17:41 tsutsui Exp $"); #include #include -int tsrtc_match __P((struct device *, struct cfdata *, void *)); -void tsrtc_attach __P((struct device *, struct device *, void *)); +int tsrtc_match(device_t, cfdata_t, void *); +void tsrtc_attach(device_t, device_t, void *); struct tsrtc_softc { struct mc146818_softc sc_mc; @@ -56,25 +56,23 @@ struct tsrtc_softc { bus_space_handle_t sc_idxh; }; -CFATTACH_DECL(tsrtc, sizeof (struct tsrtc_softc), +CFATTACH_DECL_NEW(tsrtc, sizeof (struct tsrtc_softc), tsrtc_match, tsrtc_attach, NULL, NULL); -void tsrtc_write __P((struct mc146818_softc *, u_int, u_int)); -u_int tsrtc_read __P((struct mc146818_softc *, u_int)); +void tsrtc_write(struct mc146818_softc *, u_int, u_int); +u_int tsrtc_read(struct mc146818_softc *, u_int); int -tsrtc_match(parent, match, aux) - struct device *parent; - struct cfdata *match; - void *aux; +tsrtc_match(device_t parent, cfdata_t cf, void *aux) { struct tspld_attach_args *aa = aux; struct tsrtc_softc tsrtc, *sc; unsigned int t1, t2; static int found = -1; - if (found != -1) return found; + if (found != -1) + return found; sc = &tsrtc; sc->sc_iot = aa->ta_iot; @@ -108,11 +106,9 @@ tsrtc_match(parent, match, aux) } void -tsrtc_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +tsrtc_attach(device_t parent, device_t self, void *aux) { - struct tsrtc_softc *sc = (void *)self; + struct tsrtc_softc *sc = device_private(self); struct tspld_attach_args *aa = aux; sc->sc_iot = aa->ta_iot; @@ -129,16 +125,14 @@ tsrtc_attach(parent, self, aux) sc->sc_mc.sc_flag = MC146818_BCD; mc146818_attach(&sc->sc_mc); - printf("\n"); + aprint_error("\n"); (*sc->sc_mc.sc_mcwrite)((struct mc146818_softc *)sc, MC_REGB, MC_REGB_24HR); } void -tsrtc_write(mc_sc, reg, datum) - struct mc146818_softc *mc_sc; - u_int reg, datum; +tsrtc_write(struct mc146818_softc *mc_sc, u_int reg, u_int datum) { struct tsrtc_softc *sc = (struct tsrtc_softc *)mc_sc; @@ -147,9 +141,7 @@ tsrtc_write(mc_sc, reg, datum) } u_int -tsrtc_read(mc_sc, reg) - struct mc146818_softc *mc_sc; - u_int reg; +tsrtc_read(struct mc146818_softc *mc_sc, u_int reg) { struct tsrtc_softc *sc = (struct tsrtc_softc *)mc_sc; u_int datum; diff --git a/sys/arch/evbmips/isa/mcclock_isa.c b/sys/arch/evbmips/isa/mcclock_isa.c index 0dd1e5ab6c72..2842a35d57ea 100644 --- a/sys/arch/evbmips/isa/mcclock_isa.c +++ b/sys/arch/evbmips/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.10 2008/01/10 15:17:41 tsutsui Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.11 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.10 2008/01/10 15:17:41 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.11 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -50,17 +50,17 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.10 2008/01/10 15:17:41 tsutsui Exp */ #define ALGOR_YEAR_ZERO 1920 -static int mcclock_isa_match(struct device *, struct cfdata *, void *); -static void mcclock_isa_attach(struct device *, struct device *, void *); +static int mcclock_isa_match(device_t, cfdata_t, void *); +static void mcclock_isa_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_isa, sizeof (struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_isa, sizeof (struct mc146818_softc), mcclock_isa_match, mcclock_isa_attach, NULL, NULL); static void mcclock_isa_write(struct mc146818_softc *, u_int, u_int); static u_int mcclock_isa_read(struct mc146818_softc *, u_int); static int -mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) +mcclock_isa_match(device_t parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; @@ -99,10 +99,10 @@ mcclock_isa_match(struct device *parent, struct cfdata *match, void *aux) } static void -mcclock_isa_attach(struct device *parent, struct device *self, void *aux) +mcclock_isa_attach(device_t parent, device_t self, void *aux) { + struct mc146818_softc *sc = device_private(self); struct isa_attach_args *ia = aux; - struct mc146818_softc *sc = (struct mc146818_softc *)self; sc->sc_bst = ia->ia_iot; if (bus_space_map(sc->sc_bst, ia->ia_io[0].ir_addr, diff --git a/sys/arch/evbppc/pmppc/dev/ds17485.c b/sys/arch/evbppc/pmppc/dev/ds17485.c index 8ed63865452c..3e418cd830a5 100644 --- a/sys/arch/evbppc/pmppc/dev/ds17485.c +++ b/sys/arch/evbppc/pmppc/dev/ds17485.c @@ -1,4 +1,4 @@ -/* $NetBSD: ds17485.c,v 1.3 2008/01/10 15:17:41 tsutsui Exp $ */ +/* $NetBSD: ds17485.c,v 1.4 2008/03/28 19:05:49 tsutsui Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -157,7 +157,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: ds17485.c,v 1.3 2008/01/10 15:17:41 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ds17485.c,v 1.4 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -175,18 +175,18 @@ __KERNEL_RCSID(0, "$NetBSD: ds17485.c,v 1.3 2008/01/10 15:17:41 tsutsui Exp $"); #include #include -static int rtc_match(struct device *, struct cfdata *, void *); -static void rtc_attach(struct device *, struct device *, void *); +static int rtc_match(device_t, cfdata_t, void *); +static void rtc_attach(device_t, device_t, void *); static u_int rtc_read(struct mc146818_softc *, u_int); static void rtc_write(struct mc146818_softc *, u_int, u_int); -CFATTACH_DECL(rtc, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(rtc, sizeof(struct mc146818_softc), rtc_match, rtc_attach, NULL, NULL); static int rtc_attached = 0; int -rtc_match(struct device *parent, struct cfdata *cf, void *aux) +rtc_match(device_t parent, cfdata_t cf, void *aux) { struct mainbus_attach_args *maa = aux; @@ -194,15 +194,15 @@ rtc_match(struct device *parent, struct cfdata *cf, void *aux) } void -rtc_attach(struct device *parent, struct device *self, void *aux) +rtc_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (struct mc146818_softc *)self; + struct mc146818_softc *sc = device_private(self); struct mainbus_attach_args *maa = aux; sc->sc_bst = maa->mb_bt; if (bus_space_map(sc->sc_bst, maa->mb_addr, PMPPC_RTC_SIZE, 0, &sc->sc_bsh)) { - printf("%s: can't map i/o space\n", self->dv_xname); + aprint_error(": can't map i/o space\n"); return; } @@ -219,8 +219,8 @@ rtc_attach(struct device *parent, struct device *self, void *aux) sc->sc_year0 = 1900; mc146818_attach(sc); - /* printf(": Dallas Semiconductor DS17485\n"); */ - printf("\n"); + /* aprint_normal(": Dallas Semiconductor DS17485\n"); */ + aprint_normal("\n"); } u_int diff --git a/sys/arch/prep/pnpbus/mcclock_pnpbus.c b/sys/arch/prep/pnpbus/mcclock_pnpbus.c index a1e236e42ac9..242fcf6a44f8 100644 --- a/sys/arch/prep/pnpbus/mcclock_pnpbus.c +++ b/sys/arch/prep/pnpbus/mcclock_pnpbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_pnpbus.c,v 1.4 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock_pnpbus.c,v 1.5 2008/03/28 19:05:49 tsutsui Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. * All rights reserved. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_pnpbus.c,v 1.4 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_pnpbus.c,v 1.5 2008/03/28 19:05:49 tsutsui Exp $"); #include #include @@ -71,12 +71,12 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_pnpbus.c,v 1.4 2008/01/10 15:17:40 tsutsui E #include -static int mcclock_pnpbus_probe(struct device *, struct cfdata *, void *); -static void mcclock_pnpbus_attach(struct device *, struct device *, void *); +static int mcclock_pnpbus_probe(device_t, cfdata_t, void *); +static void mcclock_pnpbus_attach(device_t, device_t, void *); extern struct cfdriver mcclock_cd; -CFATTACH_DECL(mcclock_pnpbus, sizeof (struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_pnpbus, sizeof(struct mc146818_softc), mcclock_pnpbus_probe, mcclock_pnpbus_attach, NULL, NULL); void mcclock_pnpbus_write(struct mc146818_softc *, u_int, u_int); @@ -87,7 +87,7 @@ int have_ds1585 = 0; #define MCCLOCK_STD_DEV 0 static int -mcclock_pnpbus_probe(struct device *parent, struct cfdata *match, void *aux) +mcclock_pnpbus_probe(device_t parent, cfdata_t cf, void *aux) { struct pnpbus_dev_attach_args *pna = aux; int ret = 0; @@ -105,16 +105,15 @@ mcclock_pnpbus_probe(struct device *parent, struct cfdata *match, void *aux) } static void -mcclock_pnpbus_attach(struct device *parent, struct device *self, void *aux) +mcclock_pnpbus_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (void *)self; + struct mc146818_softc *sc = device_private(self); struct pnpbus_dev_attach_args *pna = aux; sc->sc_bst = pna->pna_iot; if (pnpbus_io_map(&pna->pna_res, 0, &sc->sc_bst, &sc->sc_bsh)) { /* XXX should we panic instead? */ - aprint_error("%s: couldn't map clock I/O space", - device_xname(self)); + aprint_error(": couldn't map clock I/O space\n"); return; } diff --git a/sys/arch/sandpoint/isa/mcclock_isa.c b/sys/arch/sandpoint/isa/mcclock_isa.c index 39f058049635..a89aeb2979cb 100644 --- a/sys/arch/sandpoint/isa/mcclock_isa.c +++ b/sys/arch/sandpoint/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.3 2008/03/28 19:05:50 tsutsui Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -117,7 +117,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.3 2008/03/28 19:05:50 tsutsui Exp $"); #include #include @@ -139,10 +139,10 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.2 2008/01/10 15:17:40 tsutsui Exp * appears that some systems use that. */ -static int mcclock_isa_probe(struct device *, struct cfdata *, void *); -static void mcclock_isa_attach(struct device *, struct device *, void *); +static int mcclock_isa_probe(device_t, cfdata_t, void *); +static void mcclock_isa_attach(device_t, device_t, void *); -CFATTACH_DECL(mcclock_isa, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(mcclock_isa, sizeof(struct mc146818_softc), mcclock_isa_probe, mcclock_isa_attach, NULL, NULL); static unsigned @@ -162,7 +162,7 @@ mcclock_isa_write(struct mc146818_softc *sc, unsigned reg, unsigned datum) } int -mcclock_isa_probe(struct device *parent, struct cfdata *match, void *aux) +mcclock_isa_probe(device_t parent, cfdata_t cf, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; @@ -205,15 +205,15 @@ mcclock_isa_probe(struct device *parent, struct cfdata *match, void *aux) } void -mcclock_isa_attach(struct device *parent, struct device *self, void *aux) +mcclock_isa_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (struct mc146818_softc *)self; + struct mc146818_softc *sc = device_private(self); struct isa_attach_args *ia = aux; sc->sc_bst = ia->ia_iot; if (bus_space_map(sc->sc_bst, ia->ia_io[0].ir_addr, ia->ia_io[0].ir_size, 0, &sc->sc_bsh)) { - printf(": can't map registers!\n"); + aprint_error(": can't map registers!\n"); return; } @@ -241,5 +241,5 @@ mcclock_isa_attach(struct device *parent, struct device *self, void *aux) sc->sc_setcent = mcclock_isa_setcent; #endif mc146818_attach(sc); - printf("\n"); + aprint_normal("\n"); } diff --git a/sys/arch/sparc64/dev/rtc.c b/sys/arch/sparc64/dev/rtc.c index 01020b60919e..321b4538e583 100644 --- a/sys/arch/sparc64/dev/rtc.c +++ b/sys/arch/sparc64/dev/rtc.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtc.c,v 1.3 2008/01/10 15:17:40 tsutsui Exp $ */ +/* $NetBSD: rtc.c,v 1.4 2008/03/28 19:05:50 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.3 2008/01/10 15:17:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.4 2008/03/28 19:05:50 tsutsui Exp $"); /* * Clock driver for 'rtc' - mc146818 driver. @@ -77,10 +77,10 @@ __KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.3 2008/01/10 15:17:40 tsutsui Exp $"); #include #include -static int rtc_ebus_match(struct device *, struct cfdata *, void *); -static void rtc_ebus_attach(struct device *, struct device *, void *); +static int rtc_ebus_match(device_t, cfdata_t, void *); +static void rtc_ebus_attach(device_t, device_t, void *); -CFATTACH_DECL(rtc_ebus, sizeof(struct mc146818_softc), +CFATTACH_DECL_NEW(rtc_ebus, sizeof(struct mc146818_softc), rtc_ebus_match, rtc_ebus_attach, NULL, NULL); u_int rtc_read_reg(struct mc146818_softc *, u_int); @@ -89,7 +89,7 @@ u_int rtc_getcent(struct mc146818_softc *); void rtc_setcent(struct mc146818_softc *, u_int); static int -rtc_ebus_match(struct device *parent, struct cfdata *cf, void *aux) +rtc_ebus_match(device_t parent, cfdata_t cf, void *aux) { struct ebus_attach_args *ea = aux; @@ -129,9 +129,9 @@ rtc_write_reg(struct mc146818_softc *sc, u_int reg, u_int val) /* ARGSUSED */ static void -rtc_ebus_attach(struct device *parent, struct device *self, void *aux) +rtc_ebus_attach(device_t parent, device_t self, void *aux) { - struct mc146818_softc *sc = (void *)self; + struct mc146818_softc *sc = device_private(self); struct ebus_attach_args *ea = aux; char *model; int sz; @@ -146,7 +146,7 @@ rtc_ebus_attach(struct device *parent, struct device *self, void *aux) sz, BUS_SPACE_MAP_LINEAR, &sc->sc_bsh) != 0) { - printf("%s: can't map register\n", self->dv_xname); + aprint_error(": can't map register\n"); return; } @@ -165,7 +165,7 @@ rtc_ebus_attach(struct device *parent, struct device *self, void *aux) sc->sc_setcent = rtc_setcent; mc146818_attach(sc); - printf(": %s\n", model); + aprint_normal(": %s\n", model); /* * Turn interrupts off, just in case. (Although they shouldn't @@ -188,16 +188,13 @@ rtc_ebus_attach(struct device *parent, struct device *self, void *aux) #define MC_CENT 0x32 u_int -rtc_getcent(sc) - struct mc146818_softc *sc; +rtc_getcent(struct mc146818_softc *sc) { return rtc_read_reg(sc, MC_CENT); } void -rtc_setcent(sc, cent) - struct mc146818_softc *sc; - u_int cent; +rtc_setcent(struct mc146818_softc *sc, u_int cent) { rtc_write_reg(sc, MC_CENT, cent); diff --git a/sys/dev/ic/mc146818var.h b/sys/dev/ic/mc146818var.h index 94ace6b0e356..0102606791ee 100644 --- a/sys/dev/ic/mc146818var.h +++ b/sys/dev/ic/mc146818var.h @@ -1,4 +1,4 @@ -/* $NetBSD: mc146818var.h,v 1.4 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: mc146818var.h,v 1.5 2008/03/28 19:05:50 tsutsui Exp $ */ /* * Copyright (c) 2003 Izumi Tsutsui. All rights reserved. @@ -27,7 +27,7 @@ */ struct mc146818_softc { - struct device sc_dev; + device_t *sc_dev; bus_space_tag_t sc_bst; /* bus space tag */ bus_space_handle_t sc_bsh; /* bus space handle */