diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-08-04 23:27:50 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-08-04 23:27:50 +0000 |
commit | af7d7f9b184b4a61a2196320c42f447118d222a6 (patch) | |
tree | 418cfb42e2b580ba3c70d037740dbd12d48554cd /sys | |
parent | a8bfdf187d480013f5e12f12d5c1e2bd6b94b66b (diff) |
new bus_dma API, match it
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/adv.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/adw.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/brooktree848.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/pciide.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/sv.c | 7 |
5 files changed, 11 insertions, 18 deletions
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index bed5c8eee15..ad5a74f2960 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv.c,v 1.4 1998/11/17 06:08:15 downsj Exp $ */ +/* $OpenBSD: adv.c,v 1.5 1999/08/04 23:27:48 niklas Exp $ */ /* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */ /* @@ -197,7 +197,7 @@ adv_alloc_ccbs(sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, sizeof(struct adv_control), (caddr_t *) & sc->sc_control, - BUS_DMA_NOWAIT | BUS_DMAMEM_NOSYNC)) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control structures, error = %d\n", sc->sc_dev.dv_xname, error); return (error); @@ -424,7 +424,7 @@ adv_alloc_overrunbuf(dvname, dmat) return (0); } if ((error = bus_dmamem_map(dmat, &seg, rseg, ASC_OVERRUN_BSIZE, - (caddr_t *) & overrunbuf, BUS_DMA_NOWAIT | BUS_DMAMEM_NOSYNC)) != 0) { + (caddr_t *) & overrunbuf, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map overrun buffer, error = %d\n", dvname, error); diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index 46fc2b6570f..bd5c15860c3 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.1 1998/11/17 06:14:58 downsj Exp $ */ +/* $OpenBSD: adw.c,v 1.2 1999/08/04 23:27:48 niklas Exp $ */ /* $NetBSD: adw.c,v 1.3 1998/10/10 00:28:33 thorpej Exp $ */ /* @@ -193,7 +193,7 @@ adw_alloc_ccbs(sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, sizeof(struct adw_control), (caddr_t *) & sc->sc_control, - BUS_DMA_NOWAIT | BUS_DMAMEM_NOSYNC)) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control structures, error = %d\n", sc->sc_dev.dv_xname, error); return (error); diff --git a/sys/dev/pci/brooktree848.c b/sys/dev/pci/brooktree848.c index 93b4bc344b9..754bd296662 100644 --- a/sys/dev/pci/brooktree848.c +++ b/sys/dev/pci/brooktree848.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brooktree848.c,v 1.9 1999/05/21 17:55:18 deraadt Exp $ */ +/* $OpenBSD: brooktree848.c,v 1.10 1999/08/04 23:27:49 niklas Exp $ */ /* $FreeBSD: brooktree848.c,v 1.64 1999/01/28 17:47:47 roger Exp $ */ /* BT848 Driver for Brooktree's Bt848, Bt849, Bt878 and Bt 879 based cards. The Brooktree BT848 Driver driver is based upon Mark Tinguely and @@ -4520,7 +4520,7 @@ get_bktr_mem(bktr, dmapp, size) } } if (bus_dmamem_map(dmat, &seg, rseg, size, - &kva, BUS_DMA_NOWAIT|BUS_DMAMEM_NOSYNC)) { + &kva, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { printf("bktr%d: Unable to dmamem_map of %d bytes\n", bktr->bktr_dev.dv_unit, size); bus_dmamem_free(dmat, &seg, rseg); diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index b80dc995288..a7e1743ec5f 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.6 1999/07/30 00:17:37 deraadt Exp $ */ +/* $OpenBSD: pciide.c,v 1.7 1999/08/04 23:27:49 niklas Exp $ */ /* $NetBSD: pciide.c,v 1.40 1999/07/12 13:49:38 bouyer Exp $ */ /* @@ -796,9 +796,6 @@ pciide_dma_table_setup(sc, channel, drive) return error; } -#ifdef __OpenBSD__ -#define BUS_DMA_COHERENT 0 -#endif if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, dma_table_size, (caddr_t *)&dma_maps->dma_table, @@ -808,9 +805,6 @@ pciide_dma_table_setup(sc, channel, drive) channel, drive, error); return error; } -#ifdef __OpenBSD__ -#undef BUS_DMA_COHERENT -#endif WDCDEBUG_PRINT(("pciide_dma_table_setup: table at %p len %ld, " "phy 0x%lx\n", dma_maps->dma_table, dma_table_size, diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index b7deed5e7ea..2f12913d56f 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sv.c,v 1.6 1999/01/02 00:02:49 niklas Exp $ */ +/* $OpenBSD: sv.c,v 1.7 1999/08/04 23:27:49 niklas Exp $ */ /* * Copyright (c) 1998 Constantine Paul Sapuntzakis @@ -57,13 +57,12 @@ #include <machine/bus.h> -/* NetBSD 1.3 backwards compatibility */ -#ifndef BUS_DMA_COHERENT -#define BUS_DMA_COHERENT 0 /* XXX */ +#ifdef __OpenBSD__ struct cfdriver sv_cd = { NULL, "sv", DV_DULL }; #endif + #ifdef AUDIO_DEBUG #define DPRINTF(x) if (svdebug) printf x #define DPRINTFN(n,x) if (svdebug>(n)) printf x |