[U-Boot-Users] [PATCH] mips: Fix baudrate divisor computation on alchemy cpus
Wolfgang Ocker
weo at reccoware.de
Mon Jul 28 16:56:51 CEST 2008
Use CFG_MIPS_TIMER_FREQ when computing the baudrate divisor
on alchemy cpus.
Signed-off-by: Wolfgang Ocker <weo at reccoware.de>
---
diff --git a/cpu/mips/au1x00_serial.c b/cpu/mips/au1x00_serial.c
index 6309794..e8baab5 100644
--- a/cpu/mips/au1x00_serial.c
+++ b/cpu/mips/au1x00_serial.c
@@ -76,7 +76,7 @@ void serial_setbrg (void)
sd = (*sys_powerctrl & 0x03) + 2;
/* calulate 2x baudrate and round */
- divisorx2 = ((CFG_HZ/(sd * 16 * CONFIG_BAUDRATE)));
+ divisorx2 = ((CFG_MIPS_TIMER_FREQ/(sd * 16 * CONFIG_BAUDRATE)));
if (divisorx2 & 0x01)
divisorx2 = divisorx2 + 1;
--
| Wolfgang Ocker -- Reccoware Systems -- Am Berg 2, D-85276 Pfaffenhofen
| Phone +49-8441-805512, +49-700-RECCOWARE -- Fax +49-8441-805513
| IM -- Jabber ID: weo at jabber.fsfe.org -- ICQ: 144996818
| http://www.reccoware.de/ -- Software - Realtime - Embedded - GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080728/e73fd8ee/attachment.pgp
More information about the U-Boot
mailing list