diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-16 11:14:21 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-16 11:14:21 -0500 |
commit | 14ea1b3635b4af8d9e283e3671f7ee872d50b859 (patch) | |
tree | b8d1c05256b6f160a598656e797071081bd1f61e /include/console.h | |
parent | b0db69b4e1e1bf1109bd9d4a5185cbd4058f4a8b (diff) | |
parent | 750c543ca74a80da4b67882deb967c80fe790c3f (diff) |
Merge branch '2021-01-15-assorted-improvements'
- Add MBR partition layout writing supporting, clean up code.
- A large number of assorted console/iomux cleanups
- A large number of board_r related cleanups.
- Log enhancements
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index 432f892b6c..7e628c0cf8 100644 --- a/include/console.h +++ b/include/console.h @@ -8,6 +8,7 @@ #define __CONSOLE_H #include <stdbool.h> +#include <stdio_dev.h> #include <linux/errno.h> extern char console_buffer[]; @@ -15,6 +16,8 @@ extern char console_buffer[]; /* common/console.c */ int console_init_f(void); /* Before relocation; uses the serial stuff */ int console_init_r(void); /* After relocation; uses the console stuff */ +int console_start(int file, struct stdio_dev *sdev); /* Start a console device */ +void console_stop(int file, struct stdio_dev *sdev); /* Stop a console device */ int console_assign(int file, const char *devname); /* Assign the console */ int ctrlc(void); int had_ctrlc(void); /* have we had a Control-C since last clear? */ @@ -22,6 +25,18 @@ void clear_ctrlc(void); /* clear the Control-C condition */ int disable_ctrlc(int); /* 1 to disable, 0 to enable Control-C detect */ int confirm_yesno(void); /* 1 if input is "y", "Y", "yes" or "YES" */ +/** + * console_search_dev() - search for stdio device with given flags and name + * @flags: device flags as per input/output/system + * @name: device name + * + * Iterates over registered STDIO devices and match them with given @flags + * and @name. + * + * @return pointer to the &struct stdio_dev if found, or NULL otherwise + */ +struct stdio_dev *console_search_dev(int flags, const char *name); + #ifdef CONFIG_CONSOLE_RECORD /** * console_record_init() - set up the console recording buffers |