summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.(none)>2005-09-25 01:09:58 +0200
committerWolfgang Denk <wd@pollux.(none)>2005-09-25 01:09:58 +0200
commit9f221d0738772ba0040793cc3f20ddde18dc4806 (patch)
treeb01a21aa16215e081b3c6f5973c79e23557ec8bd
parentc97a2aaf27032b9046d70c18274ffdbe38aeef6a (diff)
downloadu-boot-imx-9f221d0738772ba0040793cc3f20ddde18dc4806.zip
u-boot-imx-9f221d0738772ba0040793cc3f20ddde18dc4806.tar.gz
u-boot-imx-9f221d0738772ba0040793cc3f20ddde18dc4806.tar.bz2
Fix MGT5100 PSC baudrate calculation
Patch by Sebastian Schau, 27 Jan 2005
-rw-r--r--CHANGELOG3
-rw-r--r--cpu/mpc5xxx/serial.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 16421a4..abf5d18 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.4:
======================================================================
+* Fix MGT5100 PSC baudrate calculation
+ Patch by Sebastian Schau, 27 Jan 2005
+
* OMAP242x fix for GP device booting
- Add SRAM unlock for GP devices.
- Change DDR DLL unlock value to allow DPLLout*1 operation.
diff --git a/cpu/mpc5xxx/serial.c b/cpu/mpc5xxx/serial.c
index 1e9628c..91e1def 100644
--- a/cpu/mpc5xxx/serial.c
+++ b/cpu/mpc5xxx/serial.c
@@ -152,14 +152,14 @@ serial_setbrg(void)
unsigned long baseclk, div;
#if defined(CONFIG_MGT5100)
- baseclk = CFG_MPC5XXX_CLKIN / 32;
+ baseclk = (CFG_MPC5XXX_CLKIN + 16) / 32;
#elif defined(CONFIG_MPC5200)
baseclk = (gd->ipb_clk + 16) / 32;
#endif
/* set up UART divisor */
div = (baseclk + (gd->baudrate/2)) / gd->baudrate;
- psc->ctur = div >> 8;
- psc->ctlr = div & 0xff;
+ psc->ctur = (div >> 8) & 0xFF;
+ psc->ctlr = div & 0xff;
}
#endif /* CONFIG_PSC_CONSOLE */