diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2005-10-24 14:22:35 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2005-10-24 14:22:35 +0000 |
commit | 0a2f3e21288e3f3f66b9795c012651464c14939e (patch) | |
tree | affa9bfce83b7763f11df3a41819d75e41676009 /sys/arch/i386 | |
parent | 96dcd9b3e7ee2e5789b3a2c002b98984715e8c2e (diff) |
fix compilation for KGDB; looked by miod@.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 34 | ||||
-rw-r--r-- | sys/arch/i386/isa/pccomvar.h | 9 |
2 files changed, 14 insertions, 29 deletions
diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index 157eec9135c..8d3e7770da7 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.47 2005/09/26 22:32:05 miod Exp $ */ +/* $OpenBSD: pccom.c,v 1.48 2005/10/24 14:22:34 fgsch Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -144,7 +144,7 @@ int comdefaultrate = CONSPEED; /* XXX why set default? */ #else int comdefaultrate = TTYDEF_SPEED; #endif -int comconsaddr; +bus_addr_t comconsaddr; int comconsinit; int comconsattached; bus_space_tag_t comconsiot; @@ -158,10 +158,9 @@ int comevents = 0; #ifdef KGDB #include <sys/kgdb.h> -static int com_kgdb_addr; -static bus_space_tag_t com_kgdb_iot; -static bus_space_handle_t com_kgdb_ioh; -static int com_kgdb_attached; +bus_addr_t com_kgdb_addr; +bus_space_tag_t com_kgdb_iot; +bus_space_handle_t com_kgdb_ioh; int com_kgdb_getc(void *); void com_kgdb_putc(void *, int); @@ -319,9 +318,10 @@ comattach(parent, self, aux) void *aux; { struct com_softc *sc = (void *)self; - int iobase, irq; + bus_addr_t iobase; bus_space_tag_t iot; bus_space_handle_t ioh; + int irq; /* * XXX should be broken out into functions for isa attach and @@ -422,24 +422,6 @@ comattach(parent, self, aux) com_attach_subr(sc); } -#ifdef KGDB -void -com_enable_debugport(sc) - struct com_softc *sc; -{ - int s; - - /* Turn on line break interrupt, set carrier. */ - s = splhigh(); - SET(sc->sc_ier, IER_ERXRDY); - bus_space_write_1(sc->sc_iot, sc->sc_ioh, com_ier, sc->sc_ier); - SET(sc->sc_mcr, MCR_DTR | MCR_RTS | MCR_IENABLE); - bus_space_write_1(sc->sc_iot, sc->sc_ioh, com_mcr, sc->sc_mcr); - - splx(s); -} -#endif /* KGDB */ - int com_detach(self, flags) struct device *self; @@ -1718,7 +1700,7 @@ comcnpollc(dev, on) int com_kgdb_attach(iot, iobase, rate, frequency, cflag) bus_space_tag_t iot; - int iobase; + bus_addr_t iobase; int rate, frequency; tcflag_t cflag; { diff --git a/sys/arch/i386/isa/pccomvar.h b/sys/arch/i386/isa/pccomvar.h index 95f8adb6631..dc98de2b4c9 100644 --- a/sys/arch/i386/isa/pccomvar.h +++ b/sys/arch/i386/isa/pccomvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pccomvar.h,v 1.15 2005/09/26 22:32:05 miod Exp $ */ +/* $OpenBSD: pccomvar.h,v 1.16 2005/10/24 14:22:34 fgsch Exp $ */ /* $NetBSD: comvar.h,v 1.5 1996/05/05 19:50:47 christos Exp $ */ /* @@ -135,13 +135,16 @@ void com_enable_debugport(struct com_softc *); #endif /* DDB || KGDB */ #ifdef KGDB -int com_kgdb_attach(bus_space_tag_t, int, int, int, tcflag_t); +extern bus_space_tag_t com_kgdb_iot; +extern bus_addr_t com_kgdb_addr; + +int com_kgdb_attach(bus_space_tag_t, bus_addr_t, int, int, tcflag_t); int kgdbintr(void *); #endif /* KGDB */ void com_attach_subr(struct com_softc *); -extern int comconsaddr; +extern bus_addr_t comconsaddr; extern int comconsinit; extern int comconsattached; extern bus_space_tag_t comconsiot; |