diff options
| author | pk <pk@NetBSD.org> | 2003-02-27 13:30:39 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 2003-02-27 13:30:39 +0000 |
| commit | db0731296177118c6987606ffb2283f4ff8dc5dc (patch) | |
| tree | 6cf4cc2cda0ed4284457439e35d4004114cc595b /sys/dev | |
| parent | c03626b07bb7ae37ebb59ae31ebb887dae7be804 (diff) | |
Some machine have a `SUNW,CS4231' node, but no actual hardware. It seems
these can be identified by a `serial' device type.
From Julian Coleman.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/sbus/cs4231_sbus.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/sbus/cs4231_sbus.c b/sys/dev/sbus/cs4231_sbus.c index debe8b90cfb..552e8628998 100644 --- a/sys/dev/sbus/cs4231_sbus.c +++ b/sys/dev/sbus/cs4231_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs4231_sbus.c,v 1.25 2002/12/10 13:44:47 pk Exp $ */ +/* $NetBSD: cs4231_sbus.c,v 1.26 2003/02/27 13:30:39 pk Exp $ */ /*- * Copyright (c) 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.25 2002/12/10 13:44:47 pk Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.26 2003/02/27 13:30:39 pk Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -50,6 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.25 2002/12/10 13:44:47 pk Exp $"); #include <machine/bus.h> #include <machine/intr.h> +#include <machine/autoconf.h> #include <dev/sbus/sbusvar.h> @@ -148,7 +149,17 @@ cs4231_sbus_match(parent, cf, aux) { struct sbus_attach_args *sa = aux; - return (strcmp(sa->sa_name, AUDIOCS_PROM_NAME) == 0); + if (strcmp(sa->sa_name, AUDIOCS_PROM_NAME) != 0) + return (0); + + /* + * Some machine have a SUNW,CS4231 node, but no hardware. + * It seems these can be identified by a `serial' device type. + */ + if (strcmp(PROM_getpropstring(sa->sa_node, "device_type"), + "serial") == 0) + return (0); + return (1); } |
