Subject: Re: OF properties access ?

From: Sven Luther <[email-masked]>
Date: Mon, 19 Jan 2004 13:06:21 +0100

On Mon, Jan 19, 2004 at 10:42:05PM +1100, Benjamin Herrenschmidt wrote:
>
> > And indeed, the problem seems to be that i get /cpus, and not
> > /cpus/PowerPC,74x7. I thought that the /cpus should give the cpu per
> > default or something such. What should i do here, i can go look for a
> > PowerPC,74x7, but the board can also come with other CPUs (the 750Cxe
> > for now). Maybe i could remove the cpus checking code completely, and go
> > looking for the cpu type directly.
>
> For the "cpus" case, just get to the first child

Doing only : np = find_type_devices("cpu"); worked fine. I guess this
will catch any cpus in the system, and be ok. There are not yet
multi-cpu pegasos boxes, so i think it is ok to just check the first CPU
and enable the L2 cache there, i will make sure the OF of future
multi-cpu systems will set the L2 cache properly.

Or is it better to go for the first child of cpus ?

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/