diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 06:31:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 06:31:56 +0000 |
commit | e13e1edf92f61f9aacecd214dbf9320e7be8c1f7 (patch) | |
tree | e2f0fae18777e3bdd3d9a909e9b710ff45651694 /sys/dev/isa | |
parent | e674982e26bc7a14eaaf3228e8e84ae2f26694dc (diff) |
from netbsd; Convert IRQ, DRQ, and port numbers to int
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/ad1848.c | 10 | ||||
-rw-r--r-- | sys/dev/isa/ad1848var.h | 10 | ||||
-rw-r--r-- | sys/dev/isa/gus.c | 81 | ||||
-rw-r--r-- | sys/dev/isa/pas.c | 23 | ||||
-rw-r--r-- | sys/dev/isa/pss.c | 36 | ||||
-rw-r--r-- | sys/dev/isa/sb.c | 25 | ||||
-rw-r--r-- | sys/dev/isa/sbdsp.c | 21 | ||||
-rw-r--r-- | sys/dev/isa/sbdspvar.h | 12 | ||||
-rw-r--r-- | sys/dev/isa/wss.c | 6 |
9 files changed, 113 insertions, 111 deletions
diff --git a/sys/dev/isa/ad1848.c b/sys/dev/isa/ad1848.c index 1f9b908e147..124f9bdd5fa 100644 --- a/sys/dev/isa/ad1848.c +++ b/sys/dev/isa/ad1848.c @@ -1,4 +1,4 @@ -/* $NetBSD: ad1848.c,v 1.6 1995/07/07 02:11:51 brezak Exp $ */ +/* $NetBSD: ad1848.c,v 1.7 1995/11/10 04:30:36 mycroft Exp $ */ /* * Copyright (c) 1994 John Brezak @@ -291,7 +291,7 @@ int ad1848_probe(sc) struct ad1848_softc *sc; { - register u_short iobase = sc->sc_iobase; + register int iobase = sc->sc_iobase; u_char tmp, tmp1 = 0xff, tmp2 = 0xff; int i; @@ -468,7 +468,7 @@ void ad1848_attach(sc) struct ad1848_softc *sc; { - register u_short iobase = sc->sc_iobase; + register int iobase = sc->sc_iobase; int i; struct ad1848_volume vol_mid = {150, 150}; struct ad1848_volume vol_0 = {0, 0}; @@ -1506,7 +1506,7 @@ ad1848_dma_input(addr, p, cc, intr, arg) void *arg; { register struct ad1848_softc *sc = addr; - register u_short iobase; + register int iobase; register u_char reg; if (sc->sc_locked) { @@ -1561,7 +1561,7 @@ ad1848_dma_output(addr, p, cc, intr, arg) void *arg; { register struct ad1848_softc *sc = addr; - register u_short iobase; + register int iobase; register u_char reg; if (sc->sc_locked) { diff --git a/sys/dev/isa/ad1848var.h b/sys/dev/isa/ad1848var.h index 16f02dce79f..cee085d899c 100644 --- a/sys/dev/isa/ad1848var.h +++ b/sys/dev/isa/ad1848var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ad1848var.h,v 1.6 1995/07/07 02:11:56 brezak Exp $ */ +/* $NetBSD: ad1848var.h,v 1.7 1995/11/10 04:30:40 mycroft Exp $ */ /* * Copyright (c) 1994 John Brezak @@ -59,10 +59,10 @@ struct ad1848_softc { u_int sc_dma_cnt; #endif - u_short sc_iobase; /* I/O port base address */ - u_short sc_irq; /* interrupt */ - u_short sc_drq; /* DMA */ - u_short sc_recdrq; /* record/capture DMA */ + int sc_iobase; /* I/O port base address */ + int sc_irq; /* interrupt */ + int sc_drq; /* DMA */ + int sc_recdrq; /* record/capture DMA */ u_long sc_irate; /* Sample rate for input */ u_long sc_orate; /* ...and output */ diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c index 7e846f78275..7f1c415f434 100644 --- a/sys/dev/isa/gus.c +++ b/sys/dev/isa/gus.c @@ -1,4 +1,4 @@ -/* $NetBSD: gus.c,v 1.2 1995/07/24 05:54:52 cgd Exp $ */ +/* $NetBSD: gus.c,v 1.3 1995/11/10 04:30:44 mycroft Exp $ */ /* * Copyright (c) 1994, 1995 Ken Hornstein. All rights reserved. @@ -165,10 +165,10 @@ struct gus_softc { struct isadev sc_id; /* ISA device */ void *sc_ih; /* interrupt vector */ - u_short sc_iobase; /* I/O base address */ - u_short sc_irq; /* IRQ used */ - u_short sc_drq; /* DMA channel for play */ - u_short sc_recdrq; /* DMA channel for recording */ + int sc_iobase; /* I/O base address */ + int sc_irq; /* IRQ used */ + int sc_drq; /* DMA channel for play */ + int sc_recdrq; /* DMA channel for recording */ int sc_flags; /* Various flags about the GUS */ #define GUS_MIXER_INSTALLED 0x01 /* An ICS mixer is installed */ @@ -454,15 +454,22 @@ struct cfdriver guscd = { * registers. A zero means that the referenced IRQ/DRQ is invalid */ -static int gus_irq_map[] = { 0, 0, 1, 3, 0, 2, 0, 4, 0, 1, 0, 5, 6, 0, 0, 7 }; -static int gus_drq_map[] = { 0, 1, 0, 2, 0, 3, 4, 5 }; +static int gus_irq_map[] = { + IRQUNK, IRQUNK, 1, 3, IRQUNK, 2, IRQUNK, 4, IRQUNK, 1, IRQUNK, 5, 6, + IRQUNK, IRQUNK, 7 +}; +static int gus_drq_map[] = { + DRQUNK, 1, DRQUNK, 2, DRQUNK, 3, 4, 5 +}; /* * A list of valid base addresses for the GUS */ -static u_short gus_base_addrs[] = { 0x210, 0x220, 0x230, 0x240, 0x250, 0x260 }; -static int gus_addrs = sizeof(gus_base_addrs) / sizeof(u_short); +static int gus_base_addrs[] = { + 0x210, 0x220, 0x230, 0x240, 0x250, 0x260 +}; +static int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]); /* * Maximum frequency values of the GUS based on the number of currently active @@ -654,7 +661,7 @@ gusprobe(parent, self, aux) register struct isa_attach_args *ia = aux; struct cfdata *cf = sc->sc_dev.dv_cfdata; register int iobase = ia->ia_iobase; - u_short recdrq = cf->cf_flags; + int recdrq = cf->cf_flags; int i; unsigned char s1, s2; @@ -664,18 +671,18 @@ gusprobe(parent, self, aux) * valid for this card. */ - if (! gus_irq_map[ia->ia_irq]) { + if (gus_irq_map[ia->ia_irq] == IRQUNK) { printf("gus: invalid irq %d, card not probed\n", ia->ia_irq); return(0); } - if (! gus_drq_map[ia->ia_drq]) { + if (gus_drq_map[ia->ia_drq] == DRQUNK) { printf("gus: invalid drq %d, card not probed\n", ia->ia_drq); return(0); } if (recdrq != 0x00) { - if (recdrq > 7 || ! gus_drq_map[recdrq]) { + if (recdrq > 7 || gus_drq_map[recdrq] == DRQUNK) { printf("gus: invalid flag given for second DMA channel (0x%x), card not probed\n", recdrq); return(0); } @@ -764,7 +771,7 @@ gusattach(parent, self, aux) { register struct gus_softc *sc = (void *) self; register struct isa_attach_args *ia = aux; - register u_short port = ia->ia_iobase; + register int port = ia->ia_iobase; int s,i; register unsigned char c,d,m; @@ -1268,7 +1275,7 @@ gusintr(arg) { register struct gus_softc *sc = arg; unsigned char intr; - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; int retval = 0; DPRINTF(("gusintr\n")); @@ -1328,7 +1335,7 @@ gus_dmaout_timeout(arg) void *arg; { register struct gus_softc *sc = arg; - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; int s; printf("%s: dmaout timeout\n", sc->sc_dev.dv_xname); @@ -1356,7 +1363,7 @@ static int gus_dmaout_intr(sc) struct gus_softc *sc; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; /* * If we got a DMA transfer complete from the GUS DRAM, then deal @@ -1376,7 +1383,7 @@ static void gus_dmaout_dointr(sc) struct gus_softc *sc; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; /* sc->sc_dmaoutcnt - 1 because DMA controller counts from zero?. */ isa_dmadone(B_WRITE, @@ -1522,7 +1529,7 @@ static int gus_voice_intr(sc) struct gus_softc *sc; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; int ignore = 0, voice, rval = 0; unsigned long addr; unsigned char intr, status; @@ -1658,7 +1665,7 @@ gus_start_playing(sc, bufno) struct gus_softc *sc; int bufno; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; /* * Start the voices playing, with buffer BUFNO. */ @@ -1737,7 +1744,7 @@ gus_continue_playing(sc, voice) register struct gus_softc *sc; int voice; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; /* * stop this voice from interrupting while we work. @@ -1837,7 +1844,7 @@ gusdmaout(sc, flags, gusaddr, buffaddr, length) caddr_t buffaddr; { register unsigned char c = (unsigned char) flags; - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; int s; DMAPRINTF(("gusdmaout flags=%x scflags=%x\n", flags, sc->sc_flags)); @@ -1909,7 +1916,7 @@ gus_start_voice(sc, voice, intrs) int voice; int intrs; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; unsigned long start; unsigned long current; unsigned long end; @@ -2005,7 +2012,7 @@ gus_stop_voice(sc, voice, intrs_too) int voice; int intrs_too; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; sc->sc_voc[voice].voccntl |= GUSMASK_VOICE_STOPPED | GUSMASK_STOP_VOICE; @@ -2046,7 +2053,7 @@ gus_set_volume(sc, voice, volume) struct gus_softc *sc; int voice, volume; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; unsigned int gusvol; gusvol = gus_log_volumes[volume < 512 ? volume : 511]; @@ -2388,7 +2395,7 @@ static inline void gus_set_voices(sc, voices) struct gus_softc *sc; int voices; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; /* * Select the active number of voices */ @@ -2483,7 +2490,7 @@ gus_set_samprate(sc, voice, freq) struct gus_softc *sc; int voice, freq; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; unsigned int fc; unsigned long temp, f = (unsigned long) freq; @@ -2550,7 +2557,7 @@ gus_set_recrate(sc, rate) struct gus_softc *sc; u_long rate; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; u_char realrate; int s; DPRINTF(("gus_set_recrate %lu\n", rate)); @@ -2652,7 +2659,7 @@ gus_set_endaddr(sc, voice, addr) int voice; unsigned long addr; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; sc->sc_voc[voice].end_addr = addr; @@ -2676,7 +2683,7 @@ gus_set_curaddr(sc, voice, addr) int voice; unsigned long addr; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; sc->sc_voc[voice].current_addr = addr; @@ -2701,7 +2708,7 @@ gus_get_curaddr(sc, voice) struct gus_softc *sc; int voice; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; unsigned long addr; outb(port+GUS_VOICE_SELECT, (unsigned char) voice); @@ -2800,7 +2807,7 @@ gusreset(sc, voices) struct gus_softc *sc; int voices; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; int i,s; s = splgus(); @@ -2926,7 +2933,7 @@ static void gus_init_cs4231(sc) struct gus_softc *sc; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; u_char ctrl; ctrl = (port & 0xf0) >> 4; /* set port address middle nibble */ @@ -3197,7 +3204,7 @@ gus_dma_input(addr, buf, size, callback, arg) void *arg; { register struct gus_softc *sc = addr; - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; register u_char dmac; DMAPRINTF(("gus_dma_input called\n")); @@ -3305,7 +3312,7 @@ gus_halt_out_dma(addr) void * addr; { register struct gus_softc *sc = addr; - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; DMAPRINTF(("gus_halt_out_dma called\n")); /* @@ -3340,7 +3347,7 @@ gus_halt_in_dma(addr) void * addr; { register struct gus_softc *sc = addr; - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; DMAPRINTF(("gus_halt_in_dma called\n")); /* @@ -4455,7 +4462,7 @@ static void gus_init_ics2101(sc) struct gus_softc *sc; { - register u_short port = sc->sc_iobase; + register int port = sc->sc_iobase; register struct ics2101_softc *ic = &sc->sc_mixer; sc->sc_mixer.sc_selio = port+GUS_MIXER_SELECT; sc->sc_mixer.sc_dataio = port+GUS_MIXER_DATA; diff --git a/sys/dev/isa/pas.c b/sys/dev/isa/pas.c index 1a018509680..417b2325e5a 100644 --- a/sys/dev/isa/pas.c +++ b/sys/dev/isa/pas.c @@ -1,4 +1,4 @@ -/* $NetBSD: pas.c,v 1.9 1995/07/19 19:58:51 brezak Exp $ */ +/* $NetBSD: pas.c,v 1.10 1995/11/10 05:05:18 mycroft Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -89,9 +89,9 @@ struct pas_softc { struct isadev sc_id; /* ISA device */ void *sc_ih; /* interrupt vectoring */ - u_short sc_iobase; /* PAS iobase */ - u_short sc_irq; /* PAS irq */ - u_short sc_drq; /* PAS drq */ + int sc_iobase; /* PAS iobase */ + int sc_irq; /* PAS irq */ + int sc_drq; /* PAS drq */ int model; int rev; @@ -268,7 +268,7 @@ pasprobe(parent, self, aux) { register struct pas_softc *sc = (void *)self; register struct isa_attach_args *ia = aux; - register u_short iobase; + register int iobase; u_char id, t; /* @@ -332,13 +332,11 @@ pasprobe(parent, self, aux) } if (sc->model >= 0) { - int irq = ia->ia_irq; - if (irq == IRQUNK) { + if (ia->ia_irq == IRQUNK) { printf("pas: sb emulation requires known irq\n"); return (0); } - irq = ia->ia_irq; - pasconf(sc->model, ia->ia_iobase, irq, 1); + pasconf(sc->model, ia->ia_iobase, ia->ia_irq, 1); } else { DPRINTF(("pas: could not probe pas\n")); return (0); @@ -374,8 +372,7 @@ pasprobe(parent, self, aux) } else #endif if (!SB_IRQ_VALID(ia->ia_irq)) { - int irq = ia->ia_irq; - printf("pas: configured irq %d invalid\n", irq); + printf("pas: configured irq chan %d invalid\n", ia->ia_irq); return 0; } @@ -398,7 +395,7 @@ pasforceintr(aux) { static char dmabuf; struct isa_attach_args *ia = aux; - u_short iobase = ia->ia_iobase; + int iobase = ia->ia_iobase; /* * Set up a DMA read of one byte. @@ -430,7 +427,7 @@ pasattach(parent, self, aux) { register struct pas_softc *sc = (struct pas_softc *)self; struct isa_attach_args *ia = (struct isa_attach_args *)aux; - register u_short iobase = ia->ia_iobase; + register int iobase = ia->ia_iobase; int err; sc->sc_iobase = iobase; diff --git a/sys/dev/isa/pss.c b/sys/dev/isa/pss.c index 34580d567e7..a5b4f0d5876 100644 --- a/sys/dev/isa/pss.c +++ b/sys/dev/isa/pss.c @@ -1,4 +1,4 @@ -/* $NetBSD: pss.c,v 1.9 1995/08/12 22:37:58 mycroft Exp $ */ +/* $NetBSD: pss.c,v 1.10 1995/11/10 04:30:49 mycroft Exp $ */ /* * Copyright (c) 1994 John Brezak @@ -107,8 +107,8 @@ struct pss_softc { struct isadev sc_id; /* ISA device */ void *sc_ih; /* interrupt vectoring */ - u_short sc_iobase; /* I/O port base address */ - u_short sc_drq; /* dma channel */ + int sc_iobase; /* I/O port base address */ + int sc_drq; /* dma channel */ struct ad1848_softc *ad1848_sc; @@ -128,8 +128,8 @@ struct mpu_softc { struct isadev sc_id; /* ISA device */ void *sc_ih; /* interrupt vectoring */ - u_short sc_iobase; /* MIDI I/O port base address */ - u_short sc_irq; /* MIDI interrupt */ + int sc_iobase; /* MIDI I/O port base address */ + int sc_irq; /* MIDI interrupt */ }; struct cd_softc { @@ -137,8 +137,8 @@ struct cd_softc { struct isadev sc_id; /* ISA device */ void *sc_ih; /* interrupt vectoring */ - u_short sc_iobase; /* CD I/O port base address */ - u_short sc_irq; /* CD interrupt */ + int sc_iobase; /* CD I/O port base address */ + int sc_irq; /* CD interrupt */ }; #ifdef AUDIO_DEBUG @@ -263,7 +263,7 @@ void pss_dspwrite(struct pss_softc *sc, int data) { int i; - u_short pss_base = sc->sc_iobase; + int pss_base = sc->sc_iobase; /* * Note! the i<5000000 is an emergency exit. The dsp_command() is sometimes @@ -414,7 +414,7 @@ pss_setdma(int dmaNum, int configAddress) static int pss_testirq(struct pss_softc *sc, int intNum) { - u_short iobase = sc->sc_iobase; + int iobase = sc->sc_iobase; int val; int ret; int i; @@ -500,7 +500,7 @@ pss_testirq(struct pss_softc *sc, int intNum) int pss_testdma(struct pss_softc *sc, int dmaNum) { - u_short iobase = sc->sc_iobase; + int iobase = sc->sc_iobase; int val; int i,ret; @@ -574,7 +574,7 @@ int pss_reset_dsp(struct pss_softc *sc) { u_long i; - u_short pss_base = sc->sc_iobase; + int pss_base = sc->sc_iobase; outw(pss_base+PSS_CONTROL, PSS_RESET); @@ -601,7 +601,7 @@ int pss_download_dsp(struct pss_softc *sc, u_char *block, int size) { int i, val, count; - u_short pss_base = sc->sc_iobase; + int pss_base = sc->sc_iobase; DPRINTF(("pss: downloading boot code...")); @@ -697,7 +697,7 @@ pssprobe(parent, self, aux) { struct pss_softc *sc = (void *)self; struct isa_attach_args *ia = aux; - u_short iobase = ia->ia_iobase; + int iobase = ia->ia_iobase; int i; if (!PSS_BASE_VALID(iobase)) { @@ -706,7 +706,7 @@ pssprobe(parent, self, aux) } /* Need to probe for iobase when IOBASEUNK {0x220 0x240} */ - if (iobase == (u_short)IOBASEUNK) { + if (iobase == IOBASEUNK) { iobase = 0x220; if ((inw(iobase+PSS_ID_VERS) & 0xff00) == 0x4500) @@ -991,7 +991,7 @@ pssattach(parent, self, aux) { struct pss_softc *sc = (struct pss_softc *)self; struct isa_attach_args *ia = (struct isa_attach_args *)aux; - u_short iobase = ia->ia_iobase; + int iobase = ia->ia_iobase; u_char vers; struct ad1848_volume vol = {150, 150}; int err; @@ -1030,7 +1030,7 @@ spattach(parent, self, aux) { struct ad1848_softc *sc = (struct ad1848_softc *)self; struct cfdata *cf = (void *)sc->sc_dev.dv_cfdata; - u_short iobase = cf->cf_iobase; + int iobase = cf->cf_iobase; sc->sc_iobase = iobase; sc->sc_drq = cf->cf_drq; @@ -1059,7 +1059,7 @@ mpuattach(parent, self, aux) { struct mpu_softc *sc = (struct mpu_softc *)self; struct cfdata *cf = (void *)sc->sc_dev.dv_cfdata; - u_short iobase = cf->cf_iobase; + int iobase = cf->cf_iobase; sc->sc_iobase = iobase; @@ -1083,7 +1083,7 @@ pcdattach(parent, self, aux) { struct cd_softc *sc = (struct cd_softc *)self; struct cfdata *cf = (void *)sc->sc_dev.dv_cfdata; - u_short iobase = cf->cf_iobase; + int iobase = cf->cf_iobase; /* * The pss driver simply enables the cd interface. The CD diff --git a/sys/dev/isa/sb.c b/sys/dev/isa/sb.c index a2715cf53b1..43d4aab1c15 100644 --- a/sys/dev/isa/sb.c +++ b/sys/dev/isa/sb.c @@ -1,4 +1,4 @@ -/* $NetBSD: sb.c,v 1.27 1995/07/19 19:58:53 brezak Exp $ */ +/* $NetBSD: sb.c,v 1.28 1995/11/10 05:01:05 mycroft Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -149,9 +149,12 @@ sbprobe(parent, self, aux) { register struct sbdsp_softc *sc = (void *)self; register struct isa_attach_args *ia = aux; - register u_short iobase = ia->ia_iobase; + register int iobase = ia->ia_iobase; + static u_char drq_conf[4] = { + 0x01, 0x02, -1, 0x08 + }; static u_char irq_conf[11] = { - -1, -1, 0x01, -1, -1, 0x02, -1, 0x04, -1, 0x01, 0x08 + -1, -1, 0x01, -1, -1, 0x02, -1, 0x04, -1, 0x01, 0x08 }; if (!SB_BASE_VALID(ia->ia_iobase)) { @@ -172,10 +175,8 @@ sbprobe(parent, self, aux) printf("sb: configured dma chan %d invalid\n", ia->ia_drq); return 0; } - if (ISSB16CLASS(sc)) { - sbdsp_mix_write(sc, SBP_SET_DRQ, - 1 << ia->ia_drq); - } + if (ISSB16CLASS(sc)) + sbdsp_mix_write(sc, SBP_SET_DRQ, drq_conf[ia->ia_drq]); } else { if (!SB_DRQ_VALID(ia->ia_drq)) { @@ -210,10 +211,8 @@ sbprobe(parent, self, aux) printf("sb: configured irq %d invalid\n", ia->ia_irq); return 0; } - if (ISSB16CLASS(sc)) { - sbdsp_mix_write(sc, SBP_SET_IRQ, - irq_conf[ia->ia_irq]); - } + if (ISSB16CLASS(sc)) + sbdsp_mix_write(sc, SBP_SET_IRQ, irq_conf[ia->ia_irq]); } else { if (!SB_IRQ_VALID(ia->ia_irq)) { @@ -239,7 +238,7 @@ sbforceintr(aux) { static char dmabuf; struct isa_attach_args *ia = aux; - u_short iobase = ia->ia_iobase; + int iobase = ia->ia_iobase; /* * Set up a DMA read of one byte. @@ -271,7 +270,7 @@ sbattach(parent, self, aux) { register struct sbdsp_softc *sc = (struct sbdsp_softc *)self; struct isa_attach_args *ia = (struct isa_attach_args *)aux; - register u_short iobase = ia->ia_iobase; + register int iobase = ia->ia_iobase; int err; sc->sc_ih = isa_intr_establish(ia->ia_irq, ISA_IST_EDGE, ISA_IPL_AUDIO, diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c index d0979c8b181..da55f376015 100644 --- a/sys/dev/isa/sbdsp.c +++ b/sys/dev/isa/sbdsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbdsp.c,v 1.13 1995/07/19 19:58:54 brezak Exp $ */ +/* $NetBSD: sbdsp.c,v 1.14 1995/11/10 05:01:06 mycroft Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -113,7 +113,7 @@ int sbdsp_probe(sc) struct sbdsp_softc *sc; { - register u_short iobase = sc->sc_iobase; + register int iobase = sc->sc_iobase; if (sbdsp_reset(sc) < 0) { DPRINTF(("sbdsp: couldn't reset card\n")); @@ -132,7 +132,7 @@ void sbdsp_attach(sc) struct sbdsp_softc *sc; { - register u_short iobase = sc->sc_iobase; + register int iobase = sc->sc_iobase; sc->sc_locked = 0; @@ -610,7 +610,7 @@ int sbdsp_reset(sc) register struct sbdsp_softc *sc; { - register u_short iobase = sc->sc_iobase; + register int iobase = sc->sc_iobase; /* * erase any memory of last transfer size. @@ -635,7 +635,7 @@ sbdsp_reset(sc) * polling loop and wait until it can take the byte. */ int -sbdsp_wdsp(u_short iobase, int v) +sbdsp_wdsp(int iobase, int v) { register int i; @@ -654,7 +654,7 @@ sbdsp_wdsp(u_short iobase, int v) * Read a byte from the DSP, using polling. */ int -sbdsp_rdsp(u_short iobase) +sbdsp_rdsp(int iobase) { register int i; @@ -725,7 +725,7 @@ short sbversion(sc) struct sbdsp_softc *sc; { - register u_short iobase = sc->sc_iobase; + register int iobase = sc->sc_iobase; short v; if (sbdsp_wdsp(iobase, SB_DSP_VERSION) < 0) @@ -896,7 +896,7 @@ sbdsp_set_sr(sc, srp, isdac) register int tc; int mode; int sr = *srp; - register u_short iobase; + register int iobase; /* * A SBPro in stereo mode uses time constants at double the @@ -940,8 +940,7 @@ sbdsp_dma_input(addr, p, cc, intr, arg) void *arg; { register struct sbdsp_softc *sc = addr; - register u_short iobase; - u_int phys; + register int iobase; #ifdef AUDIO_DEBUG if (sbdspdebug > 1) @@ -1024,7 +1023,7 @@ sbdsp_dma_output(addr, p, cc, intr, arg) void *arg; { register struct sbdsp_softc *sc = addr; - register u_short iobase; + register int iobase; #ifdef AUDIO_DEBUG if (sbdspdebug > 1) diff --git a/sys/dev/isa/sbdspvar.h b/sys/dev/isa/sbdspvar.h index 0a355ff5488..6b07bbc5522 100644 --- a/sys/dev/isa/sbdspvar.h +++ b/sys/dev/isa/sbdspvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: sbdspvar.h,v 1.6 1995/05/08 22:02:24 brezak Exp $ */ +/* $NetBSD: sbdspvar.h,v 1.7 1995/11/10 05:01:08 mycroft Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -75,9 +75,9 @@ struct sbdsp_softc { struct isadev sc_id; /* ISA device */ void *sc_ih; /* interrupt vectoring */ - u_short sc_iobase; /* I/O port base address */ - u_short sc_irq; /* interrupt */ - u_short sc_drq; /* DMA */ + int sc_iobase; /* I/O port base address */ + int sc_irq; /* interrupt */ + int sc_drq; /* DMA */ u_short sc_open; /* reference count of open calls */ u_short sc_locked; /* true when doing HS DMA */ @@ -180,8 +180,8 @@ int sbdsp_reset __P((struct sbdsp_softc *)); void sbdsp_spkron __P((struct sbdsp_softc *)); void sbdsp_spkroff __P((struct sbdsp_softc *)); -int sbdsp_wdsp(u_short iobase, int v); -int sbdsp_rdsp(u_short iobase); +int sbdsp_wdsp(int iobase, int v); +int sbdsp_rdsp(int iobase); int sbdsp_intr __P((void *)); short sbversion __P((struct sbdsp_softc *)); diff --git a/sys/dev/isa/wss.c b/sys/dev/isa/wss.c index 1eb10cfd1d0..802fe505284 100644 --- a/sys/dev/isa/wss.c +++ b/sys/dev/isa/wss.c @@ -1,4 +1,4 @@ -/* $NetBSD: wss.c,v 1.6 1995/07/07 02:15:12 brezak Exp $ */ +/* $NetBSD: wss.c,v 1.7 1995/11/10 04:30:52 mycroft Exp $ */ /* * Copyright (c) 1994 John Brezak @@ -178,7 +178,7 @@ wssprobe(parent, self, aux) { register struct wss_softc *sc = (void *)self; register struct isa_attach_args *ia = aux; - register u_short iobase = ia->ia_iobase; + register int iobase = ia->ia_iobase; static u_char interrupt_bits[12] = { -1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20 }; @@ -241,7 +241,7 @@ wssattach(parent, self, aux) { register struct wss_softc *sc = (struct wss_softc *)self; struct isa_attach_args *ia = (struct isa_attach_args *)aux; - register u_short iobase = ia->ia_iobase; + register int iobase = ia->ia_iobase; int err; sc->sc_ad1848.sc_recdrq = ia->ia_drq; |