@@ -375,6 +375,14 @@ static int64_t uart_opal_read(int64_t term_number, int64_t *length,
return OPAL_SUCCESS;
}
+static int64_t uart_opal_flush(int64_t term_number)
+{
+ if (term_number != 0)
+ return OPAL_PARAMETER;
+
+ return uart_con_flush();
+}
+
static void __uart_do_poll(u8 trace_ctx)
{
if (!in_buf)
@@ -449,6 +457,7 @@ void uart_setup_opal_console(void)
opal_register(OPAL_CONSOLE_WRITE_BUFFER_SPACE,
uart_opal_write_buffer_space, 2);
opal_register(OPAL_CONSOLE_WRITE, uart_opal_write, 3);
+ opal_register(OPAL_CONSOLE_FLUSH, uart_opal_flush, 1);
opal_add_poller(uart_console_poll, NULL);
}
Define a driver specific flush opal call in preperation for removing the con_ops->flush() operation. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- hw/lpc-uart.c | 9 +++++++++ 1 file changed, 9 insertions(+)