2 * Copyright IBM Corp. 2017
5 #include <linux/console.h>
6 #include <linux/kernel.h>
7 #include <linux/init.h>
10 static void sclp_early_write(struct console
*con
, const char *s
, unsigned int len
)
12 __sclp_early_printk(s
, len
);
15 static struct console sclp_early_console
= {
17 .write
= sclp_early_write
,
18 .flags
= CON_PRINTBUFFER
| CON_BOOT
,
22 static int __init
setup_early_printk(char *buf
)
26 /* Accept only "earlyprintk" and "earlyprintk=sclp" */
27 if (buf
&& strncmp(buf
, "sclp", 4))
29 if (!sclp
.has_linemode
&& !sclp
.has_vt220
)
31 early_console
= &sclp_early_console
;
32 register_console(early_console
);
35 early_param("earlyprintk", setup_early_printk
);