public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] mips: Fix baudrate divisor computation on alchemy cpus
@ 2008-07-28 14:56 Wolfgang Ocker
  2008-07-29  3:31 ` Shinya Kuribayashi
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Ocker @ 2008-07-28 14:56 UTC (permalink / raw)
  To: u-boot

Use CFG_MIPS_TIMER_FREQ when computing the baudrate divisor
on alchemy cpus.

Signed-off-by: Wolfgang Ocker <weo@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 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot-Users] [PATCH] mips: Fix baudrate divisor computation on alchemy cpus
  2008-07-28 14:56 [U-Boot-Users] [PATCH] mips: Fix baudrate divisor computation on alchemy cpus Wolfgang Ocker
@ 2008-07-29  3:31 ` Shinya Kuribayashi
  0 siblings, 0 replies; 2+ messages in thread
From: Shinya Kuribayashi @ 2008-07-29  3:31 UTC (permalink / raw)
  To: u-boot

Wolfgang Ocker wrote:
> Use CFG_MIPS_TIMER_FREQ when computing the baudrate divisor
> on alchemy cpus.
> 
> Signed-off-by: Wolfgang Ocker <weo@reccoware.de>

Thanks, I'll apply and push this out tonight.  This patch should go in
the upcoming v1.3.4 final.

  Shinya

> ---
> 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-29  3:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 14:56 [U-Boot-Users] [PATCH] mips: Fix baudrate divisor computation on alchemy cpus Wolfgang Ocker
2008-07-29  3:31 ` Shinya Kuribayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox