Merge tag 'wireless-drivers-for-davem-2016-04-13' of git://git.kernel.org/pub/scm...
[deliverable/linux.git] / include / linux / serial_core.h
index e03d6ba5e5b428849b6a269fc6db72a7563b4dc9..cbfcf38e220def6070e3de57c56ce34f3536bd6c 100644 (file)
@@ -342,21 +342,26 @@ struct earlycon_device {
 
 struct earlycon_id {
        char    name[16];
+       char    compatible[128];
        int     (*setup)(struct earlycon_device *, const char *options);
 } __aligned(32);
 
-extern int setup_earlycon(char *buf);
-extern int of_setup_earlycon(unsigned long addr,
-                            int (*setup)(struct earlycon_device *, const char *));
+extern const struct earlycon_id __earlycon_table[];
+extern const struct earlycon_id __earlycon_table_end[];
+
+#define OF_EARLYCON_DECLARE(_name, compat, fn)                         \
+       static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
+            __used __section(__earlycon_table)                         \
+               = { .name = __stringify(_name),                         \
+                   .compatible = compat,                               \
+                   .setup = fn  }
 
-#define EARLYCON_DECLARE(_name, func)                                  \
-       static const struct earlycon_id __earlycon_##_name              \
-               __used __section(__earlycon_table)                      \
-                = { .name  = __stringify(_name),                       \
-                    .setup = func  }
+#define EARLYCON_DECLARE(_name, fn)    OF_EARLYCON_DECLARE(_name, "", fn)
 
-#define OF_EARLYCON_DECLARE(name, compat, fn)                          \
-       _OF_DECLARE(earlycon, name, compat, fn, void *)
+extern int setup_earlycon(char *buf);
+extern int of_setup_earlycon(const struct earlycon_id *match,
+                            unsigned long node,
+                            const char *options);
 
 struct uart_port *uart_get_console(struct uart_port *ports, int nr,
                                   struct console *c);
This page took 0.030769 seconds and 5 git commands to generate.