[Skiboot] [PATCH v2 07/14] lpc-uart: add flush opal call handler
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Tue Dec 20 18:24:49 AEDT 2016
On 20/12/16 17:03, Oliver O'Halloran wrote:
> Define a driver specific flush opal call in preperation for removing
preparation
> the con_ops->flush() operation.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.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);
This overrides the opal_call that's still in console.c, right? I assume
that's how this works.
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list