Subject: Re: Driver hacks 2: cs4231_sbus.c
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sparc
Date: 10/17/2002 00:02:11
On Wed, Oct 16, 2002 at 20:25:59 +0100, Julian Coleman wrote:

> With a Cycle 5 IP (basically a Sparc 5 in an IPC/IPX box), a phantom
> audiocs is attached because the PROM has an entry for SUNW,CS4231 but
> the audio hardware is actually an AMD 7930.  The SUNW,CS4231 node has
> `device_type serial', so checking for that (as in the following patch)
> stops the device matching.  However, it gives a "not configured" line
> on boot instead.  Would it be better to check for this in the attach
> routine instead (and print a suitable message there)?

This will not do.  E.g. a JavaStation-1 really has cs4231 but its
device_type is serial:

ok cd /iommu/sbus/SUNW,CS4231
ok .attributes               
intr                     00000039  00000000 
reg                      00000003  0c000000  00000040 
device_type              serial
dma-model                apcdma
alias                    audio
name                     SUNW,CS4231


Instead, take a look at sys/arch/sparc/stand/boot/prompatch.c that is
intended to correct prom oddities before booting the kernel.
Currently it is only used for javastations.  In particular, see the
entry that renames bogus zs nodes in JS1/OBP.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen