From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mpc512x: Fix PSC divisor calculation for baudrate setting
Date: Tue, 2 Jun 2009 16:53:15 +0200 [thread overview]
Message-ID: <1243954396-24775-1-git-send-email-sr@denx.de> (raw)
The wrong input frequency was used in serial_setbrg(). This patch fixes
this by using ips_clk as input frequency for the PSC baudrate generator.
Signed-off-by: Stefan Roese <sr@denx.de>
---
cpu/mpc512x/serial.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpu/mpc512x/serial.c b/cpu/mpc512x/serial.c
index 16ce770..d3ffff9 100644
--- a/cpu/mpc512x/serial.c
+++ b/cpu/mpc512x/serial.c
@@ -167,7 +167,7 @@ void serial_setbrg (void)
volatile psc512x_t *psc = (psc512x_t *) &im->psc[CONFIG_PSC_CONSOLE];
unsigned long baseclk, div;
- baseclk = (gd->csb_clk + 8) / 16;
+ baseclk = (gd->ips_clk + 8) / 16;
div = (baseclk + (gd->baudrate / 2)) / gd->baudrate;
out_8(&psc->ctur, (div >> 8) & 0xFF);
--
1.6.2.5
next reply other threads:[~2009-06-02 14:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 14:53 Stefan Roese [this message]
2009-06-02 14:53 ` [U-Boot] [PATCH 2/2] mpc512x: Use serial_setbrg() in serial_init() to not duplicate the code Stefan Roese
2009-06-05 12:19 ` Wolfgang Denk
2009-06-05 12:18 ` [U-Boot] [PATCH 1/2] mpc512x: Fix PSC divisor calculation for baudrate setting Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243954396-24775-1-git-send-email-sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox