diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2004-08-22 22:33:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:33:17 -0700 |
commit | 9024871d2d20b39e5f0b7ef6c28006dee566386f (patch) | |
tree | def17f27104e52da2362d06e5167ffbdb067ed25 /arch | |
parent | 923bf1111e161abcf445383d3da3de6a9c89db19 (diff) | |
download | history-9024871d2d20b39e5f0b7ef6c28006dee566386f.tar.gz |
[PATCH] ppc64: HVSI driver
This is a console driver for IBM's p5 servers; please consider it for
inclusion. I've addressed all the comments I've received so far.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/setup.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 5872cc027ae5ae..67366c0e1a8cd9 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c @@ -517,10 +517,29 @@ static int __init set_preferred_console(void) return -ENODEV; } } - } else if (strcmp(name, "vty") == 0) - /* pSeries LPAR virtual console */ - return add_preferred_console("hvc", 0, NULL); - else if (strcmp(name, "ch-a") == 0) + } else if (strcmp(name, "vty") == 0) { + u32 *reg = (u32 *)get_property(prom_stdout, "reg", NULL); + char *compat = (char *)get_property(prom_stdout, "compatible", NULL); + + if (reg && compat && (strcmp(compat, "hvterm-protocol") == 0)) { + /* Host Virtual Serial Interface */ + int offset; + switch (reg[0]) { + case 0x30000000: + offset = 0; + break; + case 0x30000001: + offset = 1; + break; + default: + return -ENODEV; + } + return add_preferred_console("hvsi", offset, NULL); + } else { + /* pSeries LPAR virtual console */ + return add_preferred_console("hvc", 0, NULL); + } + } else if (strcmp(name, "ch-a") == 0) offset = 0; else if (strcmp(name, "ch-b") == 0) offset = 1; |