diff options
-rw-r--r-- | src/superio/aspeed/common/Kconfig | 17 | ||||
-rw-r--r-- | src/superio/aspeed/common/early_serial.c | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/superio/aspeed/common/Kconfig b/src/superio/aspeed/common/Kconfig index 3f0dabb853..f310f3ef98 100644 --- a/src/superio/aspeed/common/Kconfig +++ b/src/superio/aspeed/common/Kconfig @@ -20,3 +20,20 @@ config SUPERIO_ASPEED_COMMON_PRE_RAM bool default n + +config SUPERIO_ASPEED_HAS_UART_DELAY_WORKAROUND + bool + default n + +config SUPERIO_ASPEED_USE_UART_DELAY_WORKAROUND + bool "Workaround for BMC serial console setup bug" + depends on CONSOLE_SERIAL && SUPERIO_ASPEED_HAS_UART_DELAY_WORKAROUND + default y + help + Some mainboards with an ASPEED BMC have scrambled console output in early boot phases + because the serial output routing is not set up fast enough by the BMC. By enabling + this a delay of 500ms gets added before setting up the console and before any console + output gets printed. + + Note: this problem may disappear with future BMC firmware versions. Another approach + is using a different BMC firmware like OpenBMC, u-bmc, ... diff --git a/src/superio/aspeed/common/early_serial.c b/src/superio/aspeed/common/early_serial.c index 7ac9474bcc..d2de8ed322 100644 --- a/src/superio/aspeed/common/early_serial.c +++ b/src/superio/aspeed/common/early_serial.c @@ -35,6 +35,7 @@ */ #include <arch/io.h> +#include <delay.h> #include <device/pnp_def.h> #include <device/pnp_ops.h> #include <stdint.h> @@ -67,4 +68,7 @@ void aspeed_enable_serial(pnp_devfn_t dev, u16 iobase) pnp_set_iobase(dev, PNP_IDX_IO0, iobase); pnp_set_enable(dev, 1); pnp_exit_conf_state(dev); + + if (CONFIG(SUPERIO_ASPEED_USE_UART_DELAY_WORKAROUND)) + mdelay(500); } |