From 6f7bd78463e051dad239b349caf5dd641e2a4dd7 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Wed, 21 Dec 2016 15:52:29 +1100 Subject: 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 Reviewed-by: Andrew Donnellan Signed-off-by: Stewart Smith --- hw/fsp/fsp-console.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'hw/fsp') diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c index 8fd18d1..8589e8c 100644 --- a/hw/fsp/fsp-console.c +++ b/hw/fsp/fsp-console.c @@ -818,6 +818,21 @@ void fsp_console_init(void) op_display(OP_LOG, OP_MOD_FSPCON, 0x0005); } +static int64_t fsp_console_flush(int64_t terminal __unused) +{ + /* FIXME: There's probably something we can do here... */ + return OPAL_PARAMETER; +} + +struct opal_con_ops fsp_opal_con = { + .name = "FSP OPAL console", + .init = NULL, /* all the required setup is done in fsp_console_init() */ + .read = fsp_console_read, + .write = fsp_console_write, + .space = fsp_console_write_buffer_space, + .flush = fsp_console_flush, +}; + static void flush_all_input(void) { unsigned int i; -- cgit v1.1