From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Imminent u-boot-fdt pull request
Date: Fri, 25 May 2007 12:56:13 -0400 [thread overview]
Message-ID: <4657152D.7030606@smiths-aerospace.com> (raw)
In-Reply-To: <20070525105833.3d1dbd0e.kim.phillips@freescale.com>
Kim Phillips wrote:
> On Fri, 25 May 2007 11:27:47 +0200
> Wolfgang Grandegger <wg@grandegger.com> wrote:
>
>> Kim Phillips wrote:
>>> On Tue, 22 May 2007 00:06:06 -0400
>>> Jerry Van Baren <gvb.uboot@gmail.com> wrote:
>>>
>>>> Dear all,
>>>>
>>>> Please review the u-boot-fdt changes. I intend to request Wolfgang pull
>>>> the pending changes soon. All of the changes (except the last trivial
>>> I have properties being placed at the wrong level, timebase- and
>>> bus-frequencies not being updated, there are multiple copies of the
>>> code, and, it is hard to read - I saw a line length of 139!
>> Could you be more specific, please? Preferably by adding comments to the
>
> sorry, my comments were not specific, it's because the nature of the
> problem as I see it is general, and I decided to send a quick note to
> save Wolfgang from them ;)
>
>> patch. And are these problems related to the patch?
>>
>
> This is current top-of-fdt-tree behaviour:
>
> => fdt addr $fdtaddr
> => fdt chosen
> => fdt print /cpus
> cpus {
> clock-frequency=<1f78a400>; // should be one level down
> #address-cells=<00000001>;
> #size-cells=<00000000>;
> PowerPC,8360 at 0 {
> device_type="cpu";
> reg=<00000000>;
> d-cache-line-size=<00000020>;
> i-cache-line-size=<00000020>;
> d-cache-size=<00008000>;
> i-cache-size=<00008000>;
> timebase-frequency=<00000000>; // not updated
> bus-frequency=<00000000>; // not updated
> clock-frequency=<00000000>; // not updated, see above
> 32-bit;
> };
> };
>
> I wouldn't call this quality material.
>
> I'll post (specific) patches once I get a kernel booting, unless someone
> beats me to it.
>
> Kim
Hi Kim,
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:
1) It looks like you are missing the OF_CPU definition, or I'm not
pulling in the right .h file
2) 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
3) /cpu/PowerPC,8360 at 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
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);
The code in question is in
next prev parent reply other threads:[~2007-05-25 16:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 4:06 [U-Boot-Users] Imminent u-boot-fdt pull request Jerry Van Baren
2007-05-25 3:26 ` Kim Phillips
2007-05-25 9:27 ` Wolfgang Grandegger
2007-05-25 15:58 ` Kim Phillips
2007-05-25 16:56 ` Jerry Van Baren [this message]
2007-05-25 17:13 ` Kim Phillips
2007-05-25 17:33 ` Jerry Van Baren
2007-05-25 19:36 ` Kim Phillips
2007-05-25 20:18 ` Jerry Van Baren
2007-05-25 18:05 ` Scott Wood
2007-05-25 18:12 ` [U-Boot-Users] HUSH local variables visibility in u-boot code Leonid
2007-05-25 19:33 ` Wolfgang Denk
2007-05-25 18:15 ` [U-Boot-Users] Imminent u-boot-fdt pull request Jerry Van Baren
2007-05-25 18:17 ` Scott Wood
2007-05-25 18:31 ` Jerry Van Baren
2007-05-25 17:06 ` Jerry Van Baren
2007-05-25 11:54 ` Jerry Van Baren
2007-05-25 15:58 ` Kim Phillips
2007-05-25 16:28 ` Jerry Van Baren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4657152D.7030606@smiths-aerospace.com \
--to=gerald.vanbaren@smiths-aerospace.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.