From 08992151641a24db5ff52ce3a4bd18714d5be700 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 11 May 2018 16:41:21 +1000 Subject: fsp/console: Always establish OPAL console API backend Currently we only call set_opal_console() to establish the backend used by the OPAL console API if we find at least one FSP serial port in HDAT. On systems where there is none (IPMI only), we fail to set it, causing the console code to try to use the dummy console causing an assertion failure during boot due to clashing on the device-tree node names. So always set it if an FSP is present Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Vasant Hegde Signed-off-by: Stewart Smith --- hw/fsp/fsp-console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/fsp/fsp-console.c') diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c index 8d845d83..2c6151da 100644 --- a/hw/fsp/fsp-console.c +++ b/hw/fsp/fsp-console.c @@ -850,6 +850,9 @@ void fsp_console_init(void) /* Register poller */ opal_add_poller(fsp_console_poll, NULL); + /* Register OPAL console backend */ + set_opal_console(&fsp_opal_con); + /* Parse serial port data */ serials = dt_find_by_path(dt_root, "ipl-params/fsp-serial"); if (!serials) { @@ -869,8 +872,6 @@ 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) -- cgit v1.2.1