OF properties access ?

Sven Luther sven.luther at wanadoo.fr
Mon Jan 19 23:06:21 EST 2004

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 ?


Sven Luther

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

More information about the Linuxppc-dev mailing list