Commit e2dc205f authored by Philippe Gerum's avatar Philippe Gerum

ARM: enable raw_printk() over serial debug channel

parent f22842bb
......@@ -88,6 +88,7 @@ obj-$(CONFIG_PARAVIRT) += paravirt.o
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 __weak printascii(const char *s)
{
/*
* Allow building if CONFIG_DEBUG_LL is off but keep silent on
* raw_printk().
*/
}
static void raw_console_write(struct console *co,
const char *s, unsigned count)
{
printascii(s);
}
static struct console raw_console = {
.name = "rawcon",
.write_raw = raw_console_write,
.flags = CON_PRINTBUFFER | CON_RAW | CON_ENABLED,
.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