diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index e45be78a6f69..76c86b81069b 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.257 2006/12/10 00:33:11 uwe Exp $ */ +/* $NetBSD: com.c,v 1.258 2007/01/10 20:59:10 cube Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.257 2006/12/10 00:33:11 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.258 2007/01/10 20:59:10 cube Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -597,30 +597,30 @@ com_config(struct com_softc *sc) if (sc->sc_type == COM_TYPE_HAYESP) { /* Set 16550 compatibility mode */ - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD1, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD1, HAYESP_SETMODE); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_MODE_FIFO|HAYESP_MODE_RTS| HAYESP_MODE_SCALE); /* Set RTS/CTS flow control */ - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD1, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD1, HAYESP_SETFLOWTYPE); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_FLOW_RTS); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_FLOW_CTS); /* Set flow control levels */ - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD1, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD1, HAYESP_SETRXFLOW); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_HIBYTE(HAYESP_RXHIWMARK)); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_LOBYTE(HAYESP_RXHIWMARK)); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_HIBYTE(HAYESP_RXLOWMARK)); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, HAYESP_LOBYTE(HAYESP_RXLOWMARK)); } #endif @@ -1632,9 +1632,9 @@ com_loadchannelregs(struct com_softc *sc) CSR_WRITE_1(regsp, COM_REG_FIFO, sc->sc_fifo); #ifdef COM_HAYESP if (sc->sc_type == COM_TYPE_HAYESP) { - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD1, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD1, HAYESP_SETPRESCALER); - bus_space_write_1(iot, sc->sc_hayespioh, HAYESP_CMD2, + bus_space_write_1(regsp->cr_iot, sc->sc_hayespioh, HAYESP_CMD2, sc->sc_prescaler); } #endif diff --git a/sys/dev/isa/com_isa.c b/sys/dev/isa/com_isa.c index 9900f4385146..e536e7b1908b 100644 --- a/sys/dev/isa/com_isa.c +++ b/sys/dev/isa/com_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_isa.c,v 1.27 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: com_isa.c,v 1.28 2007/01/10 20:59:10 cube Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.27 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.28 2007/01/10 20:59:10 cube Exp $"); #include #include @@ -225,7 +225,7 @@ com_isa_isHAYESP(bus_space_handle_t hayespioh, struct com_softc *sc) { char val, dips; int combaselist[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; - bus_space_tag_t iot = sc->sc_iot; + bus_space_tag_t iot = sc->sc_regs.cr_iot; /* * Hayes ESP cards have two iobases. One is for compatibility with