summaryrefslogtreecommitdiff
path: root/cpu/mpc512x/serial.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2009-06-02 16:53:15 +0200
committerWolfgang Denk <wd@denx.de>2009-06-12 20:47:17 +0200
commitb8c1d6a54ff8195488b68e163de8ec31f1603496 (patch)
tree3b0a770aafe1bea616c23b211d6bc693b74262c3 /cpu/mpc512x/serial.c
parent52568c3654b2b257016d52167805ae132faac14e (diff)
downloadu-boot-imx-b8c1d6a54ff8195488b68e163de8ec31f1603496.zip
u-boot-imx-b8c1d6a54ff8195488b68e163de8ec31f1603496.tar.gz
u-boot-imx-b8c1d6a54ff8195488b68e163de8ec31f1603496.tar.bz2
mpc512x: Fix PSC divisor calculation for baudrate setting
The wrong input frequency was used in serial_setbrg(). This patch fixes this by using ips_clk as input frequency for the PSC baudrate generator. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'cpu/mpc512x/serial.c')
-rw-r--r--cpu/mpc512x/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu/mpc512x/serial.c b/cpu/mpc512x/serial.c
index 16ce770..d3ffff9 100644
--- a/cpu/mpc512x/serial.c
+++ b/cpu/mpc512x/serial.c
@@ -167,7 +167,7 @@ void serial_setbrg (void)
volatile psc512x_t *psc = (psc512x_t *) &im->psc[CONFIG_PSC_CONSOLE];
unsigned long baseclk, div;
- baseclk = (gd->csb_clk + 8) / 16;
+ baseclk = (gd->ips_clk + 8) / 16;
div = (baseclk + (gd->baudrate / 2)) / gd->baudrate;
out_8(&psc->ctur, (div >> 8) & 0xFF);