Update for bus.h changes.
This commit is contained in:
parent
5b4a54759d
commit
4c69a8b2ea
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: asc.c,v 1.25 1998/01/12 19:22:01 thorpej Exp $ */
|
||||
/* $NetBSD: asc.c,v 1.26 1998/01/13 19:24:50 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Scott Reynolds
|
||||
@ -121,7 +121,7 @@ ascmatch(parent, cf, aux)
|
||||
if (bus_space_map(oa->oa_tag, addr, MAC68K_ASC_LEN, 0, &bsh))
|
||||
return (0);
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 1))
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0, 1))
|
||||
rval = 1;
|
||||
else
|
||||
rval = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grf_iv.c,v 1.28 1998/01/12 19:22:05 thorpej Exp $ */
|
||||
/* $NetBSD: grf_iv.c,v 1.29 1998/01/13 19:24:53 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Allen Briggs. All rights reserved.
|
||||
@ -96,7 +96,7 @@ grfiv_match(parent, cf, aux)
|
||||
panic("failed to map space for DAFB regs.\n");
|
||||
}
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0x1C, 4) == 0) {
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0x1C, 4) == 0) {
|
||||
bus_space_unmap(oa->oa_tag, bsh, 0x1000);
|
||||
found = 0;
|
||||
goto nodafb;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_mc_obio.c,v 1.3 1997/11/07 13:31:16 briggs Exp $ */
|
||||
/* $NetBSD: if_mc_obio.c,v 1.4 1998/01/13 19:24:54 scottr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 David Huang <khym@bga.com>
|
||||
@ -93,7 +93,7 @@ mc_obio_match(parent, cf, aux)
|
||||
* try to read the CHIPID register. A MACE will always have
|
||||
* 0x?940, where the ? depends on the chip version.
|
||||
*/
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 1)) {
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0, 1)) {
|
||||
if ((bus_space_read_1(
|
||||
oa->oa_tag, bsh, MACE_REG(MACE_CHIPIDL)) == 0x40) &&
|
||||
((bus_space_read_1(
|
||||
@ -392,7 +392,7 @@ mc_obio_getaddr(sc, lladdr)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!bus_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
if (!mac68k_bus_space_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
bus_space_unmap(sc->sc_regt, bsh, 8*16);
|
||||
return (-1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_sn_obio.c,v 1.13 1997/11/05 03:27:29 briggs Exp $ */
|
||||
/* $NetBSD: if_sn_obio.c,v 1.14 1998/01/13 19:24:55 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Allen Briggs
|
||||
@ -85,7 +85,7 @@ sn_obio_match(parent, cf, aux)
|
||||
SONIC_REG_BASE, SN_REGSIZE, 0, &bsh))
|
||||
return 0;
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 4))
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0, 4))
|
||||
found = 1;
|
||||
|
||||
bus_space_unmap(oa->oa_tag, bsh, SN_REGSIZE);
|
||||
@ -198,7 +198,7 @@ sn_obio_getaddr(sc, lladdr)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!bus_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
if (!mac68k_bus_space_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
bus_space_unmap(sc->sc_regt, bsh, NBPG);
|
||||
return (-1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nubus.c,v 1.42 1998/01/12 19:22:14 thorpej Exp $ */
|
||||
/* $NetBSD: nubus.c,v 1.43 1998/01/13 19:24:56 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Allen Briggs. All rights reserved.
|
||||
@ -350,7 +350,7 @@ nubus_probe_slot(bst, bsh, slot, fmt)
|
||||
for (j = 8, found = 0; j > 0 && !found; j >>= 1) {
|
||||
ofs--;
|
||||
for (i = j; i > 0; i--, lanes--) {
|
||||
if (!bus_probe(bst, bsh, ofs, 1)) {
|
||||
if (!mac68k_bus_space_probe(bst, bsh, ofs, 1)) {
|
||||
lanes -= i;
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.176 1997/12/04 15:33:33 tv Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.177 1998/01/13 19:15:32 scottr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
@ -2762,11 +2762,11 @@ mac68k_ring_bell(freq, length, volume)
|
||||
*/
|
||||
|
||||
int
|
||||
bus_space_map(t, bpa, size, cacheable, bshp)
|
||||
bus_space_map(t, bpa, size, flags, bshp)
|
||||
bus_space_tag_t t;
|
||||
bus_addr_t bpa;
|
||||
bus_size_t size;
|
||||
int cacheable;
|
||||
int flags;
|
||||
bus_space_handle_t *bshp;
|
||||
{
|
||||
u_long pa, endpa;
|
||||
@ -2789,7 +2789,7 @@ bus_space_map(t, bpa, size, cacheable, bshp)
|
||||
panic("bus_space_map: overflow");
|
||||
#endif
|
||||
|
||||
error = bus_mem_add_mapping(bpa, size, cacheable, bshp);
|
||||
error = bus_mem_add_mapping(bpa, size, flags, bshp);
|
||||
if (error) {
|
||||
if (extent_free(iomem_ex, bpa, size, EX_NOWAIT |
|
||||
(iomem_malloc_safe ? EX_MALLOCOK : 0))) {
|
||||
@ -2803,12 +2803,12 @@ bus_space_map(t, bpa, size, cacheable, bshp)
|
||||
}
|
||||
|
||||
int
|
||||
bus_space_alloc(t, rstart, rend, size, alignment, boundary, cacheable,
|
||||
bus_space_alloc(t, rstart, rend, size, alignment, boundary, flags,
|
||||
bpap, bshp)
|
||||
bus_space_tag_t t;
|
||||
bus_addr_t rstart, rend;
|
||||
bus_size_t size, alignment, boundary;
|
||||
int cacheable;
|
||||
int flags;
|
||||
bus_addr_t *bpap;
|
||||
bus_space_handle_t *bshp;
|
||||
{
|
||||
@ -2835,7 +2835,7 @@ bus_space_alloc(t, rstart, rend, size, alignment, boundary, cacheable,
|
||||
* For memory space, map the bus physical address to
|
||||
* a kernel virtual address.
|
||||
*/
|
||||
error = bus_mem_add_mapping(bpa, size, cacheable, bshp);
|
||||
error = bus_mem_add_mapping(bpa, size, flags, bshp);
|
||||
if (error) {
|
||||
if (extent_free(iomem_ex, bpa, size, EX_NOWAIT |
|
||||
(iomem_malloc_safe ? EX_MALLOCOK : 0))) {
|
||||
@ -2851,10 +2851,10 @@ bus_space_alloc(t, rstart, rend, size, alignment, boundary, cacheable,
|
||||
}
|
||||
|
||||
int
|
||||
bus_mem_add_mapping(bpa, size, cacheable, bshp)
|
||||
bus_mem_add_mapping(bpa, size, flags, bshp)
|
||||
bus_addr_t bpa;
|
||||
bus_size_t size;
|
||||
int cacheable;
|
||||
int flags;
|
||||
bus_space_handle_t *bshp;
|
||||
{
|
||||
u_long pa, endpa;
|
||||
@ -2877,7 +2877,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp)
|
||||
for (; pa < endpa; pa += NBPG, va += NBPG) {
|
||||
pmap_enter(pmap_kernel(), va, pa,
|
||||
VM_PROT_READ | VM_PROT_WRITE, TRUE);
|
||||
if (!cacheable)
|
||||
if (!(flags & BUS_SPACE_MAP_CACHEABLE))
|
||||
pmap_changebit(pa, PG_CI, TRUE);
|
||||
}
|
||||
|
||||
@ -2938,10 +2938,10 @@ bus_space_subregion(t, bsh, offset, size, nbshp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
int *nofault;
|
||||
label_t *nofault;
|
||||
|
||||
int
|
||||
bus_probe(t, bsh, offset, sz)
|
||||
mac68k_bus_space_probe(t, bsh, offset, sz)
|
||||
bus_space_tag_t t;
|
||||
bus_space_handle_t bsh;
|
||||
bus_size_t offset;
|
||||
@ -2950,9 +2950,9 @@ bus_probe(t, bsh, offset, sz)
|
||||
int i;
|
||||
label_t faultbuf;
|
||||
|
||||
nofault = (int *)&faultbuf;
|
||||
if (setjmp((label_t *)nofault)) {
|
||||
nofault = (int *)0;
|
||||
nofault = &faultbuf;
|
||||
if (setjmp(nofault)) {
|
||||
nofault = (label_t *)0;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -2967,15 +2967,11 @@ bus_probe(t, bsh, offset, sz)
|
||||
i = bus_space_read_4(t, bsh, offset);
|
||||
break;
|
||||
case 8:
|
||||
/*FALLTHROUGH*/
|
||||
default:
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("bus_probe: unsupported data size %d\n", sz);
|
||||
#endif
|
||||
nofault = (int *)0;
|
||||
return (0);
|
||||
panic("bus_space_probe: unsupported data size %d\n", sz);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
nofault = (int *)0;
|
||||
nofault = (label_t *)0;
|
||||
return (1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nubus.c,v 1.42 1998/01/12 19:22:14 thorpej Exp $ */
|
||||
/* $NetBSD: nubus.c,v 1.43 1998/01/13 19:24:56 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Allen Briggs. All rights reserved.
|
||||
@ -350,7 +350,7 @@ nubus_probe_slot(bst, bsh, slot, fmt)
|
||||
for (j = 8, found = 0; j > 0 && !found; j >>= 1) {
|
||||
ofs--;
|
||||
for (i = j; i > 0; i--, lanes--) {
|
||||
if (!bus_probe(bst, bsh, ofs, 1)) {
|
||||
if (!mac68k_bus_space_probe(bst, bsh, ofs, 1)) {
|
||||
lanes -= i;
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: asc.c,v 1.25 1998/01/12 19:22:01 thorpej Exp $ */
|
||||
/* $NetBSD: asc.c,v 1.26 1998/01/13 19:24:50 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Scott Reynolds
|
||||
@ -121,7 +121,7 @@ ascmatch(parent, cf, aux)
|
||||
if (bus_space_map(oa->oa_tag, addr, MAC68K_ASC_LEN, 0, &bsh))
|
||||
return (0);
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 1))
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0, 1))
|
||||
rval = 1;
|
||||
else
|
||||
rval = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grf_obio.c,v 1.28 1998/01/12 19:22:05 thorpej Exp $ */
|
||||
/* $NetBSD: grf_obio.c,v 1.29 1998/01/13 19:24:53 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Allen Briggs. All rights reserved.
|
||||
@ -96,7 +96,7 @@ grfiv_match(parent, cf, aux)
|
||||
panic("failed to map space for DAFB regs.\n");
|
||||
}
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0x1C, 4) == 0) {
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0x1C, 4) == 0) {
|
||||
bus_space_unmap(oa->oa_tag, bsh, 0x1000);
|
||||
found = 0;
|
||||
goto nodafb;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_mc_obio.c,v 1.3 1997/11/07 13:31:16 briggs Exp $ */
|
||||
/* $NetBSD: if_mc_obio.c,v 1.4 1998/01/13 19:24:54 scottr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 David Huang <khym@bga.com>
|
||||
@ -93,7 +93,7 @@ mc_obio_match(parent, cf, aux)
|
||||
* try to read the CHIPID register. A MACE will always have
|
||||
* 0x?940, where the ? depends on the chip version.
|
||||
*/
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 1)) {
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0, 1)) {
|
||||
if ((bus_space_read_1(
|
||||
oa->oa_tag, bsh, MACE_REG(MACE_CHIPIDL)) == 0x40) &&
|
||||
((bus_space_read_1(
|
||||
@ -392,7 +392,7 @@ mc_obio_getaddr(sc, lladdr)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!bus_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
if (!mac68k_bus_space_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
bus_space_unmap(sc->sc_regt, bsh, 8*16);
|
||||
return (-1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_sn_obio.c,v 1.13 1997/11/05 03:27:29 briggs Exp $ */
|
||||
/* $NetBSD: if_sn_obio.c,v 1.14 1998/01/13 19:24:55 scottr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Allen Briggs
|
||||
@ -85,7 +85,7 @@ sn_obio_match(parent, cf, aux)
|
||||
SONIC_REG_BASE, SN_REGSIZE, 0, &bsh))
|
||||
return 0;
|
||||
|
||||
if (bus_probe(oa->oa_tag, bsh, 0, 4))
|
||||
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0, 4))
|
||||
found = 1;
|
||||
|
||||
bus_space_unmap(oa->oa_tag, bsh, SN_REGSIZE);
|
||||
@ -198,7 +198,7 @@ sn_obio_getaddr(sc, lladdr)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!bus_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
if (!mac68k_bus_space_probe(sc->sc_regt, bsh, 0, 1)) {
|
||||
bus_space_unmap(sc->sc_regt, bsh, NBPG);
|
||||
return (-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user