diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-11 10:15:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-11 10:15:59 +0000 |
commit | ca9ff19887c8f2b865a16ee630a49c870a1e7cd4 (patch) | |
tree | 19f3681a938edd77a06dd61e6c91fe09f42f7626 /sys/arch/mvme68k | |
parent | bdd1db152fb75eb7de037e218459b5e7116ceb22 (diff) |
use void * for pa/va instead of caddr_t
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/dev/cl.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/mc.c | 16 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/memc.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/nvram.c | 12 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/pcc.c | 12 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/pcctwo.c | 13 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/sram.c | 10 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vme.c | 56 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vme.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vmel.c | 9 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vmes.c | 9 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/zs.c | 10 | ||||
-rw-r--r-- | sys/arch/mvme68k/include/autoconf.h | 6 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/autoconf.c | 20 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/vm_machdep.c | 4 |
16 files changed, 109 insertions, 94 deletions
diff --git a/sys/arch/mvme68k/dev/cl.c b/sys/arch/mvme68k/dev/cl.c index 6a1fdafbc3c..9864297bec0 100644 --- a/sys/arch/mvme68k/dev/cl.c +++ b/sys/arch/mvme68k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.12 1996/05/10 16:54:54 rahnds Exp $ */ +/* $OpenBSD: cl.c,v 1.13 1996/06/11 10:15:05 deraadt Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -72,7 +72,7 @@ #define CL_RXINTR 0x02 struct cl_cons { - u_char *cl_paddr; + void *cl_paddr; struct clreg *cl_vaddr; volatile struct pcctworeg *pcctwoaddr; u_char channel; @@ -237,7 +237,7 @@ int clprobe(parent, self, aux) { return 0; } - cl_reg = ca->ca_vaddr; + cl_reg = (struct clreg *)ca->ca_vaddr; #if 0 ret = !badvaddr(&cl_reg->cl_gfrcr,1); @@ -257,7 +257,7 @@ clattach(parent, self, aux) struct confargs *ca = aux; int i; - sc->cl_reg = ca->ca_vaddr; + sc->cl_reg = (struct clreg *)ca->ca_vaddr; sc->sc_pcctwo = ca->ca_master; if (ca->ca_paddr == cl_cons.cl_paddr) { diff --git a/sys/arch/mvme68k/dev/mc.c b/sys/arch/mvme68k/dev/mc.c index d21bb85031e..208ccd5b30b 100644 --- a/sys/arch/mvme68k/dev/mc.c +++ b/sys/arch/mvme68k/dev/mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mc.c,v 1.3 1996/04/28 11:06:08 deraadt Exp $ */ +/* $OpenBSD: mc.c,v 1.4 1996/06/11 10:15:11 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -55,8 +55,8 @@ struct mcsoftc { struct device sc_dev; - caddr_t sc_vaddr; - caddr_t sc_paddr; + void *sc_vaddr; + void *sc_paddr; struct mcreg *sc_mc; struct intrhand sc_nmiih; }; @@ -126,8 +126,8 @@ mc_scan(parent, child, args) oca.ca_paddr = sc->sc_paddr + oca.ca_offset; oca.ca_vaddr = sc->sc_vaddr + oca.ca_offset; } else { - oca.ca_paddr = (caddr_t)-1; - oca.ca_vaddr = (caddr_t)-1; + oca.ca_paddr = (void *)-1; + oca.ca_vaddr = (void *)-1; } oca.ca_bustype = BUS_MC; oca.ca_master = (void *)sc->sc_mc; @@ -155,7 +155,7 @@ mcattach(parent, self, args) * we must adjust our address */ sc->sc_paddr = ca->ca_paddr; - sc->sc_vaddr = (caddr_t)IIOV(sc->sc_paddr); + sc->sc_vaddr = (void *)IIOV(sc->sc_paddr); sc->sc_mc = (struct mcreg *)(sc->sc_vaddr + MC_MCCHIP_OFF); sys_mc = sc->sc_mc; @@ -212,9 +212,9 @@ mc_enableflashwrite(on) int on; { struct mcsoftc *sc = (struct mcsoftc *) mc_cd.cd_devs[0]; - volatile char *ena, x; + volatile u_char *ena, x; - ena = sc->sc_vaddr + + ena = (u_char *)sc->sc_vaddr + (on ? MC_ENAFLASHWRITE_OFFSET : MC_DISFLASHWRITE_OFFSET); x = *ena; } diff --git a/sys/arch/mvme68k/dev/memc.c b/sys/arch/mvme68k/dev/memc.c index 6a4763c6c4d..3a9f78c2a86 100644 --- a/sys/arch/mvme68k/dev/memc.c +++ b/sys/arch/mvme68k/dev/memc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memc.c,v 1.3 1996/04/28 11:06:09 deraadt Exp $ */ +/* $OpenBSD: memc.c,v 1.4 1996/06/11 10:15:13 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -57,7 +57,7 @@ struct memcsoftc { struct device sc_dev; - caddr_t sc_vaddr; + void * sc_vaddr; struct memcreg *sc_memc; struct intrhand sc_ih; }; diff --git a/sys/arch/mvme68k/dev/nvram.c b/sys/arch/mvme68k/dev/nvram.c index 5e63f0118ac..708aa23490f 100644 --- a/sys/arch/mvme68k/dev/nvram.c +++ b/sys/arch/mvme68k/dev/nvram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvram.c,v 1.3 1996/04/28 11:06:11 deraadt Exp $ */ +/* $OpenBSD: nvram.c,v 1.4 1996/06/11 10:15:16 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -47,8 +47,8 @@ struct nvramsoftc { struct device sc_dev; - caddr_t sc_paddr; - caddr_t sc_vaddr; + void * sc_paddr; + void * sc_vaddr; int sc_len; struct clockreg *sc_regs; }; @@ -72,7 +72,7 @@ nvrammatch(parent, vcf, args) struct cfdata *cf = vcf; struct confargs *ca = args; -/*X*/ if (ca->ca_vaddr == (caddr_t)-1) +/*X*/ if (ca->ca_vaddr == (void *)-1) /*X*/ return (1); return (!badvaddr(ca->ca_vaddr, 1)); } @@ -92,8 +92,8 @@ nvramattach(parent, self, args) if (cputyp == CPU_147) sc->sc_len = MK48T02_SIZE; -/*X*/ if (sc->sc_vaddr == (caddr_t)-1) -/*X*/ sc->sc_vaddr = mapiodev((caddr_t)sc->sc_paddr, +/*X*/ if (sc->sc_vaddr == (void *)-1) +/*X*/ sc->sc_vaddr = mapiodev((void *)sc->sc_paddr, /*X*/ max(sc->sc_len, NBPG)); /*X*/ if (sc->sc_vaddr == NULL) /*X*/ panic("failed to map!\n"); diff --git a/sys/arch/mvme68k/dev/pcc.c b/sys/arch/mvme68k/dev/pcc.c index 0ed0b221e0b..d1ae03f6092 100644 --- a/sys/arch/mvme68k/dev/pcc.c +++ b/sys/arch/mvme68k/dev/pcc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcc.c,v 1.3 1996/04/28 11:06:12 deraadt Exp $ */ +/* $OpenBSD: pcc.c,v 1.4 1996/06/11 10:15:18 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -55,8 +55,8 @@ struct pccsoftc { struct device sc_dev; - caddr_t sc_vaddr; - caddr_t sc_paddr; + void *sc_vaddr; + void *sc_paddr; struct pccreg *sc_pcc; struct intrhand sc_nmiih; }; @@ -125,8 +125,8 @@ pcc_scan(parent, child, args) oca.ca_vaddr = sc->sc_vaddr + oca.ca_offset; oca.ca_paddr = sc->sc_paddr + oca.ca_offset; } else { - oca.ca_vaddr = (caddr_t)-1; - oca.ca_paddr = (caddr_t)-1; + oca.ca_vaddr = (void *)-1; + oca.ca_paddr = (void *)-1; } oca.ca_bustype = BUS_PCC; oca.ca_master = (void *)sc->sc_pcc; @@ -154,7 +154,7 @@ pccattach(parent, self, args) * we must adjust our address */ sc->sc_paddr = ca->ca_paddr; - sc->sc_vaddr = (caddr_t)IIOV(sc->sc_paddr); + sc->sc_vaddr = (void *)IIOV(sc->sc_paddr); sc->sc_pcc = (struct pccreg *)(sc->sc_vaddr + PCCSPACE_PCCCHIP_OFF); sys_pcc = sc->sc_pcc; diff --git a/sys/arch/mvme68k/dev/pcctwo.c b/sys/arch/mvme68k/dev/pcctwo.c index 04ac124d3b0..b24983f4363 100644 --- a/sys/arch/mvme68k/dev/pcctwo.c +++ b/sys/arch/mvme68k/dev/pcctwo.c @@ -1,4 +1,5 @@ -/* $OpenBSD: pcctwo.c,v 1.3 1996/04/28 11:06:13 deraadt Exp $ */ + +/* $OpenBSD: pcctwo.c,v 1.4 1996/06/11 10:15:21 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -55,8 +56,8 @@ struct pcctwosoftc { struct device sc_dev; - caddr_t sc_vaddr; /* PCC2 space */ - caddr_t sc_paddr; + void *sc_vaddr; /* PCC2 space */ + void *sc_paddr; struct pcctworeg *sc_pcc2; /* the actual registers */ }; @@ -127,8 +128,8 @@ pcctwo_scan(parent, child, args) oca.ca_vaddr = sc->sc_vaddr + oca.ca_offset; oca.ca_paddr = sc->sc_paddr + oca.ca_offset; } else { - oca.ca_vaddr = (caddr_t)-1; - oca.ca_paddr = (caddr_t)-1; + oca.ca_vaddr = (void *)-1; + oca.ca_paddr = (void *)-1; } oca.ca_bustype = BUS_PCCTWO; oca.ca_master = (void *)sc->sc_pcc2; @@ -156,7 +157,7 @@ pcctwoattach(parent, self, args) * we must adjust our address */ sc->sc_paddr = ca->ca_paddr; - sc->sc_vaddr = (caddr_t)IIOV(sc->sc_paddr); + sc->sc_vaddr = (void *)IIOV(sc->sc_paddr); sc->sc_pcc2 = (struct pcctworeg *)(sc->sc_vaddr + PCC2_PCC2CHIP_OFF); sys_pcc2 = sc->sc_pcc2; diff --git a/sys/arch/mvme68k/dev/sram.c b/sys/arch/mvme68k/dev/sram.c index 048d12f32e2..dda95723048 100644 --- a/sys/arch/mvme68k/dev/sram.c +++ b/sys/arch/mvme68k/dev/sram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sram.c,v 1.3 1996/04/28 11:06:19 deraadt Exp $ */ +/* $OpenBSD: sram.c,v 1.4 1996/06/11 10:15:24 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -54,8 +54,8 @@ struct sramsoftc { struct device sc_dev; - caddr_t sc_paddr; - caddr_t sc_vaddr; + void * sc_paddr; + void * sc_vaddr; int sc_len; }; @@ -80,7 +80,7 @@ srammatch(parent, vcf, args) if (cputyp == CPU_147) return (0); - if (ca->ca_vaddr == (caddr_t)-1) + if (ca->ca_vaddr == (void *)-1) return (!badpaddr(ca->ca_paddr, 1)); return (!badvaddr(ca->ca_vaddr, 1)); } @@ -138,7 +138,7 @@ sramattach(parent, self, args) printf(": len %d", sc->sc_len); sc->sc_paddr = ca->ca_paddr; - sc->sc_vaddr = mapiodev((caddr_t)sc->sc_paddr, sc->sc_len); + sc->sc_vaddr = mapiodev((void *)sc->sc_paddr, sc->sc_len); if (sc->sc_vaddr == NULL) { sc->sc_len = 0; printf(" -- failed to map"); diff --git a/sys/arch/mvme68k/dev/vme.c b/sys/arch/mvme68k/dev/vme.c index 4dc9982f228..b9227904f3e 100644 --- a/sys/arch/mvme68k/dev/vme.c +++ b/sys/arch/mvme68k/dev/vme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vme.c,v 1.3 1996/04/28 11:06:18 deraadt Exp $ */ +/* $OpenBSD: vme.c,v 1.4 1996/06/11 10:15:26 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -105,14 +105,14 @@ vmematch(parent, cf, args) * mappings, ie. the MVME147 cannot do 32 bit accesses to VME bus * addresses from 0 to physmem. */ -caddr_t +void * vmepmap(sc, vmeaddr, len, bustype) struct vmesoftc *sc; - caddr_t vmeaddr; + void *vmeaddr; int len; int bustype; { - u_long base = (u_long)vmeaddr; + u_int32_t base = (u_int32_t)vmeaddr; len = roundup(len, NBPG); switch (vmebustype) { @@ -120,12 +120,16 @@ vmepmap(sc, vmeaddr, len, bustype) case BUS_PCC: switch (bustype) { case BUS_VMES: + printf("base %8x/%8x len %8x\n", vmeaddr, base, len); if (base > VME1_A16BASE && - (base+len - VME1_A16BASE) < VME1_A16D16LEN) + (base+len - VME1_A16BASE) < VME1_A16D16LEN) { base = base - VME1_A16BASE + VME1_A16D16BASE; - else if (base+len < VME1_A32D16LEN) - base = base + VME1_A32D16BASE; - else { + printf("vmes1: base = %8x\n", base); /* 1:1 */ + } else if (base > VME1_A32D16BASE && + base+len < VME1_A16BASE) { + /* 1:1 mapped */ + printf("vmes2: base = %8x\n", base); + } else { printf("%s: cannot map pa %x len %x\n", sc->sc_dev.dv_xname, base, len); return (NULL); @@ -178,20 +182,20 @@ vmepmap(sc, vmeaddr, len, bustype) break; #endif } - return ((caddr_t)base); + return ((void *)base); } /* if successful, returns the va of a vme bus mapping */ -caddr_t +void * vmemap(sc, vmeaddr, len, bustype) struct vmesoftc *sc; - caddr_t vmeaddr; + void *vmeaddr; int len; int bustype; { - caddr_t pa, va; + void *pa, *va; - pa = vmepmap(sc, pa, len, bustype); + pa = vmepmap(sc, vmeaddr, len, bustype); if (pa == NULL) return (NULL); va = mapiodev(pa, len); @@ -200,7 +204,7 @@ vmemap(sc, vmeaddr, len, bustype) void vmeunmap(va, len) - caddr_t va; + void *va; int len; { unmapiodev(va, len); @@ -216,7 +220,7 @@ vmerw(sc, uio, flags, bus) register vm_offset_t o, v; register int c; register struct iovec *iov; - caddr_t vme; + void *vme; int error = 0; while (uio->uio_resid > 0 && error == 0) { @@ -235,13 +239,13 @@ vmerw(sc, uio, flags, bus) c = NBPG - (v & PGOFSET); if (c == 0) return (0); - vme = vmemap(sc, (caddr_t)(v & ~PGOFSET), + vme = vmemap(sc, (void *)(v & ~PGOFSET), NBPG, BUS_VMES); if (vme == NULL) { error = EFAULT; /* XXX? */ continue; } - error = uiomove((caddr_t)vme + (v & PGOFSET), c, uio); + error = uiomove((void *)vme + (v & PGOFSET), c, uio); vmeunmap(vme, NBPG); } return (error); @@ -285,13 +289,17 @@ vmescan(parent, child, args, bustype) oca.ca_vec = cf->cf_loc[2]; oca.ca_ipl = cf->cf_loc[3]; if (oca.ca_ipl > 0 && oca.ca_vec == -1) - oca.ca_vec = intr_freevec(); - - oca.ca_offset = (int)oca.ca_paddr; - oca.ca_vaddr = (void *)vmemap(sc, oca.ca_paddr, oca.ca_len, - oca.ca_bustype); + oca.ca_vec = intr_findvec(255, 0); + if (oca.ca_len == -1) + oca.ca_len = 4096; + + oca.ca_offset = (u_int)oca.ca_paddr; +printf("pa=%8x len=%8x vec=%d ipl=%d\n", oca.ca_paddr, oca.ca_len, +oca.ca_vec, oca.ca_ipl); + oca.ca_vaddr = vmemap(sc, oca.ca_paddr, oca.ca_len, oca.ca_bustype); if (!oca.ca_vaddr) oca.ca_vaddr = (void *)-1; +printf("va=%8x\n", oca.ca_vaddr); oca.ca_master = (void *)sc; oca.ca_name = cf->cf_driver->cd_name; if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) { @@ -299,6 +307,10 @@ vmescan(parent, child, args, bustype) vmeunmap(oca.ca_vaddr, oca.ca_len); return (0); } + /* + * If match works, the driver is responsible for + * vmunmap()ing if it does not need the mapping. + */ config_attach(parent, cf, &oca, vmeprint); return (1); } diff --git a/sys/arch/mvme68k/dev/vme.h b/sys/arch/mvme68k/dev/vme.h index 8d8cf20dc29..738a706dbdc 100644 --- a/sys/arch/mvme68k/dev/vme.h +++ b/sys/arch/mvme68k/dev/vme.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vme.h,v 1.3 1996/04/28 11:03:34 deraadt Exp $ */ +/* $OpenBSD: vme.h,v 1.4 1996/06/11 10:15:29 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -33,7 +33,7 @@ struct vmesoftc { struct device sc_dev; - caddr_t sc_vaddr; + void * sc_vaddr; struct intrhand sc_abih; /* `abort' switch */ }; @@ -319,8 +319,8 @@ struct vme2reg { #define VME2_A16BASE 0xffff0000UL #define VME2_A24BASE 0xff000000UL -caddr_t vmepmap __P((struct vmesoftc *sc, caddr_t vmeaddr, int len, +void * vmepmap __P((struct vmesoftc *sc, void * vmeaddr, int len, int bustype)); -caddr_t vmemap __P((struct vmesoftc *sc, caddr_t vmeaddr, int len, +void * vmemap __P((struct vmesoftc *sc, void * vmeaddr, int len, int bustype)); int vmerw __P((struct vmesoftc *sc, struct uio *uio, int flags, int bus)); diff --git a/sys/arch/mvme68k/dev/vmel.c b/sys/arch/mvme68k/dev/vmel.c index ede73a86c22..f446fb646a5 100644 --- a/sys/arch/mvme68k/dev/vmel.c +++ b/sys/arch/mvme68k/dev/vmel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmel.c,v 1.3 1996/04/28 11:06:16 deraadt Exp $ */ +/* $OpenBSD: vmel.c,v 1.4 1996/06/11 10:15:32 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -163,13 +163,14 @@ vmelwrite(dev, uio, flags) int vmelmmap(dev, off, prot) dev_t dev; - int off, prot; + int off; + int prot; { int unit = minor(dev); struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit]; - caddr_t pa; + void * pa; - pa = vmepmap(sc->sc_vme, (caddr_t)off, NBPG, BUS_VMEL); + pa = vmepmap(sc->sc_vme, (void *)off, NBPG, BUS_VMEL); printf("vmel %x pa %x\n", off, pa); if (pa == NULL) return (-1); diff --git a/sys/arch/mvme68k/dev/vmes.c b/sys/arch/mvme68k/dev/vmes.c index f4ffa05ae16..9178fe733d6 100644 --- a/sys/arch/mvme68k/dev/vmes.c +++ b/sys/arch/mvme68k/dev/vmes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmes.c,v 1.3 1996/04/28 11:06:16 deraadt Exp $ */ +/* $OpenBSD: vmes.c,v 1.4 1996/06/11 10:15:34 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -163,13 +163,14 @@ vmeswrite(dev, uio, flags) int vmesmmap(dev, off, prot) dev_t dev; - int off, prot; + int off; + int prot; { int unit = minor(dev); struct vmessoftc *sc = (struct vmessoftc *) vmes_cd.cd_devs[unit]; - caddr_t pa; + void * pa; - pa = vmepmap(sc->sc_vme, (caddr_t)off, NBPG, BUS_VMES); + pa = vmepmap(sc->sc_vme, (void *)off, NBPG, BUS_VMES); printf("vmes %x pa %x\n", off, pa); if (pa == NULL) return (-1); diff --git a/sys/arch/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c index 757ab943d02..855d3f43c24 100644 --- a/sys/arch/mvme68k/dev/zs.c +++ b/sys/arch/mvme68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.3 1996/04/28 11:06:14 deraadt Exp $ */ +/* $OpenBSD: zs.c,v 1.4 1996/06/11 10:15:38 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -133,7 +133,7 @@ int zsopen __P((dev_t, int, int, struct proc *)); void zsstart __P((struct tty *)); int zsparam __P((struct tty *, struct termios *)); int zsirq __P((int unit)); -int zsregs __P((caddr_t va, int unit, volatile u_char **crp, +int zsregs __P((void *va, int unit, volatile u_char **crp, volatile u_char **drp)); int zspclk __P((void)); @@ -1083,7 +1083,7 @@ u_long zs_cons_addrs_162[] = { ZS0_PHYS_162, ZS1_PHYS_162 }; */ int zsregs(va, unit, crp, drp) - caddr_t va; + void *va; int unit; volatile u_char **crp, **drp; { @@ -1100,7 +1100,7 @@ zsregs(va, unit, crp, drp) #ifdef MVME147 case CPU_147: if (!va) - va = (caddr_t)IIOV(zs_cons_addrs_147[zsunit(unit)]); + va = (void *)IIOV(zs_cons_addrs_147[zsunit(unit)]); scc_adr_147 = (volatile struct scc_147 *)va; scc_cr = &scc_adr_147->cr; scc_dr = &scc_adr_147->dr; @@ -1110,7 +1110,7 @@ zsregs(va, unit, crp, drp) #ifdef MVME162 case CPU_162: if (!va) - va = (caddr_t)IIOV(zs_cons_addrs_162[zsunit(unit)]); + va = (void *)IIOV(zs_cons_addrs_162[zsunit(unit)]); scc_adr_162 = (volatile struct scc_162 *)va; scc_cr = &scc_adr_162->cr; scc_dr = &scc_adr_162->dr; diff --git a/sys/arch/mvme68k/include/autoconf.h b/sys/arch/mvme68k/include/autoconf.h index 9be0cfecfdf..c7c19ac876e 100644 --- a/sys/arch/mvme68k/include/autoconf.h +++ b/sys/arch/mvme68k/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.4 1996/05/29 15:43:55 chuck Exp $ */ +/* $OpenBSD: autoconf.h,v 1.5 1996/06/11 10:15:43 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -63,5 +63,5 @@ struct device *bootdv; /* boot device */ /* PARTITIONSHIFT from disklabel.h */ #define PARTITIONMASK ((1 << PARTITIONSHIFT) - 1) -caddr_t mapiodev __P((caddr_t pa, int size)); -void unmapiodev __P((caddr_t kva, int size)); +void *mapiodev __P((void *pa, int size)); +void unmapiodev __P((void *kva, int size)); diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c index cadb124da60..a70a2008c2a 100644 --- a/sys/arch/mvme68k/mvme68k/autoconf.c +++ b/sys/arch/mvme68k/mvme68k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.6 1996/05/29 16:37:16 chuck Exp $ */ +/* $OpenBSD: autoconf.c,v 1.7 1996/06/11 10:15:49 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -109,7 +109,7 @@ void setroot __P((void)); /* XXX must be allocated statically because of early console init */ struct map extiomap[EIOMAPSIZE/16]; -extern char *extiobase; +extern void *extiobase; void mainbus_attach __P((struct device *, struct device *, void *)); int mainbus_match __P((struct device *, void *, void *)); @@ -139,7 +139,7 @@ mainbus_print(args, bus) struct confargs *ca = args; if (ca->ca_paddr != (void *)-1) - printf(" addr 0x%x", ca->ca_paddr); + printf(" addr 0x%x", (u_int32_t)ca->ca_paddr); return (UNCONF); } @@ -152,8 +152,8 @@ mainbus_scan(parent, child, args) struct confargs oca; bzero(&oca, sizeof oca); - oca.ca_paddr = (caddr_t)cf->cf_loc[0]; - oca.ca_vaddr = (caddr_t)-1; + oca.ca_paddr = (void *)cf->cf_loc[0]; + oca.ca_vaddr = (void *)-1; oca.ca_ipl = -1; oca.ca_bustype = BUS_MAIN; oca.ca_name = cf->cf_driver->cd_name; @@ -202,17 +202,17 @@ configure() * Allocate/deallocate a cache-inhibited range of kernel virtual address * space mapping the indicated physical address range [pa - pa+size) */ -caddr_t +void * mapiodev(pa, size) - caddr_t pa; + void *pa; int size; { int ix, npf, offset; - caddr_t kva; + void *kva; size = roundup(size, NBPG); offset = (int)pa & PGOFSET; - pa = (caddr_t)((int)pa & ~PGOFSET); + pa = (void *)((int)pa & ~PGOFSET); #ifdef DEBUG if (((int)pa & PGOFSET) || (size & PGOFSET)) @@ -229,7 +229,7 @@ mapiodev(pa, size) void unmapiodev(kva, size) - caddr_t kva; + void *kva; int size; { int ix; diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index d10e81afbe6..1ba75a3f175 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.10 1996/05/08 02:10:54 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.11 1996/06/11 10:15:54 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -1228,11 +1228,11 @@ int *nofault; int badpaddr(addr, size) - register caddr_t addr; + register void *addr; int size; { int off = (int)addr & PGOFSET; - caddr_t v, p = (caddr_t)((int)addr & ~PGOFSET); + caddr_t v, p = (void *)((int)addr & ~PGOFSET); int x; v = mapiodev(p, NBPG); diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c index d3cd2256efe..ac04b72e91f 100644 --- a/sys/arch/mvme68k/mvme68k/vm_machdep.c +++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.6 1996/05/04 16:07:50 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.7 1996/06/11 10:15:58 deraadt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -202,7 +202,7 @@ pagemove(from, to, size) * are specified by `prot'. */ physaccess(vaddr, paddr, size, prot) - caddr_t vaddr, paddr; + void *vaddr, *paddr; register int size, prot; { register pt_entry_t *pte; |