summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-06-28 20:06:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-06-28 20:06:33 +0000
commitbd022abf0dad0f40dcf3536245c79ac14f6f291d (patch)
tree8b3e9f09c8a94135b6cd75f5678249462c757ba7 /sys/arch/sparc64/dev
parentab0556a8a996fce043c56978e4721ca2fb2ed599 (diff)
keep track of what is a schizo and what is tomatillo
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/schizo.c12
-rw-r--r--sys/arch/sparc64/dev/schizovar.h4
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c
index d7062c61e8f..6ea66c9ddf1 100644
--- a/sys/arch/sparc64/dev/schizo.c
+++ b/sys/arch/sparc64/dev/schizo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schizo.c,v 1.28 2006/06/27 21:22:14 kettenis Exp $ */
+/* $OpenBSD: schizo.c,v 1.29 2006/06/28 20:06:32 deraadt Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -124,6 +124,11 @@ schizo_attach(struct device *parent, struct device *self, void *aux)
struct schizo_softc *sc = (struct schizo_softc *)self;
struct mainbus_attach_args *ma = aux;
int busa;
+ char *str;
+
+ str = getpropstring(ma->ma_node, "compatible");
+ if (strcmp(str, "pci108e,a801") == 0)
+ sc->sc_tomatillo = 1;
sc->sc_node = ma->ma_node;
sc->sc_dmat = ma->ma_dmatag;
@@ -174,8 +179,9 @@ schizo_init(struct schizo_softc *sc, int busa)
(void **)&busranges))
panic("schizo: can't get bus-range");
- printf(": bus %c %d to %d\n", busa ? 'A' : 'B',
- busranges[0], busranges[1]);
+ printf(": \"%s\", bus %c %d to %d\n",
+ sc->sc_tomatillo ? "Tomatillo" : "Schizo",
+ busa ? 'A' : 'B', busranges[0], busranges[1]);
if (bus_space_subregion(pbm->sp_regt, sc->sc_ctrlh,
busa ? offsetof(struct schizo_regs, pbm_a) :
diff --git a/sys/arch/sparc64/dev/schizovar.h b/sys/arch/sparc64/dev/schizovar.h
index 6bad2bf6af5..ab72fa347bb 100644
--- a/sys/arch/sparc64/dev/schizovar.h
+++ b/sys/arch/sparc64/dev/schizovar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: schizovar.h,v 1.7 2006/06/01 19:12:45 jason Exp $ */
+/* $OpenBSD: schizovar.h,v 1.8 2006/06/28 20:06:32 deraadt Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -58,6 +58,8 @@ struct schizo_softc {
bus_space_tag_t sc_bust;
bus_addr_t sc_ctrl;
bus_space_handle_t sc_ctrlh;
+
+ int sc_tomatillo;
};
#define schizo_read(sc,r) \