diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-10 17:48:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-10 17:48:43 -0400 |
| commit | 0f166396e7e8931bb4acfd1a6ea1bd4f0b43f1dd (patch) | |
| tree | 6279fa70695a4c56b7e935018a4c0fc1dfa82e68 /arch/mips/dec/prom/console.c | |
| parent | 5f60cfd932b42c69ed3226400cb5eab152576c3a (diff) | |
| parent | 105b1bca4d7bed85bb296f7e7caec2fc643e9fbf (diff) | |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (62 commits)
[MIPS] PNX8550: Cleanup proc code.
[MIPS] WRPPMC: Fix build.
[MIPS] Yosemite: Fix modpost warnings.
[MIPS] Change names of local variables to silence sparse
[MIPS] SB1: Fix modpost warning.
[MIPS] PNX: Fix modpost warnings.
[MIPS] Alchemy: Fix modpost warnings.
[MIPS] Non-FPAFF: Fix warning.
[MIPS] DEC: Fix modpost warning.
[MIPS] MIPSsim: Enable MIPSsim virtual network driver.
[MIPS] Delete Ocelot 3 support.
[MIPS] remove LASAT Networks platforms support
[MIPS] Early check for SMTC kernel on non-MT processor
[MIPS] Add debugfs files to show fpuemu statistics
[MIPS] Add some debugfs files to debug unaligned accesses
[MIPS] rbtx4938: Fix secondary PCIC and glue internal NICs
[MIPS] tc35815: Load MAC address via platform_device
[MIPS] Move FPU affinity code into separate file.
[MIPS] Make ioremap() work on TX39/49 special unmapped segment
[MIPS] rbtx4938: Update and minimize defconfig
...
Diffstat (limited to 'arch/mips/dec/prom/console.c')
| -rw-r--r-- | arch/mips/dec/prom/console.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/arch/mips/dec/prom/console.c b/arch/mips/dec/prom/console.c index 65419bf32441..078e1a12421d 100644 --- a/arch/mips/dec/prom/console.c +++ b/arch/mips/dec/prom/console.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * DECstation PROM-based early console support. | 4 | * DECstation PROM-based early console support. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2004 Maciej W. Rozycki | 6 | * Copyright (C) 2004, 2007 Maciej W. Rozycki |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
| @@ -13,15 +13,35 @@ | |||
| 13 | #include <linux/console.h> | 13 | #include <linux/console.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 16 | #include <linux/string.h> | ||
| 16 | 17 | ||
| 17 | #include <asm/dec/prom.h> | 18 | #include <asm/dec/prom.h> |
| 18 | 19 | ||
| 19 | void prom_putchar(char c) | 20 | static void __init prom_console_write(struct console *con, const char *s, |
| 21 | unsigned int c) | ||
| 20 | { | 22 | { |
| 21 | char s[2]; | 23 | char buf[81]; |
| 24 | unsigned int chunk = sizeof(buf) - 1; | ||
| 22 | 25 | ||
| 23 | s[0] = c; | 26 | while (c > 0) { |
| 24 | s[1] = '\0'; | 27 | if (chunk > c) |
| 28 | chunk = c; | ||
| 29 | memcpy(buf, s, chunk); | ||
| 30 | buf[chunk] = '\0'; | ||
| 31 | prom_printf("%s", buf); | ||
| 32 | s += chunk; | ||
| 33 | c -= chunk; | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | static struct console promcons __initdata = { | ||
| 38 | .name = "prom", | ||
| 39 | .write = prom_console_write, | ||
| 40 | .flags = CON_BOOT | CON_PRINTBUFFER, | ||
| 41 | .index = -1, | ||
| 42 | }; | ||
| 25 | 43 | ||
| 26 | prom_printf( s); | 44 | void __init register_prom_console(void) |
| 45 | { | ||
| 46 | register_console(&promcons); | ||
| 27 | } | 47 | } |
