diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2016-12-21 15:52:27 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-01-04 17:15:34 +1100 |
commit | 4005c1c7215364a4b53d5304d3b5afd44f5e17a7 (patch) | |
tree | 1b482567b2d3300c142f8fd74f3af3766dd3d5ce /core/console.c | |
parent | 8b00ce79a32f9a7dedd392f8a64a672fcbd8d1e0 (diff) | |
download | talos-skiboot-4005c1c7215364a4b53d5304d3b5afd44f5e17a7.tar.gz talos-skiboot-4005c1c7215364a4b53d5304d3b5afd44f5e17a7.zip |
console: move mambo con_ops into the platform
There's no need for this to be in the skiboot core console code. Also do
a few cleanups while we're shovling code around.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/console.c')
-rw-r--r-- | core/console.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/core/console.c b/core/console.c index 3189c4fc..05c86bb9 100644 --- a/core/console.c +++ b/core/console.c @@ -61,48 +61,6 @@ void force_dummy_console(void) NULL, 0); } - -static int mambo_char = -1; - -static bool mambo_con_poll_read(void) -{ - if (mambo_char < 0) - mambo_char = mambo_console_read(); - return mambo_char >= 0; -} - -static size_t mambo_con_read(char *buf, size_t len) -{ - size_t count = 0; - - while(count < len) { - if (!mambo_con_poll_read()) - break; - *(buf++) = mambo_char; - mambo_char = -1; - count++; - } - return count; -} - -static size_t mambo_con_write(const char *buf, size_t len) -{ - mambo_console_write(buf, len); - return len; -} - -static struct con_ops mambo_con_driver = { - .poll_read = mambo_con_poll_read, - .read = mambo_con_read, - .write = mambo_con_write, -}; - -void enable_mambo_console(void) -{ - prlog(PR_NOTICE, "Enabling Mambo console\n"); - set_console(&mambo_con_driver); -} - /* * Helper function for adding /ibm,opal/consoles/serial@<xyz> nodes */ |