]> git.sur5r.net Git - u-boot/commitdiff
ppc4xx: Fix 405EZ uart base baud calculation
authorStefan Roese <sr@denx.de>
Fri, 11 Sep 2009 15:07:55 +0000 (17:07 +0200)
committerStefan Roese <sr@denx.de>
Thu, 17 Sep 2009 12:05:52 +0000 (14:05 +0200)
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

index 1f751372cadafc8493b277669d599f3a059b06f0..9c4bc09904429dd4101144d1263d839835ba303f 100644 (file)
@@ -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;
 }
 
 /********************************************