summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2015-09-28 15:27:24 -0600
committerMartin Roth <martinroth@google.com>2015-10-05 17:43:11 +0000
commit3a54318856428cda41c5a45e41c4da727d352bf6 (patch)
treeb318ca7a8576d130ec18e853543d21542114d41b /src/console
parentf35f5ff3cd86b247a1e8ff1df8d071a3a4556079 (diff)
downloadcoreboot-3a54318856428cda41c5a45e41c4da727d352bf6.tar.xz
Add EM100 'hyper term' spi console support in ramstage & smm
The EM100Pro allows the debug console to be sent over the SPI bus. This is not yet working in romstage due to the use of static variables in the SPI driver code. It is also not working on chipsets that have SPI write buffers of less than 10 characters due to the 9 byte command/header length specified by the EM100 protocol. While this currently works only with the EM100, it seems like it would be useful on any logic analyzer with SPI debug - just filter on command bytes of 0x11. Change-Id: Icd42ccd96cab0a10a4e70f4b02ecf9de8169564b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11743 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/console')
-rw-r--r--src/console/Kconfig8
-rw-r--r--src/console/console.c3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 7d6fa0e36f..a2f893a6fc 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -211,6 +211,14 @@ config CONSOLE_QEMU_DEBUGCON_PORT
depends on CONSOLE_QEMU_DEBUGCON
default 0x402
+config SPI_CONSOLE
+ bool "SPI debug console output"
+ depends on HAVE_SPI_CONSOLE_SUPPORT && !DEBUG_SPI_FLASH
+ help
+ Enable support for the debug console on the Dediprog EM100Pro.
+ This is currently working only in ramstage due to how the spi
+ drivers are written.
+
choice
prompt "Default console log level"
default DEFAULT_CONSOLE_LOGLEVEL_8
diff --git a/src/console/console.c b/src/console/console.c
index 00c0f1ce2e..855de648cd 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -24,6 +24,7 @@
#include <console/streams.h>
#include <console/uart.h>
#include <console/usb.h>
+#include <console/spi.h>
#include <rules.h>
void console_hw_init(void)
@@ -35,6 +36,7 @@ void console_hw_init(void)
__uart_init();
__ne2k_init();
__usbdebug_init();
+ __spiconsole_init();
}
void console_tx_byte(unsigned char byte)
@@ -54,6 +56,7 @@ void console_tx_byte(unsigned char byte)
__uart_tx_byte(byte);
__ne2k_tx_byte(byte);
__usb_tx_byte(byte);
+ __spiconsole_tx_byte(byte);
}
void console_tx_flush(void)