summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/sbus.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-03-16 22:19:58 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-03-16 22:19:58 +0000
commit5175875cf81d7f5e41648a7d1edd8c642b607f2e (patch)
tree6c619bb34f5f35daf6eb4349eb0813693f6d00f3 /sys/arch/sparc64/dev/sbus.c
parentf136a79497c7a063c1cbe5c60e9511d62d652f1c (diff)
Set up interrupt translation for e10k.
Diffstat (limited to 'sys/arch/sparc64/dev/sbus.c')
-rw-r--r--sys/arch/sparc64/dev/sbus.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c
index ecf8976e382..8f81d83f7a8 100644
--- a/sys/arch/sparc64/dev/sbus.c
+++ b/sys/arch/sparc64/dev/sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbus.c,v 1.33 2008/03/09 13:28:20 kettenis Exp $ */
+/* $OpenBSD: sbus.c,v 1.34 2008/03/16 22:19:57 kettenis Exp $ */
/* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */
/*-
@@ -117,6 +117,7 @@
#include <sparc64/dev/iommureg.h>
#include <sparc64/dev/iommuvar.h>
#include <sparc64/dev/sbusreg.h>
+#include <sparc64/dev/starfire.h>
#include <dev/sbus/sbusvar.h>
#include <dev/sbus/xboxvar.h>
@@ -124,6 +125,7 @@
#include <machine/autoconf.h>
#include <machine/cpu.h>
+#include <machine/openfirm.h>
#include <machine/sparc64.h>
#ifdef DEBUG
@@ -296,6 +298,7 @@ sbus_mb_attach(struct device *parent, struct device *self, void *aux)
struct intrhand *ih;
int ipl, error;
struct sysioreg *sysio;
+ char buf[32];
char *name;
sc->sc_master = sc;
@@ -353,6 +356,11 @@ sbus_mb_attach(struct device *parent, struct device *self, void *aux)
printf("%s: ", sc->sc_dev.dv_xname);
iommu_init(name, &sc->sc_is, 0, -1);
+ /* Initialize Starfire PC interrupt translation. */
+ if (OF_getprop(findroot(), "name", buf, sizeof(buf)) > 0 &&
+ strcmp(buf, "SUNW,Ultra-Enterprise-10000") == 0)
+ starfire_pc_ittrans_init(ma->ma_upaid);
+
/* Enable the over temp intr */
ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT | M_ZERO);
if (ih == NULL)