public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Markus Brunner <super.firetwister@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ppc4xx fixup ebc clock in FDT for 405GP/EP
Date: Wed, 23 Apr 2008 09:12:34 +0200	[thread overview]
Message-ID: <200804230912.35222.super.firetwister@gmail.com> (raw)

On ppc405EP and ppc405GP (at least) the ebc is directly attached to the plb and not to the opb. 
This patch will try to fixup /plb/ebc if /plb/opb/ebc doesn't exist.

Signed-off-by: Markus Brunner <super.firetwister@gmail.com>
---

diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c
index afcb974..da27d0e 100644
--- a/cpu/ppc4xx/fdt.c
+++ b/cpu/ppc4xx/fdt.c
@@ -46,8 +46,14 @@ void ft_cpu_setup(void *blob, bd_t *bd)
                             bd->bi_intfreq, 1);
        do_fixup_by_path_u32(blob, "/plb", "clock-frequency", sys_info.freqPLB, 1);
        do_fixup_by_path_u32(blob, "/plb/opb", "clock-frequency", sys_info.freqOPB, 1);
-       do_fixup_by_path_u32(blob, "/plb/opb/ebc", "clock-frequency",
-                            sys_info.freqEBC, 1);
+
+       if ( fdt_path_offset(blob, "/plb/opb/ebc") >= 0 )
+               do_fixup_by_path_u32(blob, "/plb/opb/ebc",
+                       "clock-frequency", sys_info.freqEBC, 1);
+       else
+               do_fixup_by_path_u32(blob, "/plb/ebc",
+                       "clock-frequency", sys_info.freqEBC, 1);
+
        fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);

        /*

             reply	other threads:[~2008-04-23  7:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23  7:12 Markus Brunner [this message]
2008-04-24 14:56 ` [U-Boot-Users] [PATCH] ppc4xx fixup ebc clock in FDT for 405GP/EP Stefan Roese

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=200804230912.35222.super.firetwister@gmail.com \
    --to=super.firetwister@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox