@@ -283,28 +283,20 @@ ssize_t read(int fd __unused, void *buf, size_t req_count)
return count;
}
-static int64_t opal_console_flush(int64_t term_number)
-{
- if (term_number != 0)
- return OPAL_PARAMETER;
-
- if (con_driver == NULL || con_driver->flush == NULL)
- return OPAL_UNSUPPORTED;
-
- return con_driver->flush();
-}
-opal_call(OPAL_CONSOLE_FLUSH, opal_console_flush, 1);
-
/* Helper function to perform a full synchronous flush */
void console_complete_flush(void)
{
- int64_t ret = opal_console_flush(0);
+ /*
+ * Using term 0 here is a dumb hack that works because the UART
+ * only has term 0 and the FSP doesn't have an explicit flush method.
+ */
+ int64_t ret = opal_con_driver->flush(0);
if (ret == OPAL_UNSUPPORTED || ret == OPAL_PARAMETER)
return;
while (ret != OPAL_SUCCESS) {
- ret = opal_console_flush(0);
+ ret = opal_con_driver->flush(0);
}
}
@@ -170,11 +170,8 @@ static size_t uart_con_write(const char *buf, size_t len)
return written;
}
-static int64_t uart_con_flush(void);
-
static struct con_ops uart_con_driver = {
.write = uart_con_write,
- .flush = uart_con_flush
};
/*
@@ -51,7 +51,6 @@ struct con_ops {
size_t (*write)(const char *buf, size_t len);
size_t (*read)(char *buf, size_t len);
bool (*poll_read)(void);
- int64_t (*flush)(void);
};
struct opal_con_ops {
Flushing the OPAL console is now handled by a driver specific OPAL call handler so this can be removed. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- core/console.c | 20 ++++++-------------- hw/lpc-uart.c | 3 --- include/console.h | 1 - 3 files changed, 6 insertions(+), 18 deletions(-)