aboutsummaryrefslogtreecommitdiff
path: root/core/console.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2016-12-21 15:52:31 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-04 17:15:57 +1100
commit3873e455af0d1f13b476d897515720e4ba114669 (patch)
tree23f40a127904a33d39739144837aa3eb61f17fd7 /core/console.c
parentf332fb40baa5da03ee7db4deaa1eb589f21272f0 (diff)
downloadskiboot-3873e455af0d1f13b476d897515720e4ba114669.zip
skiboot-3873e455af0d1f13b476d897515720e4ba114669.tar.gz
skiboot-3873e455af0d1f13b476d897515720e4ba114669.tar.bz2
console: remove con_ops->flush()
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> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/console.c')
-rw-r--r--core/console.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/core/console.c b/core/console.c
index e3bb8ce..1f055bf 100644
--- a/core/console.c
+++ b/core/console.c
@@ -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);
}
}