summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2009-09-11 17:07:55 +0200
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:29 -0500
commitbda4dece03675ad30c098a00f20332010ccb5c5d (patch)
treed89009042f662939ae70b67ca3e5b5fcc1ea8b11 /cpu/ppc4xx
parentf8d7b56e003fe19f37d4e9e326df9e9024a052b0 (diff)
downloadu-boot-imx-bda4dece03675ad30c098a00f20332010ccb5c5d.zip
u-boot-imx-bda4dece03675ad30c098a00f20332010ccb5c5d.tar.gz
u-boot-imx-bda4dece03675ad30c098a00f20332010ccb5c5d.tar.bz2
ppc4xx: Fix 405EZ uart base baud calculation
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>
Diffstat (limited to 'cpu/ppc4xx')
-rw-r--r--cpu/ppc4xx/speed.c6
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;
}
/********************************************