Subject: Re: How to implement PSC driver on Au1550
To: None <shige@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-evbmips
Date: 02/24/2006 02:22:42
In article <43FDE116.8010506@netbsd.org>
shige@NetBSD.org wrote:

> Almost Ok.
> But Attaching wm0 failed. Hummmm...
> kiyohara's OMS-AL400 works fine.

Hmm, bad firmware revision (PCI space is not mapped properly)?
pci_configure_bus(9) is recommended?
Anyway, info by options PCI_CONFIG_DUMP may help.

> > aupsc* at aubus?
> > ausmbus* at aupsc?
> > smbus* at ausmbus?
> 
> Is the role of aupsc device only switching/selecting protocols?

Yes, and it will search children via config_found(9) etc.

> Is the following kernel config bad idea??
> 
> aupsc* at aubus?
> audio* at aupsc?
> spi* at aupsc?
> i2s* at aupsc?
> smbus* at aupsc?

audioprobe() and audioattach() require struct audio_attach_args,
and other children may require their own attach args.
There is no way to switch attach args in aupsc_attach(),
i.e. smbus and audio should have differnt parents with
proper attributes (audiobus etc.), I think.
Or we could probe each psc as a different device per its
configuration like:

pscaudio* at aubus?
audio* at pscaudio?
pscsmbus* at aubus?
smbus* at pscsmbus?
 :
---
Izumi Tsutsui