diff options
author | Mark A. Greer <mgreer@mvista.com> | 2008-02-05 01:27:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:10 -0500 |
commit | 7bbdc3d51cf793dd81c38f794f4cb73df58d1527 (patch) | |
tree | 483bf4e7db67bcd7d292d09679cdc3f755e8ac85 | |
parent | 3e8d4e2075e049664294722b436edfc5ced6ca53 (diff) |
serial: MPSC: set baudrate when BRG divider is set.
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>
-rw-r--r-- | drivers/serial/mpsc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index 4d643c926657..cb3a91967742 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
@@ -612,6 +612,7 @@ static void mpsc_hw_init(struct mpsc_port_info *pi) | |||
612 | 612 | ||
613 | /* No preamble, 16x divider, low-latency, */ | 613 | /* No preamble, 16x divider, low-latency, */ |
614 | writel(0x04400400, pi->mpsc_base + MPSC_MMCRH); | 614 | writel(0x04400400, pi->mpsc_base + MPSC_MMCRH); |
615 | mpsc_set_baudrate(pi, pi->default_baud); | ||
615 | 616 | ||
616 | if (pi->mirror_regs) { | 617 | if (pi->mirror_regs) { |
617 | pi->MPSC_CHR_1_m = 0; | 618 | pi->MPSC_CHR_1_m = 0; |