All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: Fix 405EZ uart base baud calculation
@ 2009-09-11 15:21 Stefan Roese
  2009-09-17 12:06 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2009-09-11 15:21 UTC (permalink / raw)
  To: u-boot

With this fix, Linux correctly configures the baudrate when booting
with FDT passed from U-Boot to Linux.

Signed-off-by: Stefan Roese <sr@denx.de>
---
 cpu/ppc4xx/speed.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c
index 1f75137..9c4bc09 100644
--- a/cpu/ppc4xx/speed.c
+++ b/cpu/ppc4xx/speed.c
@@ -914,6 +914,7 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
 	unsigned long sysClkPeriodPs = ONE_BILLION / (CONFIG_SYS_CLK_FREQ/1000);
 	unsigned long primad_cpudv;
 	unsigned long m;
+	unsigned long plloutb;
 
 	/*
 	 * Read PLL Mode registers
@@ -999,7 +1000,10 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
 	sysInfo->freqEBC = (CONFIG_SYS_CLK_FREQ * sysInfo->pllFbkDiv) /
 		sysInfo->pllExtBusDiv;
 
-	sysInfo->freqUART = sysInfo->freqVCOHz;
+	plloutb = ((CONFIG_SYS_CLK_FREQ * ((cpr_pllc & PLLC_SRC_MASK) ?
+		sysInfo->pllFwdDivB : sysInfo->pllFwdDiv) * sysInfo->pllFbkDiv) /
+		sysInfo->pllFwdDivB);
+	sysInfo->freqUART = plloutb;
 }
 
 /********************************************
-- 
1.6.4.1

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

* [U-Boot] [PATCH] ppc4xx: Fix 405EZ uart base baud calculation
  2009-09-11 15:21 [U-Boot] [PATCH] ppc4xx: Fix 405EZ uart base baud calculation Stefan Roese
@ 2009-09-17 12:06 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-09-17 12:06 UTC (permalink / raw)
  To: u-boot

On Friday 11 September 2009 17:21:38 Stefan Roese wrote:
> With this fix, Linux correctly configures the baudrate when booting
> with FDT passed from U-Boot to Linux.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>

Applied to ppc4xx/master. Thanks.

Cheers,
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

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

end of thread, other threads:[~2009-09-17 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 15:21 [U-Boot] [PATCH] ppc4xx: Fix 405EZ uart base baud calculation Stefan Roese
2009-09-17 12:06 ` Stefan Roese

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.