1 /* Modified by Broadcom Corp. Portions Copyright (c) Broadcom Corp, 2012. */
3 * linux/arch/arm/kernel/early_printk.c
5 * Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/console.h>
14 #include <linux/init.h>
16 #ifdef CONFIG_DEBUG_LL
17 extern void printch(int);
22 static void early_write(const char *s
, unsigned n
)
32 static void early_console_write(struct console
*con
, const char *s
, unsigned n
)
37 static struct console early_console
= {
39 .write
= early_console_write
,
40 .flags
= CON_PRINTBUFFER
| CON_BOOT
,
44 asmlinkage
void early_printk(const char *fmt
, ...)
51 n
= vscnprintf(buf
, sizeof(buf
), fmt
, ap
);
56 static int __init
setup_early_printk(char *buf
)
58 register_console(&early_console
);
62 early_param("earlyprintk", setup_early_printk
);