[Skiboot] [PATCH v2 07/14] lpc-uart: add flush opal call handler
Oliver O'Halloran
oohall at gmail.com
Tue Dec 20 17:03:38 AEDT 2016
Define a driver specific flush opal call in preperation for removing
the con_ops->flush() operation.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
hw/lpc-uart.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/lpc-uart.c b/hw/lpc-uart.c
index f91bccf7c716..cc7f808bb920 100644
--- a/hw/lpc-uart.c
+++ b/hw/lpc-uart.c
@@ -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);
}
--
2.7.4
More information about the Skiboot
mailing list