diff options
author | Andrew Jeffery <andrewrj@au1.ibm.com> | 2018-07-16 16:09:14 +0930 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-07-25 09:26:37 -0500 |
commit | de06d0f09c74f1bcf777716fb33db356b320dcf6 (patch) | |
tree | 340814c32689f73159a6a210bb15d1ecf293653f | |
parent | 8f9c60506bc93f37772d2bf95531d5db5426cf50 (diff) | |
download | talos-hostboot-de06d0f09c74f1bcf777716fb33db356b320dcf6.tar.gz talos-hostboot-de06d0f09c74f1bcf777716fb33db356b320dcf6.zip |
console: ast2400: Indicate SP has met configuration requirements
If the service processor has pre-configured the hardware to the state
required by the host firmware it can set a bit to indicate this. If the
bit is set, avoid touching the UART configuration.
Change-Id: I96d228b5d89749eb531522e4ae90396b47776c43
Signed-off-by: Andrew Jeffery <andrewrj@au1.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/62506
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Disable-CI: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Disable-CI: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/usr/console/ast2400.C | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/src/usr/console/ast2400.C b/src/usr/console/ast2400.C index 43ec9ef6b..0fd7f4b53 100644 --- a/src/usr/console/ast2400.C +++ b/src/usr/console/ast2400.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2016 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,9 +40,6 @@ namespace CONSOLE const uint32_t VUART1_ADDRL = VUART1_BASE + 0x28; const uint32_t VUART1_ADDRH = VUART1_BASE + 0x2c; - // used to test config flags related to console output selection - const uint8_t CONFIG_MASK = 0xC0; - /** Overload the base class with Ast2400 specifics. * * In initialization we need to program the SIO device on the AST2400 to @@ -51,6 +48,21 @@ namespace CONSOLE class Ast2400Uart : public Uart { public: + enum platFlagsMask_t + { + /** + * @brief ISOLATE_SP flag + * + * If the ISOLATE_SP flag is set, then the service processor must + * configure: + * + * 1. A UART device at 0x3f8, SIRQ 4, low polarity + * 2. The BT device at 0xe4, SIRQ 10, low polarity + */ + ISOLATE_SP = 0x01, + CONSOLE_FLAGS = 0xc0, + }; + enum consoleConfig_t { NONE = 0x00, // No output selected @@ -281,7 +293,7 @@ namespace CONSOLE errlHndl_t l_err = NULL; size_t l_len = sizeof(uint8_t); - uint8_t uart_config = 0x00; + uint8_t plat_config = 0x00; do { @@ -297,16 +309,23 @@ namespace CONSOLE { l_err = deviceOp( DeviceFW::READ, TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, - &(uart_config), + &(plat_config), l_len, DEVICE_SIO_ADDRESS(SIO::SUART1, 0x2d)); if (l_err) { break; } + if (plat_config & ISOLATE_SP) + { + printk("ast2400: UART configured by BMC\n"); + Uart::initialize(); + break; + } + // determine which config has been selected - consoleConfig_t config = - static_cast<consoleConfig_t>(uart_config & CONFIG_MASK); + consoleConfig_t uart_config = + static_cast<consoleConfig_t>(plat_config & CONSOLE_FLAGS); - switch ( config ) + switch ( uart_config ) { case SELECT_SUART: { |