diff --git a/src/southbridge/intel/common/Kconfig b/src/southbridge/intel/common/Kconfig index 669569e18c..304ecbfba3 100644 --- a/src/southbridge/intel/common/Kconfig +++ b/src/southbridge/intel/common/Kconfig @@ -1,9 +1,13 @@ config SOUTHBRIDGE_INTEL_COMMON def_bool n + config SOUTHBRIDGE_INTEL_COMMON_GPIO def_bool n + config SOUTHBRIDGE_INTEL_COMMON_SMBUS def_bool n + select HAVE_DEBUG_SMBUS + config HAVE_INTEL_CHIPSET_LOCKDOWN def_bool n diff --git a/src/southbridge/intel/common/smbus.c b/src/southbridge/intel/common/smbus.c index 90ef03ee12..2067baa8b2 100644 --- a/src/southbridge/intel/common/smbus.c +++ b/src/southbridge/intel/common/smbus.c @@ -16,11 +16,18 @@ */ #include +#include #include #include #include "smbus.h" +#if IS_ENABLED(CONFIG_DEBUG_SMBUS) +#define dprintk(args...) printk(BIOS_DEBUG, ##args) +#else +#define dprintk(args...) do {} while (0) +#endif + /* I801 command constants */ #define I801_QUICK (0 << 2) #define I801_BYTE (1 << 2) @@ -256,6 +263,9 @@ int do_smbus_block_read(unsigned int smbus_base, u8 device, u8 cmd, } } while ((status & SMBHSTSTS_HOST_BUSY) && loops); + dprintk("%s: status = %02x, len = %d / %d, loops = %d\n", + __func__, status, bytes_read, slave_bytes, loops); + /* Post-check we received complete message. */ slave_bytes = inb(smbus_base + SMBHSTDAT0); if (bytes_read < slave_bytes) @@ -329,6 +339,9 @@ int do_smbus_block_write(unsigned int smbus_base, u8 device, u8 cmd, } } while ((status & SMBHSTSTS_HOST_BUSY) && loops); + dprintk("%s: status = %02x, len = %d / %d, loops = %d\n", + __func__, status, bytes_sent, bytes, loops); + if (bytes_sent < bytes) return SMBUS_ERROR; @@ -396,6 +409,9 @@ int do_i2c_block_read(unsigned int smbus_base, u8 device, } } while ((status & SMBHSTSTS_HOST_BUSY) && loops); + dprintk("%s: status = %02x, len = %d / %d, loops = %d\n", + __func__, status, bytes_read, bytes, loops); + if (bytes_read < bytes) return SMBUS_ERROR;