
On Fri, 25 May 2007 12:56:13 -0400 Jerry Van Baren gerald.vanbaren@smiths-aerospace.com wrote:
FWIIW, that is in the (infamous) common/fdt_support.c. It was adapted from ft_build.c. It looks like I lost a OF_CPU in the constructed string when I was adapting.
Original code: p = ft_get_prop(blob, "/cpus/" OF_CPU "/clock-frequency", &len);
Comments:
- It looks like you are missing the OF_CPU definition, or I'm not
pulling in the right .h file
I didn't do anything; as I said before, this is your u-boot-fdt.git top-of-tree.
- Some of the code is in fdt_support.c fdt_chosen(). The stuff messing
with CPU-specific values does NOT belong in fdt_chosen(), it should go in cpu/mpc83xx/cpu.c
not sure about that; why replicate code in the cpu/*/cpu.c files? Can't fdt_chosen() update a property only if it exists? i.e., the cpu dependency would be implied by the device tree, the best place for it IMO.
- /cpu/PowerPC,8360@0/bus-frequency is properly set in
cpu/mpc83xx/cpu.c ft_cpu_setup(). The table of nodes and properties correctly has "/cpus/" OF_CPU, "bus-frequency", which seems to indicate that I don't have the right header pulled in to define OF_CPU. The defines from point #2
precisely.
Screwed up code in fdt_chosen()
#ifdef OF_TBCLK nodeoffset = fdt_find_node_by_path (fdt, "/cpus/" OF_CPU "/timebase-frequency"); if (nodeoffset >= 0) { clock = cpu_to_be32(OF_TBCLK); err = fdt_setprop(fdt, nodeoffset, "clock-frequency", &clock, 4);
noticed that sloppiness.
The code in question is in
that is the question.
please do not ask Wolfgang to pull patches to files in mpc83xx and related directories (cpu.c, board configs, etc.) from your tree; they should go through the mpc83xx tree from now on.
Kim