diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-01 17:42:45 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-09 18:43:35 +0000 |
commit | 4ae9f1e5d8719f86e756a21e5e624f10675c7dea (patch) | |
tree | bf56c07a67c08dbf8d800083d842d7b554550afb /src/soc/intel/common/block/smbus/smbuslib.c | |
parent | c2ce370f30b60daf60e23182cf01eb898d35fbbd (diff) |
soc/intel/common: Sync early SMBUS prototypes
Change-Id: I6b4b5ffd552b9eb4467689c8df85905a1c199bb0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38120
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/smbus/smbuslib.c')
-rw-r--r-- | src/soc/intel/common/block/smbus/smbuslib.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/soc/intel/common/block/smbus/smbuslib.c b/src/soc/intel/common/block/smbus/smbuslib.c index a8c2dad41c..e2df73025f 100644 --- a/src/soc/intel/common/block/smbus/smbuslib.c +++ b/src/soc/intel/common/block/smbus/smbuslib.c @@ -47,8 +47,7 @@ static int smbus_wait_till_done(u16 smbus_base) return -1; } -int smbus_read8(unsigned int smbus_base, unsigned int device, - unsigned int address) +int do_smbus_read_byte(unsigned int smbus_base, u8 device, unsigned int address) { unsigned char global_status_register; unsigned char byte; @@ -93,8 +92,8 @@ int smbus_read8(unsigned int smbus_base, unsigned int device, return byte; } -int smbus_write8(unsigned int smbus_base, unsigned int device, - unsigned int address, unsigned int data) +int do_smbus_write_byte(unsigned int smbus_base, u8 device, unsigned int address, + unsigned int data) { unsigned char global_status_register; @@ -137,8 +136,7 @@ int smbus_write8(unsigned int smbus_base, unsigned int device, return 0; } -int smbus_read16(unsigned int smbus_base, unsigned int device, - unsigned int address) +int do_smbus_read_word(unsigned int smbus_base, u8 device, unsigned int address) { unsigned char global_status_register; unsigned short data; @@ -180,15 +178,15 @@ int smbus_read16(unsigned int smbus_base, unsigned int device, u16 smbus_read_word(u8 addr, u8 offset) { - return smbus_read16(SMBUS_IO_BASE, addr, offset); + return do_smbus_read_word(SMBUS_IO_BASE, addr, offset); } u8 smbus_read_byte(u8 addr, u8 offset) { - return smbus_read8(SMBUS_IO_BASE, addr, offset); + return do_smbus_read_byte(SMBUS_IO_BASE, addr, offset); } u8 smbus_write_byte(u8 addr, u8 offset, u8 value) { - return smbus_write8(SMBUS_IO_BASE, addr, offset, value); + return do_smbus_write_byte(SMBUS_IO_BASE, addr, offset, value); } |