summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Jones <marcjones@sysproconsulting.com>2021-04-16 14:26:08 -0600
committerWerner Zeh <werner.zeh@siemens.com>2021-06-16 04:21:06 +0000
commit1d3fbda9ee6551f2453abfb88ba79d30e50d6249 (patch)
treea288957573750bdc269792c1685a1d41d95dcf1e
parent3ec21b07fb9cb27f76ce515d265d7f73d66ba08a (diff)
downloadcoreboot-1d3fbda9ee6551f2453abfb88ba79d30e50d6249.tar.gz
coreboot-1d3fbda9ee6551f2453abfb88ba79d30e50d6249.tar.bz2
coreboot-1d3fbda9ee6551f2453abfb88ba79d30e50d6249.zip
src/drivers/ipmi: Add DEBUG_IPMI option
IPMI debug was extra spewy, so add a debug option as SPI and other drivers have when they need to be debugged. Original-Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/52449 Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com> (cherry picked from commit dc12daf277d9e94a8acfe8ad875bd38ebca897ba) Change-Id: If586b5feea74de0e6ed677af18e61dedf1216939 Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54878 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/Kconfig7
-rw-r--r--src/drivers/ipmi/ipmi_kcs.c12
2 files changed, 15 insertions, 4 deletions
diff --git a/src/Kconfig b/src/Kconfig
index c0315239fc78..43b92a0130a9 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -1031,6 +1031,13 @@ config DEBUG_SPI_FLASH
help
This option enables additional SPI flash related debug messages.
+config DEBUG_IPMI
+ bool "Output verbose IPMI debug messages"
+ default n
+ depends on IPMI_KCS
+ help
+ This option enables additional IPMI related debug messages.
+
if SOUTHBRIDGE_INTEL_BD82X6X && DEFAULT_CONSOLE_LOGLEVEL_8
# Only visible with the right southbridge and loglevel.
config DEBUG_INTEL_ME
diff --git a/src/drivers/ipmi/ipmi_kcs.c b/src/drivers/ipmi/ipmi_kcs.c
index d3916198a6a9..60766215a056 100644
--- a/src/drivers/ipmi/ipmi_kcs.c
+++ b/src/drivers/ipmi/ipmi_kcs.c
@@ -41,7 +41,8 @@
static unsigned char ipmi_kcs_status(int port)
{
unsigned char status = inb(IPMI_STAT(port));
- printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, status);
+ if (CONFIG(DEBUG_IPMI))
+ printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, status);
return status;
}
@@ -75,7 +76,8 @@ static int ipmi_kcs_send_data_byte(int port, const unsigned char byte)
{
unsigned char status;
- printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, byte);
+ if (CONFIG(DEBUG_IPMI))
+ printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, byte);
outb(byte, IPMI_DATA(port));
@@ -98,7 +100,8 @@ static int ipmi_kcs_send_last_data_byte(int port, const unsigned char byte)
{
unsigned char status;
- printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, byte);
+ if (CONFIG(DEBUG_IPMI))
+ printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, byte);
if (wait_ibf_timeout(port))
return 1;
@@ -119,7 +122,8 @@ static int ipmi_kcs_send_last_data_byte(int port, const unsigned char byte)
static int ipmi_kcs_send_cmd_byte(int port, const unsigned char byte)
{
- printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, byte);
+ if (CONFIG(DEBUG_IPMI))
+ printk(BIOS_SPEW, "%s: 0x%02x\n", __func__, byte);
if (wait_ibf_timeout(port))
return 1;