All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] MPC8260: fixup device tree by property instead of path
Date: Wed, 13 May 2009 08:00:53 +0200	[thread overview]
Message-ID: <4A0A6215.6010008@denx.de> (raw)
In-Reply-To: <1242134255-7295-1-git-send-email-wd@denx.de>

Hello Wolfgang,

Wolfgang Denk wrote:
> cpu/mpc8260/cpu.c used to use do_fixup_by_path_u32() to update the
> clock frequencies in the device tree, using a CPU path
> "/cpus/OF_CPU", with OF_CPU beind defined in the board config file.
> 
> However, this does not work when one board config file (here:
> MPC8260ADS.h) is intended to be used for several diffrent CPUs and
> therefor contains a generic definition like "cpu at 0", as the device
> trees that will then be loaded will contain specific names like
> "PowerPC,8272 at 0".
> 
> We switch to using do_fixup_by_prop_u32() instead, so we can search
> for device_type="cpu", as it is done in other architectures, too.
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Heiko Schocher <hs@denx.de>
> ---
> v2: Fix typo in Heiko's name.
> 
> Heiko, could you please test if this works with mgcoge, too?

It works fine on the mgcoge:

=> tftp 400000 mgcoge/mgcoge.dtb-hs
Using SCC ETHERNET device
TFTP from server 192.168.1.1; our IP address is 192.168.20.3
Filename 'mgcoge/mgcoge.dtb-hs'.
Load address: 0x400000
Loading: #
done
Bytes transferred = 6000 (1770 hex)
=> fdt addr 400000
=> fdt print
[...]
        cpus {
                #address-cells = <0x1>;
                #size-cells = <0x0>;
                PowerPC,8247 at 0 {
                        device_type = "cpu";
                        reg = <0x0>;
                        d-cache-line-size = <0x20>;
                        i-cache-line-size = <0x20>;
                        d-cache-size = <0x4000>;
                        i-cache-size = <0x4000>;
                        timebase-frequency = <0x0>;
                        clock-frequency = <0x0>;
                        bus-frequency = <0x0>;
                };

=> fdt board
=> fdt print /cpus
cpus {
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        PowerPC,8247 at 0 {
                device_type = "cpu";
                reg = <0x0>;
                d-cache-line-size = <0x20>;
                i-cache-line-size = <0x20>;
                d-cache-size = <0x4000>;
                i-cache-size = <0x4000>;
                timebase-frequency = <0xfbc520>;
                clock-frequency = <0xbcd3d80>;
                bus-frequency = <0x3ef1480>;
        };
};
=>

Also Linux boots fine :-)
so this patch looks good to me, so:

Acked-by: Heiko Schocher<hs@denx.de>

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2009-05-13  6:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 13:17 [U-Boot] [PATCH v2] MPC8260: fixup device tree by property instead of path Wolfgang Denk
2009-05-13  6:00 ` Heiko Schocher [this message]
2009-05-13  9:07   ` Detlev Zundel
2009-05-13 16:27     ` Heiko Schocher
2009-05-15 20:03 ` Wolfgang Denk

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=4A0A6215.6010008@denx.de \
    --to=hs@denx.de \
    --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.