@@ -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();
@@ -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();
@@ -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)
@@ -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)
@@ -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()
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@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(-)