vme_bus_probe() takes an `offset' argument.

This commit is contained in:
pk 1998-02-06 00:22:41 +00:00
parent 40b15d9230
commit 0725302eac
6 changed files with 22 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cgtwo.c,v 1.26 1998/02/04 01:04:48 pk Exp $ */
/* $NetBSD: cgtwo.c,v 1.27 1998/02/06 00:24:41 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@ -136,7 +136,7 @@ cgtwomatch(parent, cf, aux)
cf->cf_flags &= FB_USERMASK;
mod = VMEMOD_A24 | VMEMOD_S | VMEMOD_D;
if (vme_bus_probe(ct, bt, va->vma_reg[0] + CG2_CTLREG_OFF, 2, mod,
if (vme_bus_probe(ct, bt, va->vma_reg[0], CG2_CTLREG_OFF, 2, mod,
0, 0)) {
return (1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: si.c,v 1.43 1998/02/04 20:50:47 pk Exp $ */
/* $NetBSD: si.c,v 1.44 1998/02/06 00:24:37 pk Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -308,8 +308,8 @@ si_match(parent, cf, aux)
/* Make sure there is something there... */
mod = VMEMOD_A24 | VMEMOD_S | VMEMOD_D;
vme_addr = va->vma_reg[0] + 1;
if (vme_bus_probe(ct, bt, vme_addr, 1, mod, NULL, 0) == 0)
vme_addr = va->vma_reg[0];
if (vme_bus_probe(ct, bt, vme_addr, 1, 1, mod, NULL, 0) == 0)
return (0);
/*
@ -318,8 +318,8 @@ si_match(parent, cf, aux)
* be determined using the fact that the "sc" board occupies
* 4K bytes in VME space but the "si" board occupies 2K bytes.
*/
vme_addr = va->vma_reg[0] + 0x801;
return (vme_bus_probe(ct, bt, vme_addr, 1, mod, NULL, 0));
vme_addr = va->vma_reg[0];
return (vme_bus_probe(ct, bt, vme_addr, 0x801, 1, mod, NULL, 0));
}
static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: vme_machdep.c,v 1.4 1998/02/04 05:12:58 thorpej Exp $ */
/* $NetBSD: vme_machdep.c,v 1.5 1998/02/06 00:24:42 pk Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -89,7 +89,7 @@ int vmeintr4m __P((void *));
static int sparc_vme_probe __P((void *, bus_space_tag_t, vme_addr_t,
vme_size_t, vme_mod_t,
size_t, vme_size_t, vme_mod_t,
int (*) __P((void *, void *)), void *));
static int sparc_vme_map __P((void *, vme_addr_t, vme_size_t, vme_mod_t,
bus_space_tag_t, bus_space_handle_t *));
@ -402,10 +402,11 @@ sparc_vme_async_fault()
}
int
sparc_vme_probe(cookie, tag, addr, size, mod, callback, arg)
sparc_vme_probe(cookie, tag, addr, offset, size, mod, callback, arg)
void *cookie;
bus_space_tag_t tag;
vme_addr_t addr;
size_t offset;
vme_size_t size;
int mod;
int (*callback) __P((void *, void *));
@ -420,7 +421,7 @@ sparc_vme_probe(cookie, tag, addr, size, mod, callback, arg)
reg.rr_paddr = (void *)addr;
vmebus_translate(sc, mod, &reg);
tmp = (caddr_t)mapdev(&reg, TMPMAP_VA, 0, NBPG);
result = probeget(tmp, size) != -1;
result = probeget(tmp + offset, size) != -1;
if (result && callback != NULL)
result = (*callback)(tmp, arg);
pmap_remove(pmap_kernel(), TMPMAP_VA, TMPMAP_VA+NBPG);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie_vme.c,v 1.3 1998/02/04 00:59:02 pk Exp $ */
/* $NetBSD: if_ie_vme.c,v 1.4 1998/02/06 00:22:41 pk Exp $ */
/*-
* Copyright (c) 1995 Charles D. Cranor
@ -389,7 +389,7 @@ ie_vme_match(parent, cf, aux)
int mod;
mod = VMEMOD_A24 | VMEMOD_S | VMEMOD_D;
return (vme_bus_probe(ct, bt, va->vma_reg[0], 2, mod, 0, 0));
return (vme_bus_probe(ct, bt, va->vma_reg[0], 0, 2, mod, 0, 0));
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: xd.c,v 1.9 1998/02/04 05:15:16 thorpej Exp $ */
/* $NetBSD: xd.c,v 1.10 1998/02/06 00:22:43 pk Exp $ */
/*
*
@ -384,11 +384,11 @@ int xdcmatch(parent, cf, aux)
vme_chipset_tag_t ct = va->vma_chipset_tag;
bus_space_tag_t bt = va->vma_bustag;
vme_mod_t mod;
vme_addr_t vaddr;
mod = VMEMOD_A16 | VMEMOD_S | VMEMOD_D | VMEMOD_D32;
vaddr = va->vma_reg[0] + offsetof(struct xdc, xdc_csr);
return (vme_bus_probe(ct, bt, va->vma_reg[0], 1, mod, xdc_probe, 0));
return (vme_bus_probe(ct, bt, va->vma_reg[0],
offsetof(struct xdc, xdc_csr), 1,
mod, xdc_probe, 0));
}
/*
@ -428,7 +428,6 @@ xdcattach(parent, self, aux)
xdc->xdc = (struct xdc *) bh;
xdc->ipl = va->vma_pri;
xdc->vector = va->vma_vec;
printf(" pri %d", va->vma_pri);
for (lcv = 0; lcv < XDC_MAXDEV; lcv++)
xdc->sc_drives[lcv] = (struct xd_softc *) 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: xy.c,v 1.7 1998/02/04 05:15:17 thorpej Exp $ */
/* $NetBSD: xy.c,v 1.8 1998/02/06 00:22:45 pk Exp $ */
/*
*
@ -303,7 +303,9 @@ int xycmatch(parent, cf, aux)
mod = VMEMOD_A16 | VMEMOD_S | VMEMOD_D;
return (vme_bus_probe(ct, bt, va->vma_reg[0], 1, mod, xyc_probe, 0));
return (vme_bus_probe(ct, bt, va->vma_reg[0],
offsetof(struct xyc, xyc_rsetup), 1,
mod, xyc_probe, 0));
}
/*
@ -339,7 +341,6 @@ xycattach(parent, self, aux)
xyc->xyc = (struct xyc *) bh;
xyc->ipl = va->vma_pri;
xyc->vector = va->vma_vec;
printf(" pri %d", va->vma_pri);
xyc->no_ols = 0; /* XXX should be from config */
for (lcv = 0; lcv < XYC_MAXDEV; lcv++)