summaryrefslogtreecommitdiffstats
path: root/core/console.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2016-12-21 15:52:29 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-04 17:15:34 +1100
commit6f7bd78463e051dad239b349caf5dd641e2a4dd7 (patch)
tree42cc3630d9309c1f88a3beb411fcce7f4289493b /core/console.c
parentaa586d259b58c676d0d90f9981671438442eadbe (diff)
downloadtalos-skiboot-6f7bd78463e051dad239b349caf5dd641e2a4dd7.tar.gz
talos-skiboot-6f7bd78463e051dad239b349caf5dd641e2a4dd7.zip
console: add opal_con_ops structure
Adds a separate structure to house the operations for the OPAL console. This is used to define a new API for dealing with the OPAL console in the next patch. 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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/console.c b/core/console.c
index e132ba05..d602b7fe 100644
--- a/core/console.c
+++ b/core/console.c
@@ -370,6 +370,11 @@ static int64_t dummy_console_read(int64_t term_number, int64_t *length,
}
opal_call(OPAL_CONSOLE_READ, dummy_console_read, 3);
+static int64_t dummy_console_flush(int64_t term_number __unused)
+{
+ return OPAL_UNSUPPORTED;
+}
+
static void dummy_console_poll(void *data __unused)
{
bool has_data = false;
@@ -403,3 +408,12 @@ void dummy_console_add_nodes(void)
opal_add_poller(dummy_console_poll, NULL);
}
+
+struct opal_con_ops dummy_opal_con = {
+ .name = "Dummy Console",
+ .init = dummy_console_add_nodes,
+ .read = dummy_console_read,
+ .write = dummy_console_write,
+ .space = dummy_console_write_buffer_space,
+ .flush = dummy_console_flush,
+};
OpenPOWER on IntegriCloud