Commit bcfa0a84 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

arm: introduce raw console device

parent 884bdaed
......@@ -83,6 +83,7 @@ endif
head-y := head$(MMUEXT).o
obj-$(CONFIG_DEBUG_LL) += debug.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_RAW_PRINTK) += raw_printk.o
obj-$(CONFIG_IPIPE) += ipipe.o
obj-$(CONFIG_IPIPE_ARM_KUSER_TSC) += ipipe_tsc.o ipipe_tsc_asm.o
......
#include <linux/kernel.h>
#include <linux/console.h>
#include <linux/init.h>
void printch(int);
static void raw_console_write(struct console *co,
const char *s, unsigned count)
{
while (count-- > 0) {
if (*s == '\n')
printch('\r');
printch(*s++);
}
}
static struct console raw_console = {
.name = "rawcon",
.write = raw_console_write,
.write_raw = raw_console_write,
.flags = CON_PRINTBUFFER | CON_RAW,
.index = -1,
};
static int __init raw_console_init(void)
{
register_console(&raw_console);
return 0;
}
console_initcall(raw_console_init);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment