From 658e2b1558d446a4dd9effc24308cfbe8d16618f Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 9 Oct 2014 17:23:10 +1100 Subject: uart: Give UART it's own OPAL console callbacks instead of dummy console This means the Linux output no longer gets into our internal log, which makes dumping of it from Linux a lot nicer. It will also allow us to improve the way we do the bufferring for Linux and to exploit eventually the TX interrupts. It will also allow us to implement some form of timeouts for the OPAL console variant of it so we don't get stuck of the BMC doesn't consume from the virtual UART. Signed-off-by: Benjamin Herrenschmidt --- platforms/astbmc/common.c | 7 ++++--- platforms/rhesus/rhesus.c | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'platforms') diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c index 359188b..17dd66f 100644 --- a/platforms/astbmc/common.c +++ b/platforms/astbmc/common.c @@ -54,6 +54,10 @@ void astbmc_init(void) /* As soon as IPMI is up, inform BMC we are in "S0" */ ipmi_set_power_state(IPMI_PWR_SYS_S0_WORKING, IPMI_PWR_NOCHANGE); + + /* Setup UART console for use by Linux via OPAL API */ + if (!dummy_console_enabled()) + uart_setup_opal_console(); } int64_t astbmc_ipmi_power_down(uint64_t request) @@ -163,9 +167,6 @@ static void astbmc_fixup_dt(void) astbmc_fixup_dt_uart(primary_lpc); astbmc_fixup_dt_bt(primary_lpc); - - /* Force the dummy console for now */ - force_dummy_console(); } static void astbmc_fixup_psi_bar(void) diff --git a/platforms/rhesus/rhesus.c b/platforms/rhesus/rhesus.c index b749eef..bcf67ee 100644 --- a/platforms/rhesus/rhesus.c +++ b/platforms/rhesus/rhesus.c @@ -179,6 +179,9 @@ static void rhesus_init(void) { /* Initialize PNOR/NVRAM */ rhesus_pnor_init(); + + /* Setup UART for direct use by Linux */ + uart_setup_linux_passthrough(); } static void rhesus_dt_fixup_uart(struct dt_node *lpc) -- cgit v1.1