/*1* Copyright (C) 2011 Richard Weinberger <[email protected]>2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License version 2 as5* published by the Free Software Foundation.6*/78#include <linux/kernel.h>9#include <linux/console.h>10#include <linux/init.h>11#include "os.h"1213static void early_console_write(struct console *con, const char *s, unsigned int n)14{15um_early_printk(s, n);16}1718static struct console early_console = {19.name = "earlycon",20.write = early_console_write,21.flags = CON_BOOT,22.index = -1,23};2425static int __init setup_early_printk(char *buf)26{27register_console(&early_console);2829return 0;30}3132early_param("earlyprintk", setup_early_printk);333435