summaryrefslogtreecommitdiffstats
path: root/sys/arch/sparc/dev/qec.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-03-30 20:30:20 +0000
committermiod <miod@openbsd.org>2015-03-30 20:30:20 +0000
commit3b395b5772ca2783f5951e526fbc3bba3e36f8cd (patch)
tree4b44a2c0aa150415e83855fc8e75f74b4ee2f95b /sys/arch/sparc/dev/qec.c
parentsync (diff)
downloadwireguard-openbsd-3b395b5772ca2783f5951e526fbc3bba3e36f8cd.tar.xz
wireguard-openbsd-3b395b5772ca2783f5951e526fbc3bba3e36f8cd.zip
Add a bus_dma_tag_t for DVMA usage, suitable for use for devices not sitting
behind a sun4m iommu. Move the existing dvma routines from vm_machdep.c to this new dvma.c; this allows for a few declarations to be removed from public headers. Extend the device attachment arguments (struct confargs) to pass a bus_dma_tag_t. mainbus receives the dvma bus_dma_tag_t, and devices pass the tag unchanged to their children, except for iommu(4) which replaces it with its own. Change the few sun4m-only drivers to pick the bus_dma_tag_t from confargs rather than assume iommu; this allows qlw(4) to attach and work on sun4c. ok kettenis@
Diffstat (limited to 'sys/arch/sparc/dev/qec.c')
-rw-r--r--sys/arch/sparc/dev/qec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/sparc/dev/qec.c b/sys/arch/sparc/dev/qec.c
index a887e51732d..65e9c41ba89 100644
--- a/sys/arch/sparc/dev/qec.c
+++ b/sys/arch/sparc/dev/qec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qec.c,v 1.23 2015/03/29 10:59:47 mpi Exp $ */
+/* $OpenBSD: qec.c,v 1.24 2015/03/30 20:30:22 miod Exp $ */
/*
* Copyright (c) 1998 Theo de Raadt and Jason L. Wright.
@@ -47,8 +47,8 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <sparc/autoconf.h>
-#include <sparc/cpu.h>
+#include <machine/autoconf.h>
+#include <machine/cpu.h>
#include <sparc/dev/sbusvar.h>
#include <sparc/dev/dmareg.h>
@@ -190,7 +190,8 @@ qecattach(parent, self, aux)
qec_translate(sc, &oca);
oca.ca_bustype = BUS_SBUS;
- (void) config_found(&sc->sc_dev, (void *)&oca, qecprint);
+ oca.ca_dmat = ca->ca_dmat;
+ config_found(&sc->sc_dev, (void *)&oca, qecprint);
}
}