summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
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
parentf136a79497c7a063c1cbe5c60e9511d62d652f1c (diff)
Set up interrupt translation for e10k.
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/psycho.c10
-rw-r--r--sys/arch/sparc64/dev/sbus.c10
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index f36cf6bc097..2281f6c7395 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psycho.c,v 1.55 2008/01/19 11:13:43 kettenis Exp $ */
+/* $OpenBSD: psycho.c,v 1.56 2008/03/16 22:19:57 kettenis Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
@@ -49,6 +49,7 @@
#define _SPARC_BUS_DMA_PRIVATE
#include <machine/bus.h>
#include <machine/autoconf.h>
+#include <machine/openfirm.h>
#include <machine/psl.h>
#include <dev/pci/pcivar.h>
@@ -58,6 +59,7 @@
#include <sparc64/dev/iommuvar.h>
#include <sparc64/dev/psychoreg.h>
#include <sparc64/dev/psychovar.h>
+#include <sparc64/dev/starfire.h>
#include <sparc64/sparc64/cache.h>
#ifdef DEBUG
@@ -233,6 +235,7 @@ psycho_attach(struct device *parent, struct device *self, void *aux)
u_int64_t csr;
int psycho_br[2], n;
struct psycho_type *ptype;
+ char buf[32];
sc->sc_node = ma->ma_node;
sc->sc_bustag = ma->ma_bustag;
@@ -389,6 +392,11 @@ psycho_attach(struct device *parent, struct device *self, void *aux)
if (osc == NULL) {
uint64_t timeo;
+ /* 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);
+
/*
* Establish handlers for interesting interrupts....
*
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)