#ifdef CONFIG_OF_EARLY_FLATTREE
int __init of_setup_earlycon(unsigned long addr,
- int (*setup)(struct earlycon_device *, const char *))
+ const struct earlycon_id *match)
{
int err;
struct uart_port *port = &early_console_dev.port;
port->uartclk = BASE_BAUD * 16;
port->membase = earlycon_map(addr, SZ_4K);
- early_console_dev.con->data = &early_console_dev;
- err = setup(&early_console_dev, NULL);
+ earlycon_init(&early_console_dev, match->name);
+ err = match->setup(&early_console_dev, NULL);
if (err < 0)
return err;
if (!early_console_dev.con->write)
#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
extern int setup_earlycon(char *buf);
-extern int of_setup_earlycon(unsigned long addr,
- int (*setup)(struct earlycon_device *, const char *));
+extern int of_setup_earlycon(unsigned long addr, const struct earlycon_id *match);
struct uart_port *uart_get_console(struct uart_port *ports, int nr,
struct console *c);