lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080114224711.GA21940@mag.az.mvista.com>
Date:	Mon, 14 Jan 2008 15:47:11 -0700
From:	"Mark A. Greer" <mgreer@...sta.com>
To:	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] Serial: MPSC - Set baudrate when BRG divider is set.

From: Mark A. Greer <mgreer@...sta.com>

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@...sta.com
---
 drivers/serial/mpsc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 4d643c9..cb3a919 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)
 
 	/* 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ