mips: Fix baudrate divisor computation on alchemy cpus
PATCH 1/1 mips: Fix baudrate divisor computation on alchemy cpus
Use CFG_MIPS_TIMER_FREQ when computing the baudrate divisor on alchemy cpus.
Signed-off-by Wolfgang Ocker <[email protected]>
---
cpu/mips/au1x00_serial.c +1 -1
@@ -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 ;
Signature · 11 lines
| 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
PATCH 1/1 mips: Fix baudrate divisor computation on alchemy cpus
Quoted 4 lines · Wolfgang Ocker
Use
CFG_MIPS_TIMER_FREQwhen computing the baudrate divisor on alchemy cpus.Signed-off-by Wolfgang Ocker <[email protected]>
Thanks, I'll apply and push this out tonight. This patch should go in the upcoming v1.3.4 final.
Shinya
Quoted 14 lines
---
cpu/mips/au1x00_serial.c +1
-1@@ -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 ;