From 342717f72a2f92a14b9c823546e5bcec244f8bf4 Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 27 Jun 2005 13:30:03 +0000 Subject: * Fix baudrate calculation problem on MPC5200 systems * Add MPC8220 boards to MAKEALL script * Add EEPROM and RTC support for HMI1001 board * Patch by Detlev Zundel, 20 Jun 2005: Fix initialization of low active GPIO pins on inka4x0 board --- cpu/mpc5xxx/serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu/mpc5xxx') diff --git a/cpu/mpc5xxx/serial.c b/cpu/mpc5xxx/serial.c index f463d2cf07..1e9628c511 100644 --- a/cpu/mpc5xxx/serial.c +++ b/cpu/mpc5xxx/serial.c @@ -154,11 +154,11 @@ serial_setbrg(void) #if defined(CONFIG_MGT5100) baseclk = CFG_MPC5XXX_CLKIN / 32; #elif defined(CONFIG_MPC5200) - baseclk = gd->ipb_clk / 32; + baseclk = (gd->ipb_clk + 16) / 32; #endif /* set up UART divisor */ - div = baseclk / gd->baudrate; + div = (baseclk + (gd->baudrate/2)) / gd->baudrate; psc->ctur = div >> 8; psc->ctlr = div & 0xff; } -- cgit v1.2.3