summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx
diff options
context:
space:
mode:
authorMarkus Brunner <super.firetwister@googlemail.com>2008-04-28 08:47:47 +0200
committerStefan Roese <sr@denx.de>2008-04-29 07:37:54 +0200
commiteea5a743a2193ef2a05b9bc6dc447ba241416f35 (patch)
tree0d1ec17f7c0089e49d918d1bf00fa3fa00c2a4f4 /cpu/ppc4xx
parentdd5748bcd669f46aeb6686c1b341323843738ccc (diff)
ppc4xx: Fixup ebc clock in FDT for 405GP/EP
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>
Diffstat (limited to 'cpu/ppc4xx')
-rw-r--r--cpu/ppc4xx/fdt.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c
index 1f4d6f27fd..02dece0c0f 100644
--- a/cpu/ppc4xx/fdt.c
+++ b/cpu/ppc4xx/fdt.c
@@ -83,8 +83,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);
/*