* 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
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 @@
 #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;
 }