summaryrefslogtreecommitdiff
path: root/cpu/mpc5xxx
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-06-27 13:30:03 +0000
committerwdenk <wdenk>2005-06-27 13:30:03 +0000
commit342717f72a2f92a14b9c823546e5bcec244f8bf4 (patch)
treed2aee74d8f384b6d85d4ce88c35df1303ffb927c /cpu/mpc5xxx
parent024447b186cca55c2d803ab96b4c8f8674363b86 (diff)
downloadu-boot-imx-342717f72a2f92a14b9c823546e5bcec244f8bf4.zip
u-boot-imx-342717f72a2f92a14b9c823546e5bcec244f8bf4.tar.gz
u-boot-imx-342717f72a2f92a14b9c823546e5bcec244f8bf4.tar.bz2
* 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
Diffstat (limited to 'cpu/mpc5xxx')
-rw-r--r--cpu/mpc5xxx/serial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/mpc5xxx/serial.c b/cpu/mpc5xxx/serial.c
index f463d2c..1e9628c 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;
}