Subject: Re: can't find boot device on U5 (Re: CVS commit: src/sys/arch/sparc64)
To: Eduardo Horvath <eeh@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: port-sparc64
Date: 10/10/2006 00:32:47
On Mon, Oct 09, 2006 at 04:45:31PM +0000, Eduardo Horvath wrote:
> This seems sort of backwards.
> 
> I think you should be comparing the phandle of the parent of the 
> attaching device with the parent of the ofbootpackage node to find a 
> match.

Right, that should work and may be clearer.

> In any case, if you're doing this correctly most of the logic in 
> device_register() should be obsolete.  You don't need to match any of the 
> buses, just the final leaf device.

I'm not sure I understand.

Yes, we only need to match the leaf devices, but that happens by looking at
their bus specific attach args to extract the phandle. If there is an easier
way to get the phandle for an arbitrary leaf node, I'm all ears.

Martin