1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2011 Richard Weinberger <richrd@nod.at>
6 #include <linux/kernel.h>
7 #include <linux/console.h>
8 #include <linux/init.h>
11 static void early_console_write(struct console
*con
, const char *s
, unsigned int n
)
13 um_early_printk(s
, n
);
16 static struct console early_console_dev
= {
18 .write
= early_console_write
,
23 static int __init
setup_early_printk(char *buf
)
26 early_console
= &early_console_dev
;
27 register_console(&early_console_dev
);
32 early_param("earlyprintk", setup_early_printk
);