summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/pyro.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c
index 5570e623027..8f8fa75052d 100644
--- a/sys/arch/sparc64/dev/pyro.c
+++ b/sys/arch/sparc64/dev/pyro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pyro.c,v 1.14 2008/07/12 13:08:04 kettenis Exp $ */
+/* $OpenBSD: pyro.c,v 1.15 2008/12/21 19:40:41 kettenis Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -38,6 +38,10 @@
#include <machine/bus.h>
#include <machine/autoconf.h>
+#ifdef DDB
+#include <machine/db_machdep.h>
+#endif
+
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -56,6 +60,10 @@ int pyro_debug = ~0;
#define DPRINTF(l, s)
#endif
+#define FIRE_RESET_GEN 0x7010
+
+#define FIRE_RESET_GEN_XIR 0x0000000000000002L
+
#define FIRE_INTRMAP_INT_CNTRL_NUM_MASK 0x000003c0
#define FIRE_INTRMAP_INT_CNTRL_NUM0 0x00000040
#define FIRE_INTRMAP_INT_CNTRL_NUM1 0x00000080
@@ -98,6 +106,10 @@ void *_pyro_intr_establish(bus_space_tag_t, bus_space_tag_t, int, int, int,
int pyro_dmamap_create(bus_dma_tag_t, bus_dma_tag_t, bus_size_t, int,
bus_size_t, bus_size_t, int, bus_dmamap_t *);
+#ifdef DDB
+void pyro_xir(void *, int);
+#endif
+
int
pyro_match(struct device *parent, void *match, void *aux)
{
@@ -214,6 +226,10 @@ pyro_init(struct pyro_softc *sc, int busa)
free(busranges, M_DEVBUF);
+#ifdef DDB
+ db_register_xir(pyro_xir, sc);
+#endif
+
config_found(&sc->sc_dv, &pba, pyro_print);
}
@@ -539,6 +555,17 @@ _pyro_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle,
return (ih);
}
+#ifdef DDB
+void
+pyro_xir(void *arg, int cpu)
+{
+ struct pyro_softc *sc = arg;
+
+ bus_space_write_8(sc->sc_bust, sc->sc_xbch, FIRE_RESET_GEN,
+ FIRE_RESET_GEN_XIR);
+}
+#endif
+
const struct cfattach pyro_ca = {
sizeof(struct pyro_softc), pyro_match, pyro_attach
};