drivers/smbus: add smbus console driver

This patch adds a new smbus console driver and Kconfig
options to enable the driver.

Change-Id: Ife77fb2c3e1cc77678a4972701317d50624ceb95
Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67339
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Husni Faiz 2022-09-05 15:23:15 +05:30 committed by Martin L Roth
commit 67300f88cd
4 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,3 @@
ifeq ($(CONFIG_CONSOLE_I2C_SMBUS),y)
all-y += i2c_smbus_console.c
endif

View file

@ -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);
}