diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-16 16:34:31 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-16 16:34:31 -0700 |
| commit | 963e1e0ca7716ac1246ce5fd54ba0e35a0fc9fc5 (patch) | |
| tree | ffa69c59bd312128de8c89cfb35bbd6b9c750f7b /include/linux | |
| parent | d4e8e50daa7a86ad7a104428d28a3ae0f705165d (diff) | |
| parent | 848487ca0761032591567b24a757333d05b616d7 (diff) | |
Merge "earlycon: Use common framework for earlycon declarations"
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/serial_core.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 0afc11f8f300..b2c1ea2a4739 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -342,22 +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 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, 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 *)); -#define EARLYCON_DECLARE(_name, func) \ - static const struct earlycon_id __earlycon_##_name \ - __used __section(__earlycon_table) \ - = { .name = __stringify(_name), \ - .setup = func } - -#define OF_EARLYCON_DECLARE(name, compat, fn) \ - _OF_DECLARE(earlycon, name, compat, fn, void *) - struct uart_port *uart_get_console(struct uart_port *ports, int nr, struct console *c); int uart_parse_earlycon(char *p, unsigned char *iotype, unsigned long *addr, |
