diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2016-12-21 15:52:30 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-01-04 17:15:57 +1100 |
commit | f332fb40baa5da03ee7db4deaa1eb589f21272f0 (patch) | |
tree | c337dec7aa71590122c6f5abe2f1e51a157e7bee /platforms | |
parent | 6f7bd78463e051dad239b349caf5dd641e2a4dd7 (diff) | |
download | skiboot-f332fb40baa5da03ee7db4deaa1eb589f21272f0.zip skiboot-f332fb40baa5da03ee7db4deaa1eb589f21272f0.tar.gz skiboot-f332fb40baa5da03ee7db4deaa1eb589f21272f0.tar.bz2 |
console: use opal_con_ops API
Adds a new structure that contains the implementations of the various
OPAL console handlers. This is intended to replace the existing ad-hoc
mechanism where the OPAL call handlers are overwritten in the OPAL
console driver's init function.
Currently this just moves the site where the OPAL call handlers are
overwritten to inside of console.c, but it is intended to give us a
mechanism for implementing features such as pointer validation for the
OPAL console calls without having to manually update each driver.
This also helps to clarify differences between the internal (skiboot)
console and the external (OPAL) console.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/astbmc/common.c | 3 | ||||
-rw-r--r-- | platforms/qemu/qemu.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c index 6e678a1..ce8edea 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 0c583f1..85ca213 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() |