diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-02-18 21:23:01 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-02-18 21:23:01 +0000 |
commit | eaf7e4077bbdbef69eadc94b58a322563858e587 (patch) | |
tree | f4ef9780b9e02503277617fe13dbb054bf146542 | |
parent | 6f9984f1006d9a6be8749b2ee7cc298183765327 (diff) |
Only attach on Sun Blade 1000/2000.
-rw-r--r-- | sys/arch/sparc64/dev/tda.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/tda.c b/sys/arch/sparc64/dev/tda.c index 78483fe223f..eb00ac3ca72 100644 --- a/sys/arch/sparc64/dev/tda.c +++ b/sys/arch/sparc64/dev/tda.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tda.c,v 1.1 2008/02/12 10:12:14 robert Exp $ */ +/* $OpenBSD: tda.c,v 1.2 2008/02/18 21:23:00 kettenis Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -23,6 +23,9 @@ #include <sys/device.h> #include <sys/sensors.h> +#include <machine/autoconf.h> +#include <machine/openfirm.h> + #include <dev/i2c/i2cvar.h> /* fan control registers */ @@ -75,10 +78,17 @@ int tda_match(struct device *parent, void *match, void *aux) { struct i2c_attach_args *ia = aux; + char name[32]; if (strcmp(ia->ia_name, "tda8444") != 0) return (0); + /* Only attach on the Sun Blade 1000/2000. */ + if (OF_getprop(findroot(), "name", name, sizeof(name)) <= 0) + return (0); + if (strcmp(name, "SUNW,Sun-Blade-1000") != 0) + return (0); + return (1); } |