[Skiboot] [PATCH 11/14] core: use set_opal_console()
Oliver O'Halloran
oohall at gmail.com
Fri Nov 18 16:01:49 AEDT 2016
Replaces existing explicit calls to the console driver init functions
with a call to set_opal_console() and adds a init_opal_console to the
main init path.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
core/init.c | 5 ++---
core/platform.c | 4 +---
hw/fsp/fsp-console.c | 4 +++-
platforms/astbmc/common.c | 3 +--
platforms/qemu/qemu.c | 3 +--
5 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/core/init.c b/core/init.c
index 9d4ab602ffa5..81939dd08808 100644
--- a/core/init.c
+++ b/core/init.c
@@ -896,9 +896,8 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
/* Secure/Trusted Boot init. We look for /ibm,secureboot in DT */
stb_init();
- /* Setup dummy console nodes if it's enabled */
- if (dummy_console_enabled())
- dummy_console_add_nodes();
+ /* Install the OPAL Console handlers */
+ init_opal_console();
/* Init SLW related stuff, including fastsleep */
slw_init();
diff --git a/core/platform.c b/core/platform.c
index 587816478c79..c70ffc9b5129 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -111,9 +111,7 @@ static bool generic_platform_probe(void)
static void generic_platform_init(void)
{
if (uart_enabled())
- uart_setup_opal_console();
- else
- force_dummy_console();
+ set_opal_console(&uart_opal_con);
/* Enable a BT interface if we find one too */
bt_init();
diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index b0fefb6bdd76..009ccce26641 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -384,7 +384,7 @@ static void fsp_close_vserial(struct fsp_msg *msg)
set_console(NULL);
}
#endif
-
+
lock(&fsp_con_lock);
if (fs->open) {
fs->open = false;
@@ -816,6 +816,8 @@ void fsp_console_init(void)
}
op_display(OP_LOG, OP_MOD_FSPCON, 0x0005);
+
+ set_opal_console(&fsp_opal_con);
}
static int64_t fsp_console_flush(int64_t terminal __unused)
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c
index 6e678a10bcec..ce8edeac043c 100644
--- a/platforms/astbmc/common.c
+++ b/platforms/astbmc/common.c
@@ -138,8 +138,7 @@ void astbmc_init(void)
ipmi_set_fw_progress_sensor(IPMI_FW_MOTHERBOARD_INIT);
/* Setup UART console for use by Linux via OPAL API */
- if (!dummy_console_enabled())
- uart_setup_opal_console();
+ set_opal_console(&uart_opal_con);
}
int64_t astbmc_ipmi_power_down(uint64_t request)
diff --git a/platforms/qemu/qemu.c b/platforms/qemu/qemu.c
index 0c583f1cea5a..85ca213c29af 100644
--- a/platforms/qemu/qemu.c
+++ b/platforms/qemu/qemu.c
@@ -79,8 +79,7 @@ static void qemu_ipmi_setenables(void)
static void qemu_init(void)
{
/* Setup UART console for use by Linux via OPAL API */
- if (!dummy_console_enabled())
- uart_setup_opal_console();
+ set_opal_console(&uart_opal_con);
/* Setup LPC RTC and use it as time source. Call after
* chiptod_init()
--
2.5.5
More information about the Skiboot
mailing list