Subject: Re: one more: stop at haltwo0
To: Dennis Grevenstein <dennis@pcde.inka.de>
From: Ilpo Ruotsalainen <lonewolf@iki.fi>
List: port-sgimips
Date: 12/24/2004 02:56:47
On Thu Dec 23 2004 at 17:53:39 +0100, Dennis Grevenstein wrote:
> haltwo0 at hpc0 offset 0x58000 
> 
> 
> It's dead after that. It won't even come back when I
> send a break via serial console.

The haltwo probe is anything but robust, since the docs (and the
hardware, far as I could figure out) give no real way of doing totally
safe probe for device existence.

The driver code could be better though, it should use bus_space_peek()
and bus_space_poke() before it has confirmed the presence of the audio
hardware rather than just expecting something to be mapped there
(actually just checking the address range has *something* mapped would
probably be a good start for the whole detection business, IIRC nothing
else can end up mapped at that HPC3 offset anyway).

And the whole damn detection business should be in haltwo_match(), not
in haltwo_attach() aswell.

-- 
Ilpo Ruotsalainen - <lonewolf@iki.fi> - http://www.iki.fi/lonewolf/