diff options
Diffstat (limited to 'sys/arch/sparc64/dev/tda.c')
-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); } |