From dfc84b3125fe9157da1123aa2680ca670e5c0628 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Tue, 19 Dec 2006 12:16:06 +0900 Subject: [PATCH] --- yaml --- r: 48511 b: refs/heads/master c: 703404ea441fc198d03ca3e9edbac6e09b5415f4 h: refs/heads/master i: 48509: 0f3a593239900289c20c4e79669f39eeee601857 48507: 8005b43597784bdd6f2f66a5054506eab141c846 48503: d6bcce059a85fabb1043b307c800c0314ebf6ad6 48495: f02dc424ee1d85ffa9be04b8506389a0cd325adc 48479: bc7a49d04f5d23b3587031a8e5e3959cfd0855d2 48447: d434946165b4d9ba09c69768bb193b03a0250e68 48383: d4416ff7482193756914f0c6f95947846c8c058f v: v3 --- [refs] | 2 +- trunk/arch/sh/kernel/early_printk.c | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 1627e48c1d2c..4003b122a048 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 106dac130d6fb6670a0bbfa8c714054990b41b03 +refs/heads/master: 703404ea441fc198d03ca3e9edbac6e09b5415f4 diff --git a/trunk/arch/sh/kernel/early_printk.c b/trunk/arch/sh/kernel/early_printk.c index 560b91cdd15c..9048c0326d87 100644 --- a/trunk/arch/sh/kernel/early_printk.c +++ b/trunk/arch/sh/kernel/early_printk.c @@ -106,12 +106,32 @@ static struct console scif_console = { }; #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS) +#define DEFAULT_BAUD 115200 /* * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4 * devices that aren't using sh-ipl+g. */ -static void scif_sercon_init(int baud) +static void scif_sercon_init(char *s) { + unsigned baud = DEFAULT_BAUD; + char *e; + + if (*s == ',') + ++s; + + if (*s) { + /* ignore ioport/device name */ + s += strcspn(s, ","); + if (*s == ',') + s++; + } + + if (*s) { + baud = simple_strtoul(s, &e, 0); + if (baud == 0 || s == e) + baud = DEFAULT_BAUD; + } + ctrl_outw(0, scif_port.mapbase + 8); ctrl_outw(0, scif_port.mapbase); @@ -167,7 +187,7 @@ int __init setup_early_printk(char *buf) early_console = &scif_console; #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS) - scif_sercon_init(115200); + scif_sercon_init(buf + 6); #endif } #endif