Skip to content

Commit

Permalink
serial: MPSC: set baudrate when BRG divider is set.
Browse files Browse the repository at this point in the history
The clock to generate the desired baudrate with the MPSC is first divided
by the Baud Rate Generator (BRG) and then by the MPSC itself.  So, when the
BRG divider is changed, the MPSC divider must also be changed to generate
the correct baudrate.  During MPSC initialization, the BRG divider is
changed but the MPSC divider isn't changed until much later.  This results
in some printk's coming out garbled.  To fix that, set the MPSC divider at
the same time that the BRG divider is changed.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mark A. Greer authored and Linus Torvalds committed Feb 5, 2008
1 parent 3e8d4e2 commit 7bbdc3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/mpsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ static void mpsc_hw_init(struct mpsc_port_info *pi)

/* No preamble, 16x divider, low-latency, */
writel(0x04400400, pi->mpsc_base + MPSC_MMCRH);
mpsc_set_baudrate(pi, pi->default_baud);

if (pi->mirror_regs) {
pi->MPSC_CHR_1_m = 0;
Expand Down

0 comments on commit 7bbdc3d

Please sign in to comment.