From 31023c50a56c69ab307d5cf8d7eaac3e0066a5b1 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 23 Apr 2008 21:05:11 +0900 Subject: [PATCH] --- yaml --- r: 96286 b: refs/heads/master c: 4a65e3827bcff072e5f4a96b3f73f9f17eb7d6d8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/sh/kernel/early_printk.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3a16989f4796..9b4488d09efe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0fba32136579648a5782a41e93d4a79547456a89 +refs/heads/master: 4a65e3827bcff072e5f4a96b3f73f9f17eb7d6d8 diff --git a/trunk/arch/sh/kernel/early_printk.c b/trunk/arch/sh/kernel/early_printk.c index 18ca249e8409..11b4c85999b7 100644 --- a/trunk/arch/sh/kernel/early_printk.c +++ b/trunk/arch/sh/kernel/early_printk.c @@ -143,6 +143,7 @@ static void scif_sercon_init(char *s) { struct uart_port *port = &scif_port; unsigned baud = DEFAULT_BAUD; + unsigned int status; char *e; if (*s == ',') @@ -161,12 +162,17 @@ static void scif_sercon_init(char *s) baud = DEFAULT_BAUD; } + do { + status = sci_in(port, SCxSR); + } while (!(status & SCxSR_TEND(port))); + sci_out(port, SCSCR, 0); /* TE=0, RE=0 */ sci_out(port, SCSMR, 0); /* Set baud rate */ sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) / (32 * baud) - 1); + udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */ sci_out(port, SCFCR, 12); sci_out(port, SCFCR, 8);