public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] cpu/mpc85xx/fdt.c forcing incorrect UART clock into fdt.
@ 2008-07-08 21:42 Paul Gortmaker
  2008-07-09 11:59 ` Jerry Van Baren
  2008-07-09 12:52 ` Kumar Gala
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Gortmaker @ 2008-07-08 21:42 UTC (permalink / raw)
  To: u-boot


I was updating a sbc8560 from u-boot v1.2.0 to git-current, and found
that I'd loose the kernel serial console when the 8250 driver took over
from udbg0 when using u-boot 1.3.x  (booting via tftp'ing the dtb and
the uImage separately)

I eventually tracked it down to mpc85xx/fdt.c stomping on the contents
of the UART clockrate in the dtb.  Since the sbc8560 is sort of
different -- in that it has external UARTs (instead of SOC/CPM), I'm
guessing few other boards see this problem, because bi_busfreq is
really their correct UART clk.

I fixed it with this simple patch, but I was wondering whether it would
be better to alternatively just check if the dtb value is zero, and 
then only insert a value; otherwise leave it alone...

Paul.


diff --git a/cpu/mpc85xx/fdt.c b/cpu/mpc85xx/fdt.c
index 92952e6..bd43073 100644
--- a/cpu/mpc85xx/fdt.c
+++ b/cpu/mpc85xx/fdt.c
@@ -224,7 +224,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 
 #ifdef CFG_NS16550
 	do_fixup_by_compat_u32(blob, "ns16550",
-		"clock-frequency", bd->bi_busfreq, 1);
+		"clock-frequency", CFG_NS16550_CLK, 1);
 #endif
 
 #ifdef CONFIG_CPM2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-07-15  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 21:42 [U-Boot-Users] cpu/mpc85xx/fdt.c forcing incorrect UART clock into fdt Paul Gortmaker
2008-07-09 11:59 ` Jerry Van Baren
2008-07-09 12:52 ` Kumar Gala
2008-07-09 17:08   ` Paul Gortmaker
2008-07-09 17:04     ` Jerry Van Baren
2008-07-09 17:23     ` [U-Boot-Users] [PATCH] 8xxx-fdt: set ns16550 clock from CFG_NS16550_CLK, not bi_busfreq Paul Gortmaker
2008-07-09 18:43       ` Paul Gortmaker
2008-07-09 21:53         ` Kim Phillips
2008-07-15  0:00           ` Andy Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox