Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82763?usp=email )
Change subject: sb/intel/smbus: Implement smbus_send_byte() ......................................................................
sb/intel/smbus: Implement smbus_send_byte()
Change-Id: Ic368ef379039b104064c9a91474b188646388dd2 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/southbridge/intel/common/smbus.c 1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/82763/1
diff --git a/src/southbridge/intel/common/smbus.c b/src/southbridge/intel/common/smbus.c index 1594e68..944e360 100644 --- a/src/southbridge/intel/common/smbus.c +++ b/src/southbridge/intel/common/smbus.c @@ -253,7 +253,8 @@ host_outb(base, SMBHSTCMD, address);
/* Set the data bytes... */ - host_outb(base, SMBHSTDAT0, data & 0xff); + if (ctrl >= I801_BYTE_DATA) + host_outb(base, SMBHSTDAT0, data & 0xff); if (ctrl == I801_WORD_DATA) host_outb(base, SMBHSTDAT1, data >> 8);
@@ -354,6 +355,11 @@ return smbus_read_cmd(base, I801_WORD_DATA, device, address); }
+int do_smbus_send_byte(uintptr_t base, u8 device, u8 data) +{ + return smbus_write_cmd(base, I801_BYTE, device, data, 0x00); +} + int do_smbus_write_byte(uintptr_t base, u8 device, u8 address, u8 data) { return smbus_write_cmd(base, I801_BYTE_DATA, device, address, data);