Skip to contentSkip to conversation

ppc4xx fixup ebc clock in FDT for 405GP/EP

PATCH RESEND New Markus Brunner 2 participants 2 messages Apr 28, 2008 – Apr 29, 2008

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 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.

---
This time against latest u-boot-ppc4xx repository

cpu/ppc4xx/fdt.c +8 -2
index 1f4d6f2..02dece0 100644
@@ -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);
 
 	/*
#1 lore raw

PATCH RESEND 1/1 ppc4xx fixup ebc clock in FDT for 405GP/EP

Quoted 3 lines · Markus Brunner

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.

Applied to u-boot-ppc4xx repository. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================