Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38051 )
Change subject: device/early_smbus: Drop unused function parameter ......................................................................
device/early_smbus: Drop unused function parameter
Change-Id: I2d62c470c5389af3b10e47ca5e721b78ff16bc79 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/38051 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/include/device/early_smbus.h M src/lib/spd_bin.c M src/soc/intel/common/block/smbus/smbuslib.c 3 files changed, 11 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/include/device/early_smbus.h b/src/include/device/early_smbus.h index c2a2f67..015be67 100644 --- a/src/include/device/early_smbus.h +++ b/src/include/device/early_smbus.h @@ -49,8 +49,8 @@
#include <stdint.h>
-u16 smbus_read_word(u32 smbus_dev, u8 addr, u8 offset); -u8 smbus_read_byte(u32 smbus_dev, u8 addr, u8 offset); -u8 smbus_write_byte(u32 smbus_dev, u8 addr, u8 offset, u8 value); +u16 smbus_read_word(u8 addr, u8 offset); +u8 smbus_read_byte(u8 addr, u8 offset); +u8 smbus_write_byte(u8 addr, u8 offset, u8 value);
#endif /* DEVICE_EARLY_SMBUS_H */ diff --git a/src/lib/spd_bin.c b/src/lib/spd_bin.c index 71fe036..b022200 100644 --- a/src/lib/spd_bin.c +++ b/src/lib/spd_bin.c @@ -227,15 +227,15 @@ for (i = 0; i < SPD_PAGE_LEN; i += step) { if (CONFIG(SPD_READ_BY_WORD)) ((u16*)spd)[i / sizeof(uint16_t)] = - smbus_read_word(0, addr, i); + smbus_read_word(addr, i); else - spd[i] = smbus_read_byte(0, addr, i); + spd[i] = smbus_read_byte(addr, i); } }
static void get_spd(u8 *spd, u8 addr) { - if (smbus_read_byte(0, addr, 0) == 0xff) { + if (smbus_read_byte(addr, 0) == 0xff) { printk(BIOS_INFO, "No memory dimm at address %02X\n", addr << 1); /* Make sure spd is zeroed if dimm doesn't exist. */ @@ -248,10 +248,10 @@ if (spd[SPD_DRAM_TYPE] == SPD_DRAM_DDR4 && CONFIG_DIMM_SPD_SIZE > SPD_PAGE_LEN) { /* Switch to page 1 */ - smbus_write_byte(0, SPD_PAGE_1, 0, 0); + smbus_write_byte(SPD_PAGE_1, 0, 0); smbus_read_spd(spd + SPD_PAGE_LEN, addr); /* Restore to page 0 */ - smbus_write_byte(0, SPD_PAGE_0, 0, 0); + smbus_write_byte(SPD_PAGE_0, 0, 0); } }
diff --git a/src/soc/intel/common/block/smbus/smbuslib.c b/src/soc/intel/common/block/smbus/smbuslib.c index e2a0ed9..a8c2dad 100644 --- a/src/soc/intel/common/block/smbus/smbuslib.c +++ b/src/soc/intel/common/block/smbus/smbuslib.c @@ -178,17 +178,17 @@ return data; }
-u16 smbus_read_word(u32 smbus_dev, u8 addr, u8 offset) +u16 smbus_read_word(u8 addr, u8 offset) { return smbus_read16(SMBUS_IO_BASE, addr, offset); }
-u8 smbus_read_byte(u32 smbus_dev, u8 addr, u8 offset) +u8 smbus_read_byte(u8 addr, u8 offset) { return smbus_read8(SMBUS_IO_BASE, addr, offset); }
-u8 smbus_write_byte(u32 smbus_dev, u8 addr, u8 offset, u8 value) +u8 smbus_write_byte(u8 addr, u8 offset, u8 value) { return smbus_write8(SMBUS_IO_BASE, addr, offset, value); }