Skip to content

Commit

Permalink
fsp/console: Always establish OPAL console API backend
Browse files Browse the repository at this point in the history
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 <benh@kernel.crashing.org>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed May 24, 2018
1 parent a8700b5 commit 0899215
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hw/fsp/fsp-console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down

0 comments on commit 0899215

Please sign in to comment.