diff options
Diffstat (limited to 'src/drivers/smbus')
-rw-r--r-- | src/drivers/smbus/Makefile.inc | 3 | ||||
-rw-r--r-- | src/drivers/smbus/i2c_smbus_console.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/drivers/smbus/Makefile.inc b/src/drivers/smbus/Makefile.inc new file mode 100644 index 0000000000..e14d59c3e3 --- /dev/null +++ b/src/drivers/smbus/Makefile.inc @@ -0,0 +1,3 @@ +ifeq ($(CONFIG_CONSOLE_I2C_SMBUS),y) +all-y += i2c_smbus_console.c +endif diff --git a/src/drivers/smbus/i2c_smbus_console.c b/src/drivers/smbus/i2c_smbus_console.c new file mode 100644 index 0000000000..c223028a18 --- /dev/null +++ b/src/drivers/smbus/i2c_smbus_console.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/i2c_smbus.h> +#include <device/smbus_host.h> +#include <southbridge/intel/bd82x6x/pch.h> + +void i2c_smbus_console_init(void) {} + +void i2c_smbus_console_tx_byte(unsigned char c) +{ + do_smbus_write_byte(CONFIG_FIXED_SMBUS_IO_BASE, + CONFIG_CONSOLE_I2C_SMBUS_SLAVE_ADDRESS, + CONFIG_CONSOLE_I2C_SMBUS_SLAVE_DATA_REGISTER, c); +} |