summaryrefslogtreecommitdiffstats
path: root/sys/arch/sparc/dev/lebuffer.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/lebuffer.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/lebuffer.c')
-rw-r--r--sys/arch/sparc/dev/lebuffer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/sparc/dev/lebuffer.c b/sys/arch/sparc/dev/lebuffer.c
index 65c16196158..702d3fd84f6 100644
--- a/sys/arch/sparc/dev/lebuffer.c
+++ b/sys/arch/sparc/dev/lebuffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lebuffer.c,v 1.9 2010/07/10 19:32:24 miod Exp $ */
+/* $OpenBSD: lebuffer.c,v 1.10 2015/03/30 20:30:22 miod Exp $ */
/* $NetBSD: lebuffer.c,v 1.3 1997/05/24 20:16:28 pk Exp $ */
/*
@@ -41,8 +41,8 @@
#include <sys/buf.h>
#include <sys/proc.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/lebuffervar.h>
@@ -83,7 +83,7 @@ lebufmatch(parent, vcf, aux)
{
struct cfdata *cf = vcf;
struct confargs *ca = aux;
- register struct romaux *ra = &ca->ca_ra;
+ struct romaux *ra = &ca->ca_ra;
if (strcmp(cf->cf_driver->cd_name, ra->ra_name))
return(0);
@@ -155,7 +155,8 @@ lebufattach(parent, self, aux)
sbus_translate(parent, &oca);
oca.ca_bustype = BUS_SBUS;
- (void) config_found(&sc->sc_dev, (void *)&oca, lebufprint);
+ oca.ca_dmat = ca->ca_dmat;
+ config_found(&sc->sc_dev, (void *)&oca, lebufprint);
}
#endif /* SUN4C || SUN4D || SUN4E || SUN4M */
}