summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorMarc Jones <marcjones@sysproconsulting.com>2021-04-16 14:26:08 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-04-18 20:37:10 +0000
commitdc12daf277d9e94a8acfe8ad875bd38ebca897ba (patch)
tree963becd9c31538453aa93a4531df805a9a5d8a10 /src/drivers
parent2a1ad76f7849c8141408e8895e90527053aa3bd8 (diff)
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. Change-Id: I788d67c242cac23bde9750aa3e95e3276c3f1fd7 Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52449 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/ipmi/ipmi_kcs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/drivers/ipmi/ipmi_kcs.c b/src/drivers/ipmi/ipmi_kcs.c
index dcad8627ce..12cbe82f14 100644
--- a/src/drivers/ipmi/ipmi_kcs.c
+++ b/src/drivers/ipmi/ipmi_kcs.c
@@ -29,7 +29,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;
}
@@ -57,7 +58,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));
@@ -80,7 +82,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;
@@ -101,7 +104,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;